[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-commons-dev
Subject: svn commit: r1332162 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math3:
From: celestin () apache ! org
Date: 2012-04-30 11:26:11
Message-ID: 20120430112611.37F3823889BB () eris ! apache ! org
[Download RAW message or body]
Author: celestin
Date: Mon Apr 30 11:26:10 2012
New Revision: 1332162
URL: http://svn.apache.org/viewvc?rev=1332162&view=rev
Log:
Checkstyle.
Modified:
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/direct/PowellOptimizer.java
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/MathArrays.java
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/optimization/direct/PowellOptimizer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/c \
ommons/math3/optimization/direct/PowellOptimizer.java?rev=1332162&r1=1332161&r2=1332162&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/direct/PowellOptimizer.java \
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/optimization/direct/PowellOptimizer.java \
Mon Apr 30 11:26:10 2012 @@ -26,7 +26,6 @@ import org.apache.commons.math3.exceptio
import org.apache.commons.math3.optimization.GoalType;
import org.apache.commons.math3.optimization.PointValuePair;
import org.apache.commons.math3.optimization.ConvergenceChecker;
-import org.apache.commons.math3.optimization.AbstractConvergenceChecker;
import org.apache.commons.math3.optimization.MultivariateOptimizer;
import org.apache.commons.math3.optimization.univariate.BracketFinder;
import org.apache.commons.math3.optimization.univariate.BrentOptimizer;
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/MathArrays.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/MathArrays.java?rev=1332162&r1=1332161&r2=1332162&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/MathArrays.java \
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/MathArrays.java \
Mon Apr 30 11:26:10 2012 @@ -150,6 +150,7 @@ public class MathArrays {
/**
* Check that an array is monotonically increasing or decreasing.
*
+ * @param <T> the type of the elements in the specified array
* @param val Values.
* @param dir Ordering direction.
* @param strict Whether the order should be strict.
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=1332162&r1=1332161&r2=1332162&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 \
Mon Apr 30 11:26:10 2012 @@ -30,19 +30,13 @@ import org.apache.commons.math3.util.Fas
* @version $Id$
*/
public class Precision {
-
- /** Exponent offset in IEEE754 representation. */
- private static final long EXPONENT_OFFSET = 1023l;
-
/**
* Smallest positive number such that {@code 1 - EPSILON} is not
* numerically equal to 1.
* <br/>
* In IEEE 754 arithmetic, this is 2<sup>-53</sup>.
*/
- 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
+ public static final double EPSILON;
/**
* Safe minimum, such that {@code 1 / SAFE_MIN} does not overflow.
@@ -50,15 +44,32 @@ public class Precision {
* In IEEE 754 arithmetic, this is also the smallest normalized
* number 2<sup>-1022</sup>.
*/
- 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
+ public static final double SAFE_MIN;
+
+ /** Exponent offset in IEEE754 representation. */
+ private static final long EXPONENT_OFFSET = 1023l;
/** Offset to order signed double numbers lexicographically. */
private static final long SGN_MASK = 0x8000000000000000L;
/** Offset to order signed double numbers lexicographically. */
private static final int SGN_MASK_FLOAT = 0x80000000;
+ static {
+ /*
+ * This was previously expressed as = 0x1.0p-53;
+ * However, OpenJDK (Sparc Solaris) cannot handle such small
+ * constants: MATH-721
+ */
+ EPSILON = Double.longBitsToDouble((EXPONENT_OFFSET - 53l) << 52);
+
+ /*
+ * This was previously expressed as = 0x1.0p-1022;
+ * However, OpenJDK (Sparc Solaris) cannot handle such small
+ * constants: MATH-721
+ */
+ SAFE_MIN = Double.longBitsToDouble((EXPONENT_OFFSET - 1022l) << 52);
+ }
+
/**
* Private constructor.
*/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic