Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How digits could have a variable in F90?

Status
Not open for further replies.

solaer

Technical User
Feb 5, 2011
2
AR
Hi all!
I'm evaluating the capability of F90 to manage very large numbers (integers or reals). The target number has a lenght of around 10E8 digits and I dont know if F90 could allocate and perform arithmetic operation with a variable of this magnitude.

thanks in advance for your help
 
There are lots of articles on big number arithmetic on the internet. I remember using them 10 years ago so it is nothing new. The most I've ever handled is 50 digit integers - that was because the pence and cents were important. No idea why you want 10^8 digit precision but I'm quite sure those algorithms can handle it. It doesn't have to be in Fortran: any language can handle it.

The accuracy of real computations depends on the compiler. Different vendors handle numbers differently. For instance with reals, on Intel, double precision reals increase both in mantissa and in exponent. When I first used Fortran in 1976, only the mantissa changed: the exponent remained the same.
 
thank you xwb!
I will research more over the web.
I'm working in some aspects of theory of numbers, then I need full precision in the number, I can't truncate any digit.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top