mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8268224: Cleanup references to "strictfp" in core lib comments
Reviewed-by: jrose
This commit is contained in:
parent
516e60a7ee
commit
05df1727b5
2 changed files with 47 additions and 97 deletions
|
@ -469,19 +469,6 @@ public final class StrictMath {
|
|||
* away any fractional portion of a since ulp(twoToThe52) ==
|
||||
* 1.0; subtracting out twoToThe52 from this sum will then be
|
||||
* exact and leave the rounded integer portion of a.
|
||||
*
|
||||
* This method does *not* need to be declared strictfp to get
|
||||
* fully reproducible results. Whether or not a method is
|
||||
* declared strictfp can only make a difference in the
|
||||
* returned result if some operation would overflow or
|
||||
* underflow with strictfp semantics. The operation
|
||||
* (twoToThe52 + a ) cannot overflow since large values of a
|
||||
* are screened out; the add cannot underflow since twoToThe52
|
||||
* is too large. The subtraction ((twoToThe52 + a ) -
|
||||
* twoToThe52) will be exact as discussed above and thus
|
||||
* cannot overflow or meaningfully underflow. Finally, the
|
||||
* last multiply in the return statement is by plus or minus
|
||||
* 1.0, which is exact too.
|
||||
*/
|
||||
double twoToThe52 = (double)(1L << 52); // 2^52
|
||||
double sign = Math.copySign(1.0, a); // preserve sign info
|
||||
|
@ -2060,20 +2047,17 @@ public final class StrictMath {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns {@code d} ×
|
||||
* 2<sup>{@code scaleFactor}</sup> rounded as if performed
|
||||
* by a single correctly rounded floating-point multiply to a
|
||||
* member of the double value set. See the Java
|
||||
* Language Specification for a discussion of floating-point
|
||||
* value sets. If the exponent of the result is between {@link
|
||||
* Double#MIN_EXPONENT} and {@link Double#MAX_EXPONENT}, the
|
||||
* answer is calculated exactly. If the exponent of the result
|
||||
* would be larger than {@code Double.MAX_EXPONENT}, an
|
||||
* infinity is returned. Note that if the result is subnormal,
|
||||
* precision may be lost; that is, when {@code scalb(x, n)}
|
||||
* is subnormal, {@code scalb(scalb(x, n), -n)} may not equal
|
||||
* <i>x</i>. When the result is non-NaN, the result has the same
|
||||
* sign as {@code d}.
|
||||
* Returns {@code d} × 2<sup>{@code scaleFactor}</sup>
|
||||
* rounded as if performed by a single correctly rounded
|
||||
* floating-point multiply. If the exponent of the result is
|
||||
* between {@link Double#MIN_EXPONENT} and {@link
|
||||
* Double#MAX_EXPONENT}, the answer is calculated exactly. If the
|
||||
* exponent of the result would be larger than {@code
|
||||
* Double.MAX_EXPONENT}, an infinity is returned. Note that if
|
||||
* the result is subnormal, precision may be lost; that is, when
|
||||
* {@code scalb(x, n)} is subnormal, {@code scalb(scalb(x, n),
|
||||
* -n)} may not equal <i>x</i>. When the result is non-NaN, the
|
||||
* result has the same sign as {@code d}.
|
||||
*
|
||||
* <p>Special cases:
|
||||
* <ul>
|
||||
|
@ -2094,20 +2078,17 @@ public final class StrictMath {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns {@code f} ×
|
||||
* 2<sup>{@code scaleFactor}</sup> rounded as if performed
|
||||
* by a single correctly rounded floating-point multiply to a
|
||||
* member of the float value set. See the Java
|
||||
* Language Specification for a discussion of floating-point
|
||||
* value sets. If the exponent of the result is between {@link
|
||||
* Float#MIN_EXPONENT} and {@link Float#MAX_EXPONENT}, the
|
||||
* answer is calculated exactly. If the exponent of the result
|
||||
* would be larger than {@code Float.MAX_EXPONENT}, an
|
||||
* infinity is returned. Note that if the result is subnormal,
|
||||
* precision may be lost; that is, when {@code scalb(x, n)}
|
||||
* is subnormal, {@code scalb(scalb(x, n), -n)} may not equal
|
||||
* <i>x</i>. When the result is non-NaN, the result has the same
|
||||
* sign as {@code f}.
|
||||
* Returns {@code f} × 2<sup>{@code scaleFactor}</sup>
|
||||
* rounded as if performed by a single correctly rounded
|
||||
* floating-point multiply. If the exponent of the result is
|
||||
* between {@link Float#MIN_EXPONENT} and {@link
|
||||
* Float#MAX_EXPONENT}, the answer is calculated exactly. If the
|
||||
* exponent of the result would be larger than {@code
|
||||
* Float.MAX_EXPONENT}, an infinity is returned. Note that if the
|
||||
* result is subnormal, precision may be lost; that is, when
|
||||
* {@code scalb(x, n)} is subnormal, {@code scalb(scalb(x, n),
|
||||
* -n)} may not equal <i>x</i>. When the result is non-NaN, the
|
||||
* result has the same sign as {@code f}.
|
||||
*
|
||||
* <p>Special cases:
|
||||
* <ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue