Is the rounding mode of large floats well set?
The Java Language Specification, ยง3.10.2, Floating Point Literals :
Details on the correct conversion of input from the Unicode string representation of a floating point number to an internal binary floating point representation of IEEE 754 are described for the
valueOf
class methodsFloat
and the classDouble
packagejava.lang
.
s
regarded as representing an exact decimal value in common "computerized scientific notation" or as an exact hexadecimal value; this exact numeric value is then conceptually converted to an "infinitely precise" binary value, which is then rounded to typeFloat
using the normal rounding rule to the nearest IEEE 754 floating point arithmetic rule [...]
source to share