commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1328501 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/Precision.java
Date Fri, 20 Apr 2012 21:08:42 GMT
Author: sebb
Date: Fri Apr 20 21:08:41 2012
New Revision: 1328501

URL: http://svn.apache.org/viewvc?rev=1328501&view=rev
Log:
Document why we are not using the simpler Hex constants

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/Precision.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/Precision.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/Precision.java?rev=1328501&r1=1328500&r2=1328501&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/Precision.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/Precision.java Fri
Apr 20 21:08:41 2012
@@ -40,12 +40,17 @@ public class Precision {
      * In IEEE 754 arithmetic, this is 2<sup>-53</sup>: {@value}.
      */
     public static final double EPSILON = Double.longBitsToDouble((EXPONENT_OFFSET - 53l)
<< 52);
+    //This was previously expressed as = 0x1.0p-53;
+    // However, OpenJDK (Sparc Solaris) cannot handle such small constants: MATH-721
+
     /**
      * Safe minimum, such that {@code 1 / SAFE_MIN} does not overflow.
      * In IEEE 754 arithmetic, this is also the smallest normalized
      * number 2<sup>-1022</sup>: {@value}.
      */
     public static final double SAFE_MIN = Double.longBitsToDouble((EXPONENT_OFFSET - 1022l)
<< 52);
+    // This was previously expressed as = 0x1.0p-1022;
+    // However, OpenJDK (Sparc Solaris) cannot handle such small constants: MATH-721
 
     /** Offset to order signed double numbers lexicographically. */
     private static final long SGN_MASK = 0x8000000000000000L;



Mime
View raw message