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

REGRESSION: Javadoc for Math.floor() contradicts itself

XMLWordPrintable

    • b57
    • x86
    • windows_2000, windows_xp



      Name: jl125535 Date: 04/14/2004


      URL OF THE PROBLEM DOCUMENTATION :
      http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Math.html#floor(double)

      A DESCRIPTION OF THE PROBLEM :
      In the description section of the JavaDoc for Math.floor(), it says:

      "Returns the largest (closest to positive infinity) double value that is not greater than the argument and is equal to a mathematical integer."

      but then in the returns section, it says:

      "the smallest (closest to negative infinity) floating-point value that is not less than the argument and is equal to a mathematical integer."

      The latter is correct (assuming the docs for Math.ceil() are correct).

      Release Regression From : 1.4.2
      The above release value was the last known release where this
      bug was known to work. Since then there has been a regression.

      (Incident Review ID: 250085)
      ======================================================================

      Name: gm110360 Date: 06/02/2004



      The first line of Math.ceil and the returns line both describe Math.floor

      The first line of Math.floor is correct (same as incorrect Math.ceil), but the returns line describes Math.ceil.
      (Review ID: 276037)
      ======================================================================

            darcy Joe Darcy
            jleesunw Jon Lee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: