Community
cancel
Showing results for 
Search instead for 
Did you mean: 
WSinc
New Contributor I
68 Views

Any long integer packages ?

I need to work with REALLY LARGE integers.

 

What would be ideal is something that allows any length of integer.

 

The basic operations on those, of course. + - / and *

 

Has anyone developed those ?

0 Kudos
4 Replies
Gennady_F_Intel
Moderator
68 Views

MKL suggests 32/64 bit integer only. You may try to take the GMP library for arbitrary precision arithmetic.

WSinc
New Contributor I
68 Views

arbitrary precision is NOT THE SAME as long integer.

mecej4
Black Belt
68 Views

Bill, you would have better luck with your question in a more appropriate forum, such as the Intel Fortran forums, or in Usenet comp.lang.fortran.

Secondly, you would need to give a more detailed description of what your needs are, since phrases such as "really large" have very little meaning.

The following page contains a number of links that you may examine to see if the available software there would work for you: http://crd-legacy.lbl.gov/~dhbailey/mpdist/ (considering integers as a subset of reals).

See also https://www.fortran.com/big_integer_module.f95 m for an integers-only solution. You will need to know the maximum integer beforehand with this module.

WSinc
New Contributor I
68 Views

I thought LONG INTEGER would be self-explanatory.

I was referring to integers longer than the default length of integer(8)

Now one could get 15 byte integers by declaring variables as real(16).

but that is a sloppy and messy way of going about it.

 

These are used in cryptography and other branches of mathematics BTW.

Reply