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

Problem with math functions acos,asin,log,pow .

XMLWordPrintable

    • sparc
    • solaris_2.5.1

      The following math functions are not behaving as specified in the java language specification.

      asin, and acos return 0 instead of NaN for arguments with absolute value greater than 1.
      log of negative numbers returns negative infinity instead of NaN
      pow called with NaN,0 returns Nan instead of 1.0
      pow called with 0, -1 returns -infinity instead of infinity
      pow called with -0, -4 returns -infinity instead of infinity

      Some examples:

      asin failed for c000000000000000 = -2 Expected 7ff8000000000000 Got: 0
      asin failed for c010000000000000 = -4 Expected 7ff8000000000000 Got: 0

      acos failed for c000000000000000 = -2 Expected 7ff8000000000000 Got: 0
      acos failed for c010000000000000 = -4 Expected 7ff8000000000000 Got: 0

      log failed for c09f400000000000 = -2000 Expected 7ff8000000000000 Got: fff0000000000000
      log failed for c09f37883126e979 = -1997.88 Expected 7ff8000000000000 Got: fff0000000000000

      pow failed for 7fffffffffffffff , 0 Expected 3ff0000000000000 Got: 7fffffffffffffff
      pow failed for 0 , bff0000000000000 Expected 7ff0000000000000 Got: fff0000000000000
      pow failed for 8000000000000000 , c010000000000000 Expected 7ff0000000000000 Got: fff0000000000000

            tlindholsunw Timothy Lindholm (Inactive)
            cflood Christine Flood (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: