Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

swift-gmpint

Swift binding to GMP Integer

Prereqisite:

GMP. The project file is configured for GMP installed via MacPorts. In other words, the prefix for includes and library is /opt/local. If you are using different prefix, adjust the project setting accordingly.

Bugs and Workarounds for GMP prior to 6.0.0_1

GMP 6.0.0 with MacPorts 2.3.1 build with XCode 6 Beta 2 had a strange bug on division operations where the denominator fits unsigned int. It fails like this.

libdyld.dylib`stack_not_16_byte_aligned_error:

To workaround it, this project left-shifts both numerator and denominator 64 bits to make sure the operation is true bigint on true bigint. That yields the same quotient with left-shifted remainder. The remainder is then right-shifted 64 bits. Therefore the division operation is not as optimal as it should be.

This bug is fixed in 6.0.0_1 so the workaround was also removed.

About

Swift binding to GMP Integer

Resources

License

Releases

No releases published

Packages

No packages published