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

Crucial mistake in API doc function descriptions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: 6
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      A DESCRIPTION OF THE PROBLEM :
        Descriptions to the logical pair of functions "java.lang.Math.ceil()" and "java.lang.Math.floor()" are opposite to what it should be. So the description of ceil() describes floor() and vice versa. See also these descriptions in java.math.RoundingMode, where they are correctly placed.

      Note: Since errors in rounding operations are often not obviously seen in results, using of the current function descriptions leads to errors, which are extremely difficult to find.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Change places of descriptions. ceil() describes floor() and vice versa.
      ACTUAL -
      ceil(double a)
       Returns the smallest (closest to negative infinity) double value that is greater than or equal to the argument and is equal to a mathematical integer.

      floor(double a)
       Returns the largest (closest to positive infinity) double value that is less than or equal to the argument and is equal to a mathematical integer.

      URL OF FAULTY DOCUMENTATION :
      http://java.sun.com/javase/6/docs/api/

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              darcy Joe Darcy
              Reporter:
              ndcosta Nelson Dcosta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: