imath
imath copied to clipboard
Arbitrary precision integer and rational arithmetic library
The code tries but fails (no checking in many places) to detect and pass up allocation failures. As an interim I have put in place setting errno to ENOMEM which...
What can I say, it's go make cup of tea slow to write a 695K digit number to a buffer, like 4 minutes. GMP will do the equivalent in under...
You may want to improve the primality test in iprime.c by incorporating strong pseudoprime tests as in http://cvsweb.netbsd.org/bsdweb.cgi/%7echeckout%7e/src/games/primes/spsp.c This works reliably for all 64-bit integers. Unfortunately, this change won't avoid...
There is presently no real test coverage of either of these libraries, except indirectly through the example programs `findprime`, `randprime` and `rtest`. Those programs only serve to prove the libraries...
Right now the project is built with `make`. However, the current build setup has several unfortunate properties, including: 1. It uses ambient toolchains, 2. It hard-codes various GCC-specific compiler flags,...
`mp_rat_read_cstring` handles whitespace inconsistently: it accepts " 123 / 46" but not " 123 ". This happens because `mp_int_read_cstring` raises an error at trailing whitespace. I assume `mp_int_read_cstring` tries to...