harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From regi...@apache.org
Subject svn commit: r921662 - in /harmony/enhanced/classlib/trunk/modules/luni/src/main: java/java/lang/Math.java native/luni/shared/math.c native/luni/unix/exports.txt
Date Thu, 11 Mar 2010 01:47:10 GMT
Author: regisxu
Date: Thu Mar 11 01:47:10 2010
New Revision: 921662

URL: http://svn.apache.org/viewvc?rev=921662&view=rev
Log:
revert fix for HARMONY-6441 at r909251, but keep the test case.

It is fixed in fdlibm 5.3, the check in java code is not necessary anymore.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Math.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/math.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/exports.txt

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Math.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Math.java?rev=921662&r1=921661&r2=921662&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Math.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/Math.java Thu Mar
11 01:47:10 2010
@@ -708,23 +708,7 @@ public final class Math {
      *            the exponent of the operation.
      * @return {@code x} to the power of {@code y}.
      */
-    public static double pow(double x, double y) {
-        if (x < 0.0 && x != Double.NEGATIVE_INFINITY) {
-            if (y != Double.NEGATIVE_INFINITY && y != Double.POSITIVE_INFINITY) {
 // is finit
-                if (y == Math.ceil(y)) {  // is integer
-                    double absx = Math.abs(x);
-                    if (y % 2 == 0.0) {
-                        return doPow(absx, y);
-                    }
-                    return -1.0 * doPow(absx, y);
-                }
-                return Double.NaN;
-            }
-        }
-        return doPow(x, y);
-    }
-
-    private static native double doPow(double x, double y);
+    public static native double pow(double x, double y);
 
     /**
      * Returns the double conversion of the result of rounding the argument to

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/math.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/math.c?rev=921662&r1=921661&r2=921662&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/math.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/math.c Thu Mar
11 01:47:10 2010
@@ -542,7 +542,7 @@ Java_java_lang_StrictMath_pow (JNIEnv * 
 }
 
 JNIEXPORT jdouble JNICALL
-Java_java_lang_Math_doPow (JNIEnv * env, jclass jclazz, jdouble arg1,
+Java_java_lang_Math_pow (JNIEnv * env, jclass jclazz, jdouble arg1,
                          jdouble arg2)
 {
   return internal_pow (arg1, arg2);

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/exports.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/exports.txt?rev=921662&r1=921661&r2=921662&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/exports.txt (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/exports.txt Thu
Mar 11 01:47:10 2010
@@ -73,7 +73,7 @@ Java_java_lang_Math_log10
 Java_java_lang_Math_log1p
 Java_java_lang_Math_nextafter
 Java_java_lang_Math_nextafterf
-Java_java_lang_Math_doPow
+Java_java_lang_Math_pow
 Java_java_lang_Math_rint
 Java_java_lang_Math_sin
 Java_java_lang_Math_sinh



Mime
View raw message