Reputation: 33
i want to check for palindrome of square of 10e+100 in java.
please mention any solution of it because in java double can carry only upto
4.9e-324 to 1.8e+308
numeric values , so please suggest any possible solution or hint may also be helpful...
thanks for your sincere attention.
Upvotes: 3
Views: 1640
Reputation: 27346
You might want to look into the BigInteger
class. Here is the documentation.
BigInteger
can support huge.. huge numbers!
Upvotes: 5
Reputation: 7846
For numbers that large, when you only need the standard number of significant digits, it's conventional to represent the number using its logarithm, i.e. you store 10e+100 as 100*log(10) and work with that.
Upvotes: 1