### Bookstore

 Computer Math and Games in Pascal (preview) Lazarus Handbook

### Author Topic: Long integers  (Read 5309 times)

#### Borneq

• Full Member
• Posts: 238
##### Long integers
« on: April 13, 2013, 12:25:07 am »
In FreePascal are additional types for large integer?
unsigned int64
signed and unsigned 128 bit
signed and unsigned 256 bit
?

#### Borneq

• Full Member
• Posts: 238
##### Re: Long integers
« Reply #1 on: April 13, 2013, 12:30:04 am »
Only int64 and Qword.
128 and 256 bit must be a record - are any procedures to work with this long structures?

#### Leledumbo

• Hero Member
• Posts: 8402
• Programming + Glam Metal + Tae Kwon Do = Me
##### Re: Long integers
« Reply #2 on: April 13, 2013, 05:35:11 am »
Quote
128 and 256 bit must be a record - are any procedures to work with this long structures?
None that I know of.

#### otorres

• Jr. Member
• Posts: 94
##### Re: Long integers
« Reply #3 on: April 13, 2013, 06:08:27 am »
Use TBCD object for big numbers, like 40 digits.

#### BigChimp

• Hero Member
• Posts: 5740
• Add to the wiki - it's free ;)
##### Re: Long integers
« Reply #4 on: April 13, 2013, 08:10:47 am »
There is a binding to a math/big number library AFAIR, GMP or something like that. Maybe that covers 128 bit integers, don't know.

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

#### Leledumbo

• Hero Member
• Posts: 8402
• Programming + Glam Metal + Tae Kwon Do = Me
##### Re: Long integers
« Reply #5 on: April 13, 2013, 03:42:38 pm »
Quote
There is a binding to a math/big number library AFAIR, GMP or something like that. Maybe that covers 128 bit integers, don't know.
No, that covers theoritically unlimited precision integers (up to memory limit)

#### jollytall

• Full Member
• Posts: 158
##### Re: Long integers
« Reply #6 on: November 24, 2021, 11:24:17 am »
I have just uploaded a unit with long integer support to github: https://github.com/zsoltszakaly/longmathforpascal.
If you need such a functionality, try it and let me know how it works.