Numerical Recipes Forum  

Go Back   Numerical Recipes Forum > Obsolete Editions Forum > Fortran 90 Programming with NR

Reply
 
Thread Tools Display Modes
  #1  
Old 08-07-2009, 06:35 AM
TheIsingGuy TheIsingGuy is offline
Registered User
 
Join Date: Jul 2009
Posts: 8
A general fortran question involving large integers

Hi,

Like the title says, I am trying to implement an algorithm involving really big integers, on the order or 1E30, However, Fortran's largest integer type integer(kind = 8) only accept upto (2^63)-1 which is around 1E18, not even nearly enough for me.

I tried to define an integer with the value 1E30, and fortran assumed it was (2^63)-1, as above.

Does anybody know a way around this?

Any help is appreciated

TheIsingGuy
Reply With Quote
  #2  
Old 08-07-2009, 10:02 AM
davekw7x davekw7x is offline
Registered User
 
Join Date: Jan 2008
Posts: 453
Quote:
Originally Posted by TheIsingGuy View Post
...really big integers
There are several arbitrary precision numerical packages that might meet your needs. For starters, you can check the links to the mpfun and arprec packages here: http://www.netlib.org/mpfun/

Regards,

Dave
Reply With Quote
  #3  
Old 08-11-2009, 05:35 AM
TheIsingGuy TheIsingGuy is offline
Registered User
 
Join Date: Jul 2009
Posts: 8
Thanks dave,
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:59 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.