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

java.lang.Bignum constructor(String,int) works wrong

XMLWordPrintable

    • sparc
    • solaris_2.5

      This constructos may create an object with incorrect scale:
      ==== Here is the minimized test ====
      class java_lang_Bignum_constructor_1 {
        public static void main(String args[]) {
          System.out.println(new java.lang.Bignum("5e2",5)); //should print 500.00000
          System.out.println(new java.lang.Bignum("test",5)); //should print 0.00000
        }
      }
      ==== Here is the output of the test ====
      500
      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: