Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4702593

Error in Float.intBitsToFloat documentation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 1.4.0
    • docs



      Name: nt126004 Date: 06/14/2002


      FULL PRODUCT VERSION :
      java version "1.3.1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-root-
      010902-18:51)
      Java HotSpot(TM) Client VM (build 1.3.1, mixed mode)

      Since this is in the documentation, it applies to all
      platforms.

      A DESCRIPTION OF THE PROBLEM :
      This is really a typo rather than a bug, I think. The
      documentation for the Float class (all platforms) states
      that "the floating-point result equals the value of the
      mathematical expression s?m?2^e-150." I think the
      formula should actually be "s?m?2^e-127." This is the
      IEEE standard as I understand it--and coding the bits in
      this way gives the answer Java calculates!

      This bug can be reproduced always.
      (Review ID: 153443)
      ======================================================================

            shommel Scott Hommel (Inactive)
            nthompsosunw Nathanael Thompson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: