I'm trying to find the modulo of a very large number using Fortran.
The number is larger than the precision available.
Example:
[ 1e40 x log(2) ] modulo pi
I hoped there would be some clever theorem out there for a problem like this.
I'm trying to find the modulo of a very large number using Fortran.
The number is larger than the precision available.
Example:
[ 1e40 x log(2) ] modulo pi
I hoped there would be some clever theorem out there for a problem like this.
default(realprecision,40); print(1e40*log(2)%Pi)is2.819539495. If you use 50 digits precision, the answer is2.819539497546425045. 68 digits gives2.81953949754642504239098617524548293127. – Somos Aug 23 '20 at 20:39