Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4406429
Votes 56
Synopsis RFE: Add IEEE 754 Recommended Functions to Math, StrictMath
Category java:classes_lang
Reported Against 1.3 , tiger
Release Fixed
State 11-Closed, duplicate of 4826652, request for enhancement
Priority: 4-Low
Related Bugs 6341163 , 4633024 , 4780454 , 4826652 , 4826732 , 4860891
Submit Date 19-JAN-2001
Description


~/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) 
======================================================================
Posted Date : 2005-10-25 02:38:53.0
Work Around
N/A
Evaluation
It is too late to get these methods into Merlin (I tried); they should be added in the next major Java release.

  xxxxx@xxxxx   2001-03-27

Trying for Tiger release; will track developments in IEEE 754 revision committee.

  xxxxx@xxxxx   2002-05-31


Not approved for Tiger.

  xxxxx@xxxxx   2003-05-08
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.
Posted Date : 2005-10-25 02:38:53.0
Comments
  
  Include a link with my name & email   

Submitted On 14-MAR-2003
pfarner
Since I needed some of these functions, I wrote a 100% Java
implementation of all of them.  These implementations are
available
as a tear-off fragment of the larger project, licensed under
the GPL.  
Naturally, my implementation will become irrelevant once
this RFE
is completed.  For further information, see
http://www.dose-of-reality.org/?IEEE754



PLEASE NOTE: JDK6 is formerly known as Project Mustang