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

Math.pow(1.0, Double.POSITIVE_INFINITY) returns NaN

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 8u25
    • core-libs
    • x86_64
    • windows_7

      FULL PRODUCT VERSION :
      java version "1.8.0_31"
      Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
      Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Windows 7

      A DESCRIPTION OF THE PROBLEM :
      Math.pow(1.0, Double.POSITIVE_INFINITY) returns NaN instead of 1.0.

      Given that we have a mathematical theorem that states that:

      limit 1^N = +Infinity when N -> Infinity

      this is very surprising. Basically it's just wrong. This behavior is

      I would understand it for pow(-1.0, +Inf) but for 1 don't see how one should come to the conclusion that we don't know the answer. This needs fixing.



      REPRODUCIBILITY :
      This bug can be reproduced always.

            darcy Joe Darcy
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: