JDK-7174532 : jdk/test/java/lang/Math/WorstCaseTests.java failing on x86
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs24,8
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-06-05
  • Updated: 2013-06-26
  • Resolved: 2012-06-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8 Other
7u40Resolved 8Fixed hs24Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Description
At least one of the math tests in the jdk repository is failing since hs24-b12. 


--------------------------------------------------
TEST: java/lang/Math/WorstCaseTests.java
JDK under test: (/tmp/jprt/P1/020333.khazra/testproduct/linux_i586_2.6-product)
java version "1.8.0-internal"
Java(TM) SE Runtime Environment (build 1.8.0-internal-201206050203.khazra.jdk-b00)
Java HotSpot(TM) Client VM (build 24.0-b12, mixed mode, sharing)

ACTION: build -- Passed. All files up to date
REASON: User specified action: run build Tests 
TIME:   0.001 seconds
messages:
command: build Tests
reason: User specified action: run build Tests 
elapsed time (seconds): 0.001

ACTION: build -- Passed. Build successful
REASON: User specified action: run build WorstCaseTests 
TIME:   0.091 seconds
messages:
command: build WorstCaseTests
reason: User specified action: run build WorstCaseTests 
elapsed time (seconds): 0.091

ACTION: compile -- Passed. Compilation successful
REASON: .class file out of date or does not exist
TIME:   0.091 seconds
messages:
command: compile /tmp/jprt/P1/020333.khazra/s/test/java/lang/Math/WorstCaseTests.java
reason: .class file out of date or does not exist
elapsed time (seconds): 0.091

ACTION: build -- Passed. All files up to date
REASON: Named class compiled on demand
TIME:   0.0 seconds
messages:
command: build WorstCaseTests
reason: Named class compiled on demand
elapsed time (seconds): 0.0

ACTION: main -- Failed. Execution failed: `main' threw exception: java.lang.RuntimeException
REASON: User specified action: run main WorstCaseTests 
TIME:   0.046 seconds
messages:
command: main WorstCaseTests
reason: User specified action: run main WorstCaseTests 
elapsed time (seconds): 0.046
STDERR:
Failure for Math.exp:
	For input -15.273162747858944	(-0x1.e8bdbfcd9144ep3)
	got       2.327821619714312E-7	(0x1.f3e558cf4de5dp-23);
	outside of range
	[2.3278216197143096E-7	(0x1.f3e558cf4de54p-23), 2.3278216197143099E-7	(0x1.f3e558cf4de55p-23)]
Failure for Math.exp:
	For input -5.77934084246919	(-0x1.71e0b869b5e79p2)
	got       0.0030907520294119885	(0x1.951c6dc5d24dfp-9);
	outside of range
	[0.0030907520294119898	(0x1.951c6dc5d24e2p-9), 0.00309075202941199	(0x1.951c6dc5d24e3p-9)]
Failure for Math.exp:
	For input -1.797728508222747	(-0x1.cc37ef7de7501p0)
	got       0.16567479005430436	(0x1.534d4de870712p-3);
	outside of range
	[0.16567479005430438	(0x1.534d4de870713p-3), 0.1656747900543044	(0x1.534d4de870714p-3)]
Failure for Math.exp:
	For input 1.8367220480063033	(0x1.d6336a88077aap0)
	got       6.27593230200363	(0x1.91a8dff540ff6p2);
	outside of range
	[6.275932302003631	(0x1.91a8dff540ff7p2), 6.275932302003632	(0x1.91a8dff540ff8p2)]
Failure for Math.exp:
	For input 11.715807839696332	(0x1.76e7e5d7b6eacp3)
	got       122492.83772374172	(0x1.de7cd6751029cp16);
	outside of range
	[122492.83772374169	(0x1.de7cd6751029ap16), 122492.8377237417	(0x1.de7cd6751029bp16)]
Failure for Math.exp:
	For input 13.278663800537615	(0x1.a8ead058bc6b8p3)
	got       584588.6991355021	(0x1.1d71965f516aap19);
	outside of range
	[584588.6991355025	(0x1.1d71965f516adp19), 584588.6991355026	(0x1.1d71965f516aep19)]
Failure for Math.exp:
	For input 17.83500450381271	(0x1.1d5c2daebe367p4)
	got       5.567292518201272E7	(0x1.a8c02e974c316p25);
	outside of range
	[5.567292518201271E7	(0x1.a8c02e974c314p25), 5.5672925182012714E7	(0x1.a8c02e974c315p25)]
Failure for Math.exp:
	For input 28.26876911181362	(0x1.c44ce0d716a1ap4)
	got       1.8922148019756777E12	(0x1.b890ca8637ad8p40);
	outside of range
	[1.89221480197568E12	(0x1.b890ca8637ae1p40), 1.8922148019756802E12	(0x1.b890ca8637ae2p40)]
Testing worst cases incurred 8 failures.
java.lang.RuntimeException
	at WorstCaseTests.main(WorstCaseTests.java:77)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:474)
	at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:698)
	at java.lang.Thread.run(Thread.java:722)

JavaTest Message: Test threw exception: java.lang.RuntimeException
JavaTest Message: shutting down test


TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException
--------------------------------------------------

Comments
EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/e7715c222897
29-06-2012

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/e7715c222897
12-06-2012

EVALUATION With 7133857, x86 now uses fpu instructions to compute Math.pow() and Math.exp(). This test fails because the new code doesn't generate results that are precise enough. A simple fix consists in increasing the fpu precision (from standard to extended) during the code sequence that computes Math.pow() and Math.exp().
06-06-2012