Recently, I do an exercise requiring do converting base,
I used BigInteger to convert from base-15 to base 10. But when I check it against the result from a website
http://www.unitconversion.org/unit_converter/numbers-ex.html
It show that two result is not matched, I don’t know why?
This is my code:
BigInteger bignumber = new BigInteger("1023456789ABCDEA", 15);
System.out.println(bignumber.toString(10));
and the result is : 442213251884616145
the result from above website is: 442213251884616168
I am using JDK 1.7 netbeans 7.2
Thanks
BigIntegeris correct, as confirmed by Wolfram|Alpha.That other web site you link to is a bit iffy: when I change the last digit of the base-15 input, the base-10 output stays the same. 🙂