Mentions légales du service

Skip to content
Snippets Groups Projects
ChangeLog 1.12 MiB
Newer Older
tege's avatar
tege committed
	  not done properly if the input string had many leading zeros).

Sun Aug  4 16:54:14 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* dist-Makefile (gcd.c, pow.c, madd.c, msub.c): Make these targets
	  work with VPATH and GNU MP.

	* mpz_gcd: Don't call mpz_set; inline its functionality.

	* mpq_mul, mpq_div: Fix several serious typos.

	* mpz_dmincl, mpz_div: Don't normalize the quotient if it's already
	  zero.

	* mpq_neg.c: New file.

	* dist-Makefile: Remove obsolete dependencies.

	* mpz_sub: Fix typo.

	Bugs found by Pierre-Joseph Gailly (pjg@sunbim.be):
	* mpq_mul, mpq_div: Initialize tmp[12] variables even when the gcd
	  is just 1.
	* mpz_gcd: Handle gcd(0,v) and gcd(u,0) in special cases.

Sat Aug  3 23:45:28 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* longlong.h: Clean up comments.
	* longlong.h: #undef internal macros.

Fri Aug  2 18:29:11 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* mpq_set_si, mpq_set_ui: Canonicalize 0/x to 0/1.
	* mpq_set_si, mpq_set_ui: Cosmetic formatting changes.

	* mpz_dmincl.c: Normalize the remainder before shifting it back.

	* mpz_dm_ui.c (mpz_divmod_ui): Handle rem == dividend.

	* mpn_div.c: Fix comment.

	* mpz_add.c, mpz_sub.c: Use __MP_INT (not MP_INT) for intermediate
	  type, in order to work for both GNU and Berkeley functions.

	* dist-Makefile: Create gcd.c from mpz_gcd.c, pow.c from mpz_powm,
	  madd.c from mpz_add.c, msub.c from mpz_sub.c.
	  respectively.
	* pow.c, gcd.c, mpz_powmincl.c, madd.c, msub.c: Remove these.
	* mpz_powm.c, mpz_gcd.c, mpz_add.c, mpz_sub.c: #ifdef for GNU and
	  Berkeley function name variants.
	* dist-Makefile: Add created files to "clean" target.

Tue Jul 16 15:19:46 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* mpq_get_den: No need for absolute value of the size, the
	  denominator is always positive.

	* mpz_get_ui: If the operand is zero, return zero.  Don't read the
	  limb array!

	* mpz_dmincl.c: Don't ignore the return value from _mpn_rshift, it
	  is the size of the remainder.

Mon Jul 15 11:08:05 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* Several files: Remove unused variables and functions.

	* gmp-impl.h: Declare _mpz_impl_sqrt.

	* mpz_dm_ui (mpz_divmod_ui), sdiv: Shift back the remainder if
	  UDIV_NEEDS_NORMALIZATION.  (Fix from Brian Beuning.)

	* mpz_dm_ui.c, sdiv: Replace *digit with *limb.

	* mpz_ior: Add missing else statement in -OP1 | -OP2 case.
	* mpz_ior: Add missing else statement in OP1 | -OP2 case.
	* mpz_ior: Swap also OP1 and OP2 pointers in -OP1 & OP2 case.
	* mpz_ior: Duplicate _mpz_realloc code.

	* mpz_and: Add missing else statement in -OP1 & -OP2 case.
	* mpz_and: Rewrite OP1 & -OP2 case.
	* mpz_and: Swap also OP1 and OP2 pointers in -OP1 & OP2 case.

	* mpz_gcdext: Loop in d1.size (not b->size).  (Fix from Brian
	  Beuning.)

	* mpz_perfsqr: Fix argument order in _mpz_impl_sqrt call.  (Fix from
	  Brian Beuning.)

Fri Jul 12 17:10:33 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* mpq_set.c, mpq_set_ui.c, mpq_set_si.c, mpq_inv.c,
	  mpq_get_num.c, mpq_get_den.c, mpq_set_num.c, mpq_set_den.c:
	  New files.

	* mpz_dmincl.c: Remove second re-allocation of rem->d.  It
	  was never executed.

	* dist-Makefile: Use `-r' instead of `-x' for test for ranlib (as
	  some unixes' test doesn't have the -r option).

	* *.*: Cast allocated pointers to the appropriate type (makes old C
	  compilers happier).

	* cre-conv-tab.c (main): Divide max_uli by 2 and multiply again
	  after conversion to double.  (Kludge for broken C compilers.)

	* dist-Makefile (stamp-stddefh): New target.  Test if "stddef.h"
	  exists in the system and creates a minimal one if it does not
	  exist.
	* cre-stddefh.c: New file.
	* dist-Makefile: Make libgmp.a and libmp.a depend on stamp-stddefh.
	* dist-Makefile (clean): Add some more.
	* gmp.h, mp.h: Unconditionally include "stddef.h".

Thu Jul 11 10:08:21 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* min: Do ungetc of last read character.
	* min.c: include stdio.h.

	* dist-Makefile: Go via tmp- files for cre* redirection.
	* dist-Makefile: Add tmp* to "clean" target.

	* dist-Makefile: Use LOCAL_CC for cre*, to simplify cross
tege's avatar
tege committed
	  compilation.

	* gmp.h, mp.h: Don't define NULL here.
	* gmp-impl.h: Define it here.

Wed Jul 10 14:13:33 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* mpz_mod_2exp: Don't copy too much, overwriting most significant
	  limb.

	* mpz_and, mpz_ior: Don't read op[12]_ptr from op[12] when
	  reallocating res, if op[12]_ptr got their value from alloca.

	* mpz_and, mpz_ior: Clear up comments.

	* cre-mparam.c: Output parameters for `short int' and `int'.

	* mpz_and, mpz_ior: Negate negative op[12]_size in several places.

Tue Jul  9 18:40:30 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* gmp.h, mp.h: Test for _SIZE_T defined before typedef'ing size_t.
	  (Fix for Sun lossage.)

	* gmp.h: Add declaration of mpq_clear.

Torbjorn Granlund's avatar
Torbjorn Granlund committed
	* dist-Makefile: Check if "ranlib" exists, before using it.
tege's avatar
tege committed
	* dist-Makefile: Add mpz_sqrtrem.c and mpz_size.c.
	* mpz_powm: Fix typo, "pow" instead of "mpz_powm".

Fri Jul  5 19:08:09 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* move: Remove incorrect comment.

	* mpz_free, mpq_free: Rename to *_clear.
	* dist-Makefile: Likewise.
	* mpq_add, mpq_sub, mpq_mul, mpq_div: Likewise.

	* mpz_dmincl.c: Don't call "move", inline its functionality.

Thu Jul  4 00:06:39 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* Makefile: Include dist-Makefile.  Fix dist target to include
	  dist-Makefile (with the name "Makefile" in the archive).

	* dist-Makefile: New file made from Makefile.  Add new mpz_...
	  functions.

	* mpz_powincl.c New file for mpz_powm (Berkeley MP pow)
	  functionality.  Avoids code duplication.
	* pow.c, mpz_powm.c: Include mpz_powincl.c

	* mpz_dmincl.c: New file containing general division code.  Avoids
	  code duplication.
	* mpz_dm.c (mpz_divmod), mpz_mod.c (mpz_mod), mdiv.c (mdiv): Include
	  mpz_dmincl.c.

	* _mpz_get_str: Don't call memmove, unless HAS_MEMMOVE is defined.
	  Instead, write the overlapping memory copying inline.

	* mpz_dm_ui.c: New name for mpz_divmod_ui.c (SysV file name limit).

	* longlong.h: Don't use #elif.
	* mpz_do_sqrt.c: Likewise.

	* longlong.h: Use __asm__ instead of asm.
	* longlong.h (sparc udiv_qrnnd): Make it to one string over several
	  lines.

	* longlong.h: Preend __ll_ to B, highpart, and lowpart.

	* longlong.h: Move array t in count_leading_zeros to the new file
	  mp_clz_tab.c.  Rename the array __clz_tab.
	* All files: #ifdef for traditional C compatibility.

Wed Jul  3 11:42:14 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* mpz_and: Initialize res_ptr always (used to be initialized only
	  when reallocating).

	* longlong.h (umul_ppmm [C variant]): Make __ul...__vh
	  `unsigned int', and cast the multiplications.  This way
	  compilers more easily can choose cheaper multiplication
	  instructions.

	* mpz_mod_2exp: Handle input argument < modulo argument.
	* mpz_many: Make sure mp_size is the type for sizes, not int.

	* mpz_init, mpz_init_set*, mpq_init, mpq_add, mpq_sub, mpq_mul,
	  mpq_div: Change mpz_init* interface.  Structure pointer as first
	  arg to initialization function, no longer *return* struct.

Sun Jun 30 19:21:44 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* Rename mpz_impl_sqrt.c to mpz_do_sqrt.c to satisfy SysV 14
	  character file name length limit.

	* Most files: Rename MINT to MP_INT.  Rename MRAT to MP_RAT.
	* mpz_sizeinb.c: New file with function mpz_sizeinbase.
	* mp_bases.c: New file, with array __mp_bases.
	* _mpz_get_str, _mpz_set_str: Remove struct bases, use extern
	  __mp_bases instead.
	* mout, mpz_out_str: Use array __mp_bases instead of function
	  _mpz_get_cvtlen.
	* mpz_get_cvtlen.c: Remove.
	* Makefile: Update.

Sat Jun 29 21:57:28 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* longlong.h (__sparc8__ umul_ppmm): Insert 3 nop:s for wr delay.
	* longlong.h (___IBMR2__): Define umul_ppmm, add_ssaaaa, sub_ddmmss.
	* longlong.h (__sparc__): Don't call .umul; expand asm instead.
	  Don't define __umulsidi3 (i.e. use default definition).

Mon Jun 24 17:37:23 1991  Torbjorn Granlund  (tege@amon.sics.se)

	* _mpz_get_str.c (num_to_ascii_lower_case, num_to_ascii_upper_case):
	  Swap 't' and 's'.

Sat Jun 22 13:54:01 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* mpz_gcdext.c: New file.

	* mpn_mul: Handle carry and unexpected operand sizes in last
	  additions/subtractions.  (Bug trigged when v1_size == 1.)

	* mp*_alloc*: Rename functions to mp*_init* (files to mp*_iset*.c).
	* mpq_*: Call mpz_init*.

	* mpz_pow_ui, rpow: Use _mpn_mul instead of mult.  Restructure.

Wed May 29 20:32:33 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* mpz_get_cvtlen: multiply by size.

Sun May 26 15:01:15 1991  Torbjorn Granlund  (tege@bella.nada.kth.se)

	Alpha-release 0.95.

	Fixes from Doug Lea (dl@g.oswego.edu):
	* mpz_mul_ui: Loop to MULT_SIZE (not PROD_SIZE).  Adjust PROD_SIZE
	  correctly.
	* mpz_div: Prepend _ to mpz_realloc.
	* mpz_set_xs, mpz_set_ds: Fix typos in function name.

Sat May 25 22:51:16 1991  Torbjorn Granlund  (tege@bella.nada.kth.se)

	* mpz_divmod_ui: New function.

	* sdiv: Make the sign of the remainder correct.

Thu May 23 15:28:24 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* Alpha-release 0.94.

	* mpz_mul_ui: Include longlong.h.

	* mpz_perfsqr.c (mpz_perfect_square_p): Call _mpz_impl_sqrt instead
	  of msqrt.

	* mpz_impl_sqrt: Don't call "move", inline its functionality.

	* mdiv: Use MPN_COPY instead of memcpy.
	* rpow, mpz_mul, mpz_mod_2exp: Likewise.
	* pow.c: Likewise, and fix bug in the size arg.

	* xtom: Don't use mpz_alloc, inline needed code instead.  Call
	  _mpz_set_str instead of mpz_set_str.

	* Makefile: Make two libraries, libmp.a and libgmp.a.

Thu May 22 20:25:29 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* Add manual to distribution.
Torbjorn Granlund's avatar
Torbjorn Granlund committed
	* Fold in many missing routines described in the manual.
tege's avatar
tege committed
	* Update Makefile.

Wed May 22 13:48:46 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* mpz_set_str: Make it handle 0x prefix OK.

Sat May 18 18:31:02 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* memory.c (_mp_default_reallocate): Swap OLD_SIZE and NEW_SIZE
	  arguments.
	* mpz_realloc (_mpz_realloc): Swap in call to _mp_reallocate_func.
	* min: Likewise.

Thu May 16 20:43:05 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* memory.c: Make the default allocations functions global.
	* mp_set_fns (mp_set_memory_functions): Make a NULL pointer mean the
	  default memory function.

Wed May  8 20:02:42 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* mpz_div: Handle DEN the same as QUOT correctly by copying DEN->D
	  even if no normalization is needed.
	* mpz_div: Rework reallocation scheme, to avoid excess copying.

	* mpz_sub_ui.c, mpz_add_ui.c: New files.

	* mpz_cmp.c, mpz_cmp_ui.c: New files.

	* mpz_mul_2exp: Handle zero input MINT correctly.

tege's avatar
tege committed
	* mpn_rshiftci: Don't handle shift counts > BITS_PER_MP_DIGIT.
tege's avatar
tege committed

	* mpz_out_raw.c, mpz_inp_raw.c: New files for raw I/O.

Tue May  7 15:44:58 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* mpn_rshift: Don't handle shift counts > BITS_PER_MP_DIGIT.
	* mpz_div_2exp: Don't call _mpn_rshift with cnt > BITS_PER_MP_DIGIT.
	* gcd, mpz_gcd: Likewise.

	* gcd, mpz_gcd: Handle common 2 factors correctly.

Mon May  6 20:22:59 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* gmp-impl.h (MPN_COPY): Inline a loop instead of calling memcpy.

	* gmp-impl.h, mpz_get_str, rpow: Swap DST and SRC in TMPCOPY* macros.

Sun May  5 15:16:23 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* mpz_div: Remove test for QUOT == 0.

Sun Apr 28 20:21:04 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* pow: Don't make MOD normalization in place, as it's a bad idea to
	  write on an input parameter.
	* pow: Reduce BASE if it's > MOD.
	* pow, mult, mpz_mul: Simplify realloc code.

Sat Apr 27 21:03:11 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* Install multiplication using Karatsuba's algorithm as default.
tege's avatar
tege committed

Fri Apr 26 01:03:57 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* msqrt: Store in ROOT even for U==0, to make msqrt(0) defined.

	* mpz_div_2exp.c, mpz_mul_2exp.c: New files for shifting right and
	  left, respectively.
	* gmp.h: Add definitions for mpz_div_2exp and mpz_mul_2exp.

	* mlshift.c, mrshift.c: Remove.

Wed Apr 24 21:39:22 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* mpn_mul: Check only for m2_size == 0 in function header.

Mon Apr 22 01:31:57 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* karatsuba.c: New file for Karatsuba's multiplication algorithm.
tege's avatar
tege committed

	* mpz_random, mpz_init, mpz_mod_2exp: New files and functions.

	* mpn_cmp: Fix header comment.

Sun Apr 21 00:10:44 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* pow: Switch off initial base reduction.

Sat Apr 20 22:06:05 1991  Torbjorn Granlund  (tege@echnaton.sics.se)

	* mpz_get_str: Don't generate initial zeros for initial word.
	  Used to write outside of allocated storage.

Mon Apr 15 15:48:08 1991  Torbjorn Granlund  (tege@zevs.sics.se)

	* _mpz_realloc: Make it accept size in number of mp_digits.
	* Most functions: Use new _mpz_realloc definition.

	* mpz_set_str: Remove calls _mp_free_func.

	* Most functions: Rename mpn_* to _mpn_*.  Rename mpz_realloc to
	  _mpz_realloc.
	* mpn_lshift: Redefine _mpn_lshift to only handle small shifts.
	* mdiv, mpz_div, ...: Changes for new definition of _mpn_lshift.
	* msqrt, mp*_*shift*: Define cnt as unsigned (for speed).

Sat Apr  6 14:05:16 1991  Torbjorn Granlund  (tege@musta.nada.kth.se)

	* mpn_mul: Multiply by the first digit in M2 in a special
	  loop instead of zeroing the product area.

	* mpz_abs.c: New file.

	* sdiv: Implement as mpz_div_si for speed.

	* mpn_add: Make it work for second source operand == 0.

	* msub: Negate the correct operand, i.e. V before swapping, not
	  the smaller of U and V!
	* madd, msub: Update abs_* when swapping operands, and not after
	  (optimization).

Fri Apr  5 00:19:36 1991  Torbjorn Granlund  (tege@black.nada.kth.se)

	* mpn_sub: Make it work for subtrahend == 0.

	* madd, msub: Rewrite to minimize mpn_cmp calls.  Ensure
	  mpn_cmp is called with positive sizes (used to be called
	  incorrectly with negative sizes sometimes).

	* msqrt: Make it divide by zero if fed with a negative number.
	* Remove if statement at end of precision calculation that was
	  never true.

	* itom, mp.h: The argument is of type short, not int.

	* mpz_realloc, gmp.h: Make mpz_realloc return the new digit pointer.

	* mpz_get_str.c, mpz_set_str.c, mpz_new_str.c: Don't include mp.h.

	* Add COPYING to distribution.

	* mpz_div_ui.c, mpz_div_si.c, mpz_new_ui.c, mpz_new_si.c: New files.

Fri Mar 15 00:26:29 1991  Torbjorn Granlund  (tege@musta.nada.kth.se)

	* Add Copyleft headers to all files.

	* mpn_mul.c, mpn_div.c: Add header comments.
	* mult.c, mdiv.c: Update header comments.

	* mpq_add.c, mpq_sub.c, mpq_div.c, mpq_new.c, mpq_new_ui.c,
	  mpq_free.c: New files for rational arithmetics.

	* mpn_lshift.c: Avoid writing the most significant word if it is 0.

	* mdiv.c: Call mpn_lshift for the normalization.
	* mdiv.c: Remove #ifdefs.

	* Makefile: Add ChangeLog to DISTFILES.

	* mpn_div.c: Make the add_back code work (by removing abort()).
	* mpn_div.c: Make it return if the quotient is size as compared
	  with the difference NSIZE - DSIZE.  If the stored quotient is
	  larger than that, return 1, otherwise 0.
	* gmp.h: Fix mpn_div declaration.
	* mdiv.c: Adopt call to mpn_div.
	* mpz_div.c: New file (developed from mdiv.c).

	* README: Update routine names.

Thu Mar 14 18:45:28 1991  Torbjorn Granlund  (tege@musta.nada.kth.se)

	* mpq_mul.c: New file for rational multiplication.
tege's avatar
tege committed

	* gmp.h: Add definitions for rational arithmetics.

	* mpn_div: Kludge the case where the high numerator digit > the
	  high denominator digit.  (This code is going to be optimized later.)

	* New files: gmp.h for GNU specific functions, gmp-common.h for
	  definitions common for mp.h and gmp.h.

	* Ensure mp.h just defines what BSD mp.h defines.

	* pow.c: Fix typo for bp allocation.

	* Rename natural number functions to mpn_*, integer functions to
	  mpz_*.

Tue Mar  5 18:47:04 1991  Torbjorn Granlund  (tege@musta.nada.kth.se)

	* mdiv.c (_mp_divide, case 2): Change test for estimate of Q from
	  "n0 >= r" to "n0 > r".

	* msqrt: Tune the increasing precision scheme, to do fewer steps.

Tue Mar  3 18:50:10 1991  Torbjorn Granlund  (tege@musta.nada.kth.se)

	* msqrt: Use the low level routines.  Use low precision in the
	beginning, and increase the precision as the result converges.
	(This optimization gave a 6-fold speedup.)