1 Thu Jun 6 19:00:53 1996 Torbjorn Granlund <tege@noisy.tmg.se>
3 * Version 2.0.2 released.
5 * install.sh: New file.
6 * Makefile.in (INSTALL): Use install.sh.
7 (install-normal): New name for target `install'.
8 (install): New dummy target.
10 * mpz/pow_ui.c: Swap tests for (e == 0) and (bsize == 0).
11 * mpz/ui_pow_ui.c: Swap tests for (e == 0) and (blimb == 0).
13 * config/mt-linux (AR_FLAGS): New file.
14 * configure.in: Use config/mt-linux for all linux systems.
16 Tue Jun 4 03:42:18 1996 Torbjorn Granlund <tege@noisy.tmg.se>
18 * Version 2.0.1 released.
20 * mpf/tests/ref.c: Cast result of TMP_ALLOC to the right pointer type.
22 * extract-double.c: Test _GMP_IEEE_FLOATS with #if, not plain if.
24 * insert-double.c: Don't #include stdlib.h.
26 * gmp-impl.h (union ieee_double_extract): Test sparc and __sparc.
27 Do not test __sparc__.
29 * mpf/reldiff.c: Change declaration to work around irix5 compiler bug.
30 * mpq/equal.c: Likewise.
32 * mpn/generic/gcd.c: Delete spurious comma at end of enumeration.
34 * mpn/generic/gcdext.c: Add K&R declaration syntax.
35 * stack-alloc.h: Likewise.
36 * insert-double.c: Likewise.
37 * extract-double.c: Likewise.
38 * mpf/tests/reuse.c: Likewise.
39 * mpz/tests/reuse.c: Likewise.
40 * mpf/tests/t-sub.c: Likewise.
41 * mpf/tests/t-add.c: Likewise.
42 * mpf/tests/t-muldiv.c: Likewise.
43 * mpf/tests/t-conv.c: Likewise.
44 * mpf/tests/ref.c: Likewise.
46 * mpn/config/t-oldgas: Renamed from t-freebsd.
47 * mpn/configure.in: Use t-oldgas for freebsd, netbsd, and some linux
50 * mpn/powerpc32/mul_1.s: Really clear cy before entering loop.
51 * mpn/powerpc32/*.s: Fix power/powerpc syntax issues.
53 * mpn/config/t-ppc-aix: New file.
54 * mpn/configure.in: Use t-ppc-aix for powerpc like t-pwr-aix for power.
56 Wed May 29 02:07:31 1996 Torbjorn Granlund <tege@noisy.tmg.se>
58 * gmp.h (mp_bits_per_limb): Change qualifier from `const' to
61 * gmp.h (mpf_init_set_str): Add `const' qualifier for 2nd parameter.
62 * mpf/iset_str.c: Likewise.
64 Mon May 27 00:15:58 1996 Torbjorn Granlund <tege@noisy.tmg.se>
66 * gmp-impl.h: Declare __gmp_extract_double.
68 * mpz/set_q.c: Delete unused variables.
70 * gmp.h (mpq_equal): Declare.
72 * mpf/eq.c: mpf_cmp2 -> mpf_eq.
74 Fri May 24 03:20:44 1996 Torbjorn Granlund <tege@noisy.tmg.se>
76 * mpz/iset_d.c: Don't include <math.h>.
78 * insert-double.c (__gmp_scale2): New name for scal2.
79 * mpz/get_d.c: Corresponding change.
80 * mpf/get_d.c: Likewise.
81 * mpq/get_d.c: Likewise.
82 * gmp-impl.h: Declare __gmp_scale2.
84 * mpn/generic/scan0.c: Clarify comment.
86 * mpz/set_q.c: New file.
87 * Makefile.in: Compile it.
89 * gmp.h: Declare mpz_set_q.
91 * insert-double.c: New file.
92 * Makefile.in: Compile it.
95 * mpz/get_d.c: New file.
96 * mpz/Makefile.in: Compile it.
98 * gmp.h: Declare mpz_get_d.
100 * mpf/get_d.c: New file.
101 * mpf/Makefile.in: Compile it.
102 * make.bat: Likewise.
103 * gmp.h: Declare mpf_get_d.
105 * make.bat: Compile things in alphabetical order.
107 * gmp-impl.h (MP_BASE_AS_DOUBLE): New #define.
108 (LIMBS_PER_DOUBLE): New #define.
110 * extract-double.c: New file.
111 * Makefile.in: Compile it.
112 * make.bat: Likewise.
113 * mpz/set_d.c: Rewrite to use __gmp_extract_double.
114 * mpf/set_d.c: Likewise.
116 * mpn/configure.in: Use t-pwr-aix also for aix 3.2.4 and up.
118 Wed May 22 02:48:35 1996 Torbjorn Granlund <tege@noisy.tmg.se>
120 * gmp-impl.h: Rework code for defining ieee_double_extract.
121 (IEEE_DOUBLE_BIG_ENDIAN): Macro removed.
122 (_GMP_IEEE_FLOATS): New macro.
123 * mpn/vax/gmp-mparam.h: Delete.
125 * mpn/config/t-pwr-aix: New file.
126 * mpn/configure.in: Use t-pwr-aix for aix 4 and later.
128 Mon May 20 16:30:31 1996 Torbjorn Granlund <tege@noisy.tmg.se>
130 * gmp.h: In code for setting _GMP_H_HAVE_FILE, test more symbols.
132 * mpf/tests/t-add.c (oo): Add some `l' printf modifiers.
133 * mpf/tests/t-sub.c (oo): Likewise.
134 * mpf/tests/t-conv.c (oo): Likewise.
135 * mpf/tests/t-sqrt.c (oo): Likewise.
137 * mpz/tests/t-mul.c (_mpn_mul_classic): Remove unused variables.
139 * mpn/{pyr,i960,clipper}/*.s: Add missing copyright headers.
141 Fri May 17 02:24:43 1996 Torbjorn Granlund <tege@noisy.tmg.se>
143 * mpz/set_d.c: Call _mpz_realloc.
145 * mpq/set_z.c: New file.
146 * mpq/Makefile.in: Compile it.
147 * make.bat: Likewise.
148 * gmp.h: Declare mpq_set_z.
150 * mp?/Makefile.in (libmp?.a): Depend on Makefile, not Makefile.in.
151 * mpf/Makefile.in (test): Delete spurious target.
152 * mpq/Makefile.in (test): Likewise.
154 * mpf/out_str.c: Use `e' to separate exponent when base <= 10.
156 * mpn/configure.in: Treat ultrasparc just like sparc v8,
157 until 64-bit compilers are ready.
159 * mpf/set_d.c: Make it work for 64-bit machines.
161 Thu May 16 20:53:57 1996 Torbjorn Granlund <tege@noisy.tmg.se>
163 * gmp-impl.h: Set IEEE_DOUBLE_BIG_ENDIAN to 0 for little-endian
165 * mpn/x86/gmp-mparam.h: Delete file.
167 * configure.in: Treat microsparc like sparc8.
169 * urandom.h: Test __alpha instead of __alpha__, since the former
170 is the standard symbol.
171 * mpn/generic/random2.c: Likewise.
172 * mpf/random2.c: Likewise.
174 Tue May 14 13:42:39 1996 Torbjorn Granlund (tege@tiny.tmg.se)
176 * mpz/set_f.c: New file.
177 * mpz/Makefile.in: Compile it.
178 * gmp.h: Declare mpz_set_f.
180 * mpf/set_q.c: Simplify expression in rsize == nsize if-then-else arms.
182 Tue May 14 13:03:07 1996 Torbjorn Granlund (tege@tiny.tmg.se)
184 * make.bat: Add all new files.
186 Sun May 12 22:24:36 1996 Torbjorn Granlund <tege@noisy.tmg.se>
188 * mpf/set_z.c: New file.
189 * mpf/Makefile.in: Compile it.
190 * gmp.h: Declare mpf_set_z.
192 Sat May 11 19:26:25 1996 Torbjorn Granlund <tege@noisy.tmg.se>
194 * gmp.h: Declare mpf_set_q.
196 * mpf/set_q.c: Compute prec-1 limbs in mpn_divrem call.
198 Fri May 10 17:37:38 1996 Torbjorn Granlund <tege@noisy.tmg.se>
200 * mpf/set_q.c: New file.
201 * mpf/Makefile.in: Compile it.
203 * config.sub: Recognize sparc8.
205 Wed May 8 09:19:11 1996 Torbjorn Granlund <tege@noisy.tmg.se>
207 * mpf/tests/t-dm2exp.c: New file.
209 * mpf/tests/t-add.c: Correct header comment.
210 * mpf/tests/t-sub.c: Likewise.
211 * mpf/tests/t-sqrt.c: Likewise.
213 * mpf/div.c: Misc variable name cleanups.
214 * mpf/div_ui.c: Base more closely on mpf/div.c.
215 * mpf/ui_div.c: Likewise.
217 * mpz/tests/Makefile.in (check): Depend on Makefile.
218 * mpq/tests/Makefile.in (check): Likewise.
219 * mpf/tests/Makefile.in (check): Likewise.
221 * mpf/tests/t-muldiv.c: New file.
222 * mpf/tests/Makefile.in: Compile and run `t-muldiv'.
223 (t-ref.o): Delete spurious rule.
225 * mpf/sqrt.c: Properly detect negative input operand.
227 * mpf/sqrt_ui.c: Delete spurious header comment.
228 * mpf/sqrt.c: Likewise.
229 * mpz/sqrt.c: Likewise.
231 * mpz/tests/reuse.c (main): Read `reps' from command line.
233 * mpf/tests/reuse.c: New file.
234 * mpf/tests/Makefile.in: Compile and run `reuse'.
236 * mpf/mul_ui.c: Disable code for removing low zero limbs.
238 * mpf/div.c: Fix condition for when vp and qp overlaps.
240 * mpf/add_ui.c: When sum equals u, copy up to prec+1 limbs.
242 * mpf/out_str.c: Don't output '\n' after exponent.
244 * mpf/add_ui.c: New special case for when U is completely cancelled.
246 Wed Apr 24 05:33:28 1996 Torbjorn Granlund <tege@noisy.tmg.se>
248 * Version 2.0 released.
250 * All files: Upfate FSF's address.
252 * Makefile.in (gmp_toc.html): New name for gmp.html.
253 (TAGS): Depend on force.
255 * mpf/tests/t-conv.c: Pass -base to mpf_set_str.
257 Sat Apr 20 03:54:06 1996 Torbjorn Granlund <tege@noisy.tmg.se>
259 * Makefile.in (ps): New target, depend on gmp.ps.
261 Fri Apr 19 14:03:15 1996 Torbjorn Granlund <tege@noisy.tmg.se>
263 * mpf/out_str.c: Print `@' before exponent, not `e'.
265 * make.bat: Update from Makefiles.
267 Thu Apr 18 01:22:05 1996 Torbjorn Granlund <tege@noisy.tmg.se>
269 * mpf/set_str.c: If parameter `base' is negative, expect exponent
270 to be decimal, otherwise in the same base as the mantissa.
272 Wed Apr 17 17:28:36 1996 Torbjorn Granlund <tege@noisy.tmg.se>
274 * mpf/set_dfl_prec.c: Don't return anything.
275 * gmp.h: Corresponding changes.
277 * mpf/set_dfl_prec.c: Use `unsigned long int' for bit counts.
278 * mpf/init2.c: Likewise.
279 * mpf/get_prc.c: Likewise.
280 * mpf/set_prc.c: Likewise.
281 * mpf/set_prc_raw.c: Likewise.
282 * mpz/popcount.c: Likewise.
283 * mpz/hamdist.c: Likewise.
284 * mpz/scan1.c: Likewise.
285 * mpz/scan0.c: Likewise.
286 * mpn/generic/popcount.c: Likewise.
287 * mpn/generic/hamdist.c: Likewise.
288 * mpn/generic/scan1.c: Likewise.
289 * mpn/generic/scan0.c: Likewise.
292 * mpf/eq.c: New file, based on mpf/diff.c.
293 * mpf/diff.c: Delete.
294 * mpf/Makefile.in: Corresponding changes.
297 * mpf/reldiff.c: New file.
298 * mpf/Makefile.in: Compile it.
299 * gmp.h: Declare mpf_reldiff.
301 * mpz/iset_d.c: New file.
302 * mpz/Makefile.in: Compile it.
303 * gmp.h: Declare mpz_init_set_d.
305 Tue Apr 16 16:28:31 1996 Torbjorn Granlund <tege@noisy.tmg.se>
307 * Makefile.in (gmp.html): Pass -acc to texi2html.
309 Mon Apr 15 16:20:24 1996 Torbjorn Granlund <tege@noisy.tmg.se>
311 * mpf/set_str.c: Switch off code for defaulting the base from the
314 * gmp.h (mp?_sign): Delete.
315 (mp?_sgn): New macros.
317 Fri Apr 12 17:23:33 1996 Torbjorn Granlund <tege@noisy.tmg.se>
319 * Makefile.in (gmp.dvi): Delete tmp.* at end of rule.
321 Wed Apr 10 22:52:02 1996 Torbjorn Granlund (tege@tiny.tmg.se)
323 * mpf/random2.c: Change of `exp' param, mp_size_t => mp_exp_t.
324 * gmp.h: Corresponding change.
326 * gmp.h (mp_bits_per_limb): Make it const.
328 Sat Mar 30 01:20:23 1996 Torbjorn Granlund <tege@noisy.tmg.se>
330 * configure.in: Re-enable recognition of with_gcc.
332 * mpf/Makefile.in (.c.o): Pass XCFLAGS.
333 * mpn/Makefile.in (.c.o): Likewise.
334 * mpz/Makefile.in (.c.o): Likewise.
335 * mpq/Makefile.in (.c.o): Likewise.
336 * mpbsd/Makefile.in (.c.o): Likewise.
337 * mpf/tests/Makefile.in (.c.o): Likewise.
338 * mpz/tests/Makefile.in (.c.o): Likewise.
339 * mpq/tests/Makefile.in (.c.o): Likewise.
341 * Makefile.in (XCFLAGS): Default to empty.
342 (FLAGS_TO_PASS): Pass on XCFLAGS.
343 (.c.o): Pass XCFLAGS.
345 * config/mt-m88110 (XCFLAGS): Define instead of CC.
346 * config/mt-sprc8-gcc (XCFLAGS): Likewise.
347 * config/mt-supspc-gcc (XCFLAGS): Likewise.
349 * configure: Don't default CC to "gcc -O2" is -with-gcc=no was
352 Mon Mar 25 01:07:54 1996 Torbjorn Granlund <tege@noisy.tmg.se>
354 * urandom.h: Test for __SVR4 in addition to __svr4__.
356 * mp_bpl.c (mp_bits_per_limb): Declare as `const'.
358 * Makefile.in (CFLAGS): `-O2' => `-O'.
359 * mpn/Makefile.in (CFLAGS): Likewise.
361 * gmp-impl.h: Get rid of obsolete field access macros.
363 * mpn/mp_bases.c (__mp_bases): 1e39 => 1e38 to work around Solaris
366 * gmp.h (__MPN): Make it work also for non-ANSI compilers.
368 Thu Mar 21 01:07:54 1996 Torbjorn Granlund <tege@noisy.tmg.se>
370 * mpf/sub.c: New special case for ediff <= 1 before generic code.
371 Simplify generic code for ediff == 0.
374 Mon Mar 11 18:24:57 1996 Torbjorn Granlund <tege@noisy.tmg.se>
376 * mpf/tests/*.c: Use ref_mpf_sub for error calculation.
377 * mpf/tests/Makefile.in: Link ref.o to all executables.
379 * mpf/tests/t-sub.c: Make u = v + 1 with 50% probability.
381 Sun Mar 10 21:03:17 1996 Torbjorn Granlund (tege@tiny.tmg.se)
383 * mpf/get_str.c: In digit development loop for fractions, change
384 loop condition from `<' to `<='.
386 Thu Mar 7 04:58:11 1996 Torbjorn Granlund <tege@tiny.tmg.se>
388 * mpn/mp_bases.c (__mp_bases): 1e100 => 1e39 to avoid overflow warning.
390 Wed Mar 6 01:10:42 1996 Torbjorn Granlund <tege@noisy.tmg.se>
392 * mpf/tests/t-sqrt.c: New file.
393 * mpf/tests/Makefile.in: Corresponding changes.
395 * mpf/sqrt.c: Special case for square root of zero.
397 * mpq/add.c: Clean up variable names.
398 * mpq/sub.c: Update from mpq/add.c.
400 * mpz/divexact.c: abs => ABS.
401 * mpz/gcd.c: Likewise. Rewrite final fixup code, to decrease
402 allocation. Misc cleanups.
404 Tue Mar 5 22:24:56 1996 Torbjorn Granlund <tege@tmg.se>
406 * mpn/configure.in: Recognize linuxoldld as a synonym for linuxaout.
408 * gmp.h (mpn_add, mpn_add_1, mpn_sub, mpn_sub_1): Add prototypes.
410 * mpn/configure.in: Use t-freebsd also for netbsd.
412 Mon Mar 4 15:13:28 1996 Torbjorn Granlund <tege@tmg.se>
414 * mpq/Makefile.in (cmp.o): Depend on longlong.h.
416 * mpq/equal.c: New file.
417 * mpq/Makefile.in: Corresponding changes.
419 * mpf/tests/t-add.c: New file.
420 * mpf/tests/t-sub.c: Renamed from t-addsub.c.
421 * mpf/tests/ref.c: New file.
422 * mpf/tests/Makefile.in: Corresponding changes.
424 * gmp-impl.h (SIZ, ABSIZ, PTR, EXP, PREC, ALLOC): New #defines.
426 Sun Mar 3 07:45:46 1996 Torbjorn Granlund <tege@tmg.se>
428 * mpf/set_str.c: In exponentialization code, allocate 3 extra
431 * mpf/get_str.c: Allocate sufficient space for tstr.
432 When calculating exp_in_base, round result down.
434 * mpf/tests/t-conv.c: New file.
435 * mpf/tests/Makefile.in: Corresponding changes.
437 * mp_bpl.c: New file.
439 * Makefile.in: Corresponding changes.
441 Sat Mar 2 06:27:56 1996 Torbjorn Granlund <tege@tmg.se>
443 * mpf/set_prc_raw.c: New file.
444 * mpf/set_prc.c: Renamed from set_prec.c.
445 * mpf/get_prc.c: New file.
446 * mpf/Makefile.in: Corresponding changes.
447 * gmp.h: Declare new functions.
449 * mpn/generic/gcdext.c: Add copyright header.
451 Fri Mar 1 01:22:24 1996 Torbjorn Granlund <tege@tmg.se>
453 * mpn/configure.in: For ppc601, search "power" before "powerpc32".
455 * mp?/Makefile.in (AR_FLAGS): New variable.
458 * make.bat: New file.
459 * mpn/msdos: New directory.
460 * mpn/msdos/asm-syntax.h: New file.
462 * mpn/Makefile.in (distclean maintainer-clean): Delete asm-syntax.h.
464 * config.sub: Recognize [ctj]90-cray.
466 * mpn/configure.in: Recognize [ctj]90-cray-unicos*.
468 * mpn/generic/gcdext.c: Don't use alloca directly, use TMP_* macros.
470 * mpn/generic/gcd.c: Split increment from use of USIZE to avoid
473 Thu Feb 29 04:11:24 1996 Torbjorn Granlund <tege@tmg.se>
475 * Makefile.in (install-info-files): Update for new install-info
478 * mpn/power/add_n.s: Rewrite.
479 * mpn/power/sub_n.s: Rewrite.
481 Wed Feb 28 01:34:30 1996 Torbjorn Granlund <tege@tmg.se>
483 * mpz/pow_ui.c: Compute allocation more aggressively for small bases.
484 * mpz/ui_pow_ui.c: Likewise.
486 * mpn/mp_bases.c (__mp_bases): Put huge value in 2nd field for index 1.
488 * mpn/generic/sqrtrem.c: sizeof (mp_limb_t) => BYTES_PER_MP_LIMB.
489 * mpn/generic/gcd.c: Likewise.
490 (SIGN_BIT): Compute differently.
492 Mon Feb 26 00:07:36 1996 Torbjorn Granlund <tege@tmg.se>
494 * All files: mp_limb => mp_limb_t, mp_limb_signed => mp_limb_signed_t.
496 * Makefile.in (install, install-bsdmp, install-info-files): Depend
497 on installdirs. chmod all installed files.
499 Sun Feb 25 01:47:41 1996 Torbjorn Granlund <tege@tmg.se>
501 * mpbsd/configure.in: Delete debugging code.
503 * All Makefile.in: Update clean targets.
505 * Makefile.in (AR_FLAGS): New variable.
509 * VERSION: Delete file.
511 * Makefile.in (installdirs): New target.
512 * mkinstalldirs: New file (from the texinfo package).
514 * Makefile.in (INSTALL, INSTALL_DATA, INSTALL_PROGRAM): New variables.
515 (MAKEINFO, MAKEINFOFLAGS, TEXI2DVI): New variables.
516 (install-info): New target.
517 (install, install-bsdmp): Depend on install-info.
518 ($(srcdir)/gmp.info): Changed from plain gmp.info; put info files
519 into source directory.
520 (distclean, mostlyclean): New targets.
521 (maintainer-clean): New name for realclean.
522 (uninstall): New target.
524 (info, dvi): New targets.
527 * Makefile.in (install, install-bsdmp): Use INSTALL_DATA.
529 * mp{n,z,f,bsd}/move-if-change: Delete.
531 * mpbsd/Makefile.in (stamp-stddefh): Delete target.
533 * Makefile.in (.c.o): Pass CFLAGS last.
534 * mpbsd/Makefile.in (.c.o): Likewise.
535 * mpf/Makefile.in (.c.o): Likewise.
536 * mpq/Makefile.in (.c.o): Likewise.
537 * mpz/Makefile.in (.c.o): Likewise.
538 * mpn/Makefile.in (.c.o): Likewise.
541 * memory.c: Change allocation error message.
543 * Makefile.in (install): Prefix gmp.h with $(srcdir).
544 (install-bsdmp): Prefix mp.h with $(srcdir).
546 * mp{n,z,f,bsd}/{configure,config.sub}: Delete.
548 * Makefile.in (gmp.dvi): Set TEXINPUTS also for 2nd tex invocation
549 (install targets): Install gmp.info-N.
551 Sat Feb 24 03:36:52 1996 Torbjorn Granlund <tege@tmg.se>
553 * mpf/get_str.c: Fix typo.
555 * mpz/legendre.c: Clarify expression with extra parens.
557 * version.c (gmp_version): Not static.
559 * mpf/iset_str.c: Properly return error code.
561 * mpf/add.c: Delete unused variables.
562 * mpf/inp_str.c: Likewise.
563 * mpq/get_d.c: Likewise.
565 * mpn/generic/dump.c: #include <stdio.h>.
566 * mpf/dump.c: Likewise.
567 * mpf/set_str.c: #include <ctype.h>.
570 * gmp.h: mpn_sqrt => mpn_sqrtrem.
572 * Makefile.in (clean, realclean): Clean in mpbsd.
573 (check): Test in mpf.
575 * mpf/Makefile.in (clean): Clean in tests.
576 * mpq/Makefile.in (clean): Clean in tests.
578 * mpf/tests/Makefile.in: New file.
579 * mpf/tests/configure.in: New file.
580 * mpf/tests/t-addsub.c: New file.
582 * mpf/sub_ui.c: Simply call mpf_sub for now.
584 * mpf/sub.c: Increase prec by 1.
585 * mpf/ui_sub.c: Likewise.
587 Fri Feb 23 00:59:54 1996 Torbjorn Granlund <tege@tmg.se>
589 * mpf/ui_sub.c: Fix typos.
591 * mpf/get_str.c: When allocating space for tmp, allow for an extra
592 limb. In code for fraction conversion, add special case for bases
593 that are a power of 2.
595 * mpf/out_str.c: Output leading "0.".
596 Default base to 10, before computing string allocation.
598 * mpf/get_str.c: Make variables for string size have type size_t.
599 * gmp.h: Corresponding change.
601 * mpf/random2.c: Allow creation of prec+1 large mantissas.
603 * mpf/add_ui.c: Don't abort if u < 0; special case for u <= 0.
604 Fix typo in MPN_COPY offset.
605 * mpf/sub_ui.c: Analogous changes.
607 * mpf/set_prec.c: Rewrite.
609 * mpf/init2.c: Compute precision as in set_prec.c.
611 * mpf/div_2exp.c: Special case for u == 0.
612 * mpf/mul_2exp.c: Likewise. Write r->_mp_size always.
614 * mpf/sqrt_ui.c: mpn_sqrt => mpn_sqrtrem.
615 * mpf/sqrt.c: Likewise. When computing new exponent, round quotient
618 * mpf/add.c: Fix typos.
619 * mpf/sub.c: Fix typos.
621 Thu Feb 22 00:24:48 1996 Torbjorn Granlund <tege@tmg.se>
623 * mpz/Makefile.in (stamp-stddefh): Delete target.
624 (test): Delete target.
625 * Makefile.in (stamp-stddefh): Delete target.
626 (cre-stddefh.o): Delete target.
627 (gmp.dvi): Set TEXINPUTS before invoking tex.
629 * cre-stddefh.c: Delete.
631 * mpz/sqrt.c: Fix typo.
633 * mpz/powm.c: Special case for mod == 0.
634 * mpz/powm_ui.c: Likewise.
636 * mpz/get_si.c: Handle -0x80000000 correctly.
638 * mpz/inp_str.c: Now retutns size_t.
639 Make it return number of bytes read or error indication.
640 * mpf/inp_str.c: Likewise.
642 * mpz/out_raw.c: Replace by mpz/out_binary.c, with modifications.
643 * mpz/inp_raw.c: Rewrite, using mpz/inp_binary as a base.
644 * mpz/inp_binary.c: Delete.
646 * mpn/Makefile.in (XCFLAGS): Remove variable.
647 (.c.o): Don't pass XCFLAGS.
648 (SFLAGS): Set to nothing.
649 (.S.o): Pass SFLAGS, not XCFLAGS.
651 * mpn/config/t-freebsd (SFLAGS): New name for XCFLAGS.
653 * mpf/out_str.c: Make return number of bytes written or error
655 * mpz/out_str.c: Likewise.
656 * gmp.h: Corresponding changes.
658 * gmp.h (__mpz_struct): mp_size_t => int.
659 (__mpq_struct): Likewise.
660 (__mpf_struct): Likewise.
661 (mp_size_t): int => long int.
663 * mpn/cray: New directory.
664 * mpn/cray/gmp-mparam.h: New file.
665 * mpn/configure.in: Recognize cray variants.
667 * Makefile.in: Set defaults for prefix, libdir, etc.
668 (install): New target.
669 (install-bsdmp): New target.
670 (gmp.html): New target.
672 * stack-alloc.c (__tmp_alloc): Cast void ptrs to char * in comparison.
674 Wed Feb 21 04:35:02 1996 Torbjorn Granlund <tege@tmg.se>
676 * gmp.h: Sort mpn declarations.
677 (mpn_gcdext): Add declaration.
679 * mpn/generic/divrem_1.c: New file.
680 * mpn/Makefile.in (divrem_1.o): New rule.
681 * configure.in (functions): Add divrem_1.
683 * mpn/generic/divmod.c: Delete file.
684 * mpn/configure.in (functions): Delete divmod.
685 * Makefile.in (divmod.o): Delete rule.
686 * gmp.h (mpn_divmod): New #define.
688 * gmp.h (mpn_next_bit_set): Delete spurious declaration.
690 * mpn/generic/divrem.c (default case): In code assigning
691 most_significant_q_limb, move reassignment of n0 into if statement.
693 * gmp.h (mpf_inp_str): Fix typo.
694 (mpf_out_str): Make prototype match reality.
695 * mpf/inp_str.c: New file.
696 * mpf/out_str.c: New file.
697 * mpf/Makefile.in: Compile new files.
699 * mpn/Makefile.in (dump.o): Fix dependency path.
700 (inlines.o): Likewise.
702 * mpn/configure.in: Make m68060 be the same as m68000. Clean up
705 Tue Feb 20 01:35:11 1996 Torbjorn Granlund <tege@tmg.se>
707 * mpn/generic/sqrtrem.c: Renamed from sqrt.
708 * mpn/configure.in (functions): Corresponding change.
709 * mpn/Makefile.in: Likewise.
710 * mpz/sqrtrem.c: Likewise.
711 * mpz/sqrt.c: Likewise.
712 * mpn/generic/perfsqr.c: Likewise.
714 * Makefile.in (clean): Also remove libmp.a.
715 Don't compile cre-conv-tab.c or mp_bases.c.
716 cre-conv-tab.c: Delete file.
719 * mpn/mp_bases.c: New file.
720 * mpn/Makefile.in: Compile mp_bases.c.
722 * mpz/set_str.c: Skip initial whitespace.
723 * mpf/set_str.c: Likewise.
724 * mpbsd/xtom.c: Likewise.
726 * gmp.h: Add missing mpz declarations.
727 Delete all formal parameter names from declarations.
729 * mpn/Makefile.in: Add dependencies for .c files.
731 * Makefile.in (check): Write recursive make calls separately, not as
733 (FLAGS_TO_PASS): New variable. Use it for most recursive makes.
735 Mon Feb 19 01:02:20 1996 Torbjorn Granlund <tege@tmg.se>
737 * mpn/Makefile.in (.S.o): Pipe cpp output to grep in order to delete
738 lines starting with #.
739 (CPP): Set to $(CC) -E to avoid gcc dependency.
741 * mpn/m68k/syntax.h (moveql): Define to moveq for MIT_SYNTAX.
743 * mpn/hppa/hppa1_1/pa7100/addmul_1.S: Fix typo in s1_ptr alignment
745 * mpn/hppa/hppa1_1/pa7100/submul_1.S: Likewise.
747 * gmp.h: Fix typos in #defines of recently added mpn functions.
749 * mpz/inp_str.c: Skip all whitespace, not just plain space.
750 * mpbsd/min.c: Likewise.
752 * mpn/configure.in (functions): Add gcdext.
753 * mpn/generic/gcdext.c: New file.
755 * mpz/legendre.c: mpz_div_2exp => mpz_tdiv_q_2exp.
757 * gmp.h: Surround mpn declarations with extern "C" { ... }.
759 * Makefile.in (check): New target.
761 * mpq/get_d.c: Update comments. Use rsize instead of dsize + N_QLIMBS
762 when possible. Add special case for nsize == 0.
764 * gmp.h (mpq_get_d): Add declaration.
765 (mpq_canonicalize): Likewise.
766 (mpq_cmp_ui): Likewise.
767 (mpf_diff): Likewise.
768 (mpf_ui_sub): Likewise.
769 (mpf_set_prec): Likewise.
770 (mpf_random2): Likewise.
772 * gmp.h (mpz_cmp_ui): New #define.
773 (mpz_cmp_si): New #define.
774 (mpq_cmp_ui): New #define.
775 (mpz_sign): New #define.
776 (mpq_sign): New #define.
777 (mpf_sign): New #define.
778 (mpq_numref): New #define.
779 (mpq_denref): New #define.
781 * mpq/set_z.c: File deleted.
782 * mpq/Makefile.in: Corresponding changes.
784 Sun Feb 18 01:34:47 1996 Torbjorn Granlund <tege@tmg.se>
786 * mpbsd/sdiv.c: Use _mp_realloc, not _mpz_realloc.
788 * mpz/inp_binary.c: Default stream to stdin.
789 * mpz/inp_str.c: Likewise.
790 * mpz/inp_raw.c: Likewise.
791 * mpz/out_binary.c: Default stream to stdout.
792 * mpz/out_raw.c: Likewise.
793 * mpz/out_str.c: Likewise.
795 * mpbsd/realloc.c: New file.
796 * mpbsd/Makefile.in: Corresponding changes.
798 * mpbsd/min.c: Rewrite (base on mpz/inp_str.c).
799 * mpbsd/mtox.c: Rewrite (base on mpz/get_str.c).
801 * mpbsd/mout.c: Rewrite (base on mpz/out_str) but make it output
802 spaces in each 10th position.
803 * mpbsd/xtom.c: Rewrite (base on mpz/set_str).
805 * mpq/tests/Makefile.in (st-cmp): New file.
806 * mpq/tests/configure.in (srcname): New file.
808 * mpz/tests/configure.in (srcname): Fix typo.
810 * mpq/cmp.c: Add check using number of significant bits, to avoid
811 general multiplication.
813 Sat Feb 17 11:58:30 1996 Torbjorn Granlund <tege@tmg.se>
815 * mpq/cmp_ui.c: Store cy_limb after the mpn_mul_1 calls.
817 * mpq/tests: New directory.
818 * mpq/tests/t-cmp.c: New file.
819 * mpq/tests/t-cmp_ui.c: New file.
821 * mpz/tests/dive.c (main): Generate zero numerator.
822 (get_random_size) : Delete.
824 * mpz/divexact.c: Add special case for 0/x.
826 * gmp.h (mpz_mod): Add declaration.
828 Fri Feb 16 18:18:39 1996 Andreas Schwab <schwab@informatik.uni-dortmund.de>
830 * mpn/m68k/*: Rewrite code not to use the INSN macros.
831 (L): New macro to properly prefix local labels for ELF.
833 Fri Feb 16 00:20:56 1996 Torbjorn Granlund <tege@tmg.se>
835 * gmp-impl.h (ieee_double_extract): Use plain `unsigned int' for
837 * mpn/generic/inlines.c (_FORCE_INLINES): New #define. Delete
838 conditional __GNUC__.
839 * gmp.h (mpn_add, mpn_sub, mpn_add_1, mpn_sub_1):
840 Only define these if __GNUC__ || _FORCE_INLINES.
841 * mpf/random2.c: Add missing parameter in non-ANSI header.
842 * mpn/generic/gcd.c (SIGN_BIT): Do as #define to work around bug
844 * mpq/get_d.c: #define N_QLIMBS.
845 * mpz/divexact.c: Obscure division by 0 to silent compiler warnings.
846 * stack-alloc.c: Cast void* pointer to char* before doing arithmetic
849 * Makefile.in (mpbsd/libmpbsd.a): New rule.
850 * configure.in (configdirs): Add mpbsd.
852 * gmp.h: Add declarations for a few missing mpn functions.
854 * Makefile.in (libmp.a): New rule.
856 * mpbsd/mdiv.c: #include "dmincl.c", not "mpz_dmincl.c"
857 * gmp.h: Move #define of __GNU_MP__ into the `#if __GNU_MP__' block.
858 * mp.h: Likewise. Update typedefs from gmp.h.
859 * mpbsd/configure.in: New file.
860 * mpbsd/Makefile.in: New file.
861 * mpbsd/configure: Link to master configure.
862 * mpbsd/config.sub: Link to master config.sub.
864 * Makefile.in: Set RANLIB_TEST.
865 * (libgmp.a): Use it.
866 * (libgmp.a): Do ranlib before moving the libgmp.a to the build
868 * mp?/Makefile.in: Don't use or set RANLIB.
870 Thu Feb 15 16:38:41 1996 Torbjorn Granlund <tege@tmg.se>
872 * mpz/add_ui.c: MP_INT => mpz_t.
873 * mpz/cmp_ui.c: Likewise.
874 * mpz/fac_ui.c: Likewise.
875 * mpz/inp_binary.c: Likewise.
876 * mpz/inp_raw.c: Likewise.
877 * mpz/legendre.c: Likewise.
878 * mpz/jacobi.c: Likewise.
879 * mpz/out_binary.c: Likewise.
880 * mpz/out_raw.c: Likewise.
881 * mpz/random2.c: Likewise.
882 * mpz/random.c: Likewise.
883 * mpz/realloc.c: Likewise.
885 * mpz/legendre.c: __mpz_2factor(X) => mpz_scan1(X,0),
886 __mpz_odd_less1_2factor => mpz_scan1(X,1).
887 * mpz/ntsup.c: File deleted.
888 * mpz/Makefile.in: Corresponding changes.
890 * mpz/pprime_p: Use mpz_scan1 to avoid looping.
892 * mpz/fac_ui.c: Type of `k' and `p' is `unsigned long'.
893 * mpz/pprime_p.c: Pass long to *_ui functions.
894 * mpz/gcdext.c: Likewise.
895 * mpz/fdiv_r_2exp.c: Likewise.
896 * mpz/fac_ui.c: Likewise.
898 * mpz/powm.c: Don't use mpn_rshift when mod_shift_cnt is 0.
900 * mpz/tests/Makefile.in (st-sqrtrem): Fix typo.
902 * mpz/cmp_ui.c: #undef mpz_cmp_ui.
903 * mpz/cmp_si.c: #undef mpz_cmp_si.
904 * gmp.h (mpz_cmp_ui): New #define.
905 (mpz_cmp_si): New #define.
907 Wed Feb 14 22:11:24 1996 Torbjorn Granlund <tege@tmg.se>
909 * gmp.h: Test __cplusplus in addition to __STDC__.
910 * gmp-impl.h: Likewise.
912 * gmp.h: Surround declarations with extern "C" { ... }.
914 Tue Feb 13 15:20:45 1996 Torbjorn Granlund <tege@tmg.se>
916 * mpz/fdiv_r_2exp.c: Use MPN_NORMALIZE.
917 * mpz/tdiv_r_2exp.c: Likewise.
919 * mpz/fdiv_r_2exp.c: New file.
920 * mpz/fdiv_q_2exp.c: New file.
921 * mpz/tdiv_r_2exp.c: Renamed from mpz/mod_2exp.c.
922 * mpz/tdiv_q_2exp.c: Renamed from mpz/div_2exp.c
923 * mpz/Makefile.in: Corresponding changes.
925 * mpz/scan0.c,scan1.c: New files.
926 * mpz/Makefile.in: Compile them.
928 * gmp.h (mpn_normal_size): Delete.
930 * config.guess: Update from Cygnus version.
932 * mpn/m68k/rshift.S: Use INSN2 macro for lea instructions.
933 * mpn/m68k/lshift.S: Likewise.
935 * mpn/configure.in: Fix configuration for plain 68000.
937 Mon Feb 12 01:06:06 1996 Torbjorn Granlund <tege@tmg.se>
939 * mpz/tests/t-powm.c: Generate negative BASE operand.
941 * mpz/powm.c: Make result always positive.
943 Sun Feb 11 01:44:56 1996 Torbjorn Granlund <tege@noisy.tmg.se>
945 * mpz/tests/*.c: Add t- prefix.
946 * mpz/tests/Makefile.in: Corresponding changes.
947 * mpz/tests/configure.in: Update srctrigger.
949 * mpz/tests/gcd.c: Generate negative operands.
950 * mpz/tests/gcd2.c: Likewise.
952 * mpz/gcdext.c: At end, if G is negative, negate all G, S, and T.
954 Thu Feb 8 17:16:12 UTC 1996 Ken Weber <kweber@mat.ufrgs.br>
956 * mp{z,n}/gcd.c: Change mpn_gcd interface.
958 * gmp.texi: update documentation.
960 Mon Feb 7 23:58:43 1996 Andreas Schwab <schwab@informatik.uni-dortmund.de>
962 * mpn/m68k/{lshift,rshift}.S: New files.
963 * mpn/m68k/syntax.h: New ELF_SYNTAX macros.
964 (MEM_INDX, R, PROLOG, EPILOG): New macros.
965 * mpn/m68k/*.S: Use R macro with register name. Use PROLOG and EPILOG
966 macros. Rename `size' to `s_size' or s1_size to avoid clash with ELF
968 * mpn/configure.in: New target m68k-*-linux*.
970 Wed Feb 7 07:41:31 1996 Torbjorn Granlund <tege@noisy.tmg.se>
972 * Makefile.in (cre-conv-tab): Workaround for SunOS make.
974 * mpz/tests/reuse.c: New file.
975 * mpz/tests/Makefile.in: Handle reuse.c.
977 Tue Feb 6 11:56:24 UTC 1996 Ken Weber <kweber@mat.ufrgs.br>
979 * mpz/gcd.c: Fix g->size when one op is 0 and g == other op.
981 Tue Feb 6 01:36:39 1996 Torbjorn Granlund <tege@noisy.tmg.se>
983 * gmp.h (mpz_divexact): Delete parameter names.
984 (mpz_lcm): Delete spurious declaration.
986 * mpz/dmincl.c: Fix typo.
988 Mon Feb 5 01:11:56 1996 Torbjorn Granlund <tege@noisy.tmg.se>
990 * mpn/generic/gcd.c (gcd_2): Declare consistently.
992 * mpz/tdiv_q.c: Optimize division by a single-limb divisor.
993 * mpz/dmincl.c: Likewise.
995 * mpz/add.c: Use MPN_NORMALIZE instead of mpn_normal_size.
996 * mpz/sub.c: Likewise.
997 * mpn/generic/sqrt.c: Likewise.
999 * mpn/tests/{add_n,sub_n,lshift,rshift}.c: Put garbage in the
1002 Fri Feb 2 02:21:27 1996 Torbjorn Granlund <tege@noisy.tmg.se>
1004 * mpz/{jacobi.c,legendre.c,ntsup.c,invert.c}: New files.
1005 * mpz/Makefile.in: Compile them.
1007 * mpn/Makefile.in (INCLUDES): Don't search in `generic'.
1009 Thu Feb 1 02:15:11 1996 Torbjorn Granlund <tege@noisy.tmg.se>
1011 Change from Ken Weber:
1012 * mpz/divexact.c: Make it work when quot is identical to either input.
1014 * mpf/ui_sub.c: New file.
1015 * mpf/Makefile.in: Compile it.
1017 * gmp-impl.h (MPZ_TMP_INIT): alloca -> TMP_ALLOC.
1018 * mpz/{c,f}div_{q,qr,r}.c: Use TMP_DECL/TMP_MARK/TMP_FREE since
1019 these use MPZ_TMP_INIT.
1020 * mpz/mod.c: Likewise.
1021 * mpq/{add,sub}.c: Likewise.
1022 * mpq/canonicalize: Likewise.
1024 * mpq/{add,sub,mul,div}.c: Use mpz_divexact. MP_INT -> mpz_t.
1025 * mpq/canonicalize.c: Likewise.
1027 Wed Jan 31 01:45:00 1996 Torbjorn Granlund <tege@noisy.tmg.se>
1029 * mpn/generic/gcd.c: Misc changes from Ken.
1031 * mpz/tests/gcd2.c: New file.
1032 * mpz/tests/Makefile.in: Handle gcd2.c.
1034 * mpn/generic/gcd.c (mpn_gcd): When GCD == ORIG_V, return vsize,
1035 not orig_vsize. Fix parameter declaration.
1037 * mpz/mod_ui.c: Delete file.
1038 * mpz/Makefile.in: Don't try to compile mod_ui.
1040 * mpz/cdiv_*_ui.c): Make them work right.
1041 * gmp.h: Declare cdiv*.
1043 Tue Jan 30 02:22:56 1996 Torbjorn Granlund <tege@noisy.tmg.se>
1045 * mpz/{cdiv_q.c,cdiv_q_ui.c,cdiv_qr.c,cdiv_qr_ui.c,cdiv_r.c,
1046 cdiv_r_ui.c,cdiv_ui.c}: New files.
1047 * mpz/Makefile.in: Compile them.
1049 * All files: Make file permissions right.
1051 Changes from Ken Weber:
1052 * mpn/generic/accelgcd.c: Delete.
1053 * mpn/generic/bingcd.c: Delete.
1054 * mpn/generic/numbits.c: Delete.
1055 * mpn/generic/gcd.c: New file.
1056 * mpn/configure.in (functions): Update accordingly.
1057 * mpz/divexact.c: New file.
1058 * mpz/Makefile.in: Compile divexact.c.
1059 * mpz/gcd.c: Rewrite to accommodate for gcd changes in mpn.
1060 * gmp.h: declare new functions, delete obsolete declarations.
1061 * mpz/tests/dive.c: New file.
1062 * mpz/tests/Makefile.in: Handle dive.c.
1064 Mon Jan 29 03:53:24 1996 Torbjorn Granlund <tege@noisy.tmg.se>
1066 * mpz/random.c: Handle negative SIZE parameter.
1068 * mpz/tests/tdiv(_ui).c: New name for tst-dm(_ui).c.
1069 * mpz/tests/tst-mdm(_ui).c: Delete.
1070 * mpz/tests/fdiv(_ui).c: New test based in tst-mdm(_ui).
1071 * mpz/tests/*.c: Get rid of tst- prefix for DOS 8+3 naming.
1072 * mpz/tests/Makefile.in: Corresponding changes.
1073 * mpz/tests/configure.in: Update srctrigger.
1075 * mpn/generic/divmod.c: Update from divrem.
1076 * mpn/generic/divrem.c: Misc cleanups.
1078 Sun Jan 28 03:25:08 1996 Torbjorn Granlund <tege@noisy.tmg.se>
1080 * All files: Use new TMP_ALLOC interface.
1082 * mpz/powm_ui.c: Make Jan 25 changes to powm.c also here.
1084 * mpz/tests/powm_ui.c: New file.
1085 * mpz/tests/Makefile.in: Add rules for tst-powm and tst-powm_ui.
1087 * Makefile.in: Update dependency list.
1088 * mpf/Makefile.in: Likewise.
1089 * mpz/Makefile.in: Likewise.
1090 * mpq/Makefile.in: Likewise.
1091 * Makefile.in: Set RANLIB simply to ranlib, and allow configure
1094 * mpz/Makefile.in (conf): Delete spurious target.
1095 (mp_bases.c): Delete.
1096 (cre-conv-tab rules): Delete.
1098 * Makefile.in (cre-conv-tab): Greatly simplify.
1100 Sat Jan 27 13:38:15 1996 Torbjorn Granlund <tege@noisy.tmg.se>
1102 * stack-alloc.c: New file.
1103 * stack-alloc.h: New file.
1105 * gmp.h (__gmp_inline): Define using __inline__.
1107 Thu Jan 25 00:28:37 1996 Torbjorn Granlund <tege@noisy.tmg.se>
1109 * mpn/generic/scan0.c: New file.
1110 * mpn/generic/scan1.c: Renamed from next_bit.c.
1111 * mpn/configure.in (functions): Include scan0 and scan1.
1113 * mpn/m68k/*: #include sysdep.h. Use C_GLOBAL_NAME.
1115 * configure: Update from Cygnus version.
1116 * config.guess: Likewise.
1117 * config.sub: Likewise.
1118 * configure: Pass --nfp to recursive configures.
1120 * mpz/tests/tst-*.c: Adjust SIZE and reps.
1122 * mpz/powm.c: Move esize==0 test earlier.
1123 In final reduction of rp,rsize, don't call mpn_divmod unless
1124 reduction is really needed.
1126 * mpz/tests/tst-powm.c: Fix thinko in checking code.
1128 * All files: Get rid of `__' prefix from mpn_* calls and declarations.
1129 * gmp.h: #define __MPN.
1130 * gmp.h: Use __MPN in #defines for mpn calls.
1132 * mpn/generic/mul_n.c: Prepend `i' to internal routines.
1133 * gmp-impl.h: Add #defines using __MPN for those internal routines.
1135 * mpn/generic/sqrt.c: Change call to mpn_mul to mpn_mul_n.
1137 Wed Jan 24 13:28:19 1996 Torbjorn Granlund <tege@noisy.tmg.se>
1139 * mpn/sparc32/udiv_fp.S: New name for udiv_qrnnd.S.
1140 * mpn/sparc32/udiv_nfp.S: New name for v8/udiv_qrnnd.S.
1141 * mpn/sparc32/v8/supersparc: New directory.
1142 * mpn/sparc32/v8/supersparc/udiv.S: New file.
1144 Tue Jan 23 01:10:11 1996 Torbjorn Granlund <tege@noisy.tmg.se>
1146 This major contribution is from Ken Weber:
1147 * mpn/generic/accelgcd.c: New file.
1148 * mpn/generic/bdivmod.c: New file.
1149 * mpn/generic/bingcd.c: New file.
1150 * mpn/generic/gcd_1.c: Rewrite.
1151 * mpn/generic/numbits.c: New file (to go away soon).
1152 * mpz/gcd.c: Rewrite.
1153 * mpz/tests/tst-gcd.c (SIZE): Now 128.
1154 * gmp.h: Declare new functions.
1155 * mpn/configure.in (functions): List new files.
1156 * gmp-impl.h (MPN_SWAP): Delete.
1157 (MPN_LESS_BITS_LIMB, MPN_LESS_BITS, MPN_MORE_BITS): Delete.
1158 (MPN_COMPL_INCR, MPN_COMPL): Delete.
1160 Mon Jan 22 02:04:59 1996 Torbjorn Granlund <tege@noisy.tmg.se>
1162 * gmp.h (mpn_name): New #define.
1164 * mpn/m88k/mc88110/addmul_1.s: New file.
1165 * mpn/m88k/mc88110/add_n.S: New file.
1166 * mpn/m88k/mc88110/sub_n.S: New file.
1168 * mpn/m88k/sub_n.s: Correctly initialize carry.
1170 * mpn/sparc32/{add_n.S,sub_n.S,lshift.S,rshift.S): `beq' => `be'.
1172 Sun Jan 21 00:04:35 1996 Torbjorn Granlund <tege@noisy.tmg.se>
1174 * mpn/sparc64/addmul_1.s: New file.
1175 * mpn/sparc64/submul_1.s: New file.
1176 * mpn/sparc64/rshift.s: New file.
1178 Sat Jan 20 00:32:54 1996 Torbjorn Granlund <tege@noisy.tmg.se>
1180 * mpz/iset.c: Fix typo introduced Dec 25.
1182 Wed Jan 17 13:16:44 1996 Torbjorn Granlund <tege@noisy.tmg.se>
1184 * config/mt-sprc8-gcc: New name for mt-sparc8-gcc.
1185 * config/mt-sparcv8-gcc: Delete.
1186 * configure.in: Corresponding changes.
1188 Tue Jan 16 16:31:01 1996 Torbjorn Granlund <tege@noisy.tmg.se>
1190 * gmp-impl.h: #include alloca.h when necessary.
1192 * longlong.h: Test __alpha instead of __alpha__, since the former
1193 is the standard symbol.
1195 Mon Jan 15 18:06:57 1996 Torbjorn Granlund <tege@noisy.tmg.se>
1197 * mpn/sparc64/mul_1.s: Swap operands of mulx instructions.
1198 * mpn/sparc64/lshift.s: New file.
1200 Fri Dec 29 17:34:03 1995 Torbjorn Granlund <tege@noisy.tmg.se>
1202 * mpn/x86/pentium/add_n.S: Get rid of #defines for register names.
1203 * mpn/x86/pentium/sub_n.S: Likewise.
1205 Thu Dec 28 03:16:57 1995 Torbjorn Granlund <tege@noisy.tmg.se>
1207 * mpn/x86/pentium/mul_1.S: Rework loop to avoid AGI between update
1208 of loop induction variable and load insn at beginning of loop.
1209 * mpn/x86/pentium/addmul_1.S: Likewise.
1210 * mpn/x86/pentium/submul_1.S: Likewise.
1212 Mon Dec 25 23:22:55 1995 Torbjorn Granlund <tege@noisy.tmg.se>
1214 * All files: Prefix user-visible structure fields with _mp_.
1216 Fri Dec 22 20:42:17 1995 Torbjorn Granlund <tege@noisy.tmg.se>
1218 * mpn/configure.in (m68k configs): Terminate path variable with
1221 Fri Dec 22 03:29:33 1995 Torbjorn Granlund <tege@noisy.tmg.se>
1223 * mpn/sparc32/add_n.S: Update from sub_n.S to fix bugs, and to
1226 * mpn/configure.in (m68k configs): Update #include path for new
1227 mpn directory organization.
1229 Tue Dec 12 02:53:02 1995 Torbjorn Granlund <tege@noisy.tmg.se>
1231 * gmp.h: Prefix all structure field with _mp_.
1232 * gmp-impl.h: Define access macros for these fields.
1234 Sun Dec 10 00:47:17 1995 Torbjorn Granlund <tege@noisy.tmg.se>
1236 * mpn/alpha/addmul_1.s: Prefix labels with `.'.
1237 * mpn/alpha/submul_1.s: Likewise.
1238 * mpn/alpha/[lr]shift.s: Likewise.
1239 * mpn/alpha/udiv_qrnnd.S: Likewise.
1240 * mpn/alpha/ev5/[lr]shift.s: Likewise.
1242 * mpn/alpha/ev5/lshift.s: Fix typos.
1244 Fri Dec 1 14:28:20 1995 Torbjorn Granlund <tege@noisy.tmg.se>
1246 * mpn/Makefile.in (.SUFFIXES): Define.
1248 Wed Nov 29 23:11:57 1995 Torbjorn Granlund <tege@noisy.tmg.se>
1250 * mpn/sparc64/{add_n.s, sub_n.s}: New files.
1252 Tue Nov 28 06:03:13 1995 Torbjorn Granlund <tege@noisy.tmg.se>
1254 * mpn/x86/syntax.h: Handle ELF_SYNTAX.
1255 Rename GAS_SYNTAX => BSD_SYNTAX.
1257 * mpn/configure.in: Handle linuxelf and SysV for x86 variants.
1259 Mon Nov 27 01:32:12 1995 Torbjorn Granlund <tege@noisy.tmg.se>
1261 * mpn/hppa/hppa1_1/pa7100/submul_1.S: New file.
1263 Sun Nov 26 04:30:47 1995 Torbjorn Granlund <tege@noisy.tmg.se>
1265 * mpn/hppa/hppa1_1/pa7100/addmul_1.S: New file.
1267 * mpn/sparc32/add_n.S: Rewrite to use 64 bit loads/stores.
1268 * mpn/sparc32/sub_n.S: Likewise.
1270 Fri Nov 17 00:18:46 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1272 * mpn/configure.in: Handle m68k on NextStep.
1274 Thu Nov 16 02:30:26 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1276 * mpn: Reorganize machine-specific directories.
1277 * mpn/configure.in: Corresponding changes.
1278 (sh, sh2): Handle these.
1279 (m68k targets): Create asm-syntax.h.
1281 Thu Nov 9 02:20:50 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1283 * mpn/generic/mul_n.c (____mpn_sqr_n): Delete code that calls abort.
1284 (____mpn_mul_n): Likewise.
1286 Tue Nov 7 03:25:12 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1288 * mpf/get_str.c: In exponentiation code (two places), don't swap
1289 input and output areas when calling mpn_mul_1.
1290 * mpf/set_str.c: Likewise.
1292 Fri Nov 3 02:35:58 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1294 * mpf/Makefile.in: Make sure all objects are listed in dependency list;
1295 delete spurious entries.
1297 * mpf/mul.c: Handle U or V being 0. Allow prec+1 for result precision.
1299 * mpf/set_prec.c: New computation of limb precision.
1300 * mpf/set_dfl_prec.c: Likewise.
1302 * mpf/random2.c: Fix typo computing exp.
1303 * mpf/get_str.c: In (uexp > usize) case, set n_limbs as a function of
1304 the user-requested number of digits, n_digits.
1306 Thu Nov 2 16:25:07 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1308 * mpn/generic/divrem.c (case 2): Don't move np vector back, it is
1310 (default case): Put most significant limb from np in new variable n2;
1311 decrease size argument for MPN_COPY_DECR; use n2 instead of np[dsize].
1313 Wed Nov 1 02:59:53 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1315 * mpn/sparc/[lr]shift.S: New files.
1317 Tue Oct 31 00:08:12 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1319 * mpz/gcd_ui.c: Set w->size unconditionally when v is zero.
1321 * gmp-impl.h (assert): Delete definition.
1323 * mpf/sub.c: Delete all assert calls. Delete variable `cy'.
1325 * mpf/neg.c: Use prec+1 as precision. Optimize for when arguments
1327 * mpf/abs.c: Likewise.
1328 * mpf/{set,neg,abs}.c: Make structure and variable names similar.
1330 Mon Oct 30 12:45:26 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1332 * mpf/random2.c (random): Test __SVR4 in addition to __svr4__.
1333 * mpn/generic/random2.c (random): Likewise.
1335 Sun Oct 29 01:54:28 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1337 * mpf/div.c: Special handle U or V being 0.
1339 * mpf/random2.c: New file.
1341 * longlong.h (i860 rshift_rhlc): Define.
1342 (i960 udiv_qrnnd): Define.
1343 (i960 count_leading_zeros): Define.
1344 (i960 add_ssaaaa): Define.
1345 (i960 sub_ddmmss): Define.
1346 (i960 rshift_rhlc): Define.
1348 Sat Oct 28 19:09:15 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1350 * mpn/pentium/rshift.S: Fix and generalize condition for when to use
1351 special code for shift by 1.
1352 * mpn/pentium/lshift.S: Likewise.
1354 Thu Oct 26 00:02:56 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1356 * gmp.h: #undef __need_size_t.
1357 * mp.h: Update from gmp.h.
1359 Wed Oct 25 00:17:27 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1361 * mpf/Makefile.in: Compile set_prec.c.
1362 * mpf/realloc.c: Delete this file.
1363 * mpf/Makefile.in: Delete mentions of realloc.c.
1365 * gmp.h (__mpf_struct): Get rid of `alloc' field.
1366 * mpf/clear.c: Likewise.
1367 * mpf/init*.c: Likewise.
1368 * mpf/set_prec.c: Likewise.
1369 * mpf/iset*.c: Likewise.
1371 * mpf/iset_str.c: New file.
1373 * mpn/configure.in: Handle pyramid.
1375 * mpf/set.c: Use prec+1 as precision.
1377 * mpf/set_prec.c: New file.
1379 Tue Oct 24 00:56:41 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1381 * mpn/generic/divrem.c: New file. Will replace mpn/generic/divmod.c
1382 when rest of source is converted.
1383 * mpn/configure.in (functions): Add `divrem'
1384 * mpn/generic/set_str.c: Never call __mpn_mul_1 with zero size.
1386 * mpf/get_str.c: Completely rewritten.
1387 * mpf/add.c: Fix several problems.
1388 * mpf/sub.c: Compare operands from most significant end until
1389 first difference, exclude skipped limbs from computation.
1390 Accordingly simplify normalization code.
1391 * mpf/set_str.c: Fix several problems.
1392 * mpf/dump.c: New file.
1393 * mpf/Makefile.in: Compile dump.c.
1394 * mpf/init2.c: Set prec field correctly.
1396 Sun Oct 22 03:02:09 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1398 * cre-conv-tab.c: #include math.h; don't declare log and floor.
1400 Sat Oct 21 23:04:10 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1402 * mpf/mul_ui.c: Handle U being 0.
1404 Wed Oct 18 19:39:27 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1406 * mpn/generic/set_str.c: Correctly handle input like "000000000000".
1409 Tue Oct 17 15:14:13 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1411 * longlong.h: Define COUNT_LEADING_ZEROS_0 for machines where
1414 Mon Oct 16 19:14:43 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1416 * mpf/add.c: Rewrite.
1417 * mpf/set_str.c: New file. Needs more work.
1419 Sat Oct 14 00:14:04 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1421 * mpf/div_2exp.c: Vastly simplify.
1422 * mpf/mul_2exp.c: Likewise.
1424 * mpf/sub.c: Rewrite.
1426 * gmp-impl.h (udiv_qrnnd_preinv2gen): Terminate comment.
1428 * mpf/dump.c: Free allocated memory.
1430 * gmp-impl.h (assert): Define.
1432 Wed Oct 11 13:31:00 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1434 * mpn/pentium/rshift.S: Install new code to optimize shift-by-1.
1436 Tue Oct 10 00:37:21 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1438 * mpn/pentium/lshift.S: Install new code to optimize shift-by-1.
1440 * mpn/powerpc32/{lshift.s,rshift.s}: New files.
1442 * configure.in: Fix typo.
1444 Sat Oct 7 08:17:09 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1446 * longlong.h (smul_ppmm): Correct type of __m0 and __m1.
1448 Wed Oct 4 16:31:28 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1450 * mpn/configure.in: Handle alphaev5.
1451 * mpn/ev4: New name for alpha subdir.
1452 * mpn/ev5: New subdir.
1453 * mpn/ev5/lshift.s: New file.
1455 Tue Oct 3 15:06:45 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1457 * mpn/alpha/mul_1.s: Avoid static increments of pointers; use
1458 corresponding offsets in ldq and stq instructions instead.
1459 (Loop): Swap cmpult and stq to save one cycle on EV5.
1461 * mpn/tests/{add_n.s,sub_n.s,lshift.s,rshift.s,mul_1.s,addmul_1.s,
1462 submul_1.s}: Don't check results if NOCHECK is defined.
1464 Mon Oct 2 11:40:18 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1466 * longlong.h (mips umul_ppmm [32 and 64 bit versions]):
1467 Make new variants, based on GCC version number, that use `l' and `h'
1468 constraints instead of explicit mflo and mfhi instructions
1470 Sun Oct 1 00:17:47 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1472 * mpn/mc88100/add_n.s: Decrease unrolling factor from 16 to 8.
1473 * mpn/mc88100/sub_n.s: Likewise.
1475 * config/mt-m88110: New file.
1476 * configure.in: Use it.
1478 * mpn/mc88110/mul_1.s: Fix thinko.
1480 Sat Sep 30 21:28:19 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1482 * mpz/set_d.c: Declare `size' at function start.
1484 * experimental: New directory for mpx and mpz2.
1486 * mpz/tdiv_q.c: Clarify comments.
1487 * mpz/{mod.c,mod_ui.c}: New file, for math mod function.
1489 * mpn/sh2/{mul_1.s,addmul_1.s,submul_1.s}: New files.
1491 * mpn/sh/{add_n.s,sub_n.s}: New files.
1493 * mpn/pyr/{add_n.s,sub_n.s,mul_1.s,addmul_1.s}: New files.
1495 * mpn/i960/{add_n.s,sub_n.s}: New files.
1497 * mpn/alpha/addmul_1.s (Loop): Move decrement of r18 to before umulh,
1498 to save cycles on EV5.
1499 * mpn/alpha/submul_1.s: Ditto.
1500 * mpn/alpha/mul_1.s: Ditto.
1502 Thu Sep 28 02:48:59 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1504 * gmp.h (mp_limb, mp_limb_signed): Define as `long long' if
1505 _LONG_LONG_LIMB is defined.
1507 * longlong.h (m88110): Test __m88110__, not __mc88110__
1509 * mpn/mc88110/mul_1.s: Rewrite.
1511 Tue Sep 26 23:29:05 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1513 * config.sub: Update from current Cygnus version.
1515 * mpn/configure.in: Recognize canonical m88*, not mc88*.
1517 Fri Sep 22 14:58:05 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1519 * mpz/set_d.c: New file.
1520 * mpz/Makefile.in: Build new files.
1522 * mpq/get_d.c: Replace usage of scalbn with ldexp.
1524 * mpn/{vax,i386}/gmp-mparam.h: New files.
1525 * gmp-impl.h (ieee_double_extract): Define here.
1526 * mpf/set_d.c (ieee_double_extract): Not here.
1528 Thu Sep 21 00:56:36 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1530 * longlong.h (C umul_ppmm): Use UWtype, not USItype for temps.
1531 (udiv_qrnnd): For cases implemented with call to __udiv_qrnnd,
1532 protect with new symbol LONGLONG_STANDALONE.
1533 (68000 umul_ppmm): Use %# prefix for immediate constants.
1535 Wed Sep 20 15:36:23 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1537 * mpn/generic/divmod_1.c: Handle
1538 divisor_limb == 1 << (BITS_PER_MP_LIMB - 1)
1539 specifically also when normalization_steps != 0.
1541 Mon Sep 18 15:42:30 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1543 * mpq/get_d.c: New file.
1545 Sun Sep 17 02:04:36 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1547 * longlong.h (pyr): Botch up for now.
1549 Sat Sep 16 00:11:50 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1551 * mpn/clipper/mul_1.s: New file.
1552 * mpn/clipper/add_n.s: New file.
1553 * mpn/clipper/sub_n.s: New file.
1554 * mpn/configure.in: Handle clipper*-*-*.
1556 * mpn/configure.in: Recognize rs6000-*-*.
1558 Fri Sep 15 00:41:34 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1560 * mpn/alpha/add_n.s: New file.
1561 * mpn/alpha/sub_n.s: New file.
1563 * mpn/mips3: New name for mpn/r4000.
1564 * mpn/mips2: New name for mpn/r3000.
1565 * mpn/configure.in: Corresponding changes.
1567 * mpn/generic/perfsqr.c (primes): Delete.
1568 (residue_map): Delete.
1570 Thu Sep 14 00:07:58 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1572 * mpn/r3000/sub_n.s: Fix typo.
1574 * dm_trunc.c: Delete spurious file.
1576 * mpz/out_binary.c: Fix typo.
1578 * mpn/configure.in (per-target): Make mips*-*-irix6* imply r4000.
1580 * gmp-impl.h: For sparc and sgi, include alloca.h.
1582 * mpn/z8000/mul_1.s: Replace `test r' with `and r,r'. Replace
1583 `ldk r,#0' with `xor r,r'.
1585 Wed Sep 6 00:58:38 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1587 * mpz/inp_binary.c: New file.
1588 * mpz/out_binary.c: New file.
1589 * mpz/Makefile.in: Build new files.
1591 Tue Sep 5 22:53:51 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1593 * gmp.h (__mpz_struct): Change `long int' => `mp_size_t' for alloc
1596 Sat Sep 2 17:47:59 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1598 * mpn/r4000/{add_n.s,sub_n.s}: Optimize away some pointer arithmetic.
1599 * mpn/r3000/{add_n.s,sub_n.s,lshift.s,rshift.s}: New files,
1600 derived from r4000 code.
1602 Fri Sep 1 05:35:52 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1604 * mpn/r3000/mul_1.s: Fix typo.
1606 * mpn/powerpc32: Fix some old vs new mnemonic issues.
1608 * mpn/powerpc32/{add_n.s,sub_n.s}: New files.
1609 * mpn/r4000/{add_n.s,sub_n.s,lshift.s,rshift.s}: New files.
1611 Wed Aug 30 10:43:47 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1613 * mpn/r3000/mul_1.s ($LC1): Use addiu for immediate add.
1614 * mpn/r4000/{mul_1.s,addmul_1.s,submul_1.s}: New files.
1616 * config.guess: Update to latest FSF revision.
1618 Mon Aug 28 02:18:13 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1620 * mpz/out_str.c: Cast str to char * in fputs call.
1622 * gmp-impl.h: Define UQItype, SItype, and USItype also
1625 Fri Aug 25 01:45:04 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1627 * mpn/i386/syntax.h: Renamed from asm-syntax.h.
1628 * mpn/mc68020/syntax.h: Renamed from asm-syntax.h.
1629 * mpn/configure.in: Corresponding changes.
1631 Sun Aug 13 19:20:04 1995 Torbjorn Granlund <tege@bozo.tmg.se>
1633 * mpn/generic/random2.c: Test __hpux, not hpux.
1635 Sat Apr 15 20:50:33 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
1637 * mpn/sparc/add_n.S: Make it work for PIC.
1638 * mpn/sparc/sub_n.s: Likewise.
1639 * mpn/sparc8/addmul_1.S: Likewise.
1640 * mpn/sparc8/mul_1.S: Likewise.
1641 * mpn/i386/add_n.S: Likewise.
1642 * mpn/i386/sub_n.S: Likewise.
1644 Thu Apr 13 23:15:03 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
1646 * mpn/configure.in: Don't search power subdir for generic ppc configs.
1647 Add some ppc cpu-specific configs. Misc clean up.
1649 Mon Apr 10 00:16:35 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
1651 * mpz/ui_pow_ui.c: Delete spurious code to handle negative results.
1653 Sun Apr 9 12:38:11 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
1655 * longlong.h (SPARC v8 udiv_qrnnd): Generate remainder in C,
1658 * mpn/generic/sqrt.c (SQRT): Test for __SOFT_FLOAT.
1660 Tue Mar 28 00:19:52 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
1662 * mpn/generic/hamdist.c (popc_limb): Make Mar 16 change here too.
1664 Fri Mar 17 23:29:22 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
1666 * longlong.h (SH umul_ppmm): Define.
1668 Thu Mar 16 16:40:44 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
1670 * mpn/generic/popcount.c (popc_limb): Rearrange 32 bit case
1673 Fri Mar 10 20:03:49 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
1675 * mpn/powerpc32/mul_1.s: Clear cy before entering loop.
1676 Rearrange loop to save a cycle.
1677 * mpn/powerpc32/addmul_1.s: New file.
1678 * mpn/powerpc32/submul_1.s: New file.
1680 Fri Feb 17 22:44:45 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
1682 * mpn/configure.in: Set target_makefile_frag for freebsd
1684 * mpn/config/t-freebsd: New file.
1685 * mpn/Makefile.in: Add #### for frag insertion.
1686 (XCFLAGS): Clear by default.
1687 (.c.o, .S.o rules): Pass XCFLAGS.
1689 Tue Feb 7 16:27:50 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
1691 * longlong.h (68000 umul_ppmm): Merge improvements from henderson.
1693 Tue Jan 24 04:23:20 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
1695 * longlong.h (default umul_ppmm): Store input parameters in temporaries
1696 to avoid reading them twice.
1697 (default smul_ppmm): New definition.
1699 Thu Dec 29 04:20:07 1994 Jim Meyering (meyering@comco.com)
1701 * generic/perfsqr.c (__mpn_perfect_square_p): Remove declaration
1703 * generic/pre_mod_1.c (__mpn_preinv_mod_1): Likewise.
1704 * mpz/powm.c (pow): Likewise.
1706 * mpz/and.c (mpz_and): Use {} instead of `;' for empty else clause
1707 to placate `gcc -Wall'.
1708 * mpz/ior.c (mpz_ior): Likewise.
1710 Wed Dec 28 13:31:40 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
1712 * mpn/m*68*/*.S: #include asm-syntax.h, not asm.h.
1714 Mon Dec 26 17:15:36 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
1716 * longlong.h: Test for more symbols, in __mc68000__ case.
1718 * mpn/mpn/config.sub: Recognize m68060.
1719 * mpn/configure.in: Change mc* to m* for 68k targets.
1720 * mpn/Makefile.in (.S.o): Delete spurious creation of temp .c file.
1722 Mon Dec 19 01:56:30 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
1724 * config.sub: Recognize pentium as a valid CPU.
1725 * mpn/configure.in: Handle pentium specifically, to use new assembly
1728 Mon Dec 19 00:13:01 1994 Jim Meyering (meyering@comco.com)
1730 * gmp.h: Define _GMP_H_HAVE_FILE if FILE, __STDIO_H__, or H_STDIO
1732 * gmp.h: test _GMP_H_HAVE_FILE instead of FILE everywhere else.
1734 Mon Dec 19 00:04:54 1994 Kent Boortz (boortz@sics.se)
1736 * Makefile.in (recursive makes): Pass CFLAGS.
1738 Sun Dec 18 22:34:49 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
1740 * mpn/pentium: New directory.
1742 * mpz/pprime.c: Make sure to mpz_clear all temporaries.
1744 * longlong.h: Don't use udiv instruction when SUPERSPARC is defined.
1745 * configure.in: Handle supersparc*-.
1746 * config/mt-supspc-gcc: New file.
1747 * config/mt-sparc8-gcc: New name for mt-sparcv8-gcc.
1749 Mon Dec 12 22:22:10 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
1751 * mpn/i386/*.S: #include "asm-syntax.h", not "asm.h".
1752 #include sysdep.h before asm-syntax.h.
1754 * mpn/mc68020/asm-syntax.h: #undef ALIGN before defining it.
1755 * mpn/i386/asm-syntax.h: Likewise.
1757 * mpn/mc68020/asm-syntax.h: New name for asm.h.
1758 * mpn/i386/asm-syntax.h: New name for asm.h.
1760 Tue Dec 6 21:55:25 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
1762 * mpz/array_init.c: Fix typo in declaration.
1764 Fri Nov 18 19:50:52 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
1766 * mpn/Makefile.in (.S.o): Pass CFLAGS and INCLUDES.
1768 Mon Nov 14 00:34:12 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
1770 * mpn/generic/random2.c (random): Test for __svr4__.
1772 Wed Oct 12 23:28:16 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
1774 * cre-conv-tab.c (main): Avoid upper-case X in printf format string.
1776 Tue Aug 23 17:16:35 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
1778 * mpz/perfsqr.c: Use mpn_perfect_square_p.
1779 * mpn/generic/perfsqr.c: New file.
1781 Wed Jul 6 13:46:51 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
1783 * mpz/array_init.c: New file.
1784 * mpz/Makefile.in: Compile array_init.
1785 * gmp.h: Declare mpz_array_init.
1787 Mon Jul 4 01:10:03 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
1789 * mpz/add.c: Fix bogus comment.
1790 * mpz/sub.c: Likewise.
1792 Sat Jul 2 02:14:56 1994 Torbjorn Granlund (tege@adder.cygnus.com)
1794 * mpn/generic/pre_mod_1.c: New file.
1795 * mpz/perfsqr.c: Use __mpn_preinv_mod_1 when faster.
1797 Fri Jul 01 22:10:19 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk)
1799 * longlong.h (arm umul_ppmm): Fix typos in last change. Mark
1800 hard-coded registers with "%|"
1802 Thu Jun 30 03:59:33 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
1804 * mpz/perfsqr.c: Define PP, etc, for machines with 64 bit limbs.
1806 * mpz/perfsqr.c: Don't clobber REM in quadratic residue check loop.
1808 Wed Jun 29 18:45:41 1994 Torbjorn Granlund (tege@adder.cygnus.com)
1810 * mpn/generic/sqrt.c (SQRT): New asm for IBM POWER2.
1812 * mpz/gcd_ui.c: Return 0 if result does not fit an unsigned long.
1814 * gmp.h: Use "defined (__STDC__)" consistently.
1816 Tue Jun 28 18:44:58 1994 Torbjorn Granlund (tege@adder.cygnus.com)
1818 * gmp.h (mpz_get_si): Don't use "signed" keyword for return type.
1820 * mpz/tests/Makefile.in: Use CFLAGS for linking.
1822 * Makefile.in (CFLAGS): Use -O2 here.
1823 * mpn/Makefile (CFLAGS): Not here.
1825 * mpq/cmp_ui.c: Fix typo.
1826 * mpq/canonicalize.c: Fix typo.
1827 * mpz/gcd_ui.c: Handle gcd(0,v) and gcd(u,0) correctly.
1828 * mpn/generic/gcd_1.c: Fix braino in last change.
1830 Mon Jun 27 16:10:27 1994 Torbjorn Granlund (tege@rtl.cygnus.com)
1832 * mpz/gcd_ui.c: Change return type and return result.
1833 Allow destination param to be NULL.
1834 * gmp.h: Corresponding change.
1835 * mpn/generic/gcd_1.c: Handle zero return from mpn_mod_1.
1837 Tue Jun 14 02:17:43 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
1839 * mpn/i386/asm.h (ALIGN): Make it take a parameter.
1840 * mpn/i386/*.S: Use ALIGN to align all loops.
1842 * mpn/i386/*.S: Move colon inside C_GLOBAL_NAME expression.
1843 (Makes old versions of GAS happy.)
1845 Sat May 28 01:43:54 1994 Torbjorn Granlund (tege@adder.cygnus.com)
1847 * Many files: Delete unused variables and labels.
1848 * mpn/generic/dump.c: cast printf width argument to int.
1850 Wed May 25 00:42:37 1994 Torbjorn Granlund (tege@thepub.cygnus.com)
1852 * mpz/gcd.c (mpz_gcd): Normalize after __mpn_sub calls.
1853 (xmod): Ignore return value of __mpn_divmod.
1854 (xmod): Improve normalization code.
1856 Sat May 21 01:30:09 1994 Torbjorn Granlund (tege@adder.cygnus.com)
1858 * mpz/gcdext.c: Cosmetic changes.
1860 * mpz/fdiv_ui.c: New file.
1862 Fri May 20 00:24:53 1994 Torbjorn Granlund (tege@adder.cygnus.com)
1864 * mpz/tests/Makefile.in: Use explicit rules for running tests,
1866 (clean): Delete stmp-*.
1868 * mpz/Makefile.in: Update.
1870 * mpz/div_ui.c: Don't include longlong.h.
1871 * mpz/dm_ui.c: Likewise.
1873 * mpz/fdiv_q.c, mpz/fdiv_q_ui.c, mpz/fdiv_qr.c, mpz/fdiv_qr_ui.c,
1874 mpz/fdiv_r.c, mpz/fdiv_r_ui.c: New files. Code partly from deleted
1875 mdm.c, mdm_ui.c, etc, partly rewritten.
1876 * mpz/dm_floor_ui.c, mpz/dm_floor.c: Delete.
1877 * mpz/mdm.c, mpz/mdm_ui.c, mpz/mdiv.c, mpz/mdiv_ui.c, mpz/mmod.c,
1878 mpz/mmod_ui.c: Delete.
1880 * mpz/tdiv_q.c, mpz/tdiv_q_ui.c, mpz/tdiv_qr.c, mpz/tdiv_qr_ui.c,
1881 mpz/tdiv_r.c, mpz/tdiv_r_ui.c:
1882 New names for files implementing truncating division.
1883 * mpz/div_ui.c, mpz/dm_ui.c, mpz/mod_ui.c: Simplify.
1885 * mpn/Makefile.in (.S.o): Don't rely on CPP being defined, use CC
1887 (clean): Delete tmp-*.
1889 Thu May 19 01:37:44 1994 Torbjorn Granlund (tege@adder.cygnus.com)
1891 * mpz/cmp.c: Call __mpn_cmp.
1893 * mpz/popcount.c: Fix typo.
1895 * mpz/powm_ui.c: Simplify main loop. Keep principal operand size
1896 smaller than MSIZE when possible.
1897 * mpz/powm.c: Likewise.
1899 * mpn/generic/sqrt.c: Move alloca calls into where the memory is
1902 * gmp.h: (_PROTO): New macro.
1903 Add many function declarations; use _PROTO macro in all declarations.
1905 * mpf/*.c: Prepend mpn calls with __.
1907 Wed May 18 20:57:06 1994 Torbjorn Granlund (tege@adder.cygnus.com)
1909 * mpf/*ui*.c: Make ui argument `long' for consistency with mpz
1912 * mpf/div_ui.c: Simplify.
1914 Tue May 17 01:05:14 1994 Torbjorn Granlund (tege@adder.cygnus.com)
1916 * mpz/*.c: Prepend mpn calls with __.
1918 * mpz/mul_ui.c: Use mpn_mul_1.
1920 Mon May 16 17:19:41 1994 Torbjorn Granlund (tege@adder.cygnus.com)
1922 * mpn/i386/mul_1.S: Use C_GLOBAL_NAME.
1923 * mpn/i386/mul_1.S, mpn/i386/addmul_1.S, mpn/i386/submul_1.S:
1926 Sat May 14 14:21:02 1994 Torbjorn Granlund (tege@adder.cygnus.com)
1928 * gmp-impl.h: Don't define abort here.
1930 * mpz/pow_ui.c: Increase temporary allocation.
1931 * mpz/ui_pow_ui.c: Likewise.
1933 * gmp.h (mpz_add_1, mpz_sub_1): Don't call memcpy.
1935 * All Makefile.in: Delete spurious -I arguments.
1936 Update dependencies.
1938 * mpz/popcount.c: New file.
1939 * mpz/hamdist.c: New file.
1941 * All configure: Latest version from Cygnus.
1943 * mpq/Makefile.in: New file.
1944 * mpq/configure.in: New file.
1945 * Makefile.in, configure.in: Enable compilation of mpq.
1947 * mpq/set_z.c: Fix typos.
1948 * mpq/canonicalize.c: Fix typos.
1949 * mpq/cmp_ui.c: Fix typos.
1951 * mpf/add_ui.c: Read U->D into UP always. Delete spurious MPN_COPY.
1952 * mpf/sub_ui.c: Likewise.
1954 * gmp-impl.h: Don't redefine alloca.
1956 * COPYING.LIB: Renamed from COPYING.
1958 Wed May 11 01:45:44 1994 Torbjorn Granlund (tege@adder.cygnus.com)
1960 * mpz/powm_ui.c: When shifting E left by C+1, handle out-of-range
1961 shift counts. Fix typo when testing negative_result.
1962 * mpz/powm.c: Likewise.
1964 * mpz/ui_pow_ui.c: New file.
1965 * mpz/Makefile.in: Update.
1967 * mpz/pow_ui.c: Call __mpn_mul_n instead of __mpn_mul when possible.
1969 * mpz/div.c, mpz/div_ui.c, mpz/gcd.c: Prefix external mpn calls.
1970 * mpz/gcd.c: Declare mpn_xmod.
1972 * mpz/powm.c: Major changes to accommodate changed mpn semantics.
1973 * mpz/powm_ui.c: Update from mpz/powm.c.
1975 * mpz/tests/tst-io.c: New file.
1976 * mpz/tests/tst-logic: New file.
1977 * mpz/tests/Makefile.in: Update.
1979 * mpz/inp_str.c: Get base right when checking for first digit.
1980 * mpz/inp_str.c: Allocate more space for DEST when needed.
1982 * mpz/com.c: Use mpn_add_1 and mpn_sub_1.
1983 * mpz/and.c, mpz/ior.c: Likewise. Simplify somewhat.
1985 * mpz/add_ui.c: Use mpn_add_1 and mpn_sub_1.
1986 Rename parameters to be consistent with mpz/sub_ui.
1987 General simplifications.
1988 * mpz/sub_ui.x: Likewise.
1990 Tue Aug 10 19:41:16 1993 Torbjorn Granlund (tege@prudens.matematik.su.se)
1992 * mpf: New directory.
1993 * mpf/*.c: Merge basic set of mpf functions.
1995 * Many logs missing...
1997 Sun Apr 25 18:40:26 1993 Torbjorn Granlund (tege@pde.nada.kth.se)
1999 * memory.c: Use #if instead of #ifdef for __STDC__ for consistency.
2000 * bsd/xtom.c: Likewise.
2002 * mpz/div.c: Remove free_me and free_me_size and their usage.
2003 Use mpn_divmod for division; corresponding changes in return value
2005 * mpz/powm.c: `carry_digit' => `carry_limb'.
2006 * bsd/sdiv.c: Clearify comment.
2008 Sun Apr 25 00:31:28 1993 Torbjorn Granlund (tege@pde.nada.kth.se)
2010 * longlong.h (__udiv_qrnnd_c): Make all variables `unsigned long int'.
2012 Sat Apr 24 16:23:33 1993 Torbjorn Granlund (tege@pde.nada.kth.se)
2014 * longlong.h (__udiv_qrnnd_c): Make all variables `unsigned long int'.
2016 * gmp-impl.h: #define ABS.
2017 * (Many files): Use ABS instead of abs.
2019 * mpn/generic/sqrt.c, mpz/clrbit.c, mpz/get_si.c, mpz/mod_2exp.c,
2020 mpz/pow_ui.c: Cast 1 to mp_limb before shifting.
2022 * mpz/perfsqr.c: Use #if, not plain if for exclusion of code for
2023 non-32-bit machines.
2025 Tue Apr 20 13:13:58 1993 Torbjorn Granlund (tege@du.nada.kth.se)
2027 * mpn/generic/sqrt.c: Handle overflow for intermediate quotients by
2028 rounding them down to fit.
2030 * mpz/perfsqr.c (PP): Define in hexadecimal to avoid GCC warnings.
2032 * mpz/inp_str.c (char_ok_for_base): New function.
2033 (mpz_inp_str): Use it.
2035 Sun Mar 28 21:54:06 1993 Torbjorn Granlund (tege@cyklop.nada.kth.se)
2037 * mpz/inp_raw.c: Allocate x_index, not xsize limbs.
2039 Mon Mar 15 11:44:06 1993 Torbjorn Granlund (tege@pde.nada.kth.se)
2041 * mpz/pprime.c: Declare param `const'.
2042 * gmp.h: Add declarations for mpz_com.
2044 Thu Feb 18 14:10:34 1993 Torbjorn Granlund (tege@pde.nada.kth.se)
2046 * mpq/add.c, mpq/sub.c: Call mpz_clear for t.
2048 Fri Feb 12 20:27:34 1993 Torbjorn Granlund (tege@cyklop.nada.kth.se)
2050 * mpz/inp_str.c: Recog minus sign as first character.
2052 Wed Feb 3 01:36:02 1993 Torbjorn Granlund (tege@cyklop.nada.kth.se)
2054 * mpz/iset.c: Handle 0 size.
2056 Tue Feb 2 13:03:33 1993 Torbjorn Granlund (tege@cyklop.nada.kth.se)
2058 * mpz/mod_ui.c: Initialize dividend_size before it's used.
2060 Mon Jan 4 09:11:15 1993 Torbjorn Granlund (tege@sics.se)
2062 * bsd/itom.c: Declare param explicitly 'signed'.
2063 * bsd/sdiv.c: Likewise.
2065 * mpq/cmp.c: Remove unused variable tmp_size.
2066 * mpz/powm_ui.c: Fix typo in esize==0 if stmt.
2067 * mpz/powm.c: Likewise.
2069 Sun Nov 29 01:16:11 1992 Torbjorn Granlund (tege@sics.se)
2071 * mpn/generic/divmod_1.c (mpn_divmod_1): Handle
2072 divisor_limb == 1 << (BITS_PER_MP_LIMB - 1)
2075 * Reorganize sources. New directories mpn, mpn/MACH, mpn/generic,
2076 mpz, mpq, bsd. Use full file name for change logs hereafter.
2078 Wed Oct 28 17:40:04 1992 Torbjorn Granlund (tege@jupiter.sics.se)
2080 * longlong.h (__hppa umul_ppmm): Fix typos.
2081 (__hppa sub_ddmmss): Swap input arguments.
2083 * mpz_perfsqr.c (mpz_perfect_square_p): Avoid , before } in
2086 Sun Oct 25 20:30:06 1992 Torbjorn Granlund (tege@jupiter.sics.se)
2088 * mpz_pprime.c (mpz_probab_prime_p): Handle numbers <= 3
2089 specifically (used to consider all negative numbers prime).
2091 * mpz_powm_ui: `carry_digit' => `carry_limb'.
2093 * sdiv: Handle zero dividend specifically. Replace most code in
2094 this function with a call to mpn_divmod_1.
2096 Fri Sep 11 22:15:55 1992 Torbjorn Granlund (tege@tarrega.sics.se)
2098 * mpq_clear: Don't free the MP_RAT!
2100 * mpn_lshift, mpn_rshift, mpn_rshiftci: Remove `long' from 4:th arg.
2102 Thu Sep 3 01:47:07 1992 Torbjorn Granlund (tege@jupiter.sics.se)
2104 * All files: Remove leading _ from mpn function names.
2106 Wed Sep 2 22:21:16 1992 Torbjorn Granlund (tege@jupiter.sics.se)
2108 Fix from Jan-Hein Buhrman:
2109 * mpz_mdiv.c, mpz_mmod.c, mpz_mdm.c: Make them work as documented.
2111 * mpz_mmod.c, mpz_mdm.c: Move decl of TEMP_DIVISOR to reflect its
2114 Sun Aug 30 18:37:15 1992 Torbjorn Granlund (tege@jupiter.sics.se)
2116 * _mpz_get_str: Use mpz_sizeinbase for computing out_len.
2117 * _mpz_get_str: Don't remove leading zeros. Abort if there are some.
2119 Wed Mar 4 17:56:56 1992 Torbjorn Granlund (tege@zevs.sics.se)
2121 * gmp.h: Change definition of MP_INT to make the & before params
2122 optional. Use typedef to define it.
2123 * mp.h: Use typedef to define MINT.
2125 Tue Feb 18 14:38:39 1992 Torbjorn Granlund (tege@zevs.sics.se)
2127 longlong.h (hppa umul_ppmm): Add missing semicolon. Declare type
2130 Fri Feb 14 21:33:21 1992 Torbjorn Granlund (tege@zevs.sics.se)
2132 * longlong.h: Make default count_leading_zeros work for machines >
2133 32 bits. Prepend `__' before local variables to avoid conflicts
2134 with users' variables.
2136 * mpn_dm_1.c: Remove udiv_qrnnd_preinv ...
2137 * gmp-impl.h: ... and put it here.
2138 * mpn_mod_1: Use udiv_qrnnd_preinv if it is faster than udiv_qrnnd.
2140 Tue Feb 11 17:20:12 1992 Torbjorn Granlund (tege@zevs.sics.se)
2142 * mpn_mul: Enhance base case by handling small multiplicands.
2143 * mpn_dm_1.c: Revert last change.
2145 Mon Feb 10 11:55:15 1992 Torbjorn Granlund (tege@zevs.sics.se)
2147 * mpn_dm_1.c: Don't define udiv_qrnnd_preinv unless needed.
2149 Fri Feb 7 16:26:16 1992 Torbjorn Granlund (tege@zevs.sics.se)
2151 * mpn_mul: Replace code for base case.
2153 Thu Feb 6 15:10:42 1992 Torbjorn Granlund (tege@zevs.sics.se)
2155 * mpn_dm_1.c (_mpn_divmod_1): Add code for avoiding division by
2156 pre-inverting divisor.
2158 Sun Feb 2 11:10:25 1992 Torbjorn Granlund (tege@zevs.sics.se)
2160 * longlong.h: Make __LLDEBUG__ work differently.
2161 (_IBMR2): Reinsert old code.
2163 Sat Feb 1 16:43:00 1992 Torbjorn Granlund (tege@zevs.sics.se)
2165 * longlong.h (#ifdef _IBMR2): Replace udiv_qrnnd with new code
2166 using floating point operations. Don't define
2167 UDIV_NEEDS_NORMALIZATION any longer.
2169 Fri Jan 31 15:09:13 1992 Torbjorn Granlund (tege@zevs.sics.se)
2171 * longlong.h: Define UMUL_TIME and UDIV_TIME for most machines.
2172 * longlong.h (#ifdef __hppa): Define umul_ppmm.
2174 Wed Jan 29 16:41:36 1992 Torbjorn Granlund (tege@zevs.sics.se)
2176 * mpn_cmp: Only one length parameter, assume operand lengths are
2177 the same. Don't require normalization.
2178 * mpq_cmp, mpz_add, mpz_sub, mpz_gcd, mpn_mul, mpn_sqrt: Change for
2179 new mpn_cmp definition.
2181 Tue Jan 28 11:18:55 1992 Torbjorn Granlund (tege@zevs.sics.se)
2183 * _mpz_get_str: Fix typo in comment.
2185 Mon Jan 27 09:44:16 1992 Torbjorn Granlund (tege@zevs.sics.se)
2187 * Makefile.in: Add new files.
2189 * mpn_dm_1.c: New file with function _mpn_divmod_1.
2190 * mpz_dm_ui.c (mpz_divmod_ui): Use _mpn_divmod_1.
2191 * mpz_div_ui: Likewise.
2193 * mpn_mod_1.c: New file with function _mpn_mod_1.
2194 * mpz_mod_ui: Use _mpn_mod_1.
2196 Thu Jan 23 18:54:09 1992 Torbjorn Granlund (tege@zevs.sics.se)
2198 Bug found by Paul Zimmermann (zimmermann@inria.inria.fr):
2199 * mpz_div_ui.c (mpz_div_ui), mpz_dm_ui.c (mpz_divmod_ui):
2200 Handle dividend == 0.
2202 Wed Jan 22 12:02:26 1992 Torbjorn Granlund (tege@zevs.sics.se)
2204 * mpz_pprime.c: Use "" for #include.
2206 Sun Jan 19 13:36:55 1992 Torbjorn Granlund (tege@zevs.sics.se)
2208 * mpn_rshiftci.c (header): Correct comment.
2210 Wed Jan 15 18:56:04 1992 Torbjorn Granlund (tege@zevs.sics.se)
2212 * mpz_powm, mpz_powm_ui (if (bsize > msize)): Do alloca (bsize + 1)
2213 to make space for ignored quotient at the end. (The quotient might
2214 always be an extra limb.)
2216 Tue Jan 14 21:28:48 1992 Torbjorn Granlund (tege@zevs.sics.se)
2218 * mpz_powm_ui: Fix comment.
2219 * mpz_powm: Likewise.
2221 Mon Jan 13 18:16:25 1992 Torbjorn Granlund (tege@zevs.sics.se)
2223 * tests/Makefile.in: Prepend $(TEST_PREFIX) to Makefile target.
2225 Sun Jan 12 13:54:28 1992 Torbjorn Granlund (tege@zevs.sics.se)
2227 Fixes from Kazumaro Aoki:
2228 * mpz_out_raw: Take abs of size to handle negative values.
2229 * mpz_inp_raw: Reallocate before reading ptr from X.
2230 * mpz_inp_raw: Store, don't read, size to x->size.
2232 Tue Jan 7 17:50:25 1992 Torbjorn Granlund (tege@zevs.sics.se)
2234 * gmp.h, mp.h: Remove parameter names from prototypes.
2236 Sun Dec 15 00:09:36 1991 Torbjorn Granlund (tege@zevs.sics.se)
2238 * tests/Makefile.in: Prepend "./" to file names when executing
2241 * Makefile.in: Fix many problems.
2243 Sat Dec 14 01:00:02 1991 Torbjorn Granlund (tege@zevs.sics.se)
2245 * mpn_sqrt.c: New file with _mpn_sqrt.
2246 * mpz_sqrt, mpz_sqrtrem, mpz_perfect_square_p: Use _mpn_sqrt.
2247 * msqrt.c: Delete. Create from mpz_sqrtrem.c in Makefile.in.
2248 * mpz_do_sqrt.c: Delete.
2249 * Makefile.in: Update to reflect these changes.
2251 * Makefile.in, configure, configure.subr: New files
2252 (from bothner@cygnus.com).
2253 * dist-Makefile: Delete.
2255 * mpz_fac_ui: Fix comment.
2257 * mpz_random2: Rewrite a bit to make it possible for the most
2258 significant limb to be == 1.
2260 * mpz_pprime.c (mpz_probab_prime_p): Remove \t\n.
2262 Fri Dec 13 23:10:02 1991 Torbjorn Granlund (tege@zevs.sics.se)
2264 * mpz_do_sqrt: Simplify special case for U == 0.
2265 * m*sqrt*.c, mpz_perfsqr.c (mpz_perfect_square_p):
2266 Rename _mpz_impl_sqrt to _mpz_do_sqrt.
2268 Fri Dec 13 12:52:28 1991 Torbjorn Granlund (tege@zevs.sics.se)
2270 * gmp-impl.h (MPZ_TMP_INIT): Cast to the right type.
2272 Thu Dec 12 22:17:29 1991 Torbjorn Granlund (tege@zevs.sics.se)
2274 * mpn_add, mpn_sub, mpn_mul, mpn_div: Change type of several
2275 variables to mp_size.
2277 Wed Dec 11 22:00:34 1991 Torbjorn Granlund (tege@zevs.sics.se)
2279 * mpn_rshift.c: Fix header comments.
2281 Mon Dec 9 17:46:10 1991 Torbjorn Granlund (tege@zevs.sics.se)
2285 * gmp-impl.h (MPZ_TMP_INIT): Cast alloca return value.
2287 * dist-Makefile: Add missing dependency for cre-mparam.
2289 * mpz_mdiv.c, mpz_mmod.c, mpz_mdm.c, mpz_mdiv_ui.c,
2290 mpz_mmod_ui.c, mpz_mdm_ui.c: Remove obsolete comment.
2292 * dist-Makefile (clean): clean in tests subdir too.
2293 * tests/Makefile: Define default values for ROOT and SUB.
2295 * longlong.h (__a29k__ udiv_qrnnd): Change "q" to "1" for operand
2298 Mon Nov 11 00:06:05 1991 Torbjorn Granlund (tege@zevs.sics.se)
2300 * mpz_sizeinb.c (mpz_sizeinbase): Special code for size == 0.
2302 Sat Nov 9 23:47:38 1991 Torbjorn Granlund (tege@zevs.sics.se)
2306 * dist-Makefile, Makefile, tests/Makefile: Merge tests into
2309 Fri Nov 8 22:57:19 1991 Torbjorn Granlund (tege@zevs.sics.se)
2311 * gmp.h: Don't use keyword `signed' for non-ANSI compilers.
2313 Thu Nov 7 22:06:46 1991 Torbjorn Granlund (tege@zevs.sics.se)
2315 * longlong.h: Cosmetic changes to keep it identical to gcc2 version
2317 * longlong.h (__ibm032__): Fix operand order for add_ssaaaa and
2320 Mon Nov 4 00:36:46 1991 Torbjorn Granlund (tege@zevs.sics.se)
2322 * mpn_mul: Fix indentation.
2324 * mpz_do_sqrt: Don't assume 32 bit limbs (had constant
2326 * mpz_do_sqrt: Handle overflow in conversion from double returned
2329 * gmp.h: Add missing function definitions.
2331 Sun Nov 3 18:25:25 1991 Torbjorn Granlund (tege@zevs.sics.se)
2333 * mpz_pow_ui: Change type of `i' to int.
2335 * ChangeLog: Add change log entry.
2336 * ChangeLog: Add change log entry.
2337 * ChangeLog: Add change log entry.
2338 * ChangeLog: Add change log entry.
2339 * ChangeLog: Add change log entry.
2340 * ChangeLog: Add change log entry.
2341 * ChangeLog: Add change log entry.
2342 * ChangeLog: Add change log entry.
2345 * mpz_pow_ui.c: Fix typo in comment.
2347 * dist-Makefile: Create rpow.c from mpz_powm_ui.c.
2348 * mpz_powm_ui.c: Add code for rpow.
2349 * rpow.c: Delete this file. The rpow function is now implemented
2352 * mpz_fac_ui.c: New file.
2353 * gmp.h, dist-Makefile: Add stuff for mpz_fac_ui.
2355 Bug found by John Amanatides (amana@sasquatch.cs.yorku.ca):
2356 * mpz_powm_ui, mpz_powm: Call _mpn_mul in the right way, with
2357 the first argument not smaller than the second.
2359 Tue Oct 29 13:56:55 1991 Torbjorn Granlund (tege@zevs.sics.se)
2361 * cre-conv-tab.c (main), cre-mparam.c (main): Fix typo in output
2364 Mon Oct 28 00:35:29 1991 Torbjorn Granlund (tege@zevs.sics.se)
2366 * mpz_random2: Handle size == 0.
2368 * gmp-impl.h (struct __mp_bases): Rename chars_per_limb_exactly to
2369 chars_per_bit_exactly, and change its definition.
2370 * cre-conv-tab.c (main): Output field according to its new
2372 * mpz_out_str, _mpz_get_str, mpz_sizeinb, mout:
2373 Use chars_per_bit_exactly.
2375 * mpz_random2: Change the loop termination condition in order to
2376 get a large most significant limb with higher probability.
2378 * gmp.h: Add declaration of new mpz_random2 and mpz_get_si.
2379 * mpz_get_si.c: New file.
2380 * dist-Makefile: Add mpz_random2 and mpz_get_si.
2382 * mpz_sizeinb.c (mpz_sizeinbase): Special code for base being a
2383 power of 2, giving exact result.
2385 * mpn_mul: Fix MPN_MUL_VERIFY in various ways.
2386 * mpn_mul: New macro KARATSUBA_THRESHOLD.
2387 * mpn_mul (karatsuba's algorithm): Don't write intermediate results
2388 to prodp, use temporary pp instead. (Intermediate results can be
2389 larger than the final result, possibly writing into hyperspace.)
2390 * mpn_mul: Make smarter choice between Karatsuba's algorithm and the
2392 * mpn_mul: Fix typo, cy instead of xcy. Unify carry handling code.
2394 Sun Oct 27 19:57:32 1991 Torbjorn Granlund (tege@zevs.sics.se)
2396 * mpn_mul: In non-classical case, choose Karatsuba's algorithm only
2397 when usize > 1.5 vsize.
2399 * mpn_mul: Break between classical and Karatsuba's algorithm at
2400 KARATSUBA_THRESHOLD, if defined. Default to 8.
2402 * mpn_div: Kludge to fix stray memory read.
2404 Sat Oct 26 20:06:14 1991 Torbjorn Granlund (tege@zevs.sics.se)
2406 * mpz_gcdext: Handle a = b = 0. Remove memory leakage by calling
2407 mpz_clear for all temporary variables.
2409 * mpz_gcd: Reduce w_bcnt in _mpn_lshift call to hold that
2410 function's argument constraints. Compute wsize correctly.
2412 * mpz_gcd: Fix typo in comment.
2414 * memory.c (_mp_default_allocate, _mp_default_reallocate): Call
2415 abort if allocation fails, don't just exit.
2417 Fri Oct 25 22:17:20 1991 Torbjorn Granlund (tege@zevs.sics.se)
2419 * mpz_random2.c: New file.
2421 Thu Oct 17 18:06:42 1991 Torbjorn Granlund (tege@zevs.sics.se)
2423 Bugs found by Pierre-Joseph Gailly (pjg@sunbim.be):
2424 * mpq_cmp: Take sign into account, don't just compare the
2426 * mpq_cmp: Call _mpn_mul in the right way, with the first argument
2427 not smaller than the second.
2429 Wed Oct 16 19:27:32 1991 Torbjorn Granlund (tege@zevs.sics.se)
2431 * mpz_random: Ensure the result is normalized.
2433 Tue Oct 15 14:55:13 1991 Torbjorn Granlund (tege@zevs.sics.se)
2435 * mpz_clrbit: Support non-ANSI compilers.
2437 Wed Oct 9 18:03:28 1991 Torbjorn Granlund (tege@zevs.sics.se)
2439 * longlong.h (68k add_ssaaaa, sub_ddmmss): Generalize constraints.
2441 Tue Oct 8 17:42:59 1991 Torbjorn Granlund (tege@zevs.sics.se)
2443 * mpz_mdm_ui: Add comments.
2445 * mpz_mdiv: Use MPZ_TMP_INIT instead of mpz_init.
2446 * mpz_init_ui: Change spacing and header comment.
2448 Thu Oct 3 18:36:13 1991 Torbjorn Granlund (tege@zevs.sics.se)
2450 * dist-Makefile: Prepend `./' before some filenames.
2452 Sun Sep 29 14:02:11 1991 Torbjorn Granlund (tege@zevs.sics.se)
2454 Released 1.1 (public).
2456 * mpz_com: New name of mpz_not.
2457 * dist-Makefile: Change mpz_not to mpz_com.
2459 Tue Sep 24 12:44:11 1991 Torbjorn Granlund (tege@zevs.sics.se)
2461 * longlong.h: Fix header comment.
2463 Mon Sep 9 15:16:24 1991 Torbjorn Granlund (tege@zevs.sics.se)
2467 * mpn_mul.c (_mpn_mul): Handle leading zero limbs in non-Karatsuba
2470 * longlong.h (m68000 umul_ppmm): Clobber one register less by
2471 slightly rearranging the code.
2473 Sun Sep 1 18:53:25 1991 Torbjorn Granlund (tege@zevs.sics.se)
2475 * dist-Makefile (stamp-stddefh): Fix typo.
2477 Sat Aug 31 20:41:31 1991 Torbjorn Granlund (tege@zevs.sics.se)
2481 * mpz_mdiv.c, mpz_mmod.c, mpz_mdm.c, mpz_mdiv_ui.c,
2482 mpz_mmod_ui.c, mpz_mdm_ui.c: New files and functions.
2483 * gmp.h, gmp.texi: Define the new functions.
2485 Fri Aug 30 08:32:56 1991 Torbjorn Granlund (tege@zevs.sics.se)
2487 * mpz_gcdext: Compute t argument from the other quantities at the
2488 end, of the function, not in the loop. New feature: Allow t to be
2491 * mpz_add.c, mpz_sub.c, mpz_mul.c, mpz_powm.c, mpz_gcd.c: Don't
2492 include "mp.h". Use type name `MP_INT' always.
2494 * dist-Makefile, mpz_cmp.c: Merge mcmp.c from mpz_cmp.c.
2496 Wed Aug 28 00:45:11 1991 Torbjorn Granlund (tege@zevs.sics.se)
2498 * dist-Makefile (documentation): Go via tmp.texi to avoid the
2499 creation of gmp.dvi if any errors occur. Make tex read input
2502 Fri Aug 23 15:58:52 1991 Torbjorn Granlund (tege@zevs.sics.se)
2504 * longlong.h (68020, i386): Don't define machine-dependent
2505 __umulsidi3 (so the default definition is used).
2506 * longlong.h (all machines): Cast all operands, sources and
2507 destinations, to `unsigned long int'.
2508 * longlong.h: Add gmicro support.
2510 Thu Aug 22 00:28:29 1991 Torbjorn Granlund (tege@zevs.sics.se)
2512 * longlong.h: Rename BITS_PER_LONG to LONG_TYPE_SIZE.
2513 * longlong.h (__ibm032__): Define count_leading_zeros and umul_ppmm.
2514 * longlong.h: Define UMUL_TIME and UDIV_TIME for some CPUs.
2515 * _mpz_get_str.c: Add code to do division by big_base using only
2516 umul_qrnnd, if that is faster. Use UMUL_TIME and UDIV_TIME to
2517 decide which variant to use.
2519 Wed Aug 21 15:45:23 1991 Torbjorn Granlund (tege@zevs.sics.se)
2521 * longlong.h (__sparc__ umul_ppmm): Move two insn from end to the
2522 nops. (Saves two insn.)
2524 * longlong.h (__sparc__ umul_ppmm): Rewrite in order to avoid
2525 branch, and to permit input/output register overlap.
2527 * longlong.h (__29k__): Remove duplicated udiv_qrnnd definition.
2528 * longlong.h (__29k__ umul_ppmm): Split asm instructions into two
2529 asm statements (gives better code if either the upper or lower
2530 part of the product is unused.
2532 Tue Aug 20 17:57:59 1991 Torbjorn Granlund (tege@zevs.sics.se)
2534 * _mpz_get_str.c (outside of functions): Remove
2535 num_to_ascii_lower_case and num_to_ascii_upper_case. Use string
2536 constants in the function instead.
2538 Mon Aug 19 00:37:42 1991 Torbjorn Granlund (tege@zevs.sics.se)
2540 * cre-conv-tab.c (main): Output table in hex. Output 4 fields, not
2541 3, for components 0 and 1.
2543 * gmp.h: Add declaration of mpq_neg.
2545 Released 1.0beta.13.
2547 * _mpz_set_str.c (mpz_set_str): Cast EOF and SPC to char before
2548 comparing to enum literals SPC and EOF. This makes the code work
2549 for compilers where `char' is unsigned. (Bug found by Brian
2552 Released 1.0beta.12.
2554 * mpz_mod_ui: Remove references to quot. Remove quot_ptr, quot_size
2555 declarations and assignment code.
2557 Sun Aug 18 14:44:26 1991 Torbjorn Granlund (tege@zevs.sics.se)
2559 * mpz_mod_ui: Handle dividend < 0.
2561 Released 1.0beta.11.
2563 * mpz_dm_ui, mpz_div_ui, mpz_mod_ui, sdiv: Make them share the same
2564 general structure, variable names, etc.
2566 * sdiv: Un-normalize the remainder in n1 before it is negated.
2568 * longlong.h: Mention UDIV_NEEDS_NORMALIZATION in description of
2571 * mpz_dm_ui.c (mpz_divmod_ui), mpz_div_ui.c (mpz_div_ui): Increment
2572 the quotient size if the dividend size is incremented. (Bug found
2575 * mpz_mod_ui: Shift back the remainder, if UDIV_NEEDS_NORMALIZATION.
2576 (Bug found by Brian Beuning.)
2578 * mpz_mod_ui: Replace "digit" by "limb".
2580 * mpz_perfsqr.c (mpz_perfect_square_p): Disable second test case
2581 for non-32-bit machines (PP is hardwired for such machines).
2582 * mpz_perfsqr.c (outside of functions): Define PP value with an L.
2584 * mpn_mul.c (_mpn_mul): Add verification code that is activated if
2585 DEBUG is defined. Replace "digit" by "limb".
2586 * mpn_mul.c (_mpn_mul: Karatsuba's algorithm: 4.): Normalize temp
2588 * mpn_mul.c (_mpn_mul: Karatsuba's algorithm: 1.): Compare u0_size
2589 and v0_size, and according to the result, swap arguments in
2590 recursive call. (Don't violate mpn_mul's own argument
2593 Fri Aug 16 13:47:12 1991 Torbjorn Granlund (tege@zevs.sics.se)
2595 Released 1.0beta.10.
2597 * longlong.h (IBMR2): Add udiv_qrnnd.
2599 * mpz_perfsqr: Remove unused variables.
2601 * mpz_and (case for different signs): Initialize loop variable i!
2603 * dist-Makefile: Update automatically generated dependencies.
2604 * dist-Makefile (madd.c, msub.c, pow.c, mult.c, gcd.c): Add mp.h,
2605 etc to dependency file lists.
2607 * longlong.h (add_ssaaaa, sub_ddmmss [C default versions]): Make __x
2608 `unsigned long int'.
2609 * longlong.h: Add `int' after `unsigned' and `long' everywhere.
2611 Wed Aug 14 18:06:48 1991 Torbjorn Granlund (tege@zevs.sics.se)
2613 * longlong.h: Add ARM, i860 support.
2615 * mpn_lshift, mpn_rshift, mpn_rshiftci: Rename *_word with *_limb.
2617 Tue Aug 13 21:57:43 1991 Torbjorn Granlund (tege@zevs.sics.se)
2619 * _mpz_get_str.c, _mpz_set_str.c, mpz_sizeinb.c (mpz_sizeinbase),
2620 mpz_out_str.c, mout.c: Remove declaration of __mp_bases.
2621 * gmp-impl.h: Put it here, and make it `const'.
2622 * cre-conv-tab.c (main): Make struct __mp_bases `const'.
2624 Mon Aug 12 17:11:46 1991 Torbjorn Granlund (tege@zevs.sics.se)
2626 * cre-conv-tab.c (main): Use %lu in printf for long ints.
2628 * dist-Makefile: Fix cre-* dependencies.
2630 * cre-conv-tab.c (main): Output field big_base_inverted.
2632 * gmp-impl.h (struct bases): New field big_base_inverted.
2633 * gmp-impl.h (struct bases): Change type of chars_per_limb_exactly
2634 to float (in order to keep the structure smaller).
2636 * mp.h, gmp.h: Change names of macros for avoiding multiple
2639 Fri Aug 9 18:01:36 1991 Torbjorn Granlund (tege@zevs.sics.se)
2641 * _mpz_get_str: Only shift limb array if normalization_steps != 0
2644 * longlong.h (sparc umul_ppmm): Use __asm__, not asm.
2645 * longlong.h (IBMR2 umul_ppmm): Refer to __m0 and __m1, not to m0
2646 and m1 (overlap between output and input operands did not work).
2647 * longlong.h: Add VAX, ROMP and HP-PA support.
2648 * longlong.h: Sort the machine dependent code in alphabetical order
2650 * longlong.h: Hack comments.
2652 Thu Aug 8 14:13:36 1991 Torbjorn Granlund (tege@zevs.sics.se)
2656 * longlong.h: Define BITS_PER_LONG to 32 if it's not already
2658 * Define __BITS4 to BITS_PER_LONG / 4.
2659 * Don't assume 32 bit word size in "count_leading_zeros" C macro.
2660 Use __BITS4 and BITS_PER_LONG instead.
2662 * longlong.h: Don't #undef internal macros (reverse change of Aug 3).
2664 * longlong.h (68k): Define add_ssaaaa sub_ddmmss, and umul_ppmm
2665 even for plain mc68000.
2667 * mpq_div: Flip the sign of the numerator *and* denominator of the
2668 result if the intermediate denominator is negative.
2670 * mpz_and.c, mpz_ior.c: Use MPN_COPY for all copying operations.
2672 * mpz_and.c: Compute the result size more conservatively.
2673 * mpz_ior.c: Likewise.
2675 * mpz_realloc: Never allocate zero space even if NEW_SIZE == 0.
2677 * dist-Makefile: Remove madd.c, msub.c, pow.c, mult.c, gcd.c from
2680 * dist-Makefile: Create mult.c from mpz_mul.c.
2681 * mult.c: Delete this file.
2683 * _mpz_set_str: Normalize the result (for bases 2, 4, 8... it was
2684 not done properly if the input string had many leading zeros).
2686 Sun Aug 4 16:54:14 1991 Torbjorn Granlund (tege@zevs.sics.se)
2688 * dist-Makefile (gcd.c, pow.c, madd.c, msub.c): Make these targets
2689 work with VPATH and GNU MP.
2691 * mpz_gcd: Don't call mpz_set; inline its functionality.
2693 * mpq_mul, mpq_div: Fix several serious typos.
2695 * mpz_dmincl, mpz_div: Don't normalize the quotient if it's already
2698 * mpq_neg.c: New file.
2700 * dist-Makefile: Remove obsolete dependencies.
2702 * mpz_sub: Fix typo.
2704 Bugs found by Pierre-Joseph Gailly (pjg@sunbim.be):
2705 * mpq_mul, mpq_div: Initialize tmp[12] variables even when the gcd
2707 * mpz_gcd: Handle gcd(0,v) and gcd(u,0) in special cases.
2709 Sat Aug 3 23:45:28 1991 Torbjorn Granlund (tege@zevs.sics.se)
2711 * longlong.h: Clean up comments.
2712 * longlong.h: #undef internal macros.
2714 Fri Aug 2 18:29:11 1991 Torbjorn Granlund (tege@zevs.sics.se)
2716 * mpq_set_si, mpq_set_ui: Canonicalize 0/x to 0/1.
2717 * mpq_set_si, mpq_set_ui: Cosmetic formatting changes.
2719 * mpz_dmincl.c: Normalize the remainder before shifting it back.
2721 * mpz_dm_ui.c (mpz_divmod_ui): Handle rem == dividend.
2723 * mpn_div.c: Fix comment.
2725 * mpz_add.c, mpz_sub.c: Use __MP_INT (not MP_INT) for intermediate
2726 type, in order to work for both GNU and Berkeley functions.
2728 * dist-Makefile: Create gcd.c from mpz_gcd.c, pow.c from mpz_powm,
2729 madd.c from mpz_add.c, msub.c from mpz_sub.c.
2731 * pow.c, gcd.c, mpz_powmincl.c, madd.c, msub.c: Remove these.
2732 * mpz_powm.c, mpz_gcd.c, mpz_add.c, mpz_sub.c: #ifdef for GNU and
2733 Berkeley function name variants.
2734 * dist-Makefile: Add created files to "clean" target.
2736 Tue Jul 16 15:19:46 1991 Torbjorn Granlund (tege@zevs.sics.se)
2738 * mpq_get_den: No need for absolute value of the size, the
2739 denominator is always positive.
2741 * mpz_get_ui: If the operand is zero, return zero. Don't read the
2744 * mpz_dmincl.c: Don't ignore the return value from _mpn_rshift, it
2745 is the size of the remainder.
2747 Mon Jul 15 11:08:05 1991 Torbjorn Granlund (tege@zevs.sics.se)
2749 * Several files: Remove unused variables and functions.
2751 * gmp-impl.h: Declare _mpz_impl_sqrt.
2753 * mpz_dm_ui (mpz_divmod_ui), sdiv: Shift back the remainder if
2754 UDIV_NEEDS_NORMALIZATION. (Fix from Brian Beuning.)
2756 * mpz_dm_ui.c, sdiv: Replace *digit with *limb.
2758 * mpz_ior: Add missing else statement in -OP1 | -OP2 case.
2759 * mpz_ior: Add missing else statement in OP1 | -OP2 case.
2760 * mpz_ior: Swap also OP1 and OP2 pointers in -OP1 & OP2 case.
2761 * mpz_ior: Duplicate _mpz_realloc code.
2763 * mpz_and: Add missing else statement in -OP1 & -OP2 case.
2764 * mpz_and: Rewrite OP1 & -OP2 case.
2765 * mpz_and: Swap also OP1 and OP2 pointers in -OP1 & OP2 case.
2767 * mpz_gcdext: Loop in d1.size (not b->size). (Fix from Brian
2770 * mpz_perfsqr: Fix argument order in _mpz_impl_sqrt call. (Fix from
2773 Fri Jul 12 17:10:33 1991 Torbjorn Granlund (tege@zevs.sics.se)
2775 * mpq_set.c, mpq_set_ui.c, mpq_set_si.c, mpq_inv.c,
2776 mpq_get_num.c, mpq_get_den.c, mpq_set_num.c, mpq_set_den.c:
2779 * mpz_dmincl.c: Remove second re-allocation of rem->d. It
2782 * dist-Makefile: Use `-r' instead of `-x' for test for ranlib (as
2783 some unixes' test doesn't have the -r option).
2785 * *.*: Cast allocated pointers to the appropriate type (makes old C
2788 * cre-conv-tab.c (main): Divide max_uli by 2 and multiply again
2789 after conversion to double. (Kludge for broken C compilers.)
2791 * dist-Makefile (stamp-stddefh): New target. Test if "stddef.h"
2792 exists in the system and creates a minimal one if it does not
2794 * cre-stddefh.c: New file.
2795 * dist-Makefile: Make libgmp.a and libmp.a depend on stamp-stddefh.
2796 * dist-Makefile (clean): Add some more.
2797 * gmp.h, mp.h: Unconditionally include "stddef.h".
2799 Thu Jul 11 10:08:21 1991 Torbjorn Granlund (tege@zevs.sics.se)
2801 * min: Do ungetc of last read character.
2802 * min.c: include stdio.h.
2804 * dist-Makefile: Go via tmp- files for cre* redirection.
2805 * dist-Makefile: Add tmp* to "clean" target.
2807 * dist-Makefile: Use LOCAL_CC for cre*, to simplyfy cross
2810 * gmp.h, mp.h: Don't define NULL here.
2811 * gmp-impl.h: Define it here.
2813 Wed Jul 10 14:13:33 1991 Torbjorn Granlund (tege@zevs.sics.se)
2815 * mpz_mod_2exp: Don't copy too much, overwriting most significant
2818 * mpz_and, mpz_ior: Don't read op[12]_ptr from op[12] when
2819 reallocating res, if op[12]_ptr got their value from alloca.
2821 * mpz_and, mpz_ior: Clear up comments.
2823 * cre-mparam.c: Output parameters for `short int' and `int'.
2825 * mpz_and, mpz_ior: Negate negative op[12]_size in several places.
2827 Tue Jul 9 18:40:30 1991 Torbjorn Granlund (tege@zevs.sics.se)
2829 * gmp.h, mp.h: Test for _SIZE_T defined before typedef'ing size_t.
2830 (Fix for Sun lossage.)
2832 * gmp.h: Add declaration of mpq_clear.
2834 * dist-Makefile: Chack if "ranlib" exists, before using it.
2835 * dist-Makefile: Add mpz_sqrtrem.c and mpz_size.c.
2836 * mpz_powm: Fix typo, "pow" instead of "mpz_powm".
2838 Fri Jul 5 19:08:09 1991 Torbjorn Granlund (tege@zevs.sics.se)
2840 * move: Remove incorrect comment.
2842 * mpz_free, mpq_free: Rename to *_clear.
2843 * dist-Makefile: Likewise.
2844 * mpq_add, mpq_sub, mpq_mul, mpq_div: Likewise.
2846 * mpz_dmincl.c: Don't call "move", inline its functionality.
2848 Thu Jul 4 00:06:39 1991 Torbjorn Granlund (tege@zevs.sics.se)
2850 * Makefile: Include dist-Makefile. Fix dist target to include
2851 dist-Makefile (with the name "Makefile" in the archive).
2853 * dist-Makefile: New file made from Makefile. Add new mpz_...
2856 * mpz_powincl.c New file for mpz_powm (Berkeley MP pow)
2857 functionality. Avoids code duplication.
2858 * pow.c, mpz_powm.c: Include mpz_powincl.c
2860 * mpz_dmincl.c: New file containing general division code. Avoids
2862 * mpz_dm.c (mpz_divmod), mpz_mod.c (mpz_mod), mdiv.c (mdiv): Include
2865 * _mpz_get_str: Don't call memmove, unless HAS_MEMMOVE is defined.
2866 Instead, write the overlapping memory copying inline.
2868 * mpz_dm_ui.c: New name for mpz_divmod_ui.c (SysV file name limit).
2870 * longlong.h: Don't use #elif.
2871 * mpz_do_sqrt.c: Likewise.
2873 * longlong.h: Use __asm__ instead of asm.
2874 * longlong.h (sparc udiv_qrnnd): Make it to one string over several
2877 * longlong.h: Preend __ll_ to B, highpart, and lowpart.
2879 * longlong.h: Move array t in count_leading_zeros to the new file
2880 mp_clz_tab.c. Rename the array __clz_tab.
2881 * All files: #ifdef for traditional C compatibility.
2883 Wed Jul 3 11:42:14 1991 Torbjorn Granlund (tege@zevs.sics.se)
2885 * mpz_and: Initialize res_ptr always (used to be initialized only
2888 * longlong.h (umul_ppmm [C variant]): Make __ul...__vh
2889 `unsigned int', and cast the multiplications. This way
2890 compilers more easily can choose cheaper multiplication
2893 * mpz_mod_2exp: Handle input argument < modulo argument.
2894 * mpz_many: Make sure mp_size is the type for sizes, not int.
2896 * mpz_init, mpz_init_set*, mpq_init, mpq_add, mpq_sub, mpq_mul,
2897 mpq_div: Change mpz_init* interface. Structure pointer as first
2898 arg to initialization function, no longer *return* struct.
2900 Sun Jun 30 19:21:44 1991 Torbjorn Granlund (tege@zevs.sics.se)
2902 * Rename mpz_impl_sqrt.c to mpz_do_sqrt.c to satisfy SysV 14
2903 character file name length limit.
2905 * Most files: Rename MINT to MP_INT. Rename MRAT to MP_RAT.
2906 * mpz_sizeinb.c: New file with function mpz_sizeinbase.
2907 * mp_bases.c: New file, with array __mp_bases.
2908 * _mpz_get_str, _mpz_set_str: Remove struct bases, use extern
2910 * mout, mpz_out_str: Use array __mp_bases instead of function
2912 * mpz_get_cvtlen.c: Remove.
2915 Sat Jun 29 21:57:28 1991 Torbjorn Granlund (tege@zevs.sics.se)
2917 * longlong.h (__sparc8__ umul_ppmm): Insert 3 nop:s for wr delay.
2918 * longlong.h (___IBMR2__): Define umul_ppmm, add_ssaaaa, sub_ddmmss.
2919 * longlong.h (__sparc__): Don't call .umul; expand asm instead.
2920 Don't define __umulsidi3 (i.e. use default definition).
2922 Mon Jun 24 17:37:23 1991 Torbjorn Granlund (tege@amon.sics.se)
2924 * _mpz_get_str.c (num_to_ascii_lower_case, num_to_ascii_upper_case):
2927 Sat Jun 22 13:54:01 1991 Torbjorn Granlund (tege@zevs.sics.se)
2929 * mpz_gcdext.c: New file.
2931 * mpn_mul: Handle carry and unexpected operand sizes in last
2932 additions/subtractions. (Bug trigged when v1_size == 1.)
2934 * mp*_alloc*: Rename functions to mp*_init* (files to mp*_iset*.c).
2935 * mpq_*: Call mpz_init*.
2937 * mpz_pow_ui, rpow: Use _mpn_mul instead of mult. Restructure.
2939 Wed May 29 20:32:33 1991 Torbjorn Granlund (tege@zevs.sics.se)
2941 * mpz_get_cvtlen: multiply by size.
2943 Sun May 26 15:01:15 1991 Torbjorn Granlund (tege@bella.nada.kth.se)
2947 Fixes from Doug Lea (dl@g.oswego.edu):
2948 * mpz_mul_ui: Loop to MULT_SIZE (not PROD_SIZE). Adjust PROD_SIZE
2950 * mpz_div: Prepend _ to mpz_realloc.
2951 * mpz_set_xs, mpz_set_ds: Fix typos in function name.
2953 Sat May 25 22:51:16 1991 Torbjorn Granlund (tege@bella.nada.kth.se)
2955 * mpz_divmod_ui: New function.
2957 * sdiv: Make the sign of the remainder correct.
2959 Thu May 23 15:28:24 1991 Torbjorn Granlund (tege@zevs.sics.se)
2961 * Alpha-release 0.94.
2963 * mpz_mul_ui: Include longlong.h.
2965 * mpz_perfsqr.c (mpz_perfect_square_p): Call _mpz_impl_sqrt instead
2968 * mpz_impl_sqrt: Don't call "move", inline its functionality.
2970 * mdiv: Use MPN_COPY instead of memcpy.
2971 * rpow, mpz_mul, mpz_mod_2exp: Likewise.
2972 * pow.c: Likewise, and fix bug in the size arg.
2974 * xtom: Don't use mpz_alloc, inline needed code instead. Call
2975 _mpz_set_str instead of mpz_set_str.
2977 * Makefile: Make two libraries, libmp.a and libgmp.a.
2979 Thu May 22 20:25:29 1991 Torbjorn Granlund (tege@zevs.sics.se)
2981 * Add manual to distribution.
2982 * Fold in many missing routines descibed in the manual.
2985 Wed May 22 13:48:46 1991 Torbjorn Granlund (tege@zevs.sics.se)
2987 * mpz_set_str: Make it handle 0x prefix OK.
2989 Sat May 18 18:31:02 1991 Torbjorn Granlund (tege@zevs.sics.se)
2991 * memory.c (_mp_default_reallocate): Swap OLD_SIZE and NEW_SIZE
2993 * mpz_realloc (_mpz_realloc): Swap in call to _mp_reallocate_func.
2996 Thu May 16 20:43:05 1991 Torbjorn Granlund (tege@zevs.sics.se)
2998 * memory.c: Make the default allocations functions global.
2999 * mp_set_fns (mp_set_memory_functions): Make a NULL pointer mean the
3000 default memory function.
3002 Wed May 8 20:02:42 1991 Torbjorn Granlund (tege@zevs.sics.se)
3004 * mpz_div: Handle DEN the same as QUOT correctly by copying DEN->D
3005 even if no normalization is needed.
3006 * mpz_div: Rework reallocation scheme, to avoid excess copying.
3008 * mpz_sub_ui.c, mpz_add_ui.c: New files.
3010 * mpz_cmp.c, mpz_cmp_ui.c: New files.
3012 * mpz_mul_2exp: Handle zero input MINT correctly.
3014 * mpn_rshiftci: Don't handle shift counts > BITS_PER_MP_DIGIT.
3016 * mpz_out_raw.c, mpz_inp_raw.c: New files for raw I/O.
3018 Tue May 7 15:44:58 1991 Torbjorn Granlund (tege@zevs.sics.se)
3020 * mpn_rshift: Don't handle shift counts > BITS_PER_MP_DIGIT.
3021 * mpz_div_2exp: Don't call _mpn_rshift with cnt > BITS_PER_MP_DIGIT.
3022 * gcd, mpz_gcd: Likewise.
3024 * gcd, mpz_gcd: Handle common 2 factors correctly.
3026 Mon May 6 20:22:59 1991 Torbjorn Granlund (tege@zevs.sics.se)
3028 * gmp-impl.h (MPN_COPY): Inline a loop instead of calling memcpy.
3030 * gmp-impl.h, mpz_get_str, rpow: Swap DST and SRC in TMPCOPY* macros.
3032 Sun May 5 15:16:23 1991 Torbjorn Granlund (tege@zevs.sics.se)
3034 * mpz_div: Remove test for QUOT == 0.
3036 Sun Apr 28 20:21:04 1991 Torbjorn Granlund (tege@zevs.sics.se)
3038 * pow: Don't make MOD normalization in place, as it's a bad idea to
3039 write on an input parameter.
3040 * pow: Reduce BASE if it's > MOD.
3041 * pow, mult, mpz_mul: Simplify realloc code.
3043 Sat Apr 27 21:03:11 1991 Torbjorn Granlund (tege@zevs.sics.se)
3045 * Install multplication using Karatsuba's algorithm as default.
3047 Fri Apr 26 01:03:57 1991 Torbjorn Granlund (tege@zevs.sics.se)
3049 * msqrt: Store in ROOT even for U==0, to make msqrt(0) defined.
3051 * mpz_div_2exp.c, mpz_mul_2exp.c: New files for shifting right and
3053 * gmp.h: Add definitions for mpz_div_2exp and mpz_mul_2exp.
3055 * mlshift.c, mrshift.c: Remove.
3057 Wed Apr 24 21:39:22 1991 Torbjorn Granlund (tege@zevs.sics.se)
3059 * mpn_mul: Check only for m2_size == 0 in function header.
3061 Mon Apr 22 01:31:57 1991 Torbjorn Granlund (tege@zevs.sics.se)
3063 * karatsuba.c: New file for Karatsuba's multplication algorithm.
3065 * mpz_random, mpz_init, mpz_mod_2exp: New files and functions.
3067 * mpn_cmp: Fix header comment.
3069 Sun Apr 21 00:10:44 1991 Torbjorn Granlund (tege@zevs.sics.se)
3071 * pow: Switch off initial base reduction.
3073 Sat Apr 20 22:06:05 1991 Torbjorn Granlund (tege@echnaton.sics.se)
3075 * mpz_get_str: Don't generate initial zeros for initial word.
3076 Used to write outside of allocated storage.
3078 Mon Apr 15 15:48:08 1991 Torbjorn Granlund (tege@zevs.sics.se)
3080 * _mpz_realloc: Make it accept size in number of mp_digits.
3081 * Most functions: Use new _mpz_realloc definition.
3083 * mpz_set_str: Remove calls _mp_free_func.
3085 * Most functions: Rename mpn_* to _mpn_*. Rename mpz_realloc to
3087 * mpn_lshift: Redefine _mpn_lshift to only handle small shifts.
3088 * mdiv, mpz_div, ...: Changes for new definition of _mpn_lshift.
3089 * msqrt, mp*_*shift*: Define cnt as unsigned (for speed).
3091 Sat Apr 6 14:05:16 1991 Torbjorn Granlund (tege@musta.nada.kth.se)
3093 * mpn_mul: Multiply by the first digit in M2 in a special
3094 loop instead of zeroing the product area.
3096 * mpz_abs.c: New file.
3098 * sdiv: Implement as mpz_div_si for speed.
3100 * mpn_add: Make it work for second source operand == 0.
3102 * msub: Negate the correct operand, i.e. V before swapping, not
3103 the smaller of U and V!
3104 * madd, msub: Update abs_* when swapping operands, and not after
3107 Fri Apr 5 00:19:36 1991 Torbjorn Granlund (tege@black.nada.kth.se)
3109 * mpn_sub: Make it work for subtrahend == 0.
3111 * madd, msub: Rewrite to minimize mpn_cmp calls. Ensure
3112 mpn_cmp is called with positive sizes (used to be called
3113 incorrectly with negative sizes sometimes).
3115 * msqrt: Make it divide by zero if fed with a negative number.
3116 * Remove if statement at end of precision calculation that was
3119 * itom, mp.h: The argument is of type short, not int.
3121 * mpz_realloc, gmp.h: Make mpz_realloc return the new digit pointer.
3123 * mpz_get_str.c, mpz_set_str.c, mpz_new_str.c: Don't include mp.h.
3125 * Add COPYING to distribution.
3127 * mpz_div_ui.c, mpz_div_si.c, mpz_new_ui.c, mpz_new_si.c: New files.
3129 Fri Mar 15 00:26:29 1991 Torbjorn Granlund (tege@musta.nada.kth.se)
3131 * Add Copyleft headers to all files.
3133 * mpn_mul.c, mpn_div.c: Add header comments.
3134 * mult.c, mdiv.c: Update header comments.
3136 * mpq_add.c, mpq_sub.c, mpq_div.c, mpq_new.c, mpq_new_ui.c,
3137 mpq_free.c: New files for rational arithmetics.
3139 * mpn_lshift.c: Avoid writing the most significant word if it is 0.
3141 * mdiv.c: Call mpn_lshift for the normalization.
3142 * mdiv.c: Remove #ifdefs.
3144 * Makefile: Add ChangeLog to DISTFILES.
3146 * mpn_div.c: Make the add_back code work (by removing abort()).
3147 * mpn_div.c: Make it return if the quotient is size as compared
3148 with the difference NSIZE - DSIZE. If the stored quotient is
3149 larger than that, return 1, otherwise 0.
3150 * gmp.h: Fix mpn_div declaration.
3151 * mdiv.c: Adopt call to mpn_div.
3152 * mpz_div.c: New file (developed from mdiv.c).
3154 * README: Update routine names.
3156 Thu Mar 14 18:45:28 1991 Torbjorn Granlund (tege@musta.nada.kth.se)
3158 * mpq_mul.c: New file for rational multplication.
3160 * gmp.h: Add definitions for rational arithmetics.
3162 * mpn_div: Kludge the case where the high numerator digit > the
3163 high denominator digit. (This code is going to be optimized later.)
3165 * New files: gmp.h for GNU specific functions, gmp-common.h for
3166 definitions common for mp.h and gmp.h.
3168 * Ensure mp.h just defines what BSD mp.h defines.
3170 * pow.c: Fix typo for bp allocation.
3172 * Rename natural number functions to mpn_*, integer functions to
3175 Tue Mar 5 18:47:04 1991 Torbjorn Granlund (tege@musta.nada.kth.se)
3177 * mdiv.c (_mp_divide, case 2): Change test for estimate of Q from
3178 "n0 >= r" to "n0 > r".
3180 * msqrt: Tune the increasing precision scheme, to do fewer steps.
3182 Tue Mar 3 18:50:10 1991 Torbjorn Granlund (tege@musta.nada.kth.se)
3184 * msqrt: Use the low level routines. Use low precision in the
3185 beginning, and increase the precision as the result converges.
3186 (This optimization gave a 6-fold speedup.)
3192 version-control: never