Are there any fully compliant IEEE754r implementations available for Java that offer support for all the features Java chose to omit (or rather high level languages in general like to omit):
Clarification before anyone gets it wrong: I'm not looking for the JVM to offer any support for the above, just some classes that do implement the types and operations in software, basically something in the style of the already existing primitve wrapper classes Float/Double.
Java uses a subset of the IEEE 754 binary floating point standard to represent floating point numbers and define the results of arithmetic operations. Virtually all modern computers conform to this standard. A float is represented using 32 bits, and each possible combination of bits represents one real number.
IEEE Standard 754 floating point is the most common representation today for real numbers on computers, including Intel-based PC's, Macs, and most Unix platforms. This is as simple as the name. 0 represents a positive number while 1 represents a negative number.
The standard specifies optional extended and extendable precision formats, which provide greater precision than the basic formats. An extended precision format extends a basic format by using more precision and more exponent range.
The IEEE-754 standard describes floating-point formats, a way to represent real numbers in hardware. There are at least five internal formats for floating-point numbers that are representable in hardware targeted by the MSVC compiler. The compiler only uses two of them.
No, there does not exist a fully compliant IEEE754R implementation. Not only in Java, but in all currently available languages (Status July 2012).
EDIT: The poster asked for IEEE754 R support which is identical to IEEE 754-2008. If I want to add all reasons why there is no such thing, this would be long.
Traps: No, calling own routines with OVERFLOW, UNDERFLOW, INEXACT etc. with SIGFPE is not a trap. See IEEE754 (the old one) p. 21 for what constitutes a trap. Signaling NaNs. NaN payload access. Flag access. Enumerate languages which can do that.
Rounding modes: The new standard defines roundTiesToAway (p. 16) as new rounding mode. Unfortunately there are AFAIK no processors which supports this mode and no software emulation either.
Quad precision: Only supported in very few compilers and even less compilers which are not broken.
Densely packed Decimals: Will probably only supported in languages which use decimals, e.g. COBOL.
Intersection of all sets: Empty set. None. Nothing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With