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

java.lang.Bignum.pow() method works wrong with negative exponents

XMLWordPrintable

    • 1.1
    • sparc
    • solaris_2.5
    • Not verified

      === Here is the minimized test demonstrating the bug ===
      import java.lang.Bignum;
      class java_lang_Bignum_pow {
        public static void main(String args[]) {
          Bignum b=new Bignum("2.0");
          System.out.println(b.pow(-1)); //should print "0.5"
        }
      }
      === Here is the test output ===
      2.0

            mhapnersunw Mark Hapner (Inactive)
            mgorshen Mikhail Gorshenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: