summaryrefslogtreecommitdiffstats
path: root/mpi
Commit message (Collapse)AuthorAgeFilesLines
* eliminate-locale-dependencies patchKaz Kylheku2015-04-221-9/+14
| | | | | | | Eliminating dependencies on locale-dependent C functions. * mpi/mpi.c (s_mp_tovalue, s_mp_todigit): Avoid tolower, toupper, islower and isupper.
* add-bitops patchKaz Kylheku2015-04-222-0/+441
| | | | | | | | | | | Adding bit operations to MPI. * mpi/mpi.c (MAX, MIN): New macros. (mp_2comp, mp_and, mp_or, mp_xor, mp_comp, mp_trunc, mp_shift, mp_bit): New functions. * mpi/mpi.h (mp_2comp, mp_and, mp_or, mp_xor, mp_comp, mp_trunc, mp_shift, mp_bit): Declared.
* fix-ctype-warnings patchKaz Kylheku2015-04-221-3/+3
| | | | | * mpi/mpi.c (s_mp_tovalue): Argument changes from char to int, fixing some compiler warnings.
* mpi-to-double patchKaz Kylheku2015-04-222-0/+29
| | | | | | * mpi/mpi.c (mp_to_double): New function. * mpi/mpi.h (mp_to_double): Declared.
* faster-square-root patchKaz Kylheku2015-04-221-74/+70
| | | | | * mpi/mpi.c (s_highest_bit_mp, s_mp_set_bit): New functions. (mp_sqrt): Rewrite with more efficient algorithm.
* shrink-mpi-int patchKaz Kylheku2015-04-221-0/+5
| | | | | | * mpi/mpi.h (mp_int): Depending on the relative size of int and pointers, turn the sign and alloc fields into bitfields, so that the structure is three words wide and therefore fits into a TXR obj_t heap object.
* bit-search-optimizations patchKaz Kylheku2015-04-221-30/+232
| | | | | * mpi/mpi.c (s_highest_bit): New static function. (s_mp_norm, s_mp_ispow2): Use s_highest_bit instead of looping over bits.
* fix-bad-shifts patchKaz Kylheku2015-04-221-5/+5
| | | | | | * mpi/mpi.c (mp_div_d, s_mp_mod_2d, s_mp_mul_2d, s_mp_div_2d, s_mp_2expt): Fixing incorrect digit-wide left shifts whre the operand is not widened to the mp_digit type.
* mpi-set-double-intptr patchKaz Kylheku2015-04-222-0/+33
| | | | | | * mpi/mpi.c (mp_set_double_intptr): New function. * mpi/mpi.h (mp_set_double_intptr): Declared.
* mpi-set-mpi-word patchKaz Kylheku2015-04-222-0/+10
| | | | | | * mpi/mpi.c (mp_set_word): New function. * mpi/mpi.h (mp_set_word): Declared.
* fix-mult-bug patchKaz Kylheku2015-04-221-6/+6
| | | | | | | | Fixing bugs in MPI whereby two digits are multiplied together, but neither operand is cast to the double digit type, so that the result is truncated. * mpi/mpi.c (s_mp_mul_d, s_mp_mul, s_mp_sqr): Add casts to achieve multiplication of the proper width.
* add-mpi-toradix-with-case patchKaz Kylheku2015-04-222-4/+10
| | | | | | | | * mpi/mpi.c (mp_toradix_case): New function based on mp_toradix. Takes an argument whether to use lower case digits. (mp_toradix): Reduced to wrapper for mp_toradix_case. * mpi/mpi.h (mp_toradix_case): Declared.
* add-mp-hash patchKaz Kylheku2015-04-222-0/+30
| | | | | | * mpi/mpi.c (mp_hash): New function. * mpi/mpi.c (mp_hash): Declared.
* export-mp-eq patchKaz Kylheku2015-04-222-8/+4
| | | | | | * mpi/mpi.c (MP_LT, MP_EQ, MP_GT): Preprocessor symbols removed. * mpi/mpi.h (MP_LT, MP_EQ, MP_GT): Preprocessor symbols added.
* add-mp-set-intptr patchKaz Kylheku2015-04-222-0/+55
| | | | | | * mpi/mpi.c (mp_set_intptr, mp_get_intptr): New functions. * mpi/mpi.h (mp_set_intptr, mp_get_intptr): Declared.
* use-txr-allocator patchKaz Kylheku2015-04-221-6/+9
| | | | | | | | | * mpi/mpi.c (mem_t): TXR's mem_t typedef repeated here. (chk_calloc): New external declaration, to avoid including our entire lib.h header. (s_mp_alloc): Macro retargetted to use chk_calloc. (mp_init_size, mp_init_copy, mp_copy, s_mp_grow, s_mp_copy): Return value casts added.
* fix-warnings patchKaz Kylheku2015-04-222-7/+7
| | | | | | | * mpi/mpi.c (mp_to_unsigned_bin, s_mp_mod_2d): Fix signed/unsigned warning. (mp_toradix): Fix shadowing local variable name warning. * mpi/mplogic.c (mpl_num_set, mpl_num_clear): Fix signed/unsigned warning.
* config-types patchKaz Kylheku2015-04-223-13/+54
| | | | | | | | * mpi/mpi-types.h: Rewritten by hand to use make use of information produced by TXR's configure script into config/config.h. * mpi/mpi.c, mpi/mplogic.c: Include the config.h header, now needed by mpi-types.h.
* Bringing MPI library out of tarball into GIT.Kaz Kylheku2015-04-229-0/+5597
Importing 1.8.6 upstream baseline, minus unwanted stuff.