You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2011/01/23 13:20:41 UTC

svn commit: r1062406 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/FastMath.java

Author: sebb
Date: Sun Jan 23 12:20:41 2011
New Revision: 1062406

URL: http://svn.apache.org/viewvc?rev=1062406&view=rev
Log:
Update nextAfter Javadoc

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

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/FastMath.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/FastMath.java?rev=1062406&r1=1062405&r2=1062406&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/FastMath.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/FastMath.java Sun Jan 23 12:20:41 2011
@@ -3404,17 +3404,31 @@ public class FastMath {
      * Get the next machine representable number after a number, moving
      * in the direction of another number.
      * <p>
-     * If <code>direction</code> is greater than or equal to <code>d</code>,
+     * The ordering is as follows (increasing):
+     * <ul>
+     * <li>-INFINITY</li>
+     * <li>-MAX_VALUE</li>
+     * <li>-MIN_VALUE</li>
+     * <li>-0.0</li>
+     * <li>+0.0</li>
+     * <li>+MIN_VALUE</li>
+     * <li>+MAX_VALUE</li>
+     * <li>+INFINITY</li>
+     * <li></li>
+     * <p>
+     * If arguments compare equal, then the second argument is returned.
+     * <p>
+     * If {@code direction} is greater than {@code d},
      * the smallest machine representable number strictly greater than
-     * <code>d</code> is returned; otherwise the largest representable number
-     * strictly less than <code>d</code> is returned.</p>
+     * {@code d} is returned; if less, then the largest representable number
+     * strictly less than {@code d} is returned.</p>
      * <p>
-     * If <code>d</code> is NaN or if it is infinite and direction does not
+     * If {@code d} is infinite and direction does not
      * bring it back to finite numbers, it is returned unchanged.</p>
      *
      * @param d base number
      * @param direction (the only important thing is whether
-     * direction is greater or smaller than d)
+     * {@code direction} is greater or smaller than {@code d})
      * @return the next machine representable number in the specified direction
      */
     public static double nextAfter(double d, double direction) {
@@ -3446,17 +3460,31 @@ public class FastMath {
      * Get the next machine representable number after a number, moving
      * in the direction of another number.
      * <p>
-     * If <code>direction</code> is greater than or equal to <code>d</code>,
+     * The ordering is as follows (increasing):
+     * <ul>
+     * <li>-INFINITY</li>
+     * <li>-MAX_VALUE</li>
+     * <li>-MIN_VALUE</li>
+     * <li>-0.0</li>
+     * <li>+0.0</li>
+     * <li>+MIN_VALUE</li>
+     * <li>+MAX_VALUE</li>
+     * <li>+INFINITY</li>
+     * <li></li>
+     * <p>
+     * If arguments compare equal, then the second argument is returned.
+     * <p>
+     * If {@code direction} is greater than {@code f},
      * the smallest machine representable number strictly greater than
-     * <code>d</code> is returned; otherwise the largest representable number
-     * strictly less than <code>d</code> is returned.</p>
+     * {@code f} is returned; if less, then the largest representable number
+     * strictly less than {@code f} is returned.</p>
      * <p>
-     * If <code>d</code> is NaN or if it is infinite and direction does not
+     * If {@code f} is infinite and direction does not
      * bring it back to finite numbers, it is returned unchanged.</p>
      *
      * @param f base number
      * @param direction (the only important thing is whether
-     * direction is greater or smaller than f)
+     * {@code direction} is greater or smaller than {@code f})
      * @return the next machine representable number in the specified direction
      */
     public static float nextAfter(final float f, final double direction) {