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

Math.floor() documentation should be more similar to Math.ceil()

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_2000

      Description

      A DESCRIPTION OF THE PROBLEM :
      If you look at the documentation for ceil it says:

      <quote> * If the argument value is less than zero but greater than -1.0, then the result is negative zero.

      Note that the value of Math.ceil(x) is exactly the value of -Math.floor(-x).
      </quote>

      Since the functions of ceil and floor compliment each other, I would think their descriptions should match up as well. To wit, I think the following should be added to floor()

      <quote> * If the argument value is greater than zero but less than -1.0, then the result is (positive) zero.

      Note that the value of Math.floor(x) is exactly the value of -Math.ceil(-x).
      </quote>



      URL OF FAULTY DOCUMENTATION :
      http://java.sun.com/j2se/1.4.2/docs/api/index.html
      ###@###.### 2004-12-14 22:17:09 GMT

        Attachments

          Activity

            People

            • Assignee:
              darcy Joe Darcy
              Reporter:
              gmanwanisunw Girish Manwani (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: