diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-01-25 06:33:29 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-01-25 06:33:29 -0800 |
commit | 4c71a77f2c39a8158c80b40af1a5cc2358251a00 (patch) | |
tree | f3c49877aed2a6898b89662f06a17cbc06c080ca /arith.h | |
parent | 8195fbed4a8067362656d38e56fec3c4eb3deef1 (diff) | |
download | txr-4c71a77f2c39a8158c80b40af1a5cc2358251a00.tar.gz txr-4c71a77f2c39a8158c80b40af1a5cc2358251a00.tar.bz2 txr-4c71a77f2c39a8158c80b40af1a5cc2358251a00.zip |
Provide faster bignum-in-fixed-integer range tests in MPI.
* mpi/mpi.c (mp_in_range, mp_in_intptr_range,
mp_in_uintptr_range): New functions.
* mpi/mpi.h (mp_in_range, mp_in_intptr_range,
mp_in_uintptr_range): Declared.
* arith.c (NUM_MAX_MP, INT_PTR_MAX_MP, UINT_PTR_MAX_MP,
INT_PTR_MAX_SUCC_MP): Static variables removed. Note that
INT_PTR_MAX_MP was not used at all!
(normalize): Use mp_in_range instead magnitude comparison to
NUM_MAX_MP.
(in_int_ptr_range, in_uint_ptr_range): Static functions removed.
(c_unum): Use mp_in_uintptr_range instead of
in_uint_ptr_range.
(arith_init): Remove initializations of removed variables.
(arith_free_all): Remove cleanup of removed variables, leaving
function empty.
* lib.c (c_num): Use mp_in_intptr_range instead of
in_int_ptr_range.
Diffstat (limited to 'arith.h')
0 files changed, 0 insertions, 0 deletions