The licensee has a problem with java.lang.Math.pow function.
The behaviour of pow in their system is different from reference implementation.
However, there is no clear spec for mathematical functions.
The JLS refers to C implementation of fdlibm as a spec.
This is not a good thing. We cannot rely on C behaviour in the JLS.
A possible solution is to provide reference implementation of java.lang.Math in java.
> Date: Thu, 21 May 1998 18:22:50 +0900
> From: Shigeru Santo <###@###.###>
> To: ###@###.###
> Subject: The certification process
> Product Name: Developer's Kit for Java
> Platform: HI-UX/WE2 (Hitachi's unix platform)
> Based on: JDK 1.1.6 Solaris reference
>
> The certification process:
> We have run all of the test in the JCK 1.1.6a, and get the following
> failed items. All other items have been passed.
>
> I believe all of these failed items are allowable to get the Java logo.
> So, I would like you to give us a right to contact with JavaSoft
> Marketing Communications to request the logo artwork.
>
> The explanations for the each failed items:
>
> *** Case (1) to (4): The result from our pow() library is slightly
> different from the result in the Solaris, and all these test cases are
> expecting exactly the same return value as the Solaris's pow().
>
> For example:
> pow(2.0, -51.0)
> 0x3CBFFFFFFFFFFFED^[$B!!!!!!!!!!^[(JHI-UX/WE2
> 0x3CC0000000000000^[$B!!!!!!!!!!^[(JSolaris
>
> I believe this is allowable difference.
>
> I think you should not expect exactly the same return value as your
> math library that is treating the floating point value.
> The result of such a library must be checked by a range,
> e.g. low < result < high.
>
> Because the result would be slightly differs by the algorithm that is
> chosen by the library, and JLS does not define the algorithm of the
> library.
>
> =================== The results ==================================
>
> -------------------- pow() problem -----------------------------
>
> (1)/java -verify
> javasoft.sqe.tests.vm.classfmt.cpl.cpldbl005.cpldbl00501
> ----------ref:testExecute(1/14)----------
> invalid value
> ----------log:testExecute(0/0)----------
>
>
> (2)/java -verify
> javasoft.sqe.tests.vm.classfmt.cpl.cplflt005.cplflt00501
> ----------ref:testExecute(1/14)----------
> invalid value
> ----------log:testExecute(0/0)----------
>
> (3)/java -verify
> javasoft.sqe.tests.api.java.lang.Float.intBitsToFloat25Tests
> ----------ref:testExecute(56/2917)----------
>
> STATUS:Failed.tests: 16; passed: 10; failed: 6; first test case failure:
> 0:1
> command result: Failed. tests: 16; passed: 10; failed: 6; first test
> case failure: 0:1
> test result: Failed. tests: 16; passed: 10; failed: 6; first test case
> failure: 0:1
>
> (4)/java -verify
> javasoft.sqe.tests.api.java.lang.Double.longBitsToDouble4Tests
> ----------ref:testExecute(42/2235)----------
>
> STATUS:Failed.tests: 13; passed: 9; failed: 4; first test case failure:
> 0:1
> command result: Failed. tests: 13; passed: 9; failed: 4; first test case
> failure: 0:1
> test result: Failed. tests: 13; passed: 9; failed: 4; first test case
> failure: 0:1
======================================================================
###@###.### 2004-11-11 21:46:39 GMT
- relates to
-
JDK-4880538 REGRESSION: 6 JCK14a api/java_lang/StrictMath tests fail on tiger
- Closed
-
JDK-4939441 log1p fails on NaN arguments
- Closed
-
JDK-4294714 fdlibm uses HI/LO macros which depend on pointer aliasing - portability issue
- Closed
-
JDK-7130085 Port fdlibm hypot to Java
- Resolved
-
JDK-6604458 linux_x64-fastdebug-c2 fails on hyperbolic trig tests
- Closed
-
JDK-4378241 fdlibm.h requires define __LITTLE_ENDIAN instead of _LITTLE_ENDIAN
- Closed
-
JDK-8131132 C2 intrinsics for asin, acos
- Open
-
JDK-6908131 Pure Java implementations of java.lang.StrictMath.floor(double) & java.lang.StrictMath.ceil(double)
- Resolved
-
JDK-8171407 Port fdlibm to Java, part 2
- Closed
-
JDK-4947390 Improve compiler options compiling fdlibm
- Closed