I am trying to calculate an expression in java which is in String
i.e
`99999999999999999^99999999999999999`

I want to calculate this number modulo `1000000007`

.
I currently trying to store the big numbers as double but taking modulo with double gives me `NaN`

.
Can somebody help ?

By : piyush121