jdk/src/share/classes/java/lang/StrictMath.java
changeset 10122 bf8e763fcceb
parent 9269 f66626469aa8
child 10598 efd29b4b3e67
equal deleted inserted replaced
10121:1c789a986386 10122:bf8e763fcceb
   930         }
   930         }
   931         return (a <= b) ? a : b;
   931         return (a <= b) ? a : b;
   932     }
   932     }
   933 
   933 
   934     /**
   934     /**
   935      * Returns the size of an ulp of the argument.  An ulp of a
   935      * Returns the size of an ulp of the argument.  An ulp, unit in
   936      * {@code double} value is the positive distance between this
   936      * the last place, of a {@code double} value is the positive
   937      * floating-point value and the {@code double} value next
   937      * distance between this floating-point value and the {@code
   938      * larger in magnitude.  Note that for non-NaN <i>x</i>,
   938      * double} value next larger in magnitude.  Note that for non-NaN
   939      * <code>ulp(-<i>x</i>) == ulp(<i>x</i>)</code>.
   939      * <i>x</i>, <code>ulp(-<i>x</i>) == ulp(<i>x</i>)</code>.
   940      *
   940      *
   941      * <p>Special Cases:
   941      * <p>Special Cases:
   942      * <ul>
   942      * <ul>
   943      * <li> If the argument is NaN, then the result is NaN.
   943      * <li> If the argument is NaN, then the result is NaN.
   944      * <li> If the argument is positive or negative infinity, then the
   944      * <li> If the argument is positive or negative infinity, then the
   957     public static double ulp(double d) {
   957     public static double ulp(double d) {
   958         return sun.misc.FpUtils.ulp(d);
   958         return sun.misc.FpUtils.ulp(d);
   959     }
   959     }
   960 
   960 
   961     /**
   961     /**
   962      * Returns the size of an ulp of the argument.  An ulp of a
   962      * Returns the size of an ulp of the argument.  An ulp, unit in
   963      * {@code float} value is the positive distance between this
   963      * the last place, of a {@code float} value is the positive
   964      * floating-point value and the {@code float} value next
   964      * distance between this floating-point value and the {@code
   965      * larger in magnitude.  Note that for non-NaN <i>x</i>,
   965      * float} value next larger in magnitude.  Note that for non-NaN
   966      * <code>ulp(-<i>x</i>) == ulp(<i>x</i>)</code>.
   966      * <i>x</i>, <code>ulp(-<i>x</i>) == ulp(<i>x</i>)</code>.
   967      *
   967      *
   968      * <p>Special Cases:
   968      * <p>Special Cases:
   969      * <ul>
   969      * <ul>
   970      * <li> If the argument is NaN, then the result is NaN.
   970      * <li> If the argument is NaN, then the result is NaN.
   971      * <li> If the argument is positive or negative infinity, then the
   971      * <li> If the argument is positive or negative infinity, then the