X

Musings on JDK development

IEEE 754R Ballot

For a number of years, the venerable IEEE 754 standard for binary floating-point arithmetic has been undergoing revision and the committee's results will soon be up for ballot. Back in 2003, I was editor of the draft for a few months and helped incorporate the decimal material.

The balloting process provides the opportunity for interested parties, such as consumers of the standard, to weigh in with comments; instructions for joining the ballot are available. The deadline for signing up has been extended to October 21, 2006.

Major changes from 754 include:

  • Support for decimal formats and arithmetic
  • Fused multiply add operation
  • More explicit conceptual model of levels of specification
  • Hexadecimal strings for binary floating-point values
  • Annexes giving recommendations on expression evaluation, alternate exception handling, and transcendental functions

Join the discussion

Comments ( 2 )
  • Damon Hart-Davis Wednesday, October 4, 2006
    Hi,

    I trust that none of these revisions is going to conflict with Java's very precise notions of "strictmath" results? Nothing leapt off the page at me.

    Also, if this revision blesses a standard fma, can we have some form of it reflected in Java, eg as a (HotSpot-intrinsic/inlineable) in Math/StrictMath?

    Rgds

    Damon

  • Joe Darcy Wednesday, October 4, 2006

    Damon,

    There are no plans to change the language or vm notions of
    floating-point semantics, including strictfp, in response
    to the standard. Some additional library methods may be added over time.

    The BigDecimal class is very close to obeying the decimal
    floating-point semantics in 754R. However, BigDecimal
    doesn't include NaN, infinities, or negative zero and there is no
    sticky flag support. I don't anticipate such changes being
    retrofitted to BigDecimal. If language
    support for decimal arithmetic is added
    in JDK 7, it is possible
    another class that more closely matched 754R decimal arithmetic would
    be used.

    To express interest in adding a fused multiply add method to the math
    libraries, cast you SDN votes for
    4851642,
    "Add fma to Java math library." I've wanted to add these methods for a
    while, but haven't gotten around to it yet. For those processors
    without hardware fma support, the software implementations are
    actually quite tricky, but tricky in a way that appeals to math
    library developers :-) For example, the following is not a
    valid float fma implementation:

    public static float fma(float a, float b, float c) {
    // Not a valid float fmac!
    return (float) (((double)a \* (double) b) + (double) c);
    }


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.