JDK-4406429 : RFE: Add IEEE 754 Recommended Functions to Math, StrictMath
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 1.3.0,5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2001-01-19
  • Updated: 2005-10-25
  • Resolved: 2005-10-25
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Name: yyT116575			Date: 01/19/2001


~/project/visMineBench>java -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

Java should incorporate the following methods into java.lang.Math:

      copySign(x,y)  returns x with the sign of y.
      scalb(y,n)     returns y * 2n for integers n without
                     explicitly computing 2n.
      nextAfter(x,y) returns the next representable neighbor of x in the
                     direction towards y.
      unordered(x,y) Returns true is one of its arguments is unordered
                     with respect to the other.
                     This occurs when at least one is a NaN.
      fpClass(x)     Returns an integer that indicates which of the
                     nine "kinds" of IEEE floating-point numbers x is.
      logb(x)        Returns the unbiased exponent of x.

These descriptions are copied from:
http://math.nist.gov/javanumerics/reports/jgfnwg-01.html

It also says there that IEEE 754 recommends these methods.
(Review ID: 115478) 
======================================================================

Comments
EVALUATION The fix for bug 4826652 added the following methods to the Math and StrictMath classes: copySign getExponent nextAfter nextUp scalb These methods constitute the majority of the functionality requested in this bug. (In my estimation, a raw getExponent is more useful than logb.) Therefore, this bug will be closed as a duplicate of 4826652; bug 6341163 will track the remaining unimplemented minor functionality, like fpClass and unordered, as well as additional recommended functionality added by the 754 revision committee.
2005-10-25

EVALUATION It is too late to get these methods into Merlin (I tried); they should be added in the next major Java release. joe.darcy@eng 2001-03-27 Trying for Tiger release; will track developments in IEEE 754 revision committee. ###@###.### 2002-05-31 Not approved for Tiger. ###@###.### 2003-05-08
2001-03-27