summaryrefslogtreecommitdiffstats
path: root/mpi/make-logtab.txr
Commit message (Collapse)AuthorAgeFilesLines
* mpi: use integer math for radix length.Kaz Kylheku2019-04-051-14/+13
| | | | | | | | | | | | | | | | | | | | * mpi/logtab.h: Regenerated. (s_logv_2): Now table of scaled integers. (MP_LOG_SCALE): New constant. * mpi/make-logtab.txr (scale, type): New variables. Generate integer table with log2 values scaled by the scale factor, rounded up. * mpi/config.h (MP_LOGTAB): Removed. We always use the table. * mpi/mpi.c: Unconditionally include logtab.h. (LOG_V_2): Macro removed. (s_mp_outlen): Rewritten using scaled integer math. Overflow is avoided by splitting the input into a part that is an exact multiple of the scale factor, and a remaining part. Only the remaining part need be multiplied by a value from the table before dividing by the scale factor.
* Replace Perl program that came with MPI.Kaz Kylheku2019-04-011-0/+26
* mpi/make-logtab: File removed. * mpi/make-logtab.txr: New file.