Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Any long integer packages ?

WSinc
New Contributor I
290 Views

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
290 Views

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

0 Kudos
WSinc
New Contributor I
290 Views

arbitrary precision is NOT THE SAME as long integer.

0 Kudos
mecej4
Honored Contributor III
290 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.

0 Kudos
WSinc
New Contributor I
290 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.

0 Kudos
Reply