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

JLS3 15.19 Explanation of left shift operator is wrong

    XMLWordPrintable

Details

    • b97
    • x86
    • windows_xp

    Description

      A DESCRIPTION OF THE PROBLEM :
      The Java Language Specification found at the following link is wrong:

      http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.19

      It contains an explanation on shift operators, saying that n>>s whould be the same as n/s. This is wrong. Actually it has to read that n>>s is n/(2^s).

      I wonder why nobody noticed that before.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Read the documentation and think about it.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      See above.
      ACTUAL -
      See above.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      Attachments

        Activity

          People

            iris Iris Clark
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: