Result: Writing robust IEEE recommended functions in '100% Pure Java'
Further Information
In addition to specifying details of floating point formats and arithmetic operations, the IEEE 754 and IEEE 854 standards recommend conforming systems include several utility functions to aid in writing portable programs. For example, floating point constants associated with a format, such as the largest representable number, can be generated in a format-independent manner using the recommended functions and a handful of floating point literals. The functions perform useful tasks such as returning the floating point number adjacent to a given value and scaling a floating point number by a power of two. However, the descriptions of the functions are very brief and the two related standards give slightly different specifications for some of the functions. This paper describes robust implementations of the IEEE recommended functions written in "100% Pure Java." These functions work under all the dynamic rounding and trapping modes supported by IEEE 754. Writing such functions in Java pr.