Skip to content

Commit 18669cb

Browse files
authored
Re-enable exp() tests on x86 (#420)
Problem has been fixed: https://bugs.openjdk.java.net/browse/JDK-8255368.
1 parent 201f119 commit 18669cb

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

openjdk.test.math/src/test.math/net/adoptopenjdk/test/math/MathAPITest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,19 +1268,19 @@ public void testExp()
12681268
assertEquals("exp(double)[18] ::", 11.3842406513381, StrictMath.exp(2.43223D));
12691269
assertTrue("exp(double)[19] ::", 11.384240651338098 <= Math.exp(2.43223D) && 11.384240651338102 >= Math.exp(2.43223D));
12701270
assertEquals("exp(double)[20] ::", Infinity, StrictMath.exp(18232155.3323566D));
1271-
if ( ! ( System.getProperty("sun.arch.data.model").equals("32") && System.getProperty("os.name").toLowerCase().contains("win") && runtimeJdkRange.equals("notPreJdk9") ) ) {assertEquals("exp(double)[21] ::", Infinity, Math.exp(18232155.3323566D));}
1271+
assertEquals("exp(double)[21] ::", Infinity, Math.exp(18232155.3323566D));
12721272
assertEquals("exp(double)[22] ::", 1.0, StrictMath.exp(Double.MIN_VALUE));
12731273
assertTrue("exp(double)[23] ::", 0.9999999999999998 <= Math.exp(Double.MIN_VALUE) && 1.0000000000000002 >= Math.exp(Double.MIN_VALUE));
12741274
assertEquals("exp(double)[24] ::", 1.0, StrictMath.exp((Double.MIN_VALUE * 200)));
12751275
assertTrue("exp(double)[25] ::", 0.9999999999999998 <= Math.exp((Double.MIN_VALUE * 200)) && 1.0000000000000002 >= Math.exp((Double.MIN_VALUE * 200)));
12761276
assertEquals("exp(double)[26] ::", Infinity, StrictMath.exp((Double.MAX_VALUE / 500)));
1277-
if ( ! ( System.getProperty("sun.arch.data.model").equals("32") && System.getProperty("os.name").toLowerCase().contains("win") && runtimeJdkRange.equals("notPreJdk9") ) ) {assertEquals("exp(double)[27] ::", Infinity, Math.exp((Double.MAX_VALUE / 500)));}
1277+
assertEquals("exp(double)[27] ::", Infinity, Math.exp((Double.MAX_VALUE / 500)));
12781278
assertEquals("exp(double)[28] ::", Infinity, StrictMath.exp((Double.MAX_VALUE / 200)));
1279-
if ( ! ( System.getProperty("sun.arch.data.model").equals("32") && System.getProperty("os.name").toLowerCase().contains("win") && runtimeJdkRange.equals("notPreJdk9") ) ) {assertEquals("exp(double)[29] ::", Infinity, Math.exp((Double.MAX_VALUE / 200)));}
1279+
assertEquals("exp(double)[29] ::", Infinity, Math.exp((Double.MAX_VALUE / 200)));
12801280
assertEquals("exp(double)[30] ::", Infinity, StrictMath.exp(Double.MAX_VALUE));
1281-
if ( ! ( System.getProperty("sun.arch.data.model").equals("32") && System.getProperty("os.name").toLowerCase().contains("win") && runtimeJdkRange.equals("notPreJdk9") ) ) {assertEquals("exp(double)[31] ::", Infinity, Math.exp(Double.MAX_VALUE));}
1281+
assertEquals("exp(double)[31] ::", Infinity, Math.exp(Double.MAX_VALUE));
12821282
assertEquals("exp(double)[32] ::", Infinity, StrictMath.exp(Double.MAX_VALUE + 1));
1283-
if ( ! ( System.getProperty("sun.arch.data.model").equals("32") && System.getProperty("os.name").toLowerCase().contains("win") && runtimeJdkRange.equals("notPreJdk9") ) ) {assertEquals("exp(double)[33] ::", Infinity, Math.exp(Double.MAX_VALUE + 1));}
1283+
assertEquals("exp(double)[33] ::", Infinity, Math.exp(Double.MAX_VALUE + 1));
12841284
}
12851285

12861286
public void testExpm1()

openjdk.test.math/src/test.math/net/adoptopenjdk/test/math/MathAPITestGenerator.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -646,10 +646,6 @@ private void generate()
646646
// **************************************************************************************
647647

648648
// exp - double
649-
// Exclude Math.exp on win_x86-32 hotspot jdk11 or later when the expected result is
650-
// Infinity pending resolution to issues:
651-
// https://github.com/AdoptOpenJDK/openjdk-tests/issues/2062
652-
// https://github.com/AdoptOpenJDK/openjdk-support/issues/182
653649
// **************************************************************************************
654650
testCount = 0;
655651
System.out.println("public void testExp()");
@@ -658,8 +654,7 @@ private void generate()
658654
{
659655
System.out.println("assertEquals(\"exp(double)["+testCount+++"] ::\", " + StrictMath.exp(doubleTestValues[i]) + ", StrictMath.exp("+doubleTestStrings[i]+"));");
660656
if ( Double.isInfinite(StrictMath.exp(doubleTestValues[i])) ) {
661-
System.out.println("if ( ! ( System.getProperty(\"sun.arch.data.model\").equals(\"32\") && System.getProperty(\"os.name\").toLowerCase().contains(\"win\") && runtimeJdkRange.equals(\"notPreJdk9\") ) ) {assertEquals(\"exp(double)["+testCount+++"] ::\", " + StrictMath.exp(doubleTestValues[i]) + ", Math.exp("+doubleTestStrings[i]+"));}");
662-
//System.out.println("assertEquals(\"exp(double)["+testCount+++"] ::\", " + StrictMath.exp(doubleTestValues[i]) + ", Math.exp("+doubleTestStrings[i]+"));");
657+
System.out.println("assertEquals(\"exp(double)["+testCount+++"] ::\", " + StrictMath.exp(doubleTestValues[i]) + ", Math.exp("+doubleTestStrings[i]+"));");
663658
}
664659
else {
665660
dTolerance = StrictMath.ulp(StrictMath.exp(doubleTestValues[i]));

0 commit comments

Comments
 (0)