Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Conversion from int or long to float, or long to double can lead to loss of precision (loss of least significant bits). In this case, the resulting floating-point value is a rounded version of the integer value, using IEEE 754 round-to-nearest mode. Despite this loss of precision, the JLS Java Language Specification requires that the conversion and rounding occur silently, that is, without any runtime exception. See the JLS, §5.1.2, "Widening Primitive Conversion" for more information.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="e30fba05f6a3da2a-08876091-496e40f1-8dc59830-c09e28f8465a852618b437e1"><ac:plain-text-body><![CDATA[

[[JLS 2005

AA. Bibliography#JLS 05]]

[§5.1.2, "Widening Primitive Conversion"

http://java.sun.com/docs/books/jls/third_edition/html/conversions.html#5.1.2]

]]></ac:plain-text-body></ac:structured-macro>

...