### IEEE 754R Ballot

#### By Darcy-Oracle on Oct 03, 2006

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

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

Posted by

Damon Hart-Davison October 03, 2006 at 09:38 PM PDT #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

nota valid float fma implementation:Posted by

Joe Darcyon October 04, 2006 at 07:09 AM PDT #