JDK-4929959 : Clarify math library ulp accuracy requirements and hypot spec
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 5.0
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2003-09-30
  • Updated: 2003-10-14
  • Resolved: 2003-10-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 b24Fixed
Related Reports
Relates :  
Relates :  
Description
The current phrasing in the discussion of the required accuracy of math library methods in terms of ulps could be improved.  Additionally the meaning of semi-monotonic for the two-argumetn hypot method should be explained.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger tiger-beta FIXED IN: tiger tiger-beta INTEGRATED IN: tiger-b24 tiger-beta
14-06-2004

SUGGESTED FIX src/share/classes/java/lang>sccs sccsdiff -r1.63 -r1.64 Math.java ------- Math.java ------- 38,39c38,39 < * value is the difference between the two floating-point values < * closest to that numerical value. When discussing the accuracy of a --- > * value is the distance between the two floating-point values > * bracketing that numerical value. When discussing the accuracy of a 50,53c50,55 < * number, the exact result should be returned; otherwise, either of < * the two floating-point numbers which bracket the exact result may < * be returned. Besides accuracy at individual arguments, maintaining < * proper relations between the method at different arguments is also --- > * number, the exact result should be returned as the computed result; > * otherwise, either of the two floating-point values which bracket > * the exact result may be returned. For exact results large in > * magnitude, one of the endpoints of the bracket may be infinite. > * Besides accuracy at individual arguments, maintaining proper > * relations between the method at different arguments is also 95,96c97,98 < * <p>A result must be within 1 ulp of the correctly rounded < * result. Results must be semi-monotonic. --- > * <p>The computed result must be within 1 ulp of the exact result. > * Results must be semi-monotonic. 110,111c112,113 < * <p>A result must be within 1 ulp of the correctly rounded < * result. Results must be semi-monotonic. --- > * <p>The computed result must be within 1 ulp of the exact result. > * Results must be semi-monotonic. 127,128c129,130 < * <p>A result must be within 1 ulp of the correctly rounded < * result. Results must be semi-monotonic. --- > * <p>The computed result must be within 1 ulp of the exact result. > * Results must be semi-monotonic. 145,146c147,148 < * <p>A result must be within 1 ulp of the correctly rounded < * result. Results must be semi-monotonic. --- > * <p>The computed result must be within 1 ulp of the exact result. > * Results must be semi-monotonic. 161,162c163,164 < * <p>A result must be within 1 ulp of the correctly rounded < * result. Results must be semi-monotonic. --- > * <p>The computed result must be within 1 ulp of the exact result. > * Results must be semi-monotonic. 178,179c180,181 < * <p>A result must be within 1 ulp of the correctly rounded < * result. Results must be semi-monotonic. --- > * <p>The computed result must be within 1 ulp of the exact result. > * Results must be semi-monotonic. 227,228c229,230 < * <p>A result must be within 1 ulp of the correctly rounded < * result. Results must be semi-monotonic. --- > * <p>The computed result must be within 1 ulp of the exact result. > * Results must be semi-monotonic. 248,249c250,251 < * <p>A result must be within 1 ulp of the correctly rounded < * result. Results must be semi-monotonic. --- > * <p>The computed result must be within 1 ulp of the exact result. > * Results must be semi-monotonic. 273,274c275,276 < * <p>A result must be within 1 ulp of the correctly rounded < * result. Results must be semi-monotonic. --- > * <p>The computed result must be within 1 ulp of the exact result. > * Results must be semi-monotonic. 331c333 < * A result must be within 1 ulp of the correctly rounded result. --- > * <p>The computed result must be within 1 ulp of the exact result. 469,470c471,472 < * <p>A result must be within 2 ulps of the correctly rounded < * result. Results must be semi-monotonic. --- > * <p>The computed result must be within 2 ulps of the exact result. > * Results must be semi-monotonic. 599,600c601,602 < * <p>A result must be within 1 ulp of the correctly rounded < * result. Results must be semi-monotonic. --- > * <p>The computed result must be within 1 ulp of the exact result. > * Results must be semi-monotonic. 1040,1041c1042 < * <p>A result must be within 2.5 ulps of the correctly rounded < * result. --- > * <p>The computed result must be within 2.5 ulps of the exact result. 1069,1070c1070 < * <p>A result must be within 2.5 ulps of the correctly rounded < * result. --- > * <p>The computed result must be within 2.5 ulps of the exact result. 1105,1110c1105,1110 < * <p>A result must be within 2.5 ulps of the correctly rounded < * result. The result of <code>tanh</code> for any finite input < * must have an absolute value less than or equal to 1. Note that < * once the exact result of tanh is within 1/2 of an ulp of the < * limit value of &plusmn;1, correctly signed < * &plusmn;<code>1.0</code> should be returned. --- > * <p>The computed result must be within 2.5 ulps of the exact result. > * The result of <code>tanh</code> for any finite input must have > * an absolute value less than or equal to 1. Note that once the > * exact result of tanh is within 1/2 of an ulp of the limit value > * of &plusmn;1, correctly signed &plusmn;<code>1.0</code> should > * be returned. 1135,1136c1135,1137 < * <p>A result must be within 1 ulp of the correctly rounded < * result. Results must be semi-monotonic. --- > * <p>The computed result must be within 1 ulp of the exact > * result. If one parameter is held constant, the results must be > * semi-monotonic in the other parameter. 1169,1170c1170,1171 < * <p>A result must be within 1 ulp of the correctly rounded < * result. Results must be semi-monotonic. The result of --- > * <p>The computed result must be within 1 ulp of the exact result. > * Results must be semi-monotonic. The result of 1210,1211c1211,1212 < * <p>A result must be within 1 ulp of the correctly rounded < * result. Results must be semi-monotonic. --- > * <p>The computed result must be within 1 ulp of the exact result. > * Results must be semi-monotonic. ###@###.### 2003-10-06
06-10-2003

EVALUATION A fine idea. ###@###.### 2003-09-29
29-09-2003