Very Long Numbers In JAVA
Hi,
I wanted to do some calculations in java with very long numbers, eg 112422220101123456789101000000223000, My calculations are to get a remainder when dividing by 97 and to get the value of the division but not in exponential form. Can someone please help! |
i don't understand your question, are you saying you need to find a number that is not divisible by 97?? :confused:
if you're having issues due to the size of the number with java, you may want to check the BigInteger class to support longer numbers more precisely. http://java.sun.com/j2se/1.5.0/docs/...igInteger.html |
Yes big int works pretty slick..
here is a little snip.. Code:
BigInteger a = new BigInteger("112422220101123456789101000000223000"); |
All times are GMT -5. The time now is 03:48 AM. |