I can maybe also provide some comments on capabilities of individual packages (if this is desired), as I took a look at each of them over time.
That would be appreciated.
Here we go - first some additional Pascal implementations I am aware of
BigInt: v1.8 - Franco Milani
http://spazioinwind.libero.it/frm/softwareThough this is a Pascal source >90% are coded as x86-32 Win32 assembler routines - memory served me badly on ths one.
-----------
HugeInt: v5.34 - David J Butler
https://github.com/fundamentalslib/fundamentals5Part of a much larger library but the unit can be used self-contained.
-----------
LongMathForPascal: Zsolt Szakaly
https://github.com/zsoltszakaly/longmathforpascalA quite recent contribution (2021) - unfortunately it does not support any efficient algorithms and becomes slow very fast.
-----------
GInt - Walied Othman
https://github.com/SnakeDoctor/FGIntAgain part of a larger library but can be used self-contained.
-----------
I also promised to provide some comments on the packages. I'll start with BigIntegers and MP-ARITH today and will cover more in the coming days - I have to ressurect some old tools and buried knowledge, so it takes a bit of time. Of course the following is subjective, and I'm explicitely not going into the topic of licenses ...
BigIntegers - Velthuis
- Functionality
- supports 32/64 bit, little- & big-endian
- class implementation with operators & functional replicants
- dynamic sizing and immutability
- late binding
- solid error handling
- solid set of operators - arith, bitops, comparisons, expl & impl conversions
- some number theory - gcd, modinv, mulmod, pow, powmod, sqrt+remainder, n-root+remainder
- Algorithms
- basecase multiplication only 33% slower than best known pure Pascal
- efficient multiplication: Karatsuba, Toom3
- efficient squaring: Karatsuba
- efficient division: Burnikel-Ziegler
- div&cong base conversion (from binary to arb base only)
- euclidean GCD
- Issues
- tricky to convert to FPC
- memory management degrades efficient algs on larger sizes (speed reduced by 5)
- default thresholds & missing tool for auto detection
- sqr-schoolbook = mul-schoolbook
- missing efficient GCD algorithm
- missing efficient mod algorithms (Montgomery, Barrett)
- the way asm-enhancements are integrated could be improved (subjective)
- testing depth & breadth could be improved (subjective)
- Nice things
- there is also BigDecimals, BigRationals & BigFloats
-----------
MPArith - Wolfgang Erhardt
- Functionality
- supports 16/32/64 bit, little- & big-endian
- pure functional implementation
- dynamic sizing
- solid error handling (function results or exceptions)
- extensive set of functions - arith, bitops, comparisons, type conversion, base conversion
- extensive number theory - gcd, modinv, mulmod, pow, powmod, sqrt+remainder, n-root+remainder, and a lot more
- Algorithms
- basecase multiplication only 33% slower than best known pure Pascal
- efficient multiplication: Karatsuba, Toom3
- efficient squaring: Karatsuba, Toom3
- efficient division: Burnikel-Ziegler
- div&cong base conversion (both ways)
- efficient GCD
- efficient modular ops: based on Montgomery & Barrett reductions
- efficient roots: quadratically converging
- Issues
- default thresholds & missing tool for auto detection
- Burnikel-Ziegler efficiency degrades on large sizes
- no class implementation
- Nice things
- simple to activate under FPC
- accompanied by a good manual
- extensive test coverage
- there is also rationals, reals & complex available with large set of functions
-----------
@SymbolicFrank - does the above help you or is there something I should add, take into closer focus, from your perspective?
Regards,
MathMan