1 Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
4 This file is part of the GNU MP Library.
6 The GNU MP Library is free software; you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation; either version 2.1 of the License, or (at your
9 option) any later version.
11 The GNU MP Library is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public License
17 along with the GNU MP Library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21 2006-05-04 Torbjorn Granlund <tege@swox.com>
23 * Version 4.2.1 released.
25 2006-05-03 Torbjorn Granlund <tege@swox.com>
27 * mpn/powerpc64/vmx/popcount.asm: Conditionally zero extend n.
29 2006-04-27 Torbjorn Granlund <tege@swox.com>
31 * mpz/divexact.c: Call mpz_tdiv_q for large operands.
33 * configure.in (powerpc-*-darwin): Remove -fast, it affects PIC.
35 2006-04-26 Torbjorn Granlund <tege@swox.com>
37 * config.guess: Try to recognize Ultrasparc T1 (as ultrasparct1).
38 * config.sub: Handle ultrasparct1.
40 2006-04-25 Torbjorn Granlund <tege@swox.com>
42 * mpn/sparc64/gmp-mparam.h: Retune, without separation of GNUC and
45 2006-04-19 Torbjorn Granlund <tege@swox.com>
47 * configure.in: Support powerpc eABI.
48 * mpn/powerpc32/eabi.m4: New file.
50 * configure.in: Support powerpc *bsd.
51 * mpn/powerpc64/elf.m4: New name for mpn/powerpc64/linux64.m4.
52 * mpn/powerpc32/elf.m4: New name for mpn/powerpc32/linux.m4.
54 * mpn/powerpc64/linux64.m4 (ASM_END): Quote TOC_ENTRY.
56 2006-04-18 Torbjorn Granlund <tege@swox.com>
58 * configure.in (gmp_mpn_functions_optional): Add lshiftc.
59 (HAVE_NATIVE): Add lshiftc.
61 * tune/speed.h (SPEED_ROUTINE_MPN_ADDSUB_N_CALL): New macro.
62 * tune/common.c (speed_mpn_addsub_n): New function.
63 * tune/speed.c (routine): Add measuring of mpn_addsub_n.
65 * mpn/powerpc64/linux64.m4 (TOC_ENTRY): Define to empty.
66 * mpn/powerpc64/aix.m4 (TOC_ENTRY): Likewise.
67 * mpn/powerpc32/aix.m4 (TOC_ENTRY): Likewise.
69 * mpn/powerpc32/aix.m4 (EXTERN): New, copied form powerpc64/aix.m4.
70 * mpn/powerpc32/mode1o.asm: Use EXTERN.
71 * mpn/powerpc32/linux.m4 (EXTERN): Provide dummy definition.
72 * mpn/powerpc32/darwin.m4 (EXTERN): Likewise.
74 2006-04-13 Torbjorn Granlund <tege@swox.com>
76 * tests/devel/try.c (choice_array): Add mpn_addsub_n[c].
78 2006-04-12 Torbjorn Granlund <tege@swox.com>
80 * extract-dbl.c: Don't rely on undefined casts to mp_limb_signed_t.
82 * configure.in: Disable AC_C_RESTRICT for now.
83 * mpn/generic/diveby3.c: Don't use restict keyword for now.
85 2006-04-11 Torbjorn Granlund <tege@swox.com>
87 * gmp-h.in (__GNU_MP_VERSION_PATCHLEVEL): Bump.
89 * aclocal.m4: Regenerate with patched libtool.
91 * mpn/asm-defs.m4 (ASM_END): Provide (empty) default.
93 2006-04-08 Torbjorn Granlund <tege@swox.com>
95 * configure.in (gmp_mpn_functions_optional): Add addsub.
97 * Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*):
100 * gmpxx.h: Remove missed MPFR references.
102 * gmp-impl.h (TMP_*, WANT_TMP_DEBUG): Don't expect marker argument;
103 define TMP_SALLOC and TMP_BALLOC.
105 2006-04-05 Torbjorn Granlund <tege@swox.com>
107 * tal-notreent.c (__gmp_tmp_mark): Add "struct" tag for tmp_marker.
108 (__gmp_tmp_free): Likewise.
110 2006-03-26 Torbjorn Granlund <tege@swox.com>
112 * Version 4.2 released.
114 * mpn/powerpc64/aix.m4 (LEA): Renamed from LDSYM.
115 * mpn/powerpc64/darwin.m4: Likewise.
116 * mpn/powerpc64/linux64.m4: Likewise.
117 * mpn/powerpc64/vmx/popcount.asm: Use LEA, not LDSYM.
119 2006-03-23 Torbjorn Granlund <tege@swox.com>
121 * gmp-impl.h: (class gmp_allocated_string): Prefix strlen with std::.
123 * gmpxx.h (__GMP_DEFINE_TERNARY_EXPR2): Remove for now.
124 (struct __gmp_ternary_addmul2): Likewise.
125 (struct __gmp_ternary_submul2): Likewise.
127 * gmpxx.h: #include <cstring>.
128 (struct __gmp_alloc_cstring): Prefix strlen with std::.
130 * mpn/x86/pentium/com_n.asm: Add TEXT and ALIGN.
131 * mpn/x86/pentium/copyi.asm: Likewise.
132 * mpn/x86/pentium/copyd.asm: Likewise.
134 2006-03-22 Torbjorn Granlund <tege@swox.com>
136 * gmp-h.in: Add a "using std::FILE" for C++.
137 (_GMP_H_HAVE_FILE): Check also _ISO_STDIO_ISO_H.
139 * gmpxx.h: Remove mpfr code.
140 * tests/cxx: Likewise.
142 * gmp-impl.h (FORCE_DOUBLE): Rename a tempvar to avoid a clash with
143 GNU/Linux public include file.
145 * configure.in (powerpc64, darwin): New optional, gcc_cflags_subtype.
146 Grab powerpc32/darwin.m4 for ABI=mode32.
148 * configure.in: Use host_cpu whenever just the cpu type is needed.
150 2006-03-08 Torbjorn Granlund <tege@swox.com>
152 * mpz/get_si.c: Fix a typo.
154 * tests/mpq/t-get_d.c (check_random): Improve random generation for
157 2006-02-28 Torbjorn Granlund <tege@swox.com>
159 * tests/mpq/t-get_d.c (check_random): New function.
160 (main): Call check_random.
162 * mpq/set_d.c: Make choices based on LIMBS_PER_DOUBLE, not
163 BITS_PER_MP_LIMB. Make it work for LIMBS_PER_DOUBLE == 4.
166 * mpz/set_d.c: Make it work for LIMBS_PER_DOUBLE == 4.
168 * extract-dbl.c: Make it work for LIMBS_PER_DOUBLE > 3.
170 2006-02-27 Torbjorn Granlund <tege@swox.com>
172 * mpz/cmp_d.c: Declare `i'.
173 * mpz/cmpabs_d.c: Likewise.
175 2006-02-23 Torbjorn Granlund <tege@swox.com>
177 * mpn/powerpc32/vmx/copyd.asm: Set right VRSAVE bits.
178 * mpn/powerpc32/vmx/copyi.asm: Likewise.
180 2006-02-22 Torbjorn Granlund <tege@swox.com>
182 * mpn/powerpc32/vmx/logops_n.asm: New file.
184 * mpn/powerpc32/diveby3.asm: Rewrite.
186 2006-02-21 Torbjorn Granlund <tege@swox.com>
188 * mpn/powerpc32/vmx/copyi.asm: New file.
189 * mpn/powerpc32/vmx/copyd.asm: New file.
191 2006-02-17 Torbjorn Granlund <tege@swox.com>
193 * mpn/alpha/ev6/nails/aors_n.asm (CYSH): Import proper setting from
196 2006-02-16 Torbjorn Granlund <tege@swox.com>
198 * mpn/alpha/ev6/addmul_1.asm: Correct slotting comments.
200 2006-02-15 Torbjorn Granlund <tege@swox.com>
202 * tests/devel/anymul_1.c: Copy error reporting code from addmul_N.c.
204 * tests/devel/addmul_N.c: New file.
205 * tests/devel/mul_N.c: New file.
207 * mpn/alpha/default.m4 (PROLOGUE_cpu): Align functions at 16-byte
210 * mpn/alpha/ev6/nails/aors_n.asm: New file.
211 * mpn/alpha/ev6/nails/add_n.asm: Remove.
212 * mpn/alpha/ev6/nails/sub_n.asm: Remove.
214 * mpn/alpha/ev6/nails/addmul_1.asm: Rewrite.
215 * mpn/alpha/ev6/nails/submul_1.asm: Likewise.
216 * mpn/alpha/ev6/nails/mul_1.asm: Likewise.
218 * mpn/alpha/ev6/nails/addmul_2.asm: Use L() for labels.
219 * mpn/alpha/ev6/nails/addmul_3.asm: Use L() for labels.
220 * mpn/alpha/ev6/nails/addmul_4.asm: Use L() for labels.
222 2006-02-13 Torbjorn Granlund <tege@swox.com>
224 * mpn/powerpc32/diveby3.asm: Trivially reorder loop insns to save
227 2006-02-10 Torbjorn Granlund <tege@swox.com>
229 * mpn/powerpc64/sqr_diagonal.asm: Software pipeline.
231 * mpn/powerpc64/vmx/popcount.asm: Add prefetching.
233 2006-02-04 Torbjorn Granlund <tege@swox.com>
235 * mpn/powerpc64/vmx/popcount.asm: Remove mpn_hamdist partial code.
236 Move compare for huge n so that it is always executed.
238 2006-02-03 Torbjorn Granlund <tege@swox.com>
240 * mpn/powerpc32/linux.m4 (LEA): Add support for PIC.
242 * configure.in (powerpc): New optional, gcc_cflags_subtype.
244 * mpn/powerpc64/linux64.m4 (PROLOGUE_cpu): Align function start to
246 * mpn/powerpc64/aix.m4: Likewise.
247 * mpn/powerpc64/darwin.m4: Likewise.
249 * mpn/powerpc64/copyi.asm: Align loop to 16-multiple.
250 * mpn/powerpc64/copyd.asm: Likewise
252 * configure.in (powerpc): Add vmx to relevant paths.
254 * mpn/powerpc64/linux64.m4 (DEF_OBJECT): Accept 2nd argument, for
256 * mpn/powerpc64/aix.m4: Likewise.
257 * mpn/powerpc64/darwin.m4: Likewise.
259 * mpn/powerpc32/linux.m4 (DEF_OBJECT, END_OBJECT): New macros,
260 inherited from powerpc64 versions.
261 * mpn/powerpc32/aix.m4: Likewise.
262 * mpn/powerpc32/darwin.m4: Likewise.
264 * mpn/powerpc64/vmx/popcount.asm: New file, for ppc32 and ppc64.
265 * mpn/powerpc32/vmx/popcount.asm: New file, grabbing above file.
267 2006-01-22 Torbjorn Granlund <tege@swox.com>
269 * configure.in: Generalize OS-dependent patterns for powerpcs.
271 2006-01-20 Torbjorn Granlund <tege@swox.com>
273 * config.guess: Recognize power4 and up under linux-gnu.
274 * config.sub: Generalize power recognition code.
275 * acinclude.m4 (POWERPC64_PATTERN): Add 64-bit powerpc processors.
276 * configure.in: Recognize powerpc procssors masquerading as power
279 2006-01-17 Torbjorn Granlund <tege@swox.com>
281 * mpn/generic/diveby3.c: Use GMP standard parameter names. Nailify
282 alternative code. Use restrict for params.
284 * configure.in: Recognize andn_n as not needing nailification.
286 * tests/mpq/t-equal.c (check_various): Disable a test that gives common
287 factors for GMP_NUMB_BITS == 62.
289 2006-01-16 Torbjorn Granlund <tege@swox.com>
291 * mpn/generic/get_str.c (mpn_sb_get_str): Fix digit count computation,
292 was inaccurate for nails.
294 2006-01-15 Torbjorn Granlund <tege@swox.com>
296 * mpn/x86_64/mode1o.asm: Remove unneeded carry register zeroing.
298 2006-01-08 Torbjorn Granlund <tege@swox.com>
300 * mpn/alpha/ev6/sqr_diagonal.asm: New file.
302 2006-01-06 Torbjorn Granlund <tege@swox.com>
304 * mpn/generic/mullow_n.c (MUL_BASECASE_ALLOC): New #define.
305 (mpn_mullow_n): Use it.
307 * mpn/powerpc64/aix.m4 (EXTERN): Define to import symbol.
308 (LDSYM): Remove [RW] attribute.
309 * mpn/powerpc64/linux64.m4 (EXTERN): Dummy definition.
310 * mpn/powerpc64/darwin.m4 (EXTERN): Likewise.
312 2006-01-05 Torbjorn Granlund <tege@swox.com>
314 * mpn/powerpc64/linux64.m4: Move toc entry generation from direct at
315 DEF_OBJECT to delayed via LDSYM, define ASM_END to output it.
316 * mpn/powerpc64/aix.m4: Likewise.
317 * mpn/powerpc64/darwin.m4: Define a dummy ASM_END.
319 2006-01-03 Torbjorn Granlund <tege@swox.com>
321 * configure.in: Update bugs reporting address.
323 2006-01-02 Torbjorn Granlund <tege@swox.com>
325 * mpn/powerpc64/linux64.m4 (CALL): New macro.
326 * mpn/powerpc64/aix.m4: Likewise.
327 * mpn/powerpc64/darwin.m4: Likewise, also define macro "DARWIN".
329 2005-12-18 Torbjorn Granlund <tege@swox.com>
331 * mpf/ui_div.c: Implement workaround for GCC bug triggered on alpha.
332 * mpf/set_q.c: Likewise.
334 2005-12-16 Torbjorn Granlund <tege@swox.com>
336 * mpn/generic/tdiv_qr.c: Remove statement with no effect.
337 Rename dead variable to `dummy'.
339 2005-12-15 Torbjorn Granlund <tege@swox.com>
341 * demos/pexpr.c (setup_error_handler): Add a missing ";".
343 2005-11-27 Torbjorn Granlund <tege@swox.com>
345 * mpn/generic/mul.c: Crudely call mpn_mul_fft_full before checking
346 for unbalanced operands.
348 * mpn/generic/mul_fft.c: Remove many scalar divisions.
349 (mpn_mul_fft_lcm): Simplify.
350 (mpn_mul_fft_decompose): Rewrite to handle arbitrarily unbalanced
353 2005-11-22 Torbjorn Granlund <tege@swox.com>
355 * configure.in: Properly recognize all 32-bit Solaris releases.
357 2005-11-10 Torbjorn Granlund <tege@swox.com>
359 * mpn/generic/mul_fft.c: Inline mpn_fft_mul_2exp_modF,
360 mpn_fft_add_modF and mpn_fft_normalize.
362 2005-11-02 Torbjorn Granlund <tege@swox.com>
364 * tests/mpz/reuse.c: Increase operand size, decrease # of reps.
366 2005-10-31 Torbjorn Granlund <tege@swox.com>
368 * mpz/pprime_p.c (mpz_probab_prime_p): Considerably limit trial
371 * mpz/perfpow.c (mpz_perfect_power_p): Use mpz_divisible_ui_p instead
374 * mpz/divegcd.c: Correct probability number for GCD == 1.
376 * mpn/x86: Add cycle counts for array of x86 processors.
378 * mpn/x86/k7/mod_34lsub1.asm: Remove spurious mentions of ebp.
380 * mpn/powerpc32: Add POWER5 timings.
382 * mpn/powerpc32/README: Describe global reference variations.
384 * mpn/generic/dive_1.c: Whitespace cleanup.
386 * mpn/alpha/ev6/nails/addmul_1.asm: Correct comments on slotting.
387 * mpn/alpha/ev6/nails/addmul_2.asm: Likewise.
388 * mpn/alpha/ev6/nails/addmul_4.asm: Likewise.
390 * mpf/out_str.c: List some allocation improvement ideas.
392 * doc/gmp.texi: Update many URLs and email addresses.
394 * gmp-h.in (_GMP_H_HAVE_FILE): Check also _STDIO_H_INCLUDED.
396 2005-10-26 Torbjorn Granlund <tege@swox.com>
398 * tune/tuneup.c (tune_mullow): Update param.max_size for each threshold
401 * configure.in (POWERPC64_PATTERN/*-*-darwin*): Set
402 SPEED_CYCLECOUNTER_OBJ_mode64 and cyclecounter_size_mode64.
403 (POWERPC64_PATTERN/*-*-linux*): Likewise.
405 2005-10-03 Torbjorn Granlund <tege@swox.com>
407 * demos/factorize.c (factor_using_division_2kp): Honor verbose flag.
408 (factor_using_pollard_rho): Divide out new factor before it's
409 clobbered. Don't stop factoring after a composite factor was found.
411 2005-09-17 Torbjorn Granlund <tege@swox.com>
413 * demos/pexpr.c (fns): Add factorial keywords.
415 2005-08-16 Torbjorn Granlund <tege@swox.com>
417 * tune/Makefile.am (EXTRA_DIST): Change "amd64" => "x86_64".
418 * mpn/Makefile.am (TARG_DIST): Change "amd64" => "x86_64".
420 2005-08-15 Torbjorn Granlund <tege@swox.com>
422 * configure.in: Change "amd64" => "x86_64".
424 2005-06-13 Torbjorn Granlund <tege@swox.com>
426 * mpn/generic/pre_mod_1.c: Canonicalize variable names.
428 * mpn/generic/divrem.c: Rate qxn test as UNLIKELY.
430 * tune/tuneup.c (tune_mullow): Fix all max_size fields.
432 * gmp-impl.h (SQR_TOOM3_THRESHOLD_LIMIT): New #define.
433 * tune/tuneup.c (tune_sqr): Use SQR_TOOM3_THRESHOLD_LIMIT.
434 (sqr_toom3_threshold): Initialize from SQR_TOOM3_THRESHOLD_LIMIT.
436 * mpn/generic/mul_n.c (mpn_sqr_n): Use SQR_TOOM3_THRESHOLD_LIMIT.
438 * gmp-impl.h (mpn_nand_n, mpn_iorn_n, mpn_nior_n, mpn_xnor_n):
441 2005-06-12 Torbjorn Granlund <tege@swox.com>
443 * mpn/alpha/ev6/sub_n.asm: Analogous changes as to add_n.asm last.
445 2005-06-11 Torbjorn Granlund <tege@swox.com>
447 * mpn/alpha/ev6/add_n.asm: Rewrite inner loop to load later.
448 Add mpn_add_nc entry.
450 * mpn/alpha/ev6/addmul_1.asm: Remove redundant initial loads.
452 2005-06-07 Torbjorn Granlund <tege@swox.com>
454 * mpn/generic/dive_1.c: Use variable h for upper umul_ppmm result.
456 2005-06-04 Torbjorn Granlund <tege@swox.com>
458 * tests/devel/try.c (choice_array): Exclude mpn_preinv_mod_1 unless
460 (choice_array): Exclude mpn_sqr_basecase if SQR_KARATSUBA_THRESHOLD
463 2005-06-03 Torbjorn Granlund <tege@swox.com>
465 * mpn/alpha/ev6/addmul_1.asm: Prefix all labels with "$".
466 * mpn/alpha/ev6/mul_1.asm: Likewise.
468 2005-06-02 Torbjorn Granlund <tege@swox.com>
470 * tests/refmpn.c (refmpn_divmod_1c_workaround): Implement workaround
471 to gcc 3.4.x bug triggered on powerpc64 with 32-bit ABI.
473 2005-06-01 Torbjorn Granlund <tege@swox.com>
475 * tests/devel/try.c (main): Fix a typo.
477 2005-05-31 Torbjorn Granlund <tege@swox.com>
479 * mpn/alpha/ev6/addmul_1.asm: Rewrite for L1 cache, add prefetch.
481 2005-05-30 Torbjorn Granlund <tege@swox.com>
483 * tests/misc.c (tests_rand_start): Mask random seed to 32 bits.
485 2005-05-29 Torbjorn Granlund <tege@swox.com>
487 * mpn/powerpc64/mode32/mul_1.asm: Handle BROKEN_LONGLONG_PARAM.
488 * mpn/powerpc64/mode32/addmul_1.asm: Likewise.
489 * mpn/powerpc64/mode32/submul_1.asm: Likewise.
491 * mpn/powerpc32/mode1o.asm: Rewrite to actually work.
493 * mpn/powerpc32/aix.m4 (LEA): New macro.
494 (ASM_END): New macro.
496 * mpn/powerpc32/linux.m4: New file.
497 * mpn/powerpc32/darwin.m4: New file.
498 * configure.in: Use linux.m4 and darwin.m4.
499 (powerpc64-linux-gnu): Add support for mode32.
501 2005-05-25 Torbjorn Granlund <tege@swox.com>
503 * mpn/generic/mullow_n.c: Remove FIXME mentioning fixed flaw.
505 * tests/mpz/t-cmp_d.c (check_one): Fix printf fmt string typo.
507 * demos/isprime.c: #include stdlib.h.
508 * tests/rand/t-urbui.c: Likewise.
509 * tests/rand/t-urmui.c: Likewise.
511 * tests/mpz/t-popcount.c (check_random): Remove spurious printf arg.
513 2005-05-24 Torbjorn Granlund <tege@swox.com>
515 * tests/devel/try.c (param_init) [TYPE_GET_STR]: Set retval field.
516 (compare): Handle SIZE_GET_STR as SIZE_RETVAL.
518 * tests/refmpn.c (refmpn_get_str): Rewrite to make it work.
520 2005-05-23 Torbjorn Granlund <tege@swox.com>
522 * longlong.h (many places): Remove lvalue casts.
524 * gmp-impl.h (MPF_SIGNIFICANT_DIGITS): Cast prec to avoid overflow
527 * mpn/alpha/ev6/add_n.asm: Prefetch using ldl.
528 * mpn/alpha/ev6/sub_n.asm: Likewise.
530 * mpn/alpha/ev6/slot.pl (optable): Recognize negq and ldl.
532 2005-05-22 Torbjorn Granlund <tege@swox.com>
534 * mpn/alpha/ev67/popcount.asm: Prefetch.
535 * mpn/alpha/ev67/hamdist.asm: Prefetch.
537 * longlong.h (add_ssaaaa) [x86]: Remove lvalue casts.
538 (sub_ddmmss) [x86]: Likewise.
540 * tests/devel/try.c (param_init) [TYPE_MPZ_JACOBI]: Add DATA_SRC1_ODD.
541 (param_init) [TYPE_MPZ_KRONECKER]: Clear inherited DATA_SRC1_ODD.
542 (param_init) [TYPE_DIVEXACT_1]: Use symbolic name DIVISOR_LIMB.
544 2005-05-21 Torbjorn Granlund <tege@swox.com>
546 * tests/devel/try.c (param_init) [TYPE_MPZ_JACOBI]: Initialize divisor
547 field according to UDIV_NEEDS_NORMALIZATION.
549 * mpz/mul_i.h: Remove left-over TMP_XXXX marker arguments.
551 2005-05-20 Torbjorn Granlund <tege@swox.com>
553 * mpn/x86/pentium4/sse2/addmul_1.asm (mpn_addmul_1c): Put carry in
556 * mpn/generic/sqr_basecase.c (mpn_sqr_basecase, addmul_2 version):
557 Avoid accesses out-of-bound in MPN_SQR_DIAGONAL applicate code.
559 2005-05-19 Torbjorn Granlund <tege@swox.com>
561 * mpn/alpha/diveby3.asm: Make it actually work.
563 * gmp-impl.h (MULLOW_BASECASE_THRESHOLD_LIMIT): New #define.
564 * mpn/generic/mullow_n.c: Use fixed stack allocation for the smallest
565 operands; use TMP_S* allocation for medium operands.
567 * gmp-impl.h: Remove nested TUNE_PROGRAM_BUILD test.
569 2005-05-18 Torbjorn Granlund <tege@swox.com>
571 * mpn/generic/mul_n.c: Make squaring and multiplication code more
572 similar. Use TMP_S* functions.
574 * gmp-impl.h (TMP_DECL, TMP_MARK, TMP_FREE): Get rid of argument.
575 (TMP_SALLOC): New macro for "small" allocations.
576 (TMP_BALLOC): New macro for "big" allocations.
577 (TMP_SDECL, TMP_SMARK, TMP_SFREE): New macros for functions that use
579 (WANT_TMP_ALLOCA): Make default functions choose alloca or reentrant
580 functions, depending on size.
582 * *.c: Remove TMP_XXXX marker arguments.
584 * acinclude.m4 (WANT_TMP): Want tal-reent.lo also for alloca case.
586 2005-05-15 Torbjorn Granlund <tege@swox.com>
588 * gmp-impl.h (udiv_qrnnd_preinv2): Pull an add into add_ssaaaa.
589 (udiv_qrnnd_preinv2gen): Likewise.
591 2005-05-14 Torbjorn Granlund <tege@swox.com>
593 * longlong.h (add_ssaaaa) [x86_64]: Restrict allowed immediate
595 * (sub_ddmmss) [x86_64]: Likewise.
597 2005-05-02 Torbjorn Granlund <tege@swox.com>
599 * acinclude.m4 (GMP_HPC_HPPA_2_0): Make gmp_tmp_v1 sed pattern handle
600 version numbers like B.11.X.32509-32512.GP.
602 * mpn/m68k/aors_n.asm: Correct MULFUNC_PROLOGUE.
604 * mpf/inp_str.c: Use plain int for mpf_set_str return value (works
607 * acinclude.m4 (GMP_ASM_POWERPC_PIC_ALWAYS): Handle darwin's assembly
609 (long long reliability test 1): New GMP_PROG_CC_WORKS_PART test.
610 (long long reliability test 2): New GMP_PROG_CC_WORKS_PART test.
612 * configure.in: Add mode64 support for darwin. Use darwin.m4.
613 Add cflags_opt flags for mode32 darwin.
615 * mpn/asm-defs.m4 (PIC_ALWAYS): Define PIC just iff PIC_ALWAYS = "yes".
617 * mpn/powerpc64/darwin.m4: New file.
619 * mpn/powerpc64/linux64.m4: Remove TOCREF, add LDSYM.
620 Rework DEF_OBJECT to need just one argument.
621 * mpn/powerpc64/aix.m4: Likewise.
623 2005-05-01 Torbjorn Granlund <tege@swox.com>
625 * mpn/generic/popham.c: Compute final summation differently for 64-bit.
627 * tests/mpz/t-popcount.c (check_random): New function.
630 2005-04-09 Torbjorn Granlund <tege@swox.com>
632 * mpn/powerpc64/copyi.asm: If HAVE_ABI_mode32, ignore upper 32 bits of
634 * mpn/powerpc64/copyd.asm: Likewise.
635 * mpn/powerpc64/sqr_diagonal.asm: Likewise.
636 * mpn/powerpc64/lshift.asm: Likewise.
637 * mpn/powerpc64/rshift.asm: Likewise.
639 2005-04-08 Torbjorn Granlund <tege@swox.com>
641 * mpn/generic/rootrem.c: Allocate PP_ALLOC limbs also for qp.
643 2005-04-07 Torbjorn Granlund <tege@swox.com>
645 * mpn/powerpc32/add_n.asm: Add nc entry point.
646 * mpn/powerpc32/sub_n.asm: Likewise.
648 * mpn/alpha/add_n.asm: Add correct cycle/limb numbers.
649 * mpn/alpha/sub_n.asm: Likewise.
650 * mpn/alpha/ev5/add_n.asm: Likewise.
651 * mpn/alpha/ev5/sub_n.asm: Likewise.
653 2005-03-31 Torbjorn Granlund <tege@swox.com>
655 * mpn/x86/k7/gmp-mparam.h: Fix typo in last change.
657 2005-03-19 Torbjorn Granlund <tege@swox.com>
659 * mpn/alpha/gmp-mparam.h: Update.
660 * mpn/alpha/ev5/gmp-mparam.h: Update.
661 * mpn/alpha/ev6/gmp-mparam.h: Update.
663 * mpn/x86/p6/mmx/gmp-mparam.h: Update.
664 * mpn/x86/pentium4/sse2/gmp-mparam.h: Update.
665 * mpn/x86/k7/gmp-mparam.h: Update.
667 * tests/mpz/t-gcd.c (main): Honor command line reps argument.
669 * tune/speed.h (SPEED_ROUTINE_MPN_GCD_CALL): Simplify and correct code
670 for generating test operands.
672 2005-01-13 Torbjorn Granlund <tege@swox.com>
674 * gmp-impl.h (MPN_SIZEINBASE): Count bits in type size_t.
675 (MPN_SIZEINBASE_16): Likewise.
677 2004-12-17 Torbjorn Granlund <tege@swox.com>
679 * tune/speed.c (run_gnuplot): Use lines, not linespoints.
680 Output a reset gnuplot command initially.
682 2004-12-04 Torbjorn Granlund <tege@swox.com>
684 * mpn/generic/random2.c (gmp_rrandomb): Rework again.
685 * mpz/rrandomb.c (gmp_rrandomb): Likewise.
687 2004-11-24 Torbjorn Granlund <tege@swox.com>
689 * mpn/alpha/diveby3.asm: Use correct prefetch instruction.
691 2004-11-19 Torbjorn Granlund <tege@swox.com>
693 * mpn/alpha/diveby3.asm: Add ",gp" glue in PROLOGUE.
694 Add r31 dummy operand to `br' instruction.
696 2004-11-17 Torbjorn Granlund <tege@swox.com>
698 * configure.in: Invoke AC_C_RESTRICT.
700 2004-11-16 Torbjorn Granlund <tege@swox.com>
702 * mpn/alpha/diveby3.asm: New file.
704 2004-11-10 Torbjorn Granlund <tege@swox.com>
706 * mpn/generic/popham.c: Add comment.
708 2004-11-05 Torbjorn Granlund <tege@swox.com>
710 * config.guess: Strip any PPC string in /proc/cpuinfo.
711 Recognize 970 in that code.
713 2004-10-25 Torbjorn Granlund <tege@swox.com>
715 * mpn/powerpc64/README: Update POWER5/PPC970 pipeline information.
717 * mpn/generic/mul_basecase.c (MAX_LEFT): Add comment.
719 * doc/gmp.texi: Consistently use "x86" denotation.
720 (Assembler SIMD Instructions): Mention SSE2 usage.
722 * demos/pexpr.c (main): Handle "negative" base in mpz_sizeinbase call.
724 2004-10-16 Torbjorn Granlund <tege@swox.com>
726 * configure.in: Support icc under x86.
727 (ia64-*-linux*): Pass -no-gcc to icc.
729 2004-10-15 Torbjorn Granlund <tege@swox.com>
731 * longlong.h (ia64 umul_ppmm): Add version for icc.
733 * configure.in: Support icc under ia64-*-linux*.
735 * acinclude.m4: New "compiler works" test for icc 8.1 bug.
736 (GMP_PROG_CC_IS_GNU): Don't let Intel's icc fool us it is GCC.
738 2004-10-14 Torbjorn Granlund <tege@swox.com>
740 * acinclude.m4 (GMP_ASM_W32): Try also "data4".
742 * longlong.h: Exclude masquerading __INTEL_COMPILER from ia64 asm.
743 * gmp-impl.h: Likewise.
745 2004-10-12 Torbjorn Granlund <tege@swox.com>
747 * tests/devel/try.c: Handle mpn_mul_2 like mpn_addmul_2.
749 * tune/speed.c (routine): Make R parameter optional for mpn_mul_2.
751 2004-10-11 Torbjorn Granlund <tege@swox.com>
753 * mpn/sparc64/addmul_1.asm: Update a comment.
755 * tests/devel/aors_n.c: #include tests.h.
756 * tests/devel/anymul_1.c: Likewise.
757 * tests/devel/shift.c: Likewise.
758 * tests/devel/copy.c: Likewise.
760 * tests/devel/aors_n.c: Handle also mpn_addlsh1_n, mpn_sublsh1_n,
761 mpn_rsh1add_n, and mpn_rsh1sub_n.
763 * tests/devel/Makefile.am (EXTRA_PROGRAMS): Updates for yesterday's
764 file removals and additions.
766 2004-10-10 Torbjorn Granlund <tege@swox.com>
768 * tests/devel/copy.c: Handle both MPN_COPY_INCR and MPN_COPY_DECR.
770 * tests/devel/logops_n.c: New file, handle all logical operations.
772 * tests/devel/anymul_1.c: New file, handle mpn_mul_1, mpn_addmul_1, and
774 * tests/devel/mul_1.c: Remove.
775 * tests/devel/addmul_1.c: Remove.
776 * tests/devel/submul_1.c: Remove.
778 * tests/devel/shift.c: New file, handle mpn_lshift and mpn_rshift.
779 * tests/devel/lshift.c: Remove.
780 * tests/devel/rshift.c: Remove.
782 * tests/devel/aors_n.c: New file, handle mpn_add_n and mpn_sub_n.
783 * tests/devel/add_n.c: Remove.
784 * tests/devel/sub_n.c: Remove.
786 2004-10-09 Torbjorn Granlund <tege@swox.com>
788 * mpn/powerpc64/linux64.m4: Define DEF_OBJECT, END_OBJECT, and TOCREF.
789 * mpn/powerpc64/aix.m4: Likewise.
791 2004-10-08 Torbjorn Granlund <tege@swox.com>
793 * mpn/powerpc64/copyi.asm: New file.
794 * mpn/powerpc64/copyd.asm: New file.
795 * gmp-h.in: Remove PPC MPN_COPY variants.
796 * gmp-impl.h: Likewise.
798 2004-10-07 Torbjorn Granlund <tege@swox.com>
800 * configfsf.guess: Patch HP-UX code to accomodate HP compiler's new
801 inability to read from stdin.
803 * mpn/powerpc64/mode64/addsub_n.asm: Remove accidentally added file.
805 2004-09-29 Torbjorn Granlund <tege@swox.com>
807 * gmp-impl.h (x86 ULONG_PARITY): Work around GCC change of "q" register
810 2004-09-28 Paul Zimmermann <Paul.Zimmermann@loria.fr>
812 * mpn/generic/mul_fft.c (mpn_mul_fft): Fix a bug in the choice of the
813 recursive fft parameters.
815 2004-09-20 Torbjorn Granlund <tege@swox.com>
817 * tests/misc.c (tests_rand_start): Default to strtoul for re-seeding.
819 * tests/mpz/t-mul.c (ref_mpn_mul): Fudge tmp allocation for toom3.
821 2004-09-19 Torbjorn Granlund <tege@swox.com>
823 * tests/misc.c (tests_rand_start): Shift tv_usec for better seeding.
825 2004-09-18 Torbjorn Granlund <tege@swox.com>
827 * tests/misc.c (tests_rand_start): Invoke fflush after printing seed.
829 * tests/mpz/t-mul.c (main): Check environment for GMP_CHECK_FFT, run
830 extra FFT tests if set.
831 (ref_mpn_mul): Use library code for kara and toom, but skewded so that
832 we never use the same algorithm that we're testing.
834 (debug_mp): Print just one line of large numbers.
835 (ref_mpn_mul): Rework usage of tp temporary space.
837 2004-09-11 Torbjorn Granlund <tege@swox.com>
839 * mpn/generic/sqr_basecase.c: In variant for HAVE_NATIVE_mpn_addmul_2,
840 accumulate carry also for when HAVE_NATIVE_mpn_addlsh1_n.
842 2004-08-29 Torbjorn Granlund <tege@swox.com>
844 * tests/mpz/t-sizeinbase.c: Disable mpz_fake_bits and check_sample.
846 2004-06-17 Kevin Ryde <kevin@swox.se>
848 * doc/gmp.texi: Use @. when sentence ends with a capital, for good
850 (Language Bindings): Add gmp-d, reported by Ben Hinkle. Update SWI
851 Prolog URL, reported by Jan Wielemaker.
853 2004-06-09 Torbjorn Granlund <tege@swox.com>
855 * configure.in: Handle --enable-fat. Use that to enable x86 fat
856 builds, remove magic meaning of i386-*-*.
858 2004-06-03 Kevin Ryde <kevin@swox.se>
860 * gmp-impl.h (memset): Use a local char* pointer, in case parameter is
861 something else (eg. tune/common.c). Reported by Emmanuel Thomé.
863 2004-06-01 Kevin Ryde <kevin@swox.se>
865 * config.guess (i?86-*-*): Avoid "Illegal instruction" message which
866 goes to stdout on 80386 freebsd4.9.
868 2004-05-23 Torbjorn Granlund <tege@swox.com>
870 * mpn/generic/gcdext.c (gcdext_1_odd): Use masking to avoid jumps.
872 2004-05-22 Torbjorn Granlund <tege@swox.com>
874 * mpn/x86/pentium4/sse2/addmul_1.asm: Add Prescott cycle numbers.
876 * mpn/powerpc32/lshift.asm: Add more cycle numbers.
877 * mpn/powerpc32/rshift.asm: Likewise.
879 2004-05-21 Torbjorn Granlund <tege@swox.com>
881 * gmp-impl.h (mpn_mullow_n, mpn_mullow_basecase): Declare.
883 * tune/Makefile.am: Compile gcdext.c.
885 * gmp-impl.h (GET_STR_THRESHOLD_LIMIT): Lower outrageous value to 150.
887 2004-05-21 Niels Möller <nisse@lysator.liu.se>
889 * tune/speed.h (SPEED_ROUTINE_MPN_GCD_CALL): Ensure first operand is
890 not smaller than 2nd operand.
892 2004-05-17 Kevin Ryde <kevin@swox.se>
894 * gmp-h.in (mpz_get_ui): Use #if instead of plain if, and for nails
895 use ?: same as normal case, to avoid warnings from Borland C++ 6.0.
896 Reported by delta trinity.
898 2004-05-15 Kevin Ryde <kevin@swox.se>
900 * tune/time.c (getrusage_backwards_p): New function
901 (speed_time_init): Use it to exclude broken netbsd1.4.1 getrusage.
902 * configure.in (m68*-*-netbsd1.4*): Remove code pretending getrusage
904 * tune/README (NetBSD 1.4.1 m68k): Update notes.
906 * configure.in (mips*-*-* ABI=n32): Remove gcc_n32_ldflags and
907 cc_n32_ldflags, libtool knows to put the linker in n32 mode.
909 2004-05-15 Torbjorn Granlund <tege@swox.com>
911 * config.guess (powerpc*-*-*): Add more processor types to mfpvr code.
912 * configure.in: Generalize powerpc subtype matching code.
914 * mpz/fac_ui.c: Misc cleanups, spelling corrections.
916 2004-05-14 Kevin Ryde <kevin@swox.se>
918 * mpf/sub.c: When one operand cancels high limbs of the other, strip
919 high zeros on the balance before truncating to destination precision.
920 Truncating first loses accuracy and can lead to a result 0 despite
921 operands being not equal. Reported by John Abbott.
922 Also, ensure exponent is zero when result is zero, for instance if
923 operands are exactly equal.
924 * tests/mpf/t-sub.c (check_data): New function, exercising these.
926 2004-05-12 Kevin Ryde <kevin@swox.se>
928 * configure.in (AC_PROG_RANLIB): New macro, supposedly required by
929 automake, though it doesn't complain.
931 * demos/expr/Makefile.am (ARFLAGS): Add a default setting, to
932 workaround an automake bug.
934 2004-05-10 Kevin Ryde <kevin@swox.se>
936 * */Makefile.in, install-sh, aclocal.m4: Update to automake 1.8.4.
938 * doc/gmp.texi (Demonstration Programs): Add a remark about expression
939 evaluation in the main gmp library.
941 * demos/expr/exprfa.c (mpf_expr_a): Correction to mpX_init, use
942 mpf_init2 to follow requested precision.
943 * demos/expr/exprza.c, demos/expr/exprqa.c: Use wrappers for mpX_init,
944 to make parameters match.
946 * demos/expr/run-expr.c: Don't use getopt, to avoid needing configury
947 for optarg declaration. Remove TRY macro, rename foo and bar to var_a
948 and var_b, for clarity.
949 * demos/expr/expr-impl.h: Don't use expr-config.h.
950 * configure.in (demos/expr/expr-config.h): Remove.
951 * demos/expr/expr-config.in: Remove file.
953 2004-05-08 Kevin Ryde <kevin@swox.se>
955 * doc/configuration (Configure): Update for current automake not
956 copying acinclude.m4 into aclocal.m4.
958 * configure.in, Makefile.am, doc/gmp.texi, doc/configuration,
959 tests/cxx/Makefile.am, demos/expr/Makefile.am, demos/expr/README,
960 demos/expr/expr.c, demos/expr/expr.h, demos/expr/expr-config-h.in,
961 demos/expr/expr-impl.h, demos/expr/run-expr.c, demos/expr/t-expr.c:
962 MPFR now published separately, remove various bits.
963 * mpfr/*, tests/cxx/t-headfr.cc, demos/expr/exprfr.c,
964 demos/expr/exprfra.c: Remove.
966 2004-05-07 Kevin Ryde <kevin@swox.se>
968 * tests/cxx/Makefile.am (TESTS_ENVIRONMENT): Amend c++ shared library
969 path hack, on k62-unknown-dragonfly1.0 /usr/bin/make runs its commands
970 "set -e", so we need an "|| true" in case there's nothing to copy (for
971 instance in a static build).
973 2004-05-06 Kevin Ryde <kevin@swox.se>
975 * mpn/alpha/mode1o.c: Remove, in favour of ...
976 * mpn/alpha/mode1o.asm: New file.
977 * mpn/alpha/alpha-defs.m4 (bwx_available_p): New macro.
979 * tune/amd64.asm: Save rbx in r10 rather than on the stack.
981 * configure.in (x86_64-*-*): Try also "-march=k8 -mno-sse2", in case
982 we're in ABI=32 on an old OS not supporting xmm regs.
983 (GMP_GCC_PENTIUM4_SSE2, GMP_OS_X86_XMM): Run these tests under
984 -march=k8 too, and not under ABI=64.
986 * doc/gmp.texi (Converting Integers): For mpz_get_d, note truncation
987 and overflows. For mpz_get_d_2exp note truncation, note result if
988 OP==0, and cross reference libc frexp.
989 (Rational Conversions): For mpq_get_d, note truncation and overflows.
990 (Converting Floats): For mpf_get_d, note truncation and overflows.
991 For mpf_get_d_2exp, note truncation, note result if OP==0.
992 (Assembler Code Organisation): Note nails subdirectories.
993 Clarification of get_d_2exp OP==0 reported by Sylvain Pion.
995 2004-05-05 Torbjorn Granlund <tege@swox.com>
997 * mpn/generic/mullow_n.c, mpn/generic/mullow_basecase.c: New files
998 (mainly by Niels Möller).
999 * configure.in, mpn/Makefile.am: Add them.
1001 * gmp-impl.h (MULLOW_BASECASE_THRESHOLD, MULLOW_DC_THRESHOLD,
1002 MULLOW_MUL_N_THRESHOLD): Override for TUNE_PROGRAM_BUILD.
1004 * tune/Makefile.am: Compile mullow_n.c.
1005 * tune/common.c (speed_mpn_mullow_n, speed_mpn_mullow_basecase):
1007 * tune/speed.c (routine): Add entries for mpn_mullow_n and
1008 mpn_mullow_basecase.
1009 * tune/speed.h (SPEED_ROUTINE_MPN_MULLOW_N_CALL,
1010 SPEED_ROUTINE_MPN_MULLOW_BASECASE): New #defines.
1011 * tune/tuneup.c (tune_mullow): New function.
1013 * gmp-impl.h (invert_limb): Compute branch-freely.
1015 2004-05-02 Kevin Ryde <kevin@swox.se>
1017 * mpn/amd64/mode1o.asm: Use movabsq to support large model non-PIC.
1018 Use 32-bit insns to save code bytes, and to save a couple of cycles on
1019 the initial setup multiplies.
1021 2004-05-01 Kevin Ryde <kevin@swox.se>
1023 * doc/gmp.texi (References): Update gcc online docs url to
1026 * configure.in (mips*-*-irix[6789]*): Correction to m4 quoting of this
1027 pattern. (Believe the mips64*-*-* part also used picks up all current
1028 irix6 tuples anyway.) Reported by Rainer Orth.
1030 2004-04-30 Kevin Ryde <kevin@swox.se>
1032 * acinclude.m4 (GMP_PROG_CC_X86_GOT_EAX_EMITTED,
1033 GMP_ASM_X86_GOT_EAX_OK): New macros.
1034 (GMP_PROG_CC_WORKS): Use them to detect an old gas bug tickled by
1035 recent gcc. Reported by David Newman.
1037 * doc/gmp.texi (Reentrancy): Note also gmp_randinit_default as an
1038 alternative to gmp_randinit.
1040 2004-04-29 Torbjorn Granlund <tege@swox.com>
1042 * configfsf.guess: Update to 2004-03-12.
1043 * configfsf.sub: Likewise.
1045 2004-04-27 Torbjorn Granlund <tege@swox.com>
1047 * mpz/rrandomb.c (gmp_rrandomb): Rework to avoid extra limb allocation
1048 and to generate even numbers.
1049 * mpn/generic/random2.c (gmp_rrandomb): Likewise.
1051 2004-04-25 Kevin Ryde <kevin@swox.se>
1053 * gmp-impl.h (FORCE_DOUBLE): Don't use an asm with a match constraint
1054 on a memory output, apparently not supported and provokes a warning
1057 2004-04-24 Kevin Ryde <kevin@swox.se>
1059 * longlong.h (count_leading_zeros_gcc_clz,
1060 count_trailing_zeros_gcc_ctz): New macros.
1061 (count_leading_zeros, count_trailing_zeros) [x86]: Use them on gcc
1064 * configure.in (x86-*-* gcc_cflags_cpu): Give a -mtune at the start of
1065 each option list, for use by gcc 3.4 to avoid deprecation warnings
1068 * mpz/aorsmul.c, mpz/aorsmul_i.c, mpz/cfdiv_q_2exp.c,
1069 mpz/cfdiv_r_2exp.c, mpq/aors.c, mpf/ceilfloor.c: Give REGPARM_ATTR()
1070 on function definition too, as demanded by gcc 3.4.
1072 2004-04-22 Kevin Ryde <kevin@swox.se>
1074 * tests/rand/t-lc2exp.c (check_bigc1): New test.
1076 * doc/fdl.texi: Tweak @appendixsubsec -> @appendixsec to match our
1077 preference for this in an @appendix, and because texi2pdf doesn't
1078 support @appendixsubsec directly within an @appendix.
1080 2004-04-20 Kevin Ryde <kevin@swox.se>
1082 * doc/texinfo.tex: Update to 2004-04-07.08 from texinfo 4.7.
1083 * doc/gmp.texi, mpfr/mpfr.texi (@copying): Don't put a line break in
1084 @ref within @copying, recent texinfo.tex doesn't like that.
1086 * demos/perl/GMP.xs (static_functable): Treat cygwin the same as mingw
1089 * */Makefile.in, install-sh: Update to automake 1.8.3.
1090 * ltmain.sh, aclocal.m4, configure: Update to libtool 1.5.6.
1092 * gmp-impl.h (LIMB_HIGHBIT_TO_MASK): Use a compile-time constant
1093 expression, rather than a configure test.
1094 * acinclude.m4, configure.in (GMP_C_RIGHT_SHIFT): Remove, no longer
1096 * tests/t-hightomask.c: New file.
1097 * tests/Makefile.am (check_PROGRAMS): Add it.
1099 * macos/configure (parse_top_configure): Look for PACKAGE_NAME and
1100 PACKAGE_VERSION now used by autoconf.
1101 (what_objects): Only demand 9 object files, as for instance occurs in
1102 the scanf directory.
1103 (asm files): Transform labels L(foo) -> Lfoo. Take func name from
1104 PROLOGUE to support empty "EPILOGUE()". Recognise and subsitute
1105 register name "define()"s.
1106 * macos/Makefile.in (CmnObjs): Add tal-notreent.o.
1108 2004-04-19 Torbjorn Granlund <tege@swox.com>
1110 * tune/speed.h (SPEED_ROUTINE_MPN_ROOTREM): New #define.
1111 (speed_mpn_rootrem): Declare.
1112 * tune/common.c (speed_mpn_rootrem): New function.
1113 * tune/speed.c (routine): Add entry for mpn_rootrem.
1115 2004-04-16 Kevin Ryde <kevin@swox.se>
1117 * doc/fdl.texi: Update from FSF, just fixing a couple of typos.
1119 * macos/configure, macos/Makefile.in: Add printf and scanf directories.
1121 * tests/mpz/t-gcd.c (check_data): New function, exercising K6
1124 2004-04-14 Kevin Ryde <kevin@swox.se>
1126 * doc/gmp.texi (Reentrancy, Random State Initialization): Note
1127 gmp_randinit use of gmp_errno is not thread safe. Reported by Vincent
1130 * doc/gmp.texi (Random State Initialization): Add index entries for
1131 gmp_errno and constants.
1133 * mpn/m68k/README: Update _SHORT_LIMB -> __GMP_SHORT_LIMB.
1135 * configure.in (--enable-mpbsd): Typo Berkley -> Berkeley in help msg.
1137 2004-04-12 Kevin Ryde <kevin@swox.se>
1139 * demos/perl/GMP.xs (static_functable): New macro, use it for all
1140 function tables, to support mingw DLL builds.
1141 * demos/perl/INSTALL (NOTES FOR PARTICULAR SYSTEMS): Remove note on
1142 DLLs, should be ok now.
1144 * demos/perl/sample.pl: Print the module and library versions in use.
1146 * demos/perl/GMP.pm, Makefile.PL (VERSION): Set to '2.00'.
1147 * demos/perl/GMP.pm (COPYRIGHT): New in the doc section.
1149 * Makefile.am: Note 4.1.3 libtool versioning info, and REVISION policy.
1151 * tal-debug.c: Add <stdlib.h> for abort.
1153 2004-04-07 Torbjorn Granlund <tege@swox.com>
1155 * tests/refmpf.c (refmpf_add_ulp): Adjust exponent when needed.
1157 * mpn/generic/random2.c: Rewrite (clone mpz/rrandomb.c).
1159 2004-04-07 Kevin Ryde <kevin@swox.se>
1161 * mpn/x86/k6/gcd_finda.asm: Correction jbe -> jb in initial setups.
1162 Zero flag is wrong here, it relects only the high limb of the compare,
1163 leading to n1>=n2 not satisfied and wrong results. cp[1]==0x7FFFFFFF
1164 with cp[0]>=0x80000001 provokes this.
1166 * doc/gmp.texi (BSD Compatible Functions): Note "pow" name clash under
1167 the pow function description too.
1168 (Language Bindings): Add XEmacs (betas at this stage). Reported by
1171 * tests/refmpn.c (refmpn_mod2): Correction to ASSERTs, r==a is allowed.
1173 * gen-psqr.c (generate_mod): Cast mpz_invert_ui_2exp args, for K&R.
1174 * gen-bases.c, gen-fib.c, gen-psqr.c: For mpz_out_str, use stdout
1175 instead of 0, in case a K&R treats int and FILE* params differently.
1177 2004-04-04 Kevin Ryde <kevin@swox.se>
1179 * gmp-impl.h (BSWAP_LIMB) [amd64]: New macro.
1180 (FORCE_DOUBLE): Use this for amd64 too.
1182 * tests/amd64check.c, tests/amd64call.asm: New files, derived in part
1183 from x86check.c and x86call.asm.
1184 * tests/Makefile.am (EXTRA_libtests_la_SOURCES): Add them.
1185 * configure.in (x86_64-*-* ABI=64): Use them.
1187 2004-04-03 Kevin Ryde <kevin@swox.se>
1189 * mpn/amd64/mode1o.asm: New file.
1190 * mpn/amd64/amd64-defs.m4 (ASSERT): New macro.
1192 * mpn/x86/k7/mmx/divrem_1.asm, mpn/x86/pentium4/sse2/divrem_1.asm: Add
1193 note on how "dr" part of algorithm is handled.
1195 * mpn/x86/k7/dive_1.asm, mpn/x86/k7/mod_34lsub1.asm,
1196 mpn/x86/k7/mode1o.asm: Note Hammer (32-bit mode) speeds.
1198 2004-03-31 Kevin Ryde <kevin@swox.se>
1200 * doc/gmp.texi (Language Bindings): Add GOO, MLGMP and Numerix.
1202 * mpf/mul_2exp.c, mpf/div_2exp.c: Rate u==0 as UNLIKELY.
1204 2004-03-27 Torbjorn Granlund <tege@swox.com>
1206 * mpn/generic/divrem_1.c: Fix typo.
1208 * mpn/generic/sqr_basecase.c: Fix typo.
1210 2004-03-20 Kevin Ryde <kevin@swox.se>
1212 * longlong.h (power, powerpc): Add comments on how we select this code.
1214 * gmp-h.in (mpz_get_ui): Use ?: instead of mask style, gcc treats the
1215 two identically but ?: is a bit clearer.
1217 * insert-dbl.c: Remove file, no longer used, scaling is now integrated
1219 * Makefile.am (libgmp_la_SOURCES): Remove insert-dbl.c.
1220 * gmp-impl.h (__gmp_scale2): Remove prototype.
1222 2004-03-17 Kevin Ryde <kevin@swox.se>
1224 * mpn/x86/fat/fat.c (__gmpn_cpuvec_init, fake_cpuid_table): Add x86_64.
1226 * mpq/get_d.c: Use mpn_tdiv_qr, demand den>0 per canonical form.
1228 2004-03-16 Torbjorn Granlund <tege@swox.com>
1230 * mpn/generic/sqr_basecase.c: Add versions using mpn_addmul_2 and
1233 2004-03-14 Kevin Ryde <kevin@swox.se>
1235 * mpf/mul_ui.c: Incorporate carry from low limbs, for exactness.
1236 * tests/mpf/t-mul_ui.c: New file.
1237 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
1239 * mpf/div.c: Use mpn_tdiv_qr. Use just one TMP_ALLOC. Use full
1240 divisor, since truncating can lose accuracy.
1241 * tests/mpf/t-div.c: New file.
1242 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
1244 * tests/mpf/t-set_q.c, tests/mpf/t-ui_div.c (check_various): Amend
1246 * tests/mpf/t-ui_div.c (check_rand): Exercise r==v overlap.
1248 * tests/refmpf.c, tests/tests.h (refmpf_set_overlap): New function.
1250 * mpf/cmp_si.c [nails]: Correction, cast vval in exp comparisons, for
1251 when vval=-0x800..00 and limb==longlong.
1253 * mpf/cmp_si.c [nails]: Correction, return usign instead of 1 when
1254 uexp==2 but value bigger than an mp_limb_t.
1255 * tests/mpf/t-cmp_si.c (check_data): Add test cases.
1257 * tests/trace.c (mpf_trace): Use ABS(mp_trace_base) to allow for
1258 negative bases used for upper case hex in integer traces.
1260 2004-03-12 Torbjorn Granlund <tege@swox.com>
1262 * mpn/generic/sb_divrem_mn.c: Correct header comment.
1264 2004-03-11 Kevin Ryde <kevin@swox.se>
1266 * aclocal.m4, configure, ltmain.sh: Downgrade to libtool 1.5, version
1267 1.5.2 doesn't remove .libs/*.a files when rebuilding, which is bad for
1268 development when changing contents or with duplicate named files like
1271 Revert this, ie restore AR_FLAGS=cq:
1272 * acinclude.m4 (GMP_PROG_AR): Remove AR_FLAGS=cq, libtool 1.5.2 now
1273 does this itself on detecting duplicate object filenames in piecewise
1276 * randbui.c, randmui.c [longlong+nails]: Correction to conditionals
1279 * mpz/aors_ui.h, mpz/cdiv_q_ui.c, mpz/cdiv_qr_ui.c, mpz/cdiv_r_ui.c,
1280 mpz/cdiv_ui.c, mpz/fdiv_q_ui.c, mpz/fdiv_qr_ui.c, mpz/fdiv_r_ui.c,
1281 mpz/fdiv_ui.c, mpz/gcd_ui.c, mpz/iset_ui.c, mpz/lcm_ui.c,
1282 mpz/set_ui.c, mpz/tdiv_q_ui.c, mpz/tdiv_qr_ui.c, mpz/tdiv_r_ui.c,
1283 mpz/tdiv_ui.c, mpz/ui_sub.c, mpf/div_ui.c, mpf/mul_ui.c
1284 [longlong+nails]: Amend #if to avoid warnings about shift amount.
1286 2004-03-07 Kevin Ryde <kevin@swox.se>
1288 * mpf/reldiff.c: Use rprec+ysize limbs for d, to ensure accurate
1289 result. Inline mpf_abs(d,d) and mpf_cmp_ui(x,0), and rate the latter
1292 * mpf/ui_div.c: Use mpn_tdiv_qr. Use just one TMP_ALLOC. Use full
1293 divisor, since truncating can lose accuracy.
1294 * tests/mpf/t-ui_div.c: New file.
1295 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
1297 * mpf/set_q.c: Expand TMP_ALLOC_LIMBS_2, to make conditional clearer
1298 and avoid 1 limb alloc when not wanted.
1300 * gmp-impl.h (WANT_TMP_DEBUG): Define to 0 if not defined.
1301 (TMP_ALLOC_LIMBS_2): Use "if" within macro rather than "#if", for less
1302 preprocessor conditionals.
1304 * mpf/mul_2exp.c, mpf/div_2exp.c: Add some comments.
1306 * tests/refmpn.c (refmpn_sb_divrem_mn, refmpn_tdiv_qr): Nailify.
1308 2004-03-04 Kevin Ryde <kevin@swox.se>
1310 * gen-psqr.c (print): Add CNST_LIMB in PERFSQR_MOD_TEST, for benefit
1312 * tests/mpn/t-perfsqr.c (PERFSQR_MOD_1): Use CNST_LIMB for K&R.
1314 * doc/configuration (Configure): Remove mkinstalldirs, no longer used.
1316 * acinclude.m4 (GMP_PROG_AR): Remove AR_FLAGS=cq, libtool 1.5.2 now
1317 does this itself on detecting duplicate object filenames in piecewise
1320 * configure.in (hppa2.0*-*-*): Test sizeof(long) == 4 or 8 to verify
1321 ABI=2.0n versus ABI=2.0w. In particular this lets CC=cc_bundled
1322 correctly fall back to ABI=2.0n (we don't automatically add CC=+DD64
1323 to that compiler, currently).
1325 * doc/gmp.texi (Reentrancy): Note C++ mpf_class constructors using
1326 global default precision.
1327 (Random State Miscellaneous): Describe gmp_urandomb_ui as giving N
1329 (C++ Interface Floats): Describe operator= copying the value, not the
1330 precision, and what this can mean about copy constructor versus
1331 default constructor plus assignment.
1333 * mpf/set_q.c: Use mpn_tdiv_qr rather than mpn_divrem, so no shifting.
1334 Don't truncate the divisor, it can make the result inaccurate.
1335 * tests/mpf/t-set_q.c: New file.
1336 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
1338 * mpf/set.c: Use MPN_COPY_INCR, in case r==u and ABSIZ(u) > PREC(r)+1.
1339 No actual bug here, because MPN_COPY has thusfar been an alias for
1340 MPN_COPY_INCR, only an ASSERT failure.
1341 * tests/mpf/t-set.c: New file.
1342 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
1344 * mpf/set.c, mpf/iset.c: Do MPN_COPY last, for possible tail call.
1346 * mpf/set_d.c: Rate d==0 as UNLIKELY. Store size before extract call,
1347 to shorten lifespan of "negative".
1349 * mpf/init.c, mpf/init2.c, mpf/iset_d.c, mpf/iset_si.c,
1350 mpf/iset_str.c, mpf/iset_ui.c: Store prec before alloc call, for one
1351 less live quantity across that call.
1352 * mpf/init.c, mpf/init2.c, mpf/iset_str.c: Store size and exp before
1353 alloc call, to overlap with other operations.
1355 * tests/refmpf.c, tests/tests.h (refmpf_fill, refmpf_normalize,
1356 refmpf_validate, refmpf_validate_division): New functions.
1358 * tests/refmpn.c, tests/tests.h (refmpn_copy_extend,
1359 refmpn_lshift_or_copy_any, refmpn_rshift_or_copy_any): New functions.
1361 * tal-debug.c: Add <string.h> for strcmp.
1363 * tests/cxx/t-istream.cc (check_mpz, check_mpq, check_mpf): Use size_t
1364 for loop index, to quieten g++ warning.
1366 2004-03-01 Torbjorn Granlund <tege@swox.com>
1368 With Karl Hasselström:
1369 * mpn/generic/dc_divrem_n.c (mpn_dc_div_2_by_1): New function, with
1370 meat from old mpn_dc_divrem_n. Accept scratch parameter. Rewrite to
1371 avoid a recursive call.
1372 (mpn_dc_div_3_by_2): New function, with meat from old
1373 mpn_dc_div_3_halves_by_2. Accept scratch parameter.
1374 (mpn_dc_divrem_n): Now just allocate scratch space and call new
1377 2004-02-29 Kevin Ryde <kevin@swox.se>
1379 * longlong.h (count_leading_zeros) [alpha gcc]: New version, inlining
1380 mpn/alpha/cntlz.asm cmpbge technique.
1382 * aclocal.m4, configure, install-sh, missing, ltmain.sh,
1383 */Makefile.in: Update to automake 1.8.2 and libtool 1.5.2.
1385 * doc/gmp.texi (C++ Interface Integers): Note / and % rounding follows
1387 (Exact Remainder): Index entries for divisibility testing algorithm.
1389 * tune/time.c (speed_endtime): Return 0.0 for negative time measured.
1390 Revise usage comments for clarity.
1391 * tune/common.c (speed_measure): Recognise speed_endtime 0.0 for
1394 * tests/mpn/t-get_d.c (check_rand): Correction to nhigh_mask setup.
1396 2004-02-27 Torbjorn Granlund <tege@swox.com>
1398 * tune/tuneup.c (tune_dc, tune_set_str): Up param.step_factor.
1400 * tests/mpz/t-gcd.c: Decrease # of tests to 50.
1402 2004-02-27 Kevin Ryde <kevin@swox.se>
1404 * tests/devel/try.c: Add a comment that this is not for Cray systems.
1406 * mpf/set_q.c: Don't support den(q)<0, demand canonical form in the
1409 2004-02-24 Torbjorn Granlund <tege@swox.com>
1412 * mpn/generic/mul_fft.c (mpn_fft_add_modF): Loop until normalization
1415 2004-02-22 Kevin Ryde <kevin@swox.se>
1417 * acinclude.m4 (GMP_PROG_CC_WORKS, GMP_OS_X86_XMM, GMP_PROG_CXX_WORKS):
1418 Remove files that might look like compiler output, so our "||"
1419 alternatives are not fooled.
1421 * acinclude.m4 (GMP_PROG_CC_WORKS): Add test for lshift_com code
1422 mis-compiled by certain IA-64 HP cc at +O3.
1424 * gmp-impl.h (USE_LEADING_REGPARM): Disable under prof or gprof, for
1425 the benefit of freebsd where .mcount clobbers registers. Spotted by
1427 * configure.in (WANT_PROFILING_PROF, WANT_PROFILING_GPROF): New
1430 2004-02-21 Kevin Ryde <kevin@swox.se>
1432 * configure.in (sparc64-*-*bsd*): Amend -m32 setup for ABI=32, so it's
1433 not used in ABI=64 on the BSD systems.
1435 2004-02-18 Niels Möller <nisse@lysator.liu.se>
1437 * tests/mpz/t-gcd.c (gcdext_valid_p): New function.
1438 (ref_mpz_gcd): Deleted function.
1439 (one_test): Rearranged to call mpz_gcdext first, so that the
1440 returned value can be validated.
1441 (main): Don't use ref_mpz_gcd.
1443 2004-02-18 Torbjorn Granlund <tege@swox.com>
1445 * gmp-impl.h (MPN_TOOM3_MAX_N): Move to !WANT_FFT section.
1447 * tests/mpz/t-mul.c: Exclude special huge operands unless WANT_FFT.
1449 * mpz/rrandomb.c (gmp_rrandomb): Rewrite.
1451 * mpn/generic/mul_n.c (mpn_toom3_sqr_n): Remove write-only variable c5.
1453 2004-02-18 Kevin Ryde <kevin@swox.se>
1455 * mpf/iset_si.c, mpf/iset_ui.c, mpf/set_si.c, mpf/set_ui.c [nails]:
1456 Always store second limb, to avoid a conditional.
1458 * tests/mpf/t-get_ui.c: New file.
1459 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
1460 * tests/mpf/t-get_si.c (check_limbdata): Further tests.
1461 * gmp-impl.h (MP_EXP_T_MAX, MP_EXP_T_MIN): New defines.
1463 * mpf/get_ui.c, mpf/get_si.c: Remove size==0 test, it's covered by
1464 other conditions. Attempt greater clarity by expressing conditions as
1465 based on available data range.
1466 * mpf/get_si.c [nails]: Correction, don't bail on exp > abs_size,
1467 since may still have second limb above radix point available.
1468 * mpf/get_ui.c: Nailify.
1470 2004-02-16 Kevin Ryde <kevin@swox.se>
1472 * mpz/scan0.c, mpz/scan1.c: Use count_trailing_zeros, instead of
1473 count_leading_zeros on limb&-limb.
1475 * mpf/sqrt.c: Use "/ 2" for exp, avoiding C undefined behaviour on
1476 ">>" of negatives. Correction to comment, exp is rounded upwards.
1477 SIZ(r) always prec now, no need for tsize expression. Store EXP(r)
1478 and SIZ(r) where calculated to reduce variable lifespans. Make tsize
1479 mp_size_t not mp_exp_t, though of course those are currently the same.
1481 * gmp-h.in (GMP_ERROR_ALLOCATE, GMP_ERROR_BAD_STRING,
1482 GMP_ERROR_UNUSED_ERROR): Remove, never used or documented, and we
1483 don't want to use globals for communicating error information.
1485 * mpz/gcd_ui.c [nails]: Correction, actually return a value.
1487 * mpn/generic/addmul_1.c, mpn/generic/submul_1.c [nails==1]: Add code.
1489 2004-02-15 Kevin Ryde <kevin@swox.se>
1491 * tests/mpz/t-jac.c (check_data): Remove unnecessary variable
1494 2004-02-14 Kevin Ryde <kevin@swox.se>
1496 * acinclude.m4 (GMP_C_RIGHT_SHIFT): Note that it's "long"s which we're
1499 * mpn/generic/mul_n.c: Add some remarks about toom3 high zero
1502 * mpn/generic/scan0.c, mpn/generic/scan1.c: Remove design issue
1503 remarks. What to do about going outside `up' space is a problem, but
1504 anything to address it would be an incompatible change.
1506 2004-02-11 Kevin Ryde <kevin@swox.se>
1508 * longlong.h (power, powerpc): Use HAVE_HOST_CPU_FAMILY_power and
1509 HAVE_HOST_CPU_FAMILY_powerpc rather than various cpp defines.
1511 * gmp-impl.h: Add remarks about limits.h and Cray etc.
1513 * dumbmp.c (mpz_mul): Set ALLOC(r) for new data block used. Reported
1516 * mpn/pa32/README, mpn/pa64/README (REFERENCES): New sections.
1518 2004-02-10 Torbjorn Granlund <tege@swox.com>
1520 * tests/mpz/t-gcd.c: Decrease # of tests run.
1522 * mpn/*/gmp-mparam.h: Add HGCD values, update TOOM values.
1524 2004-02-01 Torbjorn Granlund <tege@swox.com>
1527 * config.guess: Recognize AMD's hammer processors, return x86_64.
1529 2004-01-24 Kevin Ryde <kevin@swox.se>
1531 * tests/mpf/t-sqrt.c (check_rand1): Further diagnostic printouts.
1533 * mpn/generic/sqrtrem.c (mpn_sqrtrem): Add ASSERT_MPN.
1534 (mpn_dc_sqrtrem): Add casts for K&R.
1536 * mpf/sqrt_ui.c: Nailify.
1538 * mpf/set_z.c: Do MPN_COPY last, for possible tail call.
1540 * doc/gmp.texi (Miscellaneous Float Functions): For mpf_random2, note
1541 exponent is in limbs.
1543 2004-01-22 Kevin Ryde <kevin@swox.se>
1545 * mpf/sqrt.c: Change tsize calculation to get prec limbs result
1546 always, previously got prec+1 when exp was odd.
1547 * tests/mpf/t-sqrt.c (check_rand1): New function, code from main.
1548 (check_rand2): New function.
1550 * mpf/sqrt_ui.c: Change rsize calculation to get prec limbs result,
1551 previously got prec+1.
1552 * tests/mpf/t-sqrt_ui.c: New file.
1553 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
1555 * tests/refmpf.c, tests/tests.h (refmpf_add_ulp,
1556 refmpf_set_prec_limbs): New functions.
1558 * mpz/get_d_2exp.c, mpf/get_d_2exp.c: Remove x86+m68k force to double,
1559 mpn_get_d now does this. Remove res==1.0 check for round upwards,
1560 mpn_get_d now rounds towards zero. Move exp store to make mpn_get_d a
1563 * configure.in (x86-*-*): Use ABI=32 rather than ABI=standard.
1564 Use gcc -m32 when available, to force mode on bi-arch amd64 gcc.
1565 * configure.in, acinclude.m4 (x86_64-*-*): Merge into plain x86 setups
1566 as ABI=64. Support ABI=32, using athlon code. Use gcc -mcpu=k8,
1568 (amd64-*-*): Remove pattern, config.sub only gives x86_64.
1569 * doc/gmp.texi (ABI and ISA): Add x86_64 dual ABIs.
1571 * mpn/amd64/README: Add reference to ABI spec.
1573 2004-01-17 Kevin Ryde <kevin@swox.se>
1575 * tune/README: Remove open/mpn versions of toom3, no longer exist.
1576 * tune/powerpc64.asm: Remove unused L(again).
1577 * tune/time.c (mftb): Note single mftb possible for powerpc64.
1579 * mpn/generic/mode1o.c: Use "c<s" to do underflow detection in last
1580 step, for better parallelism.
1582 * mpn/generic/get_d.c: Preserve comments about hppa fcnv,udw,dbl from
1583 previous mpz_get_d code.
1585 * tune/freq.c: Add some comments about systems not covered.
1587 * gmp-h.in (_GMP_H_HAVE_FILE): Add _MSL_STDIO_H for Metrowerks.
1588 Reported by Tomas Zahradnicky.
1590 2004-01-16 Kevin Ryde <kevin@swox.se>
1592 * configure.in (powerpc64-*-linux*): Try gcc64. Try -m64 with
1593 "cflags_maybe" to get it used in all probing. Add sizeof-long-8 test
1594 to check the mode is right if -m64 is not applicable.
1596 2004-01-15 Kevin Ryde <kevin@swox.se>
1598 * configure.in (--with-readline=detect): Check for readline/readline.h
1599 and readline/history.h. Report result of detection.
1601 2004-01-12 Niels Möller <nisse@lysator.liu.se>
1603 * tests/tests.h: Added refmpn_free_limbs prototype.
1604 * tests/refmpn.c (refmpn_free_limbs): New function.
1606 2004-01-11 Kevin Ryde <kevin@swox.se>
1608 * mpn/alpha/ev6/slot.pl: New file, derived in part from
1609 mpn/x86/k6/cross.pl.
1611 * mpn/alpha/alpha-defs.m4 (ASSERT): New macro.
1613 * mpn/asm-defs.m4 (m4_ifdef): New macro, avoiding OSF 4.0 m4 bug.
1614 (m4_assert_defined): Use it.
1616 * mpn/alpha/default.m4, mpn/alpha/unicos.m4 (LDGP): New macro.
1617 * mpn/alpha/ev67/gcd_1.asm: Use it to re-establish gp after jsr.
1619 * configure.in, demos/calc/Makefile.am: Use -lcurses or -lncurses with
1620 readline, when available.
1622 * longlong.h (sub_ddmmss) [generic]: Use al<bl for the borrow rather
1623 than __x>al, since the former can be done without waiting for __x,
1624 helping superscalar chips, in particular alpha ev5 and ev6.
1626 * longlong.h (sub_ddmmss) [ia64]: New macro.
1628 * tests/t-sub.c: New file.
1629 * tests/Makefile.am (check_PROGRAMS): Add it.
1630 * tests/refmpn.c, tests/tests.h (refmpn_sub_ddmmss): New function.
1632 2004-01-09 Kevin Ryde <kevin@swox.se>
1634 * mpn/x86/p6/mod_34lsub1.asm: New file, derived in part from
1635 mpn/x86/mod_34lsub1.asm.
1637 * configure.in (IA64_PATTERN): Use -mtune on gcc 3.4.
1639 2004-01-07 Kevin Ryde <kevin@swox.se>
1641 * gmp-h.in, mp-h.in (__GMP_SHORT_LIMB): Renamed from _SHORT_LIMB, to
1642 keep in our namespace. (Not actually used anywhere currently.)
1643 Reported by Patrick Pelissier.
1645 * mp-h.in: Use "! defined (__GMP_WITHIN_CONFIGURE)" in the same style
1646 as gmp-h.in (though mp-h.in is not actually used during configure).
1648 * mp-h.in (__GMP_DECLSPEC_EXPORT, __GMP_DECLSPEC_IMPORT) [__GNUC__]:
1649 Use __dllexport__ and __dllimport__ to keep out of application
1650 namespace. Same previously done in gmp-h.in.
1652 2004-01-06 Kevin Ryde <kevin@swox.se>
1654 * configfsf.sub, configfsf.guess: Update to 2004-01-05.
1655 * configure.in (amd64-*-* | x86_64-*-*): Update comments on what
1658 2004-01-04 Kevin Ryde <kevin@swox.se>
1660 * mpn/alpha/README (REFERENCES): Add tru64 assembly manuals.
1661 (ASSEMBLY RULES): Note what gcc says about !literal! etc.
1663 2004-01-03 Kevin Ryde <kevin@swox.se>
1665 * mpn/alpha/ev67/gcd_1.asm: New file.
1667 * mpn/x86/pentium4/sse2/rsh1add_n.asm: New file, derived in part from
1668 mpn/x86/pentium4/sse2/addlsh1_n.asm.
1670 * mpn/x86/p6/p3mmx/popham.asm: Note measured speeds.
1672 * mpn/x86/pentium4/sse2/addlsh1_n.asm (PARAM_CARRY): Remove macro, not
1673 used, no such parameter.
1675 * mpn/generic/gcd.c: Use <stdio.h> for NULL.
1677 * doc/gmp.texi (Single Limb Division): Correction to tex expression
1678 for (1/2)x1. And minor wording tweaks elsewhere.
1680 * gmp-impl.h (mpn_rsh1add_n, mpn_rsh1sub_n): Correction to comments
1681 about how carries returned.
1683 * longlong.h (umul_ppmm) [generic]: Add comments about squaring
1684 (dropped from tasks list)
1686 2003-12-31 Kevin Ryde <kevin@swox.se>
1688 * demos/perl/GMP.xs (scan0, scan1): Return ~0 for not-found.
1689 * demos/perl/GMP.pm: Describe this, remove the note about ULONG_MAX
1690 being the same as ~0 (which is not true in old perl).
1691 * demos/perl/test.pl: Update tests.
1692 * demos/perl/typemap (gmp_UV): New type.
1694 * demos/perl/test.pl (fits_slong_p): Comment out uv_max test, it won't
1695 necessarily exceed a long.
1697 * demos/perl/GMP.pm: Add a remark about get_str to the bugs section.
1699 * mpn/generic/sqrtrem.c, mpz/fac_ui.c, tests/mpf/reuse.c: Add casts
1701 * tests/mpf/t-muldiv.c: Make ulimb, vlimb into ulongs, which is how
1702 they're used, for the benefit of K&R calling.
1704 * doc/gmp.texi (Square Root Algorithm): Add a summary of the algorithm.
1705 And add further index entries in various places.
1707 * mpz/lucnum_ui.c, mpz/lucnum2_ui.c: Use mpn_addlsh1_n when available.
1709 * gmp-impl.h, mpn/generic/mul_n.c (mpn_addlsh1_n, mpn_sublsh1_n,
1710 mpn_rsh1add_n, mpn_rsh1sub_n): Move descriptions to gmp-impl.h with
1711 the prototypes, for ease of locating.
1713 2003-12-29 Torbjorn Granlund <tege@swox.com>
1715 * tests/mpz/t-gcd.c: Rewrite, based on suggestions by Kevin.
1717 * mpn/sparc64/README: Remove mpn_Xmul_2, done.
1718 Add blurb about L1 cache conflicts.
1720 2003-12-29 Kevin Ryde <kevin@swox.se>
1722 * mpn/generic/mul_fft.c, mpz/root.c, mpq/cmp_ui.c: Add casts for K&R.
1724 2003-12-27 Kevin Ryde <kevin@swox.se>
1726 * tests/mpz/t-mul.c (mul_kara, mul_basecase): Use __GMP_PROTO.
1728 * Makefile.am (AUTOMAKE_OPTIONS): Restore this, giving no directory on
1729 ansi2knr to avoid a circular build rule.
1730 * configure.in (AM_INIT_AUTOMAKE): Note options also in Makefile.am.
1732 * configure.in (cflags_maybe): Don't loop adding cflags_maybe if the
1733 user has set CFLAGS.
1735 2003-12-23 Kevin Ryde <kevin@swox.se>
1737 * configure.in (*sparc*-*-*): Test sizeof(long)==4 or 8 for ABIs, to
1738 get the right mode when the user sets the CFLAGS.
1739 (testlist): Introduce "any_<abi>_testlist" to apply to all compilers.
1741 * demos/perl/typemap (MPZ_ASSUME, MPQ_ASSUME, MPF_ASSUME): Remove
1742 output rules, these are only meant for inputs.
1743 (MPZ_MUTATE): Remove, not used since changes for magic.
1745 * demos/perl/GMP.xs (mpz_class_hv, mpq_class_hv, mpf_class_hv): New
1746 variables, initialized in BOOT.
1747 * demos/perl/GMP.xs, demos/perl/typemap: Use them and explicit
1748 sv_bless, to save a gv_stashpv for every new object.
1750 2003-12-22 Kevin Ryde <kevin@swox.se>
1752 * mpn/alpha/mode1o.c, mpn/alpha/dive_1.c: Moved from ev5/mode1o.c and
1753 ev5/dive_1.c, these are good for ev4, and would like them in a generic
1756 2003-12-21 Kevin Ryde <kevin@swox.se>
1758 * doc/gmp.texi (Integer Logic and Bit Fiddling): Say "bitwise" in
1759 mpz_and, mpz_ior and mpz_xor, to avoid any confusion with what C means
1760 by "logical". Reported by Rüdiger Schütz.
1762 * gmp-h.in (_GMP_H_HAVE_FILE): Note why defined(EOF) is not good.
1764 2003-12-20 Kevin Ryde <kevin@swox.se>
1766 * tune/speed.h (SPEED_TMP_ALLOC_LIMBS): Correction to last change,
1767 don't want "- 1" on the TMP_ALLOC_LIMBS.
1769 * demos/expr/expr.h: Test #ifdef MPFR_VERSION_MAJOR for when mpfr.h is
1770 included, not GMP_RNDZ which is now an enum.
1772 * demos/expr/exprfra.c (e_mpfr_ulong_p): Use mpfr_integer_p and
1774 (e_mpfr_get_ui_fits): Use mpfr_get_ui.
1776 * mpfr/*: Update to mpfr cvs head 2003-12-20.
1778 * configure, config.in: Update to autoconf 2.59.
1779 * */Makefile.in, configure, aclocal.m4, ansi2knr.c, install-sh,
1780 doc/mdate-sh: Update to automake 1.8.
1782 * mkinstalldirs: Remove, not required by automake 1.8.
1783 * doc/gmp.texi (Build Options): HTML is a usual target in automake 1.8.
1785 * configure.in (AC_PREREQ): Require autoconf 2.59.
1786 (AM_INIT_AUTOMAKE): Require automake 1.8.
1787 (AC_C_INLINE): Use rather than GMP_C_INLINE, now has #ifndef
1788 __cplusplus we want.
1789 (gettimeofday): Use AC_CHECK_FUNCS rather than our workaround code,
1792 * acinclude.m4 (GMP_C_INLINE): Remove.
1793 (GMP_H_EXTERN_INLINE): Use AC_C_INLINE.
1794 (GMP_PROG_AR): Comment on automake $ARFLAGS.
1796 2003-12-19 Torbjorn Granlund <tege@swox.com>
1798 * tests/mpf/t-get_d.c: Print message before aborting.
1800 * mpn/generic/get_d.c: Make ONE_LIMB case actually work for nails.
1802 2003-12-18 Torbjorn Granlund <tege@swox.com>
1804 * mpz/get_d.c: Don't include longlong.h.
1806 * tests/mpz/t-mul.c (ref_mpn_mul): Handle un == vn specially, to avoid
1807 a dummy r/w outside of allocated area.
1809 2003-12-18 Kevin Ryde <kevin@swox.se>
1811 * mpn/alpha/unicos.m4 (ALIGN): Add comments on what GCC does.
1813 * configure.in (fat setups), acinclude.m4 (GMP_INIT): Obscure
1814 include() from automake 1.8 aclocal.
1815 * acinclude.m4: Quote names in AC_DEFUN, for automake 1.8 aclocal.
1817 2003-12-13 Kevin Ryde <kevin@swox.se>
1819 * mpq/get_d.c: Amend comments per mpn_get_d change.
1820 (limb2dbl): Remove, no longer used.
1822 * gmp-impl.h (DIVREM_1_NORM_THRESHOLD etc) [nails]: Correction to
1823 comments, MP_SIZE_T_MAX means preinv never.
1825 * gmp-impl.h (DIVEXACT_1_THRESHOLD, MODEXACT_1_ODD_THRESHOLD) [nails]:
1826 Remove overrides, divexact_1 and modexact_1 have been nailified.
1828 * mpz/inp_str.c (mpz_inp_str_nowhite): Use ASSERT_ALWAYS for EOF value
1831 * tests/refmpn.c (refmpn_rsh1add_n, refmpn_rsh1sub_n): Parens around
1832 GMP_NUMB_BITS - 1 with ">>", to quieten gcc -Wall.
1833 * tests/t-constants.c (main), tests/t-count_zeros.c (check_clz),
1834 tests/t-modlinv.c (one), tests/mpz/t-jac.c (try_si_zi),
1835 tests/mpq/t-get_d.c (check_onebit): : Correction to printfs.
1836 * tests/mpn/t-fat.c: Add <string.h> for memcpy.
1837 * tests/mpz/t-scan.c (check_ref): Remove unused variable "isigned".
1838 * tests/mpq/t-get_d.c (check_onebit): Remove unused variable "limit".
1839 * tests/mpf/t-set_si.c, tests/mpf/t-set_ui.c (check_data): Braces for
1841 * tests/devel/try.c (mpn_divexact_by3_fun, mpn_modexact_1_odd_fun):
1842 Correction to return values.
1844 * doc/gmp.texi (Miscellaneous Integer Functions): Note mpz_sizeinbase
1845 can be used to locate the most significant bit. Reword a bit for
1848 2003-12-11 Torbjorn Granlund <tege@swox.com>
1850 * gmp-impl.h: Change asm => __asm__, tabify.
1851 * mpz/get_d_2exp.c: Likewise.
1852 * mpf/get_d_2exp.c: Likewise.
1854 * tests/cxx/t-ops.cc: #if .. #endif out tests that cause ambiguities.
1856 2003-12-10 Torbjorn Granlund <tege@swox.com>
1858 * tests/mpz/t-gcd.c: Generate operands with sizes as a geometric
1859 progression, to allow for larger operands and less varying timing.
1861 2003-12-10 Kevin Ryde <kevin@swox.se>
1863 * demos/perl/test.pl: Should be $] for perl version in old perl.
1865 * configure.in (sparc64-*-*): Single block of gcc configs for all
1866 systems, on unknown systems try both ABI 32 and 64.
1868 * configure.in (LIBGMP_LDFLAGS, LIBGMPXX_LDFLAGS): New AC_SUBSTs with
1869 options to generate .def files with windows DLLs.
1870 * Makefile.am (libgmp_la_LDFLAGS, libgmpxx_la_LDFLAGS): Use them.
1872 * mpn/generic/gcd.c: Use ABOVE_THRESHOLD / BELOW_THRESHOLD, to follow
1873 convention and cooperate with tune/tuneup.c.
1875 * tune/common.c, tune/speed.c, tune/speed.h, tune/speed-ext.c,
1876 tune/tuneup.c (SPEED_TMP_ALLOC_LIMBS): Take variable as parameter
1877 rather than returning a value, avoids alloca in a function call.
1878 * tune/common.c, tune/speed.h (speed_tmp_alloc_adjust): Remove, now
1879 inline in SPEED_TMP_ALLOC_LIMBS, and using ptr-NULL for alignment
1882 * gmpxx.h (__gmp_binary_equal, __gmp_binary_not_equal,
1883 __gmp_binary_less, __gmp_binary_less_equal, __gmp_binary_greater,
1884 __gmp_binary_greater_equal, __gmp_cmp_function): Use mpfr_cmp_si and
1886 * tests/cxx/t-ops.cc: Exercise this.
1888 * demos/perl/Makefile.PL: Don't install sample.pl and test2.pl.
1890 * demos/perl/GMP.xs (use_sv): Prefer PV over IV or NV to avoid any
1892 * demos/perl/test.pl: Exercise this.
1894 * demos/perl/GMP/Mpf.pm (overload_string): Corrections to $# usage.
1895 * demos/perl/test.pl: Exercise this.
1897 2003-12-08 Kevin Ryde <kevin@swox.se>
1899 * demos/perl/GMP.pm: Correction to canonicalize example.
1901 * demos/perl/GMP.xs: New type check scheme, support magic scalars,
1902 support UV when available. Remove some unused local variables.
1903 (coerce_long): Check range of double.
1904 (get_d_2exp): Remove stray printf.
1906 * demos/perl/test.pl: Exercise magic, rearrange to make it clearer
1907 what's being tested.
1909 2003-12-07 Kevin Ryde <kevin@swox.se>
1911 * tune/tuneup.c (mul_toom3_threshold): Use MUL_TOOM3_THRESHOLD_LIMIT,
1912 for the benefit of ASSERT in mpn_mul_n.
1914 * tune/tuneup.c (tune_mul): Correction to toom3 param.min_size, should
1915 use MPN_TOOM3_MUL_N_MINSIZE.
1917 * tune/speed.c (check_align_option): Correction to printf format.
1918 * tune/freq.c (freq_sysctl_hw_model): Remove unused "i" variable.
1920 * scanf/doscan.c: Correction to a couple of trace printfs.
1921 Add <stdlib.h> for strtol.
1923 * tests/misc/t-scanf.c (test_sscanf_eof_ok): New function.
1924 (check_misc): Use it to suppress tests broken by libc.
1925 And should be EOF rather than -1 in various places.
1927 2003-12-06 Torbjorn Granlund <tege@swox.com>
1929 * mpn/generic/get_str.c (mpn_get_str, POW2_P case):
1930 Don't append extra '\0' byte.
1932 2003-12-05 Niels Möller <niels@lysator.liu.se>
1934 * tune/speed.h (mpn_gcd_accel): Added prototype.
1936 2003-12-05 Torbjorn Granlund <tege@swox.com>
1938 * randmt.c (__gmp_mt_recalc_buffer): Put parens around "&" expressions
1941 * mpf/get_str.c: Remove unused variable "fracn".
1943 2003-12-03 Kevin Ryde <kevin@swox.se>
1945 * configure.in, Makefile.am (LIBGMP_LDFLAGS, LIBGMPXX_LDFLAGS): New
1946 AC_SUBSTs, use them to create .def files with Windows DLLs.
1947 * doc/gmp.texi (Notes for Particular Systems): Update notes on mingw
1950 * mpz/export.c: Allow NULL for countp.
1951 * doc/gmp.texi (Integer Import and Export): Describe this.
1952 Suggested by Jack Lloyd.
1954 * mpn/x86/p6/aors_n.asm: New file, grabbing the K7 code.
1955 Superiority of this reported by Patrick Pelissier.
1957 2003-11-30 Kevin Ryde <kevin@swox.se>
1959 * mpn/alpha/ev67/popcount.asm, mpn/alpha/ev67/hamdist.asm: New files.
1961 * mpn/alpha/ev67: New directory.
1962 * configure.in (alphaev67, alphaev68, alphaev7*): Use it.
1964 * doc/gmp.texi (GMPrefu, GMPpxrefu): Change back to plain ref and
1965 pxref, remove macros.
1966 (GMPreftopu, GMPpxreftopu): Remove URL parameter, rename to GMPreftop
1968 (Debugging): Remove debauch, seems to have disappeared.
1969 (Language Bindings): Corrections to URLs for CLN, Omni F77, Pike.
1971 2003-11-29 Kevin Ryde <kevin@swox.se>
1973 * demos/perl/GMP/Mpf.pm (overload_string): Use $OFMT to avoid warnings
1976 * demos/perl/GMP.xs (fits_slong_p): Use LONG_MAX+1 to avoid possible
1977 rounding of 0x7F..FF in a double on 64-bit systems.
1979 * configure.in (ppc601-*-*): Remove this case, it never matched
1980 anything, the name adopted is powerpc601.
1981 (powerpc601-*-*): Use gcc -mcpu=601, xlc -qarch=601.
1983 * configure.in: Introduce ${cc}_cflags_maybe, used if they work.
1984 (*sparc*-*-*) [ABI=32]: Add gcc_cflags_maybe=-m32 to force that mode.
1986 * doc/gmp.texi (Introduction to GMP): Add AMD64 to optimizations list.
1987 (Build Options): Add cpu types alphaev7 and amd64. Update texinfo
1988 html cross reference.
1990 2003-11-28 Niels Möller <nisse@lysator.liu.se>
1992 * mpn/generic/gcd.c (MPN_LEQ_P): Copied macro definition (needed
1993 for compilation with --enable-assert).
1995 2003-11-27 Niels Möller <nisse@lysator.liu.se>
1997 * tests/mpz/t-gcd.c (gcd_values): Moved definition, so that we
1998 don't need to forward declare the array.
2000 2003-11-26 Torbjorn Granlund <tege@swox.com>
2002 * tests/mpz/t-gcd.c: Generate random operands up to 32767 bits;
2003 decrease # of test to 1000.
2004 (gcd_values): Remove oversize test case.
2006 2003-11-26 Niels Möller <niels@lysator.liu.se>
2008 * tests/mpz/t-gcd.c (main): Added some tests with non-random
2011 2003-11-25 Niels Möller <nisse@lysator.liu.se>
2013 * gmp-impl.h (MPN_LEQ_P, MPN_EXTRACT_LIMB): New macros.
2015 2003-11-25 Kevin Ryde <kevin@swox.se>
2017 * doc/gmp.texi (Language Bindings): Add Axiom.
2019 2003-11-22 Kevin Ryde <kevin@swox.se>
2021 * mpn/alpha/README: More notes on assembler syntax variations.
2023 * mpn/alpha/alpha-defs.m4, mpn/alpha/unicos.m4 (unop): Should be ldq_u
2024 not bis, and move to alpha-defs.m4 since it can be happily used
2027 * mpn/alpha/alpha-defs.m4, mpn/alpha/default.m4, mpn/alpha/unicos.m4
2028 (bigend): Move to alpha-defs.m4 and base it on HAVE_LIMB_BIG_ENDIAN or
2029 HAVE_LIMB_LITTLE_ENDIAN, so as not to hard code system endianness.
2031 * mpn/alpha/alpha-defs.m4: New file.
2032 * configure.in (alpha*-*-*): Use it.
2034 2003-11-21 Kevin Ryde <kevin@swox.se>
2036 * mpfr/*: Update to mpfr-2-0-2-branch 2003-11-21.
2038 * mpn/alpha/ev5/com_n.asm: Change "not" to "ornot r31", since "not"
2039 isn't recognised by on Cray Unicos. Add missing "gp" to PROLOGUE.
2040 * mpn/alpha/README: Add a note on "not".
2042 2003-11-19 Torbjorn Granlund <tege@swox.com>
2044 * mpn/alpha/aorslsh1_n.asm: Slightly rework feed-in code, avoiding
2045 spurious reads beyond operand limits.
2047 * mpn/alpha/ev5/com_n.asm: Add ASM_START/ASM_END.
2049 * mpn/generic/mul_fft.c (mpn_fft_zero_p): Remove unused function.
2050 (mpn_lshift_com): Make static, nailify properly.
2052 2003-11-19 Kevin Ryde <kevin@swox.se>
2054 * mpn/generic/diveby3.c: Use a "q" variable to make it clearer what
2057 * mpn/powerpc32/750/lshift.asm, mpn/powerpc32/750/rshift.asm: New
2060 * mpn/alpha/ev5/com_n.asm: New file.
2062 * doc/gmp.texi (Assembler Functional Units, Assembler Writing Guide):
2063 New sections by Torbjorn, tweaked by me.
2065 2003-11-17 Torbjorn Granlund <tege@swox.com>
2067 * mpn/powerpc32: Add power4/powerpc970 cycle counts.
2068 Use cmpwi instead of cmpi to placate darwin.
2070 2003-11-15 Kevin Ryde <kevin@swox.se>
2072 * config.guess: Add comments on MacOS "machine" command.
2074 * tests/devel/try.c (main): Use gmp_randinit_default explicitly on
2075 __gmp_rands, since RANDS doesn't allow seeding.
2077 * doc/gmp.texi (Assigning Integers): Remove notes on possible change
2078 to disallow whitespace, this would be an incompatible change and
2079 really can't be made.
2080 (Toom 3-Way Multiplication): Updates for Paul's new code.
2082 * mpn/generic/mul_n.c (toom3_interpolate, mpn_toom3_mul_n): Put
2083 if/else braces around whole of #if code, for readability.
2085 * tests/refmpn.c (refmpn_addlsh1_n, refmpn_sublsh1_n,
2086 refmpn_rsh1add_n, refmpn_rsh1sub_n): Add ASSERTs for operand overlaps
2089 * mpfr/*: Update to mpfr-2-0-2-branch 2003-11-15.
2091 2003-11-14 Torbjorn Granlund <tege@swox.com>
2093 * mpn/alpha/aorslsh1_n.asm: Use Cray-friendly syntax for "br".
2095 2003-11-13 Torbjorn Granlund <tege@swox.com>
2097 * mpn/alpha/aorslsh1_n.asm: New file.
2099 2003-11-12 Kevin Ryde <kevin@swox.se>
2101 * acinclude.m4 (GMP_PROG_CC_WORKS): Add case provoking AIX power2
2102 assembler, test code by Torbjorn.
2103 * configure.in (power*-*-*): Add a comment about -mcpu=rios2 fallback.
2105 * tune/speed.c (main): Use gmp_randinit_default explicitly on
2106 __gmp_rands, since RANDS doesn't allow seeding.
2108 * mpfr/*: Update to mpfr-2-0-2-branch 2003-11-12.
2110 * gmp-impl.h, randmt.h (__gmp_randinit_mt_noseed): Move prototype to
2111 gmp-impl.h, for use by RANDS.
2113 * mpn/Makeasm.am (.s, .S, .asm): Quote $< in test -f, per automake.
2114 (.obj): Use test -f and $(CYGPATH_W) as per automake.
2116 2003-11-11 Kevin Ryde <kevin@swox.se>
2118 * configure.in: Make umul and udiv standard-optional objects, rather
2119 than under various extra_functions.
2121 * mpn/pa32/hppa1_1/pa7100/add_n.asm,
2122 mpn/pa32/hppa1_1/pa7100/addmul_1.asm,
2123 mpn/pa32/hppa1_1/pa7100/lshift.asm,
2124 mpn/pa32/hppa1_1/pa7100/rshift.asm,
2125 mpn/pa32/hppa1_1/pa7100/sub_n.asm,
2126 mpn/pa32/hppa1_1/pa7100/submul_1.asm: Use LDEF for labels.
2128 * mpf/set_str.c: Don't use memcmp for decimal point testing, just a
2129 loop is enough and avoids any chance of memcmp reading past the end of
2132 * randmts.c, randmt.h: New files.
2133 * Makefile.am (libgmp_la_SOURCES): Add them.
2134 * randmt.c: Move seeding to randmts.c, common defines in randmt.h.
2135 * gmp-impl.h (RANDS): Use __gmp_randinit_mt_noseed.
2136 * tests/misc.c (tests_rand_start): Use gmp_randinit_default
2137 explicitly, not RANDS.
2139 * mpn/ia64/ia64-defs.m4 (PROLOGUE_cpu): Use 32-byte alignment, for the
2140 benefit of itanium 2.
2141 * mpn/ia64/gcd_1.asm: Remove own .align 32.
2143 * mpn/ia64/ia64-defs.m4 (ALIGN): New define, using IA64_ALIGN_OK.
2145 * acinclude.m4 (GMP_ASM_IA64_ALIGN_OK): New macro.
2146 * configure.in (IA64_PATTERN): Use it.
2147 * mpn/ia64/README: Add notes on gas big endian align problem.
2149 2003-11-08 Torbjorn Granlund <tege@swox.com>
2151 * mpn/x86/aors_n.asm: Align loop to a multiple of 16. Also align
2152 M4_function_n to a multiple of 16, to minimize alignment padding.
2153 Update P6 cycle counts reflecting improvements with new alignment.
2155 2003-11-07 Kevin Ryde <kevin@swox.se>
2157 * gmp-impl.h (HAVE_HOST_CPU_alpha_CIX): New define.
2158 (ULONG_PARITY, popc_limb): Use it, to pick up ev7 as well as 67 and 68.
2159 * longlong.h (count_leading_zeros, count_trailing_zeros): Ditto.
2161 * doc/gmp.texi (Notes for Package Builds): Add notes on multi-ABI
2163 (ABI and ISA): Add GNU/Linux ABI=64.
2164 (Binary GCD): Add notes on 1x1 GCD algorithms.
2166 * mpn/alpha/README: Add some literature references.
2168 * mpn/ia64/mode1o.asm: Various corrections to initial checkin.
2169 * mpn/ia64/ia64-defs.m4 (ASSERT): Correction to arg quoting.
2171 2003-11-05 Torbjorn Granlund <tege@swox.com>
2173 * mpn/powerpc64/linux64.m4: New file.
2174 * configure.in (POWERPC64_PATTERN): Handle *-*-linux*.
2177 2003-11-05 Kevin Ryde <kevin@swox.se>
2179 * tune/freq.c (freq_sysctl_hw_model): Relax to just look for "%u MHz",
2180 for the benefit of sparc cypress under netbsd 1.6.1.
2182 * mpfr/*: Update to mpfr-2-0-2-branch 2003-11-05.
2184 * mpn/alpha/ev5/dive_1.c: New file.
2186 * configure.in (x86_64-*-*): Accept together with amd64-*-*.
2188 * tune/speed.c: Check range of -x,-y,-w,-W alignment specifiers.
2189 * tune/speed.h (CACHE_LINE_SIZE): Amend comments.
2191 2003-11-04 Torbjorn Granlund <tege@swox.com>
2193 * tune/speed.c: Fix typo in testing HAVE_NATIVE_mpn_modexact_1_odd.
2195 2003-11-03 Kevin Ryde <kevin@swox.se>
2197 * mpn/ia64/mode1o.asm: New file.
2198 * mpn/ia64/ia64-defs.m4 (ASSERT): New macro.
2200 * tests/mpz/t-set_d.c (check_2n_plus_1): New test.
2202 2003-11-01 Kevin Ryde <kevin@swox.se>
2204 * mpz/fac_ui.c (BSWAP_ULONG) [limb==2*long]: Remove this case, it
2205 provokes code gen problems on HP cc.
2206 (BSWAP_ULONG) [generic]: Rename __dst variable to avoid conflicts with
2208 Fix by Jason Moxham.
2210 * mpn/powerpc32/mode1o.asm: Use 16-bit i*i for early out, no need to
2211 truncate divisor. Amend stated 750/7400 speeds, and note operands
2212 that give the extremes.
2214 * mpz/set_d.c: Don't use a special case for d < MP_BASE_AS_DOUBLE, gcc
2215 3.3 -mpowerpc64 on darwin gets ulonglong->double casts wrong.
2217 * mpn/generic/diveby3.c: Show a better style carry handling in the
2218 alternative pipelined sample code.
2220 Revert this, the longlong.h macros need -mpowerpc64:
2221 * acinclude.m4 (GMP_GCC_POWERPC64): New macro.
2222 * configure.in (powerpc64-*-darwin*): Use it to exclude -mpowerpc64
2225 2003-10-31 Kevin Ryde <kevin@swox.se>
2227 * mpfr/*: Update to mpfr-2-0-2-branch 2003-10-31.
2229 * mpn/powerpc64/README: Add subdirectory organisation notes.
2231 * tests/mpn/t-get_d.c: Don't use limits.h, LONG_MIN is wrong on gcc
2232 2.95 with -mcpu=ultrasparc.
2234 * acinclude.m4 (GMP_GCC_POWERPC64): New macro.
2235 * configure.in (powerpc64-*-darwin*): Use it to exclude -mpowerpc64
2238 * configure.in (powerpc64-*-darwin*) [ABI=mode32]: Use gcc -mcpu flags.
2240 * mpn/ia64/gcd_1.asm: Use "C" for comments.
2241 * mpn/ia64/README, mpn/ia64/ia64-defs.m4: Note this.
2243 * mpn/ia64/ia64-defs.m4: Renamed from default.m4, per other defs files.
2244 * configure.in (IA64_PATTERN): Update GMP_INCLUDE_MPN.
2246 * doc/gmp.texi (Notes for Particular Systems): Remove m68k ABI notes
2247 for -mshort and PalmOS, now works.
2248 (References): Correction, GMP Square Root proof already there, just
2249 wanting URL from RRRR 4475.
2251 2003-10-29 Kevin Ryde <kevin@swox.se>
2253 * configure.in (sparc*-*-*): Use gcc -m32 when that option works, to
2254 force 32-bit mode on dual 32/64 configurations like GNU/Linux.
2255 (sparc64-*-linux*): Add support for ABI=64.
2257 * mpn/generic/pre_divrem_1.c: In fraction part, use CNST_LIMB(0) with
2258 udiv_qrnnd_preinv to avoid warning about shift > type.
2260 * mpfr/*: Update to mpfr-2-0-2-branch 2003-10-29.
2262 * tests/cxx/t-istream.cc: Avoid tellg() checks if putback() doesn't
2263 update that, avoids certain g++ 2.96 problems.
2265 * tests/mpn/t-fat.c: New file.
2266 * tests/mpn/Makefile.am (check_PROGRAMS): Add it.
2268 * configure.in (CPUVEC_INSTALL, ITERATE_FAT_THRESHOLDS): New macros
2270 * mpn/x86/fat/fat.c (__gmpn_cpuvec_init): Use CPUVEC_INSTALL instead
2271 of memcpy. Correction to location of "initialized" set. Improve
2274 2003-10-27 Torbjorn Granlund <tege@swox.com>
2276 * mpn/sparc64/mul_1.asm: Change addcc => add in a few places.
2277 * mpn/sparc64/addmul_1.asm: Likewise.
2279 * mpn/sparc32/v9/mul_1.asm: Apply cross-jumping.
2280 * mpn/sparc32/v9/addmul_1.asm: Likewise.
2281 * mpn/sparc32/v9/submul_1.asm: Likewise.
2282 * mpn/sparc32/v9/sqr_diagonal.asm: Likewise.
2284 2003-10-27 Kevin Ryde <kevin@swox.se>
2286 * tests/cxx/t-misc.cc: Don't use <climits>, on g++ 2.95.4 (debian 3.0)
2287 -mcpu=ultrasparc LONG_MIN is wrong and kills the compile.
2289 * tests/cxx/t-istream.cc: Correction to tellg tests, don't assume
2290 streampos is zero based.
2292 * configure.in (HAVE_HOST_CPU_FAMILY_alpha): New define for config.h.
2293 * mpn/generic/get_d.c: Use it instead of __alpha for alpha workaround,
2294 since Cray cc doesn't define __alpha.
2296 * mpn/x86/README: Revise PIC coding notes a bit, add gcc visibility
2299 2003-10-25 Kevin Ryde <kevin@swox.se>
2301 * mpn/ia64/gcd_1.asm: New file.
2303 * tune/many.pl: Allow for PROLOGUE(fun,...), as used on alpha.
2305 * doc/gmp.texi (C++ Formatted Input): Describe base indicator handling.
2307 * tests/cxx/t-istream.cc: New file.
2308 * tests/cxx/Makefile.am: Add it.
2310 * cxx/ismpznw.cc: New file, integer input without whitespace ...
2311 * cxx/ismpz.cc: ... from here.
2312 * gmp-impl.h (__gmpz_operator_in_nowhite): Add prototype.
2313 * cxx/ismpq.cc: Rewrite using mpz input routines. Change to accept a
2314 separate base indicator on numerator and denominator. Fix base
2315 indicator case where "123/0456" would stop at "123/0".
2316 * Makefile.am, cxx/Makefile.am: Add cxx/ismpznw.cc.
2318 * tests/mpz/t-set_d.c: New file, derived from tests/mpz/t-set_si.c
2319 * tests/mpz/Makefile.am (check_PROGRAMS): Add it.
2321 * mpn/m68k/lshift.asm, mpn/m68k/rshift.asm: Support 16-bit int and
2323 * mpn/m68k/README: Add notes on this.
2324 * configure.in (SIZEOF_UNSIGNED): New define in config.m4.
2325 * mpn/m68k/m68k-defs.m4 (m68k_definsn): Add cmpw, movew.
2326 Reported by Patrick Pelissier.
2328 * mpn/m68k/t-m68k-defs.pl: Don't use -> with hashes, to avoid
2329 deprecation warnings from perl 5.8.
2331 * configure.in (viac3-*-*): Use just x86/pentium in $path not x86/p6.
2332 If gcc is to be believed the old C3s don't have cmov.
2334 * Makefile.am: Amend comments about not building from libtool
2335 convenience libraries.
2337 * mpn/asm-defs.m4 (PROLOGUE): Use m4_file_seen, for correct filename
2338 in missing EPILOGUE error messages.
2339 (m4_file_seen): Amend comments about where used.
2341 * Makefile.am (CXX_OBJECTS): Remove $U, C++ files are not subject to
2344 * gmp-h.in (mpn_divmod_1): Use __GMP_CAST, to avoid warnings in
2345 applications using g++ -Wold-style-cast.
2347 * mpn/z8000/README: New file.
2349 2003-10-22 Kevin Ryde <kevin@swox.se>
2351 * mpn/generic/get_d.c (CONST_1024, CONST_NEG_1023,
2352 CONST_NEG_1022_SUB_53): Replace ALPHA_WORKAROUND with a non-gcc-ism,
2353 and use on Cray Unicos alpha too, which has the same problem.
2355 * configure.in (powerpc64-*-darwin*): Make ABI=32 available as the
2356 final fallback, remove mode64 until we know how it will work.
2358 * doc/gmp.texi (Build Options): Add powerpc970 to available CPUs.
2359 (ABI and ISA): Add mode32 for Darwin.
2361 * configure.in (gettimeofday): Use an explicit AC_TRY_LINK, to avoid
2362 known autoconf 2.57 problems with gettimeofday in AC_CHECK_FUNCS on
2365 * configure.in (powerpc*-*-*): Use ABI=32 instead of ABI=standard for
2366 the default 32-bit ABI. Fixes powerpc64-*-aix* which is documented as
2367 choices "aix64 32" but had "aix64 standard".
2369 * mpfr/*: Update to mpfr-2-0-2-branch 2003-10-22.
2371 * doc/gmp.texi (Notes for Particular Systems): Note m68k gcc -mshort
2372 and PalmOS calling conventions not supported. Reported by Patrick
2374 (References): Add Paul Zimmermann's Inria 4475 paper.
2376 2003-10-21 Kevin Ryde <kevin@swox.se>
2378 * tests/mpn/t-instrument.c: Add mpn_addlsh1_n, mpn_rsh1add_n,
2379 mpn_rsh1sub_n, mpn_sub_nc, mpn_sublsh1_n. Typo in mpn_preinv_divrem_1
2382 2003-10-20 Torbjorn Granlund <tege@swox.com>
2384 * mpn/powerpc64/mode32/add_n.asm: New file.
2385 * mpn/powerpc64/mode32/sub_n.asm: New file.
2386 * mpn/powerpc64/mode32/mul_1.asm: New file.
2387 * mpn/powerpc64/mode32/addmul_1.asm: New file.
2388 * mpn/powerpc64/mode32/submul_1.asm: New file.
2390 2003-10-19 Torbjorn Granlund <tege@swox.com>
2392 * longlong.h (AMD64): __x86_64__ => __amd64__.
2393 (64-bit powerpc): Only define carry-dependent macros if
2396 * acinclude.m4 (POWERPC64_PATTERN): Add powerpc970-*-*.
2398 * configure.in (POWERPC64_PATTERN): Handle *-*-darwin*.
2399 (POWERPC64_PATTERN, *-*-aix*): Prepend powerpc64/mode64 to path_aix64.
2401 * mpn/powerpc64/mode64/mul_1.asm: Change cal => addi.
2402 * mpn/powerpc64/mode64/addmul_1.asm: Likewise.
2403 * mpn/powerpc64/mode64/submul_1.asm: Likewise.
2404 * mpn/powerpc64/sqr_diagonal.asm: Likewise.
2406 * mpn/powerpc64/mode64/mul_1.asm: Move from "..".
2407 * mpn/powerpc64/mode64/addmul_1.asm: Likewise.
2408 * mpn/powerpc64/mode64/submul_1.asm: Likewise.
2409 * mpn/powerpc64/mode64/divrem_1.asm: Likewise.
2410 * mpn/powerpc64/mode64/rsh1sub_n.asm: Likewise.
2411 * mpn/powerpc64/mode64/add_n.asm: Likewise.
2412 * mpn/powerpc64/mode64/addsub_n.asm: Likewise.
2413 * mpn/powerpc64/mode64/sub_n.asm: Likewise.
2414 * mpn/powerpc64/mode64/addlsh1_n.asm: Likewise.
2415 * mpn/powerpc64/mode64/diveby3.asm: Likewise.
2416 * mpn/powerpc64/mode64/rsh1add_n.asm: Likewise.
2417 * mpn/powerpc64/mode64/sublsh1_n.asm: Likewise.
2419 * mpn/powerpc64/lshift.asm: Handle mode32 ABI.
2420 * mpn/powerpc64/rshift.asm: Likewise.
2421 * mpn/powerpc64/umul.asm: Likewise.
2423 * tune/powerpc64.asm: Make it actually work.
2425 2003-10-19 Kevin Ryde <kevin@swox.se>
2427 * mpn/generic/get_d.c: Add a workaround for alpha gcc signed constant
2430 * gmpxx.h (gmp_randclass gmp_randinit_lc_2exp_size constructor): Throw
2431 std::length_error if size is too big.
2432 * tests/cxx/t-rand.cc (check_randinit): Exercise this.
2434 * mpn/x86/pentium4/sse2/addlsh1_n.asm: New file, derived in part from
2435 mpn/x86/pentium4/sse2/add_n.asm.
2437 * doc/gmp.texi (C++ Interface Integers, C++ Interface Rationals, C++
2438 Interface Floats): Note std::invalid_argument exception for invalid
2439 strings to constructors and operator=.
2440 (C++ Interface Random Numbers): Note std::length_error exception for
2441 size too big in gmp_randinit_lc_2exp_size.
2443 2003-10-18 Kevin Ryde <kevin@swox.se>
2445 * mpfr/*: Update to mpfr-2-0-2-branch 2003-10-18.
2447 * gmpxx.h (mpz_class, mpq_class, mpf_class, mpfr_class constructors
2448 and operator= taking string or char*): Throw std::invalid_argument if
2449 string cannot be converted.
2450 * tests/cxx/t-constr.cc, tests/cxx/t-assign.cc: Exercise this.
2452 * cxx/ismpz.cc, cxx/ismpq.cc, cxx/ismpf.cc: Use istream std::locale
2453 ctype facet for isspace when available. Only accept space at the
2454 start of the input, same as g++ libstdc++. Use ASSERT_NOCARRY to
2455 check result of mpz_set_str etc.
2456 * cxx/ismpf.cc: Don't accept "@" for exponent indicator.
2458 * tune/speed.c, tune/speed.h, tune/common.c, tune/Makefile.am: Remove
2459 _open and _mpn variants of mpn_toom3_mul_n, only one style now.
2460 * tune/mul_n_open.c, tune/mul_n_mpn.c: Remove files.
2462 * gmp-impl.h (LIMB_HIGHBIT_TO_MASK): New macro.
2463 (udiv_qrnnd_preinv2, udiv_qrnnd_preinv2gen): Use it.
2465 * tests/mpz/t-import.c, tests/mpz/t-export.c: Use octal for character
2466 constants, hex is an ANSI-ism.
2468 * mpn/alpha/ev5/mode1o.c: Corrections to ASSERTs, as per
2469 mpn/generic/mode1o.c.
2471 * mpn/generic/diveby3.c: Add commented out alternative code and notes
2472 for taking the multiply off the dependent chain. Amend/clarify some
2473 of the other comments.
2475 * configure.in (powerpc970-*-*): Use gcc -mcpu=970 when available.
2476 (powerpc7400-*-*): Fallback on gcc -mcpu=750 if -mcpu=7400 not
2479 * doc/gmp.texi (C++ Formatted Input): Note locale digit grouping not
2481 (C++ Formatted Input, C++ Formatted Output): Cross reference class
2482 interface on overloading.
2484 * mpn/m68k/README: Add various ideas from doc/tasks.html.
2486 * mpn/m88k/README: New file.
2488 2003-10-16 Torbjorn Granlund <tege@swox.com>
2490 * config.sub: Recognize powerpc970.
2492 2003-10-15 Torbjorn Granlund <tege@swox.com>
2494 * config.guess: Recognize powerpc970 under MacOS.
2496 2003-10-15 Kevin Ryde <kevin@swox.se>
2498 * configure.in, acinclude.m4 (GMP_C_RIGHT_SHIFT): New test.
2499 * gmp-impl.h (LIMB_HIGHBIT_TO_MASK): New macro.
2500 (udiv_qrnnd_preinv2, udiv_qrnnd_preinv2gen): Use it.
2502 * mpn/amd64/amd64-defs.m4: New file, with a non-aligning PROLOGUE.
2503 * configure.in (amd64-*-*): Use it.
2505 * mpfr/*: Update to mpfr cvs 2003-10-15.
2507 * mpn/generic/get_d.c: Rewrite, simplifying and truncating towards
2508 zero unconditionally.
2509 * tests/mpn/t-get_d.c: Add various further tests.
2510 * gmp-impl.h (FORCE_DOUBLE): New macro.
2512 * gmp-h.in (__mpz_struct): Add comment on __mpz_struct getting into
2513 C++ mangled function names.
2515 * doc/gmp.texi (Build Options): Update notes for new doc subdir.
2516 (Low-level Functions): Note mpn functions don't check for zero limbs
2517 etc, it's up to an application to strip.
2519 * doc/configuration (Configure): mdate-sh now in doc subdir, add
2522 2003-10-13 Kevin Ryde <kevin@swox.se>
2524 * mpn/powerpc32/mod_34lsub1.asm: New file.
2526 * mpn/powerpc32/diveby3.asm, mpn/powerpc64/diveby3.asm: src[] in
2527 second operand of mullw, to allow possible early-out, which the
2528 0xAA..AB inverse cannot give. This improvement noticed by Torbjorn.
2530 * acinclude.m4 (GMP_ASM_LSYM_PREFIX): Print to config.log whether
2531 local label is purely temporary or appears in object files, for
2532 development purposes.
2534 * doc/gmp.texi, doc/fdl.texi, doc/texinfo.tex, doc/mdate-sh: Moved
2536 * doc/Makefile.am: New file.
2537 * configure.in (AC_OUTPUT): Add doc/Makefile.
2538 * Makefile.am (SUBDIRS): Move doc subdirectory from EXTRA_DIST.
2539 (info_TEXINFOS, gmp_TEXINFOS): Moved to doc/Makefile.am.
2540 * mpfr/Makefile.am (mpfr_TEXINFOS): fdl.texi now in doc subdir.
2541 (TEXINFO_TEX): texinfo.tex now in doc subdir.
2542 (AM_MAKEINFOFLAGS): Set -I to doc subdir.
2544 * mpz/and.c: For positive/positive, use mpn_and_n, rate a realloc as
2547 * mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Don't test
2548 for high zero limbs.
2550 2003-10-12 Torbjorn Granlund <tege@swox.com>
2552 * mpn/powerpc64/diveby3.asm: New file (trivial edits of
2553 powerpc32/diveby3.asm).
2555 * mpn/powerpc32/diveby3.asm: Update cycle counts with more processors.
2556 * mpn/powerpc32/sqr_diagonal.asm: Likewise.
2558 * mpn/pa64/add_n.asm: Correct PA8500 cycle counts.
2559 * mpn/pa64/sub_n.asm: Likewise.
2561 * mpn/m68k/aors_n.asm (INPUT PARAMETERS): Fix typo.
2562 * mpn/m68k/lshift.asm: Likewise.
2563 * mpn/m68k/rshift.asm: Likewise.
2565 * mpn/m68k/README: Correct an URL; add some STATUS comments.
2567 * mpn/powerpc32/addlsh1_n.asm: New file.
2568 * mpn/powerpc32/sublsh1_n.asm: New file.
2570 2003-10-12 Kevin Ryde <kevin@swox.se>
2572 * mpn/sparc64/divrem_1.c, mpn/sparc64/mod_1.c: New files.
2573 * mpn/sparc64/sparc64.h (HALF_ENDIAN_ADJ, count_leading_zeros_32,
2574 invert_half_limb, udiv_qrnnd_half_preinv): New macros.
2576 * gmp-impl.h (udiv_qrnnd_preinv2): Use a ? : for getting the n1 bit,
2577 so as not to depend on signed right shifts being arithmetic.
2579 * mpn/powerpc32/diveby3.asm: New file.
2581 * mpn/generic/divrem_1.c: Use CNST_LIMB(0) to avoid warnings from
2582 udiv_qrnnd_preinv about shift count when int<long. Do the same with
2583 udiv_qrnnd, for consistency.
2585 * Makefile.am (install-data-hook): Print a warning recommending "make
2586 check" to watch out for compiler bugs. Proposed by Torbjorn.
2588 2003-10-11 Torbjorn Granlund <tege@swox.com>
2590 * mpn/asm-defs.m4: Handle rsh1aors_n.
2592 * configure.in (tmp_mulfunc): Handle rsh1aors_n.
2594 2003-10-11 Kevin Ryde <kevin@swox.se>
2596 * mpn/x86/pentium4/sse2/diveby3.asm: Remove non-PIC RODATA memory
2597 access for 0xAAAAAAAB constant.
2599 * gmp-impl.h (popc_limb, ULONG_PARITY) [ev67, ev68]: Add gcc asm
2600 versions using ctpop.
2602 * mpn/x86/k6/aorsmul_1.asm: Tweak some comments, remove M4_description
2603 and M4_desc_retval used only in comments.
2605 * mpn/x86/k6/mul_basecase.asm: Add comment on using mpn_mul_1.
2607 2003-10-09 Torbjorn Granlund <tege@swox.com>
2609 * mpn/powerpc64/addlsh1_n.asm: Tweak for 0.25 c/l better loop speed.
2610 * mpn/powerpc64/sublsh1_n.asm: Likewise.
2612 2003-10-09 Kevin Ryde <kevin@swox.se>
2614 * mpfr/*: Update to mpfr cvs 2003-10-09.
2616 * tests/devel/try.c (_SC_PAGESIZE): Define from _SC_PAGE_SIZE on
2617 systems which use that, eg. hpux 9.
2619 2003-10-07 Kevin Ryde <kevin@swox.se>
2621 * tune/freq.c (freq_sysctl_hw_model): Correction to last sscanf change.
2623 * configure.in: Check for psp_iticksperclktick in struct pst_processor.
2624 * tune/freq.c (freq_pstat_getprocessor): Use this.
2626 * tests/devel/try.c (divisor_array): Add a couple of half-limb values.
2628 * acinclude.m4 (GMP_PROG_CC_WORKS): Correction to last change, need to
2629 set result "yes" when cross compiling.
2631 2003-10-06 Torbjorn Granlund <tege@swox.com>
2633 * mpn/generic/mul_n.c: Use __GMPN_ADD_1/_GMPN_SUB_1 instead of
2634 mpn_add_1 and mpn_sub_1.
2636 * mpn/pa64/aorslsh1_n.asm: Schedule register save and restore code.
2638 2003-10-05 Torbjorn Granlund <tege@swox.com>
2640 * mpn/pa64/mul_1.asm: Misc comment cleanups.
2641 * mpn/pa64/addmul_1.asm: Likewise.
2642 * mpn/pa64/submul_1.asm: Likewise.
2644 * mpn/pa64/README: Correct cycle counts.
2646 * mpn/pa64/aorslsh1_n.asm: New file.
2648 2003-10-04 Kevin Ryde <kevin@swox.se>
2650 * tune/freq.c (freq_sysctl_hw_model, freq_sunos_sysinfo,
2651 freq_sco_etchw, freq_bsd_dmesg, freq_irix_hinv): Demand matching of
2652 MHz etc at end of sscanf format string. In particular need this for
2653 freq_bsd_dmesg on i486-pc-freebsd4.7 to avoid the 486 cpu being used
2656 * tests/misc.c, tests/tests.h (tests_setjmp_sigfpe,
2657 tests_sigfpe_handler, tests_sigfpe_done, tests_sigfpe_target,
2658 tests_dbl_mant_bits): New.
2660 * configure.in (viac3*-*-*): Add gcc VIA c3 options.
2662 * mpfr/*: Update to mpfr cvs 2003-10-04.
2664 * tests/refmpn.c (refmpn_addlsh1_n, refmpn_sublsh1_n,
2665 refmpn_rsh1add_n, refmpn_rsh1sub_n): Add ASSERTs for operand overlaps.
2666 * tests/tests.h (refmpn_addlsh1_n, refmpn_sublsh1_n, refmpn_rsh1add_n,
2667 refmpn_rsh1sub_n): Add prototypes.
2669 * tests/devel/try.c, tune/many.pl: Add mpn_addlsh1_n, mpn_sublsh1_n,
2670 mpn_rsh1add_n, mpn_rsh1sub_n.
2672 2003-10-03 Torbjorn Granlund <tege@swox.com>
2674 * tests/refmpn.c (refmpn_addlsh1_n, refmpn_sublsh1_n, refmpn_rsh1add_n,
2675 refmpn_rsh1sub_n): New functions.
2677 2003-10-03 Paul Zimmermann <Paul.Zimmermann@loria.fr>
2679 * mpn/generic/mul_n.c (toom3_interpolate): Use mpn_add_1/mpn_sub_1
2680 instead of MPN_INCR_/MPN_DECR_U.
2682 2003-10-02 Torbjorn Granlund <tege@swox.com>
2684 * configure.in (ia64*-*-hpux*): Fall back to +O1, not +O.
2686 2003-10-02 Kevin Ryde <kevin@swox.se>
2688 * configure.in (ia64*-*-hpux*): For cc, let +O optimization level
2689 fallback if +O3 doesn't work.
2691 * acinclude.m4 (GMP_PROG_CC_WORKS): Add a test of __builtin_alloca
2692 when available, to pick up Itanium HP-UX cc internal errors in +O2.
2693 Provoking code by Torbjorn.
2695 2003-10-01 Torbjorn Granlund <tege@swox.com>
2697 * mpn/asm-defs.m4: Handle aorslsh1_n.
2699 * configure.in (tmp_mulfunc): Handle aorslsh1_n.
2701 2003-10-01 Kevin Ryde <kevin@swox.se>
2703 * acinclude.m4 (GMP_C_DOUBLE_FORMAT): Make bad ARM last byte into a
2704 separate case and consider it non-IEEE, since it looks like this is
2705 due to some sort of restricted or incorrect software floats.
2707 * demos/calc/Makefile.am: Use automake yacc/lex support, seems fine in
2708 separate objdir now.
2710 * cxx/dummy.cc: Moved from top-level dummy.cc.
2711 * Makefile.am (libgmpxx_la_SOURCES): Update to cxx/dummy.cc,
2712 correction to comment about this.
2714 2003-09-30 Torbjorn Granlund <tege@swox.com>
2716 * demos/pexpr.c: Correct documentation of -split.
2717 (TIME): Remove cast of result to double.
2718 (main): Change timing variables to int.
2719 (main): #ifdef LIMIT_RESOURCE_USAGE, don't convert numbers of more than
2722 2003-09-28 Torbjorn Granlund <tege@swox.com>
2724 * mpn/*/*.asm: Clean up spacing, tabify.
2726 * mpn/alpha/rshift.asm: Table cycle counts.
2727 * mpn/alpha/lshift.asm: Likewise.
2728 * mpn/alpha/ev5/rshift.asm: Likewise.
2729 * mpn/alpha/ev5/lshift.asm: Likewise.
2730 * mpn/alpha/ev6/add_n.asm: Likewise.
2731 * mpn/alpha/ev6/sub_n.asm: Likewise.
2733 * mpn/pa64/mul_1.asm: Fix comment typo.
2734 * mpn/pa64/addmul_1.asm: Likewise.
2735 * mpn/pa64/submul_1.asm: Likewise.
2737 2003-09-27 Torbjorn Granlund <tege@swox.com>
2739 * mpn/powerpc64/README: Update with POWER4/PPC970 pipeline info.
2741 * mpn/powerpc64/rshift.asm: Rewrite.
2742 * mpn/powerpc64/lshift.asm: Rewrite.
2744 2003-09-25 Torbjorn Granlund <tege@swox.com>
2746 * tune/common.c (speed_mpn_addlsh1_n, speed_mpn_sublsh1_n,
2747 speed_mpn_rsh1add_n, speed_mpn_rsh1sub_n): Conditionalize on
2748 corresponding HAVE_NATIVE_*.
2750 2003-09-25 Kevin Ryde <kevin@swox.se>
2752 * mpz/combit.c: Use GMP_NUMB_BITS not BITS_PER_MP_LIMB.
2754 * demos/expr/exprfr.c: Allow for mpfr_inf_p, mpfr_nan_p and
2755 mpfr_number_p merely returning non-zero, rather than 1 or 0.
2757 * demos/expr/exprfr.c, demos/expr/t-expr.c: Add erf, integer_p, zeta.
2759 * demos/expr/Makefile.am (LDADD): Update comments on $(LIBM).
2761 2003-09-24 Torbjorn Granlund <tege@swox.com>
2763 * tune/speed.c (routine): Add entires for mpn_addlsh1_n, mpn_sublsh1_n,
2764 mpn_rsh1add_n, and mpn_rsh1sub_n.
2766 * tune/speed.h: Declare speed_mpn_addlsh1_n, speed_mpn_sublsh1_n,
2767 speed_mpn_rsh1add_n, and speed_mpn_rsh1sub_n.
2769 * tune/common.c (speed_mpn_addlsh1_n, speed_mpn_sublsh1_n,
2770 speed_mpn_rsh1add_n, speed_mpn_rsh1sub_n): New functions.
2772 * gmp-impl.h: Declare mpn_addlsh1_n, mpn_sublsh1_n, mpn_rsh1add_n, and
2775 * mpn/asm-defs.m4: Add define_mpn's for addlsh1_n, sublsh1_n,
2776 rsh1add_n, and rsh1sub_n.
2778 * mpn/powerpc64/*.asm: Add cycle counts in consistent style. Misc
2781 * configure.in: Add #undefs for HAVE_NATIVE_mpn_addlsh1_n,
2782 HAVE_NATIVE_mpn_sublsh1_n, HAVE_NATIVE_mpn_rsh1add_n,
2783 HAVE_NATIVE_mpn_rsh1sub_n.
2784 (gmp_mpn_functions_optional): List addlsh1_n, sublsh1_n, rsh1add_n,
2787 2003-09-24 Kevin Ryde <kevin@swox.se>
2789 * mpfr/*: Update to mpfr cvs 2003-09-24.
2791 * acinclude.m4 (GMP_C_DOUBLE_FORMAT): Remove conftest* temporary files.
2793 2003-09-23 Torbjorn Granlund <tege@swox.com>
2795 * gmp-impl.h (MUL_TOOM3_THRESHOLD, SQR_TOOM3_THRESHOLD): Now 128.
2797 2003-09-23 Kevin Ryde <kevin@swox.se>
2799 * gmp-h.in (gmp_randinit_set): Use __gmp_const rather than const.
2801 2003-09-22 Torbjorn Granlund <tege@swox.com>
2803 * tune/mul_n_mpn.c: (__gmpn_sqr_n): New #define.
2804 * tune/mul_n_open.c (__gmpn_sqr_n): New #define.
2806 * mpn/generic/mul.c (mpn_sqr_n): Move from here...
2807 * mpn/generic/mul_n.c (mpn_sqr_n): ...to here.
2808 (mpn_sqr_n): Allocate workspace for toom3 using TMP_* mechanism except
2809 for very large operands when !WANT_FFT.
2811 * mpn/generic/mul_n.c: Add a missing ";". Misc comment fixes.
2813 * mpn/generic/mul.c: Remove spurious #include <stdio.h>.
2815 * mpn/x86/k7/gmp-mparam.h: Retune.
2817 * mpn/generic/mul_n.c (mpn_mul_n): Allocate workspace for toom3 using
2818 TMP_* mechanism except for very large operands when !WANT_FFT.
2820 * gmp-impl.h (MPN_TOOM3_MUL_N_TSIZE, MPN_TOOM3_SQR_N_TSIZE):
2821 Define conditionally on WANT_FFT and HAVE_NATIVE_mpn_sublsh1_n.
2822 (MPN_TOOM3_MAX_N): New #define.
2824 * mpn/generic/sqr_basecase.c: Use mpn_addlsh1_n when available.
2826 * mpn/generic/mul_n.c: Use proper form for HAVE_NATIVE macros.
2828 2003-09-22 Kevin Ryde <kevin@swox.se>
2830 * mpfr/*: Update to mpfr cvs 2003-09-22.
2832 2003-09-21 Kevin Ryde <kevin@swox.se>
2834 * mpn/x86/pentium4/sse2/gmp-mparam.h (USE_PREINV_DIVREM_1,
2835 USE_PREINV_MOD_1): Set to 1 for new asm versions.
2837 * mpfr/*: Update to mpfr cvs 2003-09-21.
2839 2003-09-21 Paul Zimmermann <Paul.Zimmermann@loria.fr>
2841 * mpn/generic/mul_n.c (mpn_toom3_mul_n): Conditionally use
2842 mpn_sublsh1_n, mpn_rsh1add_n and mpn_rsh1sub_n, in addition to
2843 mpn_addlsh1_n. Avoid all copying, at the expense of some additional
2846 * gmp-impl.h (MPN_TOOM3_MUL_N_TSIZE, MPN_TOOM3_SQR_N_TSIZE): Accomodate
2849 2003-09-19 Kevin Ryde <kevin@swox.se>
2851 * mpn/x86/pentium4/sse2/divrem_1.asm, mpn/x86/pentium4/sse2/mod_1.asm:
2854 2003-09-16 Kevin Ryde <kevin@swox.se>
2856 * tune/speed.c (run_one): Don't scale the -1.0 not-available return.
2857 Print "n/a" for times not-available.
2859 2003-09-13 Paul Zimmermann <Paul.Zimmermann@loria.fr>
2861 * mpn/generic/mul_n.c (toom3_interpolate): New function.
2862 (mpn_toom3_mul_n, mpn_toom3_sqr_n): Call toom3_interpolate.
2864 2003-09-12 Torbjorn Granlund <tege@swox.com>
2866 * mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Remove unused
2868 (mpn_toom3_mul_n, mpn_toom3_sqr_n): Use offset `+ 1', not `+ 2' in last
2871 2003-09-12 Paul Zimmermann <Paul.Zimmermann@loria.fr>
2873 * mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Rewrite.
2875 2003-09-12 Torbjorn Granlund <tege@swox.com>
2877 * gmp-impl.h (MPN_KARA_MUL_N_TSIZE, MPN_KARA_SQR_N_TSIZE): Reformulate
2878 to use the same form as MPN_TOOM3_MUL_N_TSIZE.
2879 (MPN_TOOM3_MUL_N_TSIZE, MPN_TOOM3_SQR_N_TSIZE): Update for new Toom3
2881 * mpn/generic/mul_n.c (evaluate3, interpolate3, add2Times): Remove.
2882 (USE_MORE_MPN): Remove.
2884 2003-08-31 Kevin Ryde <kevin@swox.se>
2886 * mpfr/*: Update to mpfr cvs 2003-08-31.
2888 2003-08-30 Kevin Ryde <kevin@swox.se>
2890 * mpfr/*: Update to mpfr cvs 2003-08-30.
2892 2003-08-29 Torbjorn Granlund <tege@swox.com>
2894 * mpn/amd64/README: New file.
2896 2003-08-23 Kevin Ryde <kevin@swox.se>
2898 * tune/freq.c (freq_getsysinfo): Correction to speed_cycletime value
2901 * mpz/rootrem.c, gmp-h.in, gmp.texi (mpz_rootrem): Don't return
2902 exactness indication, can get that from testing the remainder.
2904 * mpn/x86/k7/aors_n.asm, mpn/x86/k7/mmx/copyi.asm: Amend to comments
2905 about loads and stores and what speed should be possible.
2907 2003-08-19 Kevin Ryde <kevin@swox.se>
2909 * longlong.h (add_ssaaaa, sub_ddmmss) [hppa 64]: Move down into main
2910 __GNUC__ block. Exclude for _LONG_LONG_LIMB (ie. ABI=2.0n) since
2911 these forms are only for ABI=2.0w.
2913 * longlong.h (count_leading_zeros) [__mcpu32__]: Check __mcpu32__ to
2914 avoid bfffo on GCC 3.4 in CPU32 mode. Reported by Bernardo Innocenti.
2916 * longlong.h (count_trailing_zeros) [x86_64]: Use "%q0" to force
2917 64-bit register destination. Pointed out by Torbjorn.
2919 * mpz/combit.c: Correction to carry handling when extending a
2920 negative, and use __GMPN_ADD_1. Correction to complement limb for a
2921 negative when there's a non-zero low limb.
2922 * tests/mpz/bit.c (check_clr_extend, check_com_negs): Exercise these.
2924 * demos/perl/GMP.xs, demos/perl/GMP.pm, demos/perl/test.pl: Add
2926 * demos/perl/GMP.xs, demos/perl/GMP.pm, demos/perl/GMP/Rand.pm,
2927 demos/perl/test.pl: Add gmp_urandomb_ui, gmp_urandomm_ui.
2928 (GMP::Rand::randstate): Accept a randstate object to copy.
2929 * demos/perl/GMP.xs, demos/perl/GMP.pm, demos/perl/GMP/Mpz.pm,
2930 demos/perl/test.pl: Add combit, rootrem.
2932 2003-08-19 Torbjorn Granlund <tege@swox.com>
2934 * tune/Makefile.am (EXTRA_DIST): Add amd64.asm.
2936 2003-08-17 Kevin Ryde <kevin@swox.se>
2938 * gmpxx.h [__MPFR_H]: Include full <iostream> for inlines.
2939 * tests/cxx/t-headfr.cc: New file, exercising this.
2940 * tests/cxx/Makefile.am: Add it.
2942 * tests/cxx/t-constr.cc: Include config.h for WANT_MPFR.
2944 * gmpxx.h: Correction to temp variable type in mpf -> mpfr assignment.
2945 Reported by Derrick Bass.
2946 * tests/cxx/t-assign.cc (check_mpfr): Exercise this.
2948 * configure.in (WANT_MPFR): AC_DEFINE this, for the benefit of
2949 tests/cxx/t-*.cc. (Was always meant to have been defined.)
2950 * tests/cxx/Makefile.am (INCLUDES): Add -I$(top_srcdir)/mpfr.
2952 * gmpxx.h: __gmp_default_rounding_mode -> __gmpfr_default_rounding_mode
2953 (struct __gmp_hypot_function): Correction to mpfr_hypot addition.
2954 * tests/cxx/t-misc.cc (check_mpfr_hypot): Corrections to mpfr/long
2957 2003-08-16 Torbjorn Granlund <tege@swox.com>
2959 * configure.in (amd64): New.
2961 * mpn/amd64/gmp-mparam.h: New file.
2963 * tune/amd64.asm: New file, derived in part from tune/pentium.asm.
2965 2003-08-15 Kevin Ryde <kevin@swox.se>
2967 * tune/freq.c (freq_irix_hinv): Reinstate, for the benefit of IRIX 6.2.
2968 (freq_attr_get_invent): Conditionalize on INFO_LBL_DETAIL_INVENT too.
2970 2003-08-14 Kevin Ryde <kevin@swox.se>
2972 * mpq/get_d.c: Use mpn_get_d.
2973 * tests/mpq/t-get_d.c (check_onebit): New test.
2975 * gmp.texi (Notes for Particular Systems): Under x86 cpu types, note
2976 i386 is a fat binary, remove pentium4 recommendation since i386 is now
2977 quite reasonable for p4.
2978 (Notes for Particular Systems): Under Windows DLLs, remove caveat
2979 about --enable-cxx now ok, update .lib creation for new libtool,
2980 remove .exp not needed for MS C.
2981 (Notes for Package Builds): i386 is a fat binary.
2982 (Reentrancy): Remove SCO ctype.h note, don't want to list every system
2983 misfeature, and was quite possibly for non-threading mode anyway.
2984 (Autoconf): Remove notes on gmp 2 detection, too old to want to
2985 encourage anyone to use.
2986 (Karatsuba Multiplication): Correction to threshold increase/decrease
2987 for a and b terms. Reported by Richard Brent and Paul Zimmermann.
2988 Also add various further index entries.
2990 * tune/freq.c (freq_attr_get_invent): New function.
2991 (freq_irix_hinv): Remove, in favour or freq_attr_get_invent.
2992 * configure.in (AC_CHECK_FUNCS): Add attr_get.
2993 (AC_CHECK_HEADERS): Add invent.h, sys/attributes.h, sys/iograph.h.
2995 2003-08-03 Kevin Ryde <kevin@swox.se>
2997 * tune/tuneup.c (tune_mul): Use MUL_KARATSUBA_THRESHOLD_LIMIT.
2999 2003-08-02 Kevin Ryde <kevin@swox.se>
3001 * mpn/asm-defs.m4: Tweak some comments, add hpux11 to m4wrap 0xFF
3004 * configure.in (*-*-sco3.2v5*): Remove lt_cv_archive_cmds_need_lc=no,
3005 since libtool no longer uses it. This was a workaround fixing ctype.h
3006 in SCO 5 shared libraries; not sure if libtool now gets it right on
3007 its own, let's hope so.
3009 * configure.in, acinclude.m4 (GMP_PROG_HOST_CC): Remove, libtool no
3010 longer demands HOST_CC.
3012 * configure.in: When C or C++ compiler not found, refer user to
3015 * configure.in (i386-*-*): Turn i386 into a fat binary build.
3016 * mpn/x86/fat/fat.c, mpn/x86/fat/fat_entry.asm,
3017 mpn/x86/fat/gmp-mparam.h, mpn/x86/fat/gcd_1.c, mpn/x86/fat/mode1o.c:
3019 * gmp-impl.h (struct cpuvec_t) [x86 fat]: New structure.
3020 * longlong.h (COUNT_LEADING_ZEROS_NEED_CLZ_TAB) [x86 fat]: Define.
3021 * mpn/asm-defs.m4 (foreach): New macro.
3022 * mpn/x86/x86-defs.m4 (CPUVEC_FUNCS_LIST): New define.
3023 * mpn/x86/sqr_basecase.asm: New file, primarily as a fallback for fat
3025 * mpn/x86/p6/gmp-mparam.h, mpn/x86/p6/mmx/gmp-mparam.h: Add comments
3026 about fat binary SQR_KARATSUBA_THRESHOLD for p6 and p6/mmx.
3028 * configure.in: Add various supports for fat binaries, via fat_path,
3029 fat_functions and fat_thresholds variables.
3030 * acinclude.m4 (GMP_STRIP_PATH): Mung $fat_path too.
3031 (GMP_FAT_SUFFIX, GMP_REMOVE_FROM_LIST): New macros.
3032 * gmp-impl.h: Add various supports for fat binaries.
3033 (DECL_add_n etc): New macros.
3034 (mpn_mul_basecase etc): Define only if not already defined.
3035 * mpn/asm-defs.m4 (m4_config_gmp_mparam): Mention fat binary.
3036 (MPN): Use m4_unquote, for the benefit of fat binary name expansion.
3037 * doc/configuration: Notes on fat binaries.
3038 * gmp-impl.h (MUL_TOOM3_THRESHOLD_LIMIT): Define always.
3039 (MUL_KARATSUBA_THRESHOLD_LIMIT): New define.
3040 * mpn/generic/mul.c, mpn/generic/mul_n.c: Use these.
3041 * tune/divrem1div.c, tune/divrem1inv.c, tune/mod_1_div.c,
3042 tune/mod_1_inv.c: Define OPERATION_divrem_1 and OPERATION_mod_1, to
3043 tell fat.h what's being done.
3045 * config.guess (alpha-*-*): Update comments on what configfsf.guess
3046 does and doesn't do for us.
3048 2003-07-31 Kevin Ryde <kevin@swox.se>
3050 * config.guess: Remove $dummy.o files everywhere, in case vendor
3051 compilers produce that even when not asked.
3053 * demos/perl/GMP.xs (class_or_croak): Rename "class" parameter to
3055 (coerce_ulong, coerce_long): Move croaks to stop g++ 3.3 complaining
3056 about uninitialized variables.
3058 * demos/perl/INSTALL: Add notes on building with a DLL.
3060 * longlong.h (count_trailing_zeros) [x86_64]: Ensure bsfq destination
3061 is a 64-bit register. Diagnosed by Francois G. Dorais.
3063 2003-07-31 Torbjorn Granlund <tege@swox.com>
3065 * longlong.h [ppc]: Remove nested test for vxworks.
3067 2003-07-24 Kevin Ryde <kevin@swox.se>
3069 * gmpxx.h (struct __gmp_binary_multiplies): Use mpz_mul_si for
3070 mpz*long and long*mpz.
3071 * tests/cxx/t-ops.cc (check_mpz): Exercise mpz*long and mpz*ulong.
3073 * cxx/ismpf.cc: Use std::locale decimal point when available. Expect
3074 localeconv available always.
3075 * tests/cxx/t-locale.cc: Enable check_input tests.
3077 * gmpxx.h (struct __gmp_hypot_function): Use mpfr_hypot.
3078 * tests/cxx/t-misc.cc (check_mpfr_hypot): New tests.
3080 * tests/cxx/t-assign.cc, tests/cxx/t-binary.cc, tests/cxx/t-ops.cc,
3081 tests/cxx/t-prec.cc, tests/cxx/t-ternary.cc, tests/cxx/t-unary.cc:
3082 Include config.h for WANT_MPFR.
3084 * tests/mpz/bit.c (check_single): Correction to a diagnostic print.
3086 2003-07-24 Niels Möller <nisse@lysator.liu.se>
3088 * mpz/combit.c: New file.
3089 * Makefile.am, mpz/Makefile.am: Add it.
3090 * gmp-h.in (mpz_combit): Add prototype.
3091 * tests/mpz/bit.c (check_single): Exercise mpz_combit.
3093 2003-07-16 Kevin Ryde <kevin@swox.se>
3095 * mpn/generic/get_d.c: Correction to infinity handling for large exp.
3097 2003-07-14 Kevin Ryde <kevin@swox.se>
3099 * mpz/get_d.c, mpz/get_d_2exp.c, mpf/get_d.c, mpf/get_d_2exp.c: Use
3102 * mpn/generic/get_d.c: New file, based on mpz/get_d.c and insert-dbl.c.
3103 * configure.in, mpn/Makefile.am: Add it.
3104 * gmp-impl.h (mpn_get_d): Add prototype.
3106 * tests/mpn/t-get_d.c: New file.
3107 * tests/mpn/Makefile.am: Add it.
3109 * tests/mpz/t-get_d_2exp.c (check_onebit, check_round): Test negatives.
3110 (check_onebit): Add a few more bit sizes.
3112 * tests/misc.c, tests/tests.h (tests_isinf): New function.
3114 2003-07-12 Kevin Ryde <kevin@swox.se>
3116 * configure.in (GMP_PROG_CXX_WORKS): Include $CPPFLAGS, same as
3117 automake does in the actual build.
3119 * acinclude.m4 (GMP_PROG_CXX_WORKS): In the namespace test, declare
3120 namespace before trying to use. In std iostream test, provoke a
3121 failure from Compaq C++ in pre-standard mode.
3123 2003-07-08 Kevin Ryde <kevin@swox.se>
3125 * acinclude.m4 (GMP_PROG_CC_WORKS): Use separate compiles for various
3126 known problems, and indicate to the user the reason for rejecting.
3127 (GMP_PROG_CXX_WORKS): Ditto, and insist on being able to execute each
3130 2003-07-05 Kevin Ryde <kevin@swox.se>
3132 * config.sub: Add comments to our alias transformations.
3134 * configfsf.sub, configfsf.guess: Update to 2003-07-04.
3136 * acinclude.m4 (GMP_PROG_CC_WORKS, GMP_PROG_CC_WORKS_LONGLONG): Show
3137 failing program in config.log, per other autoconf tests.
3139 * configure.in (i786-*-*): Recognise as pentium4, per configfsf.sub.
3141 2003-06-28 Kevin Ryde <kevin@swox.se>
3143 * mpz/get_d_2exp.c, mpf/get_d_2exp.c: Avoid res==1.0 when floats round
3146 * tests/mpz/t-get_d_2exp.c: New file.
3147 * tests/mpz/Makefile.am (check_PROGRAMS): Add it.
3148 * tests/mpf/t-get_d_2exp.c: New file.
3149 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
3150 * tests/x86call.asm, test/tests.h (x86_fldcw, x86_fstcw): New
3152 * tests/misc.c, tests/tests.h (tests_hardware_getround,
3153 tests_hardware_setround): New functions.
3155 2003-06-25 Kevin Ryde <kevin@swox.se>
3157 * mpn/sparc64/dive_1.c: New file.
3159 * mpn/sparc64/sparc64.h: New file.
3160 * mpn/sparc64/mode1o.c: Remove things now in sparc64.h.
3162 * mpfr/*: Update to mpfr cvs 2003-06-25.
3164 * acinclude.m4 (GMP_PROG_CC_WORKS): In last change provoking gnupro
3165 gcc, don't use ANSI style function definition.
3167 2003-06-22 Kevin Ryde <kevin@swox.se>
3169 * mpn/pa32/hppa1_1/udiv.asm: Remove .proc, .entry, .exit and .procend,
3170 handled by PROLOGUE and EPILOGUE. Comment out .callinfo, per other
3173 * gmpxx.h (mpz_class __gmp_binary_divides, __gmp_binary_modulus): Fix
3174 long/mpz and long%mpz for dividend==LONG_MIN divisor==-LONG_MIN.
3175 (mpz_class __gmp_binary_modulus): Fix mpz%long for negative dividend.
3176 * tests/cxx/t-ops.cc (check_mpz): Add test cases for these, merging
3177 operator/ and operator% sections for clarity.
3179 2003-06-21 Kevin Ryde <kevin@swox.se>
3181 * mpfr/*: Update to mpfr cvs 2003-06-21.
3183 * acinclude.m4 (GMP_PROG_CC_WORKS): Add code by Torbjorn provoking an
3184 ICE from gcc 2.9-gnupro-99r1 under -O2 -mcpu=ev6.
3185 * configure.in (alpha*-*-* gcc_cflags_cpu): Fallback on -mcpu=ev56 for
3188 * gmpxx.h (get_d): Remove comments about long double, double is
3189 correct for get_d, a future long double form would be get_ld.
3191 2003-06-19 Kevin Ryde <kevin@swox.se>
3193 * mpfr/*: Update to mpfr cvs 2003-06-19.
3195 * mpn/generic/dive_1.c: Share src[0] fetch among all cases. No need
3196 for separate final umul_ppmm in even case, make it part of the loop.
3198 * mpz/get_d_2exp.c, mpq/set_si.c, mpq/set_ui.c: Nailify.
3200 * mpf/iset_si.c: Rewrite using mpf/set_si.c code, in particular this
3202 * tests/mpf/t-set_si.c: Nailify tests.
3204 * mpf/iset_ui.c: Nailify, as per mpf/set_ui.c
3205 * tests/mpf/t-set_ui.c: New file.
3206 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
3208 2003-06-15 Kevin Ryde <kevin@swox.se>
3210 * mpfr/*: Update to mpfr cvs 2003-06-15.
3212 * mpn/x86/k6/mode1o.asm: Remove a bogus ASSERT.
3214 2003-06-12 Kevin Ryde <kevin@swox.se>
3216 * configure.in (--enable-assert): Emit WANT_ASSERT to config.m4.
3217 * mpn/powerpc32/powerpc-defs.m4, mpn/x86/x86-defs.m4 (ASSERT): Check
3218 WANT_ASSERT is defined.
3220 * mpn/sparc32/v9/udiv.asm: Amend heading, this file is for sparc v9.
3222 * tests/cxx/Makefile.am (TESTS_ENVIRONMENT): In libtool openbsd hack,
3223 disard error messages from cp, for the benefit of --disable-shared or
3224 systems not using names libgmp.so.*.
3226 * tests/devel/try.c (try_one): When overlapping, copy source data
3227 after filling dst. Previously probably used only DEADVAL in
3230 2003-06-11 Torbjorn Granlund <tege@swox.com>
3232 * mpf/random2.c: Rewrite. Ignore sign of exp parameter.
3234 2003-06-10 Kevin Ryde <kevin@swox.se>
3236 * mpn/sparc64/mode1o.c: New file.
3238 2003-06-09 Torbjorn Granlund <tege@swox.com>
3240 * mpn/powerpc32/lshift.asm: Add more cycle counts.
3241 * mpn/powerpc32/rshift.asm: Add more cycle counts.
3243 * gmp-impl.h (udiv_qrnnd_preinv1): New name for udiv_qrnnd_preinv.
3244 (udiv_qrnnd_preinv2): New name for udiv_qrnnd_preinv2norm.
3245 (udiv_qrnnd_preinv): New #define, making udiv_qrnnd_preinv2
3247 * tune/speed.c: Corresponding changes.
3248 * tune/speed.h: Likewise.
3249 * tune/common.c: Likewise.
3251 * mpf/get_str.c: Simplify `off' computation.
3253 * longlong.h: Tabify.
3255 2003-06-09 Kevin Ryde <kevin@swox.se>
3257 * gmp.texi (ABI and ISA): FreeBSD has sparc64 too, just say "BSD" to
3259 * configure.in: Ditto in some comments.
3261 * mpfr/*: Update to mpfr cvs 2003-06-09.
3263 * tests/cxx/Makefile.am (LDADD): Add -L$(top_builddir)/$(LIBS), for
3264 the benefit of gcc 3.2 on itanium2-hp-hpux11.22.
3266 * tune/many.pl (mul_2): Add speed routine settings.
3267 (MAKEFILE): Close when done, for the benefit of development hackery.
3269 2003-06-08 Kevin Ryde <kevin@swox.se>
3271 * mpfr/*: Update to mpfr cvs 2003-06-08.
3273 * mpn/x86/x86-defs.m4 (femms): Remove fallback to emms.
3274 (cmovCC, psadbw): Remove simulated versions.
3275 (cmov_available_p, psadbw_available_p): Remove.
3276 This trickery was only ever for development purposes on machines
3277 without those instructions. Removing it simplifies gmp and in
3278 particular avoids complications for fat binary builds. Development
3279 can be done with a wrapper around "as" if really needed.
3281 * mpn/x86/divrem_1.asm: Don't use loop_or_decljnz, now K6 has its own
3282 mpn/x86/k6/divrem_1.asm. Amend K6 comments now moved to there.
3283 * mpn/x86/x86-defs.m4 (loop_or_decljnz): Remove, no longer used.
3285 * mpn/x86/k6/divrem_1.asm: New file, derived from mpn/x86/divrem_1.asm.
3287 * mpn/x86/k6/pre_mod_1.asm: Remove comments now in mpn/x86/mod_1.asm.
3289 * mpn/x86/mod_1.asm: Put mpn_mod_1c after mpn_mod_1 for better branch
3290 prediction. Put done_zero at end for less wastage in alignment. Use
3291 decl+jnz unconditionally since in fact it's ok on k6. Amend comments.
3293 2003-06-07 Kevin Ryde <kevin@swox.se>
3295 * mpn/generic/mode1o.c: Fix ASSERTs on return value.
3297 * gmp.texi (Build Options): Add viac3 and viac32 cpu types.
3298 (ABI and ISA): Note on sparcv9 ABI=32 vs ABI=64 speed. More indexing.
3300 * configfsf.guess, configfsf.sub: Update to 2003-06-06.
3301 * config.guess: Remove $RANDOM hack supporting netbsd 1.4, not needed
3302 by new configfsf.guess.
3305 2003-06-05 Torbjorn Granlund <tege@swox.com>
3307 * longlong.h (add_ssaaaa) [pa64]: Output zero operand as register 0.
3308 Allow more immediate operands.
3309 (sub_ddmmss) [pa64]: Likewise.
3310 (add_ssaaaa) [pa32]: Likewise.
3311 (sub_ddmmss) [pa32]: Likewise.
3313 * mpn/pa64: Change ".level 2.0W" to ".level 2.0w" to please
3314 picky GNU assembler.
3316 2003-06-05 Kevin Ryde <kevin@swox.se>
3318 * gmp.texi (Integer Special Functions): In mpz_array_init, fix type
3319 shown for integer_array and give an example use.
3321 2003-06-04 Torbjorn Granlund <tege@swox.com>
3323 * mpf/set_str.c (mpf_set_str): Work around gcc 2 bug triggered on
3326 2003-06-03 Kevin Ryde <kevin@swox.se>
3328 * mpn/x86/pentium/README: Add 7 c/l mmx mul_1, tweak wordings.
3330 * acinclude.m4 (GMP_C_DOUBLE_FORMAT): Use octal char constants in test
3331 program, hex is not supported by K&R.
3333 2003-06-02 Torbjorn Granlund <tege@swox.com>
3335 * mpn/mips64/divrem_1.asm: New file.
3337 2003-06-01 Torbjorn Granlund <tege@swox.com>
3339 * mpn/powerpc32/lshift.asm: Reformat code.
3340 * mpn/powerpc32/rshift.asm: Reformat code.
3342 2003-05-30 Kevin Ryde <kevin@swox.se>
3344 * tests/misc.c (tests_start): Set stdout and stderr to unbuffered, to
3345 avoid any chance of losing output on segv etc.
3347 2003-05-28 Torbjorn Granlund <tege@swox.com>
3349 * mpf/get_str.c: Move label `done' to match TMP_MARK and TMP_FREE.
3350 Remove redundant variable prec.
3352 2003-05-26 Torbjorn Granlund <tege@swox.com>
3354 * tests/mpz/convert.c: Test bases up to 62.
3356 * tests/mpf/t-conv.c: Test bases up to 62.
3358 * demos/pexpr.c: Don't iterate to get accurate timing.
3360 * mpf/set_str.c (mpn_pow_1_highpart): Cleanup.
3362 * mp_dv_tab.c: Fix typo.
3364 * mpf/get_str.c: Rewrite (now sub-quadratic).
3366 2003-05-22 Kevin Ryde <kevin@swox.se>
3368 * tests/mpn/t-divrem_1.c: New file.
3369 * tests/mpn/Makefile.am: Add it.
3371 2003-05-22 Torbjorn Granlund <tege@swox.com>
3373 * config.sub: Recognize viac3* processors.
3375 2003-05-20 Torbjorn Granlund <tege@swox.com>
3377 * mpn/sparc64/addmul_2.asm: New file.
3379 2003-05-19 Torbjorn Granlund <tege@swox.com>
3381 * configure.in: Recognize alphaev7* as alphaev67.
3383 * config.guess: Recognize viac3* processors.
3384 * configure.in: Set up path for viac3* processors.
3385 * acinclude.m4 (X86_PATTERN): Include viac3* processors.
3387 2003-05-19 Kevin Ryde <kevin@swox.se>
3389 * tune/freq.c (freq_pstat_getprocessor): New function.
3391 * configure.in (AC_CHECK_HEADERS): Add sys/pstat.h.
3392 (AC_CHECK_FUNCS): Add pstat_getprocessor.
3394 2003-05-15 Kevin Ryde <kevin@swox.se>
3396 * mpn/generic/mul_fft.c (mpn_mul_fft_decompose): Remove "inline",
3397 since the code is a bit too big. gcc doesn't actually inline when
3398 alloca (TMP_ALLOC) is used anyway.
3400 2003-05-13 Kevin Ryde <kevin@swox.se>
3402 * gmp.texi (Notes for Particular Systems): Libtool directory is .libs
3403 not _libs for mingw dll. Reported by Andreas Fabri.
3405 2003-05-07 Kevin Ryde <kevin@swox.se>
3407 * acinclude.m4 (GMP_PROG_CC_WORKS): Add code to generate sse2/xmm code
3408 from gcc -march=pentium4, to check the assembler supports that.
3409 (GMP_GCC_PENTIUM4_SSE2, GMP_OS_X86_XMM): New macros.
3410 * configure.in (pentium4-*-*): Use them to see if gcc -march=pentium4
3413 2003-05-06 Kevin Ryde <kevin@swox.se>
3415 * mpz/com.c: Rate size==0 as UNLIKELY, fix comment to mpn_add_1.
3417 * tune/freq.c (<sys/sysinfo.h>): Include only when needed for
3418 getsysinfo(), to avoid a problem with this file on AIX 5.1.
3420 2003-05-03 Torbjorn Granlund <tege@swox.com>
3422 * mpf/set_str.c: Do not ignore supposedly superfluous digits (in part
3423 reverting last change).
3425 2003-05-03 Kevin Ryde <kevin@swox.se>
3427 * gmp.texi: Use @code for files in @cindex entries, it looks nicer
3430 * Makefile.am: Note gmp 4.1.1 and 4.1.2 version info.
3432 * configure.in, acinclude.m4 (GMP_CRAY_OPTIONS): New macro for Cray
3433 system setups, letting AC_REQUIRE do its job instead of a hard coded
3436 * config.guess: Amend fake RANDOM to avoid ". configfsf.guess" which
3437 segfaults on Debian "ash" 0.4.16.
3439 2003-05-01 Kevin Ryde <kevin@swox.se>
3441 * configure.in (AC_CHECK_FUNCS): Add getsysinfo.
3442 (AC_CHECK_HEADERS): Add sys/sysinfo.h and machine/hal_sysinfo.h.
3443 * tune/freq.c (freq_getsysinfo): New function.
3445 (freq_sysctlbyname_i586_freq, freq_sysctlbyname_tsc_freq,
3446 freq_sysctl_hw_cpufrequency, freq_sysctl_hw_model): Set
3447 speed_cycletime before trying to print it, when verbose.
3449 2003-04-28 Torbjorn Granlund <tege@swox.com>
3451 * mpf/set_str.c: Major overhaul.
3452 (mpn_pow_1_highpart): New helper function, meat extracted from
3455 2003-04-24 Kevin Ryde <kevin@swox.se>
3457 * acinclude.m4 (GMP_GCC_ARM_UMODSI): Quote result string against m4.
3459 * configure, ltmain.sh, aclocal.m4: Update to libtool 1.5.
3461 * longlong.h (add_ssaaaa) [all]: Remove first "%" commutative in each,
3462 since gcc only supports one per asm.
3464 * printf/doprnt.c: Add M for mp_limb_t.
3465 * tests/misc/t-printf.c: Exercise this.
3467 * tests/mpz/t-cmp_d.c: Test infinities.
3468 * tests/mpf/t-cmp_d.c: New file.
3469 * tests/mpf/Makefile.am: Add it.
3471 * mpz/cmp_d.c, mpz/cmpabs_d.c, mpf/cmp_d.c: NaN invalid, Inf bigger
3473 * mpz/set_d.c, mpq/set_d.c, mpf/set_d.c: Nan or Inf invalid.
3475 * configure.in (AC_CHECK_FUNCS): Add raise.
3476 * invalid.c: New file.
3477 * Makefile.am: Add it.
3478 * gmp-impl.h (__gmp_invalid_operation): Add prototype.
3479 (DOUBLE_NAN_INF_ACTION): New macro.
3481 * tests/trace.c, tests/tests.h (d_trace): New function.
3482 * tests/misc.c, tests/tests.h (tests_infinity_d): New function.
3483 * tests/misc.c (mpz_erandomb, mpz_errandomb): Use gmp_urandomm_ui.
3485 * tune/tuneup.c, tune/common.c, tests/devel/try.c: Cast various
3486 mp_size_t values for printf %ld in case mp_size_t==int. Use
3487 gmp_printf for mp_limb_t values.
3489 * gmp.texi (Nomenclature and Types): Add mp_exp_t, mp_size_t,
3490 gmp_randstate_t. Note ulong for bit counts and size_t for byte
3491 counts. Don't bother with @noindent.
3492 (Debugging): New valgrind is getting MMX/SSE.
3493 (Integer Comparisons): mpz_cmp_d and mpz_cmpabs_d on NaNs and Infs.
3494 (Float Comparison): mpf_cmp_d behaviour on NaNs and Infs.
3495 (Low-level Functions): Note with mpn_hamdist what hamming distance is.
3496 (Formatted Output Strings): Add type M.
3497 (Internals): Remove remarks on ulong bits and size_t bytes. Move int
3498 field remarks to ...
3499 (Integer Internals, Float Internals): ... here.
3501 2003-04-19 Kevin Ryde <kevin@swox.se>
3503 * configure.in (*sparc*-*-* ABI=32): Add umul to extra_functions.
3505 * mpn/x86/p6/mul_basecase.asm: New file.
3507 2003-04-18 Kevin Ryde <kevin@swox.se>
3509 * configure.in (m68060-*-*): Fallback to gcc -m68000 when -m68060 not
3510 available, and don't use mpn/m68k/mc68020 asm routines. (Avoids 32x32
3511 mul and 64/32 div which trap to the kernel on 68060. Advice by
3513 * mpn/m68k/README: Update notes on directory usage.
3515 * tests/cxx/Makefile.am (TESTS_ENVIRONMENT): Add a hack to let the
3516 test programs run with a shared libgmpxx on openbsd 3.2.
3518 * gmp.texi (Language Bindings): Add Guile.
3520 2003-04-12 Kevin Ryde <kevin@swox.se>
3522 * configure.in (cygwin*, mingw*, pw32*, os2*): Add
3523 -Wl,--export-all-symbols to GMP_LDFLAGS, no longer the default in
3524 latest mingw and libtool.
3526 * acinclude.m4 (GMP_ASM_COFF_TYPE): New macro.
3527 * configure.in (x86s): Use it.
3528 * mpn/x86/x86-defs.m4 (COFF_TYPE): New macro.
3529 (PROLOGUE_cpu): Use it, for the benefit of mingw DLLs.
3531 * gmp-impl.h (mpn_copyi, mpn_copyd): Add __GMP_DECLSPEC.
3533 * gmp.texi (Known Build Problems): Remove windows test program .exe
3534 repeated built, fixed by new libtool. Remove MacOS C++ shared library
3535 creation, fixed by new libtool.
3536 (Notes for Package Builds, Known Build Problems): Remove DESTDIR notes
3537 on libgmpxx, fixed in new libtool.
3539 2003-04-10 Torbjorn Granlund <tege@swox.com>
3541 * configure.in: Match turbosparc.
3542 * config.guess: Recognize turbosparc (just for *bsd for now).
3544 2003-04-09 Kevin Ryde <kevin@swox.se>
3546 * mpf/mul_ui.c [nails]: Call mpf_mul to handle v > GMP_NUMB_MAX.
3548 * tests/mpz/t-mul.c (main): Don't try FFT sizes when FFT disabled via
3549 MP_SIZE_T_MAX, eg. for nails.
3551 * tests/cxx/t-ternary.cc: Split up tests to help compile speed and
3554 * tests/devel/try.c: Print seed under -R, add -E to reseed, use ulong
3557 * gmp.texi: Add @: after various abbreviations, more index entries.
3558 (leftarrow): New macro, for non-tex.
3559 (Random State Initialization): Remove commented gmp_randinit_lc, not
3560 going to be implemented.
3561 (Random Number Algorithms): New section.
3562 (References): Add Matsumoto and Nishimura on Mersenne Twister, add
3563 Bertot, Magaud and Zimmermann on GMP Square Root.
3565 2003-04-06 Kevin Ryde <kevin@swox.se>
3567 * tests/mpz/t-gcd_ui.c: New file.
3568 * tests/mpz/Makefile.am: Add it.
3570 * mpz/gcd_ui.c: Correction to return value on longlong limb systems,
3571 limb might not fit a ulong.
3573 2003-04-04 Kevin Ryde <kevin@swox.se>
3575 * configure, aclocal.m4, ltmain.sh: Update to libtool cvs snapshot
3578 2003-04-02 Kevin Ryde <kevin@swox.se>
3580 * configure.in (*-*-cygwin*): No longer force lt_cv_sys_max_cmd_len,
3581 libtool has addressed this now.
3582 (AC_PROVIDE_AC_LIBTOOL_WIN32_DLL): Remove this, libtool _LT_AC_LOCK
3585 * acinclude.m4 (GMP_PROG_AR): Also set ac_cv_prog_AR and
3586 ac_cv_prog_ac_ct_AR when adding flags to AR, so they're not lost by
3587 libtool's call to AC_CHECK_TOOL.
3589 2003-04-01 Kevin Ryde <kevin@swox.se>
3591 * configure, aclocal.m4, ltmain.sh: Update to libtool cvs snapshot
3594 * configure.in (AC_PROG_F77): Add a dummy AC_PROVIDE to stop libtool
3597 * randlc2x.c (gmp_rand_lc_struct): Add comments about what exactly is
3599 (randseed_lc): Rename seedp to seedz to avoid confusion with seedp in
3600 the lc function. Suggested by Pedro Gimeno.
3601 (gmp_randinit_lc_2exp): Use __GMP_ALLOCATE_FUNC_TYPE. No need for
3602 "+1" in mpz_init2 of _mp_seed. Don't bother with mpz_init2 for _mp_a.
3604 2003-03-29 Kevin Ryde <kevin@swox.se>
3606 * configure.in (m68k-*-*): Use -O2, no longer need to fallback to -O.
3607 * acinclude.m4 (GMP_GCC_M68K_OPTIMIZE): Remove macro.
3609 * configure.in (AC_CHECK_TYPES): Add notes on why tested.
3611 * gmp.texi (GMPrefu, GMPpxrefu, GMPreftopu, GMPpxreftopu): New macros,
3612 use them for all external references to get URLs into HTML output.
3613 (Random State Initialization): Add gmp_randinit_set.
3614 (Random State Miscellaneous): New section.
3616 2003-03-29 Kevin Ryde <kevin@swox.se>
3618 * randbui.c, randmui.c: New files.
3619 * Makefile.am: Add them.
3620 * gmp-h.in (gmp_urandomb_ui, gmp_urandomm_ui): Add prototypes.
3621 * tests/rand/t-urbui.c, tests/rand/t-urmui.c: New files.
3622 * tests/rand/Makefile.am: Add them.
3624 * gmp-impl.h (gmp_randstate_srcptr): New typedef.
3625 (gmp_randfnptr_t): Add randiset_fn.
3626 * randiset.c: New file.
3627 * Makefile.am: Add it.
3628 * gmp-h.in (gmp_randinit_set): Add prototype.
3629 * randlc2x.c, randmt.c: Add gmp_randinit_set support.
3630 * tests/rand/t-iset.c: New file.
3631 * tests/rand/Makefile.am: Add it.
3633 * tests/misc.c, tests/tests.h (call_rand_algs): New function.
3635 2003-03-27 Kevin Ryde <kevin@swox.se>
3637 * mpz/bin_uiui.c: Use plain "*" for kacc products rather than
3638 umul_ppmm since high not needed, except for an ASSERT now amended.
3640 2003-03-26 Kevin Ryde <kevin@swox.se>
3642 * demos/expr/exprfr.c (cbrt, cmpabs, exp2, gamma, nextabove,
3643 nextbelow, nexttoward): New functions.
3644 * demos/expr/t-expr.c: Exercise these.
3646 * mpfr/*: Update to mpfr cvs 2003-03-26.
3648 * gmp-impl.h (MPZ_REALLOC): Use UNLIKELY, to expect no realloc.
3650 * tune/time.c (cycles_works_p): Scope variables down to relevant part
3651 to avoid warnings about unused.
3653 * configfsf.guess, configfsf.sub: Update to 2003-02-22.
3654 * config.guess: Fake a $RANDOM variable when running configfsf.guess,
3655 to workaround a problem on m68k NetBSD 1.4.1.
3657 * mpz/fac_ui.c: Remove unused variable "z1".
3659 * tune/freq.c (freq_irix_hinv): Allow "Processor 0" line from IRIX 6.5.
3661 2003-03-24 Torbjorn Granlund <tege@swox.com>
3663 * randlc2x.c (randget_lc): Remove write-only variable rn.
3664 * mpf/eq.c: Remove write-only variable usign.
3665 * gen-psqr.c (main): Remove write-only variable numb_bits.
3667 2003-03-17 Torbjorn Granlund <tege@swox.com>
3669 * Makefile.am (libgmp_la_SOURCES): Add mp_dv_tab.c.
3670 (libmp_la_SOURCES): Add mp_dv_tab.c.
3672 * mpn/alpha/invert_limb.asm: Add a few comments.
3674 * mp_dv_tab.c: New file, defining __gmp_digit_value_tab.
3676 * mpz/set_str.c: Get rid of function digit_value_in_base and use table
3677 __gmp_digit_value_tab instead.
3678 * mpz/inp_str.c: Likewise.
3679 * mpf/set_str.c: Likewise.
3680 * mpbsd/min.c: Likewise.
3681 * mpbsd/xtom.c: Likewise.
3683 * mpz/set_str.c: Allow bases <= 62. Return error for invalid bases.
3684 * mpz/inp_str.c: Likewise.
3685 * mpf/set_str.c: Likewise.
3686 * mpz/out_str.c: Likewise.
3687 * mpz/get_str.c: Likewise.
3688 * mpf/get_str.c: Likewise.
3690 * mpz/inp_str.c: Restucture to allocate more string space just
3692 * mpbsd/min.c: Likewise.
3694 * longlong.h (__udiv_qrnnd_c): Remove redundant casts.
3695 (32-bit sparc): Test HAVE_HOST_CPU_supersparc in addition to various
3698 2003-03-17 Kevin Ryde <kevin@swox.se>
3700 * mpfr/*: Update to mpfr cvs 2003-03-17.
3702 2003-03-15 Kevin Ryde <kevin@swox.se>
3704 * Makefile.am (EXTRA_libgmp_la_SOURCES): Use this for TMP_ALLOC
3705 sources, instead of a libdummy.la.
3707 2003-03-16 Torbjorn Granlund <tege@swox.com>
3709 * config.guess: Recognize supersparc and microsparc for *BSD systems.
3710 Generalize some superscalar recognition patterns.
3712 2003-03-14 Torbjorn Granlund <tege@swox.com>
3714 * mpn/sparc64/udiv.asm: New file.
3716 2003-03-13 Torbjorn Granlund <tege@swox.com>
3718 * mpn/sparc64: Table cycle counts. Update some comments.
3720 2003-03-10 Torbjorn Granlund <tege@swox.com>
3722 * mpn/generic/mul.c (mpn_mul): Don't blindly expect
3723 MUL_KARATSUBA_THRESHOLD to be a constant.
3725 2003-03-07 Torbjorn Granlund <tege@swox.com>
3727 * mpn/generic/mul.c (mpn_mul): New operand splitting code for
3728 avoiding cache misses when un >> MUL_KARATSUBA_THRESHOLD > vn.
3729 (MUL_BASECASE_MAX_UN): New #define, default to 500 for now.
3731 2003-03-07 Kevin Ryde <kevin@swox.se>
3733 * Makefile.am: Put gmp.h and mp.h under $(exec_prefix)/include.
3734 * gmp.texi (Build Options): Add notes on this.
3735 Reported by Vincent Lefèvre.
3737 2003-03-06 Kevin Ryde <kevin@swox.se>
3739 * configure.in (alpha*-*-* gcc): Add asm option before testing -mcpu,
3740 for the benefit of gcc 2.9-gnupro-99r1 on alphaev68-dec-osf5.1 which
3741 doesn't otherwise put the assembler in the right mode for -mcpu=ev6.
3743 2003-03-05 Torbjorn Granlund <tege@swox.com>
3745 * mpn/powerpc32/powerpc-defs.m4: Set up renaming for v registers.
3747 * mpz/powm.c (redc): Instead of repeated mpn_incr_u invocations,
3748 accumulate carries and add at the end.
3749 (mpz_powm): Trim tp allocation, now as redc doesn't need carry guard.
3751 2003-02-25 Torbjorn Granlund <tege@swox.com>
3753 * mpn/x86/pentium4/copyd.asm: Correct header comment.
3755 * mpn/arm/addmul_1.asm: Correct cycle counts.
3756 * mpn/arm/submul_1.asm: Likewise.
3758 2003-02-20 Kevin Ryde <kevin@swox.se>
3760 * demos/factorize.c (factor_using_pollard_rho): Test k>0 to avoid
3761 infinite loop if k=0 and gcd!=1 reveals a factor. Reported by John
3764 * gmp.texi, fdl.texi: Update to FDL version 1.2.
3766 2003-02-18 Torbjorn Granlund <tege@swox.com>
3768 * mpn/arm/mul_1.asm: Fix typo introduced in last change.
3770 2003-02-17 Torbjorn Granlund <tege@swox.com>
3772 * mpn/sparc64/copyi.asm: Add some header comments.
3773 * mpn/sparc64/copyd.asm: Likewise.
3775 * mpn/arm/mul_1.asm: Put vl operand last for umull/umlal.
3776 Add some header comments.
3777 * mpn/arm/addmul_1.asm: Rewrite.
3778 * mpn/arm/submul_1.asm: Rewrite.
3779 * mpn/arm/gmp-mparam.h: Retune.
3781 2003-02-16 Torbjorn Granlund <tege@swox.com>
3783 * mpn/arm/copyi.asm: New file.
3784 * mpn/arm/copyd.asm: New file.
3786 2003-02-16 Kevin Ryde <kevin@swox.se>
3788 * acinclude.m4 (GMP_C_DOUBLE_FORMAT): Tolerate incorrect last data
3789 byte seen on an arm system.
3791 2003-02-15 Torbjorn Granlund <tege@swox.com>
3793 * mpn/arm/gmp-mparam.h: Retune.
3795 2003-02-13 Torbjorn Granlund <tege@swox.com>
3797 * mpn/powerpc32/750/com_n.asm: Add more cycle counts.
3799 2003-02-13 Kevin Ryde <kevin@swox.se>
3801 * configure.in (AC_PREREQ): Bump to 2.57.
3803 * configure.in, acinclude.m4 (GMP_GCC_WA_OLDAS): New macro, applying
3804 -Wa,-oldas only when necessary.
3806 * configure.in (powerpc*-*-*): Don't use -Wa,-mppc with gcc, it
3807 overrides options recent gcc adds for -mcpu, making generated code
3810 * tune/tuneup.c (mpn_fft_table): Remove definition, it's in mul_fft.c.
3812 2003-02-12 Torbjorn Granlund <tege@swox.com>
3814 * mpn/x86/pentium4/sse2/gmp-mparam.h: Retune.
3815 * mpn/x86/k7/gmp-mparam.h: Retune.
3816 * mpn/x86/k6/gmp-mparam.h: Retune.
3817 * mpn/x86/p6/gmp-mparam.h: Retune.
3818 * mpn/x86/p6/mmx/gmp-mparam.h: Retune.
3820 * tests/mpz/t-mul.c (main): Rewrite FFT testing code.
3822 2003-02-10 Torbjorn Granlund <tege@swox.com>
3824 * config.guess: Recognize "power2" systems.
3826 * mpn/powerpc64/gmp-mparam.h: Fix indentation.
3827 * mpn/power/gmp-mparam.h: Retune.
3828 * mpn/alpha/ev6/nails/gmp-mparam.h: Retune.
3829 * mpn/sparc64/gmp-mparam.h: Retune.
3830 * mpn/pa64/gmp-mparam.h: Retune.
3831 * mpn/sparc32/v8/supersparc/gmp-mparam.h: Retune.
3832 * mpn/sparc32/v8/gmp-mparam.h: Retune.
3833 * mpn/mips64/gmp-mparam.h: Retune.
3834 * mpn/alpha/ev6/gmp-mparam.h: Retune.
3835 * mpn/powerpc32/gmp-mparam.h: Retune.
3836 * mpn/powerpc32/750/gmp-mparam.h: Retune.
3837 * mpn/alpha/ev5/gmp-mparam.h: Retune.
3838 * mpn/m68k/gmp-mparam.h: Retune.
3839 * mpn/cray/gmp-mparam.h: Set GET_STR_PRECOMPUTE_THRESHOLD.
3841 * configure.in: Undo this, problem doesn't happen any more:
3842 (mips64*-*-*): Pass just -O1 to cc, to work around compiler bug.
3844 2003-02-03 Kevin Ryde <kevin@swox.se>
3846 * gmp-impl.h (MPN_NORMALIZE, MPN_NORMALIZE_NOT_ZERO): Add parens
3847 around macro parameters. Reported by Jason Moxham.
3849 2003-02-01 Kevin Ryde <kevin@swox.se>
3851 * gmp.texi (Low-level Functions): No overlap permitted by mpn_mul_n.
3852 Reported by Jason Moxham.
3853 (Formatted Input Strings): Correction to strtoul cross reference
3855 (BSD Compatible Functions): Add index entry for MINT.
3857 2003-01-29 Torbjorn Granlund <tege@swox.com>
3859 * gmp-impl.h (mpn_mul_fft): Now returns int.
3861 2003-01-29 Paul Zimmermann <Paul.Zimmermann@loria.fr>
3863 * mpn/generic/mul_fft.c: Major rewrite.
3865 2003-01-25 Kevin Ryde <kevin@swox.se>
3867 * config.guess (powerpc*-*-*): Remove $dummy.core file when mfpvr
3869 (trap): Remove $dummy.core on abnormal termination too.
3871 * mpfr/*: Update to mpfr cvs 2003-01-25.
3873 2003-01-18 Kevin Ryde <kevin@swox.se>
3875 * mpfr/*: Update to mpfr cvs 2003-01-18.
3877 2003-01-17 Torbjorn Granlund <tege@swox.com>
3879 * gmp.texi: Canonicalize URLs.
3881 2003-01-15 Kevin Ryde <kevin@swox.se>
3883 * gmp.texi (Notes for Particular Systems): Add hardware floating point
3886 * mpfr/*, configure, aclocal.m4, config.in: Update to mpfr cvs
3889 2003-01-11 Kevin Ryde <kevin@swox.se>
3891 * mpfr/*: Update to mpfr cvs 2003-01-11.
3893 2003-01-09 Kevin Ryde <kevin@swox.se>
3895 * mpfr/get_str.c: Update to mpfr cvs 2003-01-09.
3897 * doc/configuration: Various updates.
3899 2003-01-06 Torbjorn Granlund <tege@swox.com>
3901 * mpn/alpha/copyi.asm: Avoid `nop' mnemonic, unsupported on Cray.
3902 * mpn/alpha/copyd.asm: Likewise.
3904 2003-01-05 Kevin Ryde <kevin@swox.se>
3906 * demos/expr/t-expr.c (check_r): Tolerate mpfr_set_str new return
3909 * configure, aclocal.m4 (*-*-osf4*, *-*-osf5*): Regenerate with
3910 libtool patch to avoid bash printf option problem when building shared
3913 * configure.in (pentium4-*-*): Use "-march=pentium4 -mno-sse2" since
3914 sse2 causes buggy code from gcc 3.2.1 and is only supported on new
3917 * acinclude.m4 (GMP_PROG_NM): Add some notes about failures, per
3918 report by Krzysztof Kozminski.
3920 * gmp-h.in (mpz_mdivmod_ui, mpz_mmod_ui): Add parens around "r".
3922 * gmp-h.in (__GMP_CAST): New macro, clean to g++ -Wold-style-cast.
3923 (GMP_NUMB_MASK, mpz_cmp_si, mpq_cmp_si, mpz_odd_p, mpn_divexact_by3,
3924 mpn_divmod): Use it. Reported by Krzysztof Kozminski.
3925 (mpz_odd_p): No need for the outermost cast to "int".
3926 * tests/cxx/t-cast.cc: New file.
3927 * tests/cxx/Makefile.am: Add it.
3929 2003-01-04 Kevin Ryde <kevin@swox.se>
3931 * mpfr/set_str.c: Update to mpfr cvs 2003-01-04.
3933 * demos/expr/exprfra.c (e_mpfr_number): Tolerate recent mpfr_set_str
3934 returning count of characters accepted.
3936 2003-01-03 Torbjorn Granlund <tege@swox.com>
3938 * mpn/alpha/copyi.asm: New file.
3939 * mpn/alpha/copyd.asm: New file.
3941 2003-01-03 Kevin Ryde <kevin@swox.se>
3943 * demos/expr/t-expr.c: Use __gmpfr on some mpfr internals that have
3946 * mpfr/*, aclocal.m4, config.in, configure: Update to mpfr cvs
3949 * gmp.texi (Introduction to GMP): Mention release announcements
3950 mailing list, and put home page and ftp before mailing lists.
3952 2002-12-28 Torbjorn Granlund <tege@swox.com>
3954 * mpn/generic/mul_fft.c (mpn_fft_next_size): Simplify.
3956 2002-12-28 Kevin Ryde <kevin@swox.se>
3958 * acinclude.m4 (M68K_PATTERN): New macro.
3959 (GMP_GCC_M68K_OPTIMIZE): Use it to avoid m6811 and friends.
3960 * configure.in: Ditto.
3962 * tests/mpz/t-import.c, tests/mpz/t-export.c: Use '\xHH' to avoid
3963 warnings about char overflows.
3964 * acinclude.m4 (GMP_C_DOUBLE_FORMAT): Ditto.
3966 2002-12-28 Pedro Gimeno <pggimeno@wanadoo.es>
3968 * randmt.c (randseed_mt, default_state): Fix off-by-one bug on padding.
3969 (randseed_mt): Add ASSERT checking result of mpz_export.
3971 2002-12-24 Kevin Ryde <kevin@swox.se>
3973 * gmp.texi (Integer Import and Export): Clarify treatment of signs,
3974 reported by Kent Boortz.
3976 * randmt.c: Use gmp_uint_least32_t.
3977 (randseed_mt): Add nails to mpz_export in case mt[i] more than 32 bits.
3979 * gmp-impl.h (gmp_uint_least32_t): New typedef, replacing GMP_UINT32.
3980 * configure.in (AC_CHECK_TYPES): Add uint_least32_t.
3981 (AC_CHECK_SIZEOF): Add unsigned short.
3983 2002-12-22 Kevin Ryde <kevin@swox.se>
3985 * gmp-impl.h (ULONG_PARITY) [generic C]: Mask result to a single bit.
3986 (ULONG_PARITY) [_CRAY, __ia64]: New macros.
3987 * tests/t-parity.c: New test.
3988 * tests/Makefile.am (check_PROGRAMS): Add it.
3990 * longlong.h (count_trailing_zeros) [ia64]: New macro.
3992 * tests/t-count_zeros.c (check_various): Remove unused variable "n".
3994 * mpn/x86/README: Revise notes on PIC, PLT and GOT.
3996 * demos/perl/GMP.xs, demos/perl/GMP.pm, demos/perl/test.pl: Add "mt"
3997 to GMP::Rand::randstate.
3999 2002-12-22 Pedro Gimeno <pggimeno@wanadoo.es>
4001 * randmt.c (randseed_mt): Fix bug that might cause the generator to
4002 return all zeros with certain seeds. Fix WARM_UP==0 case.
4003 (gmp_randinit_mt): Initialize to a known state by default.
4004 (randget_mt): Remove check for uninitialized buffer: no longer needed.
4005 (recalc_buffer): Use ?: instead of two-element array.
4007 * tests/rand/t-mt.c: New test.
4008 * tests/rand/Makefile.am (check_PROGRAMS): Add it.
4010 2002-12-21 Kevin Ryde <kevin@swox.se>
4012 * cxx/osdoprnti.cc: Use <cstdarg> and <cstring> rather than <stdarg.h>
4013 and <string.h>. No need for <stdio.h>.
4015 * demos/expr/expr.c, demos/expr/exprfa.c, demos/expr/exprfra.c,
4016 demos/expr/exprza.c: Use mp_get_memory_functions, not
4017 __gmp_allocate_func etc.
4018 * demos/expr/t-expr.c: Don't use gmp-impl.h.
4019 (numberof): New macro.
4021 * gmp-h.in, gmp-impl.h (__gmp_allocate_func, __gmp_reallocate_func,
4022 __gmp_free_func): Move declarations to gmp-impl.h
4024 * mp_get_fns.c: New file.
4025 * Makefile.am (libgmp_la_SOURCES, libmp_la_SOURCES): Add it.
4026 * gmp-h.in (mp_get_memory_functions): Add prototype.
4027 * gmp.texi (Custom Allocation): Add mp_get_memory_functions, refer to
4028 "free" not "deallocate" function.
4029 * gmpxx.h (struct __gmp_alloc_cstring): Use mp_get_memory_functions,
4030 not __gmp_free_func.
4032 * gmp-impl.h [__cplusplus]: Add <cstring> for strlen.
4033 (gmp_allocated_string): Hold length in a field.
4034 * cxx/osdoprnti.cc, cxx/osmpf.cc: Use this.
4036 2002-12-20 Torbjorn Granlund <tege@swox.com>
4038 * tests/mpz/t-perfsqr.c (check_sqrt): Print more variables upon
4041 * mpn/generic/rootrem.c: In Newton loop, pad qp with leading zero.
4043 2002-12-19 Torbjorn Granlund <tege@swox.com>
4045 * mpn/generic/rootrem.c: Allocate 1.585 (log2(3)) times more space
4046 for pp temporary to allow for worst case overestimate of root.
4049 * tests/mpz/t-root.c: Generalize and speed up.
4051 2002-12-19 Kevin Ryde <kevin@swox.se>
4053 * tests/cxx/t-rand.cc (check_randinit): Add gmp_randinit_mt test.
4055 * gmp-h.in: Don't bother trying to support Compaq C++ in pre-standard
4057 * gmp.texi (Notes for Particular Systems): Compaq C++ must be used in
4058 "standard" iostream mode.
4060 2002-12-18 Torbjorn Granlund <tege@swox.com>
4062 * mpn/alpha/mod_34lsub1.asm: Add code for big-endian, using existing
4063 little-endian code only if HAVE_LIMB_LITTLE_ENDIAN is defined.
4065 2002-12-18 Kevin Ryde <kevin@swox.se>
4067 * configure.in (HAVE_LIMB_BIG_ENDIAN, HAVE_LIMB_LITTLE_ENDIAN): New
4068 defines in config.m4.
4070 2002-12-17 Torbjorn Granlund <tege@swox.com>
4072 * printf/printffuns.c (gmp_fprintf_reps): Make it actually work
4075 2002-12-17 Kevin Ryde <kevin@swox.se>
4077 * tune/freq.c: Add <string.h> for memcmp.
4079 * mpz/pprime_p.c: Use MPN_MOD_OR_MODEXACT_1_ODD.
4081 * gmp.texi (Formatted Output Strings): %a and %A are C99 not glibc.
4082 (Formatted Input Strings): Type "l" is for double too. Hex floats are
4084 (Formatted Input Functions): Describe tightened parse rule, clarify
4087 * scanf/doscan.c: Add hex floats, tighten matching to follow C99, for
4088 instance "0x" is no longer acceptable to "%Zi".
4089 Rename "invalid" label to avoid "invalid" variable, SunOS cc doesn't
4091 * tests/misc/t-scanf.c: Update tests.
4092 * tests/misc/t-locale.c (check_input): Don't let "0x" appear from fake
4095 * config.guess (sparc*-*-*): Look at BSD sysctl hw.model to recognise
4098 * mpfr/tests/dummy.c: New file.
4099 * mpfr/tests/Makefile.am (libfrtests_a_SOURCES): Add it.
4101 2002-12-14 Kevin Ryde <kevin@swox.se>
4103 * mpbsd/Makefile.am (nodist_libmpbsd_la_SOURCES): Move these mpz
4104 sources to libmpbsd_la_SOURCES directly, automake 1.7.2 now gets the
4105 ansi2knr setups right for sources in other directories.
4107 * mpfr/tests/Makefile.am: Add libfrtests.a in preparation for new mpfr.
4109 2002-12-13 Kevin Ryde <kevin@swox.se>
4111 * mpfr/Makefile.am (mpfr_TEXINFOS, AM_MAKEINFOFLAGS): Allow for
4112 fdl.texi in recent mpfr.
4114 * configure.in (AC_PROG_EGREP): Ensure this is run outside the Cray
4115 conditional AC_EGREP_CPP.
4117 * configure.in (alpha*-*-*): Use gcc -Wa,-oldas if it works, to avoid
4118 problems with new compaq "as" on OSF 5.1.
4120 * mpn/Makefile.am (EXTRA_DIST): Remove Makeasm.am, automake 1.7.2 does
4123 * acinclude.m4 (AC_LANG_FUNC_LINK_TRY(C)): Remove this hack, fixed by
4126 * configure.in (AC_CONFIG_LIBOBJ_DIR): Set to mpfr, for the benefit of
4127 new mpfr using LIBOBJ.
4129 * configure.in: (AM_INIT_AUTOMAKE): Use "gnu no-dependencies
4130 $(top_builddir)/ansi2knr".
4131 * */Makefile.am (AUTOMAKE_OPTIONS): Remove, now in configure.in.
4133 * configure, config.in, INSTALL.autoconf: Update to autoconf 2.57.
4134 * */Makefile.in, configure, aclocal.m4, install-sh, mkinstalldirs:
4135 Update to automake 1.7.2.
4137 * gmp.texi (Build Options): Add hppa64 to cpu types.
4138 (ABI and ISA): Add gcc to hppa 2.0.
4139 (Debugging): Add maximum debuggability config options.
4140 (Language Bindings): Add Arithmos, reported by Johan Vervloet.
4141 (Formatted Output Strings): 128 bits is about 40 digits, ll is only
4142 for long long not long double.
4143 (Formatted Input Strings): ll is only for long long not long double.
4145 * mpz/divis.c, mpz/divis_ui.c, mpz/cong.c, mpz/cong_ui.c: Allow d=0,
4146 under the rule n==c mod d iff exists q satisfying n=c+q*d.
4147 * gmp.texi (Integer Division): Describe this.
4148 Suggested by Jason Moxham.
4150 2002-12-13 Pedro Gimeno <pggimeno@wanadoo.es>
4152 * randlc2x.c (lc): Remove check for seedn < an, which is now
4153 superfluous. Add ASSERT to ensure it's correct. Add ASSERT to check
4154 precondition of __GMPN_ADD.
4155 (gmp_randinit_lc_2exp): Avoid reallocation by allocating one extra bit
4156 for both seed and a. Simplify seedn < p->_cn case.
4158 * tests/rand/t-lc2exp.c (check_bigs): Test negative seeds.
4160 2002-12-12 Torbjorn Granlund <tege@swox.com>
4162 * mpn/pa32/pa-defs.m4 (PROLOGUE_cpu): Zap spurious argument to `.proc'.
4163 Add empty `.callinfo'.
4165 2002-12-11 Torbjorn Granlund <tege@swox.com>
4167 * mpn/x86/pentium4/sse2/addmul_1.asm: Don't reuse `ret' symbol for a
4170 2002-12-11 Kevin Ryde <kevin@swox.se>
4172 * configure.in (hppa*-*-*): Don't use gcc -mpa-risc-2-0 in ABI=1.0.
4174 * mpn/pa32/pa-defs.m4: New file, arranging for .proc/.procend.
4175 * configure.in (hppa*-*-*): Use it.
4177 * printf/doprnt.c: Comments on "ll" versus "L".
4179 * tests/mpz/t-div_2exp.c: Reduce tests, especially the random ones.
4181 2002-12-11 Torbjorn Granlund <tege@swox.com>
4183 * mpz/get_d.c (limb2dbl): New macro for conversion to `double'.
4184 Define it to something non-trivial for 64-bit hppa.
4185 * mpq/get_d.c: Likewise.
4186 * mpf/get_d.c: Likewise.
4188 * mpn/x86/pentium4/sse2/addmul_1.asm: Unroll to save one c/l.
4190 2002-12-09 Kevin Ryde <kevin@swox.se>
4192 * tune/Makefile.am: Don't use -static under --disable-static, it tends
4194 * configure.in (ENABLE_STATIC): New AM_CONDITIONAL.
4196 * gmp-h.in: Use <iostream> instead of <iosfwd> with Compaq C++ in
4197 pre-standard I/O mode.
4199 * tests/mpz/t-jac.c, tests/mpz/t-scan.c: Reduce tests.
4201 2002-12-08 Kevin Ryde <kevin@swox.se>
4203 * configure.in (*-*-ultrix*): Remove forcible --disable-shared,
4204 believe this was a generic problem with libtool, now gone.
4206 2002-12-08 Torbjorn Granlund <tege@swox.com>
4208 * gmp-impl.h (USE_LEADING_REGPARM): Disable for PIC code generation.
4210 2002-12-07 Torbjorn Granlund <tege@swox.com>
4212 * tests/cxx/t-misc.cc (check_mpq): Use 0/1 for canonical 0 in
4215 * configure.in (hppa2.0*-*-*): Pass +O2 instead of +O3 to work around
4216 compiler bug with mpfr/tests/tdiv.
4218 2002-12-07 Kevin Ryde <kevin@swox.se>
4220 * configure.in (hppa2.0*-*-* ABI=2.0n): Make -mpa-risc-2-0 optional.
4221 New hppa-level-2.0 test using GMP_HPPA_LEVEL_20 to detect assembler
4223 * acinclude.m4 (GMP_PROG_CC_WORKS): Add code that provokes an error
4224 from gcc -mpa-risc-2-0 if the assembler doesn't know 2.0 instructions.
4225 (GMP_HPPA_LEVEL_20): New macro.
4227 2002-12-07 Pedro Gimeno <pggimeno@wanadoo.es>
4229 * gmp-impl.h (gmp_randfnptr_t.randseed_fn) Return void.
4230 (LIMBS_PER_ULONG, MPN_SET_UI): New macros.
4231 (MPZ_FAKE_UI): Rename couple of parameters.
4233 * randlc2x.c (gmp_rand_lc_struct): _mp_c and _mp_c_limbs replaced
4234 with mpn style _cp and _cn. All callers changed.
4235 (randseed_lc): Fix limbs(seed) > bits_to_limbs(m2exp) case.
4236 Remove return value.
4237 (gmp_randinit_lc_2exp): Attempt to avoid redundant reallocation.
4239 * randmt.c (mangle_seed): New function by Kevin.
4240 (randseed_mt): Use it instead of mpz_powm, for performance. Remove
4241 return value. Remove commented out code (an inferior alternative to
4244 * randsdui.c (gmp_randseed_ui): Use MPZ_FAKE_UI.
4246 * tests/rand/t-lc2exp.c (check_bigm, check_bigs): New tests.
4247 * tests/rand/t-urndmm.c: Add L to constants in calls, for K&R.
4249 2002-12-06 Torbjorn Granlund <tege@swox.com>
4251 * configure.in: Remove -g.
4252 (hppa*-*-*): Pass -Wl,+vnocompatwarnings with +DA2.0.
4254 2002-12-05 Torbjorn Granlund <tege@swox.com>
4256 * mpn/pa64/sqr_diagonal.asm: Remove .entry, .proc, .procend.
4257 * mpn/pa64/udiv.asm: Likewise.
4259 2002-12-05 Kevin Ryde <kevin@swox.se>
4261 * mpn/pa64/sub_n.asm: Remove space in "sub, db" which gas objects to.
4262 * mpn/pa64/*.asm, tune/hppa2.asm: Use ".level 2.0" for 2.0n, since gas
4263 doesn't like ".level 2.0N".
4265 * configure.in (hppa*-*-*): Group path and flags choices, for clarity.
4266 (hppa1.0*-*-*): Use gcc -mpa-risc-1-0 when available.
4267 (hppa2.0*-*-*): Ditto -mpa-risc-2-0.
4268 (*-*-hpux*): Exclude ABI=2.0w for hpux[1-9] and hpux10, rather than
4269 the converse of allowing it for hpux1[1-9]; ie. list the bad systems
4270 rather than try to guess the good systems.
4271 (hppa2.0*-*-*) [ABI=2.0n ABI=2.0w]: Add gcc to likely compilers.
4272 (hppa*-*-*) [gcc]: Test sizeof(long) to differentiate a 32-bit or
4273 64-bit build of the compiler.
4274 (hppa64-*-*): Add this as equivalent to hppa2.0-*-*.
4275 * acinclude.m4 (GMP_C_TEST_SIZEOF): New macro.
4277 * tests/tests.h (ostringstream::str): Must null-terminate
4278 ostrstream::str() for the string constructor.
4280 2002-12-04 Torbjorn Granlund <tege@swox.com>
4282 * mpn/pa32/hppa1_1/udiv.asm: Don't wrap symbol to INT64 in L() stuff.
4284 * longlong.h (mpn_udiv_qrnnd_r based udiv_qrnnd): Fix typo.
4286 * mpn/powerpc32/powerpc-defs.m4: Define float registers with `f'
4289 2002-12-04 Kevin Ryde <kevin@swox.se>
4291 * gmp.texi (Floating-point Functions): Note the mantissa is binary and
4292 decimal fractions cannot be represented exactly. Suggested by Serge
4294 (Known Build Problems): Note libtool stripping options when linking.
4295 Reported by Vincent Lefevre.
4297 * acinclude.m4 (GMP_ASM_LABEL_SUFFIX): Don't make an empty result a
4298 failure, that's a valid result.
4299 (GMP_ASM_GLOBL): Establish this from the host cpu type.
4300 (IA64_PATTERN): New macro.
4301 (GMP_PROG_EXEEXT_FOR_BUILD, GMP_C_FOR_BUILD_ANSI,
4302 GMP_CHECK_LIBM_FOR_BUILD): Remove temporary files created.
4303 * configure.in: Use IA64_PATTERN.
4305 2002-12-03 Torbjorn Granlund <tege@swox.com>
4307 * tune/hppa.asm: Use config.m4.
4308 * tune/hppa2.asm: Likewise.
4309 * tune/hppa2w.asm: Likewise.
4311 * mpn/pa64: Use LDEF.
4313 2002-12-03 Kevin Ryde <kevin@swox.se>
4315 * INSTALL: Use return rather than exit in the example programs.
4316 Suggested by Richard Dawe.
4318 * gmp.texi (Build Options): Move non-unix notes to ...
4319 (Notes for Particular Systems): ... here. Mention MS Interix,
4320 reported by Paul Leyland.
4321 (C++ Interface Random Numbers): Add gmp_randinit_mt to examples.
4323 * acinclude.m4 (GMP_ASM_LABEL_SUFFIX): Must test empty suffix first,
4324 for the benefit of hppa hp-ux.
4325 (GMP_ASM_UNDERSCORE): Grep the output of "nm" instead of trying to
4326 construct an asm file, and in case of failure fallback on no
4327 underscore and a warning.
4329 * longlong.h (count_leading_zeros, count_trailing_zeros) [ev67, ev68]:
4330 Restrict __asm__ ctlz and cttz to __GNUC__.
4332 * gen-psqr.c (HAVE_CONST, const): New macros.
4334 * tests/cxx/t-rand.cc (check_randinit): Add gmp_randinit_mt.
4336 2002-12-02 Torbjorn Granlund <tege@swox.com>
4338 * gmp-impl.h: Split popc_limb again, combined version gives too many
4341 2002-12-01 Torbjorn Granlund <tege@swox.com>
4343 * mpn/generic/gcdext.c (div1): Disable unused function.
4345 * mpz/root.c: Don't include stdlib.h or longlong.h.
4346 * mpz/rootrem.c: Likewise.
4348 * extract-dbl.c: abort => ASSERT_ALWAYS.
4349 * mpz/set_d.c: Likewise.
4350 * mpn/generic/tdiv_qr.c: Likewise.
4352 * gen-psqr.c (f_cmp_fraction, f_cmp_divisor): Change parameter to
4353 `const void *', to match qsort spec.
4355 2002-12-01 Kevin Ryde <kevin@swox.se>
4357 * gmp.texi (Integer Division): Fix a couple of @math's for tex.
4358 Use @dots in more places.
4360 * tests/cxx/t-locale.cc: Test non std::locale systems too.
4361 * tests/cxx/clocale.c: New file, reinstating what was localeconv.c,
4362 and subverting nl_langinfo too.
4363 * tests/cxx/Makefile.am (t_locale_SOURCES): Add it.
4365 * tests/tests.h (ostringstream, istringstream): Provide fakes of these
4366 if <sstream> not available.
4367 * tests/cxx/t-locale.cc, tests/cxx/t-ostream.cc: Remove <sstream>.
4368 * configure.in (AC_CHECK_HEADERS) [C++]: Add <sstream>.
4370 2002-11-30 Torbjorn Granlund <tege@swox.com>
4372 * printf/doprnt.c (__gmp_doprnt): Comment out a `break' to shut up
4375 * longlong.h (umul_ppmm) [ia64]: Form both product parts in asm.
4377 * mpz/bin_uiui.c: Cast umul_ppmm operands.
4379 * scanf/doscan.c (gmpscan): Remove unused label store_get_digits.
4381 * gmp-impl.h: #undef MIN and MAX before #defining.
4383 2002-11-30 Kevin Ryde <kevin@swox.se>
4385 * configure.in (AC_CHECK_HEADERS): Add nl_types.h.
4386 * tests/misc/t-locale.c: Use this, for nl_item on netbsd 1.4.1.
4388 2002-11-29 Torbjorn Granlund <tege@swox.com>
4390 * tests/devel/addmul_1.c: Provide prototype for mpn_print.
4391 (OPS): Account for function overhead.
4392 * tests/devel/{submul_1.c,mul_1.c,add_n.c,sub_n.c}: Likewise.
4394 2002-11-28 Kevin Ryde <kevin@swox.se>
4396 * mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Use this rather
4398 * tests/Makefile.am (EXTRA_libtests_la_SOURCES): Use this for
4399 x86call.asm and x86check.c rather than libdummy.
4401 2002-11-27 Torbjorn Granlund <tege@swox.com>
4403 * tests/mpz/t-mul.c: Implement reference Karatsuba multiplication.
4404 Rewrite testing scheme to run fewer really huge tests.
4406 2002-11-26 Torbjorn Granlund <tege@swox.com>
4408 * tests: Decrease repetition count for some of the slowest tests.
4410 2002-11-25 Torbjorn Granlund <tege@swox.com>
4412 * mpfr/tests/tdiv.c: Decrease number of performed tests.
4414 2002-11-23 Kevin Ryde <kevin@swox.se>
4416 * mpn/ia64/README: Add some references.
4418 * gmp.texi (Build Options): Add itanium and itanium2, mention DocBook
4419 and XML from makeinfo, add texinfo top level cross reference.
4420 (Integer Division): Try to clarify 2exp functions a bit.
4421 (C++ Interface Floats): Giving bad string to constructor is undefined.
4422 (C++ Interface Integers, C++ Interface Rationals): Ditto, and show
4423 default base in prototype, not the description.
4425 * config.sub, config.guess, configure.in (itanium, itanium2): New cpu
4428 * tests/misc/t-printf.c, tests/misc/t-scanf.c (check_misc): Suppress
4429 %zd test on glibc prior to 2.1, it's not supported.
4431 2002-11-20 Kevin Ryde <kevin@swox.se>
4433 * tests/cxx/t-locale.cc: Test with locales imbued into stream, use
4434 <sstream>, eliminated some C-isms. istream tests disabled, not yet
4436 * tests/cxx/Makefile.am (t_locale_SOURCES): Remove localeconv.c.
4437 * tests/cxx/localeconv.c: Remove file.
4439 * configure.in (AC_CHECK_TYPES) [C++]: Add std::locale.
4440 * printf/doprntf.c: Add decimal point parameter, remove localeconv use.
4441 * gmp-impl.h (__gmp_doprnt_mpf): Update prototype, bump symbol to
4442 __gmp_doprnt_mpf2 to protect old libgmpxx.
4443 * cxx/osmpf.cc: Use this with ostream locale decimal_point facet.
4444 * printf/doprnt.c: Ditto, with GMP_DECIMAL_POINT.
4446 * gmp-h.in: More comments on __declspec for windows DLLs.
4448 * mpf/set_str.c, scanf/doscan.c: Cast through "unsigned char" for
4449 decimal point string, same as input chars.
4451 * configure.in (AC_CHECK_HEADERS): Add langinfo.h.
4452 (AC_CHECK_FUNCS): Add nl_langinfo.
4453 * gmp-impl.h (GMP_DECIMAL_POINT): New macro.
4454 * mpf/out_str.c, mpf/set_str.c, scanf/doscan.c: Use it, and don't
4455 bother with special code for non-locale systems.
4456 * tests/misc/t-locale.c: Subvert nl_langinfo too.
4458 * configure.in, acinclude.m4 (GMP_ASM_X86_GOT_UNDERSCORE): New macro.
4459 * mpn/x86/x86-defs.m4 (_GLOBAL_OFFSET_TABLE_): New macro, inserting
4460 extra underscore for OpenBSD.
4461 * mpn/x86/README (_GLOBAL_OFFSET_TABLE_): Update notes.
4462 Reported by Christian Weisgerber.
4464 * tests/cxx/t-rand.cc (check_randinit): New function, collecting up
4467 * tests/cxx/t-ostream.cc: Use <sstream> instead of <strstream>, use
4468 compare instead of strcmp.
4470 * gmpxx.h (__gmp_randinit_lc_2exp_size_t): Return type is int.
4472 2002-11-18 Kevin Ryde <kevin@swox.se>
4474 * tune/speed.c (r_string): Use CNST_LIMB with <N>bits, spotted by
4477 2002-11-17 Torbjorn Granlund <tege@swox.com>
4479 * mpn/generic/popham.c: New file, using new faster algorithm.
4480 * mpn/generic/popcount.c: Remove.
4481 * mpn/generic/hamdist.c: Remove.
4483 * mpn/ia64/addmul_1.asm: Don't clobber callee-saves register f16.
4484 * mpn/ia64/mul_1.asm: Likewise.
4486 * mpn/ia64/addmul_1.asm: Add pred.rel declarations. Resolve RAW
4487 hazards for condition code registers, duplicating code as needed. Add
4488 prediction to all branches.
4489 * mpn/ia64/mul_1.asm: Likewise.
4490 * mpn/ia64/add_n.asm: Likewise.
4491 * mpn/ia64/sub_n.asm: Likewise.
4492 * mpn/ia64/copyi.asm: Likewise.
4493 * mpn/ia64/copyd.asm: Likewise.
4495 * mpn/generic/random2.c: Add a cast to silence some compilers.
4497 2002-11-16 Torbjorn Granlund <tege@swox.com>
4499 * mpz/powm.c: Cap allocation by limiting k to 10 (512 precomputed
4502 2002-11-16 Kevin Ryde <kevin@swox.se>
4504 * configure.in, gmp.texi: Remove powerpc64 ABI=32L, doesn't work and
4505 is unlikely to ever do so.
4506 * configure.in: Allow ABI=32 for powerpc64.
4507 Reported by David Edelsohn.
4509 2002-11-14 Kevin Ryde <kevin@swox.se>
4511 * mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add addmul_2.c
4512 addmul_3.c addmul_4.c addmul_5.c addmul_6.c addmul_7.c addmul_8.c.
4514 * gmp-h.in (__GMP_DECLSPEC_EXPORT, __GMP_DECLSPEC_IMPORT) [__GNUC__]:
4515 Use __dllexport__ and __dllimport__ to keep out of application
4518 2002-11-14 Gerardo Ballabio <gerardo.ballabio@unimib.it>
4520 * gmpxx.h (__gmp_randinit_default_t, __gmp_randinit_lc_2exp_t,
4521 __gmp_randinit_lc_2exp_size_t): Use extern "C" { typedef ... }, for
4522 the benefit of g++ prior to 3.2.
4524 2002-11-12 Kevin Ryde <kevin@swox.se>
4526 * gmpxx.h (gmp_randclass constructors): Patch from Roberto Bagnara to
4527 use extern "C" on C function pointer arguments.
4529 2002-11-09 Kevin Ryde <kevin@swox.se>
4531 * configure.in, Makefile.am, printf/Makefile.am,
4532 printf/repl-vsnprintf.c: Handle vsnprintf replacement with C
4535 * acinclude.m4 (AC_LANG_FUNC_LINK_TRY(C)): Workaround troubles recent
4536 HP cc +O3 causes for AC_CHECK_FUNCS.
4538 * gmp.texi (Notes for Particular Systems): Add Sparc app regs.
4539 (Debugging): Note gcc -fstack options to detect overflow.
4540 (Formatted Output Strings, Formatted Input Strings): Format strings
4543 2002-11-06 Torbjorn Granlund <tege@swox.com>
4545 * mpn/generic/tdiv_qr.c: Remove a bogus assert.
4547 2002-11-05 Torbjorn Granlund <tege@swox.com>
4549 * mpn/generic/tdiv_qr.c: Remove two dead mpn_divrem_2 calls.
4551 2002-11-04 Kevin Ryde <kevin@swox.se>
4553 * acinclude.m4 (GMP_C_INLINE): Don't define "inline" for C++.
4555 * demos/expr/expr-impl.h (stdarg.h): Test __DECC same as gmp.h.
4557 * mpbsd/mtox.c, printf/obprintf.c, printf/obvprintf.c,
4558 scanf/vsscanf.c, demos/expr/expr.c, demos/expr/exprf.c,
4559 demos/expr/exprfa.c, demos/expr/exprfr.c, demos/expr/exprq.c,
4560 demos/expr/exprz.c, demos/expr/exprza.c: Add <string.h> for strlen and
4563 2002-11-02 Kevin Ryde <kevin@swox.se>
4565 * longlong.h: Test __x86_64__ not __x86_64. Reported by Andreas
4568 * mpz/import.c, mpz/export.c: Use char* subtract from NULL to get
4569 pointer alignment, for the benefit of Cray vector systems.
4571 * cxx/ismpf.cc: Use <clocale>.
4572 * tests/cxx/t-locale.cc: No need to conditionalize <clocale>.
4574 * scanf/doscan.c: Don't use isascii, rely on C99 ctype.h.
4576 * gmp.texi (Build Options): Describe CC_FOR_BUILD, cross reference
4578 (ABI and ISA): Add powerpc620 and powerpc630 to powerpc64, add NetBSD
4579 and OpenBSD sparc64.
4580 (Notes for Package Builds): Cross reference libtool manual.
4581 (Notes for Particular Systems): Add OpenBSD to non-MMX versions of gas.
4582 (Known Build Problems): Add MacOS X C++ shared libraries.
4584 2002-10-31 Kevin Ryde <kevin@swox.se>
4586 * gmp-impl.h, tune/speed.c, tune/speed.h, tune/common.c, tune/many.pl,
4587 tests/devel/try.c, tests/tests.h, tests/refmpn.c (mpn_addmul_5,
4588 mpn_addmul_6, mpn_addmul_7, mpn_addmul_8): Add testing and measuring.
4589 * configure.in (config.in): Add #undefs of HAVE_NATIVE_mpn_addmul_5,
4590 HAVE_NATIVE_mpn_addmul_6, HAVE_NATIVE_mpn_addmul_7,
4591 HAVE_NATIVE_mpn_addmul_8.
4592 (gmp_mpn_functions_optional): Add addmul_5 addmul_6 addmul_7 addmul_8.
4594 * tests/devel/try.c (ASSERT_CARRY): Remove, now in gmp-impl.h
4595 (try_one): Do dest setups after sources, for benefit of
4598 2002-11-01 Torbjorn Granlund <tege@swox.com>
4600 * mpn/generic/tdiv_qr.c: Avoid quadratic behaviour for
4601 sub-division when numerator is more than twice the size of the
4602 denominator. Simplify loop logic for the same case. Clean up a
4605 2002-10-29 Torbjorn Granlund <tege@swox.com>
4607 * configure.in (*-cray-unicos*): Pass -hnofastmd again.
4609 2002-10-25 Torbjorn Granlund <tege@swox.com>
4611 * tests/tadd.c: Disable test of denorms.
4613 2002-10-23 Linus Nordberg <linus@swox.se>
4615 * gmp.texi (Introduction to GMP): Update section about mailing
4618 2002-10-23 Kevin Ryde <kevin@swox.se>
4620 * gmp-h.in (__GMP_ATTRIBUTE_PURE): Suppress this when
4621 __GMP_NO_ATTRIBUTE_CONST_PURE is defined.
4622 * gmp-impl.h (ATTRIBUTE_CONST): Ditto.
4623 * tune/common.c: Use __GMP_NO_ATTRIBUTE_CONST_PURE.
4625 * tune/speed.h, tune/many.pl: Remove ATTRIBUTEs from prototypes.
4626 * tune/speed.h: Remove various "dummy" variables attempting to keep
4627 "pure" calls live, no longer necessary. They weren't sufficient for
4628 recent MacOS cc anyway.
4630 2002-10-21 Torbjorn Granlund <tege@swox.com>
4632 * mpn/cray/ieee/addmul_1.c: Handle overlap as in mul_1.c.
4633 * mpn/cray/ieee/submul_1.c: Likewise.
4635 2002-10-19 Kevin Ryde <kevin@swox.se>
4637 * configure.in (sparcv9 etc -*-*bsd*): Add support for NetBSD and
4638 OpenBSD sparc64. Reported by Christian Weisgerber.
4639 (AC_CHECK_HEADERS): Add sys/param.h for sys/sysctl.h on *BSD.
4641 * demos/calc/calc.y: Change ={ to {, needed for bison 1.50.
4643 * longlong.h (count_leading_zeros, count_trailing_zeros) [x86_64]:
4646 * mpz/set_str.c, mpf/set_str.c, mpbsd/xtom.c, scanf/sscanffuns.c: Cast
4647 chars through "unsigned char" to zero extend, required by C99 ctype.h.
4649 2002-10-18 Torbjorn Granlund <tege@swox.com>
4651 * tests/mpz/t-root.c: Test also mpz_rootrem.
4653 * mpn/generic/rootrem.c: Avoid overflow problem when n is huge.
4655 * mpz/root.c: Avoid overflow problems in allocation computation; also
4656 simplify it. Misc cleanups.
4658 * mpz/rootrem.c: New file.
4659 * Makefile.am, mpz/Makefile.am, gmp-h.in: Add them.
4661 2002-10-17 Torbjorn Granlund <tege@swox.com>
4663 * gmp-impl.h (popc_limb): Combine variants.
4665 2002-10-14 Kevin Ryde <kevin@swox.se>
4667 * configure.in (AC_CHECK_HEADERS): Add sys/time.h for sys/resource.h
4668 test, needed by SunOS, and next autoconf will insist headers actually
4671 2002-10-08 Kevin Ryde <kevin@swox.se>
4673 * tune/time.c (speed_time_init): Allow for Cray times() apparently
4674 being a cycle counter.
4676 * dumbmp.c (mpz_get_str): Fix buf size allocation.
4678 * tests/trace.c, tests/tests.h (mp_limb_trace): New function.
4680 * tune/speed-ext.c (SPEED_EXTRA_PROTOS): Use __GMP_PROTO.
4681 * tests/devel/try.c (malloc_region): Add a cast for SunOS cc.
4683 * configure.in (AC_CHECK_FUNCS): Add strerror.
4684 (AC_CHECK_DECLS): Add sys_errlist, sys_nerr.
4685 * tune/time.c, tests/devel/try.c: Use them.
4687 2002-10-05 Kevin Ryde <kevin@swox.se>
4689 * configure.in (AC_CHECK_HEADERS): Test float.h, not in SunOS cc.
4690 * printf/repl-vsnprintf.c: Use this.
4692 * configure.in (*sparc*-*-*): Collect up various options for clarity,
4693 use gcc -mcpu=supersparc and ultrasparc3, use cc -xchip, don't use
4694 -xtarget=native, use cc configs with acc, merge SunOS bundled cc and
4697 * gmp-impl.h (gmp_randfnptr_t): Use __GMP_PROTO.
4698 (MPZ_REALLOC): Cast _mpz_realloc return value to mp_ptr, for the
4699 benefit of SunOS cc which requires pointers of the same type on the
4702 * dumbmp.c (mpz_realloc): Add a cast to avoid a warning from SunOS cc.
4704 * acinclude.m4: Allow for i960 b.out default cc output.
4706 * gmp.texi (Random State Initialization): Add gmp_randinit_mt.
4707 (Perfect Square Algorithm): Describe new mpn_mod_34lsub1 use.
4708 (Factorial Algorithm): Describe Jason's new code.
4709 (Binomial Coefficients Algorithm): Ideas about improvements
4710 moved to doc/projects.html.
4711 (Contributors): Add Jason Moxham and Pedro Gimeno.
4713 2002-10-03 Kevin Ryde <kevin@swox.se>
4715 * gen-psqr.c: New file.
4716 * Makefile.am, mpn/Makefile.am: Use it to generate mpn/perfsqr.h.
4717 * mpn/generic/perfsqr.c: Use generated data, put mod 256 data into
4718 limbs to save space, use mpn_mod_34lsub1 when good.
4719 * tests/mpn/t-perfsqr.c: New file.
4720 * tests/mpn/Makefile.am (check_PROGRAMS): Add it.
4721 * tests/mpz/t-perfsqr.c (check_modulo): New test.
4722 (check_sqrt): New function holding current tests.
4724 * configure.in (AC_INIT): Modernize to package name and version here
4725 rather than AM_INIT_AUTOMAKE, add bug report email.
4726 (AC_CONFIG_SRCDIR): New macro.
4728 * gmp-impl.h (ROUND_UP_MULTIPLE): Fix for non-power-of-2 moduli (not
4729 normal in current uses), clarify the comments a bit.
4731 2002-09-30 Kevin Ryde <kevin@swox.se>
4733 * mpn/Makeasm.am (.s.lo): Add --tag=CC for the benefit of CCAS!=CC,
4734 same as .S.lo and .asm.lo.
4736 * Makefile.am (gen-fac_ui, gen-fib, gen-bases): Quote source files in
4737 test -f stuff to avoid Sun make rewriting them.
4739 2002-09-28 Kevin Ryde <kevin@swox.se>
4741 * tests/devel/try.c, tune/speed.c: Avoid strings longer than C99
4744 * tests/refmpn.c, tests/tests.h (refmpn_zero_extend, refmpn_normalize,
4745 refmpn_sqrtrem): New functions.
4746 * tests/devel/try.c (TYPE_SQRTREM): Use refmpn_sqrtrem.
4747 (compare): Correction to tr->dst_size subscripting.
4749 * dumbmp.c: Add several new functions, allow for initial n<d in
4750 mpz_tdiv_q (now in mpz_tdiv_qr actually).
4752 * gen-bases.c (chars_per_limb): Get GMP_NUMB_BITS for base==2,
4753 similarly other powers of 2, which this was in the past.
4754 * tests/refmpn.c (refmpn_chars_per_limb): Ditto.
4755 * tests/mpn/t-mp_bases.c: Test chars_per_limb for power-of-2 bases too.
4757 * Makefile.am, mpz/Makefile.am: Setups for gen-fac_ui.c generating
4760 2002-09-28 Jason Moxham <J.L.Moxham@maths.soton.ac.uk>
4762 * dumbmp.c (mpz_pow_ui, mpz_addmul_ui, mpz_root): New functions.
4763 * gen-fac_ui.c: New file.
4764 * mpz/fac_ui.c: Rewrite.
4766 2002-09-26 Kevin Ryde <kevin@swox.se>
4768 * tests/cxx/localeconv.c: New file, split from t-locale.cc.
4769 * tests/cxx/t-locale.cc: Use it.
4770 * tests/cxx/Makefile.am (t_locale_SOURCES): Add it.
4772 * tests/cxx/Makefile.am: Updates for Gerardo's new test programs.
4774 2002-09-26 Gerardo Ballabio <gerardo.ballabio@unimib.it>
4776 * gmpxx.h (__gmp_cmp_function): Bug fixes in double/mpq and
4777 double/mpfr comparisons.
4779 * tests/cxx/t-assign.cc, tests/cxx/t-binary.cc, tests/cxx/t-constr.cc,
4780 tests/cxx/t-ternary.cc, tests/cxx/t-unary.cc: Revise and add various
4781 tests, including some for mpfr, some split from t-expr.cc.
4782 * tests/cxx/t-locale.cc: Modernize include files.
4783 * tests/cxx/t-ostream.cc: Modernize include files, use cout rather
4784 than printf for diagnostics.
4785 * tests/cxx/t-misc.cc, tests/cxx/t-rand.cc: New file, split from
4787 * tests/cxx/t-ops.cc: New file, some split from t-allfuns.cc.
4788 * tests/cxx/t-prec.cc: New file.
4789 * tests/cxx/t-allfuns.cc, tests/cxx/t-expr.cc: Remove files.
4791 2002-09-25 Torbjorn Granlund <tege@swox.com>
4793 * configure.in (*-cray-unicos*): Remove -hscalar0, it causes too much
4794 performance loss. Let's trust Cray to fix their compilers.
4796 2002-09-24 Torbjorn Granlund <tege@swox.com>
4798 * mpn/powerpc32/add_n.asm: Rewrite.
4799 * mpn/powerpc32/sub_n.asm: Rewrite.
4801 2002-09-24 Pedro Gimeno <pggimeno@wanadoo.es>
4803 * randlc2x.c: Prepare for nails by changing type of _mp_c to mpz_t,
4804 make _mp_seed fixed-size, disallow SIZ(a)==0 to optimize comparisons
4806 * gmp-impl.h (MPZ_FAKE_UI): New macro.
4808 * randmt.c: Some constants made long for K&R compliance; remove UL at
4809 the end of other constants; use mp_size_t where appropriate; use
4810 mpz_export to split the seed.
4812 * gmp-impl.h: Remove type cast in RNG_FNPTR and RNG_STATE, to allow
4813 them to be used as lvalues.
4814 * randclr.c, randlc2x.c, randmt.c, randsd.c: All callers changed.
4816 * mpz/urandomm.c: Replace mpn_cmp with MPN_CMP.
4818 * tests/rand/gen.c: Get rid of gmp_errno.
4820 2002-09-24 Kevin Ryde <kevin@swox.se>
4822 * gmp.texi (Custom Allocation): Keep allocate_function etc out of the
4823 function index by using @deftypevr.
4826 2002-09-24 Gerardo Ballabio <gerardo.ballabio@unimib.it>
4828 * gmpxx.h (mpfr_class constructors from strings): Precision was set
4831 2002-09-23 Torbjorn Granlund <tege@swox.com>
4833 * mpf/urandomb.c: Don't crash for overlarge nbits argument.
4834 Let nbits==0 mean to fill number with random bits.
4836 2002-09-21 Torbjorn Granlund <tege@swox.com>
4838 * mpn/alpha/mod_34lsub1.asm: Add r31 dummy operand to `br' instruction.
4840 2002-09-20 Gerardo Ballabio <gerardo.ballabio@unimib.it>
4842 * gmpxx.h (__gmp_binary_equal, __gmp_binary_not_equal): Fix broken
4843 mpq/double functions.
4845 2002-09-18 Torbjorn Granlund <tege@swox.com>
4847 * randmt.c (randget_mt): Fix typo.
4849 2002-09-18 Kevin Ryde <kevin@swox.se>
4851 * gmp-impl.h (_gmp_rand): Avoid evaluating "state" more than once, for
4852 the benefit places calling it with RANDS.
4854 * randmt.c (randseed_mt): Use mpz_init for mod and seed1, for safety.
4856 * tune/tuneup.c (sqr_karatsuba_threshold): Initialize to
4857 TUNE_SQR_KARATSUBA_MAX so mpn_sqr_n works for randmt initialization.
4859 * gmp.texi (Integer Comparisons): Remove mention of non-existant
4860 mpz_cmpabs_si, reported by Conrad Curry.
4862 * tune/speed.c, tune/speed.h, tune/common.c: Add gmp_randseed,
4863 gmp_randseed_ui and mpz_urandomb.
4865 2002-09-18 Pedro Gimeno <pggimeno@wanadoo.es>
4867 * tests/rand/gen.c: Add mt, remove lc and bbs.
4869 * Makefile.am (libgmp_la_SOURCES): Add randmt.c, remove randlc.c and
4872 * randmt.c: New file.
4873 * gmp-h.in (gmp_randinit_mt): Add prototype.
4874 * randdef.c: Use gmp_randinit_mt.
4876 * gmp-impl.h (RNG_FNPTR, RNG_STATE): New macros.
4877 (gmp_randfnptr_t): New structure.
4878 (_gmp_rand): Now a macro not a function.
4879 * gmp-h.in (__gmp_randata_lc): Remove, now internal to randlc2x.c.
4880 (__gmp_randstate_struct): Revise comments on field usage.
4881 * randsd.c, randclr.c: Use function pointer scheme.
4882 * randsdui.c: Use gmp_randseed.
4883 * randraw.c: Remove file.
4884 * randlc2x.c: Collect up lc_2exp related code from randsd.c, randclr.c
4885 and randraw.c, use function pointer scheme, integrate seed==0/a==0
4886 into main case and fix case where bits(a) < m2exp.
4888 * randlc.c: Remove file, never documented and never worked.
4889 * gmp-h.in (gmp_randinit_lc): Remove prototype.
4891 2002-09-16 Torbjorn Granlund <tege@swox.com>
4893 * mpn/alpha/mod_34lsub1.asm: New file.
4895 2002-09-16 Kevin Ryde <kevin@swox.se>
4897 * configure.in, acinclude.m4 (GMP_C_RESTRICT): Remove this, not
4898 currently used, and #define restrict upsets Microsoft C headers on
4899 win64. Reported by David Librik.
4901 * configure.in (x86): Add gcc 3.2 -march and -mcpu flags, remove some
4902 unnecessary -march=i486 fallbacks.
4904 * gmp.texi (Notes for Particular Systems): Note cl /MD is required for
4905 Microsoft C and MINGW to cooperate on I/O. Explained by David Librik.
4906 (Language Bindings): Add linbox.
4907 * gmp.texi (Language Bindings):
4909 2002-09-12 Kevin Ryde <kevin@swox.se>
4911 * mpz/aorsmul_i.c: Allow for w==x overlap with nails. Test
4912 BITS_PER_ULONG > GMP_NUMB_BITS rather than GMP_NAIL_BITS != 0.
4913 * tests/mpz/t-aorsmul.c: Test this.
4915 * tune/common.c: mpn_mod_34lsub1 only exists for GMP_NUMB_BITS%4==0
4916 * tune/speed.c: Add mpn_mod_34lsub1.
4918 2002-09-10 Pedro Gimeno <pggimeno@wanadoo.es>
4920 * rand.c: Remove old disabled BBS code.
4921 * mpf/urandomb.c: Use BITS_TO_LIMBS.
4923 2002-09-10 Kevin Ryde <kevin@swox.se>
4925 * gmp.texi (Multiplication Algorithms): FFT is now enabled by default.
4927 2002-09-10 Pedro Gimeno <pggimeno@wanadoo.es>
4929 * mpz/urandomm.c: Use mpn level functions, avoid an infinite loop if
4930 _gmp_rand forever returns all "1" bits.
4931 * tests/rand/t-urndmm.c: New file
4932 * tests/rand/Makefile.am (check_PROGRAMS): Add it.
4934 * gmp-impl.h (BITS_TO_LIMBS): New macro.
4935 * mpz/urandomb.c: Use it, and use MPZ_REALLOC.
4937 2002-09-08 Kevin Ryde <kevin@swox.se>
4939 * acinclude.m4 (GMP_GCC_WA_MCPU): New macro.
4940 * configure.in (alpha*-*-*): Use it to avoid -Wa,-mev67 if gas isn't
4941 new enough to know ev67. Reported by David Bremner.
4943 2002-07-30 Gerardo Ballabio <gerardo.ballabio@unimib.it>
4945 * gmpxx.h (__gmpz_value etc): Remove, use mpz_t etc instead.
4946 (__gmp_expr): Reorganise specializations, use __gmp_expr<T,T> not
4948 (mpfr evals): Remove mode parameter, was always
4949 __gmp_default_rounding_mode anyway.
4951 2002-09-07 Kevin Ryde <kevin@swox.se>
4953 * gmp-h.in, mp-h.in: Use #ifdef for tests, for the benefit of
4954 applications using gcc -Wundef.
4956 * longlong.h: Define COUNT_LEADING_ZEROS_NEED_CLZ_TAB for all alphas,
4957 since mpn/alpha/cntlz.asm always goes into libgmp.so, even for ev67
4958 and ev68 which don't need it. Reported by David Bremner.
4960 * gmp.texi (Demonstration Programs): New section, expanding on what
4961 was under "Build Options".
4962 (Converting Floats): Don't need \ for _ in @var within @math.
4963 Add and amend various index entries.
4965 * demos/qcn.c: Add -p prime limit option.
4967 2002-08-30 Kevin Ryde <kevin@swox.se>
4969 * mpz/pprime_p.c: Handle small negatives with isprime, in particular
4970 must do so for n==-2.
4971 * tests/mpz/t-pprime_p.c: New file.
4972 * tests/mpz/Makefile.am: Add it.
4974 2002-08-26 Torbjorn Granlund <tege@swox.com>
4976 * gmp.texi (Converting Floats): Fix typo in mpf_get_d_2exp docs,
4977 reported by Paul Zimmermann.
4979 2002-08-26 Kevin Ryde <kevin@swox.se>
4981 * configure.in: Echo the ABI being tried for the compilers.
4982 (powerpc*-*-*): Use powerpc64/aix.m4 for ABI=aix64 too.
4983 (AC_CHECK_FUNCS): Add strtol, for tests/rand/gen.c.
4985 2002-08-24 Kevin Ryde <kevin@swox.se>
4987 * configure.in (HAVE_HOST_CPU_, HAVE_HOST_CPU_FAMILY_, HAVE_NATIVE_):
4988 Setup templates for these using AH_VERBATIM rather than acconfig.h,
4989 preferred by latest autoconf. Prune lists to just things used.
4990 * acconfig.h: Remove file.
4992 * mpn/powerpc32/mode1o.asm: Forgot ASM_START.
4994 * tune/time.c (have_cgt_id): Renamed from HAVE_CGT_ID so avoid
4995 confusion with autoconf outputs, and turn it into a "const" variable.
4997 2002-08-23 Torbjorn Granlund <tege@swox.com>
4999 * configure.in: Choose powerpc32/aix.m4 or powerpc64/aix.m4 based on
5000 ABI, not configuration triple.
5002 * mpz/pprime_p.c: Partially undo last change--handle small and
5003 negative numbers in the same test.
5005 2002-08-22 Kevin Ryde <kevin@swox.se>
5007 * gmp-impl.h (MUL_FFT_THRESHOLD, SQR_FFT_THRESHOLD): Note
5008 mpn/generic/mul_fft.c is not nails-capable, and don't bother setting
5009 other FFT data for nails.
5011 * configfsf.guess: Update to 2002-08-19.
5012 * configfsf.sub: Update to 2002-08-20.
5014 * config.guess (powerpc*-*-*): Use a { } construct to suppress SIGILL
5017 2002-08-20 Kevin Ryde <kevin@swox.se>
5019 * gmp.texi (Build Options): Add ia64 under cpu types.
5020 (ABI and ISA): Describe IRIX 6 ABI=o32.
5021 (Notes for Particular Systems): Remove -march=pentiumpro, now ok.
5022 (Known Build Problems): Binutils 2.12 is ok for libgmp.a.
5023 (Emacs): New section.
5024 (Language Bindings): Update MLton URL, reported by Stephen Weeks.
5025 (Prime Testing Algorithm): New section.
5026 Don't put a blank line after @item in @table since it can make a page
5027 break between the heading and the entry.
5028 Misc tweaks elsewhere, in particular more index entries.
5030 * mpz/millerrabin.c: Need x to be size+1 for change to urandomm.
5032 * gmp-impl.h: Comments on the use of __GMP_DECLSPEC.
5034 * tune/time.c (freq_measure_mftb_one): Use struct_timeval, for the
5037 * tests/refmpn.c, tests/tests.h (ref_addc_limb, ref_subc_limb):
5038 Renamed from add and sub, following gmp-impl.h ADDC_LIMB and SUBC_LIMB.
5040 2002-08-17 Kevin Ryde <kevin@swox.se>
5042 * mpn/powerpc32/mode1o.asm: New file.
5043 * configure.in, acinclude.m4 (GMP_ASM_POWERPC_PIC_ALWAYS): New macro.
5044 * mpn/asm-defs.m4: Use it to help setting up PIC.
5046 * configure.in (AC_PREREQ): Bump to 2.53.
5048 * mpn/powerpc32/powerpc-defs.m4 (ASSERT): New macro.
5049 (PROLOGUE_cpu): New macro, giving ALIGN(4) not 8.
5051 2002-08-16 Torbjorn Granlund <tege@swox.com>
5053 * mpn/m68k/lshift.asm: Fix typo in !scale_available_p code.
5054 * mpn/m68k/rshift.asm: Likewise.
5056 2002-08-16 Kevin Ryde <kevin@swox.se>
5058 * configure.in (--enable-profiling=instrument): New option.
5059 * gmp.texi (Profiling): Describe it.
5060 * mpn/x86/x86-defs.m4 (PROLOGUE_cpu, call_instrument, ret_internal):
5062 (call_mcount): Share PIC setups with call_instrument.
5063 * mpn/x86/*.asm: Use ret_internal.
5064 * mpn/asm-defs.m4 (m4_unquote): New macro.
5065 * tests/mpn/t-instrument.c: New file.
5066 * tests/mpn/Makefile.am: Add it.
5068 * mpn/alpha/umul.asm: Add ASM_END.
5070 2002-08-12 Kevin Ryde <kevin@swox.se>
5072 * mpz/pprime_p.c: Fake up a local mpz_t to take abs(n), rather than
5075 * mpz/millerrabin.c: Use mpz_urandomm for uniform selection of x,
5076 reported by Jason Moxham. Exclude x==n-1, ie. -1 mod n. Use
5077 gmp_randinit_default.
5079 * mpn/alpha/umul.asm: Use "r" registers, for the benefit of Unicos.
5081 * tests/devel/try.c: Add mpn_copyi and mpn_copyd.
5083 2002-08-09 Kevin Ryde <kevin@swox.se>
5085 * Makefile.am: Remove configure.lineno from DISTCLEANFILES and gmp.tmp
5086 from MOSTLYCLEANFILES, automake does these itself now.
5088 * */Makefile.in, aclocal.m4, configure, install-sh, missing,
5089 mkinstalldirs: Update to automake 1.6.3.
5091 * mpn/ia64/README: Some notes on assembler syntax.
5093 * mpn/ia64/add_n.asm, mpn/ia64/sub_n.asm: Add .body.
5094 * mpn/ia64/add_n.asm, mpn/ia64/addmul_1.asm, mpn/ia64/mul_1.asm,
5095 mpn/ia64/sub_n.asm: Position .save ar.lc just before relevant
5097 * mpn/ia64/addmul_1.asm, mpn/ia64/mul_1.asm: Add .save ar.pfs and pr.
5098 * mpn/ia64/copyd.asm, mpn/ia64/copyi.asm: Correction to .body position.
5099 * mpn/ia64/lorrshift.asm: Add .prologue stuff.
5101 * configure.in (*-*-unicos*): Remove forcible --disable-shared,
5102 libtool gets this right itself now.
5104 2002-08-07 Kevin Ryde <kevin@swox.se>
5106 * mpn/x86/pentium/mmx/hamdist.asm: New file, adapted from
5107 mpn/x86/pentium/mmx/popham.asm.
5108 * mpn/x86/pentium/mmx/popham.asm: Remove file, not faster than plain
5109 mpn/x86/pentium/popcount.asm for the popcount.
5111 * mpn/alpha/umul.asm: Use PROLOGUE/EPILOGUE, rename it mpn_umul_ppmm.
5112 * configure.in (alpha*-*-*): Add umul to extra_functions.
5114 * mpz/remove.c: Make src==0 return 0, not do DIVIDE_BY_ZERO.
5116 2002-08-05 Torbjorn Granlund <tege@swox.com>
5118 * acconfig.h: Remove spurious undefs for mpn_divrem_newton and
5121 2002-08-05 Kevin Ryde <kevin@swox.se>
5123 * tests/refmpn.c, tests/tests.h, tests/misc/t-printf.c,
5124 tests/mpf/t-trunc.c, tests/mpn/t-mp_bases.c, tests/mpn/t-scan.c,
5125 tests/mpq/t-cmp_ui.c, tests/mpz/bit.c, tests/mpz/t-aorsmul.c,
5126 tests/mpz/t-powm_ui.c tests/mpz/t-root.c, tests/mpz/t-scan.c: More
5127 care with long and mp_size_t parameters, for the benefit of K&R.
5129 * demos/perl/GMP.pm, demos/perl/GMP.xs, demos/perl/GMP/Mpz.pm,
5130 demos/perl/test.pl: Add mpz_import and mpz_export.
5131 * demos/perl/GMP.pm: Remove "preliminary" warning.
5133 * mpn/lisp/gmpasm-mode.el: Set add-log-current-defun-header-regexp to
5134 pick up m4 defines etc.
5136 * Makefile.am (libgmpxx_la_DEPENDENCIES): libgmp.la should be here,
5137 not libgmpxx_la_LIBADD, for the benefit of "make -j2".
5139 * mpn/ia64/*.asm [hpux ABI=32]: Extend 32-bit operands to 64-bits, not
5140 optimal and might not be sufficient, but seems to work.
5142 2002-08-03 Kevin Ryde <kevin@swox.se>
5144 * gmp.texi (Profiling): Use a table and expand for clarity.
5145 (Integer Special Functions): New section for mpz_array_init,
5146 _mpz_realloc, mpz_getlimbn and mpz_size, to discourage their use.
5148 * configure.in (*-*-msdosdjgpp*): Remove forcible --disable-shared,
5149 libtool gets this right itself now.
5151 2002-07-30 Kevin Ryde <kevin@swox.se>
5153 * mpn/powerpc32/lshift.asm, mpn/powerpc32/rshift.asm: Lose final mr,
5154 and make final stwu into an stw.
5156 * gmp.texi (Known Build Problems): An easier workaround for DESTDIR,
5157 using LD_LIBRARY_PATH.
5158 (C++ Interface MPFR): Remove mpfrxx.h.
5160 * mpfrxx.h: Remove file.
5161 * Makefile.am: Remove mpfrxx.h.
5162 * tests/cxx/Makefile.am: Add Gerardo's new test programs.
5164 2002-07-30 Gerardo Ballabio <gerardo.ballabio@unimib.it>
5166 * gmpxx.h: Use mpz_addmul etc for ternary a+b*c etc. Reorganise some
5167 macros for maintainability. Merge mpfrxx.h.
5168 * tests/cxx/t-constr.cc, tests/cxx/t-expr.cc: Various updates.
5169 * tests/cxx/t-assign.cc, tests/cxx/t-binary.cc,
5170 tests/cxx/t-ternary.cc, tests/cxx/t-unary.cc: New files.
5172 2002-07-27 Kevin Ryde <kevin@swox.se>
5174 * longlong.h (count_trailing_zeros) [ia64 __GNUC__]: Don't use
5175 __builtin_ffs for now, doesn't seem to work.
5177 * configure.in: Establish CONFIG_SHELL to avoid a problem with
5178 AC_LIBTOOL_SYS_MAX_CMD_LEN on ia64-*-hpux*.
5180 * tune/speed.h (SPEED_ROUTINE_MPN_GCD_FINDA): Don't let calls to
5181 mpn_gcd_finda go dead.
5183 * mpn/generic/tdiv_qr.c: Inline mpn_rshift and MPN_COPY of 2 limbs.
5185 2002-07-24 Kevin Ryde <kevin@swox.se>
5187 * demos/primes.c: Use __GMP_PROTO and don't use signed, for the
5190 * demos/calc/calclex.l: Add <string.h> for strcmp.
5192 * mpn/ia64/invert_limb.asm: Use .rodata which works on ia64-*-hpux*
5193 and should be standard, rather than worrying about RODATA.
5195 * gmp.texi (Function Classes): Add cross references.
5196 (Integer Import and Export): Fix return value grouping.
5198 * mpn/lisp/gmpasm-mode.el (gmpasm-comment-start-regexp): Add // for
5199 ia64. Add notes on what the various styles are for.
5201 * mpn/ia64/default.m4 (ASM_START): Define to empty, not dnl, so as not
5202 to kill text on the same line.
5203 (EPILOGUE_cpu): Force a newline after "#", so as not to suppress macro
5204 expansion in the rest of the EPILOGUE line.
5206 2002-07-21 Kevin Ryde <kevin@swox.se>
5208 * tune/speed.h: Fix some missing _PROTOs.
5210 * Makefile.am (DISTCLEANFILES): Add configure.lineno.
5212 * acinclude.m4 (GMP_C_DOUBLE_FORMAT): Define
5213 HAVE_DOUBLE_IEEE_BIG_ENDIAN and HAVE_DOUBLE_IEEE_LITTLE_ENDIAN in
5215 * mpn/ia64/invert_limb.asm: Add big-endian data.
5217 * tests/mpz/t-jac.c (try_si_zi): Correction to "a" parameter type.
5219 2002-07-20 Kevin Ryde <kevin@swox.se>
5221 * mpz/bin_ui.c, mpz/jacobi.c, mpz/pprime_p.c, mpn/generic/divis.c:
5222 More care with long and mp_size_t parameters, for the benefit of K&R.
5224 * gmp-impl.h (invert_limb): Use parens around macro arguments.
5225 (mpn_invert_limb): Give prototype and define unconditionally.
5227 * gmp-impl.h (CACHED_ABOVE_THRESHOLD, CACHED_BELOW_THRESHOLD): New
5229 * mpn/generic/sb_divrem_mn.c: Use them to help gcc let preinv code go
5230 dead when not wanted.
5232 2002-07-17 Kevin Ryde <kevin@swox.se>
5234 * tests/refmpz.c (refmpz_hamdist): Ensure mp_size_t parameters are
5235 that type, for the benefit of hpux ia64 bundled cc ABI=64.
5237 * configure.in (ia64*-*-hpux*): Need +DD64 in cc_64_cppflags to get
5238 the right headers for ansi2knr.
5240 * acinclude.m4 (GMP_TRY_ASSEMBLE, GMP_ASM_UNDERSCORE): Use $CPPFLAGS
5241 with $CCAS and when linking, as done by the makefiles.
5242 (GMP_ASM_X86_MMX, GMP_ASM_X86_SSE2): Show $CPPFLAGS in diagnostics.
5244 * gmp-impl.h (ieee_double_extract): Setup using HAVE_DOUBLE_IEEE_*.
5245 (GMP_UINT32): New define, 32 bit type for ieee_double_extract.
5246 * configure.in: Add AC_CHECK_SIZEOF unsigned.
5247 * configure.in, acinclude.m4 (GMP_IMPL_H_IEEE_FLOATS): Remove.
5248 (GMP_C_DOUBLE_FORMAT): Instead warn about unknown float here.
5250 * configure.in, acinclude.m4 (GMP_C_SIZES): Remove.
5251 * acinclude.m4 (GMP_INCLUDE_GMP_H_BITS_PER_MP_LIMB): Remove this
5252 scheme, not required.
5253 * configure.in (unsigned long, mp_limb_t): Run AC_CHECK_SIZEOF for
5254 these unconditionally, check mp_limb_t against gmp-mparam.h values.
5255 * gmp-impl.h (BYTES_PER_MP_LIMB, BITS_PER_MP_LIMB): Define based on
5256 SIZEOF_MP_LIMB_T if not provided by gmp-mparam.h.
5257 (BITS_PER_ULONG): Define here now.
5259 * gmp.texi (ABI and ISA): Add HP-UX IA-64 choices.
5260 (Random State Initialization): Typo in m2exp described for
5261 gmp_randinit_lc_2exp_size.
5262 (Formatted Output Functions): Clarify gmp_obstack_printf a bit.
5263 (Formatted Input Strings): Typo in %n summary.
5265 * mpz/inp_raw.c (NTOH_LIMB_FETCH): Use simple generic default, since
5266 endianness detection is now cross-compile friendly.
5267 * mpz/out_raw.c (HTON_LIMB_STORE): Ditto.
5269 * mpz/fib_ui.c: Nailify.
5270 * mpz/random.c: Nailify.
5272 * mpfr/acinclude.m4 (MPFR_CONFIGS): Patch by Vincent for an apparent
5273 float rounding gremlin on powerpc.
5275 2002-07-15 Kevin Ryde <kevin@swox.se>
5277 * Makefile.am (PRINTF_OBJECTS): Avoid ending in a backslash, hpux ia64
5278 make doesn't like that.
5280 * configure.in (ia64*-*-*): Use ABI=64 on non-HPUX systems, for
5283 * gmp-impl.h (ieee_double_extract): Test __sparc__, used by gcc 3.1.
5284 Reported by nix@esperi.demon.co.uk.
5285 * mpfr/mpfr-math.h (_MPFR_NAN_BYTES etc): Ditto.
5287 2002-07-13 Kevin Ryde <kevin@swox.se>
5289 * mpn/powerpc32/rshift.asm: Rewrite, transformed from lshift.asm.
5291 * tune/tuneup.c (DIVEXACT_1_THRESHOLD, MODEXACT_1_ODD_THRESHOLD):
5292 Always zero for native mpn_divexact_1, mpn_modexact_1_odd.
5294 * gmp-h.in (__GMP_EXTERN_INLINE): Don't use this during configure,
5295 ie. __GMP_WITHIN_CONFIGURE, to avoid needing dependent routines.
5296 * acinclude.m4 (GMP_H_EXTERN_INLINE): Consequent changes.
5298 * gmp-impl.h, mpn/asm-defs.m4 (mpn_addmul_2, mpn_addmul_3,
5299 mpn_addmul_4): Add prototypes and defines.
5301 * gmp.texi (Number Theoretic Functions): Clarify return value.
5302 Reported by Peter Keller.
5304 2002-07-10 Kevin Ryde <kevin@swox.se>
5306 * configure.in, acinclude.m4 (GMP_PROG_LEX): Remove this in favour of
5307 AM_PROG_LEX, now ok when lex is missing.
5309 * longlong.h (count_leading_zeros) [pentiummmx]: Don't use __clz_tab
5310 variant under LONGLONG_STANDALONE.
5311 (count_trailing_zeros) [ia64 __GNUC__]: Use __builtin_ffs.
5313 * gmp-impl.h (popc_limb): Add an ia64 asm version.
5314 (DItype): Use HAVE_LONG_LONG to choose long long, avoiding _LONGLONG
5315 which is in gcc but means something unrelated in MS Visual C 7.0.
5316 Reported by David Librik.
5318 * mpz/divexact.c: Add an ASSERT that den divides num.
5320 * mpn/asm-defs.m4 (LDEF): New macro.
5321 (INT32, INT64): Use it.
5322 * mpn/pa32/*.asm: Use it.
5323 * mpn/pa32/README: Update notes on labels.
5325 * tests/refmpn.c, tests/tests.h, tests/t-bswap.c (ref_bswap_limb):
5326 Renamed from refmpn_bswap_limb.
5327 * tests/t-bswap.c: Add tests_start/tests_end for randomization.
5329 * tests/refmpn.c, tests/tests.h (ref_popc_limb): New function.
5330 * tests/t-popc.c: New file.
5331 * tests/Makefile.am: Add it.
5333 * mpn/ia64/invert_limb.asm: Use RODATA since ".section .rodata" is not
5334 accepted by ia64-*-hpux*.
5336 * acinclude.m4 (GMP_ASM_BYTE): New macro.
5337 (GMP_ASM_ALIGN_LOG, GMP_ASM_W32): Use it.
5338 (GMP_ASM_LABEL_SUFFIX): Use test compiles, not $host.
5339 (GMP_ASM_GLOBL): Ditto, and add .global for ia64-*-hpux*.
5340 (GMP_ASM_GLOBL_ATTR): Use GMP_ASM_GLOBL result, not $host.
5341 (GMP_ASM_LSYM_PREFIX): Allow any "a-z" nm symbol code, add ".text" to
5342 test program, required by ia64-*-hpux*.
5343 (GMP_ASM_LABEL_SUFFIX): Make LABEL_SUFFIX just the value, not a "$1:",
5344 the former being how it's currently being used in fact.
5346 * configure.in, acinclude.m4 (GMP_PROG_CC_WORKS_LONGLONG): New macro.
5347 * configure.in (ia64-*-hpux*): Add 32 and 64 bit ABI modes.
5349 2002-07-06 Kevin Ryde <kevin@swox.se>
5351 * tests/cxx/t-allfuns.cc: New file.
5352 * tests/cxx/Makefile.am: Add it.
5354 * mpz/clrbit.c, mpz/setbit.c: Only MPN_NORMALIZE if high limb changes
5355 to zero. Use _mpz_realloc return value.
5357 * gmp.texi (Build Options, C++ Formatted Output, C++ Formatted Input):
5358 Cross reference to Headers and Libraries for libgmpxx stuff.
5359 (Low-level Functions): mpn_divexact_by3 result based on GMP_NUMB_BITS.
5360 mpn_set_str takes "unsigned char *", reported by Mark Sofroniou.
5361 (C++ Interface General): Describe linking with libgmpxx and libgmp.
5363 2002-07-01 Kevin Ryde <kevin@swox.se>
5365 * tune/tuneup.c, gmp-impl.h: Eliminate the array of thresholds in
5366 one(), tune just one at a time and let the callers hand dependencies.
5367 Eliminate the second_start_min hack, handle SQR_KARATSUBA_THRESHOLD
5368 oddities in tune_sqr() instead.
5370 * mpn/pa64/umul.asm, mpn/pa64/udiv.asm, mpn/asm-defs.m4, acconfig.h,
5371 longlong.h, tune/speed.c, tune/speed.h, tune/common.c, tune/many.pl,
5372 tests/devel/try.c: Introduce mpn_umul_ppmm_r and mpn_udiv_qrnnd_r
5373 rather than having variant parameter order for mpn_umul_ppmm and
5374 mpn_udiv_qrnnd on pa64.
5376 * gmp-h.in (mpz_export): Remove a spurious parameter name.
5377 * gmp-impl.h (mpn_rootrem): Use __MPN.
5379 2002-06-29 Kevin Ryde <kevin@swox.se>
5381 * longlong.h (udiv_qrnnd) [hppa32]: Remove mpn_udiv_qrnnd version, the
5382 general mechanism for that suffices.
5384 * mpf/inp_str.c: Fix returned count of chars read, reported by Paul
5385 Zimmermann. Also fix a memory leak for invalid input.
5386 * tests/mpf/t-inp_str.c: New file.
5387 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
5389 * tests/devel/try.c (mpn_mod_34lsub1): Only exists for
5391 (SIZE2_FIRST): Respect option_firstsize2 for "fraction" case.
5393 * mpn/generic/diveby3.c: Further nailifications.
5394 * gmp-impl.h (MODLIMB_INVERSE_3): Allow for GMP_NUMB_BITS odd.
5395 (GMP_NUMB_CEIL_MAX_DIV3, GMP_NUMB_CEIL_2MAX_DIV3): New constants.
5396 * tests/t-constants.c: Check them.
5398 * gmp-h.in (__GMP_CRAY_Pragma): New macro.
5399 (__GMPN_COPY_REST): Use it.
5400 * gmp-impl.h (CRAY_Pragma): Use it.
5402 2002-06-25 Kevin Ryde <kevin@swox.se>
5404 * mpz/import.c, mpz/export.c: Cast data pointer through "char *" in
5405 alignment tests, for the benefit of Cray vector systems.
5407 * configure.in (x86-*-*): Remove -march=pentiumpro check, seems ok
5409 * acinclude.m4 (GMP_GCC_MARCH_PENTIUMPRO, GMP_GCC_VERSION_GE): Remove
5410 macros, no longer needed
5412 * acinclude.m4 (GMP_ASM_RODATA): Remove temporary files.
5414 * configure.in (GMP_ASM_GLOBL_ATTR): Reposition to avoid duplication
5417 2002-06-23 Kevin Ryde <kevin@swox.se>
5419 * tests/mpz/t-fib_ui.c (check_fib_table): Check table values, not just
5420 that they're non-zero.
5422 * acinclude.m4 (GMP_GCC_ARM_UMODSI): Match bad "gcc --version" output
5423 exactly, rather than parsing it with GMP_GCC_VERSION_GE.
5424 (GMP_ASM_UNDERSCORE): Use GLOBL_ATTR.
5426 * mpn/pa32/udiv.asm, mpn/pa32/hppa1_1/udiv.asm, mpn/pa64/udiv.asm:
5427 Renamed from udiv_qrnnd.asm, for consistency with other udiv's.
5428 * mpn/pa64/umul.asm: Renamed from umul_ppmm.asm likewise.
5429 * configure.in (hppa*-*-*): Update extra_functions.
5430 (NAILS_SUPPORT): Remove umul_ppmm, udiv_qrnnd, udiv_fp, udiv_nfp from
5431 nails-neutral list, no longer needed.
5433 * gmp-h.in (__DECC): Add notes on testing this for ANSI-ness.
5434 (__GMP_EXTERN_INLINE): Add static __inline for DEC C.
5435 (mpz_mod_ui): Move up to main section, it's still documented.
5437 2002-06-22 Kevin Ryde <kevin@swox.se>
5439 * mpz/jacobi.c, mpz/kronsz.c, mpz/kronuz.c, mpz/kronzs.c,
5440 mpz/kronzu.c: Allow for odd GMP_NUMB_BITS, tweak a few variable setups.
5441 * gmp-impl.h (JACOBI_STRIP_LOW_ZEROS): New macro.
5443 * mpn/generic/mod_34lsub1.c: Nailify.
5444 * tests/devel/try.c (CNST_34LSUB1): Nailify.
5445 * gmp-impl.h (ADDC_LIMB): New macro.
5447 * gmpxx.h (mpf_class::get_str): Make exponent mp_exp_t&, default
5448 base=10 and ndigits=0.
5449 (mpz_class::set_str, mpq_class::set_str, mpf_class::set_str): Add
5450 versions accepting "const char *".
5451 * mpfrxx.h (mpfr_class::get_str, mpfr_class::set_str): Ditto, and
5452 uncommenting set_str and operator=.
5453 * gmp.texi (C++ Interface Integers, C++ Interface Rationals)
5454 (C++ Interface Floats): Update.
5456 * gmp-impl.h (modlimb_invert): Merge the <=64bits and general versions.
5457 (const, signed): Move to near top of file, fixes --enable-alloca=debug
5460 * gen-fib.c: New file, derived from mainline in mpn/generic/fib2_ui.c.
5461 * dumbmp.c (mpz_init_set_ui): New function.
5462 * Makefile.am, mpn/Makefile.am: Generate fib_table.h, mpn/fib_table.c.
5463 * gmp-impl.h: Use fib_table.h, add __GMP_DECLSPEC to __gmp_fib_table
5464 (for the benefit of tests/mpz/t-fib_ui.c).
5465 * mpn/generic/fib2_ui.c: Remove __gmp_fib_table and generating code.
5467 * Makefile.am: Add mp.h to BUILT_SOURCES, distclean all BUILT_SOURCES,
5470 * acinclude.m4 (GMP_ASM_M68K_INSTRUCTION, GMP_ASM_M68K_BRANCHES):
5471 Don't let "unknown" get into the cache variables.
5472 (GMP_ASM_TEXT): See what assembles, don't hard-code hpux and aix.
5473 (GMP_PROG_EXEEXT_FOR_BUILD): Add ,ff8 for RISC OS, per autoconf cvs.
5474 (GMP_PROG_CPP_FOR_BUILD): Restructure per AC_PROG_CPP, print correct
5475 result if CPP_FOR_BUILD overrides the cache variable.
5476 (GMP_PROG_CC_FOR_BUILD_WORKS): New macro split from
5477 GMP_PROG_CC_FOR_BUILD. Allow for "conftest" default compiler output.
5478 * configure.in, acinclude.m4 (GMP_PROG_HOST_CC): Reinstate this,
5479 separating HOST_CC establishment from GMP_PROG_CC_FOR_BUILD.
5481 * configure.in (mpn_objs_in_libgmp): Move mpn/mp_bases.lo ...
5482 * Makefile.am (MPN_OBJECTS): ... to here, add $U, and arrange
5483 MPN_OBJECTS to be common between libgmp and libmp.
5485 2002-06-20 Torbjorn Granlund <tege@swox.com>
5487 * mpn/generic/mul_n.c (TOOM3_MUL_REC, TOOM3_SQR_REC): Don't check if
5488 basecase is to be invoked when *_TOOM3_THRESHOLD is more than 3 times
5489 the corresponding *_THRESHOLD.
5491 2002-06-20 Kevin Ryde <kevin@swox.se>
5493 * mpn/ia64/submul_1.c: Add missing TMP_DECL, TMP_MARK, TMP_FREE.
5494 Reported by Paul Zimmermann.
5496 * configure.in, acinclude.m4 (AC_DEFINE): Make templates read "Define
5497 to 1", for clarity as per autoconf.
5498 * acinclude.m4 (GMP_OPTION_ALLOCA): Group WANT_TMP templates.
5500 2002-06-20 Gerardo Ballabio <gerardo.ballabio@unimib.it>
5502 * gmpxx.h, mpfrxx.h: Remove mpz_classref, let mpq_class::get_num and
5503 mpq_class::get_den return mpz_class& as per the documentation.
5504 Reported by Roberto Bagnara.
5506 2002-06-18 Kevin Ryde <kevin@swox.se>
5508 * tests/rand/t-lc2exp.c: New file.
5509 * tests/rand/Makefile.am: Add it, and use tests/libtests.la.
5511 * randraw.c (lc): Pad seed==0 case with zero limbs, return same
5512 (m2exp+1)/2 bits as normal, right shift "c" result as normal.
5514 * configure.in: Don't bother with line numbers in some diagnostics.
5515 (*-*-mingw*): Use -mno-cygwin if it works, suggested by delta trinity.
5517 * tests/mpz/Makefile.am, tests/mpq/Makefile.am,
5518 tests/misc/Makefile.am, (CLEANFILES): Set to *.tmp for test program
5519 temporaries, to get t-scanf.tmp and reduce future maintenance.
5521 2002-06-16 Torbjorn Granlund <tege@swox.com>
5523 * mpn/generic/get_str.c (mpn_dc_get_str): Pass scratch memory area in
5524 new `tmp' parameter. Trim allocation needs by reusing input parameter.
5526 2002-06-15 Torbjorn Granlund <tege@swox.com>
5528 * mpn/sparc32/v9/udiv.asm: New file.
5530 2002-06-15 Kevin Ryde <kevin@swox.se>
5532 * acinclude.m4 (GMP_GCC_VERSION_GE): Correction to recognising mingw
5533 gcc 3.1 version number. Reported by Jim Fougeron.
5535 * configure.in (AC_PROVIDE_AC_LIBTOOL_WIN32_DLL): New define, to make
5536 AC_LIBTOOL_WIN32_DLL work with autoconf 2.53.
5538 * acinclude.m4 (GMP_C_SIZES): Establish BITS_PER_MP_LIMB as a value,
5539 not an expression, for the benefit of the gen-bases invocation.
5541 * config.guess (CC_FOR_BUILD): Try c99, same as configfsf.guess.
5543 2002-06-15 Paul Zimmermann <Paul.Zimmermann@loria.fr>
5545 * mpfr/set_q.c: Allow for 1 bit numerator or denominator.
5547 2002-06-14 Kevin Ryde <kevin@swox.se>
5549 * configure.in (AC_C_BIGENDIAN): Use new style action parameters.
5551 * randlc2x.c: Allow for a<0, allow for c>=2^m2exp.
5552 * randraw.c (lc): Allow for a==0.
5554 * mpn/sparc32/udiv.asm: Renamed from udiv_fp.asm. Don't know if float
5555 is the best way for v7, but it's what configure has chosen since gmp 3.
5556 * configure.in (*sparc*-*-* ABI=32): extra_functions="udiv" for all,
5557 in particular sparc32/v8/udiv.asm is faster (on ultrasparc2) than
5558 udiv_fp previously used for v9 chips.
5560 * gen-bases.c: New file, derived from mpn/mp_bases.c.
5561 * dumbmp.c: New file, mostly by Torbjorn, some by me.
5562 * configure.in, acinclude.m4 (GMP_PROG_CC_FOR_BUILD,
5563 GMP_PROG_CPP_FOR_BUILD, GMP_PROG_EXEEXT_FOR_BUILD,
5564 GMP_C_FOR_BUILD_ANSI, GMP_CHECK_LIBM_FOR_BUILD): New macros.
5565 (GMP_PROG_HOST_CC): Remove, superceded by GMP_PROG_CC_FOR_BUILD.
5566 * Makefile.am: Run gen-bases to create mp_bases.h and mpn/mp_bases.c.
5567 * gmp-impl.h: Use mp_bases.h.
5568 * mpn/mp_bases.c: Remove file.
5569 * mpn/Makefile.am: mp_bases.c now in nodist_libmpn_la_SOURCES.
5571 * tests/mpz/t-cmp_d.c (check_one_2exp): Use volatile to force to
5572 double, fixes gcc 3.1 with -O4. Reported by Michael Lee.
5573 * configure.in (AC_C_VOLATILE): New macro.
5575 * tests/misc/t-scanf.c: (fromstring_gmp_fscanf): Add missing va_end.
5576 Don't mix varargs and fixed args functions, not good on x86_64.
5577 Reported by Marcus Meissner.
5579 * Makefile.am (EXTRA_DIST): Remove mpfr/README, now in mpfr/Makefile.in
5581 * configure, config.in, INSTALL.autoconf: Update to autoconf 2.53.
5582 * */Makefile.in, install-sh, mdate-sh, missing, aclocal.m4, configure:
5583 Update to automake 1.6.1.
5584 * configfsf.guess, configfsf.sub: Update to 2002-05-29.
5586 2002-06-12 Kevin Ryde <kevin@swox.se>
5588 * acinclude.m4 (GMP_GCC_VERSION_GE): Recognise mingw gcc 3.1 version.
5589 (GMP_PROG_CC_WORKS): Allow for a_out.exe, as per autoconf.
5590 (GMP_GCC_NO_CPP_PRECOMP, GMP_ASM_UNDERSCORE): Ditto, plus a.exe.
5592 2002-06-09 Torbjorn Granlund <tege@swox.com>
5594 * randraw.c (lc): Remove broken ASSERT_ALWAYS.
5596 * mpn/x86: Update gmp-mparam.h files with current measures *_THRESHOLD
5598 * mpn/x86/p6/mmx/gmp-mparam.h: New file.
5600 2002-06-09 Kevin Ryde <kevin@swox.se>
5602 * mpn/x86/*/gmp-mparam.h (USE_PREINV_DIVREM_1): Add tuned settings.
5604 * acconfig.h (HAVE_NATIVE_mpn_preinv_divrem_1): New template.
5606 * tests/refmpn.c, tests/tests.h (refmpn_chars_per_limb,
5607 refmpn_big_base): New functions.
5608 * tests/mpn/t-mp_bases.c: Use them, and don't test big_base_inverted
5609 unless it's being used.
5611 * gmp.texi (Notes for Particular Systems): Using Microsoft C with DLLs.
5612 (Known Build Problems): Notes on MacOS and GCC.
5613 (Integer Logic and Bit Fiddling): Use ULONG_MAX for maximum ulong.
5614 (Low-level Functions): mpn_get_str accepts base==256.
5615 (Formatted Output Functions): Note output is not atomic.
5616 (Internals): Note mp_size_t for limb counts.
5618 * mp-h.in, gmp-h.in (mp_ptr, mp_srcptr, mp_size_t, mp_exp_t): Remove
5619 these types from mp.h, not needed.
5621 * mpfr/tests/tadd.c, mpfr/tests/tmul.c (check): Apply a hack to the
5622 parameter order to make sparc gcc 2.95.2 happy.
5624 * doc/configuration: Notes on bootstrapping.
5626 2002-06-08 Kevin Ryde <kevin@swox.se>
5628 * mpfr/tests/tsqrt.c, mpfr/tests/tsqrt_ui.c: Suppress tests if sqrt is
5629 not affected by mpfr_set_machine_rnd_mode.
5631 * mpfr/mul_2si.c: Workaround a mips gcc 2.95.3 bug under -O2 -mabi=n32.
5633 * configure.in (alphev56): Fix to use ev5 path.
5635 2002-06-06 Kevin Ryde <kevin@swox.se>
5637 * gmp-h.in: Use __gmp_const not const, in a number of places.
5639 * configure.in (sparc): Use ABI=32 instead of ABI=standard on v7 and
5640 v8, for consistency with v9 choices.
5641 (sparc64): Restrict GMP_ASM_SPARC_REGISTER to ABI=64.
5642 (x86): Move MMX $path munging to before printout.
5643 (CCAS): Move upward to support this.
5645 * gmp-impl.h (modlimb_invert): Merge macros for specific limb sizes,
5646 add a version for arbitrary limb size, use GMP_NUMB_BITS.
5647 (modlimb_invert, MODLIMB_INVERSE_3): Fix comments to say GMP_NUMB_BITS.
5649 * gmp-h.in (__GMP_LIKELY, __GMP_UNLIKELY): New macros.
5650 (mpz_getlimbn, mpz_perfect_square_p, mpz_popcount): Use them, make the
5651 fetch or mpn call likely, unconditionally calculate the alternative so
5652 as to avoid an "else" clause.
5653 * gmp-impl.h (LIKELY, UNLIKELY): Aliases.
5655 * configure.in, mpfr/tests/Makefile.am: Add $LIBM to $LIBS for
5656 MPFR_CONFIGS so it detects fesetround, and let it go through to
5658 * mpfr/rnd_mode.c: Use gmp-impl.h to get MPFR_HAVE_FESETROUND.
5660 * tests/mpz/t-sizeinbase.c: Disable fake bits test, such pointer
5661 setups are bogus and have been seen failing on hppa.
5663 * tests/misc.c, tests/refmpz.c, tests.tests.h, tests/mpz/t-cong.c:
5664 Rename mpz_flipbit to refmpz_combit and move from misc.c to refmpz.c.
5666 2002-06-05 Torbjorn Granlund <tege@swox.com>
5668 * tests/mpz/t-powm_ui.c Print proper routine name in error message.
5670 2002-06-03 Kevin Ryde <kevin@swox.se>
5672 * tune/time.c, tune/freq.c, tune/speed.h: Add powerpc mftb support.
5673 (FREQ_MEASURE_ONE): Move to speed.h, fix tv_sec factor.
5674 (freq_measure): Use for mftb measuring too.
5675 * tune/powerpc.asm, tune/powerpc64.asm: New files.
5676 * configure.in, tune/Makefile.am: Add them.
5678 * gmp-impl.h (popc_limb): Add versions for Cray and fallback for
5679 arbitrary limb size.
5681 * mpn/sparc32/sparc-defs.m4: New file.
5682 * configure.in (sparc*-*-*): Use it.
5683 * acinclude.m4 (GMP_ASM_SPARC_REGISTER): New macro.
5684 * configure.in (sparc64): Use it. Also, use -Wc,-m64 for linking.
5685 * mpn/sparc64/add_n.asm, mpn/sparc64/addmul_1.asm,
5686 mpn/sparc64/copyd.asm, mpn/sparc64/copyi.asm, mpn/sparc64/lshift.asm,
5687 mpn/sparc64/mul_1.asm, mpn/sparc64/rshift.asm,
5688 mpn/sparc64/sqr_diagonal.asm, mpn/sparc64/sub_n.asm,
5689 mpn/sparc64/submul_1.asm: Use REGISTER for .register.
5691 2002-06-01 Kevin Ryde <kevin@swox.se>
5693 * mpz/powm_ui.c: Fix for result range in certain circumstances.
5695 * mpn/x86/k6/diveby3.asm: Speedup to 10 c/l, same as divexact_1.
5696 Anomaly pointed out by Alexander Kruppa.
5698 2002-05-31 Torbjorn Granlund <tege@swox.com>
5700 * mpz/export.c: Cast pointer via `unsigned long' when checking
5701 alignment to avoid compiler warnings.
5703 2002-05-29 Kevin Ryde <kevin@swox.se>
5705 * gmp-impl.h (BSWAP_LIMB): Versions for m68k, powerpc, and arbitrary
5707 * configure.in, acconfig.h (HAVE_HOST_CPU_FAMILY_m68k): New define.
5709 2002-05-27 Torbjorn Granlund <tege@swox.com>
5711 * mpn/generic/mul_basecase.c: Improve MAX_LEFT handling, returning
5712 when possible. Add code for mpn_addmul_5 and mpn_addmul_6.
5714 2002-05-25 Kevin Ryde <kevin@swox.se>
5716 * tune/tuneup.c: Misc nailifications, and disable preinv thresholds
5718 * tune/speed.h: Use GMP_NUMB_HIGHBIT with mpn_sb_divrem_mn and
5720 * mpz/powm.c (redc): Nailify q.
5722 * tests/mpn/t-scan.c: Reduce the amount of testing, to go faster.
5724 2002-05-23 Torbjorn Granlund <tege@swox.com>
5726 * Version 4.1 released.
5728 * mpn/alpha/ev6/nails/gmp-mparam.h: New file.
5730 * tests/devel/add_n.c (refmpn_add_n): Nailify.
5731 * tests/devel/sub_n.c (refmpn_sub_n): Nailify.
5732 * tests/devel/addmul_1.c (refmpn_addmul_1): Nailify.
5733 * tests/devel/submul_1.c (refmpn_submul_1): Nailify.
5735 * mpn/alpha/ev6/nails/add_n.asm: New file.
5736 * mpn/alpha/ev6/nails/sub_n.asm: New file.
5737 * mpn/alpha/ev6/nails/mul_1.asm: New file.
5738 * mpn/alpha/ev6/nails/submul_1.asm: New file.
5740 2002-05-22 Torbjorn Granlund <tege@swox.com>
5742 * mpn/alpha/ev6/nails/addmul_1.asm: New file.
5744 * mpz/inp_str.c (mpz_inp_str_nowhite): Nailify.
5746 * mpn/generic/mul_basecase.c: Update pointers before conditional
5747 MAX_LEFT break statements.
5749 2002-05-21 Torbjorn Granlund <tege@swox.com>
5751 * tests/mpz/t-gcd.c: Test mpz_gcd_ui.
5753 * mpz/lcm_ui.c: Nailify.
5755 * mpz/gcd_ui.c: Nailify. Make it work as documented, allowing
5756 NULL to be passed for result parameter. Fix gcd(0,0) case.
5758 * mpz/set_str.c: Nailify.
5760 * randlc2x.c (gmp_randinit_lc_2exp): Nailify.
5763 * longlong.h (add_ssaaaa,sub_ddmmss) [64-bit sparc]:
5764 Make it actually work.
5766 2002-05-18 Torbjorn Granlund <tege@swox.com>
5768 * mpf/ui_div.c: Shut up compiler warning.
5770 * mpn/generic/mul_basecase.c: Use mpn_addmul_2, mpn_addmul_3, and
5771 mpn_addmul_4, as available.
5773 * mpn/alpha/ev6/nails/addmul_2.asm: Adjust NAILS_SUPPORT decls.
5774 * mpn/alpha/ev6/nails/addmul_3.asm: Likewise
5775 * mpn/alpha/ev6/nails/addmul_4.asm: Likewise.
5777 * configure.in (*-cray-unicos*): Back again to -hscalar0.
5778 (gmp_mpn_functions_optional): Add mul_3, mul_4, addmul_2, addmul_3,
5780 * acconfig.h: Add #undefs for new optional mpn functions.
5782 2002-05-18 Kevin Ryde <kevin@swox.se>
5784 * gmp.texi (Integer Import and Export): Mention Cray unfilled words.
5786 * mpz/set_d.c, mpq/set_d.c: Use LIMBS_PER_DOUBLE for the output of
5787 __gmp_extract_double. Reported by Henrik Johansson.
5789 2002-05-17 Torbjorn Granlund <tege@swox.com>
5791 * mpn/alpha/ev6/nails/addmul_2.asm: New file.
5792 * mpn/alpha/ev6/nails/addmul_3.asm: New file.
5793 * mpn/alpha/ev6/nails/addmul_4.asm: New file.
5795 * mpn/generic/dump.c: Rewrite and nailify.
5797 2002-05-16 Kevin Ryde <kevin@swox.se>
5799 * mpfr/Makefile.am (EXTRA_DIST): Add BUGS file.
5801 2002-05-15 Torbjorn Granlund <tege@swox.com>
5803 * configure.in (*-cray-unicos*): Remove -hscalar0, add -hnofastmd
5804 as workaround for compiler bug.
5805 (mips64*-*-*): Pass just -O1 to cc, to work around compiler bug.
5807 2002-05-14 Torbjorn Granlund <tege@swox.com>
5809 * configure.in (*-cray-unicos*): Pass -hscalar0 to work around
5810 compiler bug for mpz/import.c.
5812 2002-05-11 Torbjorn Granlund <tege@swox.com>
5814 * mpz/import.c: Cast pointer via `unsigned long' when checking
5815 alignment to avoid compiler warnings.
5817 * mpn/generic/rootrem.c: Adjust allocation of qp temporary area.
5819 2002-05-09 Kevin Ryde <kevin@swox.se>
5821 * mpz/import.c: Corrections to size store, special case tests, and
5822 general case ACCUMULATE.
5823 * tests/mpz/t-import.c, tests/mpz/t-export.c: More test data.
5825 2002-05-09 Torbjorn Granlund <tege@swox.com>
5827 * mpn/generic/rootrem.c: Use temp space for root, copy value in place
5829 * mpz/root.c: Don't allocate extra limb for root value.
5830 * mpz/perfpow.c: Undo last change.
5832 2002-05-08 Torbjorn Granlund <tege@swox.com>
5834 * gmp-impl.h (powerpc BSWAP_LIMB_FETCH): Rename local variable to make
5835 it not clash with caller.
5837 * mpn/generic/rootrem.c: New file.
5838 * configure.in (gmp_mpn_functions): Add rootrem and pow_1.
5839 * mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add rootrem.c and
5841 * gmp-impl.h (mpn_rootrem): Add declaration.
5842 * mpz/perfpow.c: Amend allocations for mpn_rootrem requirements.
5843 * mpz/root.c: Rewrite to use mpn_rootrem.
5845 2002-05-08 Kevin Ryde <kevin@swox.se>
5847 * gmp-impl.h (MUL_KARATSUBA_THRESHOLD etc): Remove forced nail values.
5849 * mpf/fits_u.h, mpf/fits_s.h, tests/mpf/t-fits.c: Ignore fraction
5850 part, making the code match the documentation.
5852 * gmpxx.h (struct __gmp_binary_minus): Use mpz_ui_sub.
5854 2002-05-07 Kevin Ryde <kevin@swox.se>
5856 * mpn/powerpc32/README: New file.
5858 * mpz/root.c: Use unsigned long with mpz_sub_ui not mp_limb_t.
5860 * tune/README: Misc updates including sparc32/v9 smoothness, low res
5861 timebase, and mpn_add_n operand overlaps.
5862 * tune/many.pl: Add udiv.asm support.
5864 * gmp.texi (Build Options): A couple of --build better as --host.
5865 (Known Build Problems, Notes for Package Builds): Add DESTDIR problem.
5866 (Compatibility with older versions): Compatible with 4.x versions.
5867 (Converting Integers): Remove mpz_get_ui + mpz_tdiv_q_2exp decompose.
5868 (Integer Import and Export): New section.
5869 (Miscellaneous Integer Functions): Clarify mpz_sizeinbase returns 1
5871 (Language Bindings): Add GNU Pascal.
5872 (Low-level Functions): Add GMP_NUMB_MAX.
5874 * tests/mpz/t-import.c, tests/mpz/t-export.c, tests/mpz/t-get_d.c:
5876 * tests/mpz/Makefile.am: Add them.
5878 * mpz/import.c, mpz/export.c: New files.
5879 * Makefile.am, mpz/Makefile.am, gmp-h.in: Add them.
5881 * gmp-h.in, gmp-impl.h (GMP_NUMB_MAX): Move to gmp.h.
5882 * gmp-impl.h (CNST_LIMB): Add cast to mp_limb_t to ensure unsigned.
5883 (CRAY_Pragma, MPN_REVERSE, MPN_BSWAP, MPN_BSWAP_REVERSE,
5884 ASSERT_ALWAYS_LIMB, ASSERT_ALWAYS_MPN): New macros.
5885 (MPZ_CHECK_FORMAT): Use ASSERT_ALWAYS_MPN.
5887 2002-05-07 Torbjorn Granlund <tege@swox.com>
5889 * mpz/aors_ui.h: Nailify.
5891 * tests/mpz/t-addsub.c: New file.
5892 * tests/mpz/Makefile.am (check_PROGRAMS): Add t-addsub.
5894 * mpz/ui_sub.c: New file.
5895 * mpz/Makefile.am (libmpz_la_SOURCES): Add ui_sub.c.
5896 * Makefile.am (MPZ_OBJECTS): Ditto.
5897 * gmp-h.in (mpz_ui_sub): Add declaration.
5899 * gmp-impl.h (MPZ_REALLOC): Rewrite to allow the use of _mpz_realloc
5902 * gmp-h.in (mpn_pow_1): Add declaration.
5904 * mpn/generic/pow_1.c: Handle exp <= 1. Reverse rp/tp parity scheme
5907 * Rename MP_LIMB_T_HIGHBIT => GMP_LIMB_HIGHBIT.
5909 2002-05-06 Torbjorn Granlund <tege@swox.com>
5911 * demos/pexpr.c (main): Don't call mpz_sizeinbase with negative base.
5913 * randraw.c (lc): Remove an unused variable.
5915 * mpn/generic/get_str.c: Clarify an algorithm description.
5917 * tests/mpf/t-trunc.c: Nailify.
5918 * tests/mpf/t-set_si.c: Disable for nails.
5920 * mpf/cmp_si.c: Nailify.
5921 * mpf/cmp_ui.c: Nailify.
5922 * mpf/div.c: Nailify.
5923 * mpf/div_2exp.c: Nailify.
5924 * mpf/div_ui.c: Nailify.
5925 * mpf/eq.c: Nailify.
5926 * mpf/get_d.c: Nailify.
5927 * mpf/get_d_2exp.c: Nailify.
5928 * mpf/get_si.c: Nailify.
5929 * mpf/get_str.c: Nailify.
5930 * mpf/get_ui.c: Nailify.
5931 * mpf/mul_2exp.c: Nailify.
5932 * mpf/random2.c: Nailify.
5933 * mpf/set_q.c: Nailify.
5934 * mpf/set_si.c: Nailify.
5935 * mpf/set_str.c: Nailify.
5936 * mpf/set_ui.c: Nailify.
5937 * mpf/sub.c: Nailify.
5938 * mpf/ui_div.c: Nailify.
5939 * mpf/ui_sub.c: Nailify.
5940 * mpf/urandomb.c: Nailify.
5942 * gmp-impl.h (__GMPF_BITS_TO_PREC, __GMPF_PREC_TO_BITS): Nailify.
5944 * mpz/get_si.c: Misc variable name changes.
5946 * mpf/fits_u.h: Rewrite - nailify.
5947 * mpf/fits_s.h: Likewise.
5949 * mpz/mod.c: Disambiguate if-statament with extra {}.
5951 * mpf/int_p.c: Fix type of size variables.
5952 * mpf/get_ui: Likewise.
5953 * mpf/get_si: Likewise.
5954 * mpq/equal.c: Likewise.
5955 * mpq/get_d.c: Likewise.
5956 * mpz/cmp_d.c: Likewise.
5957 * mpz/cmpabs_d.c: Likewise.
5958 * mpz/divis_2exp.c: Likewise.
5959 * mpz/kronuz.c: Likewise.
5960 * mpz/kronzu.c: Likewise.
5961 * mpz/kronzs.c: Likewise.
5962 * mpz/kronsz.c: Likewise.
5963 * mpz/scan0.c: Likewise.
5964 * mpz/scan1.c: Likewise.
5965 * mpz/tstbit.c: Likewise.
5966 * mpz/cong_2exp.c: Likewise.
5967 * mpz/divis.c: Likewise.
5969 2002-05-04 Torbjorn Granlund <tege@swox.com>
5971 * mpn/generic/gcd.c: Additional nailify changes.
5973 2002-05-04 Kevin Ryde <kevin@swox.se>
5975 * gmp-h.in (__GNU_MP_VERSION): Set to 4.1.
5976 * Makefile.am (-version-info): Bump for new release.
5978 2002-04-30 Torbjorn Granlund <tege@swox.com>
5980 * mpn/generic/divrem_1.c: Additional nailify changes.
5981 * mpn/generic/mod_1.c: Likewise.
5983 * tests/mpq/t-get_d.c: Print floats with all 16 digits.
5985 * mpq/get_d.c: Nailify.
5987 * tests/mpq/t-set_f.c: Disable for nails.
5989 * mpz/get_d.c: Nailify.
5991 * gmp-impl.h (LIMBS_PER_DOUBLE, MP_BASE_AS_DOUBLE): Nailify.
5993 * gmp-h.in (__GMPZ_FITS_UTYPE_P): Cast maxval to before shifting it.
5995 * extract-dbl.c: Nailify.
5997 2002-04-29 Torbjorn Granlund <tege@swox.com>
5999 * mpq/md_2exp.c (mord_2exp): Nailify.
6001 * mpq/cmp_ui.c: Nailify.
6003 * mpq/cmp.c (mpq_cmp): Nailify.
6005 * mpn/generic/gcd.c: Nailify. GNUify code layout.
6007 * mpn/generic/gcdext.c: Nailify. Misc changes.
6009 * tests/mpz/t-sqrtrem.c: Let argv[1] mean # of repetitions.
6010 * tests/mpz/t-gcd.c: Likewise.
6012 * mpz/gcd.c: Nailify.
6014 * mpn/generic/random.c: Nailify.
6016 * gmp-impl.h (modlimb_invert): Nailify.
6018 2002-04-27 Torbjorn Granlund <tege@swox.com>
6020 * mpn/generic/gcdext.c (div2): Remove qh parameter.
6021 (mpn_gcdext): Streamline double-limb code.
6022 Move GCDEXT_THRESHOLD check to after initial division.
6024 2002-04-27 Kevin Ryde <kevin@swox.se>
6026 * gmp-impl.h (JACOBI_MOD_OR_MODEXACT_1_ODD): Allow for odd
6029 * tune/time.c (sgi_works_p): Allow for 64-bit counter, and fix
6030 SGI_CYCLECNTR_SIZE handling.
6032 * demos/expr/exprfr.c: Add nan and inf constants.
6033 * demos/expr/t-expr.c: Exercise them.
6035 2002-04-26 Torbjorn Granlund <tege@swox.com>
6037 * mpz/cmp_ui.c: Fix overflow conditions for nails.
6039 * gmp-h.in (mpz_get_ui): Fix typo from last change.
6041 * mpz/n_pow_ui.c: Adjust allocation for nails.
6042 (GMP_NUMB_HALFMAX): Renamed from MP_LIMB_T_HALFMAX.
6043 Fix umul_ppmm invocation for for nails.
6045 2002-04-24 Torbjorn Granlund <tege@swox.com>
6047 * mpn/generic/gcdext.c: Simplify by using mpn_tdiv_qr instead of
6050 2002-04-24 Kevin Ryde <kevin@swox.se>
6052 * configure.in (*-*-cygwin*): Give a sensible default command line
6053 limit, to avoid blowups reported by Jim Fougeron on windows 9x.
6054 (--enable-nails): Make the default 2, since mp_bases has data for that.
6056 * mpfr/mpfr-math.h (__mpfr_nan): Use a "double" for the bytes, to
6057 avoid a mis-conversion on alpha gcc 3.0.2.
6058 (_MPFR_INFP_BYTES, _MPFR_INFM_BYTES): Should be a zero mantissa.
6060 2002-04-23 Torbjorn Granlund <tege@swox.com>
6062 * mpz/dive_ui.c: Fix typo.
6064 * mpz/fits_s.h: Rewrite.
6066 * mpz/jacobi.c: Nailify.
6067 * mpz/kronuz.c: Additional nailify changes.
6068 * mpz/kronsz.c: Likewise.
6070 2002-04-23 Kevin Ryde <kevin@swox.se>
6072 * demos/expr/Makefile.am (LDADD): Add $(LIBM) for the benefit of mpfr.
6074 * mpz/divis_ui.c, mpz/cong_ui.c: Nailify.
6075 * mpn/generic/bdivmod.c, mpz/divexact.c, mpz/dive_ui.c: Nailify.
6076 * mpn/generic/sb_divrem_mn.c, mpn/generic/divrem.c,
6077 mpn/generic/divrem_2.c: Nailify ASSERTs.
6078 * mpn/x86/k6/mmx/logops_n.asm, mpn/x86/k6/mmx/com_n.asm: Nailify.
6079 * mpz/inp_raw.c, mpz/out_raw.c: Nailify.
6080 * mpz/kronzu.c, mpz/kronuz.c, mpz/kronzs.c, mpz/kronsz.c: Nailify.
6081 * mpn/generic/divis.c, mpz/cong.c, mpz/cong_2exp.c: Nailify.
6082 * gmp-impl.h (NEG_MOD): Nailify.
6084 * gmp-impl.h, mpn/mp_bases.c: Add back GMP_NUMB_BITS==30 bases data.
6086 * mpfr/get_d.c: Patch from Paul to avoid problem with constant folding
6089 * mpn/lisp/gmpasm-mode.el: Remove mention of defunct LF macro.
6091 2002-04-22 Torbjorn Granlund <tege@swox.com>
6093 * demos/pexpr.c: Handle "binomial" operator.
6095 * mpz/cmp_ui.c: Move assignments of `up' out of conditionals.
6097 * mpn/generic/gcdext.c: Fix fencepost error in STAT code.
6099 * gmp-impl.h (mpn_com_n): Nailify.
6101 * tests/mpz/t-cdiv_ui.c: New file.
6102 * tests/mpz/Makefile.am (check_PROGRAMS): Add t-cdiv_ui.
6103 * mpz/cdiv_qr_ui.c: Nailify.
6104 * mpz/cdiv_q_ui.c: Nailify.
6105 * mpz/cdiv_r_ui.c: Nailify.
6106 * mpz/cdiv_ui.c: Nailify.
6108 * tests/misc/t-printf.c (CHECK_N): Add cast to allow `char' to be an
6110 * tests/misc/t-scanf.c: Likewise.
6112 * mpz/mul_i.h: Rework nails code to handle parameter overlap.
6114 * tests/mpz/t-set_f.c: Disable for nails.
6116 2002-04-21 Torbjorn Granlund <tege@swox.com>
6118 * mpz/set_si.c: Add cast to support LONG_LONG_LIMB.
6119 * mpz/iset_si.c: Likewise.
6121 * mpz/bin_ui.c: Nailify.
6122 * mpz/bin_uiui.c: Nailify.
6124 * mpz/cmpabs_ui.c: Nailify.
6126 * tests/mpz/t-aorsmul.c: Nailify.
6127 * mpz/aorsmul_i.c (mpz_addmul_ui, mpz_submul_ui): Nailify better.
6129 2002-04-20 Torbjorn Granlund <tege@swox.com>
6131 * tests/mpz/t-fdiv_ui.c: Check mpz_fdiv_ui.
6132 * tests/mpz/t-tdiv_ui.c: Check mpz_tdiv_ui.
6134 * mpz/tdiv_ui.c: Rewrite nails code.
6135 * mpz/fdiv_ui.c: Nailify.
6137 * tests/mpz/t-tdiv_ui.c: Check returned remainders.
6138 * tests/mpz/t-fdiv_ui.c: Merge in recent t-tdiv_ui changes.
6140 * mpz/tdiv_q_ui.c: Remove spurious TMP_* calls.
6142 * mpz/fdiv_qr_ui.c: Nailify.
6143 * mpz/fdiv_q_ui.c: Nailify.
6144 * mpz/fdiv_r_ui.c: Nailify.
6146 * mpz/get_si.c: Misc nailify changes to shut up compiler warnings.
6148 * mpz/ui_pow_ui.c: Fix typo in last change.
6150 2002-04-20 Kevin Ryde <kevin@swox.se>
6152 * tests/misc/t-printf.c, tests/misc/t-scanf.c: Check all %n types.
6154 * mpn/x86/k7/mmx/divrem_1.asm, mpn/x86/p6/mmx/divrem_1.asm
6155 (mpn_preinv_divrem_1): New entrypoint.
6156 (mpn_divrem_1): Avoid a branch when testing high<divisor.
6157 * mpn/asm-defs.m4: Add define_mpn(preinv_divrem_1).
6158 * configure.in: Allow divrem_1.asm to provide mpn_preinv_divrem_1.
6160 * gmp-impl.h [nails]: Add #undefs of MUL_KARATSUBA_THRESHOLD etc, to
6161 override CPU gmp-mparam.h. Remove JACOBI_BASE_METHOD override since
6164 * tests/mpn/t-mp_bases.c: New file.
6165 * tests/mpn/Makefile.am (check_PROGRAMS): Add it.
6166 * tests/t-constants.c: Move MP_BASES constants checks to it.
6168 * mpn/mp_bases.c: Fix big_base_inverted values for nails.
6169 * gmp-impl.h (MP_BASES_BIG_BASE_INVERTED_10,
6170 MP_BASES_NORMALIZATION_STEPS_10): Fix nails values.
6171 (MP_BASES_*): Remove GMP_NUMB_BITS == 30 data.
6173 * mpn/x86/pentium/com_n.asm, mpn/x86/pentium/logops_n.asm: Add
6174 NAILS_SUPPORT indicators.
6176 * configure.in: Grep for NAILS_SUPPORT in cpu-specific code, and look
6177 in "nails" subdirectories, print path used.
6178 * mpn/asm-defs.m4 (NAILS_SUPPORT): New macro.
6180 * mpfr/mpfr-test.h: Include config.h, for the benefit of test programs
6181 not using gmp-impl.h.
6183 2002-04-19 Torbjorn Granlund <tege@swox.com>
6185 * tests/mpz/t-scan.c: Nailify.
6187 * mpz/tdiv_qr_ui.c: Nailify.
6188 * mpz/tdiv_q_ui.c: Nailify.
6189 * mpz/tdiv_r_ui.c: Nailify.
6190 * mpz/tdiv_ui.c: Nailify.
6192 * mpz/cmp_ui.c: Nailify.
6194 * mpz/ui_pow_ui.c: Misc nailify changes to shut up compiler warnings.
6196 * mpz/scan0.c: Nailify.
6197 * mpz/scan1.c: Nailify.
6199 * tests/mpz/t-sizeinbase.c (mpz_fake_bits): Nailify.
6201 2002-04-18 Torbjorn Granlund <tege@swox.com>
6203 * mpz/aorsmul_i.c: Nailify.
6205 * mpz/cmp_si.c: Nailify (botched).
6207 * mpz/ui_pow_ui.c: Nailify.
6209 * gmp-h.in (__GMPZ_FITS_UTYPE_P): Nailify.
6211 * mpz/fits_s.h: Nailify.
6213 * tests/mpz/bit.c (check_tstbit): Nailify.
6215 From Paul Zimmermann:
6216 * mpn/generic/sqrtrem.c: Nailify.
6218 * mpz/n_pow_ui.c: Nailify.
6220 * mpz/cfdiv_r_2exp.c: Nailify.
6222 * randraw.c (lc): Undo: Let mpn_rshift put result in place to avoid
6225 2002-04-17 Torbjorn Granlund <tege@swox.com>
6227 * mpz/clrbit.c: Add two GMP_NUMB_MASK masks after addition.
6229 * mpn/generic/random2.c (LOGBITS_PER_BLOCK): Decrease to 4.
6231 * gmp-impl.h (nail DIV_DC_THRESHOLD): Decrease to 50 to allow fast
6234 * mpn/generic/random2.c: Nailify.
6236 * mpz/fac_ui.c: Nailify.
6238 * mpz/mul_i.h: #if ... #endif code block to shut up gcc warnings.
6240 * mpn/generic/sqrtrem.c: Adopt to GNU coding standards.
6241 (mpn_dc_sqrtrem): New name for mpn_dq_sqrtrem.
6242 Partial nailification.
6244 * configure.in: As a temporary hack, clear extra_functions for nails
6247 * gmp-h.in (mpz_get_ui): #if ... #endif else code block to shut up gcc
6250 2002-04-17 Kevin Ryde <kevin@swox.se>
6252 * texinfo.tex: Update to 2002-03-26.08 per texinfo 4.2.
6253 * gmp.texi: Must have @top in @ifnottex (or @contents doesn't come out
6256 * mpn/generic/scan0.c, mpn/generic/scan1.c: Nailify.
6258 * tests/mpn/t-scan.c: New file.
6259 * tests/mpn/Makefile.am (check_PROGRAMS): Add it.
6261 * tests/refmpn.c, tests/tests.h (refmpn_tstbit): Use unsigned long for
6263 (refmpn_setbit, refmpn_clrbit, refmpn_scan0, refmpn_scan1): New
6266 * mpfr/cmp_ui.c (mpfr_cmp_si_2exp): Fix b==0 i!=0 case.
6268 2002-04-17 Gerardo Ballabio <gerardo.ballabio@unimib.it>
6270 * gmpxx.h, mpfrxx.h: Remove mpfr_class bool combinations, remove
6271 mpfr_class::get_str2, use mp_rnd_t for rounding modes, use
6272 8*sizeof(double) for mpfr_t's holding doubles.
6274 2002-04-17 Torbjorn Granlund <tege@swox.com>
6276 * mpz/powm.c: Nailify.
6277 * mpz/powm_ui.c: Nailify.
6279 2002-04-16 Torbjorn Granlund <tege@swox.com>
6281 * mpz/hamdist.c: Nailify.
6282 * tests/misc.c (urandom): Nailify.
6284 * mpz/get_si.c: Nailify.
6285 * gmp-h.in (mpz_get_ui): Nailify. Streamline (and probably upset
6288 * gmp-impl.h (mp_bases[10] values): Add versions for GMP_NUMB_BITS
6289 being 28, 60, and 63.
6290 * mpn/mp_bases.c: Add tables for GMP_NUMB_BITS being 28, 60, and 63.
6292 * mpz/iset_si.c: Nailify.
6293 * mpz/iset_ui.c: Nailify
6295 * tests/mpz/convert.c (main): Print test number in error message.
6297 * mpn/generic/get_str.c (mpn_sb_get_str): Shift up `frac' into nails
6298 field after bignum division.
6300 2002-04-16 Kevin Ryde <kevin@swox.se>
6302 * gmp-h.in, gmp-impl.h (GMP_NAIL_MASK): Move to gmp.h.
6304 * gmp.texi: Use @documentdescription and @copying, per texinfo 4.2.
6305 (Low-level Functions): Clarify mpn_gcd overlap requirements, rewrite
6306 mpn_set_str description, add nails section.
6307 (C++ Interface General): Remove bool from types that mix with classes.
6308 (Language Bindings): Add STklos, GNU Smalltalk, Regina.
6309 (Binary to Radix, Radix to Binary): Describe new code.
6310 (Assembler Cache Handling): More notes, mostly by Torbjorn.
6312 * macos/configure (%vars): Remove __GMP from substitutions, per change
6315 * mpn/generic/dive_1.c: Nailify.
6316 * mpn/generic/mode1o.c: Nailify, remove bogus ASSERT in commented-out
6317 alternate implementation.
6318 * gmp-impl.h (SUBC_LIMB): New macro.
6320 * tests/devel/try.c (validate_divexact_1): Correction to compare.
6321 (udiv_qrnnd): New testing.
6322 (SHIFT_LIMIT): Nailify.
6323 (-b): New option, remove spurious "H" from getopt string.
6325 * mpz/clrbit.c: Nailify.
6326 * tests/mpz/t-hamdist.c: Nailify.
6327 * gmp-impl.h (MPN_FIB2_SIZE): Nailify.
6328 (PP): Nailify conditionals.
6329 * tests/mpz/t-fib_ui.c (MPZ_FIB_SIZE_FLOAT): Nailify.
6331 * configure.in, acinclude.m4: Establish GMP_NAIL_BITS and
6332 GMP_LIMB_BITS for gmp-h.in configure tests.
6334 * mpfr/*, configure.in: Update to final mpfr 2.0.1.
6335 * mpfr/acinclude.m4 (MPFR_CONFIGS): Use $host, not uname stuff.
6336 * mpfr/tests/tout_str.c: Patch from Paul for denorm fprintf tests.
6338 2002-04-15 Torbjorn Granlund <tege@swox.com>
6340 * mpn/generic/divrem_1.c (EXTRACT): Remove.
6342 * tests/mpz/t-tdiv_ui.c (dump_abort): Accept argument for error string.
6344 * mpz/rrandomb.c: Nailify. Needs further work.
6346 * mpn/generic/mod_1.c: Nailify.
6348 * gmp-impl.h: Set various *_THRESHOLD values to be used for nails to
6349 avoid not yet qualified algorithms.
6350 (MPZ_CHECK_FORMAT): Check that nail part is zero.
6352 * tests/mpz/t-mul.c (main): Test squaring even for huge operands.
6353 (base_mul): Nailify.
6354 (dump_abort): Accept argument for error string. Print product
6357 * mpn/generic/set_str.c: Nailify.
6359 * gmp-h.in (__GMPN_ADD, __GMPN_SUB): Nailify.
6361 2002-04-14 Torbjorn Granlund <tege@swox.com>
6363 * randraw.c (lc): Return non-nonsense return value for seed=0 case.
6364 Check for m2exp being non-zero early; remove all other tests of m2exp.
6365 Remove redundant MPN_ZERO call.
6366 Let mpn_rshift put result in place to avoid extra MPN_COPY.
6367 Remove confusing comment before function `lc' describing BBS algorithm.
6368 Misc simplification and cleanups.
6369 Nailify. Needs further work.
6371 * mpz/set_si.c: Nailify.
6372 * mpz/set_ui.c: Nailify.
6373 * mpz/mul_i.h: Nailify.
6375 * tests/mpz/t-mul_i.c: Actually test _ui routines. Add some more test
6378 * mpn/generic/mul_n.c: Finish nailifying toom3 code.
6380 2002-04-13 Kevin Ryde <kevin@swox.se>
6382 * mpfr/*: Update to another new mpfr 2.0.1.
6383 * configure.in, Makefile.am, mpfr/Makefile.am, mpfr/tests/Makefile.am:
6384 Use MPFR_CONFIGS macro, establish separate MPFR_CFLAGS for mpfr build.
6386 * mpfr/tests/Makefile.am: Correction to convenience rule for libmpfr.a.
6388 2002-04-11 Kevin Ryde <kevin@swox.se>
6390 * mpfr/set_q.c: gmp-impl.h before mpfr.h to avoid _PROTO redefine.
6392 * mpfr/*, configure.in: Update to new mpfr 2.0.1.
6394 * tests/refmpn.c (refmpn_udiv_qrnnd, refmpn_divmod_1c_workaround):
6397 * tests/t-constants.c (MODLIMB_INVERSE_3): Nailify tests.
6398 (MP_BASES_BIG_BASE_INVERTED_10, MP_BASES_NORMALIZATION_STEPS_10): Only
6399 check these under USE_PREINV_DIVREM_1.
6400 * tests/t-modlinv.c: Nailify tests.
6402 2002-04-11 Gerardo Ballabio <gerardo.ballabio@unimib.it>
6404 * gmpxx.h: Remove bool combinations, remove mpf_class::get_str2, only
6407 2002-04-11 Torbjorn Granlund <tege@swox.com>
6409 * mpn/generic/diveby3.c: Nailify.
6410 * gmp-impl.h (MODLIMB_INVERSE_3): Nailify.
6412 * mpn/generic/mul_n.c: Nailify Toom3 code.
6414 2002-04-10 Kevin Ryde <kevin@swox.se>
6416 * gmp-impl.h (MPN_KARA_MUL_N_MINSIZE, MPN_KARA_SQR_N_MINSIZE): Set to
6417 3, as needed by nails case.
6419 * mpn/generic/addmul_1.c, mpn/generic/submul_1.c [nails]: Fix vl
6420 assert, add rp,n and up,n asserts.
6422 * mpfr/Makefile.am: Add new mpfr-math.h, install mpf2mpfr.h.
6424 2002-04-10 Torbjorn Granlund <tege@swox.com>
6426 * mpn/generic/divrem_1.c: Nailify. Update mp_size_t variables to use
6427 `n' suffix instead of `size' suffix.
6428 * mpn/generic/divrem_2.c: Likewise.
6429 * mpn/generic/sb_divrem_mn.c: Nailify.
6430 * mpn/generic/tdiv_qr.c: Nailify.
6431 (SHL): Remove silly macro.
6433 * mpn/generic/mul_n.c (mpn_kara_mul_n): Replace open-coded increment by
6434 mpn_incr_u call. Handle nails in ws[n] increment.
6435 * mpn/generic/mul_n.c (mpn_kara_sqr_n): Likewise.
6437 * gmp-h.in (GMP_NUMB_MASK): New #define.
6438 (__GMPN_AORS_1): Add version for nails.
6440 * gmp-impl.h (GMP_NUMB_MASK): Comment out, now in gmp.h.
6441 (mpn_incr_u): Don't assume `incr' is non-zero.
6442 (mpn_decr_u): Similarly.
6444 2002-04-09 Kevin Ryde <kevin@swox.se>
6446 * mpfr/*, configure.in: Update to mpfr 2.0.1.
6448 * tests/refmpn.c (refmpn_mul_1c, lshift_make): Corrections for nails.
6449 * tssts/refmpn.c, tests/tests.h (refmpn_cmp_allowzero): New function.
6451 * mpn/generic/mul_1.c [nails]: Fix vl assert, add {up,n} assert.
6453 * mpn/pa32/hppa1_1/pa7100/addmul_1.asm,
6454 mpn/pa32/hppa1_1/pa7100/submul_1.asm: Rename "size" define, to avoid
6455 ELF .size directive. Reported by LaMont Jones.
6457 * tests/mpz/t-set_si.c: Add nails support.
6459 2002-04-05 Torbjorn Granlund <tege@swox.com>
6461 * gmp-impl.h: Replace nail mpn_incr_u, mpn_decr_u with faster versions.
6462 (mp_bases[10] values): Check GMP_NUMB_BITS instead of BITS_PER_MP_LIMB.
6463 Add GMP_NUMB_BITS == 30 version.
6464 (__gmp_doprnt, etc): Remove parameter names.
6466 * mpn/generic/mul_n.c: Nailify Karatsuba code.
6467 * mpn/generic/get_str.c: Nailify.
6468 * mpn/generic/sqr_basecase.c: Nailify.
6469 * mpn/generic/lshift.c: Nailify.
6470 * mpn/generic/rshift.c: Likewise.
6471 * mpn/generic/add_n.c: Nailify. Revamp non-nail code.
6472 * mpn/generic/sub_n.c: Likewise.
6473 * mpn/generic/mul_1.c: Likewise.
6474 * mpn/generic/addmul_1.c: Likewise.
6475 * mpn/generic/submul_1.c: Likewise.
6477 2002-04-02 Kevin Ryde <kevin@swox.se>
6479 * gmp-impl.h (BSWAP_LIMB_FETCH, BSWAP_LIMB_STORE) [powerpc]:
6480 Corrections to constraints, and restrict to bigendian.
6482 2002-03-31 Kevin Ryde <kevin@swox.se>
6484 * tests/mpz/dive.c: Better diagnostics.
6486 * tests/devel/try.c (mpn_get_str, mpn_umul_ppmm_r): New tests.
6488 * tests/misc.c, tests/tests.h (byte_diff_lowest, byte_diff_highest):
6491 * tests/t-bswap.c: New file.
6492 * tests/Makefile.am (check_PROGRAMS): Add it.
6494 * tests/mpn/t-aors_1.c, tests/mpn/t-iord_u.c: Add nails support.
6496 * gmp-impl.h (MPN_IORD_U) [x86]: Eliminate unnecessary jiord and iord,
6497 rename "n" to incr per generic versions, restrict to nails==0.
6498 (mpn_incr_u, mpn_decr_u): Add nails support.
6499 (GMP_NAIL_LOWBIT, GMP_NUMB_MAX): New macros.
6501 * tests/trace.c, tests/tests.h (byte_trace, byte_tracen): New
6503 * tests/trace.c: Handle NULL operands.
6505 * tests/refmpn.c, tests/devel/try.c, tune/speed.c: Add preliminary
6508 * tests/refmpn.c, test/tests.h (byte_overlap_p, refmpn_equal_anynail,
6509 refmpn_umul_ppmm_r, refmpn_udiv_qrnnd_r, refmpn_get_str,
6510 refmpn_bswap_limb, refmpn_random, refmpn_random2, refmpn_bswap_limb):
6513 * gmp-impl.h, tests/refmpn.c (ASSERT_LIMB): Renamed from
6516 * mpn/x86/*/*.asm, mpn/powerpc32/*/*.asm, mpn/powerpc64/*/*.asm: Put
6517 speeds after the copyright notice, so as to keep that clear.
6519 2002-03-29 Kevin Ryde <kevin@swox.se>
6521 * configure.in (powerpc*-*-aix*): Correction to xlc -qarch selection,
6524 2002-03-28 Torbjorn Granlund <tege@swox.com>
6526 * mpn: Fix spacing in many files.
6528 * mpn/generic/aorsmul_1.c: Split into addmul_1.c and submul_1.c.
6529 * mpn/generic/aors_n.c: Split into add_n.c and sub_n.c.
6531 * mpn/pa64/add_n.asm: Trim another 0.125 cycle/limb. Fix a comment.
6532 * mpn/pa64/sub_n.asm: Likewise.
6534 * mpn/pa64/mul_1.asm: Change comclr, comb to proper forms cmpclr, cmpb.
6535 * mpn/pa64/addmul_1.asm: Likewise.
6536 * mpn/pa64/submul_1.asm: Likewise.
6538 2002-03-28 Kevin Ryde <kevin@swox.se>
6540 * gmp.texi (Converting Integers): Fix type of exp in mpz_get_d_2exp,
6541 reported by epl@unimelb.edu.au.
6542 (References): Update Burnikel and Ziegler URL, reported by Keith
6545 * gmp-h.in, mp-h.in, configure.in, acinclude.m4: Remove __GMP from
6546 AC_SUBSTs, since autoconf says leading "_" in makefile variables is
6549 * demos/expr/run-expr.c: Declare optarg, optind, opterr if necessary.
6550 * configure.in, demos/expr/expr-config-h.in: Configs for this.
6552 2002-03-27 Torbjorn Granlund <tege@swox.com>
6554 * mpn/Makefile.am (TARG_DIST): Remove pa64w and hppa, add pa32.
6556 * configure.in (path_20w): Remove pa64w.
6558 * mpn/pa64/udiv_qrnnd.asm: Tweak for PA8000 performance comparative to
6561 2002-03-26 Torbjorn Granlund <tege@swox.com>
6563 * mpn/pa32: New name for mpn/hppa.
6564 * configure.in: Corresponding changes.
6566 * mpn/pa64/umul_ppmm.asm: New file, generalized for both 2.0N and 2.0W.
6567 * mpn/pa64/umul_ppmm.S: Remove.
6569 * mpn/pa64/udiv_qrnnd.asm: Generalize for both 2.0N and 2.0W.
6570 * mpn/pa64w/udiv_qrnnd.asm: Remove.
6572 2002-03-26 Kevin Ryde <kevin@swox.se>
6574 * mpfr/tests/tdiv.c, mpfr/tests/tui_div.c: Don't depend on nan and inf
6575 handling in "double", for the benefit of alpha.
6577 * configure (hppa2.0w): Set path to "pa64w pa64".
6579 * acinclude.m4, configure.in (GMP_C_INLINE): New macro.
6580 * acinclude.m4 (GMP_H_EXTERN_INLINE): Use it, and fix "yes" handling.
6582 2002-03-25 Torbjorn Granlund <tege@swox.com>
6584 * mpn/pa64w/add_n.s: Remove.
6585 * mpn/pa64w/sub_n.s: Remove.
6586 * mpn/pa64w/lshift.s: Remove.
6587 * mpn/pa64w/rshift.s: Remove.
6588 * mpn/pa64w/mul_1.S: Remove.
6589 * mpn/pa64w/addmul_1.S: Remove.
6590 * mpn/pa64w/submul_1.S: Remove.
6591 * mpn/pa64w/sqr_diagonal.asm: Remove.
6593 * mpn/pa64/mul_1.asm: New file with twice faster code; generalized
6594 for both 2.0N and 2.0W.
6595 * mpn/pa64/submul_1.asm: Likewise.
6596 * mpn/pa64/mul_1.S: Remove.
6597 * mpn/pa64/submul_1.S: Remove.
6599 * mpn/pa64/sqr_diagonal.asm: Generalize for both 2.0N and 2.0W.
6601 * mpn/pa64/add_n.asm: New file, generalized for both 2.0N and 2.0W.
6602 * mpn/pa64/sub_n.asm: Likewise.
6603 * mpn/pa64/lshift.asm: Likewise.
6604 * mpn/pa64/rshift.asm: Likewise.
6605 * mpn/pa64/add_n.s: Remove.
6606 * mpn/pa64/sub_n.s: Remove.
6607 * mpn/pa64/lshift.s: Remove.
6608 * mpn/pa64/rshift.s: Remove.
6610 2002-03-24 Kevin Ryde <kevin@swox.se>
6612 * gmp-impl.h (BSWAP_LIMB_FETCH, BSWAP_LIMB_STORE): New macros.
6613 * mpz/inp_raw.c, mpz/out_raw.c: Use them.
6614 * acconfig.h (HAVE_HOST_CPU): Add some powerpc types.
6616 * mpn/powerpc32/750/com_n.asm: New file.
6618 * mpfr/tests/tout_str.c: Disable random tests, since they fail on
6619 alphaev56-unknown-freebsd4.1 and do nothing by default.
6621 * mpfr/tests/tsqrt.c: Don't depend on nan, inf or -0 in "double", for
6622 the benefit of alpha.
6623 * mpfr/sqrt.c: Clear nan flag on -0.
6625 * demos/factorize.c: Use mpn_random() instead of random(), to avoid
6626 portability problems.
6628 * demos/isprime.c (print_usage_and_exit): Declare as "void" to avoid
6631 * demos/pexpr.c (setup_error_handler): Corrections to sigstack code.
6633 * demos/calc/calc.y: Add some `;'s to make bison 1.34 happy.
6635 2002-03-23 Torbjorn Granlund <tege@swox.com>
6637 * mpn/pa64/addmul_1.asm: New file with twice faster code; generalized
6638 for both 2.0N and 2.0W.
6640 2002-03-22 Kevin Ryde <kevin@swox.se>
6642 * tune/time.c: Add SGI hardware counter measuring method, change some
6643 abort()s into ASSERT_FAIL()s.
6645 * configure.in (AC_CHECK_HEADERS): Add fcntl.h and sys/syssgi.h.
6646 (AC_CHECK_FUNCS): Add syssgi.
6648 * configure.in, mpfr/Makefile.am, mpfr/tests/Makefile.am: Use
6649 -mieee-with-inexact or -ieee_with_inexact for mpfr on alpha, so
6652 * mpfr/isinteger.c: Fix a memory leak.
6654 2002-03-21 Torbjorn Granlund <tege@swox.com>
6656 * tune/speed.c (struct choice_t): Make `r' an mp_limb_t.
6658 2002-03-21 Kevin Ryde <kevin@swox.se>
6660 * configure.in (HAVE_LIMB_BIG_ENDIAN, HAVE_LIMB_LITTLE_ENDIAN): Use an
6661 AH_VERBATIM and better explanation.
6662 * acinclude.m4 (GMP_C_DOUBLE_FORMAT): Similarly for the HAVE_DOUBLE
6665 * gmp.texi (Number Theoretic Functions): Clarify sign of GCD returned
6668 * demos/pexpr.c, demos/pexpr-config-h.in, configure.in: Use an
6669 autoconf test for stack_t.
6671 * configure.in, gmp-h.in, mp-h.in, macos/configure, tests/mpz/reuse.c,
6672 tests/mpf/reuse.c: Use __GMP_LIBGMP_DLL to enable windows declspec,
6673 don't require _WIN32 (etc), remove __GMP_LIBGMP_SHARED and
6674 __GMP_LIBGMP_STATIC.
6676 * gmp-impl.h (mp_bases): Add __GMP_DECLSPEC, for the benefit of
6677 tests/t-constants.c.
6679 * tune/many.pl, tune/speed.h: Remove suffix hack for back.asm.
6681 2002-03-21 Paul Zimmermann <Paul.Zimmermann@loria.fr>
6683 * mpfr/sin_cos.c (mpfr_sin_cos): New file.
6684 * mpfr/mpfr.h, mpfr/mpfr.texi, mpfr/Makefile.am: Add it.
6685 * mpfr/tan.c: Fix sign in 2nd and 4th quadrants.
6687 * mpfr/log10.c: Fix hangs on certain inputs.
6689 2002-03-20 Torbjorn Granlund <tege@swox.com>
6691 * demos/pexpr.c (setup_error_handler): Declare `s', the first
6692 sigaltstack parameter, using `stack_t' just on AIX.
6694 2002-03-19 Torbjorn Granlund <tege@swox.com>
6696 * mpn/powerpc32/mul_1.asm: Use free caller-saves registers instead
6697 of the callee-saves r30 and r31.
6699 2002-03-19 Kevin Ryde <kevin@swox.se>
6701 * tune/freq.c (freq_proc_cpuinfo): Recognise powerpc "clock", where
6702 previously got the wrong result from "bogomips".
6704 * mpn/powerpc32/add_n.asm, mpn/powerpc32/sub_n.asm: Rewrite, faster on
6705 750, and smaller too.
6706 * mpn/powerpc32/*.asm: Use L(), add some measured speeds.
6708 * longlong.h (count_trailing_zeros) [vax]: Add a version using ffs,
6711 2002-03-17 Kevin Ryde <kevin@swox.se>
6713 * tune/speed.c, tune/speed.h, tune/common.c, many.pl: Use optional
6714 ".r" to specify operand overlaps for mpn_add_n, mpn_sub_n and logops.
6715 Remove mpn_add_n_inplace and mpn_add_n_self.
6716 * tune/many.pl: Fix MULFUNC_PROLOGUE parsing.
6718 * gmp.texi (Known Build Problems): Note `make' problem with long
6719 libgmp.la dependencies list.
6721 * printf/doprnt.c, scanf/doscan.c (%zn): Remove test of non-existent
6722 HAVE_SIZE_T, just use size_t unconditionally.
6723 * printf/doprnt.c (%zd etc): Fix 'z' type parsing.
6724 * tests/misc/t-printf.c, tests/misc/t-scanf.c: More tests.
6726 * configure.in: Use AC_COPYRIGHT.
6727 Add m4_pattern_allow(GMP_MPARAM_H_SUGGEST).
6729 * tune/Makefile.am (libdummy.la): Remove this, sqr_basecase.c already
6730 gets an ansi2knr rule from nodist_tuneup_SOURCES.
6732 * longlong.h (count_leading_zeros) [pentiumpro gcc<3]: Test
6733 HAVE_HOST_CPU_i686 too.
6735 * mpz/out_raw.c (HTON_LIMB_STORE): Fix a typo in big endian #if.
6737 2002-03-14 Kevin Ryde <kevin@swox.se>
6739 * mpn/x86/pentium/com_n.asm, mpn/x86/pentium/logops_n.asm,
6740 mpn/x86/k6/mmx/com_n.asm: Add nails support.
6742 * texinfo.tex: Update to 2002-03-01.06 (per texinfo 4.1).
6743 * gmp.texi (@ma): Remove, @math does this now.
6745 * mpfr/tests/reuse.c: Clear op1 and op2 flags only in their respective
6748 * configure.in (--enable-cxx): Correction to the default stated in the
6750 (power*-*-aix*, not powerpc): Use aix.m4, don't run
6751 GMP_ASM_POWERPC_R_REGISTERS or use powerpc-defs.m4.
6753 2002-03-13 Torbjorn Granlund <tege@swox.com>
6755 * mpn/sparc32/gmp-mparam.h: New file.
6757 2002-03-13 Kevin Ryde <kevin@swox.se>
6759 * demos/expr/exprfr.c: More mpfr functions, corrections to agm, cos,
6760 sin, rename log2 constant to loge2 to make room for log2 function.
6761 * demos/expr/t-expr.c: More tests.
6763 * mpz/inp_raw.c (NTOH_LIMB_FETCH) [generic 16bit]: Remove spurious "+".
6765 * mpfr/acos.c: Avoid a memory leak for certain operands.
6767 * acinclude.m4, configure.in (GMP_C_DOUBLE_FORMAT): New macro.
6769 * acinclude.m4 (GMP_HPC_HPPA_2_0, GMP_ASM_UNDERSCORE,
6770 GMP_ASM_ALIGN_LOG, GMP_ASM_LSYM_PREFIX, GMP_ASM_W32, GMP_ASM_X86_MMX):
6771 Change ac_objext to OBJEXT, which is the documented variable.
6773 * config.guess (powerpc*-*-*): Use #ifdef on constants POWER_630 etc
6774 in the AIX test, since old versions don't have them all.
6776 2002-03-11 Kevin Ryde <kevin@swox.se>
6778 * configure.in (LIBC211): New AC_DEFINE, for mpfr.
6780 * configure.in (mips*-*-*): Support ABI=o32 on irix 6, allow gcc 2.7.2
6781 to fall back on it, but detect it doesn't work with gcc 2.95. Use
6782 single mips-defs.m4 for both mips32 and mips64.
6783 * acinclude.m4 (GMP_GCC_MIPS_O32): New macro.
6784 * mpn/mips32/mips-defs.m4: Renamed from mips.m4.
6785 * mpn/mips64/mips.m4: Remove (was a copy of mips32/mips.m4).
6787 * mpn/powerpc32/750: New directory.
6788 * configure.in (powerpc740, powerpc750, powerpc7400): Use it.
6789 * mpn/powerpc32/750/gmp-mparam.h: New file.
6791 * config.sub, gmp.texi (ultrasparc1): Remove this, just use plain
6794 2002-03-10 Kevin Ryde <kevin@swox.se>
6796 * mpfr: Update to 20020301, except internal_ceil_exp2.c,
6797 internal_ceil_log2.c, internal_floor_log2.c renamed to i_ceil_exp2.c,
6798 i_ceil_log2.c, i_floor_log2.c to be unique in DOS 8.3. And sqrtrem.c
6799 removed since no longer required.
6800 * mpfr/mpfr.texi: Fix some formatting.
6801 * mpfr/tests/reuse.c: Patch by Paul to fix test4 variable handling.
6802 * mpfr/sinh.c: Patch by Paul to fix err calculation when t==0.
6803 * mpfr/tests/tget_d.c: Disable until portability of rnd_mode.c can be
6806 * configure.in (powerpc*-*-*): Separate gcc and xlc cpu flags setups
6809 * longlong.h (count_leading_zeros, count_trailing_zeros) [x86_64]: New
6812 2002-03-07 Kevin Ryde <kevin@swox.se>
6814 * gmp.texi (Build Options): Note all the ultrasparcs accepted.
6815 (Language Bindings): Add Math::BigInt::GMP.
6817 * config.sub (ultrasparc2i): New cpu type.
6818 * config.guess (sparc-*-*, sparc64-*-*): Add some exact CPU detection.
6820 2002-03-05 Kevin Ryde <kevin@swox.se>
6822 * longlong.h (count_leading_zeros, count_trailing_zeros) [alphaev67,
6823 alphaev68]: Use ctlz and cttz insns (as per gcc longlong.h).
6824 (count_leading_zeros) [sparclite]: Fix parameter order (as per gcc
6826 * acconfig.h (HAVE_HOST_CPU_alphaev68): New define.
6828 * config.guess [i?86-*-*]: Suppress error messages if compiler not
6829 found or test program won't run.
6830 [rs6000-*-*, powerpc-*-*]: Force code alignment for mfpvr test.
6832 2002-03-04 Torbjorn Granlund <tege@swox.com>
6834 * mpn/generic/pow_1.c: New file.
6836 2002-03-03 Kevin Ryde <kevin@swox.se>
6838 * gmp.texi (Build Options): Note compiler must be able to fully link,
6839 add alphapca57 and alphaev68, give a clearer example of MPN_PATH
6840 (Debugging): Add notes on valgrind.
6841 (C++ Formatted Output): Clarify mpf showbase handling, in particular
6842 note "00.4" in octal.
6844 * printf/doprntf.c: Do a showbase on octal float fractions, for
6845 instance "00.4" where previously it gave "0.4".
6846 * tests/cxx/t-ostream.cc: Update.
6848 * gmp-h.in, mp-h.in (__GMP_DECLSPEC, __GMP_DECLSPEC_XX): Test
6849 __WIN32__ for Borland C, reported by "delta trinity".
6851 * gmp-h.in, mp-h.in: Use <cstddef> for size_t under C++, suggested by
6852 Hans Aberg some time ago.
6853 * gmp-h.in (<iosfwd>): Move to top of file for clarity.
6855 * Makefile.am (libgmpxx_la_SOURCES): Use dummy.cc to force C++.
6856 (CXX_OBJECTS): Add osfuns$U.lo.
6857 * dummy.cc: New file.
6858 * cxx/Makefile.am (INCLUDES): Use __GMP_WITHIN_GMPXX.
6859 (libcxx_la_SOURCES): Add osfuns.cc.
6860 * gmp-h.in (__GMP_DECLSPEC_XX): New define, use it on libgmpxx funs.
6861 * gmp-impl.h: Add __GMP_DECLSPEC to libgmp functions used by libgmpxx.
6863 * longlong.h (COUNT_TRAILING_ZEROS_TIME): Remove, no longer used.
6865 * gmp-impl.h (MPN_SIZEINBASE, MPN_SIZEINBASE_16): Correction to
6866 __totbits for nails.
6868 * gmp-impl.h (JACOBI_LS0): Test size before limb, to pacify valgrind.
6869 (JACOBI_0LS): Ditto, and fix parens around arguments.
6871 * mpn/x86/x86-defs.m4 (call_mcount): Add a counter to make data labels
6872 unique, since simplified L() scheme no longer gives that effect.
6873 (notl_or_xorl_GMP_NUMB_MASK): New macro.
6874 Add m4_assert_numargs in a few places.
6876 * configure.in (*sparc*): Fix cycle counter setups for ABI=64.
6878 2002-02-28 Torbjorn Granlund <tege@swox.com>
6880 * mpn/vax/gmp-mparam.h: New file.
6882 2002-02-28 Kevin Ryde <kevin@swox.se>
6884 * gmp-h.in (gmp_errno, gmp_version): Move into extern "C" block,
6885 reported by librik@panix.com.
6887 * gmp-h.in, mp-h.in (__GMP_DECLSPEC_EXPORT, __GMP_DECLSPEC_IMPORT):
6888 Use __declspec(dllexport) and __declspec(dllimport) on Borland.
6889 * gmp-h.in (_GMP_H_HAVE_FILE): Test __STDIO_H for Borland.
6890 Reported by "delta trinity".
6892 * gmp-impl.h (va_copy): Fall back on memcpy, not "=".
6894 * mpn/generic/pre_mod_1.c: Add a comment about obsolescence.
6896 * tune/time.c (MICROSECONDS_P): Don't trust time differences of 1
6899 * tests/cxx/t-ostream.cc: Use "const char *" not just "char *" for
6900 test data strings, avoids warnings on Sun CC.
6902 2002-02-27 Torbjorn Granlund <tege@swox.com>
6904 * configure.in: For sparc under solaris2.[7-9], pass -fsimple=1 to
6905 disable some crazy -fast optimizations.
6907 2002-02-25 Torbjorn Granlund <tege@swox.com>
6909 * configure.in: For sparc under solaris2.[7-9], pass -fns=no to enable
6910 denorm handling under -fast.
6912 2002-02-25 Kevin Ryde <kevin@swox.se>
6914 * configure.in (alpha*-*-*): Rearrange -mcpu selection for gcc,
6915 provide an ev67 -> ev6 fallback. Fix -arch,-tune selection for DEC C.
6916 Allow ~ for space in optional options lists.
6918 * tune/tuneup.c (tune_preinv_divrem_1): Compare against an assembler
6919 mpn_divrem_1 if it exists, not the generic C mpn_divrem_1_div.
6920 (tune_preinv_mod_1): Ditto with mpn_mod_1.
6922 * tune/time.c (DIFF_SECS_ROUTINE): Eliminate the unused "type"
6923 parameter, try to make the code a bit clearer.
6925 * tune/freq.c: Reduce the period measured for cycles versus
6926 gettimeofday, add cycles versus microsecond getrusage.
6928 * mpz/array_init.c: "i" should be mp_size_t, noticed by E. Khong.
6930 2002-02-24 Torbjorn Granlund <tege@swox.com>
6932 * configure.in: For sparc under solaris2.[7-9], pass -fast instead of
6933 other optimization options.
6935 2002-02-23 Kevin Ryde <kevin@swox.se>
6937 * mpn/asm-defs.m4 (GMP_NUMB_MASK): New macro.
6938 (PROLOGUE, EPILOGUE): Relax quoting for the benefit of tune/many.pl
6939 when GSYM_PREFIX non-empty.
6941 * tune/time.c, tune/speed.h (speed_time_init): Include clock tick
6942 period in speed_time_string.
6943 * tune/time.c, configure.in (clock_gettime): New measuring method.
6945 * tune/many.pl: Add -DHAVE_NATIVE_mpn_foo to C objects, to avoid
6946 conflicts with a macro version in gmp-impl.h, eg. mpn_com_n.
6948 2002-02-22 Torbjorn Granlund <tege@swox.com>
6950 * demos/pexpr.c: Increase RLIMIT_STACK to 4Mibyte.
6952 2002-02-22 Kevin Ryde <kevin@swox.se>
6954 * tune/tuneup.c: Don't confuse gcc with mipspro cc in diagnostic.
6956 2002-02-20 Torbjorn Granlund <tege@swox.com>
6958 * configure.in (mips*-*-irix[6789]*]): Set `extra_functions_n32', not
6961 * printf/doprnt.c: Conditionally include inttypes.h.
6962 * printf/repl-vsnprintf.c: Likewise.
6963 * scanf/doscan.c: Likewise.
6965 2002-02-20 Kevin Ryde <kevin@swox.se>
6967 * mpn/x86/k7/mmx/com_n.asm: New file.
6969 * mpz/n_pow_ui.c (SWAP_RP_TP): Use ASSERT_CODE on ralloc and talloc,
6970 to ensure they needn't live past the initial allocs in a normal build.
6972 * mpn/generic/mod_34lsub1.c: Note this is for internal use.
6974 2002-02-19 Torbjorn Granlund <tege@swox.com>
6976 * Clean up *_THRESHOLD names. Many files affected.
6978 * mpn/mips32: Asm-ify 32-bit mips code.
6979 Move files from `mips2' to `mips32' directory.
6980 * mpn/mips64: Move files from `mips3' to `mips64' directory.
6981 * configure.in: Change `mips2' => `mips32' and `mips3' => `mips64'.
6983 2002-02-19 Kevin Ryde <kevin@swox.se>
6985 * acinclude.m4, configure.in (GMP_PROG_LEX): New macro.
6987 * tune/tuneup.c (one): Start next threshold at a max of previous ones,
6988 in order to get a good starting point for TOOM3_SQR_THRESHOLD if
6989 KARATSUBA_SQR_THRESHOLD is 0 (ie. using mpn_mul_basecase only).
6991 * configure.in, tune/tuneup.c (GMP_MPARAM_H_SUGGEST): New AC_DEFINE
6992 replacing GMP_MPARAM_H_FILENAME. Suggest a new file in a cpu specific
6993 subdirectory rather than mpn/generic.
6995 * acinclude.m4 (POWERPC64_PATTERN): New macro.
6996 * configure.in (powerpc*-*-*): Use it.
6997 (powerpc*-*-*): Use umul in 32L and aix64.
6998 (mips*-*-*): Use umul, 32 and 64 bit versions.
7000 2002-02-18 Torbjorn Granlund <tege@swox.com>
7002 * longlong.h: Add basic x86-64 support.
7004 2002-02-17 Torbjorn Granlund <tege@swox.com>
7006 * demos/pexpr.c: Support `-X' for upper case hex, make `-x' output
7009 * mpn/mips2/umul.s: Make it actually work.
7010 * mpn/mips3/umul.asm: New file.
7012 * mpn/mips2/gmp-mparam.h: New file.
7014 2002-02-16 Torbjorn Granlund <tege@swox.com>
7016 * mpn/generic/get_str.c (mpn_sb_get_str): Round frac upwards after
7019 2002-02-16 Kevin Ryde <kevin@swox.se>
7021 * config.guess (alpha-*-*): Do alpha exact cpu probes on any system,
7022 and only if configfsf.guess gives a plain "alpha".
7024 * acinclude.m4 (GMP_PROG_CC_WORKS): Detect a gcc 3.0.3 powerpc64
7025 linker invocation problem.
7027 2002-02-15 Torbjorn Granlund <tege@swox.com>
7029 * mpn/generic/get_str.c (mpn_sb_get_str): For base 10, develop initial
7030 digits using umul_ppmm, then switch to plain multiplication.
7032 * config.guess: Rewrite Alpha subtype detection code for *bsd systems.
7034 2002-02-15 Kevin Ryde <kevin@swox.se>
7036 * gmp.texi (Build Options): Note powerpc exact cpu types.
7037 (Debugging): Advertise DEBUG in memory.c.
7039 * config.sub, config.guess: Add some powerpc exact cpus.
7040 * configure.in: Add configs for them.
7042 * memory.c [__NeXT__]: Remove unused #define of "static".
7043 (__gmp_default_allocate, __gmp_default_reallocate): Print size if
7044 allocation fails, don't use perror.
7046 * gmp-h.in: g++ 3 demands __GMP_NOTHROW is before other attributes.
7048 2002-02-14 Torbjorn Granlund <tege@swox.com>
7050 * mpn/alpha/mul_1.asm: Fix typo preventing build on T3E systems.
7052 2002-02-14 Kevin Ryde <kevin@swox.se>
7054 * tune/tuneup.c (tune_set_str): Increase max_size, for the benefit of
7057 * macos/README: Bug reports to bug-gmp@gnu.org, clarify MacOS X a bit.
7059 * mpn/generic/gcdext.c [WANT_GCDEXT_ONE_STEP]: Add missing TMP_FREE.
7061 * tune/speed.c, tune/tuneup.c: Allow for speed_cycletime of 0.0 in
7062 some diagnostic printouts.
7063 * tune/time.c (speed_cycletime): Note can be 0.0.
7065 2002-02-12 Torbjorn Granlund <tege@swox.com>
7067 * mpn/alpha/mul_1.asm: Add mpn_mul_1c entry.
7069 * mpn/pa64w/sqr_diagonal.asm: Use L() for labels.
7071 2002-02-11 Torbjorn Granlund <tege@swox.com>
7073 * mpn/generic/get_str.c (mpn_sb_get_str): Change declaration of rp to
7074 accommodate tuneup compiles.
7076 2002-02-11 Kevin Ryde <kevin@swox.se>
7078 * mpn/alpha/default.m4, mpn/alpha/unicos.m4 (PROLOGUE_cpu): Add
7080 * mpn/alpha/default.m4 (PROLOGUE_cpu): use ALIGN instead of ".align".
7082 * gmp.texi (Debugging): Notes on Checker.
7083 (Other Multiplication): Move note on float FFTs to here.
7084 (Assembler Floating Point): New text and revisions by Torbjorn,
7085 picture formatting by me.
7086 Simplify tex pictures elsewhere a bit, share heights, eliminate some
7089 2002-02-11 Torbjorn Granlund <tege@swox.com>
7091 * mpn/generic/get_str.c (mpn_sb_get_str): Rewrite to generate fraction
7092 limbs and use multiplication for digit development. Trim allocation of
7093 buf. Get rid of code for !USE_MULTILIMB.
7095 2002-02-10 Torbjorn Granlund <tege@swox.com>
7097 * mpn/generic/set_str.c (mpn_set_str): Undo this:
7098 Change invocations of mpn_add_1 to instead use mpn_incr_u.
7100 * tests/mpz/convert.c: Free str only after it is used in error message.
7102 * mpn/generic/get_str.c (mpn_sb_get_str): Combine tail code for base 10
7105 * mpn/mp_bases.c: Add entries for base 256. Remove __ prefix from
7107 * gmp-impl.h (__mp_bases): Remove superflous `mp_' part of name, making
7108 it __gmpn_bases instead of __gmpn_mp_bases.
7109 (mp_bases): New #define.
7110 * tune/speed.h (SPEED_ROUTINE_MPN_SET_STR): Allow bases up to 256.
7111 (SPEED_ROUTINE_MPN_GET_STR): Likewise.
7113 2002-02-09 Torbjorn Granlund <tege@swox.com>
7115 * mpn/generic/set_str.c (mpn_set_str): Use mpn_mul_1c if available.
7116 Change invocations of mpn_add_1 to instead use mpn_incr_u.
7118 2002-02-09 Kevin Ryde <kevin@swox.se>
7120 * mpz/array_init.c, mpz/cfdiv_q_2exp.c, mpz/cfdiv_r_2exp.c,
7121 mpz/cong_2exp.c, mpz/divis_2exp.c, mpz/hamdist.c, mpz/init2.c,
7122 mpz/mul_2exp.c, mpz/realloc2.c, mpz/scan0.c, mpz/scan1.c,
7123 mpz/setbit.c, mpz/tdiv_q_2exp.c, mpz/tdiv_r_2exp.c, mpz/tstbit.c,
7124 mpz/urandomb.c: Use GMP_NUMB_BITS.
7126 * mpz/iset_str.c [__CHECKER__]: Store a dummy value to the low limb to
7127 stop it appearing uninitialized.
7129 * gmp-h.in (__GMP_NOTHROW): New macro.
7130 (mp_set_memory_functions, mpz_cmp, mpz_cmp_si, mpz_cmp_ui, mpz_cmpabs,
7131 mpz_cmpabs_ui, mpz_congruent_2exp_p, mpz_divisible_2exp_p,
7132 mpz_fits_sint_p, mpz_fits_slong_p, mpz_fits_sshort_p, mpz_fits_uint_p,
7133 mpz_fits_ulong_p, mpz_fits_ushort_p, mpz_get_si, mpz_get_ui,
7134 mpz_getlimbn, mpz_hamdist, mpz_popcount, mpz_scan0, mpz_scan1,
7135 mpz_size, mpz_sizeinbase, mpz_swap, mpz_tstbit, mpq_equal, mpq_swap,
7136 mpf_cmp, mpf_cmp_si, mpf_cmp_ui, mpf_fits_sint_p, mpf_fits_slong_p,
7137 mpf_fits_sshort_p, mpf_fits_uint_p, mpf_fits_ulong_p,
7138 mpf_fits_ushort_p, mpf_get_default_prec, mpf_get_prec, mpf_get_si,
7139 mpf_get_ui, mpf_integer_p, mpf_set_default_prec, mpf_set_prec_raw,
7140 mpf_size, mpf_swap, mpn_add_1, mpn_cmp, mpn_hamdist, mpn_popcount,
7143 * gmp-impl.h (MPN_SIZEINBASE, MPN_SIZEINBASE_16): New macros from
7144 mpn_sizeinbase, and use GMP_NUMB_BITS.
7145 * mpz/get_str.c, mpz/sizeinbase.c, mpbsd/mout.c, tune/speed.h: Use
7147 * mpbsd/mtox.c: Use MPN_SIZEINBASE_16.
7149 * configure.in, mpn/Makefile.am, gmp-impl.h (mpn_sizeinbase): Remove.
7150 * mpn/generic/sizeinbase.c: Remove file.
7152 * gmp-impl.h (MPN_GET_STR_SIZE): Remove.
7153 * tests/mpn/t-g_str_size.c: Remove file.
7154 * tests/mpn/Makefile.am: Update.
7156 * Makefile.am (dist-hook): Don't distribute cvs merge ".#" files.
7158 2002-02-08 Torbjorn Granlund <tege@swox.com>
7160 * configure.in: Override extra_functions for all sparcv8 systems, not
7163 2002-02-06 Kevin Ryde <kevin@swox.se>
7165 * tune/tuneup.c (tune_mul, tune_sqr): Disable FFTs until tuned.
7166 * tune/speed.h (SPEED_ROUTINE_MPN_SET_STR): Fix memory clobber in
7167 destination cache priming.
7169 * printf/doprnt.c: Fix parsing of %s and %p conversions.
7170 * tests/misc/t-printf.c (check_misc): Add some tests.
7172 2002-02-03 Torbjorn Granlund <tege@swox.com>
7174 * mpn/sparc32/v8/udiv.asm: New file, from v8/supersparc.
7176 * mpn/generic/set_str.c: Rename indigits_per_limb => chars_per_limb.
7177 Remove redundant chars_per_limb. Reverse 4 loops in basecase code for
7178 speed. Use MP_BASES_CHARS_PER_LIMB_10.
7180 2002-02-03 Kevin Ryde <kevin@swox.se>
7182 * acinclude.m4 (GMP_PROG_NM): Ensure -B or -p get used when doing a
7183 cross compile with the native nm, helps OSF for instance.
7184 (GMP_ASM_LSYM_PREFIX): Remove ".byte 0" for the benefit of irix 6,
7185 allow "N" from nm for OSF, allow for "t" for other systems, but prefer
7186 no mention of the symbol at all.
7188 * tune/tuneup.c (print_define_remark): New function.
7189 Turn some "#if"s into plain "if"s.
7191 * tune/tuneup.c, gmp-impl.h, tune/Makefile.am
7192 (GET_STR_BASECASE_THRESHOLD, GET_STR_PRECOMPUTE_THRESHOLD): Tune these.
7193 * mpn/generic/get_str.c [TUNE_PROGRAM_BUILD]: Cope with non-constant
7194 GET_STR_PRECOMPUTE_THRESHOLD.
7196 2002-02-02 Torbjorn Granlund <tege@swox.com>
7198 * mpn/generic/get_str.c (mpn_get_str): Fix typo in a declaration.
7200 2002-02-02 Kevin Ryde <kevin@swox.se>
7202 * mpn/generic/set_str.c: Use MP_PTR_SWAP and POW2_P, add __GMP_PROTO
7203 to convert_blocks prototype, disable SET_STR_BLOCK_SIZE sanity check.
7205 * tune/set_strb.c, tune/set_strs.c: New files.
7206 * tune/speed.h, tune/speed.c, tune/common.c,tune/Makefile.am: Add them.
7207 * tune/tuneup.c: Tune SET_STR_THRESHOLD.
7208 (DEFAULT_MAX_SIZE): Renamed from MAX_SIZE, allow any param.max_size[].
7210 2002-02-01 Torbjorn Granlund <tege@swox.com>
7212 * tests/mpz/convert.c: Increase operand size. Add (yet disabled) code
7213 for testing with random strings.
7215 * mpn/generic/get_str.c (mpn_get_str): Rewrite to become sub-quadratic.
7216 (mpn_dc_get_str, mpn_sb_get_str): New functions.
7218 2002-01-31 Kevin Ryde <kevin@swox.se>
7220 * gmpxx.h (cmp): Renamed from "compare".
7222 * configure.in (AC_C_BIGENDIAN): Don't abort when cross compiling.
7223 (PROLOGUE): Allow new style optional second parameter when grepping.
7225 * acinclude.m4 (GMP_HPC_HPPA_2_0, GMP_ASM_UNDERSCORE,
7226 GMP_ASM_ALIGN_LOG, GMP_ASM_LSYM_PREFIX, GMP_ASM_W32, GMP_ASM_X86_MMX):
7227 Use $ac_objext for object filenames.
7228 (GMP_ASM_UNDERSCORE): Use CCAS to assemble.
7230 * demos/pexpr-config-h.in: New file.
7231 * configure.in: Generate demos/pexpr-config.h.
7232 (AC_CHECK_FUNCS): Add clock, cputime, setrlimit, sigaction,
7233 sigaltstack, sigstack.
7234 * acinclude.m4 (GMP_SUBST_CHECK_FUNCS, GMP_SUBST_CHECK_HEADERS): New
7236 * demos/pexpr.c: Use pexpr-config.h, not various #ifdefs.
7237 (setup_error_handler): Use signal if sigaction not available, allow
7238 for SIGBUS missing on mingw.
7239 (main): Use time() for random seed if gettimeofday not available.
7240 (cleanup_and_exit): Move SIGFPE out of LIMIT_RESOURCE_USAGE.
7242 2002-01-30 Torbjorn Granlund <tege@swox.com>
7244 * mpn/generic/set_str.c: Rewrite to become sub-quadratic.
7245 (convert_blocks): New function.
7247 2002-01-30 Kevin Ryde <kevin@swox.se>
7249 * gmp-impl.h (GMP_NUMB_MASK, GMP_NAIL_MASK, GMP_NUMB_HIGHBIT,
7250 ASSERT_MPN, ASSERT_MP_LIMB_T): New macros.
7252 * mpn/generic/fib2_ui.c: Use GMP_NUMB_BITS, simplify the data
7253 generator program, share __gmp_fib_table initializers between bit
7254 sizes, cope with bit sizes other than those specifically setup.
7255 * gmp-impl.h (FIB_TABLE_LIMIT, FIB_TABLE_LUCNUM_LIMIT): Corresponding
7256 rearrangement of conditionals.
7257 * tests/mpz/t-fib_ui.c (check_fib_table): New test.
7259 2002-01-28 Kevin Ryde <kevin@swox.se>
7261 * mpz/set_si.c, mpz/iset_si.c: Store to _mp_d[0] unconditionally, use
7262 an expression for _mp_size.
7264 * mpz/init.c, mpz/init2.c, mpz/iset.c, mpq/init.c [__CHECKER__]: Store
7265 dummy values to low limbs to stop them appearing uninitialized.
7267 2002-01-26 Kevin Ryde <kevin@swox.se>
7269 * mpfr/mpfr-test.h (MAX, MIN, ABS): Use instead a patch from Paul and
7272 2002-01-24 Kevin Ryde <kevin@swox.se>
7274 * configure.in: Extra quoting to get argument help messages right.
7276 * gmp.texi (Efficiency): Suggest hex or octal for input and output.
7277 (Formatted Output Strings): Mention "*" for width and precision.
7279 * mpn/generic/sizeinbase.c: New file, adapted from mpz/sizeinbase.c.
7280 Use POW2_P, use __mp_bases[base].big_base for log2(base).
7281 * configure.in, mpn/Makefile.am: Add it.
7282 * gmp-impl.h: Add prototype.
7283 * mpz/sizeinbase.c, tune/speed.h, mpn/generic/get_str.c,
7284 mpz/get_str.c, mpbsd/mout.c, mpbsd/mtox.c: Use it.
7285 * mpz/get_str.c: Write directly to user buffer, skip at most one
7286 leading zero, eliminate special case for x==0.
7287 * mpbsd/mtox.c: Allocate exact result space at the start, eliminate
7288 special case for x==0.
7289 * mpbsd/mout.c: Only need to skip one high zero with mpn_sizeinbase.
7291 * configure.in (--enable-nails): New option.
7292 (GMP_NAIL_BITS, GMP_LIMB_BITS, GMP_NUMB_BITS): New defines for gmp.h
7294 * gmp-h.in: Add templates.
7296 * mpfr/mpfr-test.h (MAX, MIN, ABS): Use #ifndef to avoid a redefine
7299 2002-01-23 Torbjorn Granlund <tege@swox.com>
7301 * mpn/generic/get_str.c: Correct type of `out_len'.
7303 2002-01-22 Kevin Ryde <kevin@swox.se>
7305 * mpn/generic/pre_divrem_1.c: Corrections to some ASSERTs.
7307 * mpfr/mul_ui.c: Don't call mpn_lshift with 0 shift.
7309 * mpfr/mpz_set_fr.c: Produce correct mpz_t for f==0.
7311 2002-01-21 Torbjorn Granlund <tege@swox.com>
7313 * longlong.h (32-bit powerpc add_ssaaaa): Remove spurious commutative
7315 (64-bit powerpc add_ssaaaa): Likewise.
7317 2002-01-20 Kevin Ryde <kevin@swox.se>
7319 * acinclude.m4 (GMP_FUNC_VSNPRINTF): Use %n to better detect sparc
7320 solaris 2.7 problems.
7322 2002-01-19 Torbjorn Granlund <tege@swox.com>
7324 * demos/pexpr.c (mpz_eval_expr): Optimize s^rhs for -1 <= s <= 1.
7325 (cleanup_and_exit): Improve error message wording.
7327 2002-01-19 Kevin Ryde <kevin@swox.se>
7329 * mpfr/mpfr.h (_PROTO): Use __GMP_PROTO, for compatibility with
7332 2002-01-17 Torbjorn Granlund <tege@swox.com>
7334 * mpfr/mpfr-test.h: Test "__hpux", not "hpux". Mask off mrand48
7335 return value to 31 bits to work around sloppy mpfr #include practices.
7337 * mpfr/tests/*.c: Use #include "", not <>, for gmp.h and mpfr.h.
7338 Make sure to #include mpfr-test.h from all files that use random().
7340 2002-01-17 Kevin Ryde <kevin@swox.se>
7342 * gmp-impl.h (__GMP_REALLOCATE_FUNC_MAYBE_TYPE): New macro.
7343 * gmp-impl.h, mpz/get_str.c, mpz/out_raw.c, mpq/get_str.c,
7344 mpq/set_str.c, mpf/get_str.c, printf/asprntffuns.c, printf/doprnt.c,
7345 printf/repl-vsnprintf.c, printf/snprntffuns.c, scanf/doscan.c,
7346 mpbsd/mtox.c: Some fixes to compile as C++.
7348 * mpn/generic/jacbase.c (JACOBI_BASE_METHOD): New tuned parameter,
7349 replacing COUNT_TRAILING_ZEROS_TIME test. Add a third method too.
7350 * tune/speed.c, tune/speed.h, tune/common.c, tune/Makefile.am: Add
7351 measuring of mpn_jacobi_base methods.
7352 * tune/jacbase1.c, tune/jacbase2.c, tune/jacbase3.c: New files.
7353 * tune/tuneup.c (JACOBI_BASE_METHOD): Tune this.
7354 * mpn/x86/*/gmp-mparam.h (COUNT_TRAILING_ZEROS_TIME): Remove macro.
7356 * gmp-h.in: Use __gmp prefix on variables in inlines.
7358 * gmp-impl.h (MPN_COPY_INCR, MPN_COPY_DECR): Remove __i, unused.
7360 * mpn/generic/mul_fft.c: Use HAVE_NATIVE_mpn_addsub_n, not ADDSUB.
7361 Use CNST_LIMB for some constants.
7363 2002-01-15 Kevin Ryde <kevin@swox.se>
7365 * tests/mpbsd/Makefile.am: Add a convenience rule for ../libtests.la.
7367 * printf/Makefile.am: libdummy.la should be in EXTRA_LTLIBRARIES.
7369 * mpf/out_str.c: Use MPF_SIGNIFICANT_DIGITS, so mpf_out_str and
7370 mpf_get_str give the same for ndigits==0.
7372 * mpfr/exceptions.c (mpfr_set_emin, mpfr_set_emax): Work around a
7373 powerpc64 gcc 3.0 -O2 bug.
7375 * tests/memory.c, tests/tests.h (tests_memory_validate): New function.
7377 2002-01-14 Kevin Ryde <kevin@swox.se>
7379 * mpn/generic/sb_divrem_mn.c, mpn/generic/divrem_1.c,
7380 mpn/generic/divrem_2.c, mpn/generic/mod_1.c: Don't use UMUL_TIME and
7381 UDIV_TIME, just default to preinv.
7382 * gmp-impl.h (USE_PREINV_DIVREM_1, USE_PREINV_MOD_1): Ditto.
7383 (DIVEXACT_1_THRESHOLD, MODEXACT_1_ODD_THRESHOLD): Don't use UMUL_TIME
7384 and UDIV_TIME, make default thresholds 0.
7385 (UDIV_NORM_PREINV_TIME, UDIV_UNNORM_PREINV_TIME): Remove macros.
7386 * mpn/x86/*/gmp-mparam.h (UMUL_TIME, UDIV_TIME,
7387 UDIV_NORM_PREINV_TIME): Remove macros.
7389 * gmp.texi (Headers and Libraries): New section, being the header
7390 notes from "GMP Basics" and some new stuff.
7391 (Parameter Conventions): Notes on "const" parameters.
7392 (Formatted Output Strings): Add type N, tweak some wording.
7394 * tests/refmpn.c (refmpn_divmod_1c): Avoid a bug in i386 gcc 3.0.
7396 2002-01-12 Kevin Ryde <kevin@swox.se>
7398 * mpz/root.c: Add <stdlib.h>, for abort().
7400 * mpfr/tests/Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
7401 * mpfr/mpfr.h, mpfr/mpfr-tests.h, reuse.c, tadd.c, tadd_ui.c, tagm.c,
7402 tatan.c, tcmp2.c, tcos.c, tdiv.c, tdiv_ui.c, teq.c, texp.c,
7403 tget_str.c, thyperbolic.c, tlog.c, tmul.c, tout_str.c, tpow.c,
7404 trandom.c, tset_z.c, tsin.c, tsqrt.c, tsqrt_ui.c, tsub_ui.c, ttan.c,
7405 tui_div.c: Fixes for K&R.
7407 * tests/misc/t-scanf.c (check_misc, check_misc):
7409 * tests/mpz/t-inp_str.c, tests/mpq/t-inp_str.c, tests/misc/t-scanf.c:
7410 Avoid strings in ASSERT, not enjoyed by K&R.
7411 * gmp-impl.h (ASSERT): Note this.
7413 * tests/tests.h (refmpn_mod_34lsub1): Add __GMP_PROTO.
7415 * mpbsd/Makefile.am: Avoid an automake problem with ansi2knr and
7416 sources in a different directory.
7418 * printf/repl-vsnprintf.c: Test HAVE_LONG_DOUBLE for long double.
7420 * mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add mod_34lsub1.c,
7421 mul_2.c, pre_divrem_1.c.
7423 * gmp-h.in, gmp-impl.h (mpn_add_nc, mpn_addmul_1c, mpn_addsub_n,
7424 mpn_addsub_nc, mpn_divrem_1c, mpn_dump, mpn_mod_1c, mpn_mul_1c,
7425 mpn_mul_basecase, mpn_sqr_n, mpn_sqr_basecase, mpn_sub_nc,
7426 mpn_submul_1c): Move to gmp-impl.h, since they're undocumented.
7428 * gmp-impl.h (mpn_reciprocal): Remove, unused.
7430 * tune/many.pl (cntlz, cnttz): Use new SPEED_ROUTINE_COUNT_ZEROS.
7432 2002-01-11 Kevin Ryde <kevin@swox.se>
7434 * mpn/hppa/*.asm, mpn/pa64/*.asm, mpn/pa64w/*.asm: Use L().
7436 2002-01-08 Kevin Ryde <kevin@swox.se>
7438 * mpn/asm-defs.m4 (PROLOGUE, EPILOGUE): New scheme, optional function
7439 name to EPILOGUE, check for missing or wrong function name EPILOGUE.
7440 * mpn/alpha/unicos.m4, mpn/alpha/default.m4, mpn/m68k/m68k-defs.m4,
7441 mpn/mips3/mips.m4, mpn/ia64/default.m4, mpn/powerpc32/aix.m4,
7442 mpn/powerpc64/aix.m4, mpn/x86/x86-defs.m4: Consequent updates, add a
7444 * mpn/alpha/unicos.m4, mpn/alpha/default.m4, mpn/alpha/cntlz.asm,
7445 mpn/alpha/invert_limb.asm (PROLOGUE_GP): Change to an optional "gp"
7446 parameter on plain PROLOGUE.
7448 * gmp.texi (Low-level Functions): mpn_get_str doesn't clobber an extra
7449 limb, and doesn't clobber at all for power of 2 bases.
7450 (Language Bindings): Add python gmpy.
7452 * mpz/get_str.c: Determine realloc size arithmetically.
7454 * mpbsd/mtox.c: Size memory block returned to actual space needed.
7455 * gmp.texi (BSD Compatible Functions): Describe this.
7457 * mpz/get_str.c: Don't copy mpn_get_str input for power of 2 bases.
7458 * mpbsd/mtox.c: Ditto, and as a side effect avoid a memory leak from a
7461 * mpz/get_str.c, mpbsd/mout.c: No longer need for +1 limb for
7462 mpn_get_str clobber.
7464 * gmp-impl.h (MPN_GET_STR_SIZE): New macro.
7465 * mpn/generic/get_str.c, mpz/get_str.c, mpbsd/mout.c, mpbsd/mtox.c,
7466 tune/speed.h: Use it.
7467 * tests/mpn/t-g_str_size.c: New test.
7468 * tests/mpn/Makefile.am: Add it.
7470 * gmp-impl.h (POW2_P): New macro.
7471 * mpn/generic/get_str.c, tests/misc.c: Use it.
7473 * printf/doprnt.c: Add "N" for mpn, share some code between N, Q and Z.
7474 * tests/misc/t-printf.c: Add tests.
7475 * gmp-impl.h (ASSERT_CODE): New macro.
7477 * tests/mpbsd/t-mtox.c: New test.
7478 * tests/mpbsd/Makefile.am: Add it.
7479 (allfuns_LDADD): Don't link against libgmp when testing everything in
7482 2002-01-07 Torbjorn Granlund <tege@swox.com>
7484 * gmp-impl.h (MPN_COPY_INCR, MPN_COPY_DECR): Rewrite generic versions.
7486 2002-01-06 Kevin Ryde <kevin@swox.se>
7488 * mpn/generic/pre_divrem_1.c: Don't support size==0.
7489 * tests/devel/try.c: Update.
7491 * mpn/generic/get_str.c: Add special case for base==10.
7492 * gmp-impl.h (MP_BASES_CHARS_PER_LIMB_10, MP_BASES_BIG_BASE_10,
7493 MP_BASES_BIG_BASE_INVERTED_10, MP_BASES_NORMALIZATION_STEPS_10): New
7495 * tests/t-constants.c: Add checks.
7496 * mpn/mp_bases.c [GENERATE_TABLE]: Print defines for gmp-impl.h, print
7497 all standard bits-per-limb by default.
7499 * demos/pexpr.c, demos/expr/expr.h, demos/expr/expr-impl.h: Use
7502 * gmp-h.in (mpn_divexact_by3c): Remove variables from prototype, to
7503 keep out of application namespace.
7505 2002-01-04 Torbjorn Granlund <tege@swox.com>
7507 * gmp-impl.h: Move _PROTO declaration to before its first usages.
7509 2002-01-04 Kevin Ryde <kevin@swox.se>
7511 * gmp-h.in, mp-h.in, tests/tests.h: Rename _PROTO to __GMP_PROTO, and
7512 don't use #ifndef just define it ourselves.
7513 * gmp-impl.h: Provide _PROTO as an alias for __GMP_PROTO, to avoid big
7514 edits internally, for the moment.
7516 2002-01-03 Torbjorn Granlund <tege@swox.com>
7518 * tune/speed.c (usage): Insert "\n\" into a string.
7520 2001-12-30 Torbjorn Granlund <tege@swox.com>
7522 * mpn/pa64/udiv_qrnnd.c: Remove file.
7523 * mpn/pa64w/udiv_qrnnd.c: Remove file.
7525 * gmp-impl.h (MPN_IORD_U): Change formatting (labels in pos 0, insns
7527 (MPN_INCR_U): Use "addl $1,foo; jc", not "incl foo; jz".
7529 * gmp-impl.h (udiv_qrnnd_preinv): Use plain subtract, not sub_ddmmss,
7532 2001-12-30 Kevin Ryde <kevin@swox.se>
7534 * mpn/generic/get_str.c (udiv_qrnd_unnorm): New macro.
7535 Use "do while" for dig_per_u loop since it's non-zero.
7536 * acconfig.h (HAVE_HOST_CPU_m68k etc): Add templates.
7538 * mpn/generic/mul_basecase.c, mpz/mul.c, mpz/n_pow_ui.c,
7539 mpn/x86/pentium/mul_2.asm, tests/devel/try.c, tests/tests.h,
7540 tests/refmpn.c, tune/speed.c, tune/speed.h, tune/common.c,
7541 tune/many.pl (mpn_mul_2): New parameter style.
7542 * gmp-impl.h (mpn_mul_2): Add prototype.
7543 * configure.in (gmp_mpn_functions_optional): Add mul_2.
7545 * longlong.h (__vxworks__): Remove from powerpc tests, not correct,
7546 not on its own at least.
7548 * tune/speed.c: Add "aas" to specify 0xAA..AA data.
7550 * tune/tuneup.c (print_define_end): Indicate "never" and "always".
7552 2001-12-29 Torbjorn Granlund <tege@swox.com>
7554 * mpq/set_d.c: ANSI-fy.
7555 * mpz/invert.c: Use PTR and SIZ (cosmetic change).
7557 * mpz/cong.c: Rename `xor' to `sign' to avoid C++ reserved word.
7559 2001-12-28 Torbjorn Granlund <tege@swox.com>
7561 * mpn/sparc64/sqr_diagonal.asm: New file.
7563 2001-12-28 Kevin Ryde <kevin@swox.se>
7565 * mpn/generic/get_str.c: Avoid one mpn_divrem_1 by running main loop
7566 only until msize==1.
7568 * tune/tuneup.c: Break up all() for clarity.
7569 (USE_PREINV_DIVREM_1, USE_PREINV_MOD_1): Compare against plain
7570 division udiv_qrnnd, not the tuned and possibly preinv version.
7572 * tune/freq.c: Split sysctl and sysctlbyname probes into separate
7573 functions, shorten some identifiers, put descriptions inside
7574 functions, define functions unconditionally and do nothing if
7575 requisites not available.
7577 * mpz/inp_raw.c: Avoid a gcc 3.0 powerpc64 bug on AIX.
7579 * acinclude.m4, configure.in (GMP_C_RESTRICT): New macro.
7581 * mpfr/sin.c: Patch from Paul to fix sign of sin(3pi/2).
7583 * demos/calc/calc.y: Improve some error messages.
7585 2001-12-28 Torbjorn Granlund <tege@swox.com>
7587 * mpn/sparc64/mul_1.asm: Rename r72 -> r80.
7588 * mpn/sparc64/addmul_1.asm: Likewise.
7590 2001-12-27 Torbjorn Granlund <tege@swox.com>
7592 * mpn/generic/tdiv_qr.c: Misc formatting cleanups.
7593 For switch case 2, replace `dn' with its value (2).
7595 2001-12-25 Torbjorn Granlund <tege@swox.com>
7597 * tests/devel/mul_1.c: Add FIXED_XLIMB.
7598 * tests/devel/addmul_1.c: Likewise.
7599 * tests/devel/submul_1.c: Likewise.
7601 * tests/devel/add_n.c: Improve error message.
7602 Accept command line argument for # of tests.
7603 * tests/devel/sub_n.c: Likewise.
7605 * tests/devel/: Remove CLOCK settings.
7607 * mpn/sparc32/v9/mul_1.asm: Rewrite.
7608 * mpn/sparc32/v9/addmul_1.asm: Rewrite.
7609 * mpn/sparc32/v9/submul_1.asm: Rewrite.
7611 2001-12-24 Torbjorn Granlund <tege@swox.com>
7613 * mpn/sparc64/mul_1.asm: Get rid of global constant 0.0 (L(noll)).
7614 * mpn/sparc64/addmul_1.asm: Likewise.
7616 2001-12-23 Torbjorn Granlund <tege@swox.com>
7618 * mpn/generic/get_str.c: Move final ASSERT to just before zero fill
7621 2001-12-22 Torbjorn Granlund <tege@swox.com>
7623 * mpn/generic/get_str.c: Move ASSERTs out of loops. Split digit
7624 generation code into two loops, saving a test of msize in the loop.
7626 2001-12-22 Kevin Ryde <kevin@swox.se>
7628 * mpn/x86/x86-defs.m4, mpn/x86/*/*.asm: Remove L / LF scheme putting
7629 function name in local labels.
7631 * mpn/generic/get_str.c: Use mpn_preinv_divrem_1, add a couple of
7634 * mpn/generic/pre_divrem_1.c: New file.
7635 * configure.in (gmp_mpn_functions): Add it.
7636 * gmp-impl.h (mpn_preinv_divrem_1): Add prototype.
7637 (USE_PREINV_DIVREM_1, MPN_DIVREM_OR_PREINV_DIVREM_1): New macros.
7638 * tests/devel/try.c, tune/speed.c, tune/speed.h, tune/common.c,
7639 tune/many.pl, tune/Makefile.am (mpn_preinv_divrem_1): Add testing and
7641 * tune/tuneup.c: Determine USE_PREINV_DIVREM_1.
7642 * tune/pre_divrem_1.c: New file.
7643 * tests/refmpn.c, tests/tests.h (refmpn_preinv_divrem_1): New function.
7645 * tests/mpz/t-io_raw.c: New file.
7646 * tests/mpz/Makefile.am (check_PROGRAMS): Add it.
7648 * mpz/inp_raw.c, mpz/out_raw.c: Rewrite.
7649 * acinclude.m4, configure.in (AC_C_BIGENDIAN): New test.
7650 * gmp-impl.h (BSWAP_LIMB): New macro.
7652 * acinclude.m4 (GMP_PROG_CC_WORKS): For a native compile, demand
7653 executables will run, per AC_PROG_CC. This detects ABI=64 is unusable
7654 in a native sparc solaris 7 build with the kernel in 32-bit mode.
7655 * gmp.texi (ABI and ISA): Add notes on this, add an example configure
7658 * tune/tuneup.c, configure.in: Print the gmp-mparam.h filename.
7659 * tune/tuneup.c: Print the CPU frequency.
7661 * tune/time.c, tune/speed.h: Add s390 "stck" method, flatten
7662 conditionals in speed_time_init a bit, use have_* variables to let
7663 some code go dead in speed_starttime and speed_endtime.
7665 * tune/freq.c (speed_cpu_frequency_irix_hinv): New function.
7667 * Makefile.am, configure.in: Restore mpfr.
7669 * configure.in: Add --with-readline, AC_PROG_YACC and AM_PROG_LEX.
7670 * demos/calc/calc.y, demos/calc/calclex.l: Add readline support, add
7672 * demos/calc/Makefile.am: Add calcread.c, calc-common.h, use $(YACC),
7673 $(LEX) and $(LEXLIB).
7674 * demos/calc/calcread.c, demos/calc/calc-common.h,
7675 demos/calc/calc-config-h.in, demos/calc/README: New files.
7677 * configure.in: Put demos/expr configs in expr-config.h.
7678 * demos/expr/expr-config-h.in: New file.
7679 * demos/expr/expr-impl.h: Renamed from expr-impl-h.in, get configs
7681 * demos/expr/Makefile.am: Update.
7683 * demos/expr/exprfr.c: Use mpfr_sin and mpfr_cos, remove some spurious
7686 2001-12-20 Torbjorn Granlund <tege@swox.com>
7688 * mpn/sparc64/mul_1.asm: Trim an instruction.
7689 * mpn/sparc64/addmul_1.asm: Likewise.
7691 * mpn/ia64/add_n.asm: Rewrite.
7692 * mpn/ia64/sub_n.asm: Rewrite.
7694 2001-12-19 Torbjorn Granlund <tege@swox.com>
7696 * mpn/ia64/mul_1.asm: Rewrite.
7697 * mpn/ia64/addmul_1.asm: Rewrite.
7698 * mpn/ia64/submul_1.c: Use TMP_ALLOC_LIMBS.
7700 * tests/devel/mul_1.c: Improve error message.
7701 Accept command line argument for # of tests.
7702 * tests/devel/addmul_1.c: Likewise.
7703 * tests/devel/submul_1.c: Likewise.
7705 2001-12-18 Torbjorn Granlund <tege@swox.com>
7707 * mpn/mips3/mul_1.asm: Add NOPs to save a cycle on R1x000.
7709 2001-12-18 Kevin Ryde <kevin@swox.se>
7711 * gmpxx.h (gmp_randclass): Don't allow copy constructors or "=",
7712 implementation by Gerardo.
7714 * gmp-h.in (operator<<, operator>>): Remove parameter names from
7715 prototypes, to keep out of user namespace.
7717 * acinclude.m4 (GMP_FUNC_VSNPRINTF): Let the test program work as C++.
7719 2001-12-16 Torbjorn Granlund <tege@swox.com>
7721 * mpn/sparc64/mul_1.asm: Rewrite.
7722 * mpn/sparc64/addmul_1.asm: Rewrite.
7723 * mpn/sparc64/submul_1.asm: Rewrite.
7725 * mpn/sparc64/addmul1h.asm: Remove.
7726 * mpn/sparc64/submul1h.asm: Remove.
7727 * mpn/sparc64/mul1h.asm: Remove.
7729 2001-12-15 Kevin Ryde <kevin@swox.se>
7731 * gmp-h.in (mpn_add, mpn_add_1, mpn_cmp, mpn_sub, mpn_sub_1): Follow
7732 __GMP_INLINE_PROTOTYPES for whether to give prototype with inline.
7734 * configure.in (i686*-*-*, pentiumpro-*-*, pentium[23]-*-*,
7735 athlon-*-*, pentium4-*-*): Fall back on -march=pentium if
7736 -march=pentiumpro or higher is not good (eg. solaris cmov).
7738 2001-12-12 Torbjorn Granlund <tege@swox.com>
7740 * gmp-impl.h (MPN_ZERO): Rewrite generic version to be similar to
7743 2001-12-12 Kevin Ryde <kevin@swox.se>
7745 * acinclude.m4 (GMP_PROG_CC_WORKS): Detect cmov problems with gcc
7746 -march=pentiumpro on solaris 2.8.
7748 * tune/common.c, tune/speed.h: Allow for commas in count_leading_zeros
7749 and count_trailing_zeros macros.
7751 * demos/expr/Makefile.am: Distribute exprfr.c and exprfra.c.
7753 * tune/Makefile.am (speed_ext_SOURCES): Should be speed-ext.c.
7755 2001-12-10 Torbjorn Granlund <tege@swox.com>
7757 * mpn/s390/addmul_1.asm: New file.
7758 * mpn/s390/submul_1.asm: New file.
7759 * mpn/s390/mul_1.asm: New file.
7760 * mpn/s390/gmp-mparam.h: Update.
7762 2001-12-07 Kevin Ryde <kevin@swox.se>
7764 * gmp-h.in, mp-h.in, gmp-impl.h: __GMP_DECLSPEC at start of
7765 prototypes, for the benefit of Microsoft C.
7767 * gmp.texi (Introduction to GMP): Mention ABI and ISA section.
7768 (Known Build Problems): Recommend GNU sed on solaris 2.6.
7769 (Assigning Integers): Direct feedback to bug-gmp.
7770 (References): Typo Knuth vol 2 is from 1998.
7772 * gmpxx.h (gmp_randclass): Add initializers for gmp_randinit_default
7773 and gmp_randinit_lc_2exp_size.
7774 gmp.texi (C++ Interface Random Numbers): Describe them.
7776 * tests/misc/t-locale.c, tests/cxx/t-locale.cc: Ensure mpf_clear is
7777 done when the localconv override doesn't work. Reported by Mike
7780 * printf/doprnti.c: Don't showbase on a zero mpq denominator.
7781 * tests/misc/t-printf.c, tests/cxx/t-ostream.c: Add test cases.
7783 2001-12-04 Kevin Ryde <kevin@swox.se>
7785 * gmp.texi (Known Build Problems): Update to gmp_randinit_lc_2exp_size
7786 for the sparc solaris 2.7 problem.
7787 (Reentrancy): SCO ctype.h affects all text-based input functions.
7788 (Formatted Output Strings): Correction to the mpf example.
7789 (Single Limb Division): Correction, should be q-1 not q+1.
7790 (Extended GCD): Clarify why single-limb is inferior.
7791 (Raw Output Internals): Clarify size is twos complement, note limb
7792 order means _mp_d doesn't get directly read or written.
7793 (Contributors): Clarify mpz_jacobi.
7794 And a couple of formatting tweaks elsewhere.
7796 * tests/cxx/t-headers.cc: New file.
7797 * tests/cxx/Makefile.am: Add it.
7799 * gmpxx.h: Add <strstream>, needed by mpf_class::get_str2.
7801 * gmp-h.in (mpq_inp_str, mpn_hamdist): Add __GMP_DECLSPEC.
7803 2001-12-01 Torbjorn Granlund <tege@swox.com>
7805 * Version 4.0 released.
7807 * mpfr/README: Replace contents with explanation of why mpfr is gone.
7809 2001-12-01 Kevin Ryde <kevin@swox.se>
7811 * Makefile.am, configure.in: Temporarily remove mpfr, just leave a
7814 * mpn/Makefile.am (EXTRA_DIST): Add Makeasm.am.
7816 2001-11-30 Gerardo Ballabio <ballabio@sissa.it>
7818 * tests/cxx/t-constr.cc, tests/cxx/t-expr.cc: New files.
7819 * tests/cxx/Makefile.am (check_PROGRAMS): Add them.
7821 2001-11-30 Kevin Ryde <kevin@swox.se>
7823 * mpfr: Update to 2001-11-16. Patch TMP handling of agm.c and sqrt.c,
7824 use plain mpn_sqrtrem in sqrt.c, separate .c files for floor and ceil,
7825 disable an expression style assert in add1.c.
7827 * mpn/s370: Rename to s390.
7828 * configure.in (s3[6-9]0*-*-*): Update.
7829 * mpn/Makefile.am (TARG_DIST): Add s390.
7831 * mpz/fits_s.c, mpf/fits_s.c, mpf/fits_u.c: Remove files, unused since
7834 2001-11-29 Torbjorn Granlund <tege@swox.com>
7836 * gmp-h.in: Declare mpz_get_d_2exp and mpf_get_d_2exp.
7837 * Makefile.am: Add mpz/get_d_2exp$U.lo and mpf/get_d_2exp$U.lo.
7838 * mpf/Makefile.am: Add get_d_2exp.c.
7839 * mpz/Makefile.am: Add get_d_2exp.c.
7841 2001-11-29 Kevin Ryde <kevin@swox.se>
7843 * mpn/*/gmp-mparam.h: Update measured thresholds.
7844 * mpn/s370/gmp-mparam.h: New file.
7846 * mpz/millerrabin.c: Mark for internal use only, for now.
7847 * gmp.texi (Number Theoretic Functions): Remove documentation.
7849 2001-11-28 Torbjorn Granlund <tege@swox.com>
7851 * mpf/get_d_2exp.c: New file.
7852 * mpz/get_d_2exp.c: New file.
7854 * mpz/realloc2.c: Fix typo. Make more similar to mpz_realloc.
7855 * mpz/realloc.c: Use __GMP_REALLOCATE_FUNC_LIMBS.
7857 2001-11-27 Gerardo Ballabio <ballabio@sissa.it>
7859 * gmpxx.h, mpfrxx.h: Various updates and improvements.
7861 2001-11-27 Kevin Ryde <kevin@swox.se>
7863 * gmp.texi (Useful Macros and Constants): Add gmp_version, add @findex
7864 for mp_bits_per_limb.
7866 * demos/perl/GMP.pm, demos/perl/GMP.xs: Use new style gmp_randinit's.
7867 * demos/perl/test.pl: Update for this, and for mpz_perfect_power_p
7868 handling of 0 and 1.
7870 2001-11-26 Torbjorn Granlund <tege@swox.com>
7872 * mpz/realloc.c: Clear variable when decreasing allocation to less than
7873 needed. Misc updates.
7875 2001-11-25 Kevin Ryde <kevin@swox.se>
7877 * tests/misc/t-locale.c: Avoid printf in the normal case, since the
7878 replacement localeconv breaks it on SunOS 4.
7880 * gmp.texi (Build Options, Notes for Package Builds): Note libgmpxx
7881 depends on libgmp from same GMP version.
7883 * acinclude.m4, configure.in (GMP_FUNC_SSCANF_WRITABLE_INPUT): New
7885 * scanf/sscanf.c, scanf/vsscanf.c: Use it to ensure sscanf input is
7886 writable, if necessary.
7888 * tests/misc/t-scanf.c: Ensure sscanf arguments are writable, always.
7889 * configure.in (AC_CHECK_DECLS): Remove sscanf, no longer required.
7891 * configure.in (none-*-*): Fix default CFLAGS setups.
7893 * doc/configuration: Misc updates.
7895 2001-11-23 Kevin Ryde <kevin@swox.se>
7897 * mpz/init2.c, mpz/realloc2.c: New files.
7898 * Makefile.am, mpz/Makefile.am: Add them.
7899 * gmp-h.in: Add prototypes.
7900 * gmp.texi (Efficiency): Mention these instead of _mpz_realloc.
7901 (Initializing Integers): Add documentation, reword other parts.
7903 2001-11-22 Torbjorn Granlund <tege@swox.com>
7905 * mpn/cray/ieee/addmul_1.c: Fix logic for more_carries scalar loop.
7906 * mpn/cray/ieee/submul_1.c: Likewise.
7908 2001-11-20 Kevin Ryde <kevin@swox.se>
7910 * gmp.texi (Known Build Problems): Note an out of memory on DJGPP.
7911 (Function Classes): Update function counts.
7912 Misc tweaks elsewhere.
7914 * configure.in (AC_CHECK_DECLS): Add sscanf.
7915 * tests/misc/t-scanf.c: Use it, for the benefit of SunOS 4.
7917 * tal-debug.c, gmp-impl.h: More checks of TMP_DECL/TMP_MARK/TMP_FREE
7920 * mpfr/Makefile.am (AR): Explicit AR=@AR@ to override automake
7921 default, necessary for powerpc64 ABI=aix64.
7923 2001-11-18 Torbjorn Granlund <tege@swox.com>
7925 * mpz/powm.c: Move TMP_MARK to before any TMP_ALLOCs.
7927 2001-11-18 Kevin Ryde <kevin@swox.se>
7929 * configure.in (--enable-fft): Make this the default.
7930 * gmp.texi (Build Options): Update.
7932 * Makefile.am (libmp_la_DEPENDENCIES): Revise mpz objects needed by
7935 * gmp.texi (Random State Initialization): Add gmp_randinit_default and
7936 gmp_randinit_lc_2exp_size, mark gmp_randinit as obsolete.
7937 (Random State Seeding): New section, taken from "Random State
7938 Initialization" and "Random Number Functions".
7940 * configure.in (AC_CHECK_DECLS): Add fgetc, fscanf, ungetc.
7941 * scanf/fscanffuns.c: Use these, for the benefit of SunOS 4.
7943 * gmp-impl.h, gmp-h.in (__gmp_default_fp_limb_precision): Move back to
7944 gmp-impl.h now not required for inlined mpf.
7946 * randlc2s.c (gmp_randinit_lc_2exp_size): New file, the size-based LC
7947 selection from rand.c.
7948 * rand.c (gmp_randinit): Use it.
7949 * randdef.c (gmp_randinit_default): New file.
7950 * gmp-impl.h (RANDS): Use it.
7951 (ASSERT_CARRY): New macro.
7952 * gmp-h.in (gmp_randinit_default, gmp_randinit_lc_2exp_size: Add
7954 * Makefile.am (libgmp_la_SOURCES): Add randdef.c and randlc2s.c.
7956 * printf/asprntffuns.c: Include config.h before using its defines.
7958 * gmp-impl.h: Move C++ <string> to top of file to avoid the memset
7959 redefine upsetting configure tests. Remove <iostream> since <iosfwd>
7962 2001-11-16 Kevin Ryde <kevin@swox.se>
7964 * gmp.texi (Integer Exponentiation): mpz_powm supports negative
7966 (Assigning Floats, I/O of Floats, C++ Formatted Output, C++ Formatted
7967 Input): Decimal point follows locale.
7968 (Formatted Output Strings): %n accepts any type.
7969 (Formatted Input Strings): New section.
7970 (Formatted Input Functions): New section.
7971 (C++ Class Interface): Corrections and clarifications suggested by
7974 * scanf/doscan.c, scanf/fscanf.c, scanf/fscanffuns.c, scanf/scanf.c,
7975 scanf/sscanf.c, scanf/sscanffuns.c, scanf/vfscanf.c, scanf/vscanf.c,
7976 scanf/vsscanf.c, scanf/Makefile.am, tests/misc/t-scanf.c: New files.
7977 * gmp-h.in, gmp-impl.h, Makefile.am, configure.in: Consequent
7980 * tests/misc: New directory.
7981 * tests/misc/Makefile.am: New file.
7982 * tests/misc/t-locale.c: New file.
7983 * tests/misc/t-printf.c: Moved from tests/printf.
7984 * tests/printf: Remove directory.
7985 * configure.in, tests/Makefile.am: Update.
7987 * tests/cxx/t-locale.cc: New file.
7988 * tests/cxx/Makefile.am: Add it.
7990 * mpf/set_str.c, cxx/ismpf.cc: Use localeconv for the decimal point.
7992 * acinclude.m4 (GMP_ASM_X86_MCOUNT): Update to $lt_prog_compiler_pic
7993 for current libtool, recognise non-PIC style mcount in windows DLLs.
7995 * gmp-impl.h (__gmp_replacement_vsnprintf): Add prototype.
7997 * gmp-impl.h (__gmp_rands, __gmp_rands_initialized,
7998 modlimb_invert_table): Add __GMP_DECLSPEC for the benefit of test
7999 programs using them from a windows DLL.
8000 * longlong.h (__clz_tab): Ditto.
8002 * mpn/x86/t-zdisp2.pl: New file.
8004 * mpn/x86/pentium4/README: New file.
8006 2001-11-15 Torbjorn Granlund <tege@swox.com>
8008 * mpz/powm.c (HANDLE_NEGATIVE_EXPONENT): #define to 1.
8009 * tests/mpz/reuse.c (main): Use mpz_invert to avoid undefined mpz_powm
8012 2001-11-14 Torbjorn Granlund <tege@swox.com>
8014 * mpz/powm_ui.c: Rewrite along the lines of mpz/powm.c (except still no
8016 * mpz/powm.c: Adjust for negative b, after exponentiation done. Add
8017 (still disabled) code for handling negative exponents. Misc cleanups.
8019 2001-11-14 Kevin Ryde <kevin@swox.se>
8021 * mpf/out_str.c: Use localeconv for the decimal point.
8023 * tests/misc.c (tests_rand_end): Use time() if gettimeofday() not
8024 available (eg. on mingw).
8026 2001-11-11 Kevin Ryde <kevin@swox.se>
8028 * gmp-h.in: Remove parameter names from prototypes, to keep out of
8029 application namespace.
8031 2001-11-08 Kevin Ryde <kevin@swox.se>
8033 * acinclude.m4 (GMP_GCC_VERSION_GE): Fix sed regexps to work on
8036 * printf/doprnt.c: Support %n of all types, per glibc.
8038 * gmp-h.in, gmp-impl.h, mpf/abs.c, mpf/neg.c, mpf/get_prc.c,
8039 mpf/get_dfl_prec.c, mpf/set_dfl_prec.c, mpf/set_prc_raw.c,
8040 mpf/set_si.c, mpf/set_ui.c, mpf/size.c: Revert mpf inlining, in order
8041 to leave open the possibility of keeping binary compatibility if mpf
8044 * mpn/x86/k7/mmx/lshift.asm, mpn/x86/k7/mmx/rshift.asm: Use Zdisp to
8045 force code size for computed jumps.
8046 * mpn/x86/k6/mod_34lsub1.asm, mpn/x86/k6/k62mmx/copyd.asm: Use Zdisp
8047 to force good code alignment.
8048 * mpn/x86/x86-defs.m4 (Zdisp): More instructions.
8050 * mpn/x86/pentium/sqr_basecase.asm, mpn/x86/k7/mmx/mod_1.asm,
8051 mpn/x86/k7/mmx/popham.asm: Remove some unnecessary "0" address offsets.
8053 * mpq/set_si.c, mpq/set_ui.c: Set _mp_den._mp_size correctly if den==0.
8055 2001-11-07 Torbjorn Granlund <tege@swox.com>
8057 * mpn/hppa/hppa1_1/udiv_qrnnd.asm: Work around gas bug.
8059 * mpn/asm-defs.m4 (PROLOGUE): Change alignment to 8 (probably a good
8060 idea in general; required for hppa/hppa1_1/udiv_qrnnd.asm).
8062 2001-11-06 Torbjorn Granlund <tege@swox.com>
8064 * gmp-impl.h (MPN_COPY_INCR): Prepend local variable by `__'.
8065 (MPN_COPY_DECR): Likewise.
8067 2001-11-05 Torbjorn Granlund <tege@swox.com>
8069 * mpz/powm.c: Call mpn functions, not mpz functions, for computation
8070 mod m. Streamline allocations to use a mixture of stack allocation and
8071 heap allocation. Add currently disabled phi(m) exponent reduction
8072 code. Misc optimizations and cleanups.
8074 2001-11-05 Kevin Ryde <kevin@swox.se>
8076 * mpq/inp_str.c: Remove unused variable "ret".
8078 * mpn/x86/k7/sqr_basecase.asm: Fix a 0(%edi) to use Zdisp, so the
8079 computed jumps hit the right spot on old gas.
8081 * mpq/canonicalize.c: DIVIDE_BY_ZERO if denominator is zero.
8083 * mpn/lisp/gmpasm-mode.el (comment-start-skip): Correction to the way
8084 the first \( \) pair is setup.
8085 (gmpasm-font-lock-keywords): Don't fontify the space before a "#" etc.
8086 Misc tweaks to some comments.
8088 2001-11-03 Torbjorn Granlund <tege@swox.com>
8090 * tests/refmpn.c (refmpn_overlap_p): Reverse return values.
8092 2001-11-02 Kevin Ryde <kevin@swox.se>
8094 * tune/many.pl: Setup CFLAGS_PIC and ASMFLAGS_PIC, since that's no
8095 longer done by configure.
8097 * mpn/x86/pentium4/mmx/popham.asm: New file.
8099 * mpn/x86/x86-defs.m4 (psadbw): New macro.
8100 * mpn/x86/k7/mmx/popham.asm: Use it.
8102 * tests/refmpn.c (refmpn_overlap_p): New function, independent of
8105 2001-10-31 Torbjorn Granlund <tege@swox.com>
8107 * tests/mpz/t-powm.c: Print proper error message when finding
8110 2001-10-31 Kevin Ryde <kevin@swox.se>
8112 * mpn/x86/pentium/mod_34lsub1.asm: New file.
8113 * mpn/x86/k7/mod_34lsub1.asm: New file.
8114 * mpn/x86/mod_34lsub1.asm: New file.
8116 2001-10-30 Kevin Ryde <kevin@swox.se>
8118 * tests/printf/t-printf.c (check_misc): Add checks from the glibc docs.
8119 (check_vasprintf, check_vsnprintf): Run these unconditionally.
8121 * gmp-impl.h (ASSERT_MPQ_CANONICAL): New macro.
8122 * mpq/cmp.c, mpq/cmp_si.c, mpq/cmp_ui.c, mpq/equal.c: Add ASSERTs for
8123 canonical inputs, where correctness depends on it.
8125 * mpn/lisp/gmpasm-mode.el (comment-start-skip): Add "dnl".
8127 2001-10-27 Torbjorn Granlund <tege@swox.com>
8129 * demos/pexpr.c: Remove some unused variables.
8130 (main): Allocate more buffer space to accommodate minus sign.
8132 2001-10-27 Kevin Ryde <kevin@swox.se>
8134 * gmp-impl.h, mpn/asm-defs.m4, configure.in, tune/speed.h,
8135 tune/speed.c, tune/common.c, tune/many.pl, tests/devel/try.c: Add
8137 * tests/refmpn.c, tests/tests.h (refmpn_mod_34lsub1): New function.
8139 * mpn/generic/mod_34lsub1.c: New file.
8140 * mpn/x86/k6/mod_34lsub1.asm: New file.
8141 * mpn/x86/pentium4/sse2/mod_34lsub1.asm: New file.
8142 * mpn/x86/x86-defs.m4 (Zdisp): Add another instruction.
8144 * gmp-h.in, gmpxx.h: Use <iosfwd> not whole <iostream>.
8146 * gmp.texi (Known Build Problems): Add note on test programs with
8149 2001-10-26 Kevin Ryde <kevin@swox.se>
8151 * tests/mpq/t-get_d.c: Limit the size of "eps" for vax.
8153 * gmp.texi (maybepagebreak): New macro, use it in a few places.
8154 (Notes for Particular Systems): C++ Windows DLLs are not supported.
8155 (Known Build Problems): Note sparc solaris 2.7 gcc 2.95.2 shared
8157 (Autoconf): Tweak version numbers shown.
8158 (Integer Roots): mpz_perfect_square_p and mpz_perfect_power_p consider
8159 0 and 1 perfect powers, mpz_perfect_power_p accepts negatives.
8160 (Number Theoretic Functions): Add mpz_millerrabin, combined with a
8161 reworded mpz_probab_prime_p.
8162 (Formatted Output Strings): Misc clarifications.
8163 (Formatted Output Functions): gmp_asprintf, gmp_vasprintf,
8164 gmp_snprintf, gmp_vsnprintf always available.
8165 (C++ Formatted Output): Misc rewordings.
8166 (Formatted Input): New chapter.
8167 (C++ Class Interface): New chapter, by Gerardo and me.
8168 (Language Bindings): Update GMP++ now in GMP.
8169 (C++ Interface Internals): New section, by Gerardo and me.
8171 * printf/repl-vsnprintf.c: New file.
8172 * configure.in, acinclude.m4, Makefile.am, printf/Makefile.am: Use it
8173 if libc vsnprintf missing or bad.
8174 * configure.in (AC_CHECK_FUNCS): Add strnlen.
8176 * printf/snprntffuns.c, printf/vasprintf.c: Use
8177 __gmp_replacement_vsnprintf if libc vsnprintf not available.
8178 * printf/asprintf.c, printf/snprintf.c, printf/vasprintf.c,
8179 printf/vsnprintf.c: Provide these functions unconditionally.
8180 * acinclude.m4 (GMP_FUNC_VSNPRINTF): Remove warning about omissions
8181 when vsnprintf not available.
8183 2001-10-24 Kevin Ryde <kevin@swox.se>
8185 * configure, aclocal.m4: Regenerate with a libtool patch for a stray
8186 quote in AC_LIBTOOL_PROG_LD_SHLIBS under mingw and cygwin.
8188 * gmp-impl.h (modlimb_invert): More comments.
8190 * printf/doprnt.c, printf/doprnti.c: Use the precision field to print
8192 * tests/printf/t-printf.c: Test this.
8193 * cxx/osdoprnti.cc, gmp-impl.h: Ignore precision in operator<<.
8195 * tune/speed.c, tune/speed.h, tune/common.c: Add mpn_mul_1_inplace.
8197 2001-10-23 Torbjorn Granlund <tege@swox.com>
8199 * mpz/pprime_p.c (mpz_millerrabin): Remove function and its descendant.
8201 * mpz/millerrabin.c: New file with code from pprime.c.
8202 * mpz/Makefile.am: Compile millerrabin.c.
8203 * Makefile.am (MPZ_OBJECTS): Ditto.
8204 * gmp-h.in: Declare mpz_millerrabin.
8206 2001-10-22 Torbjorn Granlund <tege@swox.com>
8208 * tests/mpz/t-perfsqr.c: New file.
8209 * tests/mpz/Makefile.am (check_PROGRAMS): Add it.
8211 * demos/factorize.c (factor): Check for number to factor == 0.
8212 (main): When invoked without arguments, read from stdin.
8214 * mpz/perfpow.c: Add code to handle negative perfect powers ((-b)^odd).
8215 Treat 0 and 1 as perfect powers.
8217 * mpn/sparc32/v9/sqr_diagonal.asm: Jump past .align.
8219 2001-10-21 Torbjorn Granlund <tege@swox.com>
8221 * mpn/generic/perfsqr.c (sq_res_0x100): Remove bogus final `,'.
8222 (mpn_perfect_square_p): Suppress superfluous `&1' in sq_res_0x100 test.
8223 (mpn_perfect_square_p, O(n) test): Improve comments. Combine remainder
8224 tests for some small primes. Don't share code for different limb
8225 sizes. Use single `if' with many `||' for better code density.
8227 2001-10-22 Kevin Ryde <kevin@swox.se>
8229 * demos/perl/GMP.xs (mutate_mpz, tmp_mpf_grow): Make these "static".
8231 * mpn/x86/pentium/popcount.asm, mpn/x86/pentium/hamdist.asm
8232 (mpn_popcount_table): Use GSYM_PREFIX.
8234 2001-10-19 Kevin Ryde <kevin@swox.se>
8236 * mpn/x86/*.asm: Add some measured speeds on various x86s.
8238 * tests/mpz/reuse.c, tests/mpf/reuse.c: Disable tests when using a
8239 windows DLL, because certain global variable usages won't compile.
8241 * configure.in (AC_CHECK_FUNCS): Add alarm.
8242 * tests/spinner.c: Conditionalize alarm and SIGALRM availability, for
8243 the benefit of mingw32.
8245 * acinclude.m4 (GMP_ASM_TYPE, GMP_ASM_SIZE): Suppress .type and .size
8248 * acinclude.m4 (GMP_PROG_HOST_CC): New macro.
8249 * configure.in: Use it for windows DLL cross-compiles.
8250 * aclocal.m4, configure: Regenerate with libtool patch to hold HOST_CC
8251 in the generated libtool script.
8253 * aclocal.m4, configure: Regenerate with libtool patch to suppress
8254 warnings when probing command line limit on FreeBSD.
8256 * demos/qcn.c (M_PI): Define if not already provided, helps mingw32.
8258 2001-10-17 Kevin Ryde <kevin@swox.se>
8260 * printf/doprnt.c: Use <stdint.h> for intmax_t.
8262 * longlong.h: Recognise __sparcv8 for gcc on Solaris. Reported by
8263 Mark Mentovai <mark@mentovai.com>.
8265 * gmp-impl.h (gmp_allocated_string): No need for inline on member funs.
8267 2001-10-16 Kevin Ryde <kevin@swox.se>
8269 * gmp.texi (Debugging): Add mpatrol.
8270 (Integer Comparisons, Comparing Rationals, Float Comparison): Index
8271 entries for sign tests.
8272 (I/O of Floats): Clarify mpf_out_str exponent is in decimal.
8273 (C++ Formatted Output): mpf_t operator<< exponent now in decimal.
8274 (FFT Multiplication): Use an ascii art sigma.
8275 (Contributors): Add Gerardo Ballabio.
8277 * cxx/osfuns.cc (__gmp_doprnt_params_from_ios): Always give mpf_t
8278 exponent in decimal, irrespective of ios::hex or ios::oct.
8279 * tests/cxx/t-ostream.cc (check_mpf): Update.
8281 * printf/doprnt.c: Support %lln and %hhn.
8283 * mpn/x86/pentium4/sse2/submul_1.asm: Use a psubq to negate the
8284 initial carry (helps the submul_1c case), and improve the comments.
8286 2001-10-11 Kevin Ryde <kevin@swox.se>
8288 * acinclude.m4, configure.in (GMP_IMPL_H_IEEE_FLOATS): New macro.
8290 * ltmain.sh: Send some rm errors to /dev/null, helps during compiles
8291 on Solaris 2.7 and HP-UX 10.
8293 * tal-notreent.c: Renamed from stack-alloc.c.
8294 * Makefile.am, acinclude.m4, gmp-impl.h: Update.
8296 * gmp-h.in: Don't give both prototypes and inlines, except on gcc.
8298 * gmp-h.in, gmp-impl.h: Use #includes to get necessary standard
8299 classes, add std:: to prototypes.
8300 * cxx/*.cc, tests/cxx/t-ostream.cc: Add "use namespace std".
8301 * acinclude.m4 (GMP_PROG_CXX_WORKS): Ditto.
8303 * tests/*/Makefile.in, mpfr/tests/Makefile.in: Regenerate with
8304 automake patch to avoid Ultrix problem with empty $(TESTS).
8306 * */Makefile.in: Regenerate with automake patch to only rm *_.c in
8307 "make clean" when ansi2knr actually in use, helps DOS 8.3.
8309 * Makefile.in: Regenerate with automake patch to fix stamp-h
8310 numbering, avoiding an unnecessary config.status run.
8312 2001-10-09 Torbjorn Granlund <tege@swox.com>
8314 * mpn/hppa/hppa1_1/udiv_qrnnd.asm: Use L macros for labels.
8315 Quote L reloc operator.
8317 * gmp-impl.h: Declare class string.
8319 * mpn/asm-defs.m4 (INT32, INT64): Quote $1 to prevent further
8322 * mpn/alpha/ev6/mul_1.asm: New file.
8324 2001-10-09 Kevin Ryde <kevin@swox.se>
8326 * gmp.texi (Introduction to GMP): Add pentium 4 to optimized CPUs.
8327 (Build Options): Note macos directory.
8328 (Notes for Package Builds): GMP 4 series binary compatible with 3.
8329 (Known Build Problems): Remove $* and ansi2knr note, now fixed, except
8330 possibly under --host=none.
8331 (Formatted Output Strings): Remove -1 prec for all digits.
8333 * mpz/add.c, mpz/sub.c: Don't use mpz path on #include (helps macos).
8334 * mpbsd/Makefile.am (INCLUDES): Add -I$(top_srcdir)/mpz.
8336 * printf/doprnt.c, tests/printf/t-printf.c: Remove support for %.*Fe
8337 prec -1 meaning all digits.
8339 * acinclude.m4 (GMP_PROG_AR): Override libtool, use AR_FLAGS="cq".
8340 (GMP_HPC_HPPA_2_0): Print version string to config.log.
8342 * Makefile.am (AUTOMAKE_OPTIONS): Remove check-news (permission notice
8343 in NEWS file is too big).
8344 (dist-hook): Don't distribute numbered or unnumbered emacs backups.
8346 * Makefile.am, cxx/Makefile.am: Updates for Gerardo's stuff.
8348 2001-10-09 Gerardo Ballabio <ballabio@sissa.it>
8350 * cxx/isfuns.cc: New file.
8351 * gmp-impl.h: Add prototypes.
8352 * cxx/ismpf.cc, cxx/ismpq.cc, cxx/ismpz.cc: New files.
8353 * gmp-h.in: Add prototypes.
8354 * gmpxx.h, mpfrxx.h: New files.
8356 2001-10-08 Kevin Ryde <kevin@swox.se>
8358 * configure.in (with_tags): Establish a default based on --enable-cxx.
8360 * aclocal.m4: Regenerate with libtool patches for sed char range to
8361 help Cray, LTCC quotes and +Z warnings grep to help HP-UX.
8363 * gmp-impl.h (doprnt_format_t, doprnt_memory_t, doprnt_reps_t,
8364 doprnt_final_t): Use _PROTO.
8366 2001-10-05 Torbjorn Granlund <tege@swox.com>
8368 * mpn/asm-defs.m4 (INT32, INT64): Use LABEL_SUFFIX.
8370 * mpn/hppa: Convert files to `.asm'.
8372 2001-10-05 Kevin Ryde <kevin@swox.se>
8374 * mpn/Makeasm.am (.S files): Revert to separate CPP and CCAS, use
8375 cpp-ccas, and only pass CPPFLAGS to CPP, not whole CFLAGS.
8376 * mpn/cpp-ccas: New file.
8377 * mpn/Makefile.am (EXTRA_DIST): Add it.
8379 * tune/common.c, tune/speed.h: Change SPEED_ROUTINE_MPN_COPY_CALL uses
8380 to SPEED_ROUTINE_MPN_COPY or new SPEED_ROUTINE_MPN_COPY_BYTES. Avoids
8381 macro expansion problems on Cray.
8383 * configure.in (AC_PROG_CXXCPP): Add this, to make libtool happier.
8385 2001-10-04 Torbjorn Granlund <tege@swox.com>
8387 * mpz/rrandomb.c (gmp_rrandomb): Change bit_pos to be 0-based (was
8388 1-based); shift 2 (was 1) when making bit mask. These two changes
8389 avoid undefined shift counts.
8390 (gmp_rrandomb): Avoid most calls to _gmp_rand by caching random values.
8392 * mpn/generic/random2.c: Changes for mirroring mpz/rrandomb.c.
8394 2001-10-04 Kevin Ryde <kevin@swox.se>
8396 * gmp.texi (Build Options): Add --enable-cxx.
8397 (Notes for Particular Systems): Mention pentium4 performance and SSE2.
8398 (Known Build Problems): Remove vax jsobgtr note, no longer needed.
8399 (Converting Floats): Tweak mpf_get_str description.
8400 (Low-level Functions): Correction to mpn_gcdext destination space
8402 (C++ Formatted Output): New section.
8403 (Language Bindings): Add ALP
8404 (Contributors): Add Paul Zimmermann's square root, update my things.
8406 * acinclude.m4 (GMP_PROG_CC_IS_GNU, GMP_PROG_CXX_WORKS): Send compiler
8407 errors to config.log.
8409 * mpq/Makefile.am (INCLUDES): Remove -DOPERATION_$*, not needed.
8411 * mpn/x86/*.asm: Change references to old README.family to just README.
8413 * mpz/README: Remove file, now adequately covered in the manual.
8415 2001-10-03 Torbjorn Granlund <tege@swox.com>
8417 * mpn/x86/pentium4/copyi.asm: New file.
8418 * mpn/x86/pentium4/copyd.asm: New file.
8420 * gmp-impl.h: Implement separate MPN_COPY_INCR and MPN_COPY_DECR
8421 macros for CRAY systems.
8422 (CRAY _MPN_COPY): Delete.
8424 2001-10-02 Kevin Ryde <kevin@swox.se>
8426 * tests/mpz/t-popcount.c (check_data): Use "~ (unsigned long) 0" to
8427 avoid compiler warnings on sco.
8429 * mpbsd/Makefile.am: Compile mpz files directly, no copying.
8430 Use mpz/add.c and mpz/sub.c rather than mpz/aors.c.
8431 (INCLUDES): Remove -DOPERATION_$*, no longer needed (by mpz).
8433 * mpz/aors.h: Renamed from mpz/aors.c.
8434 * mpz/add.c, mpz/sub.c: New files, using mpz/aors.h.
8435 * mpz/aors_ui.h: Renamed from mpz/aors_ui.c.
8436 * mpz/add_ui.c, mpz/sub_ui.c: New files, using mpz/aors_ui.h.
8437 * mpz/fits_s.h: Renamed and adapted from mpz/fits_s.c.
8438 * mpz/fits_sshort.c, mpz/fits_sint.c, mpz/fits_slong.c: New files.
8439 * mpz/mul_i.h: Renamed from mpz/mul_siui.c.
8440 * mpz/mul_ui.c, mpz/mul_ui.c: New files, using mpz/mul_i.h.
8441 * mpz/Makefile.am: Consequent updates.
8442 (INCLUDES): Remove -DOPERATION_$*.
8444 * mpf/fits_s.h: Renamed and adapted from mpf/fits_s.c.
8445 * mpf/fits_sshort.c, mpf/fits_sint.c, mpf/fits_slong.c: New files.
8446 * mpf/fits_u.h: Renamed and adapted from mpf/fits_u.c.
8447 * mpf/fits_ushort.c, mpf/fits_uint.c, mpf/fits_ulong.c: New files.
8448 * mpf/Makefile.am: Consequent updates.
8449 (INCLUDES): Remove -DOPERATION_$*.
8451 * cxx/osfuns.cc (__gmp_doprnt_params_from_ios): Don't use ios::hex etc
8452 as cases in a switch, they're not constant in g++ 3.0.
8454 * mpn/Makeasm.am (.s.o, .s.obj, .S.o, .S.obj, .asm.o, .asm.obj):
8455 Locate source file with test -f the same as automake.
8456 (.S): Let CCAS do the preprocessing, and run libtool for .S.lo.
8457 (.asm.lo): Run libtool via m4-ccas to get new style foo.lo right.
8458 (COMPILE_FLAGS): Add $(DEFAULT_INCLUDES), per new automake.
8459 * mpn/m4-ccas: New file.
8460 * mpn/Makefile.am (EXTRA_DIST): Add it.
8461 * mpn/asm-defs.m4: Add m4_not_for_expansion(`DLL_EXPORT').
8462 * mpn/x86/x86-defs.m4: Undefine PIC if DLL_EXPORT is set.
8463 * configure.in (CFLAGS_PIC, ASMFLAGS_PIC): Remove, no longer needed.
8465 * acinclude.m4 (GMP_FUNC_VSNPRINTF): Warn what's omitted when
8466 vsnprintf not available.
8468 * mpn/underscore.h: Remove file, not used since m68k converted to asm.
8469 * mpn/Makefile.am (EXTRA_DIST): Remove it.
8471 * tests/refmpz.c: Add <stdlib.h>, for free().
8473 2001-10-01 Torbjorn Granlund <tege@swox.com>
8475 * mpn/x86/pentium4/sse2/submul_1.asm: Apply some algebraic
8477 * mpn/x86/pentium4/sse2/addmul_1.asm: Comment.
8479 2001-10-01 Kevin Ryde <kevin@swox.se>
8481 * configure.in (--enable-cxx): New option for C++ support.
8482 Add cxx and tests/cxx subdirectories.
8483 * ltmain.sh, aclocal.m4: Update to libtool 2001-09-30.
8485 * cxx/Makefile.am, cxx/Makefile.in, cxx/osdoprnti.cc, cxx/osfuns.cc,
8486 cxx/osmpf.cc, cxx/osmpq.cc, cxx/osmpz.cc: New files.
8487 * Makefile.am: Add them, in new libgmpxx.
8488 * gmp-h.in, gmp-impl.h: Prototypes and support.
8489 * tests/cxx/Makefile.am, tests/cxx/Makefile.in,
8490 tests/cxx/t-ostream.cc: New files.
8492 * tune/speed.h (SPEED_ROUTINE_MPN_GCD_CALL,
8493 SPEED_ROUTINE_MPN_GCDEXT_ONE): mpn_gcdext needs size+1 for
8494 destinations. Found by Torbjorn.
8496 * gmp-h.in (__GNU_MP__, __GNU_MP_VERSION): Bump to 4.0.
8497 * mp-h.in (__GNU_MP__): Ditto.
8498 * gmp.texi, Makefile.am, compat.c: Amend version 3.2 to 4.0.
8500 * acinclude.m4 (GMP_PROG_CXX_WORKS): New macro.
8501 (GMP_PROG_CC_WORKS): Write "conftest" test program, not a.out.
8503 * gmp-impl.h (struct gmp_asprintf_t): Moved from printf/vasprintf.c.
8504 (GMP_ASPRINTF_T_INIT): New macro.
8505 (GMP_ASPRINTF_T_NEED): New macro, adapted from vasprintf.c NEED().
8506 * printf/vasprintf.c: Use these.
8508 * printf/asprntffuns.c: New file.
8509 * printf/Makefile.am, Makefile.am: Add it.
8510 * printf/asprntffuns.c, printf/vasprintf.c, gmp-impl.h
8511 (__gmp_asprintf_memory, __gmp_asprintf_reps, __gmp_asprintf_final):
8512 Move to asprntffuns.c, rename to __gmp and make global, remove
8513 spurious formal parameters from __gmp_asprintf_final.
8515 * configure.in (j90-*-*, sv1-*-*): Don't duplicate $path in $add_path.
8516 (*-*-mingw*): Don't assemble with -DPIC (as per cygwin).
8518 * printf/snprntffuns.c (gmp_snprintf_final): Remove spurious formal
8521 * tune/tuneup.c (POWM_THRESHOLD): Reduce stop_factor to 1.1 to help
8522 Cray vector systems.
8524 * tests/misc.c (tests_rand_start): Print GMP_CHECK_RANDOMIZE=NN to
8525 facilitate cut and paste when re-running.
8526 * tests/mpz/t-inp_str.c (check_data): Add more diagnostic prints.
8528 2001-09-30 Kent Boortz <kent@swox.com>
8530 * macos/configure, macos/Makefile.in, macos/README: Updates for gmp 4.
8531 * gmp-h.in (_GMP_H_HAVE_FILE): Recognise Apple MPW.
8533 2001-09-30 Torbjorn Granlund <tege@swox.com>
8535 * mpn/cray/ieee/submul_1.c: Rewrite. Streamline multiplications;
8536 use `majority' logic.
8538 2001-09-27 Torbjorn Granlund <tege@swox.com>
8540 * gmp-h.in (__GMPN_AORS_1): Rewrite to work around Cray compiler bug.
8542 2001-09-26 Torbjorn Granlund <tege@swox.com>
8544 * mpn/x86/pentium4/sse2/gmp-mparam.h: New file.
8546 2001-09-26 Kevin Ryde <kevin@swox.se>
8548 * mpn/x86/pentium4/sse2/dive_1.asm: New file.
8549 * mpn/x86/pentium4/sse2/submul_1.asm: New file.
8550 * mpn/x86/pentium4/sse2/sqr_basecase.asm: New file.
8552 * mpn/x86/pentium/copyi.asm: New file, based on past work by Torbjorn.
8553 * mpn/x86/pentium/copyi.asm: New file, ditto.
8554 * mpn/x86/pentium/com_n.asm: Rewrite, ditto.
8556 * printf/snprntffuns.c (gmp_snprintf_format): Copy va_list in case
8557 vsnprintf trashes it.
8558 * printf/vasprintf.c (gmp_asprintf_format): Ditto.
8559 * gmp-impl.h, doprnt.c (va_copy): Move to gmp-impl.h.
8561 * tests/mpz/t-cmp_d.c (check_low_z_one): Patch by Torbjorn for vax
8562 limited float range.
8564 2001-09-23 Torbjorn Granlund <tege@swox.com>
8566 * mpn/vax/lshift.s: Change `jsob*' to `sob*'.
8567 * mpn/vax/rshift.s: Likewise.
8569 2001-09-23 Kevin Ryde <kevin@swox.se>
8571 * mpn/x86/pentium4/sse2/mul_basecase.asm: Some simple but real code.
8573 * printf/doprnt.c: Use va_copy for va_list variables, copy function
8574 parameter in case it's call-by-reference.
8576 * tune/freq.c (speed_cpu_frequency_bsd_dmesg): New function.
8577 (speed_cpu_frequency_table): Use it.
8579 * tune/many.pl (popcount, hamdist): Fix declared return value.
8580 (sb_divrem_mn): Remove a spurious duplicate entry.
8581 (CLEAN): Add tmp-$objbase.c when using that for .h files.
8582 (macro_speed): Give a default for .h files.
8583 Add ATTRIBUTE_CONST or __GMP_ATTRIBUTE_PURE as appropriate.
8585 * tune/speed.h (SPEED_ROUTINE_MPN_MOD_CALL,
8586 SPEED_ROUTINE_MPN_PREINV_MOD_1, SPEED_ROUTINE_MPN_POPCOUNT,
8587 SPEED_ROUTINE_MPN_HAMDIST, SPEED_ROUTINE_MPN_GCD_1N,
8588 SPEED_ROUTINE_MPN_GCD_1_CALL, SPEED_ROUTINE_MPZ_JACOBI): Use return
8589 values so gcc 3 won't discard calls to pure or const functions.
8590 (mpn_mod_1_div, mpn_mod_1_inv): Add __GMP_ATTRIBUTE_PURE.
8592 2001-09-22 Torbjorn Granlund <tege@swox.com>
8594 * mpn/x86/pentium4/sse2/mul_basecase.asm: New file, placeholder
8595 for real code, hiding the default x86 mul_basecase.asm.
8597 2001-09-22 Kevin Ryde <kevin@swox.se>
8599 * configure.in (AC_PREREQ): Bump to 2.52.
8600 (m4_pattern_forbid, m4_pattern_allow): New calls, forbid GMP_.
8601 (AC_CHECK_HEADERS): Remove sys/types.h, already done by autoconf.
8602 * acinclude.m4, configure.in (GMP_GCC_NO_CPP_PRECOMP): New macro.
8604 * tests/devel/try.c (TYPE_PREINV_MOD_1): Don't run size==0.
8605 (malloc_region): Need fd=-1 for mmap MAP_ANON on BSD.
8607 2001-09-20 Torbjorn Granlund <tege@swox.com>
8609 * mpz/cong.c (mpz_congruent_p): Fix one-limb c<d test.
8611 * longlong.h: Rewrite __i370__ smul_ppmm; enable also for __s390__.
8613 * configure.in: Add support for IBM 360, 370, 390 families.
8615 2001-09-20 Kevin Ryde <kevin@swox.se>
8617 * mpn/x86/pentium4/sse2/diveby3.asm: New file.
8618 * mpn/x86/pentium4/sse2/mode1o.asm: New file.
8620 2001-09-16 Kevin Ryde <kevin@swox.se>
8622 * printf/doprnt.c: '#' means showpoint and showtrailing for %e, %f, %g.
8623 * tests/printf/t-printf.c (check_f): More test cases.
8625 2001-09-15 Torbjorn Granlund <tege@swox.com>
8627 * gmp-h.in (__GMPN_AORS_1): Remove param TEST, add OP and CB.
8628 Postpone zeroing of (cout).
8629 (__GMPN_ADD_1, __GMPN_SUB_1): Corresponding changes.
8631 2001-09-14 Kevin Ryde <kevin@swox.se>
8633 * ChangeLog: Merge in tests/rand/ChangeLog.
8634 * tests/rand/ChangeLog: Remove file.
8636 * printf/doprnt.c: Fix handling of a plain format after a GMP one; no
8637 need to protect against negative precision internally.
8638 * tests/printf/t-printf.c (check_misc): More checks.
8640 2001-09-12 Torbjorn Granlund <tege@swox.com>
8642 * mpn/cray/ieee/invert_limb.c: Add a PROLOGUE in a comment to have
8643 HAVE_NATIVE_... defined.
8645 2001-09-11 Kevin Ryde <kevin@swox.se>
8647 * configure.in, gmp-h.in (__GMP_HAVE_HOST_CPU_FAMILY_power,
8648 __GMP_HAVE_HOST_CPU_FAMILY_powerpc): New AC_SUBSTs.
8649 * gmp-h.in (__GMPN_COPY_INCR): Use them to select the power/powerpc
8650 code, rather than preprocessor defines.
8652 * acinclude.m4, configure.in (GMP_H_ANSI): New macro.
8654 * gmp-h.in (__GMP_EXTERN_INLINE): Add a definition for SCO 8 cc.
8656 * gmp-h.in, version.c (gmp_version): Make the pointer "const" as well
8659 * acinclude.m4, configure.in (GMP_PROG_CC_IS_XLC): Recognise xlc when
8660 invoked under another name (cc, xlc128, etc).
8661 * acinclude.m4 (GMP_PROG_CC_IS_GCC): Print a message when recognised.
8663 2001-09-11 Torbjorn Granlund <tege@swox.com>
8665 * gmp-h.in: Let __DECC mean __GMP_HAVE_CONST, etc.
8666 * mp-h.in: Likewise.
8668 2001-09-10 Torbjorn Granlund <tege@swox.com>
8670 * mpn/x86/pentium4/mmx/lshift.asm: New file.
8671 * mpn/x86/pentium4/mmx/rshift.asm: New file.
8673 * tests/mpn/t-iord_u.c (check_incr_data): Work around HP compiler bug.
8674 (check_decr_data): Likewise.
8676 2001-09-08 Kevin Ryde <kevin@swox.se>
8678 * gmp.texi (Integer Logic and Bit Fiddling): Update mpz_hamdist
8679 behaviour, clarify mpz_popcount a touch.
8680 (Language Bindings): Add mlton, fix alphabetical order.
8681 (Single Limb Division): Describe 2 or 1/2 limbs at a time style.
8683 * configure.in (AC_CHECK_FUNCS): Add mmap.
8684 * tests/devel/try.c (malloc_region): Use mmap if available.
8686 * tests/refmpz.c, tests/tests.h (refmpz_hamdist): New function.
8687 * tests/mpz/t-hamdist.c: New file.
8688 * tests/mpz/Makefile.am: Add it.
8690 * mpz/hamdist.c: Support neg/neg operands.
8692 * macos/Makefile.in: Remove dual compile of mpq/aors.c and
8693 mpn/generic/popham.c.
8695 * gmp-impl.h (popc_limb): New macro, adapted from mpn/generic/popham.c.
8696 For 64-bits reuse 0x33...33 constant.
8697 * mpn/generic/popcount.c, mpn/generic/hamdist.c: Split from popham.c,
8698 use popc_limb macro, remove unused "i", don't bother with "register"
8700 * mpn/generic/popham.c: Remove file.
8702 * ltmain.sh, configure, aclocal.m4: Update to libtool 1.4.1, with one
8703 ltdll.c generation patch.
8704 * doc/configuration: Misc updates, note libtool patch used.
8706 * mpn/x86/pentium4/sse2/mul_1.asm: Use pointer increments not indexed
8707 addressing, to get 4.0 c/l flat.
8709 * tests/mpq/t-cmp_si.c (check_data): Use ULONG_MAX for denominators.
8711 * tests/misc.c (mpz_negrandom): Use given rstate, not RANDS.
8713 2001-09-07 Torbjorn Granlund <tege@swox.com>
8715 * mpn/x86/pentium4/sse2/addmul_1.asm: New file.
8717 2001-09-04 Kevin Ryde <kevin@swox.se>
8719 * tune/freq.c: Define a HAVE for each speed_cpu_frequency routine to
8720 avoid duplicating conditionals.
8721 (speed_cpu_frequency_sco_etchw): New function.
8722 (speed_cpu_frequency_table): Use it.
8723 * tune/README: Mention SCO openunix 8 /etc/hw.
8725 * mpz/fib_ui.c: Use ?: to avoid a gcc 3 bug on powerpc64.
8726 Store back a carry for limb<long.
8728 * mpn/x86/k7/mmx/divrem_1.asm, mpn/x86/k7/mmx/mod_1.asm,
8729 mpn/x86/p6/mmx/divrem_1.asm: Fix a couple of comments.
8731 * config.guess: Give m68020 for 68020 or better, not m68k.
8732 * configfsf.guess: Update to 2001-09-04.
8734 2001-09-02 Kevin Ryde <kevin@swox.se>
8736 * configure.in (m68k-*-*): Let m68k mean 68000, not 68020.
8737 * gmp.texi (Notes for Particular Systems): Update.
8739 * gmp-impl.h (union ieee_double_extract) [m68k]: Use longs, since int
8740 might be only 16 bits.
8742 * tests/mpq/t-aors.c: New file.
8743 * tests/mpq/Makefile.am: Add it.
8745 * tests/refmpq.c: New file.
8746 * tests/Makefile.am: Add it.
8747 * tests/tests.h: Add prototypes.
8749 * mpq/aors.c: Share object code for mpq_add and mpq_sub.
8750 * Makefile.am, mpq/Makefile.am: Single mpq/aors.lo now.
8752 * tests/devel/try.c (TYPE_SUBMUL_1): Use correct reference routine.
8754 2001-08-30 Kevin Ryde <kevin@swox.se>
8756 * mpn/x86/x86-defs.m4 (cmov_available_p): Add pentium4.
8758 * gmp-h.in: Put #define renamings with prototypes.
8759 Remove commented out #defines of gmp-impl.h things.
8760 (mpn_invert_limb): Remove #define, already in gmp-impl.h.
8761 (mpn_lshiftc, mpn_rshiftc): Remove #defines, unused.
8762 (mpn_addsub_nc): Add prototype to #define.
8764 2001-08-28 Kevin Ryde <kevin@swox.se>
8766 * gmp.texi: Switch to GFDL.
8767 (Top): Arrange copyright and conditions to appear here too. For
8768 clarity have all this before the miscellaneous macro definitions.
8769 (Copying): Refer to COPYING.LIB file, mention plain GPL2 in demo
8771 (Contributors, References): Use @appendix rather than @unnumbered.
8772 (GNU Free Documentation License): New appendix.
8773 (@contents): Move to start of document, use only for tex (not html).
8774 (Debugging): Add leakbug.
8775 (Build Options): Add pentium4.
8776 (I/O of Rationals): Add mpq_inp_str.
8778 * fdl.texi: New file, with two @appendix directive tweaks.
8779 * Makefile.am (gmp_TEXINFOS): Add it.
8781 * tests/mpz/io.c: Check mpz_inp_str return against ftell, send error
8782 messages just to stdout.
8784 * mpz/inp_str.c, gmp-impl.h (__gmpz_inp_str_nowhite): New function,
8785 and share a __gmp_free_func call.
8786 * mpq/inp_str.c: New file.
8787 * Makefile.am, mpq/Makefile.am: Add it.
8788 * tests/mpq/t-inp_str.c: New file.
8789 * tests/mpq/Makefile.am (check_PROGRAMS): Add it.
8791 * configure.in, acconfig.h (HAVE_HOST_CPU_FAMILY_power,
8792 HAVE_HOST_CPU_FAMILY_powerpc, HAVE_HOST_CPU_FAMILY_x86): AC_DEFINEs
8793 for processor families.
8794 * gmp-impl.h: Use them, rather than cpp defines.
8796 * demos/Makefile.am (primes_LDADD): Use $(LIBM), for log().
8798 * tune/many.pl, tune/Makefile.am: Fix some from clean and distclean.
8800 2001-08-26 Kevin Ryde <kevin@swox.se>
8802 * tests/devel/try.c (ARRAY_ITERATION): Make types match on "?:" legs.
8803 (TYPE_MPZ_JACOBI, TYPE_MPZ_KRONECKER): Remove some superseded code.
8805 * tests/printf/t-printf.c (check_plain): Don't compare "all digits"
8806 precision against plain printf.
8808 * tune/Makefile.am: Eliminate empty TUNE_MPZ_SRCS.
8810 * configure, config.in, INSTALL.autoconf: Update to autoconf 2.52.
8811 * */Makefile.in, mdate-sh, missing, aclocal.m4, configure: Update to
8813 * configfsf.guess, configfsf.sub: Update to 2001-08-23.
8815 2001-08-24 Torbjorn Granlund <tege@swox.com>
8817 * demos/primes.c: Complete rewrite.
8819 2001-08-24 Kevin Ryde <kevin@swox.se>
8821 * longlong.h: Test __ppc__ for apple darwin cc, reported by Jon
8822 Becker. Also test __POWERPC__, PPC and __vxworks__.
8824 * tune/speed.h (speed_cyclecounter) [x86]: Don't clobber ebx in PIC.
8826 2001-08-22 Kevin Ryde <kevin@swox.se>
8828 * configure.in (x86 mmx): Correction to mmx path stripping.
8830 2001-08-17 Kevin Ryde <kevin@swox.se>
8832 * configure.in, acinclude.m4, Makefile.am, printf/Makefile.am,
8833 tests/printf/Makefile.am, gmp-h.in, gmp-impl.h, gmp.texi: Remove C++
8834 support, for the time being.
8835 * printf/doprntfx.cc, doprntix.cc, osfuns.cc, osmpf.cc, osmpq.cc,
8836 osmpz.cc, tests/printf/t-ostream.cc: Remove files.
8838 * printf/doprnt.c, printf/doprntf.c, gmp-impl.h: Use a single
8839 __gmp_doprnt_mpf, rather than a separate ndigits calculation.
8840 * printf/doprnt.c, printf/doprntf.c, gmp-impl.h, gmp.texi,
8841 tests/printf/t-printf.c: Let empty or -1 prec mean all digits for mpf.
8842 * printf/doprnt.c, tests/printf/t-printf.c: Accept h or l in %n; let
8843 negative "*" style width mean left justify.
8845 * gmp-impl.h, mpf/get_str.c (MPF_SIGNIFICANT_DIGITS): New macro,
8846 extracted from mpf/get_str.c.
8848 * libmp.sym: New file.
8849 * Makefile.am (libmp_la_LDFLAGS): Use it.
8850 (DISTCLEANFILES): Remove asm-syntax.h, no longer generated.
8851 Remove some comments about "make check".
8853 * demos/perl/GMP.pm, GMP.xs, GMP/Mpf.pm: Add printf and sprintf,
8854 change get_str to string/exponent for floats, remove separate
8856 * demos/perl/GMP/Mpf.pm (overload_string): Use $# (default "%.g").
8857 * demos/perl/typemap: Fix some duplicate string entries.
8858 * demos/perl/test.pl: Update tests, split overloaded constants into ...
8859 * demos/perl/test2.pl: ... this new file.
8860 * demos/perl/Makefile.PL (clean): Add test.tmp.
8862 2001-08-16 Kevin Ryde <kevin@swox.se>
8864 * printf/snprntffuns.c (gmp_snprintf_format): Correction to bufsize-1
8865 return value handling.
8867 * demos/calc/calc.y: Reposition "%{" so copyright notice gets into
8870 * INSTALL: Use gmp_printf.
8872 2001-08-14 Kevin Ryde <kevin@swox.se>
8874 * mpz/inp_str.c: Fix return value (was 1 too big).
8875 * tests/mpz/t-inp_str.c: New file.
8876 * tests/mpz/Makefile.am: Add it.
8878 * mpn/x86/pentium4/sse2/add_n.asm: New file.
8879 * mpn/x86/pentium4/sse2/sub_n.asm: New file.
8880 * mpn/x86/pentium4/sse2/mul_1.asm: New file.
8882 2001-08-12 Kevin Ryde <kevin@swox.se>
8884 * printf/sprintffuns.c, printf/doprntf.c: Don't use sprintf return
8885 value (it's a pointer on SunOS 4).
8887 * acinclude.m4 (GMP_ASM_X86_SSE2, GMP_STRIP_PATH): New macros.
8888 * configure.in: Add pentium4 support.
8889 * mpn/x86/pentium4, mpn/x86/pentium4/mmx, mpn/x86/pentium4/sse2: New
8891 * mpn/x86/README: Update.
8893 2001-08-10 Torbjorn Granlund <tege@swox.com>
8895 * demos/pexpr.c (setup_error_handler): Catch also SIGABRT.
8897 2001-07-31 Kevin Ryde <kevin@swox.se>
8899 * tests/refmpn.c (refmpn_mul_1c): Allow low to high overlaps.
8901 * gmp-h.in, gmp-impl.h (_gmp_rand): Move prototype to gmp-impl.h.
8903 * tune/Makefile.am (EXTRA_DIST): Add many.pl.
8905 2001-07-28 Kevin Ryde <kevin@swox.se>
8907 * gmp.texi (Random Number Functions): Old rand functions no longer use
8910 * configure.in, acinclude.m4 (GMP_FUNC_VSNPRINTF): New macro.
8912 * mpn/generic/get_str.c: Add an ASSERT for high limb non-zero.
8914 2001-07-24 Kevin Ryde <kevin@swox.se>
8916 * gmp.texi (Build Options): Add --enable-cxx.
8917 (Converting Floats): Note mpf_get_str only generates accurately
8918 representable digits.
8919 (Low-level Functions): Note mpn_get_str requires non-zero high limb.
8920 (Formatted Output): New chapter.
8921 (Multiplication Algorithms): Use @quotation with @multitable.
8922 (Toom-Cook 3-Way Multiplication): Ditto.
8924 * tests/memory.c (tests_free_nosize): New function.
8925 * tests/tests.h (tests_allocate etc): Add prototypes.
8927 * tests/printf: New directory.
8928 * tests/printf/Makefile.am, t-printf.c, t-ostream.cc: New files.
8929 * configure.in, tests/Makefile.am: Add them.
8931 * configure.in, acinclude.m4 (GMP_PROG_CXX): New macro.
8932 * configure.in (--enable-cxx): New option.
8933 (AC_CHECK_HEADERS): Add locale.h and sys/types.h, remove unistd.h.
8934 (AC_CHECK_TYPES): Add intmax_t, long double, long long, ptrdiff_t,
8936 (AC_CHECK_FUNCS): Add localeconv, memset, obstack_vprintf, snprintf,
8938 (AC_CHECK_DECLS): Add vfprintf.
8940 * gmp-h.in, gmp-impl.h: Additions for gmp_printf etc.
8942 * printf: New directory.
8943 * printf/Makefile.am, asprintf.c, doprnt.c, doprntf.c, doprntfx.cc,
8944 doprnti.c, doprntix.cc, fprintf.c, obprintf.c, obprntffuns.c,
8945 obvprintf.c, osfuns.cc, osmpf.cc, osmpq.cc, osmpz.cc, printf.c,
8946 printffuns.c, snprintf.c, snprntffuns.c, sprintf.c, sprintffuns.c,
8947 vasprintf.c, vfprintf.c, vprintf.c, vsnprintf.c, vsprintf.c: New
8949 * configure.in, Makefile.am: Add them.
8951 * configure.in (HAVE_INLINE): Remove AC_DEFINE, unused.
8952 (AC_CHECK_TYPES): Don't test for void, assume it always exists.
8954 * gmp-impl.h (__GMP_REALLOCATE_FUNC_MAYBE): New macro.
8955 * mpz/get_str.c, mpq/get_str.c, mpf/get_str.c: Use it.
8957 * gmp-impl.h (mpn_fib2_ui): Use __MPN.
8958 (MPN_COPY_DECR): Fix an ASSERT.
8959 (CAST_TO_VOID): Remove macro.
8961 * gmp-h.in (mpq_out_str): Give #define even without prototype.
8962 (mpz_cmp_d, mpz_cmpabs_d): Corrections to #defines.
8964 * tests/devel/try.c: Add mpn_add and mpn_sub, don't use CAST_TO_VOID.
8966 2001-07-23 Torbjorn Granlund <tege@swox.com>
8968 * config.guess: Recognize pentium4.
8969 * config.sub: Recognize pentium4.
8971 2001-07-17 Kevin Ryde <kevin@swox.se>
8973 * gmp-h.in (__GMPN_AORS_1): Remove x86 and gcc versions, leave just
8975 (__GMPN_ADD, __GMPN_SUB): New macros, rewrite of mpn_add and mpn_sub.
8976 (mpn_add, mpn_sub): Use them.
8977 (__GMPN_COPY_REST): New macro.
8979 * gmp-h.in, gmp-impl.h, acinclude.m4: Remove __GMP_ASM_L and
8980 __GMP_LSYM_PREFIX, revert to ASM_L in gmp-impl.h and AC_DEFINE of
8983 2001-07-11 Kevin Ryde <kevin@swox.se>
8985 * gmp-h.in (__GMPN_ADD_1 etc) [x86]: Don't use this on egcs 2.91.
8987 * mpz/fits_uint.c, fits_ulong.c, mpz/fits_ushort.c: Split up fits_u.c.
8988 * mpz/fits_u.c: Remove file.
8989 * mpz/Makefile.am, macos/Makefile.in: Update.
8991 * tests/refmpn.c,tests.h (refmpn_copy): New function.
8992 * tests/devel/try.c (TYPE_ZERO): No return value from call.
8993 (TYPE_MODEXACT_1_ODD, TYPE_MODEXACT_1C_ODD): Share call with
8994 TYPE_MOD_1 and TYPE_MOD_1C.
8995 (MPN_COPY, __GMPN_COPY, __GMPN_COPY_INCR): Add testing.
8997 2001-07-10 Kevin Ryde <kevin@swox.se>
8999 * gmp-h.in (__GMPN_COPY): Add form to help gcc on power and powerpc.
9000 * gmp-impl.h (MPN_COPY_INCR, MPN_COPY_DECR, MPN_ZERO): Ditto.
9001 * mpn/powerpc64/copyi.asm, mpn/powerpc64/copyd.asm: Remove files.
9003 * mpz/tdiv_ui.c: Eliminate some local variables (seems to save code on
9004 i386 gcc 2.95.x), remove a bogus comment about quotient.
9006 * errno.c, gmp-impl.h (__gmp_exception, __gmp_divide_by_zero,
9007 __gmp_sqrt_of_negative): New functions.
9008 * gmp-impl.h (GMP_ERROR, DIVIDE_BY_ZERO, SQRT_OF_NEGATIVE): Use them.
9010 * randclr.c, randraw.c: Use ASSERT(0) for unrecognised algorithms.
9012 2001-07-07 Kevin Ryde <kevin@swox.se>
9014 * configure.in (powerpc*-*-*): Use -no-cpp-precomp for Darwin.
9016 * tests/mpbsd/t-itom.c: Renamed from t-misc.c.
9017 * tests/mpbsd/t-misc.c: Remove file.
9018 * tests/mpbsd/Makefile.am: Update.
9020 * tests/mpf/t-set_si.c,t-cmp_si.c,t-gsprec.c: Split from t-misc.c.
9021 * tests/mpf/t-misc.c: Remove file.
9022 * tests/mpf/Makefile.am: Update.
9024 * tests/mpz/t-oddeven.c,t-set_si.c,t-cmp_si.c: Split from t-misc.c.
9025 * tests/mpz/t-misc.c: Remove file.
9026 * tests/mpz/Makefile.am: Update.
9028 * stack-alloc.c: Add some alignment ASSERTs.
9030 * gmp-impl.h (MPN_NORMALIZE): Add notes on x86 repe/scasl slow.
9032 * tests/devel/try.c (MPN_ZERO): Add testing.
9033 * tune/speed.c,speed.h,common.c,many.pl (MPN_ZERO): Add measuring.
9035 * mpn/x86/divrem_1.asm: Update a remark about gcc and "loop".
9037 * tests/mpq/t-cmp_si.c: New file.
9038 * tests/mpq/Makefile.am: Add it.
9040 * tests/misc.c,tests.h (mpq_set_str_or_abort): New function.
9042 * mpq/cmp_si.c: New file.
9043 * Makefile.am, mpq/Makefile.am: Add it.
9044 * gmp-h.in (mpq_cmp_si): Add prototype.
9045 * gmp.texi (Comparing Rationals): Add doco.
9047 * gmp-h.in (_GMP_H_HAVE_FILE): Add _FILE_DEFINED for microsoft, add
9048 notes on what symbols are for what systems.
9050 2001-07-06 Torbjorn Granlund <tege@swox.com>
9052 * longlong.h (ibm032 umul_ppmm): Fix typo.
9053 * longlong.h (sparclite sdiv_qrnnd): Fix typo.
9055 2001-07-03 Kevin Ryde <kevin@swox.se>
9057 * mpz/bin_ui.c (DIVIDE): Use MPN_DIVREM_OR_DIVEXACT_1.
9058 * mpz/bin_uiui.c (MULDIV): Ditto, and use local variables for size and
9061 * acinclude.m4 (GMP_INCLUDE_GMP_H): New macro, use it everywhere gmp.h
9062 is wanted at configure time.
9063 * acinclude.m4, configure.in (GMP_H_EXTERN_INLINE, GMP_H_HAVE_FILE):
9066 * gmp-h.in (__GMP_EXTERN_INLINE): Set to "inline" for C++.
9067 (mpn_add, mpn_sub): Use new style __GMP_EXTERN_INLINE.
9068 * gmp-h.in, mp-h.in, gmp-impl.h (_EXTERN_INLINE): Remove, unused.
9069 * mpn/generic/add.c, mpn/generic/sub.c: New files.
9070 * mpn/generic/inlines.c: Remove file.
9071 * configure.in, mpn/Makefile.am: Update.
9073 * gmp.texi (GMP Basics): Note the need for stdio.h to get FILE
9076 2001-07-01 Kevin Ryde <kevin@swox.se>
9078 * gmp.texi (Build Options, Reentrancy): Updates for new
9079 --enable-alloca behaviour.
9080 (Debugging): Describe --enable-alloca=debug.
9081 (Miscellaneous Integer Functions): Note mpz_sizeinbase ignores signs.
9082 (Low-level Functions): Give a formula for mpn_gcdext cofactor.
9083 (Factorial Algorithm): New section.
9084 (Binomial Coefficients Algorithm): New section.
9085 Misc tweaks elsewhere.
9087 * mpf/set_prc.c: Merge the two truncation conditionals, misc cleanups,
9088 no functional changes.
9090 * mpn/*/gmp-mparam.h (DIVEXACT_1_THRESHOLD): Add tuned values.
9091 * gmp-impl.h (DIVEXACT_1_THRESHOLD): Make the default 0 when
9092 2*UMUL_TIME < UDIV_TIME.
9094 * mpn/x86/p6/dive_1.asm: New file.
9096 * mpn/x86/dive_1.asm: New file.
9097 * mpn/x86/gmp-mparam.h (DIVEXACT_1_THRESHOLD): Use it always.
9099 * tests/refmpn.c, tests.h (refmpn_zero): New function.
9100 * tests/devel/try.c: Use it.
9102 * tests/refmpn.c (refmpn_sb_divrem_mn): Use refmpn_cmp, not mpn_cmp.
9104 * tests/mpf/t-get_d.c (main): Use || not |.
9106 * tests/misc.c, tests/t-modlinv.c, tests/mpq/t-get_str.c,
9107 tests/mpf/reuse.c: Add string.h.
9109 2001-06-29 Kevin Ryde <kevin@swox.se>
9111 * tune/speed.h (SPEED_ROUTINE_MPN_FIB2_UI,
9112 SPEED_ROUTINE_COUNT_ZEROS_C): Corrections to TMP block handling.
9114 * gmp-impl.h (MPN_TOOM3_MUL_N_MINSIZE, MPN_TOOM3_SQR_N_MINSIZE):
9115 Corrections to these to account for adding tD into E.
9116 (MPN_INCR_U, MPN_DECR_U) [WANT_ASSERT]: Add size
9117 assertions, since mpn_add_1 and mpn_sub_1 from gmp.h don't get them.
9118 (MPN_DIVREM_OR_DIVEXACT_1): Add an assert of no remainder.
9120 * assert.c: Add stdlib.h for abort prototype.
9121 * tests/spinner.c, trace.c, t-constants.c, t-count_zeros.c,
9122 t-gmpmax.c, t-modlinv.c: Ditto.
9123 * tests/mpz/t-bin.c, t-cmp.c, t-get_si.c, t-misc.c, t-popcount.c,
9124 t-set_str.c, t-sizeinbase.c: Ditto.
9125 * tests/mpq/t-equal.c, t-get_str.c, t-set_f.c, t-set_str.c: Ditto.
9126 * tests/mpf/t-fits.c, t-get_d.c, t-get_si.c, t-int_p.c, t-misc.c,
9128 * tests/mpbsd/allfuns.c, t-misc.c: Ditto.
9130 * mpn/generic/mul_n.c, mpz/cfdiv_r_2exp.c: Use MPN_INCR_U rather than
9133 * tests/devel/try.c (TYPE_SB_DIVREM_MN): More fixes for calling method.
9135 * mpn/x86/k6/cross.pl: More insn exceptions.
9137 2001-06-23 Kevin Ryde <kevin@swox.se>
9139 * gmp-h.in (__GMPN_ADD_1, __GMPN_SUB_1) [i386]: Fix some asm output
9142 * gmp-impl.h (modlimb_invert): Mask after shifting, so mask constant
9145 * tests/devel/try.c (TYPE_SB_DIVREM_MN): Fix initial fill of quotient
9148 2001-06-20 Kevin Ryde <kevin@swox.se>
9150 * config.guess (rs6000-*-aix4* | powerpc-*-aix4*): Suppress error
9151 messages if $CC_FOR_BUILD or program don't work.
9153 * mpz/sqrt.c,sqrtrem.c: Special case for op==0, to avoid TMP_ALLOC(0).
9154 * tests/refmpf.c (refmpf_add, refmpf_sub): Avoid TMP_ALLOC(0).
9156 * tests/mpn/t-aors_1.c: New file.
9157 * tests/mpn/Makefile.am: Add it.
9159 * gmp-h.in (__GMPN_ADD_1, __GMPN_SUB_1): New macros, rewrite of
9160 mpn_add_1 and mpn_sub_1, better code for src==dst and/or n==1,
9161 separate versions for gcc x86, gcc generic, and non-gcc.
9162 (mpn_add_1, mpn_sub_1): Use them.
9163 (mpn_add, mpn_sub): Ditto, to get inlines on all compilers.
9164 (extern "C") [__cplusplus]: Let this encompass the extern inlines too.
9165 * mpn/generic/add_1.c,sub_1.c: New files, force code from gmp.h.
9166 * configure.in, mpn/Makefile.am: Add them.
9168 * acinclude.m4 (GMP_ASM_LSYM_PREFIX): AC_SUBST __GMP_LSYM_PREFIX
9169 rather than AC_DEFINE LSYM_PREFIX.
9170 * gmp-h.in (__GMP_LSYM_PREFIX): New substitution.
9171 (__GMP_ASM_L): New macro.
9172 * gmp-impl.h (ASM_L): Use it.
9174 * acinclude.m4, configure.in (GMP_C_ATTRIBUTE_MALLOC): New macro.
9175 * gmp-impl.h: Use it for all the malloc based TMP_ALLOCs.
9177 * stack-alloc.h: Remove file.
9178 * tal-reent.c: New file.
9179 * Makefile.am: Update.
9181 * acinclude.m4, configure.in (GMP_OPTION_ALLOCA): New macro, add
9182 malloc-reentrant method, use stack-alloc.c as malloc-notreentrant,
9183 make "reentrant" the default.
9184 * gmp-impl.h (__TMP_ALIGN): Moved from stack-alloc.c, use a union to
9185 determine the value, and demand only 4 bytes align on 32-bit systems.
9186 * gmp-impl.h (WANT_TMP_NOTREENTRANT): Move global parts of
9187 stack-alloc.h to here, allow non power-of-2 __TMP_ALIGN in TMP_ALLOC.
9188 * gmp-impl.h: Extend extern "C" to TMP_ALLOC declarations.
9189 * stack-alloc.c (tmp_stack): Move private parts of stack-alloc.h to
9190 here, use gmp-impl.h.
9192 * gmp-impl.h (TMP_ALLOC_LIMBS_2): New macro.
9193 * mpz/fib_ui.c, mpz/jacobi.c, mpq/cmp.c, mpn/generic/fib2_ui.c: Use it.
9195 * mpfr/exp2.c: Patch by Paul to match TMP_MARK and TMP_FREE in loop.
9196 * mpfr/sqrt.c: Scope nested TMP_DECL into nested { } block, patch by
9197 Paul, tweaked by me.
9198 * mpfr/agm.c: Ditto, and add a final TMP_FREE(marker2).
9200 * gmp-h.in (mpn_cmp): Add __GMP_ATTRIBUTE_PURE.
9202 * INSTALL: Clarify "make install", tweak formatting a bit.
9204 2001-06-17 Kevin Ryde <kevin@swox.se>
9206 * configure.in, Makefile.am, gmp-impl.h: Add a debugging TMP_ALLOC,
9207 selected with --enable-alloca=debug.
9208 * tal-debug.c: New file.
9209 * configure.in, Makefile.am: Compile stack-alloc.c only for
9211 * assert.c (__gmp_assert_header): New function, split from
9214 * mpz/lcm.c: Don't TMP_MARK and then just return. Remove unnecessary
9215 _mpz_realloc prototype.
9217 * mpn/generic/mul.c (mpn_sqr_n): Use __gmp_allocate_func for toom3
9218 temporary workspace.
9220 2001-06-15 Kevin Ryde <kevin@swox.se>
9222 * tests/mpz/t-set_f.c: New file.
9223 * tests/mpz/Makefile.am (check_PROGRAMS): Add it.
9225 * mpz/set_f.c: Share MPN_COPY between pad and trunc cases, do exp<=0
9226 test earlier, store SIZ(w) earlier.
9228 * tests/t-count_zeros.c: New file.
9229 * tests/t-gmpmax.c: New file.
9230 * tests/Makefile.am (check_PROGRAMS): Add them.
9232 * mp_clz_tab.c: Compile the table only if longlong.h says it's needed;
9233 add an internal-use-only comment.
9234 * tune/common.c: Force a __clz_tab for convenience when testing.
9236 * mpn/x86/pentium/gmp-mparam.h, mpn/x86/pentium/mmx/gmp-mparam.h: Add
9237 COUNT_LEADING_ZEROS_NEED_CLZ_TAB, for mod_1.asm.
9239 * longlong.h (count_leading_zeros) [pentium]: Decide to go with float
9241 (count_leading_zeros) [alpha]: Add COUNT_LEADING_ZEROS_NEED_CLZ_TAB.
9242 (__clz_tab): Provide a prototype only if it's needed.
9244 * tests/trace.c (mpz_trace): Don't use = on structures.
9245 (mpn_trace): Set _mp_alloc when creating mpz.
9247 2001-06-12 Kevin Ryde <kevin@swox.se>
9249 * mpn/x86/divrem_1.asm: Amend some comments about P5 speed.
9251 * tune/README: Clarify reconfigure on gmp-mparam.h update.
9253 * mpn/x86/p6/copyd.asm: New file.
9254 * mpn/x86/p6/README: Update copyd and mod_1.
9255 * mpn/x86/copyd.asm: Amend some comments.
9257 * gmp-impl.h (__builtin_constant_p): Add dummy for non-gcc.
9258 (mpn_incr_u, mpn_decr_u): Recognise incr==1 at compile time in the
9259 generic code on gcc.
9261 * gmp-impl.h (ASSERT_ZERO_P, ASSERT_MPN_NONZERO_P): New macros.
9262 * mpn/generic/gcd_1.c, mpn/generic/mul_fft.c: Use them.
9263 * mpz/get_d.c: Add a private mpn_zero_p.
9264 * mpfr/trunc.c: Use own mpn_zero_p.
9265 * tune/speed.h (SPEED_ROUTINE_MPN_GCD_1N): Use refmpn_zero_p.
9266 * gmp-impl.h (mpn_zero_p): Remove, no longer needed.
9268 * gmp-h.in, gmp-impl.h: Move MPN_CMP to gmp.h as __GMPN_CMP, leave an
9269 MPN_CMP alias in gmp-impl.h.
9270 * gmp-h.in (mpn_cmp): Add an inline version.
9271 * mpn/generic/cmp.c: Use __GMP_FORCE_mpn_cmp to get code from gmp.h.
9273 * acinclude.m4 (GMP_C_ATTRIBUTE_MODE): New macro.
9274 * configure.in: Call it.
9275 * gmp-impl.h (SItype etc): Use it.
9277 * randraw.c (lc): Change mpn_mul_basecase->mpn_mul,
9278 mpn_incr_u->MPN_INCR_U, abort->ASSERT_ALWAYS(0).
9280 * longlong.h (count_leading_zeros) [pentiumpro]: Work around a partial
9281 register stall on gcc < 3.
9283 * gmp.texi (Introduction to GMP): Add IA-64.
9284 (Notes for Particular Systems): i386 means generic x86.
9286 * tests/t-modlinv.c: Use tests_start and tests_end.
9288 2001-06-10 Kevin Ryde <kevin@swox.se>
9290 * gmp.texi (Number Theoretic Functions): mpz_jacobi only defined for b
9291 odd. Separate the jacobi/legendre/kronecker descriptions.
9292 (Low-level Functions): Document mpn_mul_1 "incr" overlaps.
9293 (Language Bindings): New chapter.
9295 * mpz/jacobi.c: Don't retaining old behaviour of mpz_jacobi on even b
9296 (it wasn't documented in 3.1.1).
9297 * mpz/jacobi.c, gmp-h.in (mpz_kronecker, mpz_legendre): Remove
9298 separate entrypoints, just #define to mpz_jacobi.
9299 * compat.c (__gmpz_legendre): Add compatibility entrypoint.
9301 * mpn/generic/mul_1.c: Allow "incr" style overlaps.
9302 * tests/devel/try.c (param_init): Test this.
9304 * mpf/mul_ui.c: Do size==0 test earlier.
9306 2001-06-08 Kevin Ryde <kevin@swox.se>
9308 * gmp-impl.h (ULONG_HIGHBIT, UINT_HIGHBIT, USHRT_HIGHBIT): Cast
9309 ULONG_MAX etc to unsigned long etc before attempting to right shift.
9311 * acinclude.m4 (GMP_ASM_LSYM_PREFIX): Add an AC_DEFINE of LSYM_PREFIX.
9312 * gmp-impl.h (ASM_L): New macro.
9313 (mpn_incr_u, mpn_decr_u, MPN_INCR_U, MPN_DECR_U): Add i386 optimized
9316 * mpn/hppa/*.s,S,asm: Use .label so the code works with gas on hppa
9317 GNU/Linux too, reported by LaMont Jones <lamont@smallone.fc.hp.com>.
9318 * mpn/hppa/README: Add some notes on this.
9319 * acinclude.m4 (GMP_ASM_LABEL_SUFFIX): Ditto.
9321 * mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add dive_1.c,
9324 * tests/mpn/t-iord_u.c: New file.
9325 * tests/mpn/Makefile.am (check_PROGRAMS): Add it.
9327 * configure.in (mips*-*-irix[6789]*): Make ABI=n32 the default, same
9329 * gmp.texi (ABI and ISA): Update.
9331 * gmp.texi (Build Options): Misc tweaks.
9332 (Notes for Particular Systems): Describe windows DLL handling.
9333 (Known Build Problems): DJGPP needs bash 2.04.
9334 (Number Theoretic Functions): mpz_invert returns 0<=r<modulus; add
9335 mpz_fib2_ui, mpz_lucnum_ui, mpz_lucnum2_ui.
9336 (Fibonacci Numbers Algorithm): Update for new formulas used.
9337 (Lucas Numbers Algorithm): New section.
9339 * tune/speed.c,speed.h,common.c,many.pl: Add mpn_fib2_ui, mpz_fib2_ui,
9340 mpz_lucnum_ui, mpz_lucnum2_ui.
9341 * demos/expr/exprz.c,README: Add lucnum.
9342 * demos/perl/GMP.pm,GMP.xs,GMP/Mpz.pm,test.pl: Add fib2, lucnum,
9345 * tests/mpz/t-lucnum_ui.c: New file.
9346 * tests/mpz/Makefile.am (check_PROGRAMS): Add it.
9347 * tests/mpz/t-fib_ui.c: Check mpz_fib2_ui too, updates for new style
9350 * tune/tuneup.c, tune/Makefile.am, gmp-impl.h, mpn/*/gmp-mparam.h:
9351 Remove FIB_THRESHOLD, no longer required.
9353 * mpz/fib2_ui.c, mpz/lucnum_ui.c mpz/lucnum2_ui.c: New files.
9354 * Makefile.am, mpz/Makefile.am: Add them.
9355 * gmp-h.in (mpz_fib2_ui, mpz_lucnum_ui, mpz_lucnum2_ui): Add
9358 * mpn/generic/fib2_ui.c: New file.
9359 * configure.in (gmp_mpn_functions): Add it.
9360 * gmp-impl.h (mpn_fib2_ui, FIB_TABLE, etc): Add these.
9361 * mpz/fib_ui.c: Rewrite.
9363 * acinclude.m4 (GMP_C_SIZES): Fix _LONG_LONG_LIMB define for mp_limb_t
9365 (GMP_FUNC_ALLOCA): Add dummy __GMP_BITS_PER_MP_LIMB for gmp-h.in work.
9367 * configure.in (CPPFLAGS): Remove -D__GMP_WITHIN_GMP, don't want it
9369 * Makefile.am, mpn/Makefile.am, mpz/Makefile.am, mpq/Makefile.am,
9370 mpf/Makefile.am, mpbsd/Makefile.am (INCLUDES): Set -D__GMP_WITHIN_GMP.
9372 * configure.in (*-*-msdosdjgpp*): Forcibly disable shared libraries,
9373 to make libtests.la work.
9375 * acconfig.h (_LONG_LONG_LIMB, HAVE_MPFR): Remove dummy defines, no
9378 * mpz/set_ui.c: Store to _mp_d[0] unconditionally.
9380 2001-05-27 Kevin Ryde <kevin@swox.se>
9382 * configure.in, gmp-h.in, mp-h.in: Add support for windows DLLs.
9384 2001-05-26 Kevin Ryde <kevin@swox.se>
9386 * gmp.texi (ABI and ISA, Reentrancy): Minor tweaks
9387 (Notes for Package Builds): Note gmp.h is a generated file.
9388 (Notes for Particular Systems): -march=pentiumpro is used for gcc
9390 (Assembler Loop Unrolling): Mention non power-of-2 unrolling.
9391 (Internals): New chapter.
9392 * mpf/README: Remove file.
9394 * demos/expr/README: Miscellaneous rewordings.
9396 * demos/perl: New directory.
9397 * demos/Makefile.am: Add it.
9398 * demos/perl/INSTALL, Makefile.PL, GMP.pm, GMP.xs, typemap,
9399 GMP/Mpz.pm, GMP/Mpq.pm, GMP/mpf.pm, GMP/Rand.pm, sample.pl, test.pl:
9402 * configure, aclocal.m4: Update to autoconf 2.50.
9404 * configure, aclocal.m4, ltmain.sh: Update to libtool 1.4.
9406 * configure, aclocal.m4, missing, ansi2knr.c, */Makefile.in: Update to
9408 * Makefile.am: Conditionalize mpfr in $(SUBDIRS) to handle mpfr.info.
9409 * mpfr/Makefile.am (INFO_DEPS): Remove previous mpfr.info handling.
9410 * mpn/Makefile.am (GENERIC_SOURCES): Remove this, just put mp_bases.c
9411 in libmpn_la_SOURCES.
9412 * tests/Makefile.am (tests.h): Move from EXTRA_HEADERS to
9413 libtests_la_SOURCES.
9414 * ltconfig: Remove file, no longer needed.
9416 * Makefile.am (gmp-impl.h, longlong.h, stack-alloc.h): Move from
9417 EXTRA_DIST to libgmp_la_SOURCES, so they get included in TAGS.
9418 * tests/rand/Makefile.am (gmpstat.h): Move to libstat_la_SOURCES
9421 * config.guess (68k-*-*): Use $SHELL not "sh", tweak some comments.
9423 * mpfr/mpfr.texi (Introduction to MPFR): Tweak table formatting, note
9424 non-free programs must be able to be re-linked.
9426 2001-05-20 Kevin Ryde <kevin@swox.se>
9428 * mpn/powerpc64/addmul_1.asm, mpn/powerpc64/mul_1.asm,
9429 mpn/powerpc64/submul_1.asm: Add carry-in entrypoints.
9431 2001-05-17 Kevin Ryde <kevin@swox.se>
9433 * gmp.texi (ge): Fix definition for info.
9434 (Notes for Particular Systems): Mention 68k dragonball and cpu32.
9435 (Efficiency): Add static linking, more about in-place operations,
9436 describe mpq+/-integer using addmul.
9437 (Reporting Bugs): A couple of words about self-contained reports.
9438 (Floating-point Functions): Note exponent limitations of mpf_get_str
9440 (Initializing Floats): Clarify mpf_get_prec, mpf_set_prec and
9441 mpf_set_prec_raw a bit.
9442 (Float Comparison): Note current mpf_eq deficiencies.
9444 * gmp-h.in (__GMP_HAVE_CONST, __GMP_HAVE_PROTOTYPES,
9445 __GMP_HAVE_TOKEN_PASTE): Merge GNU ansidecl.h tests for ANSI compilers.
9446 * demos/expr/expr-impl-h.in: Ditto.
9448 * gmp-impl.h (BITS_PER_MP_LIMB): Define from __GMP_BITS_PER_MP_LIMB if
9449 not already in gmp-mparam.h.
9450 * tests/t-constants.c (BITS_PER_MP_LIMB, __GMP_BITS_PER_MP_LIMB):
9451 Check these are the same.
9453 * gmp-h.in (mpf_get_default_prec, mpf_get_prec, mpf_set_default_prec,
9454 mpf_set_prec_raw): Provide "extern inline" versions, use __GMPF on the
9456 * mpf/get_dfl_prc.c, mpf/get_prc.c, mpf/set_dfl_prc.c,
9457 mpf/set_prc_raw.c: Get code from gmp.h using __GMP_FORCE.
9459 * gmp-h.in, gmp-impl.h (__gmp_default_fp_limb_precision): Move from
9460 gmp-impl.h to gmp-h.in.
9461 (__GMPF_BITS_TO_PREC, __GMPF_PREC_TO_BITS): Ditto, and use __GMPF
9462 prefix and add a couple of casts.
9463 * gmp-h.in (__GMP_MAX): New macro.
9464 * mpf/init2.c mpf/set_prc.c: Update for __GMPF prefix.
9466 * gmp-h.in (__GMP_BITS_PER_MP_LIMB): New templated define.
9467 * acinclude.m4 (GMP_C_SIZES): Add AC_SUBST __GMP_BITS_PER_MP_LIMB,
9468 remove AC_DEFINE BITS_PER_MP_LIMB.
9470 2001-05-13 Kevin Ryde <kevin@swox.se>
9472 * gmp-h.in, gmp.texi, Makefile.am, mpz/Makefile.am, tests/mpz/t-pow.c:
9473 Remove mpz_si_pow_ui, pending full si support.
9474 * mpz/si_pow_ui.c: Remove file.
9476 2001-05-11 Kevin Ryde <kevin@swox.se>
9478 * mpn/x86/pentium/dive_1.asm: New file.
9480 * mpn/powerpc32/umul.asm: Use r on registers.
9481 * mpn/powerpc64/umul.asm: New file.
9482 * configure.in (powerpc*-*-*): Enable umul in extra_functions.
9484 * tests/refmpn.c, tests/tests.h (refmpn_umul_ppmm): Use same arguments
9485 as normal mpn_umul_ppmm.
9486 (refmpn_mul_1c): Update.
9487 * tests/devel/try.c, tune/many.pl: Add some umul_ppmm testing support.
9489 * mpn/x86/k6/mmx/popham.asm, mpn/x86/k7/mmx/popham.asm: Don't support
9491 * mpn/x86/pentium/popcount.asm, mpn/x86/pentium/hamdist.asm: Ditto,
9492 and shave a couple of cycles from the PIC entry code.
9494 * mpz/mul.c: Use mpn_mul_1 for size==1 and mpn_mul_2 (if available)
9495 for size==2, to avoid copying; do vsize==0 test earlier.
9497 * mpf/sub.c: Test r!=u before calling mpf_set.
9498 * mpf/add.c: Ditto, and share mpf_set between usize==0 and vsize==0.
9500 * mpn/generic/tdiv_qr.c, mpq/get_d.c, mpf/div.c, mpf/set_q.c,
9501 mpf/set_str.c, mpf/ui_div.c: Test for high bit set, not for
9502 count_leading_zeros zero.
9504 * acinclude.m4 (GMP_PROG_AR, GMP_PROG_NM): Print a message if extra
9507 * tests/mpz/t-mul_i.c: New file.
9508 * tests/mpz/Makefile.am: Add it.
9510 * mpz/mul_siui.c (mpz_mul_si): Fix for -0x80..00 on long long limb.
9512 * gmp-h.in (mpf_set_si, mpf_set_ui): Revert last change, set exp to 0
9514 * mpf/ceilfloor.c, mpf/trunc.c: Fix exp to 0 when setting r to 0.
9515 * gmp-impl.h (MPF_CHECK_FORMAT): Check exp==0 when size==0.
9517 2001-05-07 Kevin Ryde <kevin@swox.se>
9519 * gmp-h.in (mpf_set_si, mpf_set_ui): Don't bother setting _mp_exp to 0
9520 when n==0 (use 1 unconditionally).
9521 * tests/mpf/t-misc.c (check_mpf_set_si): Don't demand anything of
9522 _mp_exp when _mp_size is zero.
9524 * mpn/x86/README: Note gas _GLOBAL_OFFSET_TABLE_ with leal problem.
9526 * gmp-h.in (mpz_fits_uint_p, mpz_fits_ulong_p, mpz_fits_ushort_p):
9527 Provide these as "extern inline"s.
9528 (__GMP_UINT_MAX, __GMP_ULONG_MAX, __GMP_USHRT_MAX): New macros.
9529 (mpz_popcount): Use __GMP_ULONG_MAX.
9530 * gmp-impl.h (UINT_MAX, ULONG_MAX, USHRT_MAX): Use __GMP_U*_MAX, if
9531 not already defined.
9532 * mpz/fits_u.c: Use the code from gmp.h.
9534 2001-05-06 Kevin Ryde <kevin@swox.se>
9536 * mpn/x86/k7/dive_1.asm: New file.
9537 * mpn/x86/k7/gcd_1.asm: New file.
9538 * mpn/asm-defs.m4 (m4_count_trailing_zeros): New macro.
9540 * gmp-h.in (mpz_get_ui, mpz_getlimbn, mpz_set_q, mpz_perfect_square_p,
9541 mpz_popcount, mpz_size, mpf_set_ui, mpf_set_si, mpf_size): Provide
9542 these as "extern inlines".
9543 Use just one big extern "C" block.
9544 * mpz/getlimbn.c, mpz/get_ui.c, mpz/perfsqr.c, mpz/popcount.c
9545 mpz/set_q.c, mpz/size.c, mpf/set_si.c, mpf/set_ui.c, mpf/size.c: Use
9546 __GMP_FORCE to get code from gmp.h.
9548 2001-05-03 Kevin Ryde <kevin@swox.se>
9550 * extract-dbl.c: Add ASSERT d>=0.
9552 * gmp.texi (Efficiency): Add mpz_addmul etc for mpz+=integer, add
9553 mpz_neg etc in-place.
9554 (Integer Arithmetic): Add mpz_addmul, mpz_submul, mpz_submul_ui.
9555 (Initializing Rationals): Add mpq_set_str.
9556 (Low-level Functions): mpn_set_str requires strsize >= 1.
9558 * gmp-h.in (__GMP_EXTERN_INLINE, __GMP_ABS): New macros.
9559 (mpz_abs, mpq_abs, mpf_abs, mpz_neg, mpq_neg, mpf_neg): Provide inline
9561 * mpz/abs.c, mpq/abs.c, mpf/abs.c, mpz/neg.c, mpq/neg.c, mpf/neg.c:
9562 Add suitable __GMP_FORCE to turn off inline versions.
9564 * tests/mpz/t-aorsmul.c,t-cmp_d.c,t-popcount,t-set_str.c: New files.
9565 * tests/mpz/Makefile.am: Add them.
9567 * mpz/aorsmul_i.c: New file, rewrite of addmul_ui.c. Add
9568 mpz_submul_ui entrypoint, share more code between some of the
9569 conditionals, use mpn_mul_1c if available.
9570 * mpz/addmul_ui.c: Remove file.
9571 * mpz/aorsmul.c: New file.
9572 * Makefile.am, mpz/Makefile.am: Update.
9573 * gmp-h.in (mpz_addmul, mpz_submul, mpz_submul_ui): Add prototypes.
9574 * gmp-impl.h (mpz_aorsmul_1): Add prototype.
9576 * tests/mpq/t-set_str.c: New file.
9577 * tests/mpq/Makefile.am: Add it.
9579 * mpq/set_str.c: New file.
9580 * Makefile.am, mpq/Makefile.am: Add it.
9581 * gmp-h.in (mpq_set_str): Add prototype.
9583 * mpz/set_str.c: Fix for trailing white space on zero, eg. "0 ".
9584 * mpn/generic/set_str.c: Add ASSERT str_len >= 1.
9586 * gmp-h.in, gmp-impl.h (mpn_incr_u, mpn_decr_u): Move to gmp-impl.h.
9587 * gmp-impl.h (MPN_INCR_U, MPN_DECR_U): New macros.
9589 2001-04-30 Kevin Ryde <kevin@swox.se>
9591 * tests/mpz/t-lcm.c: New file.
9592 * tests/mpz/Makefile.am (check_PROGRAMS): Add it.
9594 * mpz/lcm.c: Add one limb special case.
9596 * mpz/lcm_ui.c: New file.
9597 * Makefile.am, mpz/Makefile.am: Add it.
9598 * gmp-h.in (mpz_lcm_ui): Add prototype.
9599 * gmp.texi (Number Theoretic Functions): Add mpz_lcm_ui, document lcm
9600 now always positive.
9602 * mp-h.in (mp_size_t, mp_exp_t): Fix typedefs to match gmp-h.in.
9604 * gmp-h.in (mpn_add_1, mpn_add, mpn_sub_1, mpn_sub): Remove K&R
9605 function defines (ansi2knr will handle mpn/inline.c, and just ansi is
9606 enough for gcc extern inline).
9608 * gmp-h.in (__GMP_HAVE_TOKEN_PASTE): New macro.
9610 * gmp-impl.h (CNST_LIMB): Ditto.
9612 * gmp-h.in, mp-h.in (__gmp_const, __gmp_signed, _PROTO, __MPN): Use
9613 ANSI forms on Microsoft C.
9614 (__GMP_HAVE_CONST): New define.
9615 * gmp-impl.h (const, signed): Use it.
9617 * demos/expr/expr-impl-h.in (<stdarg.h>): Use this with Microsoft C.
9618 (HAVE_STDARG): New define.
9619 * demos/expr/expr.c,exprz.c,exprq.c,exprf.c,exprfr.c: Use it.
9621 * acinclude.m4 (GMP_C_STDARG): New macro.
9622 * configure.in: Call it.
9625 * configure.in (AC_PROG_CC_STDC): New test.
9627 2001-04-25 Kevin Ryde <kevin@swox.se>
9629 * mpn/x86/k6/mmx/dive_1.asm: New file.
9630 * mpn/x86/x86-defs.m4 (Zdisp): Two more insns.
9632 * mpn/x86/pentium/mul_2.asm: New file.
9633 * mpn/asm-defs.m4: Add define_mpn(mul_2).
9634 * acconfig.h (HAVE_NATIVE_mpn_divexact_1, mul_2): Add templates.
9636 * configure.in (ABI): Use AC_ARG_VAR.
9638 * tests/devel/try.c: Run reference function when validate fails.
9640 * mpq/get_str.c: Fixes for negative bases.
9641 * tests/mpq/t-get_str.c: Check negative bases.
9642 * tests/misc.c,tests.h (__gmp_allocate_strdup, strtoupper): New
9645 2001-04-24 Torbjorn Granlund <tege@swox.com>
9647 * mpz/lcm.c (mpz_lcm): Make result always positive.
9649 * gmp-h.in (mpz_inp_binary, mpz_out_binary): Remove declarations.
9651 2001-04-22 Kevin Ryde <kevin@swox.se>
9653 * mpn/powerpc64/addsub_n.asm: Use config.m4 not asm-syntax.m4.
9655 * mpz/cmp_d.c, mpz/cmpabs_d.c: New files.
9656 * Makefile.am, mpz/Makefile.am: Add them.
9657 * mpf/cmp_d.c, mpf/get_dfl_prec.c: New files.
9658 * Makefile.am, mpf/Makefile.am: Add them.
9659 * gmp-h.in (mpz_cmp_d, mpz_cmpabs_d, mpf_cmp_d, mpf_get_default_prec):
9661 * gmp.texi: Add documentation.
9663 * mpf/set_prc.c: Avoid a realloc call if already the right precision.
9665 * gmp-impl.h (MPF_BITS_TO_PREC, MPF_PREC_TO_BITS): New macros.
9666 * mpf/get_prc.c, init2.c, set_dfl_prec.c, set_prc.c, set_prc_raw.c:
9669 2001-04-20 Kevin Ryde <kevin@swox.se>
9671 * tests/devel/try.c: Don't test size==0 on mpn_popcount and
9672 mpn_hamdist; add testing for mpn_divexact_1; print some limb values
9673 with mpn_trace not printf.
9675 * mpz/popcount.c, mpz/hamdist.c: Don't pass size==0 to mpn_popcount
9677 * mpn/generic/popham.c: Don't support size==0.
9679 * config.guess (m68k-*-*): Detect m68010, return m68360 for cpu32,
9680 cleanup the nesting a bit.
9682 * gmp.texi (Integer Division): Fix mpz_congruent_2exp_p "c" type.
9683 (Integer Division): Add mpz_divexact_ui.
9684 (Number Theoretic Functions): Fix mpz_nextprime return type.
9685 (Exact Remainder): Divisibility tests now implemented.
9686 And more index entries in a few places.
9688 * tests/mpz/dive_ui.c: New file.
9689 * tests/mpz/Makefile.am (check_PROGRAMS): Add it.
9691 * mpz/dive_ui.c: New file.
9692 * Makefile.am, mpz/Makefile.am: Add it.
9693 * gmp-h.in (mpz_divexact_ui): Add prototype.
9695 * tune/many.pl, tune/speed.h: Add special mpn_back_to_back for
9698 * gmp-impl.h (MPN_DIVREM_OR_DIVEXACT_1): New macro.
9699 * mpz/divexact.c: Use it.
9701 * gmp-impl.h (DIVEXACT_1_THRESHOLD): New threshold.
9702 * tune/tuneup.c: Tune it.
9704 * tune/speed.c,speed.h,common.c,many.pl: Add measuring of
9705 mpn_divexact_1, mpn_copyi, mpn_copyd.
9707 * mpn/generic/dive_1.c: New file.
9708 * configure.in (gmp_mpn_functions): Add it.
9709 * gmp-impl.h (mpn_divexact_1): Add prototype.
9710 * mpn/asm-defs.m4: Add define_mpn(divexact_1).
9712 * tests/mpn: New directory.
9713 * tests/Makefile.am: Add it.
9714 * tests/mpn/Makefile.am: New file.
9715 * configure.in (AC_OUTPUT): Add it.
9716 * tests/mpn/t-asmtype.c: New file.
9718 * configure, config.in: Update to autoconf 2.49d.
9720 * configure.in, gmp-h.in, mp-h.in, demos/expr/expr-impl-h.in: Revert
9721 to generating gmp.h, mp.h and expr-impl.h with AC_OUTPUT and AC_SUBST.
9723 * configure.in (m68*-*-*): Oops, m683?2 is 68000, m68360 is cpu32.
9724 * mpn/m68k/m68k-defs.m4 (scale_available_p): Ditto.
9726 * configure.in (underscore, asm_align): Remove these variables, unused.
9727 (GMP_ASM_*): Sort by AC_REQUIREs, to avoid duplication.
9728 * acinclude.m4 (GMP_ASM_UNDERSCORE, GMP_ASM_ALIGN_LOG): Remove support
9729 for actions, no longer needed.
9731 2001-04-17 Kevin Ryde <kevin@swox.se>
9733 * config.guess (m68k-*-*): Look for cpu in linux kernel /proc/cpuinfo.
9735 * acinclude.m4 (GMP_GCC_MARCH_PENTIUMPRO): The -mpentiumpro problem is
9736 fixed in 2.95.4, so test for that.
9737 (GMP_ASM_TYPE): Amend some comments.
9739 * tune/freq.c (speed_cpu_frequency_sysctl): Avoid having unused
9740 variables on GNU/Linux.
9742 * mpn/asm-defs.m4 (m4_instruction_wrapper): Fix a quoting problem if
9743 the name of the file is a macro.
9745 2001-04-15 Kevin Ryde <kevin@swox.se>
9747 * mpn/powerpc64/*.asm: Add speeds on ppc630.
9749 * acconfig.h: Add dummy templates for _LONG_LONG_LIMB and HAVE_MPFR.
9750 * configure.in: Ensure config.in is the last AM_CONFIG_HEADER,
9751 which autoheader requires.
9753 * mpn/x86/pentium/popcount.asm: New file.
9754 * mpn/x86/pentium/hamdist.asm: New file.
9756 * mpn/asm-defs.m4: (m4_popcount): New macro.
9757 Amend a few comments elsewhere.
9759 * acinclude.m4 (GMP_ASM_RODATA): If possible, grep compiler output for
9760 the right directive.
9762 * tune/speed.c: Print clock speed in MHz, not cycle time.
9764 * configure.in (AC_CHECK_HEADERS): Check for sys/processor.h.
9765 * tune/freq.c (speed_cpu_frequency_processor_info): Require
9766 <sys/processor.h> to exist, to differentiate the different
9767 processor_info on Darwin.
9768 (speed_cpu_frequency_sysctlbyname): Remove hw.model test which is in
9769 speed_cpu_frequency_sysctl.
9770 (speed_cpu_frequency_sysctl): Add hw.cpufrequency for Darwin.
9772 * gmp-impl.h (MPN_LOGOPS_N_INLINE, mpn_and_n ... mpn_xnor_n): Use a
9773 single expression argument for the different operations, necessary for
9774 the Darwin "smart" preprocessor.
9776 * mpn/m68k/t-m68k-defs.pl: Allow white space in m4_definsn and
9779 * tune/many.pl: Change RM_TMP_S to RM_TMP to match mpn/Makeasm.am,
9780 avoid a possibly undefined array in a diagnostic, add more renaming to
9783 2001-04-13 Kevin Ryde <kevin@swox.se>
9785 * ltmain.sh, aclocal.m4, configure, config.in: Update to libtool 1.3d.
9786 * configure.in: Change ac_ to lt_ in lt_cv_archive_cmds_need_lc and
9789 * config.guess (m68*-*-*): Detect exact cpu with BSD sysctl hw.model,
9790 detect 68000/68010 with trapf, detect 68302 with bfffo.
9792 2001-04-11 Kevin Ryde <kevin@swox.se>
9794 * acinclude.m4 (GMP_ASM_M68K_INSTRUCTION, GMP_ASM_M68K_ADDRESSING,
9795 GMP_ASM_M68K_BRANCHES): New macros.
9796 * configure.in: Use them, remove old 68k configs, use mc68020 udiv and
9799 * mpn/m68k/m68k-defs.m4: New file.
9800 * mpn/m68k/t-m68k-defs.pl: New file.
9801 * mpn/m68k/*.asm: New files, converted from .S. Merge add_n and sub_n
9802 to aors_n, ditto mc68020 addmul_1 and submul_1 to aorsmul_1. No
9803 object code changes (except .type and .size now used on NetBSD 1.4).
9804 * mpn/m68k/README: New file.
9805 * mpn/m68k/*.S, */*.S, syntax.h: Remove files.
9807 * configure.in (m68*-*-netbsd1.4*): Pretend getrusage doesn't exist.
9808 * tune/README: Update.
9810 * configure.in (powerpc*-*-*): For the benefit of Darwin 1.3, add cc
9811 to cclist, make gcc_cflags -Wa,-mppc optional.
9813 2001-04-06 Kevin Ryde <kevin@swox.se>
9815 * mpn/lisp/gmpasm-mode.el (gmpasm-comment-start-regexp): Add | for 68k.
9816 (gmpasm-mode-syntax-table): Add to comments.
9818 * tests/mpz/reuse.c (dsi_div_func_names): Add names for cdiv_[qr]_2exp.
9820 2001-04-04 Kevin Ryde <kevin@swox.se>
9822 * acinclude.m4 (GMP_M4_M4WRAP_SPURIOUS): Fix test so as to actually
9823 detect the problem, add notes on m68k netbsd 1.4.1.
9825 * gmp.texi (Compatibility with older versions): Note libmp
9828 2001-04-03 Kevin Ryde <kevin@swox.se>
9830 * tests/mpz/reuse.c: Add mpz_cdiv_q_2exp and mpz_cdiv_r_2exp.
9832 * tests/mpz/t-pow.c: Drag in refmpn.o when testing mpz_pow_ui etc with
9835 * tune/speed.c,speed.h,common.c,many.pl: Add measuring of mpn_com_n
9837 * tests/devel/try.c: Add testing of mpn_mul_2, and a
9838 DATA_MULTIPLE_DIVISOR attribute.
9840 * gmp.texi (Build Options): List more m68k's.
9841 (Build Options): Add cross reference to tex2html.
9842 (Notes for Particular Systems): Add m68k means 68020 or up.
9843 (Rational Conversions): New section, with mpq_get_d, mpq_set_d and
9844 mpq_set_f from Miscellaneous, and new mpq_set_str.
9845 (Applying Integer Functions): Move mpq_get_num, mpq_get_den,
9846 mpq_set_num and mpq_set_den from Misc.
9847 (Miscellaneous Rational Functions): Remove section.
9848 (Custom Allocation): Partial rewrite for various clarifications.
9849 (References): Improve line breaks near URLs.
9851 * acinclude.m4 (GMP_GCC_M68K_OPTIMIZE): New macro.
9852 * configure.in (m68*-*-*): Use it to run gcc 2.95.x at -O not -O2.
9853 (m680?0-*-*, m683?2-*-*, m68360-*-*): Add optional gcc -m options.
9855 * tests/mpz/t-cmp.c: New file.
9856 * tests/mpz/t-sizeinbase.c: New file.
9857 * tests/mpz/Makefile.am: Add them.
9859 * gmp-impl.h (MPN_CMP): New macro.
9860 * mpz/cmp.c,cmpabs.c: Use it, and minor cleanups too.
9862 * tests/mpq/t-equal.c: New file.
9863 * tests/mpq/t-get_str.c: New file.
9864 * tests/mpq/Makefile.am: Add them.
9866 * mpq/get_str.c: New file.
9867 * Makefile.am, mpq/Makefile.am: Add it.
9868 * gmp-h.in (mpq_get_str): Add prototype.
9870 * mpq/equal.c: Rewrite using inline compare loops.
9872 * tests/refmpn.c,tests.h (refmpn_mul_2): Fix parameter order.
9873 * mpz/n_pow_ui.c: Fix mpn_mul_2 calls parameter order.
9875 2001-03-29 Kevin Ryde <kevin@swox.se>
9877 * tests/mpf/t-trunc.c: New file.
9878 * tests/mpf/Makefile.am (check_PROGRAMS): Add it.
9879 * gmp-impl.h (MPF_CHECK_FORMAT): New macro.
9881 * mpf/trunc.c: New file, rewrite of integer.c, preserve prec+1 in
9882 copy, don't copy if unnecessary.
9883 * mpf/ceilfloor.c: New file likewise, and use common subroutine for
9885 * mpf/integer.c: Remove file.
9886 * Makefile.am, mpf/Makefile.am, macos/Makefile.in: Update.
9888 * acinclude.m4 (GMP_GCC_VERSION_GE): New macro.
9889 (GMP_GCC_MARCH_PENTIUMPRO): Use it, remove CCBASE parameter (don't
9890 bother checking it's gcc).
9891 (GMP_GCC_ARM_UMODSI): New macro.
9892 * configure.in (GMP_GCC_MARCH_PENTIUMPRO): Update parameters.
9893 (arm*-*-*): Use GMP_GCC_ARM_UMODSI.
9894 * gmp.texi (Notes for Particular Systems): Add arm gcc requirements.
9896 2001-03-28 Kevin Ryde <kevin@swox.se>
9898 * gmp.texi (Converting Integers): Document mpz_getlimbn using absolute
9899 value and giving zero for N out of range, move to end of section.
9901 * tests/refmpn.c (refmpn_tdiv_qr): Use refmpn_divmod_1 rather than
9903 * tests/tests.h: Add some prototypes that were missing.
9905 * mpz/tdiv_q_ui.c: Remove a comment that belonged to mpz_tdiv_r_ui.
9907 2001-03-26 Torbjorn Granlund <tege@swox.com>
9909 * mpn/generic/gcdext.c: Handle carry overflow after m*n multiply code
9910 in both arms. Partially combine multiply arms.
9912 2001-03-24 Kevin Ryde <kevin@swox.se>
9914 * longlong.h: Add comments to P5 count_leading_zeros.
9916 * demos/expr/exprz.c,t-expr.c,README: Add congruent_p and divisible_p.
9918 2001-03-23 Kevin Ryde <kevin@swox.se>
9920 * gmp.texi (GMPceil, GMPfloor, ge, le): New macros.
9921 (Integer Division, mpn_cmp, mpn_sqrtrem, Algorithms): Use them.
9922 (mpn_bdivmod): Refer to mp_bits_per_limb, not BITS_PER_MP_LIMB, and
9923 improve formatting a bit.
9924 (mpn_lshift, mpn_rshift): Clarify the return values, and use {rp,n}
9925 for the destination.
9926 Miscellaneous minor rewordings in a few places.
9928 * mpn/arm/arm-defs.m4: New file.
9929 * configure.in (arm*-*-*): Use it.
9930 * mpn/arm/*.asm: Use changecom and registers from arm-defs.m4, use L()
9933 * mpn/x86/k6/mmx/com_n.asm: Relax code alignment (same speed).
9935 * gmp-h.in (__GMP_ATTRIBUTE_PURE): Use __pure__ to avoid application
9938 * gmp-impl.h (ABS): Add parens around argument.
9940 2001-03-20 Kevin Ryde <kevin@swox.se>
9942 * acinclude.m4 (GMP_PROG_M4): Use AC_ARG_VAR on $M4.
9944 * acinclude.m4 (GMP_M4_M4WRAP_SPURIOUS): New macro.
9945 * configure.in: Use it.
9946 * mpn/asm-defs.m4: Ditto.
9948 2001-03-18 Kevin Ryde <kevin@swox.se>
9950 * mpn/x86/pentium/logops_n.asm: New file.
9952 * mpn/x86/k6/k62mmx/copyd.asm: Rewrite, smaller and simpler, faster on
9953 small sizes, slower on big sizes (about half the time).
9954 * mpn/x86/k6/k62mmx/copyi.asm: Remove file, in favour of generic x86.
9955 * mpn/x86/copyi.asm: Add some comments.
9956 * mpn/x86/k6/README: Update.
9958 * mpn/x86/k6/gcd_1.asm: New file.
9960 * gmp-impl.h (NEG_MOD): Fix type of __dnorm.
9962 * acinclude.m4 (GMP_C_SIZES): Fix use of __GMP_WITHIN_CONFIGURE.
9964 2001-03-15 Kevin Ryde <kevin@swox.se>
9966 * gmp.texi (GMPabs): New macro.
9967 (Float Comparison - mpf_reldiff): Use it.
9968 (Integer Comparisons - mpz_cmpabs): Ditto, puts "abs" in info.
9969 (Reentrancy): Update notes on old random functions.
9970 (Karatsuba Multiplication): Better characterize the effect of basecase
9971 speedups on the thresholds, pointed out by Torbjorn.
9973 * tune/README: Notes on the 1x1 div threshold for mpn_gcd_1.
9975 * tests/misc.c (mpz_pow2abs_p, mpz_flipbit, mpz_errandomb,
9976 mpz_errandomb_nonzero, mpz_negrandom): New functions.
9977 (mpz_erandomb, mpz_erandomb_nonzero): Use urandom().
9978 * tests/spinner.c (spinner_wanted, spinner_tick): Make global.
9979 * tests/tests.h: Update prototypes.
9981 * tests/mpz/t-cong.c, tests/mpz/t-cong_2exp.c: New files.
9982 * tests/mpz/Makefile.am (check_PROGRAMS): Add them.
9984 * mpz/cong.c, mpz/cong_2exp.c, mpz/cong_ui.c: New files.
9985 * Makefile.am, mpz/Makefile.am: Add them.
9986 * gmp-impl.h (NEG_MOD): New macro.
9987 * gmp-h.in (mpz_congruent_p, mpz_congruent_2exp_p,
9988 mpz_congruent_ui_p): Add prototypes.
9989 * gmp.texi (Integer Division, Efficiency): Add documentation.
9991 * mpq/aors.c: No need for ABS on denominator sizes.
9993 * gmp-impl.h (mpn_divisible_p): Use __MPN.
9995 * gmp-impl.h (LOW_ZEROS_MASK): New macro.
9996 * mpz/divis_ui.c, mpn/generic/divis.c: Use it.
9998 * mpz/setbit.c: Fix normalization for case of a negative ending up
9999 with a zero high limb.
10000 * tests/mpz/bit.c (check_single): New test for this problem.
10002 * configure.in (none-*-*): Fix cclist for default ABI=long.
10004 2001-03-10 Kevin Ryde <kevin@swox.se>
10006 * mpz/cfdiv_q_2exp.c: Don't scan for non-zero limbs if they don't
10007 matter to the rounding.
10009 * mpz/get_ui.c: Fetch _mp_d[0] unconditionally, so the code can come
10012 2001-03-08 Kevin Ryde <kevin@swox.se>
10014 * tests/devel/try.c (param_init): Fix reference functions for and_n
10017 * tune/speed.c, tests/devel/try.c: Seed RANDS, not srandom etc.
10018 * configure.in (AC_CHECK_FUNCS): Remove srand48 and srandom.
10019 * macos/configure (coptions): Remove random/srandom, now unnecessary.
10021 * configure.in (gmp.h, mp.h, demos/expr/expr-impl.h): Generate using
10023 (_LONG_LONG_LIMB, HAVE_MPFR): Change to AC_DEFINEs.
10024 * gmp-h.in, mp-h.in, demos/expr/expr-impl-h.in: Change to #undef's.
10025 * acinclude.m4 (GMP_FUNC_ALLOCA, GMP_C_SIZES): Use gmp-h.in, not gmp.h.
10026 * Makefile.am (EXTRA_DIST): Remove gmp-h.in and mp-h.in, now done
10028 * acinclude.m4 (GMP_FUNC_ALLOCA), gmp-impl.h: Set and use
10029 __GMP_WITHIN_CONFIGURE rather than GMP_FUNC_ALLOCA_TEST.
10031 * mpf/random2.c: Use _gmp_rand and RANDS instead of random() for the
10032 exponent, ensures full range of values too.
10034 * tests/mpz/t-div_2exp.c (check_various): Start with d based on i, but
10035 don't let it go negative.
10037 * tune/tuneup.c (KARATSUBA_MUL_THRESHOLD): Limit probing to
10038 TOOM3_MUL_THRESHOLD_LIMIT, the size of the workspace in mul_n.c.
10039 Use a -1 with this too, so size<LIMIT not <=.
10041 2001-03-07 Torbjorn Granlund <tege@swox.com>
10043 * mpn/cray/cfp/mul_1.c: Don't call mpn_add_n with size 0.
10044 * mpn/cray/cfp/addmul_1.c: Likewise.
10045 * mpn/cray/cfp/submul_1.c: Don't call mpn_sub_n with size 0.
10047 * tests/mpz/t-div_2exp.c (check_various): Start 2nd d loop from 0
10048 (avoid problems with Cray compilers).
10050 2001-03-06 Torbjorn Granlund <tege@swox.com>
10052 * mpn/cray/ieee/submul_1.c: Don't call mpn_sub_n with size 0.
10054 * mpn/cray/ieee/mul_basecase.c: New file.
10055 * mpn/cray/ieee/sqr_basecase.c: New file, derived from mul_basecase.c.
10057 2001-03-06 Kevin Ryde <kevin@swox.se>
10059 * tests/devel/try.c (pointer_setup): Allow dst_size == SIZE_SIZE2 for
10060 the benefit of mpn_tdiv_qr.
10062 * tune/tuneup.c (all): Start karatsuba probing at size==4, for the
10063 benefit of cray t90 ieee which has speed oddities at size==2.
10065 * gmp-impl.h (USE_LEADING_REGPARM): Use __GMP_GNUC_PREREQ.
10066 Use __GMP_ATTRIBUTE_PURE and ATTRIBUTE_CONST in a few places.
10068 * gmp-h.in (__GMP_GNUC_PREREQ) New macro.
10069 (__GMP_ATTRIBUTE_PURE): New macro, use it in many places.
10071 * gmp-impl.h, gmp-h.in (mpn_jacobi_base): Move prototype to
10072 gmp-impl.h, use ATTRIBUTE_CONST.
10074 * tune/speed.h (speed_cyclecounter): Inline asm version for i386.
10076 * mpz/cfdiv_r_2exp.c (cfdiv_r_2exp): Only reread "up" after second
10077 realloc, first is under w!=u.
10079 2001-03-05 Torbjorn Granlund <tege@swox.com>
10081 * mpn/cray/sub_n.c: Rewrite using `majority' logic.
10083 * mpz/cfdiv_r_2exp.c (cfdiv_r_2exp): Reread `up' after realloc of w.
10085 * mpn/cray/ieee/mul_1.c: Rewrite. Streamline multiplications;
10086 use `majority' logic.
10087 * mpn/cray/ieee/addmul_1.c: Likewise.
10089 * mpn/cray/add_n.c: Rewrite using `majority' logic.
10091 2001-03-04 Torbjorn Granlund <tege@swox.com>
10093 * longlong.h (CRAY udiv_qrnnd): No longer conditional on CRAYMPP.
10094 (64-bit hppa add_ssaaaa): New.
10095 (64-bit hppa sub_ddmmss): New.
10097 * mpn/cray/ieee/invert_limb.c: New file.
10099 * gmp-impl.h (RANDS): Add a `,0' to make it compile on more compilers.
10101 2001-03-03 Kevin Ryde <kevin@swox.se>
10103 * mpz/n_pow_ui.c (ULONG_PARITY): Move to gmp-impl.h.
10104 * gmp-impl.h (ULONG_PARITY): i386 part from n_pow_ui.c, new generic
10107 * tests/mpz/t-div_2exp.c: New file, rewrite of t-2exp.c.
10108 * tests/mpz/t-2exp.c: Remove file.
10109 * tests/mpz/Makefile.am (check_PROGRAMS): Update.
10111 * gmp-h.in (mpz_cdiv_q_2exp, mpz_cdiv_q_2exp): Add prototypes.
10112 * gmp.texi (Integer Division): Add mpz_cdiv_q_2exp and mpz_cdiv_q_2exp.
10114 * mpz/cfdiv_q_2exp.c: New file, partial rewrite of fdiv_q_2exp.c, add
10115 mpz_cdiv_q_2exp entrypoint.
10116 * mpz/cfdiv_r_2exp.c: New file, rewrite of fdiv_r_2exp.c, use all mpn,
10117 add mpz_cdiv_r_2exp entrypoint.
10118 * mpz/fdiv_q_2exp.c, mpz/fdiv_r_2exp.c: Remove files.
10119 * mpz/Makefile.am (libmpz_la_SOURCES): Update.
10120 * Makefile.am (MPZ_OBJECTS): Ditto.
10122 * gmp-impl.h (USE_LEADING_REGPARM): Use __i386__ same as longlong.h
10123 (REGPARM_2_1, REGPARM_3_1, REGPARM_ATTR): New macros.
10124 * mpz/jacobi.c (jac_or_kron): Use them.
10126 * configure.in (HAVE_ABI_$ABI): Re-enable this for config.m4, with
10127 dots changed to underscores (necessary for hppa).
10129 * tests/mpz/t-divis.c, tests/mpz/t-divis_2exp.c: New files.
10130 * tests/mpz/Makefile.am (check_PROGRAMS): Add them.
10132 * gmp-h.in (mpz_divisible_p, mpz_divisible_ui_p,
10133 mpz_divisible_2exp_p): Add prototypes.
10134 * gmp.texi (Integer Division): Add mpz_divisible_p.
10135 (Efficiency): Add remarks about divisibility testing.
10137 * mpz/divis.c, mpz/divis_ui.c, mpz/divis_2exp.c: New files.
10138 * mpz/Makefile.am (libmpz_la_SOURCES): Add them.
10139 * Makefile.am (MPZ_OBJECTS): Ditto.
10141 * mpn/generic/divis.c: New file.
10142 * configure.in (gmp_mpn_functions): Add it.
10143 * mpn/Makefile.am (nodist_libdummy_la_SOURCES): Ditto.
10144 * gmp-impl.h (mpn_divisible_p): Add prototype.
10146 * urandom.h: Remove file.
10147 * Makefile.am (EXTRA_DIST): Remove it.
10149 * tests/mpz/convert.c, dive.c, io.c, logic.c, reuse.c, t-2exp.c,
10150 t-fdiv.c, t-fdiv_ui.c, t-gcd.c, t-jac.c, t-mul.c, t-pow.c,
10151 t-powm.c, t-powm_ui.c, t-root.c, t-sqrtrem.c, t-tdiv.c,
10152 t-tdiv_ui.c: Use RANDS, initialized by tests_rand_start.
10154 * tests/mpz/t-pow.c: New file, being t-pow_ui renamed and with some
10155 further tests added.
10156 * tests/mpz/t-pow_ui.c: Remove file.
10157 * tests/mpz/Makefile.am (check_PROGRAMS): Update.
10159 * tests/t-modlinv.c: Don't use urandom.h.
10160 * tests/mpz/bit.c, tests/mpz/t-scan.c: Ditto.
10161 * tests/mpq/t-cmp.c, tests/mpq/t-cmp_ui.c, tests/mpq/t-get_d.c: Ditto.
10162 * tests/mpf/reuse.c, t-add.c, t-conv.c, t-dm2exp.c, t-muldiv.c,
10163 t-sqrt.c, t-sub.c: Ditto.
10165 * tests/misc.c (tests_rand_start, tests_rand_end): New functions.
10166 (tests_start, tests_end): Use them.
10167 (urandom): New function.
10168 * tests/tests.h: Add prototypes.
10170 * mpz/random.c: Rewrite using mpz_urandomb and RANDS.
10171 * mpn/generic/random.c: Rewrite using _gmp_rand and RANDS.
10172 * mpn/generic/random2.c: Use RANDS not random() etc.
10174 * gmp-impl.h (__gmp_rands, __gmp_rands_initialized): Add externs.
10175 (gmp_randstate_ptr): New typedef.
10176 (RANDS, RANDS_CLEAR): New macros.
10178 * rands.c: New file.
10179 * Makefile.am (libgmp_la_SOURCES): Add it.
10181 * configure.in (mpn_objs_in_libmp): New AC_SUBST.
10182 * Makefile.am (libmp_la_DEPENDENCIES): Use it.
10184 2001-03-02 Torbjorn Granlund <tege@swox.com>
10186 * mpn/pa64/udiv_qrnnd.asm: New file.
10188 2001-03-01 Kevin Ryde <kevin@swox.se>
10190 * mpbsd/rpow.c: New file.
10191 * mpbsd/Makefile.am (libmpbsd_la_SOURCES): Add it
10192 (nodist_libmpbsd_la_SOURCES): Remove pow_ui.c.
10193 * Makefile.am (MPBSD_OBJECTS): Add rpow.lo, remove pow_ui.lo.
10194 (libmp_la_DEPENDENCIES): Add mpz/n_pow_ui.lo.
10196 * mpz/ui_pow_ui.c: Rewrite using mpz_n_pow_ui.
10197 * mpz/pow_ui.c: Ditto, and no longer provide rpow for mpbsd.
10199 * mpz/n_pow_ui.c: New file, rewrite of pow_ui.c and ui_pow_ui.c. Use
10200 less temporary memory, strip factors of 2 from the base, use mpn_mul_2
10202 * mpz/si_pow_ui.c: New file.
10203 * mpz/Makefile.am (libmpz_la_SOURCES): Add them.
10204 * Makefile.am (MPZ_OBJECTS): Ditto.
10205 * gmp-impl.h (mpz_n_pow_ui): Add prototype.
10206 * gmp-h.in (mpz_si_pow_ui): Add prototype.
10207 * gmp.texi (Integer Exponentiation): Add mpz_si_pow_ui.
10209 * acinclude.m4 (GMP_C_SIZES): Add BITS_PER_ULONG.
10210 Correction to mp_limb_t working check.
10211 * configure.in (limb_chosen): New variable.
10212 * tests/t-constants.c (BITS_PER_ULONG): Check this value.
10213 Add some reminders about tests that fail on Cray.
10215 * tests/refmpn.c (refmpn_mul_2): New function.
10216 * tests/refmpz.c (refmpz_pow_ui): Copied from tests/mpz/t-pow_ui.c
10217 * tests/tests.h: Add prototypes.
10219 * configure.in (none-*-*): Add ABI=longlong.
10220 * doc/configuration (Long long limb testing): Describe it.
10222 * gmp.texi (Low-level Functions): Move some commented out remarks ...
10223 * mpn/generic/mul_basecase.c: ... to here.
10225 * mpn/x86/README: Note "%=" as an alternative to "1:" in __asm__.
10227 * tests/trace.c (mp_trace_start): Print "bin" for binary.
10229 * mpn/generic/dump.c: Add a couple of casts to keep gcc quiet.
10231 * gmp-h.in (mpn_incr_u, mpn_decr_u): Add parens around arguments.
10233 * mpbsd/mout.c, mpbsd/mtox.c (num_to_text): Remove unused variable.
10235 * mpfr/set_d.c (mpfr_get_d2): Declare "q" for 64-bit limbs.
10237 2001-02-28 Torbjorn Granlund <tege@swox.com>
10239 * mpn/pa64w/udiv_qrnnd.asm: Tune.
10241 2001-02-27 Torbjorn Granlund <tege@swox.com>
10243 * mpn/pa64w/udiv_qrnnd.asm: New file.
10245 2001-02-26 Torbjorn Granlund <tege@swox.com>
10247 * longlong.h (arm): Optimize sub_ddmmss by testing for constant
10249 * mpn/arm/invert_limb.asm: New file.
10251 2001-02-24 Torbjorn Granlund <tege@swox.com>
10253 * mpn/generic/lshift.c: Rewrite.
10254 * mpn/generic/rshift.c: Rewrite.
10256 * longlong.h: Use UWtype for external interfaces that expect mp_limb_t.
10258 * longlong.h (arm): #define invert_limb.
10260 * mpn/arm: Make labels have local scope.
10262 * configure.in (arm*-*-*): Set extra_functions.
10263 * longlong.h (arm): #define udiv_qrnnd.
10264 * mpn/arm/udiv.asm: New file.
10266 2001-02-24 Kevin Ryde <kevin@swox.se>
10268 * tune/many.pl: Add mpn_count_leading_zeros, mpn_count_trailing_zeros
10269 and mpn_invert_limb. Add count_leading_zeros, count_trailing_zeros
10270 from a .h file. Correction to modexact_1_odd prototype. Support
10272 * tune/speed.h, tune/common.c: Consequent changes.
10274 * demos/expr/*: Make a few more functions available in expressions,
10275 create only libexpr.a, misc minor updates.
10277 * mpn/Makeasm.am: Add some comments about suffix ordering.
10279 * tests/refmpn.c (rshift_make, lshift_make): No need to compare
10282 * mpq/mul.c: Detect and optimize squaring.
10284 2001-02-23 Torbjorn Granlund <tege@swox.com>
10286 * mpn/mips3: Convert files to `.asm'.
10288 * mpn/arm: Convert files to `.asm'. Misc cleanups.
10289 * mpn/arm/submul_1.asm: New file.
10291 2001-02-21 Kevin Ryde <kevin@swox.se>
10293 * tune/tuneup.c (all): Only one compiler print should match, no need
10294 for #undef PRINTED_COMPILER.
10296 * mpfr/mpfr.h (mpfr_sgn): Use mpfr_cmp_ui (patch from Paul).
10298 * mpz/fib_ui.c: Update some remarks about alternative algorithms.
10299 * gmp.texi (Fibonacci Numbers Algorithm): Ditto.
10300 (Assigning Floats): Clarify mpf_swap swaps the precisions too.
10301 (Low-level Functions): Try to be clearer about negative cofactors.
10303 2001-02-21 Torbjorn Granlund <tege@swox.com>
10305 * mpn/sparc64/copyi.asm: Streamline for small operands.
10306 * mpn/sparc64/add_n.asm: Likewise.
10307 * mpn/sparc64/sub_n.asm: Likewise.
10309 * mpn/sparc64/copyd.asm: New file.
10311 2001-02-20 Torbjorn Granlund <tege@swox.com>
10313 * mpn/sparc64/lshift.asm: Rewrite.
10314 * mpn/sparc64/rshift.asm: Rewrite.
10316 2001-02-19 Torbjorn Granlund <tege@swox.com>
10318 * mpn/sparc64/add_n.asm: Rewrite using `majority' logic.
10319 * mpn/sparc64/sub_n.asm: Likewise.
10321 * tune/tuneup.c (all): Recognise DECC and MIPSpro compilers.
10323 * mpn/pa64/sqr_diagonal.asm: Use PROLOGUE/EPILOGUE.
10324 * mpn/pa642/sqr_diagonal.asm: Likewise.
10326 * configure.in (HAVE_ABI_$abi): Disable for now.
10328 * mpn/asm-defs.m4 (PROLOGUE): Use LABEL_SUFFIX.
10330 * acinclude.m4 (GMP_ASM_ATTR): New check, for hppa oddities.
10332 2001-02-18 Torbjorn Granlund <tege@swox.com>
10334 * mpn/hppa/hppa1_1/gmp-mparam.h: New file.
10335 * mpn/hppa/hppa2_0/gmp-mparam.h: New file.
10337 * mpn/pa64/sqr_diagonal.asm: New file.
10338 * mpn/pa64w/sqr_diagonal.asm: New file.
10339 * mpn/hppa/hppa1_1/sqr_diagonal.asm: New file.
10340 * mpn/hppa/hppa2_0/sqr_diagonal.asm: New file.
10342 * mpn/sparc32/v9/add_n.asm: Use `fitod' instead of `fxtod' for dummy
10344 * mpn/sparc32/v9/sub_n.asm: Likewise.
10346 2001-02-18 Kevin Ryde <kevin@swox.se>
10348 * gmp.texi (Known Build Problems): Notes on make, $* and K&R, misc
10350 (Low-level Functions): Use {} notation in mpn_sqrtrem.
10351 (Basecase Multiplication): Mention BASECASE_SQR_THRESHOLD.
10353 * mpfr/isnan.c (mpfr_number_p): Infinity is not a number.
10354 * mpfr/out_str.c: Pass strlen+1 for the block size to free.
10355 * mpfr/get_str.c: Correction for realloc to strlen+1.
10357 * acinclude.m4 (GMP_C_SIZES): Generate an error if mp_limb_t doesn't
10358 seem to work for some reason.
10360 2001-02-16 Torbjorn Granlund <tege@swox.com>
10362 * mpn/sparc32/v9/gmp-mparam.h: Retune.
10364 * mpn/sparc32/v9/add_n.asm: New file.
10365 * mpn/sparc32/v9/sub_n.asm: New file.
10367 * mpn/sparc32/v9/mul_1.asm: Tune function entry.
10368 * mpn/sparc32/v9/addmul_1.asm: Likewise.
10369 * mpn/sparc32/v9/submul_1.asm: Likewise.
10371 * mpn/sparc32/v9/sqr_diagonal.asm: New file.
10373 2001-02-16 Kevin Ryde <kevin@swox.se>
10375 * configure.in: Fix flags selection when $CC is a compiler known to us.
10377 * demos/expr/exprfr.c (e_mpfr_cos, e_mpfr_sin): mpfr_sin_cos now
10378 allows NULL for one parameter.
10380 * mpfr/*: Update to 20010215.
10381 * mpfr/trunc.c: Use -DOPERATION scheme, and gmp mpn_zero_p.
10382 * mpfr/sqrt.c: Use plain mpn_sqrtrem, not mpn_sqrtrem_new.
10383 * mpfr/sqrtrem.c: Remove file.
10384 * mpfr/Makefile.am (libmpfr_a_SOURCES): Add isnan.c and set_ui.c,
10385 remove sqrtrem.c and srandom.h.
10387 * configfsf.guess: Update to 2001-02-13.
10388 * configfsf.sub: Update to 2001-02-16.
10389 * config.sub (j90, t90): Remove special handing, configfsf.sub now ok.
10391 * Makefile.am (MPF_OBJECTS): Add a couple of missing $U's.
10393 * tune/tuneup.c: Identify compiler used (GCC and Sun C so far).
10395 2001-02-15 Torbjorn Granlund <tege@swox.com>
10397 * mpn/sparc32/v9/mul_1.asm: Change `ld' to `lduw' and `st' to `stw'.
10398 * mpn/sparc32/v9/addmul_1.asm: Likewise.
10399 * mpn/sparc32/v9/submul_1.asm: Likewise.
10401 2001-02-14 Torbjorn Granlund <tege@swox.com>
10403 * mpn/mips3/mips.m4: New file.
10404 * configure.in (mips*-*-irix[6789]*): Use mips3/mips.m4.
10406 * mpn/powerpc64/sqr_diagonal.asm: New file.
10408 * mpn/mips3/sqr_diagonal.asm: New file.
10410 2001-02-12 Torbjorn Granlund <tege@swox.com>
10412 * mpn/powerpc32/sqr_diagonal.asm: New file.
10414 * mpn/generic/sqr_basecase.c: Remove declaration of mpn_sqr_diagonal.
10415 Fix typo in header comment.
10417 2001-02-12 Kevin Ryde <kevin@swox.se>
10419 * mpn/generic/mul.c, mpn/generic/mul_n.c, gmp-impl.h: Use
10420 mpn_mul_basecase for squaring below new BASECASE_SQR_THRESHOLD.
10421 * tune/tuneup.c gmp-impl.h: Tune BASECASE_SQR_THRESHOLD.
10423 * Makefile.am (libgmp.la, libmp.la): Revert change to build from
10424 mpn/libmpn.la etc, go back to explicitly listed objects.
10426 * configure.in: Recognise sparc64-*-*, not just sparc64-*-linux*.
10428 2001-02-11 Torbjorn Granlund <tege@swox.com>
10430 * mpn/asm-defs.m4 (sqr_diagonal): New define_mpn.
10432 * mpn/alpha/sqr_diagonal.asm: New file.
10434 2001-02-11 Kevin Ryde <kevin@swox.se>
10436 * gmp.texi (Low-level Functions): Note mpn_get_str clobbers its input
10439 * mpfr/add.c,agm.c,exp2.c,exp3.c,generic.c,log2.c,pi.c,print_raw.c,
10440 set_d.c,sin_cos.c,sqrtrem.c,sub.c: Apply some tweaks for K&R.
10441 * tests/mpz/reuse.c, tests/mpq/t-md_2exp.c, demos/pexpr.c,
10442 demos/expr/t-expr.c: Ditto.
10444 * configure.in (HAVE_ABI_$abi): New define in config.m4.
10446 * gmp-impl.h (mpn_sqr_diagonal): Add prototype and define.
10447 * tune/speed.c,speed.h,common.c,many.pl: Add measuring of
10450 * gmp.texi, acinclude.m4: Mention x86 solaris 2.7 has the reg->reg
10451 movq bug the same as 2.6.
10453 * mpfr/Makefile.am (EXTRA_DIST): Add mpfr-test.h and mpf2mpfr.h.
10455 * mpn/x86/README: Merge contents of README.family.
10456 * mpn/x86/README.family: Remove file.
10458 * mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add mode1o, gcd_finda,
10459 invert_limb, sqr_diagonal; remove mod_1_rs; sort alphabetically.
10461 2001-02-10 Torbjorn Granlund <tege@swox.com>
10463 * configure.in (gmp_mpn_functions_optional): List sqr_diagonal.
10465 * mpn/powerpc32/aix.m4: Use unnamed csects.
10466 * mpn/powerpc64/aix.m4: Likewise.
10468 * acconfig.h: Add #undef of mpn_sqr_diagonal.
10469 Remove lots of spacing.
10471 * configure.in (syntax testing section): Match power* instead of
10473 * mpn/power: Convert files to `.asm'.
10474 Prefix umul_ppmm and sdiv_qrnnd.
10475 Update some comments.
10477 2001-02-09 Kevin Ryde <kevin@swox.se>
10479 * acconfig.h: Add HAVE_NATIVE_mpn_modexact_1_odd and
10480 HAVE_NATIVE_mpn_modexact_1c_odd.
10482 * configure.in (CCAS): Don't override a user selection.
10484 * mpq/cmp_ui.c: DIVIDE_BY_ZERO if den2==0.
10486 2001-02-08 Torbjorn Granlund <tege@swox.com>
10488 * mpn/generic/sqr_basecase.c: Use mpn_sqr_diagonal when appropriate.
10490 2001-02-07 Kevin Ryde <kevin@swox.se>
10492 * gmp.texi (Low-level Functions): mpn_preinv_mod_1 now undocumented.
10494 * mpn/generic/random2.c (myrandom): Use rand() on mingw.
10496 * mpn/alpha/gmp-mparam.h: Update tuned parameters.
10498 2001-02-05 Torbjorn Granlund <tege@swox.com>
10500 * mpn/alpha/ev6/gmp-mparam.h: Retune.
10502 2001-02-05 Kevin Ryde <kevin@swox.se>
10504 * Makefile.am (libgmp, libmp): Construct from mpn/libmpn.la etc rather
10505 than explicitly listed objects.
10507 * urandom.h: Use rand() on mingw.
10509 * mpn/powerpc64/lshift.asm,addsub_n.asm: Use r1 not 1.
10511 2001-02-04 Torbjorn Granlund <tege@swox.com>
10513 * mpn/ia64/copyi.asm: New file.
10514 * mpn/ia64/copyd.asm: New file.
10516 2001-02-04 Kevin Ryde <kevin@swox.se>
10518 * mpn/alpha/ev5/gmp-mparam.h, mpn/mips3/gmp-mparam.h,
10519 mpn/powerpc32/gmp-mparam.h, mpn/powerpc64/gmp-mparam.h,
10520 mpn/sparc64/gmp-mparam.h, mpn/x86/*/gmp-mparam.h:
10521 Update tuned parameters.
10523 * mpn/x86/i486: New directory.
10524 * configure.in (i486-*-*): Use it.
10525 * mpn/x86/i486/gmp-mparam.h: New file.
10527 * mpn/x86/pentium/mode1o.asm: New file.
10528 * mpn/x86/p6/mode1o.asm: New file.
10530 * tune/many.pl: Use $(ASMFLAGS_PIC) and $(CFLAGS_PIC).
10532 * gmp.texi (Integer Division): Another rewording of 2exp divisions.
10534 2001-02-03 Torbjorn Granlund <tege@swox.com>
10536 * mpn/arm/gmp-mparam.h: Tune.
10538 * mpn/ia64/popcount.asm: Put a `;;' break at end of main loop.
10540 * configure.in (arm*-*-*): Set gcc_cflags in order to pass
10541 $fomit_frame_pointer.
10543 * tests/mpz/t-mul.c (base_mul): Remove an unused variable.
10545 2001-02-02 Torbjorn Granlund <tege@swox.com>
10547 * demos/pexpr.c (TIME): New macro.
10548 (main): Use TIME--print timing more accurately.
10549 (setup_error_handler): Increase RLIMIT_DATA to 16 Mibyte.
10551 * longlong.h (arm): Add __CLOBBER_CC to add_ssaaaa and sub_ddmmss.
10553 2001-02-02 Kevin Ryde <kevin@swox.se>
10555 * configure.in: Don't remove gmp-mparam.h and mpn source links under
10556 --no-create since in that case they're not re-created.
10558 * demos/expr: New directory.
10559 * Makefile.am (SUBDIRS, allprogs): Add it.
10560 * demos/expr/README, Makefile.am, expr.c, exprv.c, exprz.c, exprza.c,
10561 exprq.c, exprqa.c, exprfa.c, exprf.c, exprfr.c, exprfra.c, expr.h,
10562 expr-impl-h.in, run-expr.c, t-expr.c: New files.
10563 * configure.in: Generate demos/expr/Makefile & demos/expr/expr-impl.h.
10565 * Makefile.am: Remove mpfr from main libgmp.
10566 * mpfr/Makefile.am: Build and install separate libmpfr.a.
10567 * mpfr/*: Update to mpfr 2001.
10569 * gmp-h.in (__GNU_MP_VERSION_MINOR): Bump to 2.
10570 * Makefile.am (libtool -version-info): Bump appropriately.
10573 * tune/divrem1div.c, tune/divrem1inv.c, tune/divrem2div.c,
10574 tune/divrem2inv.c: Renamed from divrem_1_div.c, divrem_1_inv.c,
10575 divrem_2_div.c, divrem_2_inv.c, to be unique in DOS 8.3 filenames.
10576 * tune/Makefile.am (libspeed_la_SOURCES): Update.
10578 * mpn/x86/*/README, mpn/x86/README.family: Misc updates.
10579 * tune/README: Misc updates.
10580 * doc/configuration: Misc updates.
10582 * mpn/x86/pentium/mmx/gmp-mparam.h: Change UDIV_PREINV_TIME to
10583 UDIV_NORM_PREINV_TIME.
10585 * mpz/pprime_p.c: Use ASSERT_ALWAYS instead of abort.
10587 * rand.c (__gmp_rand_lc_scheme): Add "const".
10588 (struct __gmp_rand_lc_scheme_struct): Make astr "const char *".
10590 * demos/calc/calc.y, demos/calc/calclex.l: Add kron function.
10592 * tests/devel/try.c: Partial rewrite, new scheme of function types,
10593 allow result validation functions, add sqrtrem and jacobi testing.
10594 * tune/many.pl: Corresponding updates.
10595 * tests/devel/Makefile.am: Add a convenience rule for libtests.la.
10597 * tests/refmpz.c: New file.
10598 * tests/Makefile.am: Add it.
10599 * tests/misc.c (mpz_erandomb, mpz_erandomb_nonzero): New functions.
10600 * tests/tests.h: Add prototypes.
10602 * mpn/x86/k6/cross.pl: Add a couple more exceptions.
10604 * gmp.texi: Don't use @nicode{'\0'}, it doesn't come out right in tex.
10605 (Introduction to GMP): Mention Cray vector systems.
10606 (Build Options): Describe --enable-mpfr, refer to its manual. Add
10607 Crays under supported CPUs.
10608 (Debugging): Add notes on source file paths.
10609 (Autoconf): New section.
10610 (Assigning Integers): Note truncation by mpz_set_d, mpz_set_q and
10612 (Converting Integers): Note the size mpz_get_str allocates.
10613 (Floating-point Functions): Rewrite introduction, clarifying some
10614 points about precision handling.
10615 (Converting Floats): Note the size mpf_get_str allocates, and that it
10616 gives an empty string for zero. Add mpf_get_si and mpf_get_ui.
10617 (Float Comparison): Give the formula mpf_reldiff calculates.
10618 (Miscellaneous Float Functions): Add mpf_integer_p and mpf_fits_*_p.
10619 (Random Number Functions): Misc rewordings for clarity.
10620 (Random State Initialization): Ditto.
10621 (Custom Allocation): Remove note on deallocate_function called with 0,
10622 misc rewording and clarifications.
10623 (Exact Remainder): New section.
10624 (Binary GCD): A few words on initial reduction using division.
10625 (Accelerated GCD): Refer to exact remainder section.
10626 (Extended GCD): Extra remarks on single versus double selection.
10627 (Jacobi Symbol): Update for mpz/jacobi.c rewrite and modexact_1_odd.
10628 (Modular Powering Algorithm): Refer to exact remainder section.
10629 (Assembler SIMD Instructions): Update remarks on MMX.
10630 (Contributors): Amend to "Divide and Conquer" division.
10631 (References): Tweak some formatting. Add "Proof of GMP Fast Division
10632 and Square Root Implementations" by Paul Zimmermann.
10634 2001-01-31 Torbjorn Granlund <tege@swox.com>
10636 * configure.in: Don't ever pass -mips3; let ABI flags imply ISA.
10638 2001-01-31 Kevin Ryde <kevin@swox.se>
10640 * tune/time.c: Remove unnecessary longlong.h.
10641 (speed_endtime): Add some extra diagnostics.
10643 * tests/mpz/t-fdiv_ui.c, tests/mpz/t-tdiv_ui.c: Use unsigned long for
10644 the divisor, not mp_limb_t.
10645 * tests/mpz/t-jac.c (try_base): Use %llu for long long limb.
10646 * tests/trace.c: Add <string.h> for strlen.
10648 * tune/freq.c (speed_cpu_frequency_proc_cpuinfo): Ignore "cycle
10649 frequency" of 0, allow "BogoMIPS" as well as "bogomips".
10651 * macos/Makefile.in: Add mpf/fits_s.c and mpf/fits_u.c objects.
10653 2001-01-30 Torbjorn Granlund <tege@swox.com>
10655 * longlong.h: Add add_ssaaaa and sub_ddmmss for 64-bit sparc.
10657 2001-01-29 Torbjorn Granlund <tege@swox.com>
10659 * mpn/powerpc64/addmul_1.asm: Prefix registers with an `r'.
10660 * mpn/powerpc64/submul_1.asm: Likewise.
10661 * mpn/powerpc64/mul_1.asm: Likewise.
10663 * configure.in (alpha*-*-*): Amend last change to handle pca*.
10665 2001-01-29 Kevin Ryde <kevin@swox.se>
10667 * tune/speed.h (SPEED_ROUTINE_INVERT_LIMB_CALL): Don't let the
10668 compiler optimize everything away.
10670 * tune/speed.c, tune/speed.h, tune/common.c, tune/Makefile.am: Measure
10671 operator_div, operator_mod, mpn_divrem_2_div, mpn_divrem_2_inv,
10672 mpn_sb_divrem_m3, mpn_sb_divrem_m3_div, mpn_sb_divrem_m3_inv,
10673 mpn_dc_divrem_sb_div, mpn_dc_divrem_sb_inv.
10674 * tune/divrem_2_div.c, tune/divrem_2_inv.c, tune/sb_div.c,
10675 tune/sb_inv.c: New files.
10677 * tune/tuneup.c, gmp-impl.h, tune/speed.h, tune/common.c,
10678 tune/Makefile.am: Tune SB_PREINV_THRESHOLD and DIVREM_2_THRESHOLD.
10680 * mpn/generic/divrem_2.c: Use new DIVREM_2_THRESHOLD.
10681 * mpn/generic/sb_divrem_mn.c: Use new SB_PREINV_THRESHOLD.
10683 * mpn/x86/p6/mmx/lshift.asm, mpn/x86/p6/mmx/rshift.asm: New files,
10684 just m4 include()ing the P55 code.
10685 * configure.in (pentium[23]-*-*): Remove x86/pentium/mmx from path.
10687 2001-01-27 Kevin Ryde <kevin@swox.se>
10689 * configure.in (AC_CHECK_FUNCS): Add srand48.
10690 * tune/speed.c: Use this test.
10692 * acinclude.m4 (GMP_GCC_MARCH_PENTIUMPRO): Allow "egcs-" prefix on gcc
10693 --version, warn if the format is unrecognised.
10694 (GMP_COMPARE_GE): Guard against empty $1 not only on last arg.
10695 (GMP_INIT, GMP_FINISH, GMP_PROG_M4): Obscure or eliminate literal
10696 "dnl"s since autoconf thinks they indicate faulty macros.
10698 * mpz/get_str.c, mpf/get_str.c: Make allocated string block exactly
10699 strlen(str)+1 bytes.
10700 * mpz/dump.c, mpf/dump.c, tests/mpz/convert.c: Use this size when
10702 * tests/mpf/t-conv.c: Ditto, and ensure x==0 is exercised.
10704 * tests/mpz/t-fits.c: New file.
10705 * tests/mpz/Makefile.am: Add it.
10707 * tests/mpf/t-fits.c: New file.
10708 * tests/mpf/t-get_si.c: New file.
10709 * tests/mpf/t-int.c: New file.
10710 * tests/mpf/Makefile.am: Add them.
10712 * mpf/fits_s.c: New file.
10713 * mpf/fits_u.c: New file.
10714 * mpf/get_si.c: New file.
10715 * mpf/get_ui.c: New file.
10716 * mpf/int_p.c: New file.
10717 * Makefile.am, mpf/Makefile.am: Add them.
10718 * gmp-h.in (mpf_fits_*_p, mpf_get_si, mpf_get_ui, mpf_integer_p): Add
10721 * tests/memory.c (tests_allocate, tests_reallocate): Guard against
10724 * tests/mpz/*.c, tests/mpq/*.c, tests/mpf/*.c: Uses tests_start and
10727 * gmp-impl.h (USE_LEADING_REGPARM): Fix conditionals.
10729 2001-01-23 Kevin Ryde <kevin@swox.se>
10731 * configure.in, mpn/Makeasm.am (ASMFLAGS_PIC): New substitution,
10732 allowing -DPIC to be suppressed on cygwin.
10733 (CFLAGS_PIC): New substitution, use it and $(CCAS) directly, rather
10734 than $(LIBTOOL), avoiding a problem with FreeBSD 2.2.8.
10736 * mpn/x86/k6/mode1o.asm, mpn/x86/k7/mode1o.asm: Remove an unnecessary
10737 +[.-L(here)] from _GLOBAL_OFFSET_TABLE_, avoids a segv from gas 1.92.3.
10738 * mpn/x86/README.family: Add notes on the problem.
10740 2001-01-20 Torbjorn Granlund <tege@swox.com>
10742 * configure.in (alpha*-*-*): Default `flavour' to ev4.
10744 2001-01-19 Kevin Ryde <kevin@swox.se>
10746 * assert.c, gmp-impl.h (__gmp_assert_fail): Change return type to
10747 void, since it's no longer used in expressions.
10749 * mpn/x86/addsub_n.S: Remove file, since it doesn't work and it upsets
10752 * mpz/jacobi.c: Rewrite, but still binary algorithm; accept zero and
10753 negative denominators; merge mpz_jacobi and mpz_legendre, add
10754 mpz_kronecker; use mpn directly, add special cases for size==1.
10755 * gmp.texi (Number Theoretic Functions): Update.
10756 * gmp-h.in (mpz_kronecker): Add prototype.
10757 * gmp-impl.h (USE_LEADING_REGPARM): New macro.
10758 * tests/mpz/t-jac.c: Test mpz_kronecker.
10759 * mpz/legendre.c: Remove file.
10760 * Makefile.am, mpz/Makefile.am: Update.
10762 * longlong.h (alpha count_leading_zeros): Use __attribute__ ((const))
10763 when possible, add parameter to prototype.
10764 (ia64 udiv_qrnnd): Use for all compilers, not just gcc.
10765 (pentium count_trailing_zeros): Use count_leading_zeros.
10767 * acinclude.m4 (GMP_C_ATTRIBUTE_CONST, GMP_C_ATTRIBUTE_NORETURN): New
10769 * configure.in: Use them.
10770 * gmp-impl.h (ATTRIBUTE_CONST, ATTRIBUTE_NORETURN): New macros.
10771 (mpn_invert_limb): Add ATTRIBUTE_CONST.
10772 (__gmp_assert_fail): Add ATTRIBUTE_NORETURN.
10774 2001-01-18 Kevin Ryde <kevin@swox.se>
10776 * gmp-h.in, gmp-impl.h (__gmp_allocate_func, __gmp_reallocate_func,
10777 __gmp_free_func): Move prototypes from gmp-impl.h to gmp-h.in, for the
10778 benefit of gmp++.h.
10780 * gmp-impl.h, tests/misc.c, tests/tests.h: Move MPZ_SET_STR_OR_ABORT
10781 and MPF_SET_STR_OR_ABORT to mpz_set_str_or_abort and
10782 mpf_set_str_or_abort in libtests.
10783 * tests/mpz/convert.c, tests/mpz/t-bin.c, tests/mpz/t-get_si.c,
10784 tests/mpz/t-jac.c, tests/mpz/t-misc.c, tests/mpq/t-md_2exp.c,
10785 tests/mpq/t-set_f.c, tests/mpf/t-conv.c, tests/mpf/t-misc.c: Update.
10787 * mpn/generic/sqrtrem.c: Use MPN_COPY_INCR (for when rp==NULL).
10789 * tests/mpz/reuse.c: Only run mpz_divexact_gcd on positive divisors.
10791 2001-01-18 Torbjorn Granlund <tege@swox.com>
10793 * demos/pexpr.c (main): Accept -vml option.
10794 (fns): List `hamdist', `pow', `nextprime'.
10795 (mpz_eval_expr): Return -1 for `popc' of negative.
10796 (mpz_eval_expr): Handle `hamdist', `pow', `nextprime'.
10798 2001-01-15 Kevin Ryde <kevin@swox.se>
10800 * mpn/alpha/ev5/mode1o.c: New file.
10802 * tune/freq.c (speed_cpu_frequency_measure): Check cycles_works_p
10803 before running speed_cyclecounter.
10804 * tune/speed.h (cycles_works_p): Add prototype.
10806 2001-01-13 Torbjorn Granlund <tege@swox.com>
10808 * tests/rand/t-rand.c (farr): Fix typo.
10811 2001-01-12 Kevin Ryde <kevin@swox.se>
10813 * mpz/kronsz.c: Don't depend on right shifting a negative.
10815 * mpn/x86/gmp-mparam.h: New file.
10817 * mpn/x86/pentium/mmx/mul_1.asm: New file.
10819 2001-01-11 Torbjorn Granlund <tege@swox.com>
10821 * mpz/kronsz.c: Temporary workaround for Cray right shift oddities.
10822 Explicitly compare against zero in tests.
10824 2001-01-10 Kevin Ryde <kevin@swox.se>
10826 * mpz/kronzs.c: Don't depend on right shifting a negative.
10828 2001-01-09 Torbjorn Granlund <tege@swox.com>
10830 * tests/t-constants.c: Disable some undefined tests.
10831 (CHECK_MAX_S): Remove workaround for gcc 2.95.2 bug recently added.
10833 2001-01-09 Kevin Ryde <kevin@swox.se>
10835 * tests/t-constants.c: Add more diagnostics.
10836 (CHECK_MAX_S): Fix for gcc 2.95.2 -mpowerpc64 -maix64.
10838 * mpn/x86/k6/mode1o.asm: New file.
10839 * mpn/x86/k7/mode1o.asm: New file.
10841 * mpn/asm-defs.m4 (modexact_1_odd, modexact_1c_odd): New define_mpn's.
10842 (__clz_tab, modlimb_invert_table, PROLOGUE, EPILOGUE): Add asserts for
10844 * mpn/x86/x86-defs.m4 (Zdisp): Add a movzbl.
10846 * tests/mpz/t-jac.c (check_a_zero): New test.
10847 (check_squares_zi): Fix to use (a^2/b), not (a*b/b); revert last
10848 change avoiding a,b=0, both are fine.
10849 (try_2den): Don't use mpz_kronecker_ui for the expected answer.
10850 (try_*): Call abort rather than exit.
10852 * mpz/kronzu.c, mpz/kronzs.c: Fix for a=0.
10854 * tune/tuneup.c (USE_PREINV_MOD_1): Fix to use new DATA_HIGH_LT_R.
10856 2001-01-08 Torbjorn Granlund <tege@swox.com>
10858 * urandom.h: Amend 2000-11-21 change to also handle cygwin.
10860 2001-01-08 Kevin Ryde <kevin@swox.se>
10862 * tune/many.pl: Updates for move to tests/devel, add modexact_1_odd,
10863 don't assume C files can't have carry-in entrypoints, remove
10864 $(TRY_TESTS_OBJS) now in libtests.
10866 * tests/devel/try.c, tests/refmpn.c, tests/tests.h: Remove
10867 mpn_mod_1_rshift testing.
10869 * tune/tuneup.c (fft_step_size): Test for overflow using the actual
10870 mp_size_t, don't use BITS_PER_INT.
10872 * tune/speed.c (r_string): "r" is a limb, use BITS_PER_MP_LIMB and
10873 change LONG_ONES to LIMB_ONES.
10874 * tune/time.c (M_2POWU): Use INT_MAX rather than BITS_PER_INT.
10876 * extract-dbl.c (BITS_PER_PART): Use BITS_PER_MP_LIMB not
10879 * mpz/inp_raw.c, mpz/out_raw.c: Add private defines of BITS_PER_CHAR.
10880 * mpz/fac_ui.c, tests/mpz/t-fac_ui.c: Don't use BITS_PER_LONGINT.
10881 * tests/mpz/t-get_si.c: Don't use BITS_PER_LONGINT, do the LONG_MAX
10882 tests with some explicit code.
10884 * mpn/*/gmp-mparam.h, acinclude.m4, tests/t-constants.c
10885 (BITS_PER_LONGINT, BITS_PER_INT, BITS_PER_SHORTINT, BITS_PER_CHAR):
10886 Remove defines, remove probings, remove tests.
10888 * tune/tuneup.c (MODEXACT_1_ODD_THRESHOLD): Add tuning.
10890 * tune/speed.c,speed.h,common.c: Add measuring of mpn_modexact_1_odd,
10891 mpn_gcd_finda, and an "N" form for mpn_gcd_1.
10893 * tests/mpz/t-jac.c (check_squares_zi): Ensure random a,b != 0.
10895 2001-01-07 Kevin Ryde <kevin@swox.se>
10897 * configure.in (gmp_mpn_functions): Add mode1o, remove mod_1_rs.
10899 * mpn/generic/mod_1_rs.c: Remove file, no longer needed.
10900 * gmp-h.in (mpn_mod_1_rshift): Remove prototype and define.
10902 * mpq/set_f.c: Use MPN_STRIP_LOW_ZEROS_NOT_ZERO.
10904 * mpz/kronzu.c, mpz/kronzs.c, mpz/kronuz.c, mpz/kronsz.c: Use
10905 mpn_modexact_1_odd, new style MPN_STRIP_LOW_ZEROS_NOT_ZERO, and new
10906 JACOBI macros. Various rearrangements supporting all this.
10908 * mpn/generic/gcd_1.c: Use mpn_modexact_1_odd, reduce u%v if u much
10909 bigger than v when size==1, some rearrangements supporting this.
10911 * gmp-impl.h (JACOBI_*): More macros, add some casts to "int".
10912 (MPN_STRIP_LOW_ZEROS_NOT_ZERO): Add a "low" parameter.
10913 (mpn_modexact_1_odd, mpn_modexact_1c_odd): Add prototype and defines.
10914 (MODEXACT_1_ODD_THRESHOLD): New threshold.
10915 (MPN_MOD_OR_MODEXACT_1_ODD, JACOBI_MOD_OR_MODEXACT_1_ODD): New macros.
10917 * mpn/generic/mode1o.c: New file.
10919 * tests/mpz/reuse.c: Add testing of mpz_divexact_gcd.
10920 * tests/mpz/t-fac_ui.c: Use libtests for memory leak checking.
10921 * tests/mpz/t-fib_ui.c: Add a usage comment.
10923 * tests/mpz/bit.c: Use libtests.
10924 * tests/mpz/t-scan.c: Remove unused subroutines.
10925 * tests/devel/try.c: Use libtests, define PROT_NONE if the system
10928 * tests/spinner.c, tests/x86check.c: Use tests.h.
10929 * tests/trace.c: Use tests.h, add mpf_trace.
10930 * tests/refmpn.c: Use tests.h, add refmpn_malloc_limbs_aligned,
10931 refmpn_tstbit, refmpn_neg.
10933 * tune/common.c, tune/speed.h: Update for functions moved to
10936 * tune/Makefile.am, tests/mpz/Makefile.am, tests/mpq/Makefile.am,
10937 tests/mpf/Makefile.am: Use tests/libtests.la.
10939 * configure.in (AC_OUTPUT): Update for new directories.
10940 (x86 CALLING_CONVENTIONS_OBJS): Use .lo for libtests.la, allow
10941 ansi2knr on x86check.c.
10943 * tests/Makefile.am: Establish new libtests.la convenience library,
10944 add mpz, mpq, mpf, mpbsd subdirectories.
10945 * tests/tests.h: New file.
10946 * mpn/tests/ref.h,try.h: Remove files, now in tests.h.
10948 * tests/mpf/ref.c: Move to tests/refmpf.c, rename functions to refmpf.
10949 * tests/mpf/t-add.c, tests/mpf/t-sub.c: Use libtests.
10950 * tests/mpf/Makefile.am: Update.
10952 * tests/memory.c: New file.
10953 * tests/misc.c: New file, a few subroutines from the test programs.
10955 * mpz/tests, mpq/tests, mpf/tests, mpbsd/tests: Move directories to
10957 * mpz/Makefile.am, mpq/Makefile.am, mpf/Makefile.am, mpbsd/Makefile.am
10960 * tests/devel: New directory.
10961 * mpn/tests/*.c: Move programs to tests/devel.
10962 * mpn/tests/Makefile.am, mpn/tests/README: Move to tests/devel, update.
10964 * mpn/tests/ref.c: Move to tests/refmpn.c.
10965 * mpn/tests/spinner.c,trace.c,x86call.asm,x86check.c: Move to tests
10968 * tests/t-constants.c: Add checks of HIGHBIT, MAX and MIN constants,
10969 simplify ANSI vs K&R stringizing, use correct printf format types, do
10970 all tests before aborting.
10972 2001-01-05 Torbjorn Granlund <tege@swox.com>
10974 * mpn/cray/ieee/gmp-mparam.h: Retune.
10976 2001-01-05 Kevin Ryde <kevin@swox.se>
10978 * configure.in (mp.h): Only create this under --enable-mpbsd.
10980 * demos/calc: New subdirectory, move demos/calc* to it.
10981 * demos/calc/Makefile.am: New file, split from demos/Makefile.am.
10982 * demos/Makefile.am: Update.
10983 * configure.in (AC_OUTPUT): Add demos/calc/Makefile.
10985 * tests/t-constants.c (CALC_BITS_PER_TYPE etc): Use a run-time test
10986 for how many bits work in a give type, don't assume bits==8*sizeof.
10988 2001-01-04 Kevin Ryde <kevin@swox.se>
10990 * mpz/fits_s.c, mpz/fits_u.c: New files, split from fits.c, use plain
10991 UINT_MAX etc, not MPZ_FITS_UTYPE_SDT etc.
10992 * mpz/fits.c: Remove file.
10993 * mpz/Makefile.am, macos/Makefile.in: Update.
10995 * gmp-impl.h (UNSIGNED_TYPE_MAX etc): Remove these generic forms.
10996 (MPZ_FITS_[SU]TYPE_SDT): Remove these.
10997 (UINT_MAX etc): Provide a full set of defaults.
10998 * gmp-h.in (__GMP_MP_SIZE_T_INT): New define.
11000 * mpz/tests/t-scan.c: New file.
11001 * mpz/tests/Makefile.am (check_PROGRAMS): Add it.
11003 * mpz/scan0.c, mpz/scan1.c: Rewrite, don't read beyond allocated
11004 memory, support negatives, return ULONG_MAX for no bit found.
11005 * gmp.texi (Integer Logic and Bit Fiddling): Update.
11007 2001-01-03 Torbjorn Granlund <tege@swox.com>
11009 * mpz/tests/dive.c: Generate test operands using new random functions.
11010 * mpz/tests/io.c: Likewise.
11011 * mpz/tests/logic.c: Likewise.
11012 * mpz/tests/t-2exp.c: Likewise.
11014 * stack-alloc.c (__gmp_tmp_alloc): Round `now' to required alignment.
11016 * stack-alloc.h (__TMP_ALIGN): Append `L'.
11018 * gmp-impl.h: For Cray, #include limits.h.
11019 (LONG_MIN): New #define.
11020 (ULONG_HIGHBIT): #define in terms of ULONG_MAX.
11021 (LONG_HIGHBIT): #define as LONG_MIN.
11022 (USHRT_MAX): New name for USHORT_MAX.
11023 (SHRT_MAX): New name for SHORT_MAX.
11024 (SHRT_MIN): New #define.
11025 (USHORT_HIGHBIT,SHORT_HIGHBIT): Removed.
11027 * mpbsd/tests/t-misc.c (check_itom [data]): *SHORT* => *SHRT*;
11028 remove code disabling a test for Cray.
11030 * tests/t-constants.c (CHECK_CONSTANT): Cast parameters to long.
11032 * mpn/generic/mul_n.c (mpn_kara_sqr_n): Remove unused variable `t'.
11033 (mpn_kara_mul_n): Likewise.
11035 * mpz/fac_ui.c (MPZ_SET_1_NZ): Actually use `__z'.
11037 * mpz/tests/t-jac.c
11038 (main, check_squares_zi): Generate test operands using new random
11041 All changes below on this date for enabling `make; make check'
11042 with C++ compilers:
11044 * mpz/tests/t-pow_ui.c (debug_mp, ref_mpz_pow_ui): Provide prototypes.
11046 * mpz/tests/t-mul.c (debug_mp, base_mul, ref_mpz_mul):
11047 Provide prototypes.
11048 (dump_abort): Provide prototype and declare properly for C++.
11050 * mpz/tests/t-jac.c: #include stdlib.h and sys/time.h.
11052 * mpz/tests/t-fdiv.c
11053 (dump_abort): Provide prototype and declare properly for C++.
11054 (debug_mp): Provide prototype.
11055 * mpz/tests/t-fdiv_ui.c: Likewise.
11056 * mpz/tests/t-gcd.c: Likewise.
11057 * mpz/tests/t-powm.c: Likewise.
11058 * mpz/tests/t-powm_ui.c: Likewise.
11059 * mpz/tests/t-sqrtrem.c: Likewise.
11060 * mpz/tests/t-tdiv_ui.c: Likewise.
11061 * mpz/tests/t-tdiv.c: Likewise.
11063 * mpz/tests/t-2exp.c: #include stdlib.h and sys/time.h.
11064 Remove #include of longlong.h.
11066 * mpz/tests/io.c: #include config.h, stdlib.h, sys/time.h, and
11067 conditionally unistd.h.
11069 * mpz/tests/dive.c: #include stdlib.h and sys/time.h.
11070 (dump_abort): Provide prototype and declare properly for C++.
11071 (debug_mp): Provide prototype.
11072 * mpz/tests/logic.c: Likewise.
11074 * mpz/tests/convert.c (debug_mp): Provide prototype.
11075 * mpz/tests/t-root.c (debug_mp): Likewise.
11077 * mpz/tests/bit.c: #include stdlib.h and sys/time.h.
11079 * mpq/tests/t-get_d.c: #include stdlib.h and sys/time.h.
11080 (dump): Provide prototype and declare properly for C++.
11082 * mpq/tests/t-cmp_ui.c: #include stdio.h, stdlib.h and sys/time.h.
11083 (ref_mpq_cmp_ui): Declare properly for C++.
11085 * mpq/tests/t-cmp.c: #include stdlib.h and sys/time.h.
11086 (ref_mpq_cmp): Declare properly for C++.
11087 (dump): Delete unused function.
11089 * mpf/random2.c (myrandom): New function.
11090 (mpf_random2): Use it.
11092 * mpn/generic/random2.c: #include stdlib.h (for random/mrand48).
11093 (myrandom): New function.
11094 (mpn_random2): Use it.
11096 * mpf/tests/t-add.c: #include stdlib.h and sys/time.h.
11097 (oo): Remove unused function.
11098 * mpf/tests/t-conv.c: Likewise.
11099 * mpf/tests/t-sub.c: Likewise.
11100 * mpf/tests/t-dm2exp.c: Likewise.
11101 * mpf/tests/t-muldiv.c: Likewise.
11102 * mpf/tests/t-sqrt.c: Likewise.
11104 * mpf/tests/reuse.c: #include stdlib.h and sys/time.h.
11105 Use PROTO on some typedefs.
11106 (oo): Remove function.
11107 (dump_abort): Call mpf_dump instead of oo.
11109 * mpf/set_str.c: #include stdlib.h (for strtol).
11111 * mpf/random2.c: #include stdlib.h (for random/mrand48).
11112 * mpn/alpha/udiv_arnnd: File deleted.
11114 * Remove K&R function headers.
11116 2001-01-02 Torbjorn Granlund <tege@swox.com>
11118 * mpn/generic/mul.c: Clean up spacing and indentation.
11120 * mpn/generic/mul_fft.c (mpn_fft_add_modF): Use mpn_decr_u.
11121 Clean up spacing and indentation.
11123 * extract-dbl.c: Generalize to handle smaller limb sizes.
11125 2001-01-01 Torbjorn Granlund <tege@swox.com>
11127 * mpbsd/mout.c: Output newline after "0".
11129 2000-12-31 Torbjorn Granlund <tege@swox.com>
11131 * ltmain.sh: Remove space between `#!' and `$SHELL' when generating
11134 * mpbsd/tests/t-misc.c (check_itom): Exclude test for all Cray
11135 vector systems. Correct comment.
11137 2000-12-31 Kevin Ryde <kevin@swox.se>
11139 * gmp.texi (ABI and ISA): New enough gcc needed for mips n32 etc, gcc
11140 2.95 needed for sparc 64-bit ABI, gcc 2.8 needed for -mv8plus.
11142 * configure.in ([cjt]90,sv1-cray-unicos*): Preserve user specified
11143 MPN_PATH, amend test program indenting.
11144 (none-*-*): Add -DNO_ASM to gcc to disable longlong.h asm macros in
11147 * config.sub (j90, t90): Preserve these, don't let configfsf.sub turn
11150 * config.guess (m68k-*-nextstep*,m68k-*-openstep*): Don't transform
11151 m68k to m68020, since m68k is already interpreted as 68020.
11153 2000-12-30 Kevin Ryde <kevin@swox.se>
11155 * mpq/neg.c: Rewrite, use mpn, avoid denominator copy if unnecessary.
11157 * mpz/tstbit.c: Rewrite, slightly simplified.
11158 * mpz/tests/bit.c (check_tstbit): New test, and add a couple more
11159 diagnostics elsewhere.
11161 * configure.in (x86 gcc_cflags_cpu): Add -m486 for gcc 2.7.2.
11162 (ccbase): Only use a known compiler in eval statements (avoids
11163 problems with non-symbol characters).
11164 (ccbase): Use GMP_PROG_CC_IS_GNU to identify gcc installed under a
11166 (cclist): Use same style $abi as other variables.
11168 * acinclude.m4 (GMP_PROG_CC_IS_GNU): New macro.
11169 (GMP_GCC_MARCH_PENTIUMPRO): Use $ccbase to identify gcc.
11170 (GMP_ASM_TYPE): Define TYPE to empty, not "dnl", when no .type needed.
11171 (GMP_ASM_SIZE): Ditto for SIZE, which ensures EPILOGUE on the last
11172 line of a file doesn't leave a tab and no newline.
11173 (GMP_ASM_UNDERSCORE): Add a prototype for C++.
11175 * configure.in (sys/mman.h, mprotect): New tests.
11176 * mpn/tests/try.c: Use them, and HAVE_UNISTD_H too.
11178 * configure.in (getopt.h): Remove test.
11179 * tune/speed.c, mpn/tests/try.c (getopt.h): Remove include, since
11180 plain getopt() is in <unistd.h>.
11182 * configure.in, gmp-h.in (mips*-*-irix6*): Set limb_n32=longlong
11183 rather than using _ABIN32.
11185 2000-12-29 Torbjorn Granlund <tege@swox.com>
11187 * mpz/tests/reuse.c: Rename dump_abort => dump.
11188 * mpz/tests/reuse.c: Generate operands using gmp_rand*.
11189 * mpz/tests/convert.c: Likewise.
11191 * configure.in: Detect T90-ieee systems; move Cray path
11192 selection to after AC_PROG_CC. Invoke AC_PROG_CPP.
11193 * mpn/cray/cfp: New directory. Move cfp specific files here.
11194 * mpn/cray/cfp/mulwwc90.s: New file.
11195 * mpn/cray/cfp/mulwwj90.s: New file.
11196 * mpn/cray/mulww.s: Delete.
11198 2000-12-27 Torbjorn Granlund <tege@swox.com>
11200 * mpn/cray/ieee/mul_1.c: New file.
11201 * mpn/cray/ieee/addmul_1.c: New file.
11202 * mpn/cray/ieee/submul_1.c: New file.
11203 * mpn/cray/ieee/gmp-mparam.h: New file.
11205 * mpn/cray/gmp-mparam.h: Disable UMUL_TIME and UDIV_TIME.
11207 * mpn/cray/hamdist.c: New file.
11208 * mpn/cray/popcount.c: New file.
11209 * mpn/cray/rshift.c: New file.
11210 * mpn/cray/lshift.c: New file.
11212 * longlong.h: Add count_leading_zeros for _CRAY.
11213 Reorganize _CRAY stuff.
11215 2000-12-24 Kevin Ryde <kevin@swox.se>
11217 * configure.in (alpha*-cray-unicos*): Disable SPEED_CYCLECOUNTER_OBJ,
11218 as tune/alpha.asm doesn't suit.
11220 * mpn/generic/sqrtrem.c, mpz/pow_ui.c, mpz/powm_ui.c, mpf/get_str.c,
11221 mpf/set_str.c: Use mpn_sqr_n when applicable, not mpn_mul_n.
11223 2000-12-23 Torbjorn Granlund <tege@swox.com>
11225 * mpn/generic/mul_fft.c: Reformat.
11226 (mpn_fft_neg_modF): Remove.
11227 (mpn_fft_mul_2exp_modF): Inline mpn_fft_neg_modF.
11229 * mpn/cray/gmp-mparam.h: Retune.
11231 * configure.in (*-cray-unicos*): Pass `-O3 -htask0'.
11232 (vax*-*-*): Fix typo.
11234 * mpn/cray/mul_1.c: Use dynamic arrays, get rid of TMP_*.
11235 * mpn/cray/addmul_1.c: Likewise.
11236 * mpn/cray/submul_1.c: Likewise.
11237 * mpn/cray/add_n.c: Likewise.
11238 * mpn/cray/sub_n.c: Likewise.
11240 * configure.in (default cc_cflags,cc_64_cflags): Remove -g/add -O.
11241 (mips*-*-irix[6789]*]): Remove -g from cc_*_cflags.
11243 2000-12-22 Torbjorn Granlund <tege@swox.com>
11245 * mpn/generic/mul_n.c: Delete K&R function headers.
11247 * mpn/generic/mul_n.c (mpn_kara_mul_n): Clean up type confusion
11248 between mp_limb_t and mp_size_t.
11249 (mpn_kara_sqr_n): Likewise.
11251 * mpn/generic/mul_n.c (mpn_kara_mul_n): Use mpn_incr_u.
11252 (mpn_kara_sqr_n): Likewise.
11254 * mpn/generic/mul_n.c (mpn_kara_mul_n): Change handling of `sign'
11255 to work around GCC 2.8.1 MIPS bug.
11257 * configure.in (implied alpha*-cray-unicos*): Remove -g from cc_cflags.
11259 2000-12-21 Torbjorn Granlund <tege@swox.com>
11261 * mpn/alpha/invert_limb.asm: Simplify a bit.
11262 Add handling of bigend systems.
11263 * mpn/alpha/unicos.m4: Define `bigend'.
11264 * mpn/alpha/default.m4: Define `bigend' (to expand to nothing).
11266 * tests/t-constants.c (CHECK_CONSTANT): Print using %lx.
11268 * mpn/alpha/gmp-mparam.h: Remove sizes for plain C types.
11269 * mpn/alpha/ev5/gmp-mparam.h: Likewise.
11270 * mpn/alpha/ev6/gmp-mparam.h: Likewise.
11272 * mpn/alpha/unicos.m4: Define LEA.
11273 * mpn/alpha/default.m4: Likewise.
11274 * mpn/alpha/invert_limb.asm: Use LEA for loading symbolic addresses.
11275 * mpn/alpha/cntlz.asm: Likewise.
11277 * mpn/alpha/cntlz.asm: Don't use `ldbu', use slightly slower
11278 `ldq_u' + `extbl' instead.
11280 * mpn/alpha/unicos.m4: Define EXTERN.
11281 * mpn/alpha/default.m4: Define EXTERN (to expand to nothing).
11282 * mpn/alpha/cntlz.asm: Declare __clz_tab usign `EXTERN' (for the
11283 benefit of Unicos).
11285 2000-12-21 Kevin Ryde <kevin@swox.se>
11287 * mpn/alpha/unicos.m4 (GSYM_PREFIX): Define for the benefit of
11290 2000-12-20 Torbjorn Granlund <tege@swox.com>
11292 * longlong.h: Add udiv_qrnnd and count_leading_zeros for _CRAYMPP
11295 2000-12-19 Torbjorn Granlund <tege@swox.com>
11297 * configure.in (*sparc*-*-*): Remove -g from cc_cflags and acc_cflags.
11299 * mpn/generic/sqrtrem.c (mpn_sqrtrem): Separate `limb' values from
11302 * configure.in (*-cray-unicos*): Add `-Wa,-B' to cc_cflags.
11304 * demos/pexpr.c (rstate): New variable.
11305 (main): Initialize rstate.
11306 (enum op_t): Add RANDOM.
11307 (fns): Add field for RANDOM.
11308 (mpz_eval_expr): Handle RANDOM.
11310 2000-12-19 Kevin Ryde <kevin@swox.se>
11312 * mpn/generic/sqrtrem.c: Rewrite by Paul Zimmermann, based on his
11313 Karatsuba Square Root algorithm.
11314 * gmp.texi (Square Root Algorithm): Update.
11316 * tune/many.pl: New file.
11318 * mpn/tests/try.c,ref.[ch] (mpn_preinv_mod_1, mpn_sb_divrem_mn,
11319 mpn_tdiv_qr, mpn_gcd_finda, mpn_kara_mul_n, mpn_kara_sqr_n,
11320 mpn_toom3_mul_n, mpn_toom3_sqr_n): Add testing.
11321 * mpn/tests/ref.c: Cast some "0"s in function calls.
11323 * mpn/x86/k7/mmx/mod_1.asm: Add preinv_mod_1 entrypoint, remove extra
11324 variable for loop termination.
11326 * mpn/x86/p6/mmx/mod_1.asm: Remove file, in favour of the following.
11327 * mpn/x86/p6/mod_1.asm: New file.
11329 * mpn/x86/pentium/mod_1.asm: New file.
11331 2000-12-18 Torbjorn Granlund <tege@swox.com>
11333 * configure.in (mips*-*-irix[6789]*): Pass options to compiler using
11336 2000-12-18 Kevin Ryde <kevin@swox.se>
11338 * mpn/x86/k6/pre_mod_1.asm: New file.
11340 * tune/tuneup.c (USE_PREINV_MOD_1): Tune this, rearrange mpn_divrem_1
11341 and mpn_mod_1 handling in support of it.
11342 * tune/Makefile.am: Consequent changes to divrem_1.c and mod_1.c.
11344 * gmp-impl.h (USE_PREINV_MOD_1, MPN_MOD_OR_PREINV_MOD_1): New macros.
11345 * mpn/generic/perfsqr.c, mpz/pprime_p.c: Use MPN_MOD_OR_PREINV_MOD_1.
11347 * configure.in: Let an asm mod_1 provide a preinv_mod_1 entrypoint.
11349 * mpn/alpha/default.m4: Remove some newlines, add some asserts.
11350 (r0 etc, f0 etc): Use defreg and deflit.
11351 (PROLOGUE, PROLOGUE_GP, EPILOGUE): Use GSYM_PREFIX.
11352 * mpn/alpha/unicos.m4: Remove some newlines, add some asserts.
11353 * mpn/alpha/invert_limb.asm: Remove unused second DATASTART parameter.
11354 * mpn/alpha/cntlz.asm: Use mpn_count_leading_zeros and __clz_tab.
11356 * mpn/asm-defs.m4 (changecom): Comments on portability.
11357 (__clz_tab, modlimb_invert_table): New macros, matching gmp-impl.h.
11358 (count_leading_zeros, count_trailing_zeros): New define_mpn's.
11359 (PROLOGUE etc): Comments on usage, add some asserts.
11360 (OPERATION_[lr]shift): Use m4_not_for_expansion, for the benefit of
11361 lorrshift multifunc.
11363 * mpn/Makeasm.am (RM_TMP): New variable controlling tmp-*.s
11364 removal, for development purposes.
11366 * mpz/fac_ui.c: Fix for long long limb by using mpn_mul_1 not
11367 mpz_mul_ui, and note some possible enhancements.
11369 * mpz/tests/t-fac_ui.c: New test.
11370 * mpz/tests/Makefile.am (check_PROGRAMS): Add it.
11371 * macos/Makefile.in: Ditto, and add t-fib_ui too.
11373 * mpn/generic/[lr]shift.c: Remove some DEBUG code adequately covered
11374 by new parameter ASSERTs.
11376 * longlong.h (count_trailing_zeros): Assert x!=0.
11378 * doc/configuration: Updates for new configure things, add some notes
11381 2000-12-16 Torbjorn Granlund <tege@swox.com>
11383 * configure.in (*-*-aix): Pass -qmaxmem=20000 to xlc also for 64-bit
11385 * configure.in: Disable shared libs for *-*-ultrix*.
11387 2000-12-15 Torbjorn Granlund <tege@swox.com>
11389 * configure.in (powerpc*-*-*): Pass -Wa,-mppc when using gcc.
11391 * gmp-impl.h (_EXTERN_INLINE): #define different for GCC and other
11394 * gmp-h.in (__gmp_inline): Remove.
11395 * mp-h.in: Likewise.
11396 * mpn/generic/gcd.c: Use `inline' instead of `__gmp_inline'.
11398 * configure.in (mips*-*-irix[6789]*): Define *_ldflags.
11400 2000-12-14 Torbjorn Granlund <tege@swox.com>
11402 * mpn/generic/pre_mod_1.c: Use proper type for udiv_qrnnd
11405 * mpn/generic/divrem_1.c: Use explicit `!= 0' in if statement.
11406 * mpn/generic/mod_1.c: Likewise.
11408 2000-12-14 Kevin Ryde <kevin@swox.se>
11410 * config.guess (mips-*-irix[6789]*): Transform to mips64.
11411 (m68k-*-nextstep* | m68k-*-openstep*): Transform to m68020.
11413 2000-12-13 Torbjorn Granlund <tege@swox.com>
11415 * tests/t-constants.c (main): Conditionalize use of PP_INVERTED.
11417 * mpn/mp_bases.c: Handle 4-bit limbs.
11418 (main): Add code for generating tables.
11420 * mpn/generic/popham.c: Handle limb bitsizes of 4, 8, 16.
11421 Suffix all 32-bit constant with `L'.
11422 Use CNST_LIMB for 64-bit constants.
11424 2000-12-13 Kevin Ryde <kevin@swox.se>
11426 * gmp-impl.h (FIB_THRESHOLD): Defaults for 4,8,16 bits per limb, and
11427 an arbitrary fallback default.
11428 (modlimb_invert): Add efficient code for 8,16 (or 4) bits per limb.
11430 * configure.in (mips3, mips64): Don't bother with o32 (mips2 32-bit
11433 * Makefile.am (SUBDIRS): Put "tests" first so tests/t-constants.c is
11434 run first, to pick up any limb size mismatch.
11436 * tune/tuneup.c (DIVREM_1, MOD_1): Fix result values, were off by 1.
11438 * mpz/fib_ui.c (table1, table2): Add data for 4,8,16 bits per limb.
11440 2000-12-12 Torbjorn Granlund <tege@swox.com>
11442 * gmp-impl.h (LIMBS_PER_DOUBLE): Define for any limb bitsize.
11444 2000-12-11 Torbjorn Granlund <tege@swox.com>
11446 * mpn/mp_bases.c: Add tables for 8-bit and 16-bit limbs.
11447 Round existing `double' values properly.
11449 * gmp-h.in (__gmp_randstate_struct): Prefix field names with _mp_
11450 to keep out of user name space.
11451 (__gmp_randata_lc): Likewise.
11452 * randclr.c, randlc.c, randlc2x.c, randraw.c, randsd.c, randsdui.c:
11453 Corresponding changes.
11455 * gmp-impl.h (PP): #define for machines with BITS_PER_MP_LIMB
11456 of 2, 4, 8, and 16.
11457 (PP_FIRST_OMITTED): New, define for various BITS_PER_MP_LIMB.
11459 (PP_MAXPRIME): Remove.
11461 * mpn/generic/perfsqr.c: Generalize PP handling for machines with
11462 limbs of < 32 bits. Allow PP_INVERTED to be undefined.
11463 * mpz/pprime_p.c: Likewise.
11465 2000-12-10 Torbjorn Granlund <tege@swox.com>
11467 * mpn/generic/mul_1.c: Declare parameters in C89 style.
11469 2000-12-10 Kevin Ryde <kevin@swox.se>
11471 * tune/Makefile.am (speed_LDFLAGS, speed_ext_LDFLAGS, tune_LDFLAGS):
11472 Don't use -all-static, as gcc 2.95.2 on i386 solaris 8 doesn't like
11475 * configure.in (mips3,mips64): Add ABI=64, name the others ABI=n32 and
11477 * mpn/mips3/gmp-mparam.h (BITS_PER_LONGINT): Remove #define and let
11478 configure determine it, since it varies with ABI=64 or ABI=n32.
11479 * gmp.texi (ABI and ISA): Update.
11480 (mpz_mod_ui): Remark that it's identical to mpz_fdiv_r_ui.
11481 (mpn_divexact_by3): Qualify a statement needing mp_bits_per_limb even.
11483 * mul_fft.c (mpn_fft_mul_modF_K etc): Patch by Paul Zimmermann to fix
11484 results in certain cases of recursing into a further FFT.
11486 2000-12-09 Torbjorn Granlund <tege@swox.com>
11488 * mpz/cmpabs.c: Remove unused variable.
11489 * mpz/rrandomb.c: Likewise.
11490 * mpz/xor.c: Likewise.
11492 2000-12-07 Torbjorn Granlund <tege@swox.com>
11494 * mpn/generic/gcdext.c: Handle double carry when computing s1.
11495 Merge two code blocks for computing s0 and s1.
11497 2000-12-07 Kevin Ryde <kevin@swox.se>
11499 * configure.in (hppa*-*-*): Remove -Aa -D_HPUX_SOURCE from
11500 cc_cflags/cppflags, and instead let AM_C_PROTOTYPES add it, or -Ae,
11503 * configure.in (*-*-aix[34]*): Disable shared by default, but let
11504 the user override that, if desired.
11505 * gmp.texi (Notes for Particular Systems): Update.
11507 2000-12-06 Torbjorn Granlund <tege@swox.com>
11509 * mpq/cmp_ui.c: Streamline.
11511 2000-12-06 Kevin Ryde <kevin@swox.se>
11513 * tune/divrem_1_div.c,divrem_1_inv.c,mod_1_div.c,mod_1_inv.c,
11514 gcdext_double.c: New files for measuring.
11515 * tune/Makefile.am (libspeed_la_SOURCES): Add them.
11516 * tune/speed.c,speed.h,common.c: Add measuring of them.
11517 (mpn_preinv_mod_1, mpz_jacobi, mpz_powm_ui): Add measuring.
11519 * speed.c (getopt_long): Don't use this, just plain getopt.
11520 * configure.in (getopt_long): Remove test.
11522 * gmp-impl.h (MPN_KARA_MUL_N_TSIZE, MPN_KARA_MUL_N_MINSIZE,
11523 MPN_TOOM3_MUL_N_TSIZE, MPN_TOOM3_MUL_N_MINSIZE): New macros, and
11524 assume toom3 square tsize was meant to be the same as the mul (both
11525 are overestimates).
11526 * tune/tuneup.c, mpn/generic/mul.c, mpn/generic/mul_n.c: Use them.
11527 * mpn/generic/mul_n.c (mpn_toom3_sqr_n): Fix an ASSERT to use
11528 TOOM3_SQR_THRESHOLD not TOOM3_MUL_THRESHOLD, add a few that might
11529 be more realistic size checks.
11530 * tune/speed.h (SPEED_ROUTINE_MPN_MUL_N_TSPACE etc): Use minsize.
11532 * mpn/generic/divrem_1.c: Partial rewrite, merge fractional part
11533 calculation, skip a divide step in more cases, introduce
11534 DIVREM_1_NORM_THRESHOLD and DIVREM_1_UNNORM_THRESHOLD.
11535 * mpn/generic/mod_1.c: Partial rewrite, skip a divide step in more
11536 cases, introduce MOD_1_NORM_THRESHOLD, MOD_1_UNNORM_THRESHOLD.
11537 * longlong.h (UDIV_PREINV_ALWAYS): New define, set for alpha and ia64.
11538 * tune/tuneup.c (DIVREM_1_NORM_THRESHOLD, DIVREM_1_UNNORM_THRESHOLD,
11539 MOD_1_NORM_THRESHOLD, MOD_1_UNNORM_THRESHOLD): Tune these.
11540 * gmp-impl.h [TUNE_PROGRAM_BUILD]: Support for this.
11541 * tune/Makefile.am (TUNE_MPN_SRCS): Add divrem_1.c and mod_1.c.
11543 * gmp-impl.h (UDIV_NORM_PREINV_TIME): Renamed from UDIV_PREINV_TIME.
11544 * mpn/generic/perfsqr.c, mpn/generic/sb_divrem_mn.c,
11545 mpn/x86/*/gmp-mparam.h: Ditto.
11546 * gmp-impl.h (UDIV_UNNORM_PREINV_TIME): New define.
11548 * configure.in (AC_C_INLINE, HAVE_INLINE): New test and define.
11549 * gmp-impl.h (inline): Remove, use config.h.
11550 (_EXTERN_INLINE): Redefine based on HAVE_INLINE.
11551 (mpn_zero_p): Use HAVE_INLINE.
11553 * acinclude.m4 (GMP_PROG_AR, GMP_PROG_NM): Don't add flags to a user
11554 selected $AR or $NM.
11556 * tune/tuneup.c (all): Print how long the tuning took.
11558 * configure.in (AM_C_PROTOTYPES): Use this, not GMP_ANSI2KNR.
11559 * acinclude.m4 (GMP_ANSI2KNR): Remove.
11561 * Makefile.am (gmp.h, mp.h): In DISTCLEANFILES not CLEANFILES.
11563 * gmp-h.in (mpn_divmod, mpn_divmod_1, mpn_divexact_by3): Cast some
11564 zeros, for the benefit of K&R if long!=int.
11566 * mpn/lisp/gmpasm-mode.el (gmpasm-comment-start-regexp): Add "*" for
11567 the benefit of cray.
11569 * compat.c (mpn_divexact_by3, mpn_divmod_1): Return types should be
11570 mp_limb_t, not int, and need an actual "return".
11572 2000-12-05 Torbjorn Granlund <tege@swox.com>
11574 * mpn/sparc32/v8/supersparc/gmp-mparam.h: Retune.
11575 * mpn/alpha/gmp-mparam.h: Tune for 21064.
11577 * longlong.h: Reformat to avoid newlines within strings.
11579 * gmp-impl.h (inline): Disable if GCC has defined __STRICT_ANSI__.
11581 * configure.in: Do a `mkdir tune' before creating tune/sqr_basecase.c.
11583 * Makefile.am: Treat mp.h analogously to gmp.h.
11585 configure.in (*-*-aix): Pass -qmaxmem=20000 to xlc.
11587 * mp-h.in: Renamed from mp.h.
11588 Add #define for _LONG_LONG_LIMB.
11589 Move some other fixes from gmp-h.in.
11591 * configure.in: Generate mp.h from mp-h.in like we handle
11594 2000-12-04 Torbjorn Granlund <tege@swox.com>
11596 * acinclude.m4: Fix typo testing for bad HP compiler.
11598 2000-12-03 Torbjorn Granlund <tege@swox.com>
11600 * mpbsd/tests/t-misc.c (check_itom): Exclude some tests for Cray
11603 * longlong.h (CRAYIEEE umul_ppmm): New.
11605 * mpn/cray/gmp-mparam.h (BITS_PER_SHORTINT): 32 => 64.
11606 (*_THRESHOLD): Tune.
11608 * configure.in: Disable shared libs for *-*-unicos*.
11610 2000-12-03 Kevin Ryde <kevin@swox.se>
11612 * configure.in, tune/Makefile.am: Create tune/sqr_basecase.c during
11613 configure, and use it unconditionally in $(nodist_tuneup_SOURCES).
11614 Fixes a problem with sqr_basecase.lo under --disable-static.
11616 2000-12-01 Torbjorn Granlund <tege@swox.com>
11618 * mpf/tests/t-get_d.c (LOW_BOUND,HIGH_BOUND): #define for non-IEEE
11621 * gmp-impl.h (union ieee_double_extract): Test for _CRAYIEEE.
11623 2000-11-30 Torbjorn Granlund <tege@swox.com>
11625 * mpz/tests/t-mul.c (base_mul): Fix re-evaluation problems in macro
11627 (ref_mpz_mul): New name from mpz_refmul. Make static.
11628 (base_mul): New name for _mpn_mul_classic.
11630 2000-11-30 Kevin Ryde <kevin@swox.se>
11632 * configure.in: Rewrite of CC/CFLAGS selection scheme, introduce a
11633 notion of ABI, merge compiler and mpn path selection, add flags
11634 selection for AR and NM, let CC without CFLAGS work.
11635 (AC_PROG_CC): Use this, not GMP_SELECT_CC.
11636 * acinclude.m4 (GMP_PROG_CC_WORKS): Don't use AC_TRY_COMPILE, combine
11637 cc/cflags parameter.
11638 (GMP_PROG_CC_FIND, GMP_CHECK_CC_64BIT, GMP_PROG_CC_SELECT): Remove.
11639 * gmp.texi (Installing GMP): Updates for new scheme.
11641 * configure.in (AC_CANONICAL_HOST): Use this and $host, not $target.
11642 * acinclude.m4, acconfig.h, longlong.h, mpn/x86/x86-defs.m4,
11643 mpn/x86/k7/mmx/popham.asm: Ditto, renaming HAVE_TARGET_CPU to
11645 * gmp.texi (Build Options, and elsewhere): Update.
11647 * acinclude.m4 (GMP_COMPARE_GE): New macro.
11648 (GMP_GCC_MARCH_PENTIUMPRO): Use it, add CC parameter, check for GCC.
11649 (GMP_HPC_HPPA_2_0): New macro, adapted from GMP_CHECK_CC_64BIT.
11651 * acinclude.m4 (GMP_PROG_AR): New macro, using AC_CHECK_TOOL, adding
11653 * configure.in: Use it
11655 * gmp-h.in: Renamed from gmp.h.
11656 (@define_LONG_LONG_LIMB@): Placeholder for instantiation.
11657 (__GNU_MP__): Bump to 3.
11658 * acinclude.m4 (GMP_VERSION): Get version from gmp-h.in.
11659 * configure.in: Create gmp.h from gmp-h.in to set _LONG_LONG_LIMB.
11660 * gmp.texi.h (ABI and ISA): Mention this.
11661 * acconfig.h (_LONG_LONG_LIMB): Remove undef.
11662 * Makefile.am: Distribute gmp-h.in, not gmp.h.
11664 * configure.in (AC_PROG_CPP, AC_PROG_INSTALL, AC_PROG_LN_S): Remove,
11665 dragged in by other macros.
11666 (gmp_asm_syntax_testing): Renamed from gmp_no_asm_syntax_testing.
11667 (AC_EXEEXT, AC_OBJEXT): Remove, done automatically by libtool.
11668 * configure.in, acinclude.m4: Remove "" from "`foo`", being
11669 unnecessary and not portable.
11671 * configure.in (GMP_LDFLAGS): New AC_SUBST flags for libtool link.
11672 (powerpc64*-*-aix*): Use for -Wc,-maix to fix shared library creation,
11673 but can't build shared and static at the same time.
11674 * Makefile.am (libgmp_la_LDFLAGS, libmp_la_LDFLAGS): Use
11676 * gmp.texi (Notes for Particular Systems): Update AIX problem
11678 * configure.in (AC_CONFIG_LINKS): Use where needed, not via gmp_links.
11679 (gmp_srclinks): Build up as needed, not via gmp_links.
11681 * acinclude.m4 (GMP_INIT): Do CONFIG_TOP_SRCDIR and asm-defs.m4 here.
11682 * configure.in (asm-defs.m4): Consequent changes.
11684 * acinclude.m4 (GMP_INCLUDE_MPN): Using include_mpn(), replacing
11685 GMP_INCLUDE and GMP_SINCLUDE.
11686 * configure.in (gmp_m4postinc): Remove this scheme, use
11687 GMP_INCLUDE_MPN instead.
11689 * configure.in (*-*-sco3.2v5*): Force ac_cv_archive_cmds_need_lc=no,
11690 until libtool does this itself.
11691 * gmp.texi (Known Build Problems): Remove SCO -lc problem.
11693 * configure, INSTALL.autoconf, etc: Update to autoconf 2000-11-29.
11694 * acinclude.m4 (GMP_C_SIZES): Use AC_CHECK_SIZEOF.
11695 * gmp.texi (Known Build Problems): Remove version.c sed/config.h
11698 * ltmain.sh, aclocal.m4: Update to libtool 2000-11-25.
11699 * ltconfig: No longer required, but leave an empty dummy for automake.
11700 * gmp.texi (Known Build Problems): Remove SunOS native ar ranlib
11703 * */Makefile.in, aclocal.m4: Update to automake 2000-11-25.
11704 * mpbsd/tests/Makefile.am, mpfr/tests/Makefile.am (check_PROGRAMS):
11705 Remove dummy, no longer required.
11706 * mpbsd/tests/dummy.c, mpfr/tests/dummy.c: Remove files.
11707 * depcomp: Remove file, no longer required (with no-dependencies).
11709 * texinfo.tex: Update to 2000-11-09.
11710 * gmp.texi (Build Options): Mention PDF from gmp.texi.
11711 * Makefile.am (MOSTLYCLEANFILES): Add gmp.tmp, from new texinfo.tex.
11713 * gmp.texi (Build Options): List alphaev56, alphapca56, alphaev67,
11714 hppa2.0n and power among supported CPUs.
11716 2000-11-30 Torbjorn Granlund <tege@swox.com>
11718 * mpz/tests/t-mul.c: Increase max operand size from 2^17 bits
11719 to 2^19 bits. Misc cleanups.
11721 2000-11-26 Kevin Ryde <kevin@swox.se>
11723 * tune/tuneup.c (FIB_THRESHOLD): Cope better with different speeds of
11724 odd and even sizes.
11726 * longlong.h (alpha): Use udiv_qrnnd and count_leading_zeros on all
11727 compilers, not just gcc.
11729 * pre_mod_1.c: Use conditional subtract to always skip a division.
11730 (UMUL_TIME, UDIV_TIME): Remove defaults, now in longlong.h.
11732 2000-11-22 Torbjorn Granlund <tege@swox.com>
11734 * mpn/pa64w/gmp-mparam.h: Retune.
11735 * mpn/pa64/gmp-mparam.h: Retune.
11736 * mpn/sparc64/gmp-mparam.h: Retune.
11738 2000-11-22 Kevin Ryde <kevin@swox.se>
11740 * gmp-impl.h (ABOVE_THRESHOLD, BELOW_THRESHOLD): New macros.
11741 * mpn/generic/gcdext.c: Use them.
11743 * mpn/generic/gcdext.c [WANT_GCDEXT_ONE_STEP]: Force only one step.
11744 * tune/gcdextos.c, tune/gcdextod.c: New files, one step gcdext, single
11746 * tune/Makefile.am (libspeed_la_SOURCES): Add them.
11747 (TUNE_MPN_SRCS): Remove gcdext.c.
11748 * tune/speed.h, tune/common.c, tune/speed.c: Add measuring.
11749 * tune/tuneup.c: Use for GCDEXT_THRESHOLD, plus check if double limb
11750 is ever better. Should be more accurate, and hopefully faster.
11752 * tune/gcdext_single.c: New file, gcdext forced to single limbs.
11753 * tune/Makefile.am: Add it.
11754 * tune/speed.h, tune/common.c, tune/speed.c: Add measuring, and of
11757 * tune/speed.h (speed_params r): Use mp_limb_t, not long.
11758 * tune/speed.h, tune/common.c: Don't "switch" on "r".
11759 * tune/speed.c (r_string): Accept limb sized constants.
11760 (choice scale): Add a scale factor (eg. "2.33*mpn_add_n").
11761 * tune/common.c (SPEED_ROUTINE_UDIV_QRNND_A): Default r to
11762 __mp_bases[10].big_base, being a full limb value.
11764 * configure.in (alphapca56*-*-*): Use ev5 mpn path.
11765 (am29000*-*-*): Remove this, leave the canonical a29k.
11766 (z8k*-*-*, z8kx*-*-*): Changed from z8000, since z8k is canonical.
11767 (gmp_mpn_functions_optional): Add invert_limb, use for alpha and ia64.
11769 * configure.in (alloca): Accept yes/no/detect, generate an error if
11770 "yes" but not available.
11771 * gmp.texi (Build Options): Update.
11773 * acinclude.m4 (GMP_TRY_ASSEMBLE): Make conftest.out available.
11774 (GMP_ASM_ALIGN_FILL_0x90): Use it.
11776 * acinclude.m4 (GMP_ASM_X86_MMX) [*-*-solaris*]: Check for solaris
11778 * gmp.texi (Notes for Particular Systems): Update x86 MMX note.
11780 2000-11-21 Torbjorn Granlund <tege@swox.com>
11782 * tune/Makefile.am (EXTRA_DIST): List hppa2w.asm.
11784 * tune/hppa2.asm: Change level directive to "2.0n".
11785 * tune/hppa2w.asm: New file.
11786 * configure.in [SPEED_CYCLECOUNTER_OBJS switch]: Separate out hppa2.0w.
11788 * mpn/pa64/gmp-mparam.h (BITS_PER_LONGINT): 64 => 32.
11790 2000-11-21 Kevin Ryde <kevin@swox.se>
11792 * urandom.h (random): No prototype if glibc stdlib.h has already
11793 provided it (avoids an int32_t/long conflict).
11795 * tune/Makefile.am (LDFLAGS): Use -all-static.
11796 (speed-dynamic): Dynamic linked version of speed.c.
11797 * tune/README: Update.
11799 * mpn/generic/gcd.c (find_a): Use native version if available.
11800 * acconfig.h (HAVE_NATIVE_mpn_gcd_finda): Add #undef.
11801 * gmp-impl.h (mpn_gcd_finda): Add prototype and define.
11802 * mpn/asm-defs.m4 (mpn_gcd_finda): New define_mpn.
11803 * tune/gcd_finda_gen.c: #undef any HAVE_NATIVE_mpn_gcd_finda.
11804 * configure.in (gmp_mpn_functions_optional): Add gcd_finda.
11805 * mpn/x86/k6/gcd_finda.asm: New file.
11807 * tune/tuneup.c (POWM_THRESHOLD): Slightly bigger size steps.
11809 * gmp-impl.h (__GMP_IMPL_H__): Protect against multiple inclusion.
11810 * tune/gcd_bin.c, tune/powm_mod.c, tune/powm_redc.c: Use #undef after
11811 gmp-impl.h to force thresholds.
11812 * tune/tuneup.c (print_define, fft): No need for #ifndefs on
11813 thresholds any more.
11815 2000-11-20 Torbjorn Granlund <tege@swox.com>
11817 * mpz/tests/t-powm.c: Analogous changes as made 2000-11-12 to t-mul.c.
11818 * mpz/tests/t-powm_ui.c: Likewise.
11819 * mpz/tests/t-pow_ui.c: Likewise.
11820 * mpz/tests/t-root.c: Likewise.
11822 * configure.in [compiler switch]: Pass "-Aa -D_HPUX_SOURCE" to cc for
11825 * mpn/hppa/hppa1_1/udiv_qrnnd.S: Reference data using PC relative
11826 addressing (was r19 relative addressing).
11828 2000-11-18 Torbjorn Granlund <tege@swox.com>
11830 * rand.c: (__gmp_rand_lc_scheme): Convert strings to hexadecimal.
11831 (gmp_randinit): Expect strings in hexadecimal.
11833 2000-11-18 Kevin Ryde <kevin@swox.se>
11835 * configfsf.guess, configfsf.sub: Update to 2000-11-16.
11836 * config.guess (alpha*-*-openbsd*): Do exact cpu detection.
11838 2000-11-14 Torbjorn Granlund <tege@swox.com>
11840 * mpz/tests/t-fdiv.c: Analogous changes as made 2000-11-12 to t-mul.c.
11841 * mpz/tests/t-tdiv_ui.c: Likewise.
11842 * mpz/tests/t-fdiv_ui.c: Likewise.
11843 * mpz/tests/t-sqrtrem.c: Likewise.
11844 * mpz/tests/t-gcd.c: Likewise.
11846 2000-11-13 Kevin Ryde <kevin@swox.se>
11848 * mpn/Makeasm.am: New file, splitting out assembler rules.
11849 * mpn/Makefile.am, tune/Makefile.am: Use it.
11851 * mpn/Makefile.am (@CPP@): Remove this, automake already gives it.
11853 * configure.in (AC_CHECK_LIBM): New test, and AC_SUBST it.
11854 * Makefile.am (MPFR_LIBADD_OPTION): Use it.
11855 * demos/Makefile.am (qcn_LDADD): Ditto.
11856 * tune/Makefile.am (libspeed_la_LIBADD): Ditto.
11857 * tests/rand/Makefile.am (libstat_la_LIBADD): Ditto.
11859 * tune/time.c (timeval_diff_secs): Better calculation.
11860 (read_real_time): New measuring method for AIX power/powerpc.
11861 (speed_endtime): Protect against negative times.
11862 * tune/common.c (speed_measure): Protect against big reps.
11863 * tune/freq.c (speed_cpu_frequency_measure_one): Better timeval diff.
11864 * tune/speed.h (TIMEVAL_DIFF_SEC,USEC): Remove macros.
11865 * configure.in: (sys/systemcfg.h, read_real_time): New tests.
11867 2000-11-13 Torbjorn Granlund <tege@swox.com>
11869 * mpz/tests/t-mul.c: Remove #include urandom.h.
11870 * mpz/tests/t-tdiv.c: Likewise.
11872 * configure.in [SPEED_CYCLECOUNTER_OBJS switch]:
11873 Declare hppa.asm as just 32 bits (cyclecounter_size=1).
11875 2000-11-12 Torbjorn Granlund <tege@swox.com>
11877 * mpz/tests/t-mul.c
11878 (main): Generate random numbers using gmp_rand* functions.
11879 (main): Distribute random numbers non-uniformly.
11880 (main): Seed by current time if GMP_CHECK_RANDOMIZE is set.
11881 (_mpn_mul_classic): Streamline.
11882 * mpz/tests/t-tdiv.c: Analogous changes.
11884 * demos/pexpr.c (HAVE_sigaltstack): Fix typo in testing for _UNICOS.
11885 Also test for __hpux.
11887 2000-11-11 Torbjorn Granlund <tege@swox.com>
11889 * mpn/alpha/ev5/gmp-mparam.h: Retune.
11891 * mpn/alpha/ev6/gmp-mparam.h: Retune.
11893 * mpn/alpha/ev6/add_n.asm: Misc cleanups.
11895 * mpn/alpha/ev6/sub_n.asm: New file.
11897 2000-11-10 Torbjorn Granlund <tege@swox.com>
11899 * configure.in [path switch] (alphaev6*-*-*): Add alpha/ev5 to path.
11901 * mpn/alpha/ev6/add_n.asm: New file.
11903 2000-11-10 Kevin Ryde <kevin@swox.se>
11905 * mpz/powm.c (redc): Make global under WANT_REDC_GLOBAL.
11906 * tune/powm_mod.c, tune/powm_redc.c: New files.
11907 * tune/Makefile.am (libspeed_la_SOURCES): Add them.
11908 * tune/*: Add measuring of redc, mpz_mod, mpz_powm_mod, mpz_powm_redc.
11910 * tune/tuneup.c (POWM_THRESHOLD): Determine from redc and mpz_mod.
11911 * tune/Makefile.am (TUNE_MPZ_SRCS): Remove powm.
11913 2000-11-10 Torbjorn Granlund <tege@swox.com>
11915 * mpn/mips3/gmp-mparam.h: Retune.
11917 * configure.in (os_64bit): Rename to check_64bit_compiler.
11919 2000-11-09 Torbjorn Granlund <tege@swox.com>
11921 * configure.in [SPEED_CYCLECOUNTER_OBJS switch]: Choose hppa/hppa2 code
11922 depending on $CC64.
11924 2000-11-09 Kevin Ryde <kevin@swox.se>
11926 * mpn/x86/pentium/mul_1.asm: Unroll 2x, saving 1 c/l when in L1.
11928 * mpn/x86/pentium/aorsmul_1.asm: Add 1c entrypoints, shave a couple
11929 of cycles at entry and exit.
11931 * configure.in (power1,2,2sc): Support these as synonyms for plain
11934 * acinclude.m4 (GMP_ASM_X86_SHLDL_CL): GMP_DEFINE WANT_SHLDL_CL here.
11935 (GMP_ASM_X86_MMX, GMP_ASM_X86_SHLDL_CL): Add X86 into the names.
11936 * configure.in: Consequent changes.
11938 * gmp.texi (Notes for Particular Systems): Remarks about power/powerpc.
11939 (Reentrancy): Remarks about simultaneous writing.
11940 (Reporting Bugs): Ask for configfsf.guess.
11942 2000-11-08 Kevin Ryde <kevin@swox.se>
11944 * acinclude.m4 (GMP_FUNC_ALLOCA): New macro.
11945 * configure.in: Use it.
11946 * gmp-impl.h (alloca): Conditionals and setups as per autoconf
11947 (should make alloca available on more non-gcc compilers).
11949 * acinclude.m4: Misc reformatting, simplify some quoting.
11950 (GMP_ASM_UNDERSCORE, GMP_ASM_X86_MCOUNT): Use $CC $CFLAGS $CPPFLAGS.
11951 (GMP_ASM_UNDERSCORE, GMP_ASM_ALIGN_FILL_0x90, GMP_ASM_RODATA): Put
11952 AC_REQUIREs outside AC_CACHE_CHECK.
11953 (GMP_C_SIZES): Use $srcdir/gmp.h, not -I; use $CPPFLAGS.
11954 (GMP_ASM_UNDERSCORE): Use "gmp_compile" variable, and only rm
11955 conftes1* conftes2*.
11956 (GMP_PROG_NM): New macro, require it in appropriate GMP_ASM_*.
11957 (GMP_TRY_ASSEMBLE): New macro, use it in various GMP_ASM_*.
11958 * configure.in: Use GMP_PROG_NM.
11960 * mpn/tests/spinner.c (spinner_signal): Use RETSIGTYPE.
11961 (spinner_init): Force output to unbuffered.
11963 * mpn/x86/README.family: Notes about GOT table and imul, misc updates.
11964 * mpn/x86/k7/diveby3.asm: Change to 3 operands for immediate imul.
11965 * mpn/x86/k6/diveby3.asm: Ditto.
11967 2000-11-06 Torbjorn Granlund <tege@swox.com>
11969 * urandom.h: Simplify and make it work properly for 64-bit
11970 machines also in environments without `random'.
11972 2000-11-04 Torbjorn Granlund <tege@swox.com>
11974 * configure.in [path switch]: Don't match rs6000-*-*, in
11975 particular don't assume POWER.
11977 * tune/tuneup.c (fft): Remove usleep calls.
11979 * config.guess: Don't pass "$@" when it is known to be empty.
11981 * Makefile.am (EXTRA_DIST): List configfsf.guess and configfsf.sub.
11983 2000-11-04 Kevin Ryde <kevin@swox.se>
11985 * configfsf.guess, configfsf.sub: Moved from config.guess and
11987 * config.guess, config.sub: New files, wrappers around around
11988 configfsf versions.
11989 * configfsf.guess: Update to FSF 2000-10-23.
11990 * configfsf.sub: Update to FSF 2000-10-25.
11992 * acinclude.m4 (GMP_ASM_POWERPC_R_REGISTERS): New macro.
11993 * mpn/powerpc32/powerpc-defs.m4: New file, regmap.m4 r0 etc macros
11994 conditionalized by GMP_ASM_POWERPC_R_REGISTERS.
11995 * mpn/powerpc32/regmap.m4: Remove file.
11996 * configure.in (powerpc*-*-*): Use all this.
11998 * mpz/divegcd.c: New file, providing mpz_divexact_gcd.
11999 * Makefile.am, mpz/Makefile.am: Add it.
12000 * gmp-impl.h (mpz_divexact_gcd): Add prototype.
12001 * mpq/aors.c,canonicalize.c,div.c,mul.c: Use it.
12003 * longlong.h [pentium] (count_leading_zeros): New macro.
12004 (__clz_tab): Always provide prototype.
12005 * acconfig.h (HAVE_TARGET_CPU_): Add x86s.
12007 * tune/speed.[ch],common.c (count_leading_zeros,
12008 count_trailing_zeros, __udiv_qrnnd_c): Add measuring.
12010 * configure.in (X86_PATTERN): Move from here ...
12011 * acinclude.m4 (X86_PATTERN): ... to here.
12012 (GMP_ASM_RODATA): Use it.
12014 * configure.in (srandom): New test.
12015 * mpn/tests/try.c: Use it.
12016 * tune/speed.c: Ditto, and conditionalize getrusage and headers.
12018 2000-11-02 Kevin Ryde <kevin@swox.se>
12020 * mpn/Makefile.am (nodist_libdummy_la_SOURCES): Add udiv_qrnnd.c
12023 * mpn/generic/mul_n.c (mpn_kara_sqr_n): Remove a duplicate
12024 subtract at the evaluate stage.
12026 2000-11-01 Torbjorn Granlund <tege@swox.com>
12028 * configure.in [compiler switch] (sparc64-*-linux*): Spell
12029 gmp_xoptcflags_gcc properly, and pass same options as for other
12032 * tune/speed.h (SPEED_ROUTINE_MPN_GET_STR): Fix type of wsize.
12034 2000-10-31 Torbjorn Granlund <tege@swox.com>
12036 * configure.in [compiler switch] (sparc64-*-linux*): Remove -mvis
12037 from gmp_xoptflags_gcc, this might not be an ultrasparc.
12038 Remove -m32 from gmp_cflags_gcc; add -Wa,-xarch=v8plus.
12040 2000-10-29 Torbjorn Granlund <tege@swox.com>
12042 * mpn/ia64/lorrshift.asm: New file.
12044 * configure.in: New mulfunc `lorrshift' for lshift and rshift.
12046 2000-10-29 Kevin Ryde <kevin@swox.se>
12048 * mpn/generic/mul_n.c (mpn_kara_sqr_n): Delete code performing
12049 superfluous mpn_sub_n calls.
12051 * configure.in (found_asm, M4): Account for SPEED_CYCLECOUNTER_OBJ,
12052 for the benefit of targets whose only .asm is a cycle counter.
12054 * tune/tuneup.c (fft): Remove bogus usleep calls.
12056 2000-10-28 Torbjorn Granlund <tege@swox.com>
12058 * mpn/ia64/invert_limb.asm: Get return value for 0x800...00 right.
12060 * tune/Makefile.am (EXTRA_DIST): Add ia64.asm.
12062 * tune/ia64.asm: Fix typo.
12064 * add_n.asm addmul_1.asm mul_1.asm popcount.asm sub_n.asm:
12065 Preserve ar.lc as required by ABI.
12066 * longlong.h (ia64 udiv_qrnnd): New.
12068 * configure.in [path switch] (ia64*-*-*): Set extra_functions.
12069 * mpn/ia64/invert_limb.asm: New file.
12071 2000-10-27 Torbjorn Granlund <tege@swox.com>
12073 * configure.in [compiler switch]:
12074 Get rid of c89 for all hppa flavours--it is an evil compiler!
12076 * tune/speed.h (SPEED_ROUTINE_MPN_SET_STR): Fix type of xp.
12077 (SPEED_ROUTINE_MPN_GET_STR): Fix type of wp.
12079 2000-10-27 Kevin Ryde <kevin@swox.se>
12081 * gmp.texi (Fibonacci Number Algorithm): New section.
12083 * mpz/tests/t-fib_ui.c: New file.
12084 * mpz/tests/Makefile.am (check_PROGRAMS): Add it.
12086 * mpz/fib_ui.c: Rewrite, same formulas but using mpn functions and
12087 some lookup tables, much faster at small to moderate sizes.
12088 * gmp-impl.h (MPZ_FIB_SIZE): New macro.
12089 (FIB_THRESHOLD): Establish default here.
12090 * tune/tuneup.c (FIB_THRESHOLD): Start search after the new table
12093 * mpn/x86/x86-defs.m4 (mcount_movl_GOT_ebx): Rename from movl_GOT_ebx,
12094 and don't use GSYM_PREFIX with _GLOBAL_OFFSET_TABLE_.
12096 * tune/freq.c (speed_cpu_frequency_measure): New test comparing
12097 gettimeofday and speed_cyclecounter, should cover many systems.
12099 2000-10-27 Torbjorn Granlund <tege@swox.com>
12101 * mpn/ia64/gmp-mparam.h: Retune.
12103 2000-10-26 Torbjorn Granlund <tege@swox.com>
12105 * longlong.h (ia64): Set UMUL_TIME and UDIV_TIME.
12107 * mpn/ia64/submul_1.c: Fix typo.
12109 2000-10-25 Kevin Ryde <kevin@swox.se>
12111 * tune/freq.c (speed_cpu_frequency_sysctl): New test, supporting
12112 hw.model for BSD flavours.
12113 * configure.in (sysctl, sys/param.h): New tests.
12115 2000-10-24 Torbjorn Granlund <tege@swox.com>
12117 * tune/freq.c: Explicitly #include config.h before other include files.
12119 * mpz/tests/reuse.c (FAIL2): New #define.
12120 (main): Use FAIL2. Now this test properly returns non-zero exit
12121 status when it fails.
12123 * mpn/powerpc32/gmp-mparam.h: Retune.
12124 * mpn/powerpc64/gmp-mparam.h: Retune.
12126 2000-10-24 Kevin Ryde <kevin@swox.se>
12128 * mpn/x86/k6/cross.pl: Support 8 and 16 byte code alignment.
12130 * mpq/aors.c, mpq/canonicalize.c: Skip two mpz_divexact calls if
12131 gcd gives 1, which should be 60% of the time.
12132 * gmp-impl.h (MPZ_EQUAL_1_P): New macro.
12133 * mpq/mul.c, mpq/div.c: Use it, and a new DIV_OR_SET.
12135 * tune/tuneup.c (xp_block, yp_block): Initialize these with random
12136 data. Fixes GCD_ACCEL and GCDEXT thresholds, and latest POWM.
12138 2000-10-23 Torbjorn Granlund <tege@swox.com>
12140 * configure.in [SPEED_CYCLECOUNTER_OBJS switch]: Add ia64 case.
12142 * mpn/ia64/gmp-mparam.h: Fill in some parameters.
12144 * mpn/ia64/submul_1.c: New file.
12146 * tune/ia64.asm: New file.
12148 * gmp-impl.h (union ieee_double_extract): Handle ia64.
12150 * mpn/mp_bases.c: Decrease chars_per_bit_exactly for entry 1 to
12151 work around buggy ia64-linux.
12153 * longlong.h (ia64 umul_ppmm): Update register flags to match new GCC.
12155 2000-10-22 Torbjorn Granlund <tege@swox.com>
12157 * mpn/alpha/ev6/gmp-mparam.h (DC_THRESHOLD): Update.
12158 * mpn/alpha/ev6/submul_1.asm: New file.
12160 2000-10-22 Kevin Ryde <kevin@swox.se>
12162 * tune/gcd_bin.c: New file.
12163 * tune/gcd_finda_gen.c: New file.
12164 * tune/Makefile.am (libspeed_la_SOURCES): Add them.
12165 * tune/speed.[ch],common.c (mpn_gcd_binary, find_a): Add measuring.
12167 * * (__gmp_allocate_func etc): Rename from _mp_allocate_func etc.
12168 (__gmp_default_allocate etc): Rename from _mp_default_allocate etc.
12169 * gmp-impl.h (__GMP_REALLOCATE_FUNC_TYPE,
12170 __GMP_REALLOCATE_FUNC_LIMBS): New macros.
12172 * gmp-impl.h (DC_THRESHOLD): Establish default here, set to 3*KARA
12173 since that's the measured average.
12174 * mpn/generic/dc_divrem_n.c, mpn/generic/tdiv_qr.c (DC_THRESHOLD):
12177 2000-10-21 Torbjorn Granlund <tege@swox.com>
12179 * mpn/Makefile.am (TARG_DIST): Add ia64.
12181 2000-10-21 Kevin Ryde <kevin@swox.se>
12183 * *: Change BZ -> DC.
12184 * mpn/generic/dc_divrem_n.c: Renamed from bz_divrem_n.c.
12186 * doc/multiplication: Remove file, now in the manual.
12187 * doc/assembly_code: Ditto.
12188 * tune/README: Remove some parts now in the manual.
12190 * gmp.texi (@m etc): Add and use some new macros.
12191 (Integer Division - mpz_[cft]div_*): Merge descriptions, for brevity
12192 and to emphasise similarities.
12193 (Low-Level Functions - mpn_[lr]shift): Specify count as 1 to
12194 mp_bits_per_limb-1.
12195 (Algorithms): New chapter.
12196 (References): Add some papers.
12198 * mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Remove some
12200 * mpn/generic/mul_fft.c (mpn_fft_best_k): Ditto.
12202 * tune/freq.c: New file, split from time.c.
12203 * tune/time.c: Rewrite, now more automated.
12204 * configure.in, tune/*: Consequent changes.
12206 2000-10-20 Torbjorn Granlund <tege@swox.com>
12208 * mpn/ia64/default.m4: New file.
12209 * configure.in [config.m4 switch] (ia64*-*-*): Use ia64/default.m4.
12211 * mpn/ia64/mul_1.asm: New file.
12212 * mpn/ia64/addmul_1.asm: New file.
12213 * mpn/ia64/add_n.asm: New file.
12214 * mpn/ia64/sub_n.asm: New file.
12215 * mpn/ia64/popcount.asm: New file.
12216 * mpn/ia64/README: New file.
12218 * mpn/alpha/cntlz.asm: Override `.set noat' from ASM_START.
12220 * configure.in (HAVE_TARGET_CPU_*): Support hppa1.0, hppa1.1, hppa2.0
12221 by sed'ing the period into `_'.
12223 * acconfig.h: Add #undefs for hppa targets.
12225 * longlong.h (udiv_qrnnd): Fix typo in last change.
12227 * mpz/tstbit.c: Rewrite (partly to work around GCC 2.95.2 HPPA bug).
12229 * configure.in [path switch]:
12230 (hppa2.0*-*-*): For non-CC64 case, update path.
12232 * configure.in [compiler switch]:
12233 (hppa2.0w-*-*): Match with same regexp in both places.
12234 (hppa*-*-*): New case.
12235 (all hppa alternatives): Don't inherit default gmp_cflags_cc,
12238 2000-10-18 Torbjorn Granlund <tege@swox.com>
12240 * configure.in (alpha*-*-*): Define gmp_xoptcflags_gcc like for
12243 * longlong.h (x86 udiv_qrnnd): Change `d' => `dx' to avoid K&R C
12246 2000-10-15 Kevin Ryde <kevin@swox.se>
12248 * doc/configuration: Updates.
12250 * demos/calc.y: Remove some comments.
12252 2000-10-14 Kevin Ryde <kevin@swox.se>
12254 * gmp.texi (Parameter Conventions, Memory Management): New sections
12255 split from "Variable Conventions".
12256 (Efficiency, Debugging, Profiling): New sections in "GMP Basics".
12257 (Reentrancy): Some rewording, add note on standard I/O.
12258 (Build options): Add --enable-assert and --enable-profiling.
12260 * configure.in (--enable-profiling): New option.
12261 * acinclude.m4 (GMP_ASM_X86_MCOUNT): New macro, finding how to profile.
12262 * mpn/x86/x86-defs.m4 (PROLOGUE_cpu, call_mcount): Profiling support.
12264 * acinclude.m4, configure.in (GMP_ASM_*): Rename from GMP_CHECK_ASM_*,
12265 to follow autoconf conventions.
12267 * configure.in: Run GMP_CHECK_ASM tests only if needed.
12268 * acinclude.m4 (GMP_CHECK_ASM_MMX): Don't use GMP_CHECK_ASM_TEXT.
12270 * mpn/x86/x86-defs.m4 (ASSERT): Allow no condition, to just emit code.
12272 2000-10-13 Kevin Ryde <kevin@swox.se>
12274 * mpq/md_2exp.c: New file.
12275 * mpq/Makefile.am (libmpq_la_SOURCES): Add it.
12276 * Makefile.am (MPQ_OBJECTS): Ditto.
12277 * gmp.h (mpq_mul_2exp, mpq_div_2exp): Add prototypes.
12278 * gmp.texi (Rational Arithmetic): Add documentation.
12280 * mpq/tests/t-md_2exp.c: New file.
12281 * mpq/tests/Makefile.am (check_PROGRAMS): Add it.
12283 * mpn/generic/perfsqr.c: Add/amend some comments.
12285 * gmp.texi (Known Build Problems): Note VERSION problem with old
12286 sed, do some minor rewording.
12287 (Build Options): Add cygwin and djgpp URLs, mention INSTALL.autoconf,
12289 (Getting the Latest Version of GMP): Move this ...
12290 (Introduction to GMP): ... to here.
12291 (Compatibility with older versions): Just refer to 2.x and 3.x, not
12292 every minor version.
12293 (Initializing Integers): Note restrictions on mpz_array_init'ed
12295 (Integer Logic and Bit Fiddling): Note bits are numbered from 0.
12297 * INSTALL.autoconf: New file.
12298 * Makefile.am (EXTRA_DIST): Add it.
12300 * tune/Makefile.am, tune/tuneup.c, configure.in, gmp-impl.h: New
12301 scheme for recompiled objects used by tune program. Don't use
12302 libgmptune.a, make better use of libtool, work with ansi2knr.
12304 * tune/speed.h,common.c (SPEED_ROUTINE_MPZ_POWM): Use s->yp and
12305 s->xp_block, make exponent a fixed size.
12307 2000-10-07 Torbjorn Granlund <tege@swox.com>
12309 * mpn/mips3/gmp-mparam.h: Retune.
12311 * mpn/generic/mul_n.c (USE_MORE_MPN): Revert last change.
12313 2000-10-06 Torbjorn Granlund <tege@swox.com>
12315 * mpn/mips3/add_n.s: Decrease carry recurrence from 4 to 3 cycles.
12316 * mpn/mips3/sub_n.s: Likewise.
12318 2000-10-04 Torbjorn Granlund <tege@swox.com>
12320 * configure.in (sparc64-*-linux*): Set path according to CC64.
12322 2000-10-04 Kevin Ryde <kevin@swox.se>
12324 * acinclude.m4 (GMP_CHECK_ASM_UNDERSCORE): Use LABEL_SUFFIX, not a
12327 * config.sub: Don't demand "86" in CPU name for SCO.
12329 * configure.in (supersparc-*-*): Remove -DSUPERSPARC.
12330 * longlong.h: Use HAVE_TARGET_CPU_supersparc.
12332 * configure.in (HAVE_TARGET_CPU_*): AC_DEFINE from $target_cpu.
12333 * acconfig.h: Add #undefs, but only for targets of interest.
12335 2000-10-03 Torbjorn Granlund <tege@swox.com>
12337 * mpn/alpha/cntlz.asm: Rewrite.
12339 * mp_clz_tab.c (__clz_tab): Half table size to 128 entires.
12340 * longlong.h (count_leading_zeros): Demand just 128 entries from
12343 * configure.in (mips-sgi-irix6.*): Pass -mips3 in addition to options
12346 * longlong.h: Move NO_ASM test around all assembly code.
12348 * longlong.h (count_leading_zeros): Sparclite scan instruction was
12349 being invoked incorrectly.
12350 Replace __mc68332__ with __mcpu32__.
12353 2000-10-02 Torbjorn Granlund <tege@swox.com>
12355 * mpn/mips3/gmp-mparam.h: Retune for both gcc and cc.
12357 * mpn/generic/mul_n.c (USE_MORE_MPN): Remove exception for __mips.
12358 (interpolate3): Cast mp_limb_t variables to mp_limb_signed_t
12359 when testing sign bit.
12361 * mpn/alpha/ev6/gmp-mparam.h: Retune.
12362 * mpn/powerpc32/gmp-mparam.h: Retune.
12363 * mpn/powerpc64/gmp-mparam.h: Retune.
12364 * mpn/x86/pentium/gmp-mparam.h: Retune.
12365 * mpn/x86/pentium/mmx/gmp-mparam.h: Retune.
12366 * mpn/sparc32/v9/gmp-mparam.h: Retune.
12367 * mpn/x86/k6/gmp-mparam.h: Retune.
12368 * mpn/x86/p6/gmp-mparam.h: Retune.
12369 * mpn/x86/k7/gmp-mparam.h: Retune.
12370 * mpn/sparc64/gmp-mparam.h: Retune.
12372 * mpn/m68k/gmp-mparam.h: New file.
12373 * mpn/alpha/ev5/gmp-mparam.h: New file.
12375 * gmp-impl.h (default MPN_COPY): Remove final `;'.
12377 * tune/time.c (speed_endtime): Rewrite.
12379 * tune/speed.h (SPEED_ROUTINE_MPZ_POWM): Set base to a large value,
12382 * demos/pexpr.c (setup_error_handler): Fix typo.
12384 * mpz/powm.c (redc): New function, based on old mpz_redc. Don't
12386 (mpz_redc): Remove.
12387 (mpz_powm): Major changes, partially reverting to mpn calls.
12388 Multiply before calling redc.
12389 (mpz_powm): Use TMP_ allocation.
12390 (mpz_powm): Refine calculation of k (width of exponent window).
12391 (mpz_powm): Cast constants to mp_limb_t before left shifting.
12393 * longlong.h: Use ia64 count_leading_zeros just when __GNUC__.
12395 2000-09-29 Kevin Ryde <kevin@swox.se>
12397 * acinclude.m4 (GMP_C_SIZES): New macro.
12398 * configure.in: Use it.
12399 * acconfig.in (BYTES_PER_MP_LIMB etc): Add #undefs.
12400 * mpn/generic/gmp-mparam.h (BYTES_PER_MP_LIMB etc): Remove #defines.
12401 * gmp.texi (Known Build Problems): Remove 64-bit generic C
12402 gmp-mparam.h problem, now fixed.
12404 * configure.in: Only run GMP_PROG_M4 if it's actually needed.
12406 2000-09-27 Torbjorn Granlund <tege@swox.com>
12408 * demos/pexpr.c: Clean up code for systems not supporting
12409 sigaltstack. Handle old Linux without sigaltstack. Properly
12410 disable all stuff related to sigaltstack under Unicos.
12412 * mpn/alpha/ev6/addmul_1.asm: Use explicit offset for all load and
12413 store insns. Helps old gas.
12415 * longlong.h (count_leading_zeros): Define for ia64.
12417 2000-09-27 Paul Zimmermann <Paul.Zimmermann@loria.fr>
12419 * mpn/generic/bz_divrem_n.c: Fix qhl handling, simplify.
12421 2000-09-27 Kevin Ryde <kevin@swox.se>
12423 * mpn/Makefile.in (.SUFFIXES): Regenerate with patched automake to
12424 get .s before .c, which is needed to override ansi2knr .c rules.
12426 * gmp.texi (mpn_sqrtrem): Fix r2p==NULL return value description
12427 to match the code (change by Torbjorn).
12428 (mpn_gcd, mpn_gcdext, mpn_sqrtrem, mpn_tdiv_qr): Note most
12429 significant limbs must be non-zero.
12430 (mpn_gcd, mpn_gcdext, mpn_sqrtrem): Clarify destination size
12432 (mpn_gcd_1): Clarify value must be non-zero, not just size.
12434 * gmp-impl.h (mpn_zero_p): New inline function.
12435 * mpn/generic/inlines.c: Add gmp-impl.h.
12436 * mpf/integer.c, mpz/get_d.c, mpn/generic/mul_fft.c: Use it.
12438 * mpn/generic/gcd.c: Use MPN_COPY_INCR not MPN_COPY.
12439 * mpf/add_ui.c: Ditto.
12440 * mpf/add.c: Ditto, and fix test to skip copy.
12442 2000-09-26 Kevin Ryde <kevin@swox.se>
12444 * gmp-impl.h, longlong.h, mpn/generic/*.c: Add ASSERTs for various
12445 parameter restrictions.
12447 * gmp-impl.h (UDIV_PREINV_TIME): New macro.
12448 * mpn/generic/sb_divrem_mn.c: Use it.
12449 * mpn/generic/perfsqr.c: Ditto.
12450 * mpn/x86/*/gmp-mparam.h (UDIV_PREINV_TIME): Add values.
12452 * macos/Makefile.in: Add mpz/tests/t-get_si.c, mpf/tests/t-set_f.c,
12453 and new multi-function mpz and mpq files.
12455 2000-09-25 Kevin Ryde <kevin@swox.se>
12457 * randlc.c, randlc2x.c, randsd.c, mpz/urandomb.c, mpz/urandomm.c:
12458 Use mpz_ptr and mpz_srcptr for parameters.
12459 * gmp.h (gmp_randinit_lc, gmp_randinit_lc_2exp, gmp_randseed,
12460 mpz_urandomb, mpz_urandomm): Corresponding change to prototypes.
12461 * randsdui.c: Remove wrong K&R parameters part.
12463 2000-09-12 Kevin Ryde <kevin@swox.se>
12465 * gmp-impl.h (mpn_tdiv_qr): Move prototype from here ...
12466 * gmp.h (mpn_tdiv_qr): ... to here.
12468 * gmp.texi (Miscellaneous Rational Functions): Comment-out and
12469 move version 1 compatibility note to "Compatibility" section.
12470 (Rational Number Functions): Ditto for canonicalization note.
12472 2000-09-10 Kevin Ryde <kevin@swox.se>
12474 * mpn/x86/pentium/com_n.asm: New file.
12476 * gmp.texi (Rational Arithmetic): Add mpq_abs.
12477 (Miscellaneous Rational Functions): Merge and simplify descriptions of
12478 mpq_get_num, mpq_get_den, mpq_set_num, mpq_set_den.
12480 * mpq/abs.c: New file.
12481 * mpq/Makefile.am (libmpq_la_SOURCES): Add it.
12482 * Makefile.am (MPQ_OBJECTS): Add it.
12483 * gmp.h (mpq_abs): Add prototype.
12485 * mpq/set_den.c: Don't discard sign when copying, this makes the
12486 code match the manual.
12488 2000-09-07 Torbjorn Granlund <tege@swox.com>
12490 * tune/alpha.asm: Rewrite to actually work right.
12492 2000-09-07 Kevin Ryde <kevin@swox.se>
12494 * tune/common.c,speed.[ch]: Add measuring of mpn_sqrtrem,
12495 mpn_get_str, mpn_set_str.
12496 * tune/README: Various updates.
12498 2000-09-06 Torbjorn Granlund <tege@swox.com>
12500 * mpz/fits.c: Correct type of `data'.
12502 2000-09-06 Kevin Ryde <kevin@swox.se>
12504 * gmp.texi (Build Options): Clarify where to find CFLAGS.
12505 (Known Build Problems): Note SCO -lc problem.
12507 * tune/speed.h (SPEED_ROUTINE_MPN_GCD_CALL): Fix for sizes > 512 limbs.
12509 * doc/multiplication: Corrections and additions suggested by Paul.
12511 * tune/modlinv.c: New file with alternate modlimb_inverts.
12512 * tune/Makefile.am, tune/speed.[ch]: Add measuring of them.
12513 * tune/speed.c (FLAG_NODATA): New attribute, use for mpz_bin_uiui,
12514 mpz_fib_ui, mpz_fac_ui.
12516 * mpn/x86/t-zdisp.sh: New file.
12518 * tests/t-modlinv.c: New file.
12519 * tests/Makefile.am (check_PROGRAMS): Add it.
12521 * mpq/tests/t-set_f.c: New file.
12522 * mpq/tests/Makefile.am (check_PROGRAMS): Add it.
12524 * gmp-impl.h (MPQ_CHECK_FORMAT): New macro.
12525 * mpq/tests/t-get_d.c: Use it.
12527 * mpq/set_f.c: New file.
12528 * mpq/Makefile.am (libmpq_la_SOURCES): Add it.
12529 * Makefile.am (MPQ_OBJECTS): Ditto.
12530 * gmp.h: Add prototype.
12531 * gmp.texi (Miscellaneous Rational Functions): Document mpq_set_f,
12532 correct return type of mpq_set_d.
12534 2000-09-03 Kevin Ryde <kevin@swox.se>
12536 * mpz/aors_ui.c: New file merging add_ui.c and sub_ui.c, no object
12538 * mpz/add_ui.c, mpz/sub_ui.c: Remove files.
12539 * mpz/Makefile.am: Update.
12541 * gmp-impl.h (MPZ_FITS_STYPE_SDT, MPZ_FITS_UTYPE_SDT): New macros.
12542 * mpz/fits.c: New file merging six separate fits*.c.
12543 * mpz/fits_sshort_p.c, fits_sint_p.c, fits_slong_p.c, fits_ushort_p.c,
12544 fits_uint_p.c, fits_ulong_p.c: Remove files
12545 * mpz/Makefile.am: Use new fits.c, change object names from
12546 fits_*_p.lo to fits_*.lo to avoid SunOS 4 native "ar" warnings.
12547 * Makefile.am (MPZ_OBJECTS): Change from fits_*_p.lo to fits_*.lo.
12549 * acinclude.m4 (GMP_CHECK_ASM_RODATA): New macro, defining RODATA.
12550 * configure.in: Use it.
12551 * mpn/x86/k[67]/mmx/popham.asm: Use it.
12553 * mpn/x86/*/*.asm: Use "TEXT" not ".text".
12555 2000-09-02 Kevin Ryde <kevin@swox.se>
12557 * mpq/aors.c: New file merging add.c and sub.c, no object code changes.
12558 * mpq/add.c, mpq/sub.c: Remove files.
12559 * mpq/Makefile.am: Update.
12561 * mpz/aors.c: New file merging add.c and sub.c, no object code changes.
12562 * mpz/add.c, mpz/sub.c: Remove files.
12563 * mpz/Makefile.am, mpbsd/Makefile.am: Update.
12565 * configure.in: Re-apply "PROLOGUE.*" regexp change for the
12566 benefit of alpha PROLOGUE_GP, lost in path search reorganisation.
12568 * mpn/x86/x86-defs.m4 (jadcl0, cmov_simulate, ASSERT,
12569 movl_text_address): Don't use "1:" style labels.
12570 (Zdisp): Rearrange a bit, switch to all hex.
12571 * mpn/x86/README.family: Note SCO "as" doesn't support "1:" style
12572 local labels, misc rewordings.
12574 2000-08-29 Torbjorn Granlund <tege@swox.com>
12576 * demos/primes.c: Include string.h.
12578 * config.guess (x86 variant recog code): Remove dummy*.o files
12579 generated by some compilers.
12581 2000-08-28 Kevin Ryde <kevin@swox.se>
12583 * acinclude.m4 (GMP_CHECK_ASM_ALIGN_FILL_0x90): Fix Solaris 2.8
12584 warning message suppression, add notes about SCO.
12586 * Makefile.am (MPZ_OBJECTS etc): Move some comments.
12588 2000-08-25 Kevin Ryde <kevin@swox.se>
12590 * mpz/pprime_p.c (mpz_millerrabin): Fix a TMP_FREE.
12592 * gmp.texi (Copying): Refer to Lesser not Library GPL.
12593 (GMP and Reentrancy): Note stack-alloc.c is not reentrant, and
12594 that SCO <ctype.h> is potentially not reentrant.
12596 * acinclude.m4 (GMP_CHECK_ASM_UNDERSCORE): Test by attempting to
12597 link with or without an underscore.
12598 * gmp.texi (Known Build Problems): Remove SunOS 4 native grep
12599 GSYM_PREFIX problem, now fixed.
12601 * gmp-impl.h (MODLIMB_INVERSE_3): New constant.
12602 * mpn/generic/diveby3.c: Use it instead of own INVERSE_3.
12603 * mpn/generic/mul_n.c: Ditto.
12604 * tests/t-constants.c: Check it, and PP_INVERTED too.
12606 * acinclude.m4 (GMP_GCC_MARCH_PENTIUMPRO): New macro.
12607 * configure.in [p6 and athlon] (gmp_optcflags_gcc): Use it to
12608 possibly add -march=pentiumpro.
12610 * gmp-impl.h (MPZ_SET_STR_OR_ABORT, MPF_SET_STR_OR_ABORT): New macros.
12611 * mpz/tests/t-bin.c, mpz/tests/t-get_si.c, mpz/tests/t-jac.c,
12612 mpz/tests/t-misc.c: Use them.
12613 * mpf/tests/t-conv.c, mpf/tests/t-misc.c: Ditto.
12614 * mpz/tests/convert.c: Ditto and amend diagnostics slightly.
12615 * mpz/tests/t-misc.c (check_mpz_set_si): Remove a superfluous init.
12616 * mpz/tests/io.c: Differentiate between I/O and data conversion errors.
12618 * mpn/generic/aors_n.c: New file merging add_n and sub_n, no
12619 object code changes.
12620 * mpn/generic/add_n.c: Remove file.
12621 * mpn/generic/sub_n.c: Remove file.
12623 * mpn/generic/aorsmul_1.c: New file merging addmul_1 and submul_1,
12624 no object code changes.
12625 * mpn/generic/addmul_1.c: Remove file.
12626 * mpn/generic/submul_1.c: Remove file.
12628 * mpn/generic/popham.c: New file merging popcount and hamdist, no
12629 object code changes.
12630 * mpn/generic/popcount.c: Remove file.
12631 * mpn/generic/hamdist.c: Remove file.
12633 2000-08-24 Torbjorn Granlund <tege@swox.com>
12635 * gmp-impl.h (mpn_com_n): Fix typo.
12637 2000-08-23 Torbjorn Granlund <tege@swox.com>
12639 * demos/primes.c (main): Don't call mpz_probab_prime_p for numbers
12640 that are known to be prime after sieving.
12641 (main): Declare and initialize max_s_prime_squared.
12642 (MAX_S_PRIME): Increase.
12643 (ST_SIZE): Increase.
12645 2000-08-23 Kevin Ryde <kevin@swox.se>
12647 * gmp-impl.h (ASSERT_ALWAYS): Change to statement style.
12648 (JACOBI_TWO_U_BIT1): Remove ASSERT.
12649 (MPZ_CHECK_FORMAT): Use ASSERT_ALWAYS as a statement.
12651 2000-08-21 Torbjorn Granlund <tege@swox.com>
12653 * gmp-impl.h (ASSERT): Use do..while for dummy version.
12655 * mpf/get_str.c: Don't set n_digits from digits_computed_so_far
12656 when the converted operand becomes zero. Misc cleanups.
12658 2000-08-21 Kevin Ryde <kevin@swox.se>
12660 * mpz/fdiv_r_2exp.c, mpz/lcm.c, mpz/urandomm.c: Add missing
12661 TMP_MARK/FREE, avoiding memory leak when using stack-alloc.c.
12663 2000-08-20 Kevin Ryde <kevin@swox.se>
12665 * mpz/set.c [BERKELEY_MP] (move): Add conditionals to build as
12667 * mpbsd/Makefile.am: Use mpz/set.c, not move.c.
12668 * Makefile.am (MPBSD_OBJECTS): Corresponding change.
12669 * mpbsd/move.c: Remove file.
12671 * mpn/Makefile.am, mpz/Makefile.am, mpq/Makefile.am, mpf/Makefile.am,
12672 mpbsd/Makefile.am (-DOPERATION_foo): Use "foo" even for ansi2knr
12673 "foo_" objects. Do this with the makefiles to keep the sources
12675 * mpz/mul_siui.c, mpf/integer.c: Revert to plain OPERATION_* forms.
12677 * mpn/lisp/gmpasm-mode.el (gmpasm-remove-from-list): Renamed from
12678 gmpasm-delete-from-list, because it's non-destructive.
12679 (gmpasm-font-lock-keywords): Add some more keywords.
12681 2000-08-16 Kevin Ryde <kevin@swox.se>
12683 * tune/mul_n_mpn.c, tune/mul_n_open.c: New files, being forced
12684 open-coded and mpn #includes of mpn/generic/mul_n.c.
12685 * tune/*: Add measuring of them.
12686 * tune/speed.c: Print command line into *.gnuplot file.
12688 * mpn/generic/mul_n.c (USE_MORE_MPN): Change to #if not #ifdef for
12689 using the value, add #ifndef for providing the default.
12690 * mpn/sparc64/gmp-mparam.h (USE_MORE_MPN): Add #ifndef.
12692 * tests/t-constants.c: New file.
12693 * tests/Makefile.am (check_PROGRAMS): Add it.
12695 * mpz/get_si.c: Use LONG_MAX, not BITS_PER_MP_LIMB, so the result
12696 doesn't depend on limb size when outside the range of a long
12697 (though such results are not actually documented).
12698 * mpz/tests/t-get_si.c: New file.
12699 * mpz/tests/Makefile.am (check_PROGRAMS): Add it.
12701 * mpn/tests/try.c (call): Cast popcount and hamdist calls,
12702 for the benefit of long long limb.
12704 2000-08-15 Kevin Ryde <kevin@swox.se>
12706 * mp.h (mp_set_memory_functions): Add missing #define.
12707 * mpbsd/tests/allfuns.c (mp_set_memory_functions): Verify its
12710 * mpf/tests/t-misc.c (check_mpf_getset_prec): New test, verifying
12711 reverted behaviour of mpf_get_prec.
12713 * mpn/tests/ref.c (refmpn_strip_twos): Use refmpn_copyi, not
12716 * mpz/mul_siui.c, mpf/integer.c: Recognise OPERATION_*_ forms
12717 produced under ansi2knr.
12719 * configure.in (mpn_objects, mpn_objs_in_libgmp): Add $U to .c
12720 objects when ansi2knr in use.
12722 * mpn/Makefile.am (AUTOMAKE_OPTIONS): Enable ansi2knr.
12723 (libdummy.la): Add this, not built, to create ansi2knr style rules
12724 for all potential .c files.
12725 * mpz/Makefile.am, mpq/Makefile.am, mpf/Makefile.am, mpfr/Makefile.am,
12726 mpbsd/Makefile.am, mpq/tests/Makefile.am, tests/Makefile.am
12727 (AUTOMAKE_OPTIONS): Enable ansi2knr (now everywhere).
12728 * Makefile.am (MPZ_OBJECTS, MPQ_OBJECTS, MPF_OBJECTS, MPFR_OBJECTS,
12729 MPBSD_OBJECTS, libmp_la_DEPENDENCIES): Add $U to all .lo filenames.
12731 2000-08-03 Torbjorn Granlund <tege@swox.com>
12733 * mpn/alpha/ev6/addmul_1.asm: Correct number of cycles to 3.5/28.
12735 2000-08-02 Torbjorn Granlund <tege@swox.com>
12737 * Version 3.1 released.
12739 * gmp.texi: Rephrase mpf_urandomb documentation.
12741 * mpn/alpha/ev6: New directory with ev6/21264 optimized code.
12742 * mpn/alpha/ev6/addmul_1.asm: New file.
12743 * mpn/alpha/ev6/gmp-mparam.h: New file.
12745 2000-08-02 Kevin Ryde <kevin@swox.se>
12747 * demos/factorize.c (random): Don't use "inline".
12749 * mpfr/log.c, mpfr/mul_ui.c, mpfr/round.c, mpfr/set.c, mpfr/set_d.c:
12750 Corrections to K&R parts.
12752 * Makefile.am (EXTRA_HEADERS): Omit $(MPFR_HEADERS_OPTION).
12753 * mpfr/Makefile.am (EXTRA_DIST): Add mpfr.h.
12755 * gmp.texi (Known Build Problems): Note problem stripping libgmp.a.
12757 2000-08-02 Kent Boortz <kent@swox.com>
12759 * mpfr: Integrated experimental version of mpfr-0.4.
12760 * configure.in: Changes for option --enable-mpfr.
12761 * Makefile.am: Changes for option --enable-mpfr.
12763 2000-08-01 Torbjorn Granlund <tege@swox.com>
12765 * mpn/generic/popcount.c: Disable SPARC v9 popc_limb pattern.
12766 * mpn/generic/hamdist.c: Likewise.
12768 2000-08-01 Kevin Ryde <kevin@swox.se>
12770 * mpn/tests/try.c (try_init): Account for ALIGNMENTS when sizing
12771 source and dest regions.
12773 2000-07-31 Torbjorn Granlund <tege@swox.com>
12775 * mpf/get_str.c: Develop three extra digits, not just one.
12777 2000-07-31 Kevin Ryde <kevin@swox.se>
12779 * gmp.texi (References): Add URL for invariant division.
12781 2000-07-30 Kevin Ryde <kevin@swox.se>
12783 * tune/time.c (speed_cpu_frequency_proc_cpuinfo): Add support for
12784 alpha linux "cycle frequency".
12786 * mpn/sparc64/gmp-mparam.h: Re-run tune program for FFT thresholds.
12788 2000-07-29 Kevin Ryde <kevin@swox.se>
12790 * gmp.texi (ABI and ISA): Add sparc64-*-linux*.
12791 * configure.in [sparc64-*-linux*] (gmp_cflags64_gcc): Same flags
12794 * configure.in (--enable-fft): New option, default "no".
12795 * gmp.texi (Build Options): Describe it.
12796 * mpn/generic/mul.c, mpn/generic/mul_n.c [WANT_FFT]: Use it.
12797 * tune/tuneup.c [WANT_FFT]: By default don't probe FFTs if not enabled.
12798 * NEWS: Multiplication optionally using FFT.
12800 * tune/README: Notes on FFT and GCD thresholds, other minor updates.
12802 * Makefile.am: Expunge the macos generated files update stuff.
12804 2000-07-28 Kevin Ryde <kevin@swox.se>
12806 * mpn/x86/*/gmp-mparam.h: Add some FFT thresholds.
12808 2000-07-28 Kent Boortz <kent@swox.se>
12810 * macos/Asm*, macos/CmnObj, macos/Mp*: Delete directories.
12811 * macos/Makefile: Delete file.
12812 * macos/Makefile.cw: Delete file.
12813 * macos/config.h: Delete file.
12814 * macos/Asm/*.s: Delete files.
12815 * macos/configure: Create target directories. Don't transform
12816 '(C)' to '(;)' in a 'dnl' line comment in .asm file.
12817 * Makefile.am: Delete macos targets.
12818 * macos/README: Reflect that we reverted back to a build
12819 process that require ""macos/configure" to run on MacOS.
12820 This imply that MacPerl is needed for a build in MacOS.
12822 2000-07-27 Kevin Ryde <kevin@swox.se>
12824 * mpn/generic/mul_fft.c: New file, by Paul Zimmermann, minor mods
12826 * configure.in (gmp_mpn_functions): Add it.
12827 * mpn/generic/mul.c, mpn/generic/mul_n.c: Use it.
12828 * doc/multiplication: Describe it (briefly).
12830 * gmp-impl.h (FFT_MUL_THRESHOLD etc): New thresholds.
12831 (mpn_fft_best_k, mpn_fft_next_size, mpn_mul_fft, mpn_mul_fft_full):
12833 (numberof, TMP_ALLOC_TYPE etc, _MP_ALLOCATE_FUNC_TYPE etc,
12834 UNSIGNED_TYPE_MAX etc): New macros.
12836 * tune/*: Add FFT threshold tuning and speed measuring.
12837 * tune/common.c: Avoid huge macro expansions for umul and udiv.
12839 * mpz/tests/t-bin.c, mpz/tests/t-jac.c, mpz/tests/t-misc.c,
12840 mpbsd/tests/t-misc.c, mpf/tests/t-misc.c, mpn/tests/try.c,
12841 mpn/tests/spinner.c: Use new gmp-impl.h macros.
12843 * demos/Makefile.am (BUILT_SOURCES): Don't need calc.c etc under this.
12845 2000-07-27 Torbjorn Granlund <tege@swox.com>
12847 * mpn/ia64/gmp-mparam.h: New file.
12849 2000-07-26 Torbjorn Granlund <tege@swox.com>
12851 * demos/isprime.c: Handle any number of arguments and print
12852 classification for each. Add `-q' option for old behaviour.
12854 2000-07-26 Kevin Ryde <kevin@swox.se>
12856 * gmp.texi (Build Options): Mention djgpp stack size.
12857 (Notes for Package Builds): New section.
12858 (Compatibility with older versions): Update for 3.1, add mpf_get_prec.
12860 * demos/factorize.c [__GLIBC__]: Don't declare random() under glibc.
12862 * gmp.h (gmp_version): Add prototype and define.
12864 * Makefile.am: Keep macos directory generated files up-to-date
12865 during development and on a "make dist".
12867 2000-07-25 Torbjorn Granlund <tege@swox.com>
12869 * mpn/hppa/gmp-mparam.h: Update threshold values from new `tune' run.
12871 * mpn/pa64/gmp-mparam.h: Fill in values from `make tune' run.
12872 * mpn/pa64w/gmp-mparam.h: Likewise.
12873 * mpn/mips3/gmp-mparam.h: Likewise.
12875 * tune/hppa2.asm: Fix typo in .level directive.
12877 * configure.in: Add sparc64-*-linux* support (from Jakub Jelinek).
12878 * configure: Regenerate.
12880 * mpn/sparc64/rshift.asm: Use %g5 instead of volatile stack frame area
12881 for return value (from Jakub Jelinek).
12882 * mpn/sparc64/lshift.asm: Likewise.
12884 * mpf/get_prc.c: Revert Aug 8, 1996 change.
12886 * version.c: No longer static.
12888 * mpn/pa64/gmp-mparam.h: Only #define *_THRESHOLD if not already
12890 * mpn/pa64w/gmp-mparam.h: Likewise.
12891 * mpn/arm/gmp-mparam.h: Likewise.
12892 * mpn/mips3/gmp-mparam.h: Likewise.
12894 2000-07-25 Kevin Ryde <kevin@swox.se>
12896 * INSTALL: It's "info -f ./gmp.info" to be sure of hitting the
12897 gmp.info in the current directory.
12899 * Makefile.am (libmp_la_DEPENDENCIES): Add mpz/cmp.lo, for last
12902 * mpn/sparc64/addmul1h.asm, mpn/sparc64/submul1h.asm: Renamed from
12903 addmul_1h.asm, submul_1h.asm to avoid name conflicts on an 8.3
12905 * mpn/sparc64/addmul_1.asm, mpn/sparc64/submul_1.asm,
12906 mpn/sparc64/mul_1.asm: Update include_mpn()s.
12908 2000-07-24 Torbjorn Granlund <tege@swox.com>
12910 * Update header of all files previously under the Library GPL
12911 to instead be under the Lesser GPL.
12913 * COPYING.LIB: Now Lesser GPL.
12914 * demos/primes.c: Change license to GPL (was Library GPL).
12915 * demos/isprime.c: Change license to GPL (was Library GPL).
12917 * gmp.h (error code enum): Add GMP_ERROR_BAD_STRING (currently unused).
12919 * mpz/tests/t-mul.c: Default SIZE to a function of TOOM3_MUL_THRESHOLD.
12920 Improve error messages. Decrease reps.
12922 2000-07-22 Kevin Ryde <kevin@swox.se>
12924 * tune/speed.h: Decrease the amount of data used for gcd and powm
12925 measuring, to make the tune go a bit faster.
12927 2000-07-21 Kent Boortz <kent@swox.se>
12929 * macos/Asm*, macos/CmnObj, macos/Mp*: Directories no longer created
12930 from configure script, now part of dist.
12932 * macos/Makefile.cw
12935 New files and directories that is the output from configure. This way
12936 no Perl installation is required to build on MacOS, just MPW.
12937 * macos/configure: Added prefix '__g' to exported assembler labels.
12938 Changed to handle new m4 syntax instead of the old cpp syntax in asm.
12939 * macos/Makefile.in: Corrected 'clean' target, added 'distclean'
12940 and 'maintainer_clean'. Added "mpn/mp_bases.c" to build.
12941 * macos/README: Reflect the new build process without configure.
12942 Corrected the file structure for Apple MPW installation.
12944 2000-07-21 Torbjorn Granlund <tege@swox.com>
12946 * mpf/tests/t-muldiv.c: Relax error limit. Make precision depend
12947 on SIZE. Misc changes.
12949 * configure: Regenerate.
12951 2000-07-20 Kent Boortz <kent@swox.com>
12953 * macos/Makefile.in: Removed hard coded targets, added special
12954 targets found in Makefile.am files.
12955 * macos/configure: Generate targets from top configure script and
12956 Makefile.am files. Made script runnable from Unix for testing.
12957 * macos/README: Notes about search paths for includes, contributed
12959 * configure.in: Added comment about lines that the "macos/configure"
12962 2000-07-20 Torbjorn Granlund <tege@swox.com>
12964 * mpz/powm.c (mpz_powm): After final mpz_redc call, subtract `mod'
12965 from result if it is greater than `mod'.
12967 2000-07-19 Torbjorn Granlund <tege@swox.com>
12969 * mpn/hppa/gmp-mparam.h: Fill in values from `make tune' run.
12970 * mpn/alpha/gmp-mparam.h: Likewise.
12971 * mpn/powerpc32/gmp-mparam.h: Likewise.
12973 * tune/hppa.asm: New file.
12974 * tune/hppa2.asm: New file.
12975 * configure.in (SPEED_CYCLECOUNTER_OBJS): Set for hppa2*-*-* and
12977 * tune/Makefile.am (EXTRA_DIST): Add hppa.asm and hppa2.asm.
12979 * tune/speed.h (SPEED_ROUTINE_MPN_BZ_DIVREM_CALL): Declare `marker';
12982 * mpn/hppa/hppa1_1/udiv_qrnnd.S: Use "%" instead of "'" for
12983 reloc/symbol delimiter.
12985 2000-07-16 Torbjorn Granlund <tege@swox.com>
12987 * mpn/powerpc64/gmp-mparam.h: Update with output from tune utility.
12988 * mpn/powerpc64/copyi.asm: New file.
12989 * mpn/powerpc64/copyd.asm: New file.
12991 2000-07-16 Kevin Ryde <kevin@swox.se>
12993 * tune/*: Add measuring for umul_ppmm and udiv_qrnnd.
12995 2000-07-14 Kevin Ryde <kevin@swox.se>
12997 * mpn/x86/k6/k62mmx: New directory.
12998 * configure.in (k6[23]*-*-*): Use it.
12999 * mpn/x86/k6/k62mmx/copyi.asm, mpn/x86/k6/k62mmx/copyd.asm: Move from
13000 mmx directory, improve code alignment a bit.
13001 * mpn/x86/k6/k62mmx/lshift.asm, mpn/x86/k6/k62mmx/rshift.asm: Ditto,
13002 and improve addressing modes for pre-CXT cores.
13003 * mpn/x86/x86-defs.m4 (Zdisp): Add an instruction.
13004 * mpn/x86/k6/mmx/lshift.asm, mpn/x86/k6/mmx/rshift.asm: New files,
13006 * mpn/x86/README, mpn/x86/k6/README: Updates.
13007 * mpn/x86/k6/mmx/*.asm: Update some comments.
13009 * mpn/tests/Makefile.am: Use $(MAKE) in .asm rules, not "m".
13010 * tune/Makefile.am: Use $(EXEEXT) and libtool --config objdir, for
13011 the benefit of djgpp.
13013 * */Makefile.in: Regenerate with patched automake that adds
13014 $(EXEEXT) to EXTRA_PROGRAMS.
13016 * mpn/tests/try.c: Add #ifdef to SIGBUS, for the benefit of djgpp.
13017 * config.guess: Recognise pc:*:*:* as an x86, for djgpp.
13019 * configure: Regenerate with patched autoconf to fix temp file
13020 ".hdr" which is invalid on a DOS 8.3 filesystem, and to fix two
13021 sed substitutes that clobbered a ":" in $srcdir (eg. a DOS drive
13024 * mpz/tests/io.c: Use one fp opened "w+", since separately opened
13025 input and output doesn't work on MS-DOS 6.21.
13027 * tests/rand/Makefile.am (allprogs): Pseudo-target to build everything.
13028 (CLEANFILES): Add EXTRA_PROGRAMS and EXTRA_LTLIBRARIES.
13029 (manual-test, manual-bigtest): Add $(EXEEXT) to dependencies.
13031 * tests/rand/*/Makefile.in: Regenerate with patched automake that adds
13032 $(EXEEXT) to EXTRA_PROGRAMS.
13034 2000-07-13 Torbjorn Granlund <tege@swox.com>
13036 * mpz/tests/t-root.c: Also test mpz_perfect_power_p.
13037 Generate `nth' so that there will be fewer trivial values.
13039 * mpz/root.c: Reverse return value in tests for detecting root of +1
13042 * mpz/perfpow.c: Use TMP_ALLOC interface.
13044 2000-07-12 Torbjorn Granlund <tege@swox.com>
13046 * mpz/perfpow.c (primes): Make it const.
13048 2000-07-06 Kevin Ryde <kevin@swox.se>
13050 * mpn/x86/k6/cross.pl: New file.
13052 * mpn/x86/*/gmp-mparam.h: Updates to thresholds, conditionalize
13054 * mpn/x86/pentium/mmx/gmp-mparam.h: New file.
13055 * mpn/sparc64/gmp-mparam.h: Update thresholds.
13056 * mpn/sparc32/v9/gmp-mparam.h: Ditto.
13058 2000-07-04 Kevin Ryde <kevin@swox.se>
13061 * mpn/x86/*/README: Miscellaneous updates.
13063 * tune/speed-ext.c: New file.
13064 * tune/Makefile.am: Add it.
13065 * tune/README: Updates.
13066 * tune/speed.h (SPEED_ROUTINE_MPN_DIVREM_2): Bug fixes.
13068 * demos/calc.y,calclex.l: New files.
13069 * demos/calc.c,calc.h,calclex.c: New files, generated from .y and .l.
13070 * demos/Makefile.am: Add them.
13072 * gmp.h (mpq_swap, mpf_swap): Add prototypes and defines.
13074 2000-07-01 Kevin Ryde <kevin@swox.se>
13076 * gmp.texi (ABI and ISA): New section, bringing together ABI notes.
13077 (Build Options): Add MPN_PATH, various updates.
13078 (Build Options): Add note on setting CFLAGS when setting CC.
13079 (Notes for Particular Systems): Add -march=pentiumpro problem.
13080 (Known Build Problems): Note on gmp-mparam.h for 64-bit generic C.
13081 (GMP Variable Conventions): Add some info on user defined functions.
13082 (Reporting Bugs): Minor rewording.
13084 * configure.in (MPN_PATH): Renamed from mpn_path.
13086 * gmp-impl.h (ULONG_MAX,ULONG_HIGHBIT,...,SHORT_MAX): New defines.
13087 * mp[zf]/tests/t-misc.c: Use them.
13089 * mpbsd/tests/t-misc.c: New file.
13090 * mpbsd/tests/Makefile.am: Add it.
13092 * Makefile.am (LIBGMP_LT_*, LIBMP_LT_*): Bump version info.
13093 * gmp.h (__GNU_MP_VERSION_*): Bump to 3.1.
13095 * mpf/tests/Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
13097 * Makefile.am (libmp_la_SOURCES): Add mp_set_fns.c, accidentally
13098 omitted in gmp 3.0.x.
13099 * gmp.texi (Custom Allocation): Note this is available in mpbsd,
13100 and some minor rewording.
13102 2000-06-30 Torbjorn Granlund <tege@swox.com>
13104 * demos/factorize.c (random): New function, defined conditionally.
13105 (factor_using_pollard_rho): Use it, not mrand48.
13107 * mpn/cray/README: New file.
13109 2000-06-30 Kevin Ryde <kevin@swox.se>
13111 * mpn/x86/pentium/aorsmul_1.asm: Add MULFUNC_PROLOGUE.
13113 * mpz/tests/t-jac.c: Test limbs on mpn_jacobi_base, not just ulongs.
13115 * gmp-impl.h, mpn/tests/try.c, mpn/tests/spinner.c, tune/speed.c:
13116 Use config.h unconditionally, not under HAVE_CONFIG_H.
13118 * demos/pexpr.c [__DJGPP__]: Patch by Richard Dawe to not use
13119 setup_error_handler on djgpp.
13121 * tune/*: Locate data to help direct-mapped caches, add measuring
13122 of mpz_init/clear, mpz_add and mpz_bin_uiui, various cleanups.
13123 * configure.in (AC_CHECK_FUNCS): Add popen.
13125 2000-06-29 Torbjorn Granlund <tege@swox.com>
13127 * mpf/mul_2exp.c: Streamline criterion for whether to use mpn_lshift or
13128 mpn_rshift. Increase precision when exp is a multiple of
13129 BITS_PER_MP_LIMB primarily to make exp==0 be a noop.
13130 * mpf/div_2exp.c: Analogous changes.
13132 * mpf/tests/t-dm2exp.c: Set u randomly in loop. Perform more
13133 mpf_mul_2exp testing.
13135 * configure.in: Recognize cray vector processors with a broad `*';
13136 move after alpha* not to match that.
13138 2000-06-28 Kevin Ryde <kevin@swox.se>
13140 * mpz/tests/io.c: Use a disk file, not a pipe, switch to ansi2knr
13141 style, switch from MP_INT to mpz_t, add a couple of error checks.
13142 * mpz/tests/Makefile.am (CLEANFILES): Add io.tmp, in case io.c fails.
13144 2000-06-27 Torbjorn Granlund <tege@swox.com>
13146 * mpf/tests/t-get_d.c: Be more lax about relative error, to handle Cray
13147 floating point format.
13149 * mpq/tests/t-get_d.c: Decrease default reps to 1000.
13151 * mpf/tests/t-conv.c: Correct type of `bexp'.
13153 * configure.in (cray vector machines): Don't inherit gmp_cflags_cc.
13155 * tune/Makefile.am (EXTRA_DIST): Delete sparc64.asm.
13157 * configure.in (cray vector machines): Set extra_functions.
13159 * mpn/cray/mulww.f: New file with vectorizing cray code.
13160 * mpn/cray/mulww.s: Generated from mulww.f.
13161 * mpn/cray/mul_1.c: New file.
13162 * mpn/cray/addmul_1.c: New file.
13163 * mpn/cray/submul_1.c: New file.
13164 * mpn/cray/add_n.c: New file.
13165 * mpn/cray/sub_n.c: New file.
13167 2000-06-26 Kevin Ryde <kevin@swox.se>
13169 * acinclude.m4 (GMP_CHECK_ASM_ALIGN_FILL_0x90): Fix so it actually
13170 detects solaris 2.6, and also suppress warning on solaris 2.8.
13171 * configure.in (SPEED_CYCLECOUNTER): Remove spurious "athlon" from
13174 * mpn/lisp/gmpasm-mode.el: Move keymap to the top of the docstring.
13176 2000-06-21 Kevin Ryde <kevin@swox.se>
13178 * mpn/generic/mul_n.c (mpn_kara_mul_n, mpn_kara_sqr_n): Use
13180 (mpn_toom3_mul_n, mpn_toom3_sqr_n): Use mp_size_t for size
13181 parameters and "l" variables.
13182 * gmp-impl.h (mpn_toom3_mul_n, mpn_toom3_sqr_n): Update prototypes.
13184 * mpbsd/itom.c, mpbsd/sdiv.c: Add casts for correct handling of
13185 -0x80...00 on systems with sizeof(short)==sizeof(int).
13187 * mpz/tests/t-misc.c: Move "bin" test from here ...
13188 * mpz/tests/t-bin.c: ... to here, and add a new (2k,k) test too.
13189 * mpz/tests/Makefile.am (check_PROGRAMS): Add t-bin.
13191 * mpz/bin_ui.c [_LONG_LONG_LIMB]: Use mpn_divrem_1, since kacc is
13192 a limb not a ulong.
13193 * mpz/bin_uiui.c [_LONG_LONG_LIMB]: Ditto, and use mpn_mul_1 too,
13194 since nacc is a limb.
13196 * mpf/tests/t-misc.c (check_mpf_set_si, check_mpf_cmp_si):
13197 New file, testing mpf_set_si, mpf_init_set_si, and mpf_cmp_si.
13198 * mpf/tests/Makefile.am (check_PROGRAMS): Add it.
13200 * mpz/tests/t-misc.c (check_mpz_set_si, check_mpz_cmp_si):
13201 New tests, for mpz_set_si, mpz_init_set_si, and mpz_cmp_si.
13203 * mpz/set_si.c, mpz/iset_si.c, mpz/cmp_si.c [_LONG_LONG_LIMB]: Fix
13204 handling of -0x80..00.
13205 * mpf/set_si.c, mpf/iset_si.c, mpf/cmp_si.c [_LONG_LONG_LIMB]: Ditto.
13207 2000-06-19 Torbjorn Granlund <tege@swox.com>
13209 * demos/primes.c: Properly handle arguments `m +n'.
13211 2000-06-17 Torbjorn Granlund <tege@swox.com>
13213 * config.sub: Recognize k5 and k6 with common pattern.
13215 * mpq/tests/t-get_d.c: Also test mpq_set_d. Misc improvements.
13217 * mpq/set_d.c: Special case 0.0. Don't call mpn_rshift with 0 count.
13218 Allocate correct amount of memory for numerator. Delete spurious
13221 2000-06-17 Kevin Ryde <kevin@swox.se>
13223 * mpz/perfsqr.c: Fix so that zero is considered a perfect square.
13224 (Was wrongly calling mpn_perfect_square_p with size==0.)
13226 2000-06-16 Kevin Ryde <kevin@swox.se>
13228 * configure.in: Set k5*-*-* to use basic i386 code until there's
13229 something specific. Add path=x86 as a default for x86s.
13231 * acinclude.m4 (GMP_CHECK_ASM_ALIGN_LOG): Generate
13232 ALIGN_LOGARITHMIC setting, not a full ALIGN definition.
13233 (GMP_CHECK_ASM_ALIGN_FILL_0x90): New test.
13234 * configure.in [x86-*-*]: Use GMP_CHECK_ASM_ALIGN_FILL_0x90.
13235 * mpn/asm-defs.m4 (ALIGN): New macro.
13236 * mpn/x86/x86-defs.m4 (ALIGN): Remove supplementary definition.
13238 * tune/*: Plain "unsigned" for speed_cyclecounter.
13239 * configure.in: Use tune/sparcv9.asm for 32 and 64 bit modes.
13240 * tune/sparc64.asm: Remove file.
13242 2000-06-15 Torbjorn Granlund <tege@swox.com>
13244 * mpn/x86/k7/mmx/copyi.asm: Use `testb' instead of `test'.
13245 * mpn/x86/k7/mmx/copyd.asm: Likewise.
13247 * mpn/x86/k7/mmx/lshift.asm: Avoid using `~' (Solaris as problems).
13248 * mpn/x86/k7/mmx/rshift.asm: Likewise.
13249 * mpn/x86/k6/aors_n.asm: Likewise.
13250 * mpn/x86/k7/aors_n.asm: Likewise.
13251 * mpn/x86/k7/mul_basecase.asm: Likewise.
13253 2000-06-13 Torbjorn Granlund <tege@swox.com>
13255 * tune/sparcv9.asm: Tune, deleting two instructions.
13257 * tune/alpha.asm: Update to unified speed_cyclecounter.
13259 2000-06-11 Kevin Ryde <kevin@swox.se>
13261 * mpz/tests/reuse.c (FAIL): Add a K&R version.
13262 Use _PROTO on some typedefs.
13263 * mpz/tests/t-misc.c: Add gmp-impl.h for "const".
13265 * configure.in: Rework mpn multi-function and optional files.
13266 Names standardized, no need for explicit declarations, all picked
13267 up in one $path traversal.
13268 * doc/configuration: Updates.
13270 * tests/rand/t-rand.c (main): Change "usage" to work with K&R.
13272 2000-06-10 Kevin Ryde <kevin@swox.se>
13274 * mpn/x86/pentium/mmx/popham.asm, mpn/x86/p6/mmx/popham.asm,
13275 mpn/x86/p6/p3mmx/popham.asm, mpn/x86/p6/diveby3.asm: Add
13276 MULFUNC_PROLOGUE for correct HAVE_NATIVE_* matching.
13278 * mpn/x86/x86-defs.m4 (cmov_bytes_tttn): Use eval() on expressions.
13279 (cmov_available_p): Switch to list CPUs which do have cmov.
13280 * mpn/x86/p6/sqr_basecase.asm, mpn/x86/k6/sqr_basecase.asm,
13281 mpn/x86/k7/sqr_basecase.asm: Use eval() for multiplication.
13282 * mpn/x86/README.family: Various updates.
13284 2000-06-09 Kevin Ryde <kevin@swox.se>
13286 * mpbsd/tests/allfuns.c (main): Call exit() instead of doing return.
13288 * doc/tasks.html, doc/projects.html: Moved from projects directory.
13289 * doc/multiplication: New file.
13290 * Makefile.am (EXTRA_DIST): Remove projects, add doc.
13292 * Makefile.am (libgmp_la_LIBADD, libmp_la_LIBADD): Remove
13294 * INSTALL: Remove -lm from instructions.
13295 * demos/Makefile.am (qcn_LDADD): Add -lm.
13297 * tune/*: Add measuring for mpn_divrem_2 and modlimb_invert,
13298 improve addsub_n. Switch to unified speed_cyclecounter.
13299 * configure.in: Update configs for speed_cyclecounter.
13301 * gmp-impl.h (MP_LIMB_T_MAX, MP_LIMB_T_HIGHBIT): New macros.
13302 * mpn/generic/diveby3.c, mpn/generic/mul_n.c, mpn/generic/gcd.c,
13303 tune/speed.c, mpn/tests/ref.c: Use them.
13305 * mpn/tests/spinner.c: Remove setitimer, just alarm is enough.
13306 * configure.in (AC_CHECK_FUNCS): Remove setitimer.
13307 * mpn/tests/x86call.asm: Start with junk in %eax, %ecx, %edx.
13308 * mpn/tests/ref.[ch] (refmpn_addsub_nc): New function.
13309 * mpn/tests/try.c: Add some support for mpn_addsub_nc.
13310 * mpn/tests/Makefile.am (EXTRA_PROGRAMS): Remove addsub_n and
13311 addsub_n_2 which don't currently build.
13312 * mpn/tests/copy.c: Test MPN_COPY_INCR, not __gmpn_copy.
13314 * tests/rand/Makefile.am (libstat_la_LIBADD): Add -lm, no longer on
13316 (findlc_LDADD): Use libstat.la.
13317 (AUTOMAKE_OPTIONS): Use ansi2knr.
13319 2000-06-08 Torbjorn Granlund <tege@swox.com>
13321 * configure.in (alpha*-*-osf*): Default `flavour' to ev6 for ev6 and
13323 (alpha*-*-*): Likewise.
13324 (alpha*-*-osf*: gmp_optcflags_cc): Move -arch/-tune flags from
13325 gmp_xoptcflags_gcc.
13327 * mpn/Makefile.am (TARG_DIST): Add pa64w.
13329 * longlong.h: Wrap 64-bit hppa code in #ifndef LONGLONG_STANDALONE.
13331 2000-06-07 Torbjorn Granlund <tege@swox.com>
13333 * mpz/remove.c: Fail for `src' being zero.
13335 * mpz/tests/reuse.c: Test more functions.
13336 (FAIL): New define.
13338 * mpz/tests/t-powm.c: Loop during operand generation while they
13339 are mathematically ill-defined (used to just skip such tests).
13341 * mpz/powm.c (mpz_redc): Clean up argument declarations.
13343 * configure.in (gmp_cflags64_gcc): Don't add bogus -mWHAT option.
13344 (sparcv9-*-solaris2.[7-9]], gmp_cflags64_gcc):
13345 Inherit from previous gmp_cflags64_gcc; pass `-m64 -mptr64'.
13348 * mpn/generic/dump.c: Make it work when an mp_limb_t is not `long'.
13350 * mpf/set_prc.c: MPN_COPY => MPN_COPY_INCR.
13352 2000-06-06 Torbjorn Granlund <tege@swox.com>
13354 * mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n):
13355 Use mpn_incr_u for final carry propagation.
13357 * mpz/tests/t-gcd.c: Add calls to mpz_gcdext with argument t == NULL.
13359 * mpz/tests/reuse.c: Major rewrite; test many more functions.
13361 * mpz/powm_ui.c: When exp is 0, change res assign order in order
13362 to handle argument overlap.
13363 * mpz/powm.c: When exp is 0, change res assign order in order
13364 to handle argument overlap. Handle negative exp and mod arguments.
13366 * mpz/gcdext.c: Rework code after mpn_gcdext call to handle
13369 * mpz/fdiv_qr.c: Read dividend->_mp_size before calling mpz_tdiv_qr
13370 in order to handle argument overlap.
13371 * mpz/cdiv_qr.c: Likewise.
13373 * mpf/tests/reuse.c: Fix typo that effectively disabled `dis_funcs'
13374 tests. Clean up test for mpf_ui_div.
13376 2000-06-06 Kevin Ryde <kevin@swox.se>
13378 * mpn/x86/p6/sqr_basecase.asm: New file.
13379 * mpn/x86/mod_1.asm: Avoid one conditional jump.
13380 * mpn/x86/p6/gmp-mparam.h: Update thresholds, #ifndef UMUL_TIME
13381 and UDIV_TIME, add COUNT_TRAILING_ZEROS_TIME.
13383 * mp_minv_tab.c: New file.
13384 * Makefile.am (libgmp_la_SOURCES, libmp_la_SOURCES): Add it.
13385 * gmp-impl.h (modlimb_invert): New macro.
13386 * mpz/powm.c: Remove mpz_dmprepare, use modlimb_invert instead.
13387 * mpn/generic/bdivmod.c: Use modlimb_invert instead of a loop.
13388 * mpn/generic/gcd.c: Inline two small mpn_bdivmod calls, use
13389 MPN_COPY_INCR not MPN_COPY in one place.
13391 2000-06-05 Torbjorn Granlund <tege@swox.com>
13393 * mpf/tests/reuse.c (dsi_funcs): Add mpf_mul_2exp and mpf_div_2exp.
13394 (main): Clean up test for mpf_div_ui.
13396 * mpf/mul_2exp.c: Correct criterion for whether to use mpn_lshift or
13397 mpn_rshift. MPN_COPY => MPN_COPY_INCR. Coerce the two assignments to
13400 * mpf/div_2exp.c: Use mpn_rshift instead of mpn_lshift when overlap
13401 so requires. MPN_COPY => MPN_COPY_INCR.
13403 * mpf/tests/t-dm2exp.c: Correct type of res_prec.
13405 2000-06-04 Kevin Ryde <kevin@swox.se>
13407 * mpz/bin_uiui.c: Fix result for n==0 and n==k.
13408 * mpz/bin_ui.c: Fix result for k>n, add support for n<0.
13409 * gmp.texi (Number Theoretic Functions): Update mpz_bin_ui to
13410 note n<0 is supported.
13412 * mpz/tests/t-misc.c: New file.
13413 * mpz/tests/Makefile.am (check_PROGRAMS): Add it.
13415 2000-05-31 Kevin Ryde <kevin@swox.se>
13417 * tune/speed.* (FLAG_R_OPTIONAL): New option for routines, use on
13418 mpn_gcd_1 and mpn_mul_basecase.
13419 * tune/README: Update.
13421 * tune/alpha.asm: New file, by Torbjorn.
13422 * tune/Makefile.am (EXTRA_DIST): Add it.
13423 * configure.in (alpha*-*-*): Use it.
13425 2000-05-31 Linus Nordberg <linus@swox.se>
13427 * doc/configuration: New file.
13429 2000-05-30 Torbjorn Granlund <tege@swox.com>
13431 * mpn/generic/mul_basecase.c: Call mpn_mul_2 and mpn_addmul_2
13432 if available. Don't include longlong.h.
13434 * doc/isa_abi_headache: New file.
13436 2000-05-30 Linus Nordberg <linus@swox.se>
13438 * configure.in (NM): Use AC_PROG_NM rather than AC_CHECK_TOOL to
13439 find `nm'. (AC_PROG_NM comes with Libtool and is needed to get
13440 the `-B' option (BSD compatible output) included in $NM.)
13441 (AR): Use AC_CHECK_PROG rather than AC_CHECK_TOOL to find `ar'.
13442 (Now that NM isn't a cross compilation tool, don't give the
13443 impression that we know how to cross compile.)
13444 (CCAS): Remove spurious comment.
13446 * gmp.texi (Notes for Particular Systems): Remove comment about
13447 using GNU `nm' on AIX since system nm now works.
13449 2000-05-29 Torbjorn Granlund <tege@swox.com>
13451 * mpn/power/mul_1.s: Remove [PR] from first word in function
13453 * mpn/power/addmul_1.s: Likewise.
13454 * mpn/power/submul_1.s: Likewise.
13456 2000-05-28 Kevin Ryde <kevin@swox.se>
13458 * configure.in, tune/*: Change pentium rdtsc cycle scheme to
13459 HAVE_SPEED_CYCLECOUNTER and SPEED_CYCLECOUNTER_OBJS.
13460 * tune/pentium.asm: Renamed and converted from rdtsc.asm.
13461 * tune/sparcv9.asm: New file, by Torbjorn.
13462 * tune/sparc64.asm: New file.
13463 * tune/tuneup.c: Put a limit on gcdext search.
13465 * gmp.h (mp_set_memory_functions): Add extern "C".
13466 * mp.h (__GNU_MP__): Bump to "3".
13467 * mpz/add.c,mul.c,powm.c,sub.c,sqrtrem.c,tdiv_qr.c [BERKELEY_MP]:
13468 Include mp.h for mpbsd compile.
13469 * mpz/gcd.c: Ditto, and remove _mpz_realloc declaration.
13471 * gmp.texi (Integer Functions): Flatten @subsections into @sections.
13472 (Floating-point Functions): Ditto.
13473 (Integer Random Numbers): Split from miscellaneous as a sep section.
13474 (Installing GMP): Make nodes for the sections.
13475 Add more "@cindex"s.
13476 (Known Build Problems): Remove SunOS get_d problem, believed fixed.
13477 (Notes for Particular Systems): Remove HPPA note since now PIC.
13478 (References): URL for Jebelean.
13480 2000-05-27 Torbjorn Granlund <tege@swox.com>
13482 * mpn/pa64w: New directory, contents based on corresponding mpn/pa64
13484 * configure.in (hppa2.0w-*-*): New.
13485 * mpz/tests/io.c (_INCLUDE_POSIX_SOURCE): Define when __hpux before
13487 * gmp-impl.h: Always define DItype and UDItype.
13489 2000-05-27 Kevin Ryde <kevin@swox.se>
13491 * tune/common.c (speed_measure): Correction to array sorting,
13492 better diagnostic when measuring fails.
13493 * tune/time.c: Add microsecond accurate getrusage method.
13495 * tune/time.c (speed_cpu_frequency_processor_info): New function.
13496 * configure.in (AC_CHECK_FUNCS): Add processor_info.
13498 2000-05-26 Linus Nordberg <linus@swox.se>
13500 * gmp.texi (Installing GMP): Shared libraries work for AIX < 4.3
13503 2000-05-26 Torbjorn Granlund <tege@swox.com>
13505 * tune/tuneup.c (SIGNED_TYPE_MAX): Shift `-1' instead of `1' to
13506 avoid signed overflow.
13508 * demos/pexpr.c (setup_error_handler): Don't call sigaltstack on
13511 2000-05-25 Torbjorn Granlund <tege@swox.com>
13513 * insert-dbl.c: Work around GCC 2.8 bug.
13514 * extract-dbl.c: Likewise.
13516 * config.sub: Allow i586, i686, i786 again.
13518 * config.guess: Use X86CPU for lots more systems.
13520 2000-05-25 Linus Nordberg <linus@swox.se>
13522 * mpbsd/tests/dummy.c (main): Call exit() instead of doing return
13523 (some old SysV machines don't get this correct, I've heard.)
13525 2000-05-25 Kevin Ryde <kevin@swox.se>
13527 * mpf/iset_str.c: Initialize _mp_size and _mp_exp to 0, in case no
13528 digits in string, so it's the same as a separate init and set_str.
13530 2000-05-24 Torbjorn Granlund <tege@swox.com>
13532 * mpz/tests/reuse.c: Use mpz_random2 instead of mpz_random.
13534 * mpz/divexact.c: Read pointers after reallocation.
13535 Compare `quot' and `den' instead of `qp' and `dp' in overlap check.
13536 Use MPN_COPY_INCR for copying from `np'.
13538 (*-*-aix4.[3-9]*): Disable shared libs just for problematic AIX
13540 * configure.in (*-cray-unicos*): Disable asm syntax checking; set
13541 compiler explicitly.
13542 * configure.in (hppa*-*-*): Remove code disabling shared libs.
13544 2000-05-24 Linus Nordberg <linus@swox.se>
13546 * acinclude.m4 (GMP_PROG_CC_WORKS): Don't report progress to user
13547 when doing the AIX specific test to avoid "nested output".
13549 2000-05-22 Kevin Ryde <kevin@swox.se>
13551 * mp.h (_PROTO): Copy from gmp.h, use on prototypes.
13552 Add extern "C" too.
13553 * mpbsd/tests/Makefile.am (AUTOMAKE_OPTIONS): Enable ansi2knr.
13554 * mpbsd/tests/allfuns.c: Don't execute mout, just link to it.
13555 (main): ANSI style definition.
13557 * gmp-impl.h (MP_BASE_AS_DOUBLE): Change the expression to
13558 something that works on SunOS native cc. Seems to fix the
13559 mp*_get_d problems.
13561 * mpn/tests/ref.c (refmpn_strip_twos): Use MPN_COPY_INCR.
13562 * mpn/tests/Makefile.am: Let .asm.o rules work with absolute $srcdir.
13564 2000-05-21 Kevin Ryde <kevin@swox.se>
13566 * mpn/x86/k7/sqr_basecase.asm: Replace file with K7 specific code.
13567 * mpn/x86/k7/README: Update.
13568 * mpn/x86/k7/gmp-mparam.h: Tune thresholds.
13569 (COUNT_TRAILING_ZEROS_TIME): New define.
13570 * mpn/x86/k6/gmp-mparam.h: Ditto.
13572 * mpn/x86/pentium/mmx/popham.asm: New file (include_mpn of K6 version).
13573 * mpn/x86/p6/diveby3.asm: New file (include_mpn of P5 version).
13574 * mpn/x86/p6/mmx/popham.asm: New file (include_mpn of K6 version).
13575 * mpn/x86/p6/p3mmx/popham.asm: New file (include_mpn of K7 version).
13576 * configure.in (pentium3-*-*): Add p3mmx to $path.
13578 * gmp.texi (Integer Arithmetic): Clarify mpz_jacobi op2; add
13580 (Miscellaneous Integer Functions): Add mpz_odd_p and mpz_even_p.
13581 (Low-level Functions): Put mpn_divmod_1 with mpn_divrem_1 and note
13583 (References): Add Henri Cohen.
13585 * gmp.h (mpn_addmul_1c, mpn_divrem_1c, mpn_mod_1c, mpn_mul_1c,
13586 mpn_submul_1c): Add prototypes.
13587 (mpz_odd_p, mpz_even_p): New macros.
13589 * mpn/asm-defs.m4 (m4wrap_prepend): New macro.
13590 (m4_error): Use it.
13591 (m4_not_for_expansion): Corrections to OPERATION symbols.
13592 More comments about variations between m4 versions.
13593 * mpn/x86/x86-defs.m4 (PROLOGUE): Use m4wrap_prepend (fixes error
13594 exit under BSD m4, previously m4_error printed the message but the
13597 * gmp.h (mpn_divmod_1): Change to a macro calling mpn_divrem_1.
13598 * mpn/generic/divrem_1.c: Move divmod_1.c code to here, make it
13599 static and call it __gmpn_divmod_1_internal.
13600 * mpn/generic/divmod_1.c: Remove file.
13601 * configure.in (gmp_mpn_functions): Remove divmod_1.
13602 * mpn/asm-defs.m4 (define_mpn): Remove divmod_1 and divmod_1c.
13603 * compat.c (mpn_divmod_1): Add compatibility function.
13604 * tune/*: Remove mpn_divmod_1 measuring (leave just divrem_1).
13606 * acconfig.h (HAVE_NATIVE_mpn_*): Add some missing carry-in
13607 variants, remove divmod_1.
13609 * mpn/x86/diveby3.asm: Use imul, update comments.
13611 * demos/qcn.c: New file.
13612 * demos/Makefile.am (EXTRA_PROGRAMS): Add it.
13614 * mpz/tests/t-jac.c: New file.
13615 * mpz/tests/Makefile.am (check_PROGRAMS): Add it. Enable ansi2knr.
13617 * mpz/kronsz.c: New file.
13618 * mpz/kronuz.c: New file.
13619 * mpz/kronzs.c: New file.
13620 * mpz/kronzu.c: New file.
13621 * mpz/Makefile.am (libmpz_la_SOURCES): Add them.
13622 * Makefile.am (MPZ_OBJECTS): Add them.
13623 * gmp-impl.h (JACOBI_*, MPN_STRIP_LOW_ZEROS_NOT_ZERO): New macros.
13624 * gmp.h (mpz_*_kronecker_*): New defines and prototypes.
13626 * mpn/generic/jacbase.c: New file.
13627 * mpn/generic/mod_1_rs.c: New file.
13628 * configure.in (gmp_mpn_functions): Add them.
13629 * gmp.h (mpn_jacobi_base, mpn_mod_1_rshift): New defines and
13631 * longlong.h (COUNT_TRAILING_ZEROS_TIME): New define.
13632 * mpn/tests/ref.c (refmpn_mod_1_rshift): New function.
13633 * mpn/tests/try.c: Add mpn_mod_1_rshift.
13634 * tune/*: Add measuring for mpn_jacobi_base.
13636 * acinclude.m4 (GMP_FINISH): Add ifdefs to allow multiple
13637 inclusion of config.m4.
13638 (GMP_PROG_M4): Put "good" message through to config.log.
13640 * mpz/powm.c: Use a POWM_THRESHOLD for where redc stops.
13641 * tune/*: Add mpz_powm measuring, and tune POWM_THRESHOLD.
13642 * gmp-impl.h [TUNE_PROGRAM_BUILD] (POWM_THRESHOLD): Conditional
13643 redefinition for use when tuning.
13645 * mpz/powm_ui.c: Use DIVIDE_BY_ZERO.
13647 * mpz/iset_str.c: Initialize _mp_size to 0, in case no digits in
13648 string; this makes it the same as a separate init and set_str.
13650 2000-05-20 Kevin Ryde <kevin@swox.se>
13652 * mpn/asm-defs.m4: Note &,|,^ aren't bitwise in BSD m4 eval().
13653 * mpn/x86/k6/sqr_basecase.asm: Use "%" not "&" in m4 eval()s.
13655 * mpn/x86/x86-defs.m4 (Zdisp): Yet more instruction forms.
13657 2000-05-19 Linus Nordberg <linus@swox.se>
13659 * acinclude.m4 (GMP_CHECK_CC_64BIT): Don't use shell variable
13660 `ac_compile' for our own compile command string since other
13661 Autoconf macros may depend on it.
13663 2000-05-19 Kevin Ryde <kevin@swox.se>
13665 * mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Fix
13666 carry propagation in final coefficient additions.
13668 2000-05-18 Linus Nordberg <linus@swox.se>
13670 * configure.in: Set NM before looking for compiler since
13671 GMP_CHECK_CC_64BIT needs it.
13673 * acinclude.m4 (GMP_CHECK_CC_64BIT): Don't execute on target.
13674 (GMP_PROG_CC_FIND): Before checking if the compiler knows how to
13675 produce 64-bit code, verify that it works at all. The background
13676 is that /usr/ucb/cc on Solaris 7 successfully compiles in 64-bit
13677 mode but fails when doing final link.
13678 (GMP_PROG_CC_WORKS): Report to user what's happening.
13680 2000-05-17 Linus Nordberg <linus@swox.se>
13682 * config.guess: Use X86CPU for x86 Cygwin.
13684 2000-05-16 Kevin Ryde <kevin@swox.se>
13686 * mpn/x86/p6/mmx/divrem_1.asm: New file.
13687 * mpn/x86/p6/mmx/mod_1.asm: New file.
13688 * mpn/x86/p6/README: Update.
13689 * mpn/x86/divrem_1.asm: Update comments.
13690 * mpn/x86/mod_1.asm: Ditto.
13692 2000-05-14 Kevin Ryde <kevin@swox.se>
13694 * tune/speed.h: Run gcd functions on a set of data.
13696 * mpn/tests/try.c: New file.
13697 * mpn/tests/try.h: New file.
13698 * mpn/tests/spinner.c: New file.
13699 * mpn/tests/trace.c: New file.
13700 * mpn/tests/x86call.asm: New file.
13701 * mpn/tests/x86check.c: New file.
13702 * mpn/tests/ref.c (refmpn_hamdist): Allow size==0.
13703 (refmpn_gcd): New function, and other additions supporting it.
13704 * mpn/tests/ref.h: More prototypes.
13705 * mpn/tests/Makefile.am: Add try program, use ansi2knr.
13707 * mpn/x86/k7/mmx/popham.asm: New file.
13708 * mpn/x86/k6/mmx/popham.asm: New file.
13709 * mpn/x86/k6/sqr_basecase.asm: Unroll the addmul, for approx 1.3x
13710 speedup above 15 limbs.
13711 * mpn/x86/k7/README: Update.
13712 * mpn/x86/k6/README: Update, and add notes on plain K6 and pre-CXT
13714 * configure.in (k6*-*-*, athlon-*-*): Add popham.
13716 * mpn/x86/pentium/diveby3.asm: New file.
13717 * mpn/x86/pentium/README: Update.
13719 * gmp.texi (Installing GMP): Add note on bad OpenBSD 2.6 m4.
13720 (Reporting Bugs): Ask for config.m4 if asm file related.
13721 (I/O of Rationals): New section, add mpq_out_str.
13722 (References): Add url for on-line gcc manuals.
13723 A few node and menu updates.
13725 * INSTALL: Better command line argument checking for test progs.
13728 * configure.in (WANT_ASSERT, USE_STACK_ALLOC, HAVE_PENTIUM_RDTSC):
13729 Put descriptions here, not in acconfig.h.
13730 (CALLING_CONVENTIONS_OBJS): New AC_SUBST (for mpn/tests/try).
13731 (HAVE_CALLING_CONVENTIONS): New AC_DEFINE.
13732 (AC_CHECK_HEADERS): Add sys/time.h.
13733 (AC_CHECK_FUNCS): Add getpagesize, setitimer.
13734 (KARATSUBA_SQR_THRESHOLD): Strip trailing comments from the
13735 #define when passing through to config.m4.
13736 * acconfig.h (PACKAGE, VERSION, WANT_ASSERT, USE_STACK_ALLOC,
13737 HAVE_PENTIUM_RDTSC): No need for #undefs, autoheader gets them
13740 * acinclude.m4 (GMP_PROG_M4): Check for broken OpenBSD 2.6 m4
13741 eval(), put messages into config.log.
13742 * mpn/asm-defs.m4: Add notes and test for OpenBSD 2.6 m4.
13744 * mpq/out_str.c: New file.
13745 * mpq/Makefile.am (libmpq_la_SOURCES): Add it.
13746 * Makefile.am (MPQ_OBJECTS): Ditto.
13747 * gmp.h (mpq_out_str): New define and prototype.
13749 2000-05-12 Kevin Ryde <kevin@swox.se>
13751 * configure.in (CONFIG_TOP_SRCDIR): Fix to use $srcdir not
13752 $top_srcdir (which doesn't exist).
13753 * acinclude.m4 (GMP_C_ANSI2KNR): Fix setting U=_.
13754 * gmp-impl.h (mpn_com_n, MPN_LOGOPS_N_INLINE): Fix missing "do"
13755 (not currently used, probably no ill effect anyway).
13757 2000-05-11 Torbjorn Granlund <tege@swox.com>
13759 * randraw.c (lc): Major overhaul (pending rewrite).
13760 (_gmp_rand): Rewrite.
13762 2000-05-08 Torbjorn Granlund <tege@swox.com>
13764 * mpz/tests/convert.c: Call free via _mp_free_func.
13765 * mpf/tests/t-conv.c: Likewise.
13767 * memory.c: Add code enabled for DEBUG that adds special patterns
13768 around allocated blocks.
13770 2000-05-05 Linus Nordberg <linus@swox.se>
13772 * gmp.texi (Miscellaneous Float Functions): Correct parameter list
13773 for mpf_urandomb().
13775 * configure.in: Invoke AC_REVISION.
13777 2000-05-05 Kevin Ryde <kevin@swox.se>
13779 * gmp.texi: Use @dircategory and @direntry.
13780 (Installing GMP): Clarification for --target, updates on SunOS
13782 (Integer Arithmetic): Add mpz_mul_si.
13783 (Initializing Rationals): Add mpq_swap.
13784 (Assigning Floats): Add mpf_swap.
13785 (Low-level Functions): Add mpn_divexact_by3c, and details of what
13786 the calculation actually gives.
13787 (Low-level Functions): Note extra space needed by mpn_gcdext,
13788 clarify the details a bit.
13790 * compat.c: New file, entry points for upward binary compatibility.
13791 (mpn_divexact_by3): Compatibility function.
13792 * Makefile.am (libgmp_la_SOURCES): Add compat.c.
13794 * mpn/tests/ref.c: Rearrange macros for ansi2knr.
13795 (div1): Renamed from div to avoid library function.
13796 (refmpn_divexact_by3c, refmpn_gcd_1, refmpn_popcount,
13797 refmpn_hamdist): New functions.
13798 * mpn/tests/ref.h: Add extern "C", add new prototypes.
13800 * gmp.h (gmp_randinit, etc): Add extern "C".
13801 (_mpq_cmp_ui): Fix prototype name from mpq_cmp_ui.
13802 (mpn_divexact_by3): Now a macro calling mpn_divexact_by3c.
13803 (mpn_divexact_by3c): New prototype and define.
13805 * mpn/x86/diveby3.asm: Change to mpn_divexact_by3c.
13806 * mpn/x86/k6/diveby3.asm: Ditto.
13807 * mpn/generic/diveby3.c: Ditto.
13808 * mpn/asm-defs.m4: Ditto on the define_mpn.
13809 * acconfig.h (HAVE_NATIVE_mpn_divexact_by3c): New define.
13811 * mpq/swap.c: New file, derived from mpz/swap.c.
13812 * mpf/swap.c: Ditto.
13813 * mpq/Makefile.am: Add swap.c.
13814 * mpf/Makefile.am: Ditto.
13815 * Makefile.am: Add two new "swap.lo"s.
13817 * mpn/x86/k6/mmx/com_n.asm: Fix an addressing bug (fortunately
13818 this code hasn't been used anywhere yet).
13820 * mpn/x86/k7/mmx/divrem_1.asm: New file.
13821 * mpn/x86/k7/mmx/mod_1.asm: New file.
13822 * mpn/x86/k7/diveby3.asm: New file.
13823 * mpn/x86/k7/README: Update.
13825 * mpn/x86/k7/aorsmul_1.asm: Use new cmovCC, no object code change.
13826 * mpn/x86/k7/mul_basecase.asm: Ditto.
13827 * mpn/x86/p6/aorsmul_1.asm: Ditto.
13829 * mpn/x86/x86-defs.m4 (defframe_empty_if_zero): Eval the argument.
13830 (cmovCC): New macros, replacing individual cmovCC_reg_reg forms.
13831 (Zdisp): Recognise more instructions.
13832 (shldl,etc): Use m4_instruction_wrapper().
13833 (ASSERT, movl_text_address): New macros.
13835 * mpn/asm-defs.m4: Add remarks on SunOS /usr/bin/m4 and new
13837 (m4_assert_numargs_internal_check): Remove a spurious parameter.
13838 (m4_empty_if_zero): Eval the argument.
13839 (m4_assert, m4_assert_numargs_range, m4_config_gmp_mparam,
13840 m4_instruction_wrapper): New macros.
13842 2000-05-04 Linus Nordberg <linus@swox.se>
13844 * gmp.texi (Reporting Bugs): Be explicit about output from running
13847 2000-05-02 Torbjorn Granlund <tege@swox.com>
13849 * mpn/generic/bz_divrem_n.c (mpn_bz_divrem_n): Handle non-zero return
13850 from first mpn_bz_div_3_halves_by_2 call.
13851 (mpn_bz_divrem_aux): Likewise.
13853 2000-04-30 Kevin Ryde <kevin@swox.se>
13855 * tune/* (GCD_ACCEL_THRESHOLD, GCDEXT_THRESHOLD): Tune these.
13857 * mpn/generic/gcdext.c (GCDEXT_THRESHOLD): Rename from THRESHOLD,
13858 use with >=, adjust default to 17 accordingly.
13859 Use new *_SWAP macros.
13861 * mpn/generic/gcd.c (GCD_ACCEL_THRESHOLD): Rename from
13862 ACCEL_THRESHOLD, use with >=, adjust default to 5 accordingly.
13863 Use new *_SWAP macros.
13865 * mpf/get_str.c, mpf/set_str.c, mpf/sub.c, mpz/add.c, mpz/ior.c,
13866 mpz/and.c, mpz/sub.c, mpz/xor.c, mpz/ui_pow_ui.c,
13867 mpn/generic/mul.c: Use new *_SWAP macros.
13869 * stack-alloc.h: Add extern "C" around prototypes.
13871 * gmp-impl.h: (MP_PTR_SWAP, etc): New macros.
13872 (_mp_allocate_func, etc): Use _PROTO.
13873 [TUNE_PROGRAM_BUILD]: More changes in tune program build part.
13875 2000-04-28 Torbjorn Granlund <tege@swox.com>
13877 * mpn/pa64/add_n.s: Add `,entry' to export directive.
13878 * mpn/pa64/addmul_1.S, mpn/pa64/lshift.s, mpn/pa64/mul_1.S,
13879 mpn/pa64/rshift.s, mpn/pa64/sub_n.s, mpn/pa64/submul_1.S,
13880 mpn/pa64/umul_ppmm.S: Likewise.
13881 * mpn/hppa/hppa1_1/udiv_qrnnd.S: New name for udiv_qrnnd.s.
13884 2000-04-29 Kevin Ryde <kevin@swox.se>
13886 * gmp-impl.h [TUNE_PROGRAM_BUILD] (TOOM3_MUL_THRESHOLD_LIMIT): New
13888 * mpn/generic/mul_n.c [TUNE_PROGRAM_BUILD] (mpn_mul_n): Use
13889 TOOM3_MUL_THRESHOLD_LIMIT, not a hard coded 500.
13891 * memory.c: Use <stdlib.h> for malloc etc, and use _PROTO.
13892 * stack-alloc.c: Don't use C++ reserved word "this".
13893 * urandom.h: Put extern "C" around prototypes.
13894 * mpz/powm.c: Switch a couple of parameters to "const", which they
13895 are, to satisfy g++.
13897 * randraw.c, stack-alloc.c, mpbsd/mout.c, mpbsd/mtox.c: Add casts to
13900 * stack-alloc.c: Provide dual ANSI/K&R function definitions.
13901 * mpz/addmul_ui.c,get_d.c,inp_str.c,perfpow.c,powm.c,pprime_p.c,
13902 rrandomb.c,set_str.c,ui_pow_ui.c: Ditto.
13903 * mpf/integer.c,set_str.c: Ditto.
13904 * mpbsd/min.c,xtom.c: Ditto.
13905 * mpn/generic/bz_divrem_n.c,dump.c,gcd_1.c,get_str.c,hamdist.c,
13906 popcount.c,random.c,random2.c,set_str.c: Ditto.
13908 * rand.c: Use <stdio.h> for NULL.
13909 * mpz/gcd_ui.c,gcdext.c,mul.c,perfpow.c,powm_ui.c,root.c,sqrt.c,
13911 * mpf/sqrt.c,sqrt_ui.c: Ditto.
13912 * mpn/generic/perfsqr.c,sqrtrem.c: Ditto.
13914 * gmp-impl.h (NULL, malloc, realloc, free): Don't define/declare.
13915 (extern "C"): Add around function prototypes.
13916 (mpn_kara_mul_n, mpn_kara_sqr_n, mpn_toom3_mul_n, mpn_toom3_sqr_n):
13918 [TUNE_PROGRAM_BUILD] (FIB_THRESHOLD): Add necessary redefinitions for
13919 use by tune program.
13920 * mpn/generic/mul_n.c: Remove mpn_toom3_mul_n prototype.
13922 * acinclude.m4 (GMP_C_ANSI2KNR): New macro.
13923 (GMP_CHECK_ASM_MMX, GMP_CHECK_ASM_SHLDL_CL): Fix to use
13924 $gmp_cv_check_asm_text which is what GMP_CHECK_ASM_TEXT sets.
13925 * configure.in (GMP_C_ANSI2KNR): Use this instead of AM_C_PROTOTYPES,
13926 for reasons described with its definition.
13928 * demos/Makefile.am (ansi2knr): Use $(top_builddir) nor $(top_srcdir).
13930 * mpz/fib_ui.c (FIB_THRESHOLD): Rename from FIB_THRES, for consistency.
13931 (FIB_THRESHOLD): Conditionalize so gmp-mparam.h can define a value.
13932 (mpz_fib_bigcase): Use >= FIB_THRESHOLD, same as main mpz_fib_ui.
13933 * tune/tuneup.c,Makefile.am (FIB_THRESHOLD): Tune this.
13935 * configure.in (*-*-aix* gmp_m4postinc): Fix setting (don't overwrite
13936 a value just stored).
13938 2000-04-26 Kevin Ryde <kevin@swox.se>
13940 * mpn/sparc32/udiv_fp.asm: Use mpn_udiv_qrnnd macro.
13941 * mpn/sparc32/udiv_nfp.asm: Ditto.
13942 * mpn/sparc32/v8/supersparc/udiv.asm: Ditto.
13943 * mpn/sparc32/umul.asm: Name the function mpn_umul_ppmm.
13944 * mpn/sparc32/v8/umul.asm: Ditto.
13945 * mpn/powerpc32/umul.asm: Ditto.
13947 * mpn/x86/syntax.h: Remove file, since now unused.
13949 * configure.in (x86): Remove -DBROKEN_ALIGN and -DOLD_GAS
13950 previously used by .S files.
13951 (x86 extra_functions): Add udiv and umul.
13952 (GMP_PROG_M4): Use this instead of AC_CHECK_PROG(M4,m4,...)
13953 (HAVE_NATIVE_*): Loosen up the regexp to "PROLOGUE.*" so as to
13954 accept PROLOGUE_GP on alpha.
13956 * acconfig.h (HAVE_NATIVE_mpn_umul_ppmm, udiv_qrnnd, invert_limb):
13957 New template defines.
13958 * mpn/asm-defs.m4 (mpn_umul_ppmm, mpn_udiv_qrnnd): New define_mpn()s.
13959 * longlong.h (umul_ppmm, udiv_qrnnd): Use a library version if
13960 it's available and an asm macro isn't.
13961 * gmp-impl.h (invert_limb): Ditto.
13963 * gmp-impl.h (ASSERT_NOREALLOC): Not a good idea, remove it.
13965 * acinclude.m4 (GMP_PROG_M4): New macro.
13967 2000-04-25 Linus Nordberg <linus@swox.se>
13969 * gmp.texi (Random State Initialization): Correct arguments to
13972 * acinclude.m4 (GMP_VERSION): Change `eval' --> `m4_eval'. Fix
13974 * aclocal.m4: Regenerate.
13976 2000-04-25 Kevin Ryde <kevin@swox.se>
13978 * mpn/x86/aors_n.asm: Remove parentheses around an immediate that
13979 Solaris "as" doesn't like, change by Torbjorn.
13981 2000-04-24 Kevin Ryde <kevin@swox.se>
13983 * configure.in (AC_CHECK_FUNCS): Add strtoul.
13985 * mpn/generic/mul_n.c [TUNE_PROGRAM_BUILD] (mpn_mul_n): Bigger
13986 array for karatsuba temporary space for tune program build.
13987 (mpn_toom3_sqr_n) Remove an unused variable.
13989 * demos/Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
13990 Add "allprogs:" pseudo-target.
13991 * demos/factorize.c, demos/isprime.c: Switch to ANSI functions,
13994 * gmp.texi (Getting the Latest Version of GMP): Add reference to
13995 ftp.gnu.org mirrors list.
13996 * INSTALL: Add arg count check to example programs.
13998 * mpn/x86/*/*.asm: Convert to FORTRAN ... or rather to
13999 FORTRAN-style "C" commenting to support Solaris "as".
14000 * mpn/x86/x86-defs.m4: Ditto, and add another Zdisp insn.
14001 * mpn/asm-defs.m4 (C): Update comments.
14002 * mpn/x86/README.family: Add a note on commenting, remove
14003 description of .S files.
14005 * mpn/sparc64/addmul_1.asm, mul_1.asm, submul_1.asm: Use
14008 2000-04-23 Torbjorn Granlund <tege@swox.com>
14010 * config.sub: Merge with FSF version of April 23.
14012 * mpn/powerpc32: Use dnl/C instead of `#' for comments.
14014 * config.guess: Get "model" limit between pentium 2 and pentium3 right.
14015 Get rid of code determining `_' prefix; use double labels instead.
14016 * config.guess: Partially merge with FSF version of April 22.
14017 (Don't bring over NetBSD changes for now.)
14019 2000-04-23 Kevin Ryde <kevin@swox.se>
14021 * tune/Makefile.am, tune/README, tune/common.c, tune/rdtsc.asm,
14022 tune/speed.c, tune/speed.h, tune/time.c, tune/tuneup.c: New files.
14023 * tune/Makefile.in: New file, generated from Makefile.am.
14025 * gmp-impl.h (ASSERT_NOREALLOC,TMP_ALLOC_LIMBS): New macros.
14026 [TUNE_PROGRAM_BUILD] Further mods for tune program builds.
14028 * mpz/Makefile.am: Add -DOPERATION_$* for new mul_siui.c.
14029 Add rules to build mul_si and mul_ui from a common mul_siui.c.
14030 * mpz/mul_siui.c: New file, derived from and replacing mul_ui.c.
14031 * gmp.h (mpz_mul_si): New prototype and define.
14033 * mpn/tests/*.c [__i386__] (CLOCK): Don't use floating point in
14034 CLOCK because cpp can't handle floats in #if's (TIMES is derived
14035 from CLOCK by default).
14037 * mpn/asm-defs.m4 (include_mpn): New macro.
14038 (m4_assert_numargs) Changes to implementation.
14040 * mpf/Makefile.am: Add -DOPERATION_$* for new integer.c.
14041 Remove explicit rules for floor.o etc.
14042 * mpf/integer.c: Use OPERATION_$* for floor/ceil/trunc.
14044 * mpn/Makefile.am: Put "tests" in SUBDIRS.
14045 * mpn/tests/Makefile.am: New file providing rules to build test
14046 programs, nothing done in a "make all" or "make check" though.
14047 * mpn/tests/README: New file.
14049 * acconfig.h (HAVE_PENTIUM_RDTSC): New define.
14051 * configure.in (x86): Rearrange target cases.
14052 Add mulfunc aors_n and aorsmul_1 for x86 and pentium (now all x86s).
14053 Remove asm-syntax.h generation not needed.
14054 Remove now unused family=x86.
14055 (sparc) Remove unused family=sparc.
14056 (HAVE_PENTIUM_RDTSC) New AC_DEFINE and AM_CONDITIONAL.
14057 (AM_C_PROTOTYPES) New test, supporting ansi2knr.
14058 (AC_CHECK_HEADERS) Add getopt.h, unistd.h and sys/sysctl.h for
14060 (AC_CHECK_FUNCS) Add getopt_long, sysconf and sysctlbyname for
14062 (config.m4 CONFIG_TOP_SRCDIR) Renamed from CONFIG_SRCDIR.
14063 (config.m4 asm-defs.m4) Use CONFIG_TOP_SRCDIR and include().
14064 (gmp_m4postinc) Use include_mpn().
14065 (gmp_links) Omit asm-defs.m4/asm.m4 and gmp_m4postinc's.
14066 (MULFUNC_PROLOGUE) Fix regexps so all functions get AC_DEFINE'd.
14067 (PROLOGUE) Ditto (native copyi and copyd were unused in gmp 3).
14068 (KARATSUBA_SQR_THRESHOLD) Copy from gmp-mparam.h into config.m4.
14069 (AC_OUTPUT) Add tune/Makefile, mpn/tests/Makefile.
14071 * Makefile.am (AUTOMAKE_OPTIONS): Add ansi2knr.
14072 (SUBDIRS): Add tune, reorder directories.
14073 (MPZ_OBJECTS): Add mpz/mul_si.lo.
14074 (libmp_la_SOURCES): Use this for top-level objects, not .lo's.
14075 * ansi2knr.c, ansi2knr.1: New files, provided by automake.
14077 * mpn/x86/aors_n.asm: Convert add_n.S and sub_n.S to a
14078 multi-function aors_n.asm, no object code change.
14079 * mpn/x86/pentium/aors_n.asm: Ditto.
14080 * mpn/x86/aorsmul_1.asm: Ditto for addmul/submul.
14081 * mpn/x86/pentium/aorsmul_1.asm: Ditto.
14083 * mpn/x86/lshift.asm, mpn/x86/mul_1.asm, mpn/x86/mul_basecase.asm,
14084 mpn/x86/rshift.asm: Convert from .S, no object code change.
14085 * mpn/x86/pentium/lshift.asm, mpn/x86/pentium/mul_1.asm,
14086 mpn/x86/pentium/mul_basecase.asm, mpn/x86/pentium/rshift.asm: Ditto.
14088 * gmp.texi (Reporting Bugs): Itemize the list of things to include.
14089 (Miscellaneous Float Functions): Correct typo in mpf_ceil etc
14091 Change @ifinfo -> @ifnottex for benefit of makeinfo --html.
14092 Remove unnecessary @iftex's around @tex.
14094 2000-04-22 Torbjorn Granlund <tege@swox.com>
14096 * config.guess: Generalize x86 cpu determination code.
14097 Now works on Solaris.
14099 * mpz/nextprime.c: Rewrite still disabled code.
14101 * configure.in: Specifically match freebsd[3-9].
14103 2000-04-21 Torbjorn Granlund <tege@swox.com>
14105 * rand.c: Call mpz_clear for otherwise leaking mpz_t.
14107 * mpz/pprime_p.c (mpz_probab_prime_p): Merge handling of negative
14108 n into code for handling small positive n. Merge variables m and n.
14109 After dividing, simply call mpz_millerrabin.
14110 (isprime): Local variables now use attribute `long'.
14111 (mpz_millerrabin): New static function, based on code from
14112 mpz_probab_prime_p.
14113 (millerrabin): Now simple workhorse for mpz_millerrabin.
14115 2000-04-19 Torbjorn Granlund <tege@swox.com>
14117 * gmp-impl.h: Fix parenthesis error in test for __APPLE_CC__.
14119 2000-04-18 Linus Nordberg <linus@swox.se>
14121 * NEWS: Add info about shared libraries. Remove reference to
14124 2000-04-17 Torbjorn Granlund <tege@swox.com>
14126 * Version 3.0 released.
14128 * mpn/arm/add_n.S: New version from Robert Harley.
14129 * mpn/arm/addmul_1.S: Likewise.
14130 * mpn/arm/mul_1.S: Likewise.
14131 * mpn/arm/sub_n.S: Likewise.
14133 * gmp.h (__GNU_MP_VERSION_PATCHLEVEL): Now 0.
14135 2000-04-17 Linus Nordberg <linus@swox.se>
14137 * configure.in (hppa2.0*-*-*): Pass `+O3' to cc/c89 in 64-bit mode
14138 to avoid compiler bug.
14139 (ns32k*-*-*): Fix typo in path. Change by Kevin.
14140 (alpha*-*-osf*): New case. Pass assembly flags for architecture
14142 (alpha*-*-*): Don't bother searching for cc.
14143 * configure: Regenerate.
14145 * Makefile.am (EXTRA_DIST): Add `macos', `.gdbinit'.
14146 * Makefile.in: Regenerate.
14147 * mpn/Makefile.am (EXTRA_DIST): Add `m88k', `lisp'.
14148 * mpn/Makefile.in: Regenerate.
14150 2000-04-16 Kevin Ryde <kevin@swox.se>
14152 * README: Updates, and don't duplicate the example in INSTALL.
14153 * INSTALL: Minor updates.
14154 * gmp.texi (Installing MP): Minor edits, restore CC/CFLAGS description.
14156 2000-04-16 Linus Nordberg <linus@swox.se>
14158 * configure.in (*-*-cygwin*): Select BSD_SYNTAX to avoid
14159 .type/.size in PROLOGUE for ELF_SYNTAX. Override ALIGN definition
14161 (gmp_xoptcflags_${CC}): New set of variables, indicating
14162 ``exclusive optional cflags''.
14163 (most sparcs): Use gmp_xoptcflags instead of gmp_optcflags to
14164 ensure that we pass CPU type to older gcc.
14165 (CFLAGS): CFLAGS on the command line was spoiled.
14166 * configure: Regenerate.
14168 2000-04-16 Linus Nordberg <linus@swox.se>
14170 * configure.in: Invoke AC_PROG_LIBTOOL directly.
14172 * acinclude.m4 (GMP_PROG_CC_FIND): Quote source variable when
14173 setting CC64 and CFLAGS64.
14174 (GMP_PROG_CC_SELECT): Cache result.
14175 (GMP_PROG_LIBTOOL): Remove.
14177 * aclocal.m4: Regenerate.
14178 * configure: Regenerate.
14180 2000-04-16 Linus Nordberg <linus@swox.se>
14182 * tests/rand/t-rand.c (main): Add non-ANSI function declaration.
14185 2000-04-16 Torbjorn Granlund <tege@swox.com>
14187 * mpn/generic/dump.c: Suppress output of leadign zeros.
14189 * mpz/inp_str.c: Fix memory leakage.
14191 * mpz/tests/reuse.c (dss_func_division): Add a final 1.
14193 * longlong.h (alpha count_leading_zeros): Wrap in __MPN.
14194 * mpn/alpha/cntlz.asm: Use __gmpn prefix (by means of __MPN).
14196 * longlong.h (__umul_ppmm, __udiv_qrnnd): Wrap in __MPN.
14197 * mpn/alpha/udiv_qrnnd.S: Use __gmpn prefix.
14198 * mpn/hppa/udiv_qrnnd.s: Likewise.
14199 * mpn/hppa/hppa1_1/udiv_qrnnd.s: Likewise.
14200 * mpn/pa64/udiv_qrnnd.c: Likewise (by means of __MPN).
14201 * mpn/pa64/umul_ppmm.S: Likewise.
14202 * mpn/sparc32/udiv_fp.asm: Likewise (by means of MPN).
14203 * mpn/sparc32/udiv_nfp.asm: Likewise (by means of MPN).
14204 * mpn/sparc32/v8/supersparc/udiv.asm: Likewise (by means of MPN).
14206 * mpn/generic/tdiv_qr.c: Work around gcc 2.7.2.3 i386 register handling
14209 * mpn/generic/tdiv_qr.c: Use udiv_qrnnd instead of mpn_divrem_1
14210 when computing appropriate quotient; mpn_divrem_1 writes too
14211 many quotient limbs.
14213 * mpn/asm-defs.m4: invert_normalized_limb => invert_limb.
14214 * mpn/alpha/invert_limb.asm: mpn_invert_normalized_limb =>
14217 * gmp-impl.h (alpha specific): invert_normalized_limb => invert_limb;
14219 * longlong.h (alpha udiv_qrnnd): Likewise.
14221 2000-04-16 Kevin Ryde <kevin@swox.se>
14223 * gmp.h (mp_set_memory_functions,mp_bits_per_limb,gmp_errno): Add
14224 #defines so the library symbols are __gmp_*.
14225 * errno.c: Include gmp.h.
14226 * gmp-impl.h (_mp_allocate_func,etc): Add #defines to __gmp_*.
14227 (__clz_tab): New #define to __MPN(clz_tab).
14228 * stack-alloc.c (__gmp_allocate_func,etc): Change from _mp_*.
14230 * Makefile.am (libmp_la_DEPENDENCIES): Add some mpz files needed
14231 for new mpz_powm (pow in libmp).
14232 (EXTRA_DIST): Add projects directory.
14234 * mpn/*: Change __mpn to __gmpn.
14235 * gmp.h (__MPN): Ditto.
14236 * stack_alloc.c,stack-alloc.h: Change __tmp to __gmp_tmp.
14238 * mpn/generic/sb_divrem_mn.c (mpn_sb_divrem_mn): Avoid gcc 2.7.2.3
14239 i386 register handling bug (same as previously in mpn_divrem_classic).
14241 * mpn/generic/divrem.c: Now contains mpn_divrem, which is not an
14242 internal function, so remove warning comment.
14244 * gmp.texi (Compatibility with Version 2.0.x): Source level only.
14246 2000-04-16 Linus Nordberg <linus@swox.se>
14248 * configure.in (hppa1.0*): Prefer c89 to cc.
14249 * configure: Regenerate.
14251 2000-04-15 Linus Nordberg <linus@swox.se>
14253 * configure.in: If `mpn_path' is set by user on configure command
14254 line, use that as path.
14255 * configure: Regenerate.
14257 2000-04-15 Linus Nordberg <linus@swox.se>
14259 * configure.in (hppa2.0*): Use path "hppa/hppa1_1 hppa" if no
14260 64-bit compiler was found.
14261 * configure: Regenerate.
14263 2000-04-15 Linus Nordberg <linus@swox.se>
14265 * configure.in: Honor `CC' and `CFLAGS' set by user on configure
14267 * acinclude.m4: (GMP_PROG_CC_SELECT): Set CFLAGS if not set already.
14268 * aclocal.m4: Regenerate.
14269 * configure: Regenerate.
14271 2000-04-15 Linus Nordberg <linus@swox.se>
14273 * acinclude.m4 (GMP_PROG_CC_FIND): Remove debug output. Remove
14274 commented out code.
14275 * aclocal.m4: Regenerate.
14276 * configure: Regenerate.
14278 * configure.in: Make all `-mcpu' options to gcc optional.
14279 * configure: Regenerate.
14281 * tests/rand/Makefile.am: Don't do anything for target 'all'.
14282 * tests/rand/Makefile.in: Regenerate.
14284 2000-04-15 Kevin Ryde <kevin@swox.se>
14286 * README: Small updates.
14287 * NEWS: Add some things about 3.0.
14289 * mpz/Makefile.am (EXTRA_DIST): Remove dmincl.c.
14291 * Makefile.am: Use -version-info on libraries, not -release.
14293 * mpz/tdiv_qr.c: Add mdiv function header #ifdef BERKELEY_MP.
14294 * mpbsd/Makefile.am: Use mpz/tdiv_qr.c, not mdiv.c.
14295 * Makefile.am (MPBSD_OBJECTS): Change mdiv.lo to tdiv_qr.lo.
14296 (libmp_la_DEPENDENCIES): Add mp_clz_tab.lo.
14297 * mpbsd/mdiv.c: Remove file.
14299 * config/mt-linux,mt-m68k,mt-m88110,mt-ppc,mt-ppc64-aix,mt-pwr,
14300 mt-sprc8-gcc,mt-sprc9-gcc,mt-supspc-gcc,mt-vax,mt-x86,
14301 mpn/config/mt-pa2hpux,mt-sprc9,t-oldgas,t-ppc-aix,t-pwr-aix:
14302 Remove configure fragments not used since change to autoconf.
14304 * mpn/generic/bz_divrem_n.c,sb_divrem_mn.c: Add comment that
14305 internal functions are changeable and shouldn't be used directly.
14307 2000-04-15 Linus Nordberg <linus@swox.se>
14309 * configure.in: Remove debug output.
14310 * configure: Regenerate.
14312 2000-04-15 Torbjorn Granlund <tege@swox.com>
14314 * mpn/generic/tdiv_qr.c: Don't use alloca directly.
14316 * mpz/tdiv_qr.c: Fix typo.
14317 * mpz/tdiv_r.c: Fix typo.
14318 * mpz/tdiv_q.c: Fix typo.
14320 * configure.in: Disable -march=pentiumpro due to apparent compiler
14323 * mpz/powm.c: Replace with new code from Paul Zimmermann.
14325 * mpz/tdiv_q.c: Remove debug code.
14327 * mpn/generic/divrem.c: Remove C++ style `//' commented-out code.
14328 * mpn/generic/sb_divrem_mn.c: Likewise.
14330 2000-04-14 Torbjorn Granlund <tege@swox.com>
14332 * mpz/cdiv_q.c: Change temp allocation for new requirements of
14334 * mpz/fdiv_q.c: Likewise.
14336 * mpn/sparc64/gmp-mparam.h: Set up parameters for TOOM3.
14338 * mpz/dmincl.c: Delete file.
14339 * mpz/tdiv_qr.c: Rewrite using mpn_tdiv_qr.
14340 * mpz/tdiv_r.c: Likewise.
14341 * mpz/tdiv_q.c: Likewise.
14343 * mpn/generic/tdiv_qr.c: New file.
14344 * mpn/generic/bz_divrem_n.c: New file.
14345 * mpn/generic/sb_divrem_mn.c: New file.
14347 * gmp-impl.h (MPZ_REALLOC): New macro.
14348 (mpn_sb_divrem_mn): Declare.
14349 (mpn_bz_divrem_n): Declare.
14350 (mpn_tdiv_qr): Declare.
14352 * configure.in (gmp_mpn_functions): Delete divrem_newt and divrem_1n;
14353 add tdiv_qr, bz_divrem_n, and sb_divrem_mn.
14354 * mpn/generic/divrem_newt.c: Delete file.
14355 * mpn/generic/divrem_1n.c: Delete file.
14357 * gmp.h (mpn_divrem_newton): Remove declaration.
14358 (mpn_divrem_classic): Remove declaration.
14360 * gmp.h (mpn_divrem): Remove function definition.
14361 * mpn/generic/divrem.c: Replace mpn_divrem_classic with a
14362 mpn_divrem wrapper.
14364 2000-04-14 Kevin Ryde <kevin@swox.se>
14366 * mpf/dump.c, mpz/dump.c, mpn/generic/dump.c,
14367 mpn/generic/divrem.c, mpn/generic/divrem_1n.c,
14368 mpn/generic/divrem_2.c, mpn/generic/divrem_newt.c,
14369 mpn/generic/mul.c, mpn/generic/mul_basecase.c,
14370 mpn/generic/mul_n.c, mpn/generic/sqr_basecase.c,
14371 mpn/generic/udiv_w_sdiv.c: Add comment that internal functions are
14372 changeable and shouldn't be used directly.
14374 * mpq/div.c: Use DIVIDE_BY_ZERO (previously didn't get an
14375 exception on zero divisor).
14377 * mpf/tests/t-get_d.c, mpz/tests/reuse.c: Add K&R function
14379 * mpz/tests/t-2exp.c: Don't use ANSI-ism 2ul.
14381 * gmp.texi (Installing MP): Build problem notes for GSYM_PREFIX
14382 and ranlib on native SunOS.
14383 Particular systems notes about AIX and HPPA shared libraries
14385 (MP Basics): Add that undocumented things shouldn't be used.
14386 (Introduction to MP): Add to CPUs listed.
14388 * acinclude.m4 (GMP_CHECK_ASM_UNDERSCORE): Don't depend on C
14391 2000-04-13 Linus Nordberg <linus@swox.se>
14393 * mpn/pa64/udiv_qrnnd.c (__udiv_qrnnd64): Add K&R function
14396 * configure.in: Disable shared libraries for hppa*.
14397 (mips-sgi-irix6.*): Fix flags for 64-bit gcc.
14398 (hppa2.0*-*-*): Prefer c89 to cc.
14399 * configure: Regenerate.
14401 * gmp.h (gmp_randalg_t): Remove comma after last element.
14403 * tests/rand/t-rand.c: Add copyright notice.
14405 2000-04-13 Kevin Ryde <kevin@swox.se>
14407 * mpn/generic/mul_n.c, mpn/generic/gcdext.c, mpz/nextprime.c,
14408 mpz/remove.c, mpz/root.c: Add K&R function definitions.
14409 * mpz/rrandomb.c: Fix typo in K&R part.
14410 * stack-alloc.c: Add K&R style function pointer declarations.
14412 * mpz/root.c: Use SQRT_OF_NEGATIVE on even roots of negatives.
14413 Use DIVIDE_BY_ZERO on a "zero'th" root.
14415 * configure: Regenerate with autoconf backpatched to fix --srcdir
14416 absolute path wildcards that bash doesn't like, change by Linus.
14418 * gmp.texi (Integer Arithmetic): Document mpz_nextprime.
14419 (Miscellaneous Integer Functions): Fix mpz_fits_* formatting.
14420 (Installing MP): Comment-out CC and CFLAGS description.
14422 2000-04-13 Linus Nordberg <linus@swox.se>
14424 * rand.c (gmp_randinit): Don't combine va_alist with ordinary
14425 arguments for non STDC.
14427 2000-04-13 Torbjorn Granlund <tege@swox.com>
14429 * mpz/nextprime.c: Use proper names of new random types and functions.
14431 * mpz/rrandomb.c: New file.
14432 * mpz/Makefile.am: List it.
14433 * mpz/Makefile.in: Regenerate.
14434 * Makefile.am: Here too.
14435 * Makefile.in: Regenerate.
14436 * gmp.h: Declare mpz_rrandomb.
14438 2000-04-12 Linus Nordberg <linus@swox.se>
14440 * Makefile.am, demos/Makefile.am, mpbsd/Makefile.am,
14441 mpbsd/tests/Makefile.am, mpf/Makefile.am, mpf/tests/Makefile.am,
14442 mpn/Makefile.am, mpq/Makefile.am, mpq/tests/Makefile.am,
14443 mpz/Makefile.am, mpz/tests/Makefile.am, tests/Makefile.am,
14444 tests/rand/Makefile.am (AUTOMAKE_OPTIONS): Add 'no-dependencies'.
14446 * Makefile.in, demos/Makefile.in, mpbsd/Makefile.in,
14447 mpbsd/tests/Makefile.in, mpf/Makefile.in, mpf/tests/Makefile.in,
14448 mpn/Makefile.in, mpq/Makefile.in, mpq/tests/Makefile.in,
14449 mpz/Makefile.in, mpz/tests/Makefile.in, tests/Makefile.in,
14450 tests/rand/Makefile.in: Regenerate.
14452 2000-04-12 Linus Nordberg <linus@swox.se>
14454 * randlc.c (gmp_randinit_lc): Disable function.
14455 * gmp.texi (Random State Initialization): Remove gmp_randinit_lc.
14457 * acinclude.m4 (GMP_CHECK_CC_64BIT): Compiling an empty main
14458 successfully with `-n32' will have to suffice on irix6.
14459 * aclocal.m4: Regenerate.
14461 * configure.in (sparc): Don't pass -D_LONG_LONG_LIMB to compiler.
14462 (mips-sgi-irix6.*): Use compiler option `-n32' rather than `-64'
14463 for 64-bit `cc'. Add options for gcc.
14464 * configure: Regenerate.
14466 * mpf/urandomb.c (mpf_urandomb): Add third parameter 'nbits'. If
14467 'nbits' doesn't make even limbs, shift up result before
14470 * gmp.h (mpf_urandomb): Add parameter to prototype.
14472 * mpf/urandom.c: Rename file to ...
14473 * mpf/urandomb.c: ... this.
14474 * Makefile.am (MPF_OBJECTS): Change urandom.lo --> urandomb.lo.
14475 * Makefile.in: Regenerate.
14476 * mpf/Makefile.am (libmpf_la_SOURCES): Change urandom.c --> urandomb.c.
14477 * mpf/Makefile.in: Regenerate.
14479 * config.in: Regenerate for HAVE_DECL_OPTARG.
14481 * randraw.c (_gmp_rand): Fix bug with _LONG_LONG_LIMB.
14482 (lc): Change return type.
14483 Use one temporary storage instead of two.
14484 Handle seed of size 0.
14485 Avoid modulus operation in some cases.
14486 Abort if M is not a power of 2.
14487 Fix bug with 64-bit limbs.
14488 Fix bug with small seed, small A and large M.
14490 * tests/rand/gen.c (main): Include gmp.h. Remove macros MIN, MAX. Add
14491 option '-q'. Don't demand argument N. Change parameters in call
14494 * tests/rand/t-rand.c: New file for testing random number generation.
14496 * tests/rand/Makefile.am: Run t-rand for 'make check'.
14497 (test, bigtest): Rename to manual-test, manual-bigtest.
14498 * tests/rand/Makefile.in: Regenerate.
14500 2000-04-12 Kevin Ryde <kevin@swox.se>
14502 * gmp-impl.h: Include config.h before TMP_ALLOC, so
14503 --disable-alloca works.
14505 * mpbsd/Makefile.am: Don't recompile top-level sources here.
14506 * Makefile.am (libmp_la_DEPENDENCIES): Put objects here instead,
14507 add errno.lo and stack-alloc.lo.
14509 * mpn/asm-defs.m4: Add a test and message for the unsuitable SunOS m4.
14510 * gmp.texi (Installing MP): Update note on SunOS m4 failure.
14512 * acconfig.h: Add copyright notice using @TOP@.
14514 * stack-alloc.c: Use _mp_allocate_func, not malloc.
14515 * gmp.texi (Installing MP): Note this under --disable-alloca.
14517 * gmp.texi (Comparison Functions): mpz_cmp_abs => mpz_cmpabs.
14518 (Integer Arithmetic): mpz_prime_p not yet implemented, comment out.
14519 (Float Arithmetic): mpf_pow_ui now implemented, uncomment-out.
14520 (Miscellaneous Float Functions): Add mpf_ceil, mpf_floor, mpf_trunc.
14521 (Low-level Functions): Add mpn_random2, with mpn_random.
14523 * mpn/m68k/mc68020/udiv.S: Rename from udiv.s.
14524 * mpn/m68k/mc68020/umul.S: Ditto.
14526 * mpn/alpha/umul.asm: Rename from umul.s, remove .file and
14527 compiler identifiers.
14529 * mpn/powerpc32/syntax.h: Removed, no longer used.
14531 * mpn/a29k/udiv.s: Remove .file and compiler identifiers.
14532 * mpn/a29k/umul.s: Ditto.
14534 * mpn/tests/ref.c: Use WANT_ASSERT.
14535 * mpn/tests/ref.h: Use _PROTO.
14537 * mpbsd/configure.in: Removed, no longer required.
14539 * mpf/div.c: Use DIVIDE_BY_ZERO.
14540 * mpf/div_ui.c: Ditto.
14541 * mpf/ui_div.c: Ditto.
14542 * mpq/inv.c: Ditto.
14543 * mpf/sqrt.c: Use SQRT_OF_NEGATIVE.
14544 * mpz/sqrt.c: Ditto.
14545 * mpz/sqrtrem.c: Ditto.
14547 * gmp-impl.h (GMP_ERROR,SQRT_OF_NEGATIVE): New macros.
14548 (DIVIDE_BY_ZERO): Use GMP_ERROR.
14549 (__mp_bases): #define to __MPN(mp_bases).
14551 2000-04-11 Linus Nordberg <linus@swox.se>
14553 * tests/rand/stat.c (main): Initialize `l1runs' at declaration.
14555 2000-04-11 Kevin Ryde <kevin@swox.se>
14557 * mpz/fib_ui.c: Add K&R function definitions.
14559 * mpbsd/tests/Makefile.am (TESTS): Add a dummy test to avoid a
14560 shell problem with an empty "for tst in $(TESTS) ; ...".
14561 * mpbsd/tests/dummy.c: New file.
14563 2000-04-10 Torbjorn Granlund <tege@swox.com>
14565 * mpz/bin_uiui.c: Delete several unused variables.
14566 Add copyright notice.
14567 * mpz/bin_ui.c: Add copyright notice.
14569 * longlong.h: Declare __count_leading_zeros for alpha.
14571 2000-04-10 Linus Nordberg <linus@swox.se>
14573 * rand.c (gmp_randinit): Change parameter list to (rstate, alg, ...).
14574 * gmp.h: Change prototype accordingly.
14575 * mpz/pprime_p.c (millerrabin): Change call accordingly.
14577 * configure.in: Check for `optarg'.
14578 * configure: Regenerate.
14580 * mpn/Makefile.am: Remove incorrect comment.
14581 * mpn/Makefile.in: Regenerate.
14583 * gmp.h: Rename most of the random number functions, structs and
14584 some of the struct members.
14585 * rand.c (gmp_randinit): Likewise.
14586 * randclr.c (gmp_randclear): Likewise.
14587 * randlc.c (gmp_randinit_lc): Likewise.
14588 * randlc2x.c (gmp_randinit_lc_2exp): Likewise.
14589 * randraw.c (lc): Likewise.
14590 (_gmp_rand_getraw): Likewise.
14591 * randsd.c (gmp_randseed): Likewise.
14592 * randsdui.c (gmp_randseed_ui): Likewise.
14593 * gmp.texi: Likewise.
14595 * gmp.texi: Use three hyphens for a dash.
14596 (Low-level Functions): Remove documentation for gmp_rand_getraw.
14597 (Random Number Functions): Add info on where to find documentation
14598 on the random number functions.
14600 * tests/rand/Makefile.am (test, bigtest): Quote argument to grep.
14601 * tests/rand/Makefile.in: Regenerate.
14603 * tests/rand/gen.c: Declare optarg, optind, opterr if not already
14605 (main): Use new names for the random stuff.
14606 (main): Don't use strtoul() if we don't have it. Use strtol()
14607 instead, if we have it. Otherwise, use atoi().
14608 (main): Use srandom/srandomdev for __FreeBSD__ only.
14609 (main): Use new parameter order to gmp_randinit().
14611 * tests/rand/stat.c: Declare optarg, optind, opterr if not already
14614 2000-04-10 Torbjorn Granlund <tege@swox.com>
14616 * mpz/pprime_p.c: Pass 0L for mpz_scan1. mpz_mmod => mpz_mod.
14617 (millerrabin): Use new random interface.
14618 (millerrabin): ... and don't forget to call gmp_randclear.
14620 * mpz/nextprime.c: New file.
14621 * gmp.h: Declare mpz_nextprime.
14622 * mpz/Makefile.am: List nextprime.c.
14623 * mpz/Makefile.in: Regenerate.
14624 * Makefile.am: List mpz/nextprime.lo.
14625 * Makefile.in: Regenerate.
14627 2000-04-10 Kevin Ryde <kevin@swox.se>
14629 * move-if-change, mpz/tests/move-if-change, mpq/tests/move-if-change,
14630 mpf/tests/move-if-change: Remove, no longer used.
14632 * Makefile.am (SUBDIRS): Add tests, demos, mpbsd.
14633 (libmp.la): New target, conditional on WANT_MPBSD.
14634 (libgmp_la_LIBADD): Add -lm.
14635 (AUTOMAKE_OPTIONS): Add check-news.
14636 (include_HEADERS): Setup to install gmp.h and possibly mp.h.
14637 (DISTCLEANFILES): Add generated files.
14638 (check): Remove explicit target (now uses check-recursive).
14640 * configure.in: Use AM_CONFIG_HEADER.
14641 Add --enable-mpbsd setting automake conditional WANT_MPBSD.
14642 Output demos/Makefile, mpbsd/Makefile and mpbsd/tests/Makefile.
14644 * mpz/Makefile.am: Add SUBDIRS=tests, shorten INCLUDES since now
14645 using AM_CONFIG_HEADER.
14646 * mpq/Makefile.am: Ditto.
14647 * mpf/Makefile.am: Ditto, and add DISTCLEANFILES.
14648 * mpn/Makefile.am: Shorten INCLUDES, amend some comments.
14649 * mpz/tests/Makefile.am: Use TESTS and $(top_builddir).
14650 * mpf/tests/Makefile.am: Ditto.
14651 * mpq/tests/Makefile.am: Ditto.
14652 * demos/Makefile.am: New file.
14654 * mpbsd/Makefile.am: New file, derived from old mpbsd/Makefile.in.
14655 * mpbsd/Makefile.in: Now generated from Makefile.am.
14656 * mpbsd/realloc.c: Removed, use mpz/realloc.c instead.
14657 * mpbsd/tests/Makefile.am: New file.
14658 * mpbsd/tests/Makefile.in: New file, generated from Makefile.am.
14659 * mpbsd/tests/allfuns.c: New file.
14661 * gmp.texi (Top): Use @ifnottex, to help makeinfo --html.
14662 (Installing MP): Describe --enable-mpbsd and demo programs.
14664 * tests/rand/statlib.c: mpz_cmp_abs => mpz_cmpabs.
14666 * tests/rand/Makefile.am (LDADD): Don't need -lm (now in libgmp.la).
14667 (EXTRA_PROGRAMS): Not noinst_PROGRAMS.
14668 (INCLUDES): Shorten to -I$(top_srcdir) now using AM_CONFIG_HEADER.
14670 2000-04-09 Torbjorn Granlund <tege@swox.com>
14672 * mpz/urandomm.c: Get type of count right.
14673 Simplify computation of nbits.
14675 2000-04-08 Torbjorn Granlund <tege@swox.com>
14677 * mpz/urandomb.c: Fix reallocation condition.
14678 Simplify size computation.
14680 2000-04-08 Linus Nordberg <linus@swox.se>
14682 * acinclude.m4 (GMP_CHECK_CC_64BIT): Add special handling for
14684 (GMP_CHECK_ASM_W32): Ditto.
14685 * aclocal.m4: Regenerate.
14687 * mpn/Makefile.am: Use $(CCAS) for assembling.
14688 (.asm.obj): Add rule.
14689 * mpn/Makefile.in: Regenerate.
14691 * gmp.texi (Miscellaneous Integer Functions): Fix typos.
14693 * configure.in: Never pass `-h' to grep.
14694 (mips-sgi-irix6.[2-9]*): Try to find 64-bit compiler.
14695 (hppa1.0*-*-*): New flag for cc.
14696 (hppa2.0*-*-*): Try to find 64-bit compiler. Chose path, set
14698 * configure: Regenerate.
14700 2000-04-08 Torbjorn Granlund <tege@swox.com>
14702 * mpz/bin_ui.c: Don't depend on ANSI C features.
14703 * mpz/bin_uiui.c: Likewise.
14705 * Makefile.am (MPZ_OBJECTS): mpz/cmp_abs* => mpz/cmpabs*.
14706 (MPQ_OBJECTS): Add mpq/set_d.lo.
14707 (MPZ_OBJECTS): Add mpz/fits*.lo.
14708 * Makefile.in: Regenerate.
14710 * mpz/cmpabs.c: New name for mpz/cmp_abs.c.
14711 * mpz/cmpabs_ui.c: New name for mpz/cmp_abs_ui.c.
14712 * mpz/Makefile.am: Corresponding changes.
14713 * mpz/Makefile.in: Regenerate.
14714 * gmp.h: mpz_cmp_abs* => mpz_cmpabs*.
14716 * mpz/addmul_ui.c (mpn_neg1): Don't depend on ANSI C features.
14718 * mpz/invert.c: Use TMP_MARK since we invoke MPZ_TMP_INIT.
14720 * gmp.h (mpq_set_d): Declare correctly.
14721 (mpz_root): Use _PROTO.
14722 (mpz_remove): Use _PROTO.
14723 (mpf_pow_iu): Use _PROTO.
14725 * mpn/asm-defs.m4 (MPN_PREFIX): Revert previous change.
14726 * gmp.h (__MPN): Revert previous change.
14728 * mpz/perfpow.c: De-ANSI-fy. Add copyright notice.
14730 * mpz/set_d.c: Misc cleanups.
14732 * mpq/set_d: New file.
14733 * gmp.h: Declare mpq_set_d.
14734 * mpq/Makefile.am: List set_d.c.
14735 * mpq/Makefile.in: Regenerate.
14737 2000-04-07 Torbjorn Granlund <tege@swox.com>
14739 * mpz/fits_sint_p.c: New file.
14740 * mpz/fits_slong_p.c: New file.
14741 * mpz/fits_sshort_p.c: New file.
14742 * mpz/fits_uint_p.c: New file.
14743 * mpz/fits_ulong_p.c: New file.
14744 * mpz/fits_ushort_p.c: New file.
14745 * gmp.h: Declare mpz_fits_*.
14746 * mpz/Makefile.am: List fits_* files.
14747 * mpz/Makefile.in: Regenerate.
14749 2000-04-06 Kevin Ryde <kevin@swox.se>
14751 * gmp.texi (Installing MP): Add known build problem SunOS 4.1.4 m4
14754 * mpn/x86/pentium/gmp-mparam.h: Tune thresholds.
14755 * mpn/x86/p6/gmp-mparam.h: Ditto.
14756 * mpn/x86/k6/gmp-mparam.h: Tune thresholds, add UMUL_TIME, UDIV_TIME.
14757 * mpn/x86/k7/gmp-mparam.h: Tune thresholds, amend UMUL_TIME.
14759 * mpn/generic/mul_n.c (mpn_kara_mul_n): Add an ASSERT.
14760 (mpn_kara_sqr_n): Add an ASSERT, use KARATSUBA_SQR_THRESHOLD.
14761 (mpn_toom3_sqr_n): Eliminate second evaluate3.
14763 * gmp-impl.h (mpn_com_n,MPN_LOGOPS_N_INLINE): Don't allow size==0.
14764 (tune_mul_threshold,tune_sqr_threshold): Conditionalize
14765 declarations on TUNE_PROGRAM_BUILD.
14767 * mpn/generic/sqr_basecase.c: Add an assert.
14769 2000-04-05 Torbjorn Granlund <tege@swox.com>
14771 * gmp.h, mpn/asm-defs.m4: List the same functions for __MPN, but
14772 leave some commented out.
14774 * gmp-impl.h (MPN_LOGOPS_N_INLINE): Optimize.
14775 (mpn_com_n): Optimize.
14777 * gmp.h (__MPN): Make it use __gmpn instead of __mpn for consistency.
14778 * mpn/asm-defs.m4 (MPN_PREFIX): Likewise.
14780 * gmp.h (GMP_ERROR_ALLOCATE): New errcode.
14782 * gmp-impl.h (MPN_MUL_N_RECURSE): Delete.
14783 (MPN_SQR_RECURSE): Delete.
14785 * gmp-impl.h (TARGET_REGISTER_STARVED): New define.
14787 * gmp-impl.h (mpn_kara_sqr_n): Remap with __MPN.
14788 (mpn_toom3_sqr_n): Likewise.
14789 (mpn_kara_mul_n): Likewise.
14790 (mpn_toom3_mul_n): Likewise.
14791 (mpn_reciprocal): Likewise.
14793 * gmp-impl.h (__gmpn_mul_n): Remove declaration.
14794 (__gmpn_sqr): Likewise.
14795 * gmp.h (mpn_sqr_n): Declare/remap.
14796 * mpn/generic/mul.c (mpn_sqr_n): New name for mpn_sqr.
14798 * gmp.h (mpn_udiv_w_sdiv): Move __MPN remap from here...
14799 * gmp-impl.h: ...to here.
14801 2000-04-05 Linus Nordberg <linus@swox.se>
14803 * gmp.texi (Top): Add `Random Number Functions' to menu.
14804 (Introduction to MP): Fix typo.
14805 (MP Basics): Create menu for all sections. Move `Random Number
14806 Functions' to its own chapter. Add nodes for all sections.
14807 (Function Classes): Mention random generation functions under
14809 (Miscellaneous Integer Functions): Update mpz_urandomb,
14811 (Low-level Functions): Remove mpn_rawrandom.
14812 (Random State Initialization): Update.
14814 * mpf/urandom.c (mpf_urandomb): Remove SIZE parameter. Normalize
14817 * gmp.h (mpf_urandomb): Remove SIZE parameter.
14819 * randraw.c (gmp_rand_getraw): Handle the case where (1) the LC
14820 scheme doesn't generate even limbs and (2) more than one LC
14821 invokation is necessary to produce the requested number of bits.
14823 2000-04-05 Torbjorn Granlund <tege@swox.com>
14825 * mpn/generic/mul_n.c (INVERSE_3): New name for THIRD, define for
14826 any BITS_PER_MP_LIMB.
14827 (MP_LIMB_T_MAX): New.
14828 (mpn_divexact3_n): Remove.
14829 (interpolate3): Use mpn_divexact_by3 instead of mpn_divexact3_n.
14831 2000-04-05 Kevin Ryde <kevin@swox.se>
14833 * gmp-impl.h (KARATSUBA_MUL_THRESHOLD<2): Remove cpp test.
14834 (tune_mul_threshold,tune_sqr_threshold): Add declarations, used in
14837 * mpn/x86/k7/sqr_basecase.asm: New file, only a copy of k6 for now.
14839 2000-04-04 Torbjorn Granlund <tege@swox.com>
14841 * gmp-impl.h (TOOM3_MUL_THRESHOLD): Provide default.
14842 (TOOM3_SQR_THRESHOLD): Provide default.
14844 * mpn/generic/mul_n.c: Rewrite (mostly by Robert Harley).
14845 * mpn/generic/mul.c: Rewrite (mostly by Robert Harley).
14847 * configure.in (sparcv9 64-bit OS): Set extra_functions.
14849 2000-04-04 Linus Nordberg <linus@swox.se>
14851 * mpn/generic/rawrandom.c: Remove file and replace with randraw.c
14853 (mpn_rawrandom): Rename to gmp_rand_getraw.
14855 * randraw.c: New file; essentially a copy of
14856 mpn/generic/rawrandom.c.
14857 (gmp_rand_getraw): New function (formerly known as mpn_rawrandom).
14859 * mpz/urandomb.c (mpz_urandomb): Change mpn_rawrandom -->
14861 * mpz/urandomm.c (mpz_urandomb): Ditto.
14862 * mpf/urandom.c (mpf_urandomb): Ditto.
14864 * gmp.h (gmp_rand_getraw): Add function prototype.
14865 (mpn_rawrandom): Remove function prototype.
14867 * Makefile.am (libgmp_la_SOURCES): Add randraw.c.
14868 * Makefile.in: Regenerate.
14870 * configure.in (gmp_mpn_functions): Remove rawrandom.
14871 * configure: Regenerate.
14873 2000-04-04 Linus Nordberg <linus@swox.se>
14875 * gmp.h (GMP_ERROR enum): Remove comma after last enumeration
14876 since the AIX compiler (xlc) doesn't like that.
14878 * randlc.c (gmp_rand_init_lc): Allocate enough space for seed to
14879 hold any upcoming seed.
14880 * randlc2x.c (gmp_rand_init_lc_2exp): Likewise.
14882 * mpn/generic/rawrandom.c: Remove debugging code.
14883 (mpn_lc): Don't reallocate seed.
14885 * mpz/urandomm.c (mpz_urandomm): Implement function.
14887 * mpz/urandomb.c (mpz_urandomb): Fix typo in function definition.
14889 2000-04-04 Kevin Ryde <kevin@swox.se>
14891 * make.bat: Removed (no longer works, no longer supported).
14892 * mpn/msdos/asm-syntax.h: Removed (was used only by make.bat).
14894 2000-04-03 Torbjorn Granlund <tege@swox.com>
14896 * mpn/generic/brandom.c: New file, replacing random2.
14898 2000-04-02 Torbjorn Granlund <tege@swox.com>
14900 * mpn/sparc32/v9/submul_1.asm: Change some carry-form instructions
14901 into their plain counterparts.
14903 * mpn/sparc64/copyi.asm: Avoid executing ALIGN.
14905 * mpn/sparc64/mul_1.asm: Handle overlap of rp/sp.
14906 * mpn/sparc64/addmul_1.asm: Likewise.
14907 * mpn/sparc64/submul_1.asm: Likewise.
14909 2000-04-01 Linus Nordberg <linus@swox.se>
14911 * gmp.h: Fix function prototypes for randomization functions.
14912 (__gmp_rand_lc_scheme_struct): Replace `m' with `m2exp'. Remove
14914 (__gmp_rand_data_lc): Add `m2exp' as another way of representing
14916 (__gmp_rand_state_struct): Remove unused `size'.
14918 * rand.c (__gmp_rand_scheme): Use better multipliers. Remove test
14919 schemes. Replace `m' with `m2exp'.
14920 (gmp_rand_init): Change parameters and return type. Use `m2exp'
14921 instead of `m'. Set `gmp_errno' on error. Disable BBS algorithm.
14923 * randlc.c (gmp_rand_init_lc): Don't use malloc(). Change
14926 * randclr.c (gmp_rand_clear): Don't use free(). Disable BBS
14927 algorithm. Set `gmp_errno' on error.
14929 * randlc2x.c (gmp_rand_init_lc_2exp): New function.
14930 * randsd.c (gmp_rand_seed): New function.
14931 * randsdui.c (gmp_rand_seed_ui): New function.
14932 * randlcui.c: Remove unused file.
14934 * mpn/generic/rawrandom.c (mpn_rawrandom): Rewrite.
14935 (mpn_lc): New static function.
14937 * mpz/urandomb.c (mpz_urandomb): Use ABSIZ() instead of SIZ() for
14938 determining size of ROP.
14940 * mpf/urandom.c (mpf_urandomb): Add third parameter, nbits. (Not
14942 Change parameter order to mpn_rawrandom().
14944 * Makefile.am (libgmp_la_SOURCES): Add errno.c, randlc2x.c,
14945 randsd.c, randsdui.c. Remove randui.c.
14946 (MPZ_OBJECTS): Rename urandom.lo --> urandomb.lo. Add urandomm.lo.
14947 * Makefile.in: Regenerate.
14949 * mpz/Makefile.am (libmpz_la_SOURCES): Change urandom.c -->
14950 urandomb.c. Add urandomm.c.
14951 * mpz/Makefile.in: Regenerate.
14953 * tests/rand/Makefile.am (noinst_PROGRAMS): Change findcl --> findlc.
14955 * tests/rand/Makefile.in: Regenerate.
14957 * tests/rand/gen.c (main): Add mpz_urandomm. Add command line options
14958 `-C', `-m', extend `-a'. Use *mp*_*rand*() with new parameters. Call
14961 2000-04-01 Kevin Ryde <kevin@swox.se>
14963 * acinclude.m4 (GMP_CHECK_ASM_DATA): Plain .data for hpux.
14964 * configure.in (CCAS): No CFLAGS, they're added when it's used.
14965 (CONFIG_SRCDIR): New define for config.m4.
14966 * mpn/sparc64/addmul_1.asm: Use it for an include().
14967 * mpn/sparc64/submul_1.asm: Ditto.
14968 * mpn/sparc64/mul_1.asm: Ditto.
14970 2000-03-31 Linus Nordberg <linus@swox.se>
14972 * mpz/urandom.c: Rename to...
14973 * mpz/urandomb.c: ...this.
14975 * mpz/urandomb.c (mpz_urandomb): Change operand order in call to
14976 mpn_rawrandom(). Use ABSIZ() instead of SIZ() when checking size
14979 * mpz/urandomm.c: New file.
14981 2000-03-31 Kevin Ryde <kevin@swox.se>
14983 * acinclude.m4 (GMP_CHECK_ASM_MMX): Give a warning when mmx code
14986 2000-03-30 Torbjorn Granlund <tege@swox.com>
14988 * mpn/sparc64/mul_1h.asm: New file.
14989 * mpn/sparc64/addmul_1h.asm: New file.
14990 * mpn/sparc64/submul_1h.asm: New file.
14991 * mpn/sparc64/mul_1.asm: Rewrite.
14992 * mpn/sparc64/addmul_1.asm: Rewrite.
14993 * mpn/sparc64/submul_1.asm: Rewrite.
14995 2000-03-28 Torbjorn Granlund <tege@swox.com>
14997 * mpn/sparc32/v9/mul_1.asm: Fix typo in branch prediction.
14998 * mpn/sparc32/v9/addmul_1.asm: Likewise.
14999 * mpn/sparc32/v9/submul_1.asm: Likewise.
15001 2000-03-25 Kevin Ryde <kevin@swox.se>
15003 * mpn/lisp/gmpasm-mode.el: Fix some comment detection, use custom,
15004 fontify more keywords, turn into a standalone mode.
15006 * stamp-vti: New file, generated together with version.texi.
15008 * acinclude.m4 (GMP_VERSION,GMP_HEADER_GETVAL): New macros.
15009 * configure.in (AM_INIT_AUTOMAKE): Use GMP_VERSION.
15011 2000-03-24 Kevin Ryde <kevin@swox.se>
15013 * INSTALL: Updates for new configure system.
15015 * configure.in: Add gmp_optcflags_gcc for the x86s, setting -mcpu
15018 2000-03-23 Torbjorn Granlund <tege@swox.com>
15020 * demos/pexpr.c (mpz_eval_expr): Properly initialize rhs/lhs
15023 2000-03-23 Kevin Ryde <kevin@swox.se>
15025 * config.guess (i?86:*:*:*): Use uname -m if detection program fails.
15027 * mpn/x86/README: Remove remarks on the now implemented MMX shifts.
15028 * mpn/x86/k6/README: Add speed of mpn_divexact_by3, update mpn_mul_1.
15030 * gmp.texi (Installing MP): Corrections to target CPUs.
15032 * version.c: Use VERSION from config.h, add copyright comment,
15033 restore "const" somehow lost.
15035 * configure.in (a29k*-*-*): Fix directory name.
15037 2000-03-22 Torbjorn Granlund <tege@swox.com>
15039 * demos/pexpr.c (op_t): Add ROOT.
15041 (mpz_eval_expr): Add ROOT.
15043 * mpz/root.c: Handle roots of negative numbers.
15044 Fix other border cases.
15045 Fix rare memory leakage.
15047 * errno.c: New file.
15049 2000-03-21 Torbjorn Granlund <tege@swox.com>
15051 * gmp.h (error number enum): New anonymous enum.
15054 * gmp.h (__GNU_MP_VERSION, __GNU_MP_VERSION_MINOR): Bump for GMP 3.0.
15056 2000-03-20 Torbjorn Granlund <tege@swox.com>
15058 * mpn/alpha/unicos.m4 (FLOAT64): New define.
15059 * mpn/alpha/default.m4 (FLOAT64): New define.
15060 * mpn/alpha/invert_limb.asm (C36): Use FLOAT64.
15062 2000-03-21 Kevin Ryde <kevin@swox.se>
15064 * mpn/x86/k6/diveby3.asm: Tiny speedup.
15066 * acinclude.m4 (GMP_CHECK_ASM_SHLDL_CL): New macro.
15067 * configure.in: Use it, set WANT_SHLDL_CL in config.m4.
15068 * mpn/x86/x86-defs.m4 (shldl,shrdl,shldw,shrdw): New macros, using
15070 * mpn/x86/k6/mmx/lshift.asm: Use shldl macro.
15071 * mpn/x86/k7/mmx/lshift.asm: Ditto.
15072 * mpn/x86/pentium/mmx/lshift.asm: Ditto.
15073 * mpn/x86/k6/mmx/rshift.asm: Use shrdl macro.
15074 * mpn/x86/k7/mmx/rshift.asm: Ditto.
15075 * mpn/x86/pentium/mmx/rshift.asm: Ditto.
15076 * mpn/x86/README.family: Add a note about this.
15078 2000-03-20 Linus Nordberg <linus@swox.se>
15080 * mpn/generic/rawrandom.c (mpn_rawrandom): Handle seed value of 0
15083 * configure.in: Fix detection of alpha flavour.
15084 Set compiler options for `sparcv8'.
15085 * configure: Regenerate.
15087 * rand.c (__gmp_rand_scheme): Clean up some. Use slightly better
15090 * configure.in (AC_OUTPUT): Add tests/Makefile and
15091 tests/rand/Makefile.
15093 * acinclude.m4 (AC_CANONICAL_BUILD): Define to
15094 `_AC_CANONICAL_BUILD' to deal with incompabilities between
15095 Autoconf and Libtool.
15096 (AC_CHECK_TOOL_PREFIX): Likewise.
15098 * Makefile.am (EXTRA_DIST): Add directory `tests'.
15100 * mkinstalldirs: Update (Automake 2000-03-17).
15101 * ltconfig: Update (Libtool 2000-03-17).
15102 * ltmain.sh: Ditto.
15104 * configure: Regenerate with new autoconf/-make/libtool suite.
15105 * aclocal.m4: Ditto.
15106 * config.in: Ditto.
15107 * all Makefile.in's: Ditto.
15109 2000-03-20 Torbjorn Granlund <tege@swox.com>
15111 * demos/pexpr.c (main): Don't allow `-N' for base, require `-bN'.
15113 * mpn/alpha/unicos.m4 (cvttqc): New define.
15114 * mpn/alpha/invert_limb.asm: Use new define for cvttqc.
15116 2000-03-19 Kevin Ryde <kevin@swox.se>
15118 * mpn/x86/k6/sqr_basecase.asm: Tiny amendments for 3x3 case.
15120 * gmp.texi: Use @include version.texi.
15121 Use @email and @uref.
15122 (Installing MP): Rewrite for new configure.
15123 (Low-level Functions): Add mpn_divexact_by3.
15125 * configure.in (--enable-alloca): New option.
15126 * acconfig.h (USE_STACK_ALLOC): For --disable-alloca.
15128 2000-03-18 Kent Boortz <kent@swox.com>
15130 * macos: New directory with macos port files.
15132 2000-03-17 Torbjorn Granlund <tege@swox.com>
15134 * gmp-impl.h (union ieee_double_extract): Check _CRAYMPP.
15136 * mpn/asm-defs.m4 (invert_normalized_limb): Define.
15138 * mpn/alpha: Translate `.s' files to `.asm'.
15140 * configure: Regenerate.
15142 * mpn/alpha/invert_limb.asm: Replace dash in file name with underscore.
15143 * configure.in: Corresponding change.
15145 * configure.in: Assign special "path" for alphaev6.
15147 * mpn/alpha/unicos.m4: New file.
15148 * configure.in (alpha*-cray-unicos*): [This part of the change
15149 commited 2000-03-13 by linus]
15150 * mpn/alpha/default.m4: New file.
15151 * configure.in (alpha*-*-*): Use it.
15153 2000-03-17 Kevin Ryde <kevin@swox.se>
15155 * mpn/x86/pentium/rshift.S: Use plain rcrl (not rcrl $1) for
15156 shift-by-1 case, significant speedup.
15157 * mpn/x86/pentium/README: Add shift-by-1 speed.
15159 2000-03-16 Torbjorn Granlund <tege@swox.com>
15161 * config.guess: Handle Cray T3D/E.
15163 2000-03-15 Kevin Ryde <kevin@swox.se>
15165 * mpn/generic/diveby3.c: New file.
15166 * mpn/x86/diveby3.asm: New file.
15167 * mpn/x86/k6/diveby3.asm: New file.
15168 * gmp.h (mpn_divexact_by3): Prototype and define.
15169 * mpn/asm-defs.m4: define_mpn(divexact_by3).
15170 * configure.in (gmp_mpn_functions): Add diveby3.
15172 * mpn/x86/pentium/sqr_basecase.asm: A few better addressing modes.
15174 * configure.in: Add AC_C_STRINGIZE and AC_CHECK_TYPES((void)).
15175 * gmp-impl.h (ASSERT): Use them.
15177 * mpn/x86/k7/mmx/lshift.asm: New file.
15178 * mpn/x86/k7/mmx/rshift.asm: Rewrite simple loop and return value
15179 handling, add some pictures.
15181 2000-03-14 Torbjorn Granlund <tege@swox.com>
15183 * mpn/sparc32/v8/mul_1.asm: Make PIC actually work.
15184 * mpn/sparc32/v8/addmul_1.asm: Likewise.
15186 * mpn/sparc32/v8/mul_1.asm: Use m4 ifdef, not cpp #if.
15187 * mpn/sparc32/v8/addmul_1.asm: Likewise.
15189 * mpn/asm-defs.m4 (C): New define for comments.
15190 * mpn/sparc32: Start comments with `C'.
15192 * config.guess: Remove `SunOS 6' handling.
15193 Recognize sun4m and sun4d architectures under old SunOS.
15195 2000-03-14 Linus Nordberg <linus@swox.se>
15197 * configure.in (gmp_srclinks): Set to list of links created by
15199 * configure: Regenerate.
15201 * Makefile.am (libgmp_la_LDFLAGS): Set version info.
15202 (DISTCLEANFILES): Include @gmp_srclinks@.
15203 * Makefile.in: Regenerate.
15205 2000-03-13 Linus Nordberg <linus@swox.se>
15207 * configure.in: Remove some changequote's by quoting the strings
15209 Add support for `alpha*-cray-unicos*'.
15210 AC_DEFINE `_LONG_LONG_LIMB' instead of passing it in CFLAGS.
15211 Conditionalize the assembler syntax checks.
15212 * configure: Regenerate.
15213 * config.in: Regenerate.
15215 * acinclude.m4 (GMP_PROG_CCAS): Remove macro.
15216 * aclocal.m4: Regenerate.
15218 2000-03-13 Kevin Ryde <kevin@swox.se>
15220 * mpn/x86/p6/README: New file.
15222 * mpn/x86/k6/mul_1.asm: Rewrite, smaller and slightly faster.
15224 * mpn/lisp/gmpasm-mode.el: Rewrite assembler comment detection and
15227 * configure.in: Separate mmx directories for each x86 flavour.
15228 * configure: Regenerate.
15230 2000-03-12 Kevin Ryde <kevin@swox.se>
15232 * mpn/x86/x86-defs.m4 (ALIGN): Supplement definition from
15233 config.m4 so as to pad with nops not zeros on old gas.
15235 * mpn/x86/k7/mmx/copyd.asm: Use plain emms (femms is just an alias
15237 * mpn/x86/k7/mmx/copyi.asm: Ditto.
15238 * mpn/x86/k7/mmx/rshift.asm: Ditto.
15239 * mpn/x86/x86-defs.m4: Amend comments.
15241 * mpn/x86/mod_1.asm: Add comments on speeds.
15243 * mpn/x86/pentium/mmx/lshift.asm: New file.
15244 * mpn/x86/pentium/mmx/rshift.asm: New file.
15245 * mpn/x86/pentium/README: Add speeds of various routines.
15247 2000-03-10 Linus Nordberg <linus@swox.se>
15249 * configure.in: Reorganize.
15250 Use AC_CHECK_TOOL to find `ar'.
15251 Add post-includes `regmap.m4' and `aix.m4' for AIX targets.
15252 asm-syntax.h is not needed for PPC or sparc anymore.
15253 (powerpc64-*-aix*): Compiler is always 64-bit. Use `-q64
15254 -qtune=pwr3' to xlc and `-maix64 -mpowerpc64' to gcc. Pass `-X
15255 64' to `ar' and `nm'.
15256 (pentiummmx): Use GMP_CHECK_ASM_MMX and avoid MMX assembly path if
15257 assembler is not MMX capable.
15258 (pentium[23]): Likewise.
15259 (athlon): Likewise.
15261 * configure: Regenerate.
15263 * acinclude.m4 (GMP_PROG_CC_WORKS): New macro.
15264 (GMP_PROG_CC_FIND): Use GMP_PROG_CC_WORKS instead of
15265 AC_TRY_COMPILER. Make sure that the *first* working 32-bit
15266 compiler is used if no 64-bit compiler is found.
15267 (GMP_CHECK_ASM_MMX): New macro.
15268 * aclocal.m4: Regenerate.
15270 * Makefile.in: Regenerate. (CC_TEST removed.)
15271 * mpf/Makefile.in: Likewise.
15272 * mpn/Makefile.in: Likewise.
15273 * mpq/Makefile.in: Likewise.
15274 * mpz/Makefile.in: Likewise.
15275 * mpf/tests/Makefile.in: Likewise.
15276 * mpq/tests/Makefile.in: Likewise.
15277 * mpz/tests/Makefile.in: Likewise.
15279 * acconfig.h (_LONG_LONG_LIMB): Add.
15281 * gmp-impl.h: Include config.h only if HAVE_CONFIG_H is defined.
15283 2000-03-09 Kevin Ryde <kevin@swox.se>
15285 * mpn/x86/pentium/mul_basecase.S: Small speedup by avoiding an AGI.
15287 * mpn/x86/k7/mmx/copyd.asm: Tiny speedup by avoiding popl.
15288 * mpn/x86/k7/mmx/copyi.asm: Ditto.
15289 * mpn/x86/k7/mul_basecase.asm: Ditto.
15291 2000-03-07 Torbjorn Granlund <tege@swox.com>
15293 * config.guess: Better recognize POWER/PowerPC processor type.
15295 2000-03-07 Kevin Ryde <kevin@swox.se>
15297 * mpn/generic/addsub_n.c: Use HAVE_NATIVE_* now in config.h.
15299 * mpn/asm-defs.m4: Add comments about SysV m4.
15300 (m4_log2): Don't use <<.
15301 (m4_lshift,m4_rshift): New macros.
15303 2000-03-06 Torbjorn Granlund <tege@swox.com>
15305 * mpn/powerpc32/regmap.m4: Map cr0 => `0', etc.
15307 2000-03-06 Kevin Ryde <kevin@swox.se>
15309 * mpn/tests/ref.c (refmpn_divexact_by3): New function.
15310 * mpn/tests/ref.h: Prototype.
15312 * acconfig.h (WANT_ASSERT): New define.
15313 * configure.in (--enable-assert): Turn on WANT_ASSERT.
15314 * assert.c: New file.
15315 * Makefile.am: Add to build.
15316 * gmp-impl.h (ASSERT): New macro.
15317 (ASSERT_NOCARRY) Renamed from assert_nocarry.
15318 (MPZ_CHECK_FORMAT): Use ASSERT_ALWAYS.
15319 * mpn/tests/ref.c: Use ASSERT.
15320 * mpf/get_str.c: Use ASSERT_ALWAYS.
15321 * mpf/set_str.c: Remove old assert macro.
15323 * mpn/x86/x86-defs.m4 (cmovnz_ebx_ecx): New macro.
15324 * mpn/x86/p6/aorsmul_1.asm: Use cmov.
15326 * mpn/x86/lshift.S: Use %dl with testb, not %edx. No object code
15327 change, testb was still getting generated.
15328 * mpn/x86/rshift.S: Ditto.
15330 2000-03-03 Torbjorn Granlund <tege@swox.com>
15332 * longlong.h: Add IA-64 support.
15334 * mpn/powerpc32: Misc cleanups.
15335 * mpn/powerpc32/aix.m4: New file (mainly by Linus).
15336 * mpn/powerpc64/aix.m4: New file (mainly by Linus).
15337 * mpn/powerpc64: Translate `.S' files to `.asm'.
15339 * configure.in: Fix tyops.
15340 * configure: Regenerate.
15342 2000-03-02 Torbjorn Granlund <tege@swox.com>
15344 * mpn/powerpc32/regmap.m4: New file.
15345 * mpn/powerpc32: Translate `.S' files to `.asm'.
15346 * configure.in: Use mpn/powerpc32/regmap.m4 for powerpc targets
15347 except some weird ones.
15349 2000-03-03 Kevin Ryde <kevin@swox.se>
15351 * mpn/lisp/gmpasm-mode.el: Suppress postscript comment prefixes in
15354 * mpn/x86/pentium/sqr_basecase.asm: New file.
15355 * mpn/x86/pentium/gmp-mparam.h (KARATSUBA_SQR_THRESHOLD): Update.
15357 * configure.in: Add --enable-assert, enable k6 logops functions.
15359 * mpn/x86/k6/mmx/copyi.asm: Use m4 for divide, not as.
15360 * mpn/x86/k6/mmx/copyd.asm: Ditto.
15361 * mpn/x86/README.family: Add a note on this.
15363 2000-03-02 Kevin Ryde <kevin@swox.se>
15365 * mpn/x86/k6/aors_n.asm: Don't use stosl.
15366 * mpn/x86/copyi.asm: Use cld to clear direction flag.
15367 * mpn/x86/divrem_1.asm: Ditto.
15368 * mpn/x86/README.family: Add a note on this.
15370 * mpn/x86/k6/mmx/copyi.asm: Rewrite.
15371 * mpn/x86/k6/mmx/copyd.asm: New file.
15372 * mpn/x86/k6/README: Update, and small amendments.
15374 * mpn/x86/x86-defs.m4 (Zdisp): New macro.
15375 * mpn/asm-defs.m4 (m4_stringequal_p): New macro.
15377 * mpn/x86/p6/aorsmul_1.asm: Use Zdisp to force zero displacements.
15378 * mpn/x86/k6/aorsmul_1.asm: Ditto.
15379 * mpn/x86/k6/mul_1.asm: Ditto.
15380 * mpn/x86/k6/mul_basecase.asm: Ditto.
15381 * mpn/x86/k7/aors_n.asm: Ditto.
15382 * mpn/x86/k7/aorsmul_1.asm: Ditto.
15383 * mpn/x86/k7/mul_1.asm: Ditto.
15384 * mpn/x86/k7/mul_basecase.asm: Ditto.
15385 * mpn/x86/README.family: Add a note on this.
15387 2000-02-27 Kevin Ryde <kevin@swox.se>
15389 * mpn/generic/divrem.c (mpn_divrem_classic): Patch to avoid gcc
15390 2.7.2.3 i386 register handling bug.
15392 * mpn/x86/k6/aors_n.asm: Rewrite.
15393 * mpn/x86/k6/mmx/lshift.asm: Rewrite.
15394 * mpn/x86/k6/mmx/rshift.asm: Rewrite.
15395 * mpn/x86/k6/README: Update.
15397 * mpn/x86/k7/mmx/copyd.asm: Support size==0.
15398 * mpn/x86/k7/mmx/copyi.asm: Ditto.
15399 * mpn/x86/k6/mmx/copyi.asm: Ditto.
15400 * gmp-impl.h: Comment size==0 allowed in MPN_COPY_INCR and
15402 * configure.in: Enable x86 copyi, copyd; add k6 com_n.
15404 2000-02-25 Torbjorn Granlund <tege@swox.com>
15406 * demos/pexpr.c (power): Move factorial handing code from `factor'
15409 * demos/factorize.c (factor_using_pollard_rho): Move resetting of `c'
15410 to before checking for a non-zero gcd.
15412 2000-02-25 Kevin Ryde <kevin@swox.se>
15414 * mpn/asm-defs.m4 (MULFUNC_PROLOGUE): New macro by Linus.
15415 * mpn/x86/k6/aors_n.asm: Use MULFUNC_PROLOGUE.
15416 * mpn/x86/k6/aorsmul_1.asm: Ditto.
15417 * mpn/x86/k7/aors_n.asm: Ditto.
15418 * mpn/x86/k7/aorsmul_1.asm: Ditto.
15419 * mpn/x86/p6/aorsmul_1.asm: Ditto.
15421 * mpn/tests/ref.c (refmpn_copyi,refmpn_copyd): Allow size==0.
15423 * gmp-impl.h: Move mpn_and_n, mpn_andn_n, mpn_com_n, mpn_ior_n,
15424 mpn_iorn_n, mpn_nand_n, mpn_nior_n, mpn_xor_n and mpn_xorn_n here
15425 from gmp.h. Use HAVE_NATIVE_mpn_* to make these functions or
15428 * gmp-impl.h: Move mpn_copyd, mpn_copyi here from gmp.h.
15429 * gmp-impl.h (MPN_COPY_INCR): Use mpn_copyi if available.
15430 * gmp-impl.h (MPN_COPY_DECR): Use mpn_copyd if available.
15432 * mpn/x86/k6/mmx/com_n.asm: Moved into mmx subdirectory.
15433 * mpn/x86/k6/mmx/copyi.asm: Ditto.
15434 * mpn/x86/k6/mmx/lshift.asm: Ditto.
15435 * mpn/x86/k6/mmx/rshift.asm: Ditto.
15436 * mpn/x86/k7/mmx/rshift.asm: Ditto.
15437 * mpn/x86/k6/mmx/logops_n.asm: New file.
15438 * configure.in (k6*-*-*): Add logops_n.asm.
15439 * mpn/x86/k6/README: Update.
15441 * mpn/x86/k7/mmx/copyi.asm: New file.
15442 * mpn/x86/k7/mmx/copyd.asm: New file.
15443 * mpn/x86/k7/README: Update.
15445 2000-02-24 Kevin Ryde <kevin@swox.se>
15447 * mpn/x86/x86-defs.m4 (femms): Generate emms if 3dnow not available.
15448 * mpn/x86/x86-defs.m4 (FRAME_popl): New macro.
15450 * Makefile.am: Add info_TEXINFOS = gmp.texi
15452 * mpn/x86/divrem_1.asm: Moved from mpn/x86/k6, allow size==0,
15453 conditionalize loop versus decl/jnz.
15454 * mpn/x86/mod_1.asm: Ditto.
15455 * mpn/x86/divmod_1.asm: Removed.
15456 * gmp.texi (mpn_divrem_1,mpn_mod_1): Add that size==0 is allowed.
15457 * mpn/tests/ref.c (refmpn_divrem_1c,etc): Allow size==0.
15459 * mpn/x86/k6/aors_n.asm: Avoid gas 1.92.3 leal displacement
15460 expression problem.
15461 * mpn/x86/k6/aorsmul_1.asm: Ditto.
15462 * mpn/x86/k6/mul_1.asm: Ditto.
15463 * mpn/x86/k6/mul_basecase.asm: Ditto
15464 * mpn/x86/k7/aors_n.asm: Ditto.
15465 * mpn/x86/k7/aorsmul_1.asm: Ditto.
15466 * mpn/x86/k7/mul_1.asm: Ditto.
15467 * mpn/x86/k7/mul_basecase.asm: Ditto.
15468 * mpn/x86/k7/rshift.asm: Ditto.
15469 * mpn/x86/p6/aorsmul_1.asm: Ditto.
15470 * mpn/x86/README.family: Describe problem.
15472 2000-02-24 Linus Nordberg <linus@swox.se>
15474 * acinclude.m4 (GMP_CHECK_ASM_LSYM_PREFIX): Add dummy symbol to
15475 testcase to avoid nm failure. Try nm before piping to grep.
15477 * acconfig.h: Undef HAVE_NATIVE_func for every mpn function found
15480 * configure.in: Invoke AC_CONFIG_HEADERS.
15481 Don't invoke AM_CONFIG_HEADER; it makes autoconf confused.
15482 Dig out entry points declared in assembly code and AC_DEFINE proper
15485 * mpn/asm-defs.m4 (MULFUNC_PROLOGUE): New macro.
15487 * mpn/x86/p6/aorsmul_1.asm: Use MULFUNC_PROLOGUE.
15488 * mpn/x86/k6/aors_n.asm: Likewise.
15490 * Makefile.am (EXTRA_DIST): Add config.in; needed when we don't
15491 use AM_CONFIG_HEADER in configure.in.
15493 * mpn/Makefile.am (INCLUDES): Add `-I..' for config.h and
15495 * mpf/Makefile.am: Likewise.
15496 * mpq/Makefile.am: Likewise.
15497 * mpz/Makefile.am: Likewise.
15499 * mpf/tests/Makefile.am (INCLUDES): Add `-I../..' for config.h and
15501 * mpq/tests/Makefile.am: Likewise.
15502 * mpz/tests/Makefile.am: Likewise.
15504 * configure: Regenerate.
15505 * aclocal.m4: Regenerate.
15506 * config.in: Regenerate.
15507 * Makefile.in: Regenerate.
15508 * mpf/Makefile.in: Regenerate.
15509 * mpn/Makefile.in: Regenerate.
15510 * mpq/Makefile.in: Regenerate.
15511 * mpz/Makefile.in: Regenerate.
15512 * mpf/tests/Makefile.in: Regenerate.
15513 * mpq/tests/Makefile.in: Regenerate.
15514 * mpz/tests/Makefile.in: Regenerate.
15516 2000-02-23 Kevin Ryde <kevin@swox.se>
15518 * mpn/x86/addmul_1.S: Amend comments, this code no longer used by
15520 * mpn/x86/submul_1.S: Ditto.
15522 * mpn/x86/k6/com_n.asm: Rewrite, smaller but same speed.
15524 * mpn/x86/addmul_1.S: Add PROLOGUE and EPILOGUE to get .type and
15525 .size for ELF. Rename #define size to n to avoid .size.
15526 * mpn/x86/lshift.S: Ditto.
15527 * mpn/x86/mul_1.S: Ditto.
15528 * mpn/x86/mul_basecase.S: Ditto.
15529 * mpn/x86/rshift.S: Ditto.
15530 * mpn/x86/submul_1.S: Ditto.
15531 * mpn/x86/udiv.S: Ditto.
15532 * mpn/x86/umul.S: Ditto.
15533 * mpn/x86/pentium/add_n.S: Ditto.
15534 * mpn/x86/pentium/addmul_1.S: Ditto.
15535 * mpn/x86/pentium/lshift.S: Ditto.
15536 * mpn/x86/pentium/mul_1.S: Ditto.
15537 * mpn/x86/pentium/mul_basecase.S: Ditto.
15538 * mpn/x86/pentium/rshift.S: Ditto.
15539 * mpn/x86/pentium/sub_n.S: Ditto.
15540 * mpn/x86/pentium/submul_1.S: Ditto.
15542 2000-02-22 Linus Nordberg <linus@swox.se>
15544 * acinclude.m4 (GMP_INIT): Use temporary file cnfm4p.tmp for
15546 (GMP_FINISH): Ditto.
15547 (GMP_DEFINE): Add third optional argument specifying location in
15549 (GMP_DEFINE_RAW): New macro.
15550 * aclocal.m4: Regenerate.
15552 * configure.in: Add `HAVE_TARGET_CPU_$target_cpu' using
15554 * configure: Regenerate.
15556 * mpz/tests/Makefile.am: New test t-root.
15557 * mpz/tests/Makefile.in: Regenerate.
15559 2000-02-22 Torbjorn Granlund <tege@swox.com>
15561 * mpz/root.c: Complete rewrite; still primitive, but at least correct.
15562 * mpz/tests/t-root.c: New test.
15564 2000-02-22 Kevin Ryde <kevin@swox.se>
15566 * mpn/x86/k7/mul_basecase.asm: New file.
15567 * mpn/x86/k7/README: Add mpn_mul_basecase speed.
15568 * mpn/x86/k7/gmp-mparam.h: New file.
15570 * mpn/x86/x86-defs.m4 (loop_or_decljnz,cmov_bytes): New macros.
15571 * mpn/asm-defs.m4 (m4_ifdef_anyof_p): New macro.
15573 * mpn/x86/k6/aorsmul_1.asm: New file.
15574 * mpn/x86/k6/addmul_1.S: Removed (was a copy of pentium version).
15575 * mpn/x86/k6/submul_1.S: Removed (was a copy of pentium version).
15577 * mpn/x86/p6/aorsmul_1.asm: Use OPERATION_addmul_1 and
15578 OPERATION_submul_1.
15579 * mpn/x86/k6/aors_n.asm: Use OPERATION_add_n and OPERATION_sub_n.
15580 * configure.in: Declare multi-function files for k6 and p6.
15582 * configure.in: Add HAVE_TARGET_CPU_$target_cpu for config.m4.
15583 * mpn/asm-defs.m4 (define_not_for_expansion): New macro.
15585 * mpn/generic/divrem_1n.c (__gmpn_divrem_1n): New file, split from
15586 mpn/generic/divrem_1.c.
15587 * mpn/generic/divrem_1.c: Ditto.
15588 * configure.in (gmp_mpn_functions): Ditto.
15590 2000-02-21 Torbjorn Granlund <tege@swox.com>
15592 * gmp.h: Undo 1996-10-06 NeXT change, it was clearly improperly
15595 2000-02-21 Linus Nordberg <linus@swox.se>
15597 * configure.in: Link <src>/mpn/asm-defs.m4 to <build>mpn/asm.m4.
15598 * configure: Regenerate.
15600 2000-02-21 Linus Nordberg <linus@swox.se>
15602 * mpn/x86/k7/aorsmul_1.asm: Change OPERATION_ADDMUL -->
15603 OPERATION_addmul_1. Change OPERATION_SUBMUL -->
15604 OPERATION_submul_1.
15606 * mpn/x86/k7/aors_n.asm: Change OPERATION_ADD --> OPERATION_add_n.
15607 Change OPERATION_SUB --> OPERATION_sub_n.
15609 * mpn/Makefile.am: Pass -DOPERATION_$* to preprocessors.
15610 * mpn/Makefile.in: Regenerate.
15612 * configure.in: Symlink mpn/asm-defs.m4 to build-dir/mpn. Link
15613 multi-function files to mpn/<function>.asm and remove function
15614 name from `gmp_mpn_functions'.
15615 * configure: Regenerate.
15617 * acinclude.m4 (GMP_FINISH): Tell user what we're doing.
15618 * aclocal.m4: Regenerate.
15620 2000-02-21 Kevin Ryde <kevin@swox.se>
15622 * gmp-impl.h: Rename __gmpn_mul_basecase to mpn_mul_basecase and
15623 __gmpn_sqr_basecase to mpn_sqr_basecase, remove __gmpn prototypes.
15624 * mpn/x86/mul_basecase.S: Ditto.
15625 * mpn/x86/pentium/mul_basecase.S: Ditto.
15627 * configure.in (gmp_m4postinc): Use x86-defs.m4 on athlon-*-* too.
15629 2000-02-20 Kevin Ryde <kevin@swox.se>
15631 * acinclude.m4 (GSYM_PREFIX): Drop $1, change by Linus.
15632 * mpn/asm-defs.m4 (PROLOGUE,EPILOGUE): Use GSYM_PREFIX as a
15633 string, change by Linus.
15634 * mpn/x86/x86-defs.m4: Use GSYM_PREFIX as a string.
15636 * mpn/x86/k6/gmp-mparam.h: New file.
15637 * mpn/asm-defs.m4 (m4_warning): New macro.
15639 * mpn/x86/README: Amendments per new code and directories.
15640 * mpn/x86/README.family: New file.
15641 * mpn/x86/k6/README: New file.
15642 * mpn/x86/k7/README: New file.
15644 * mpn/generic/mul_n.c: Rename __gmpn_mul_basecase to
15645 mpn_mul_basecase and __gmpn_sqr_basecase to mpn_sqr_basecase.
15646 * mpn/generic/mul_basecase.c: Ditto.
15647 * mpn/generic/sqr_basecase.c: Ditto.
15648 * mpn/generic/mul.c: Ditto.
15650 2000-02-19 Linus Nordberg <linus@swox.se>
15652 * configure.in: Don't try to symlink more than one multi-func
15654 * configure: Regenerate.
15656 2000-02-18 Linus Nordberg <linus@swox.se>
15658 * acinclude.m4 (GMP_CHECK_ASM_UNDERSCORE): GMP_DEFINE
15659 `GSYM_PREFIX'. Run ACTIONs even when value is found in cache.
15660 (GMP_CHECK_ASM_ALIGN_LOG): GMP_DEFINE `ALIGN'. Run ACTIONs even
15661 when value is found in cache.
15662 * aclocal.m4: Regenerate.
15664 * configure.in: Don't define GSYM_PREFIX or ALIGN.
15665 Add mechanism for multi-function files.
15666 * configure: Regenerate.
15668 2000-02-18 Kevin Ryde <kevin@swox.se>
15670 * configure.in (gmp_m4postinc): Enable x86-defs.m4.
15671 * mpn/x86/k7/mul_1.asm: Fix include.
15672 * mpn/x86/k6/mul_basecase.S: Removed (copy of the pentium version).
15673 * mpn/x86/k6/mul_basecase.asm: New file.
15674 * mpn/x86/k6/sqr_basecase.asm: New file.
15675 * mpn/x86/k6/com_n.asm: New file.
15676 * mpn/x86/k6/copyi.asm: New file.
15677 * gmp.texi (Low-level Functions): Clarify mpn overlaps permitted.
15678 * gmp-impl.h (MPN_OVERLAP_P): New macro.
15679 * gmp-impl.h (assert_nocarry): New macro.
15680 * mpn/tests/ref.c: New file, based in part on other mpn/tests/*.c.
15681 * mpn/tests/ref.h: New file.
15683 2000-02-17 Linus Nordberg <linus@swox.se>
15685 * Makefile.am (dist-hook): Don't include any emacs backup files
15687 * Makefile.in: Regenerate.
15689 2000-02-17 Torbjorn Granlund <tege@swox.com>
15691 * mpn/sparc32/v9/mul_1.asm: Use `rd' to get current PC; get rid of
15693 * mpn/sparc32/v9/addmul_1.asm: Likewise.
15694 * mpn/sparc32/v9/submul_1.asm: Likewise.
15696 2000-02-17 Kevin Ryde <kevin@swox.se>
15698 * gmp.h: Add prototypes and defines for mpn_and_n, mpn_andn_n,
15699 mpn_com_n, mpn_copyd, mpn_copyi, mpn_ior_n, mpn_iorn_n,
15700 mpn_mul_basecase, mpn_nand_n, mpn_nior_n, mpn_sqr_basecase,
15701 mpn_xor_n, mpn_xorn_n.
15703 * mpn/asm-defs.m4: Many additions making up initial version.
15704 * mpn/asm-defs.m4 (L): Use defn(`LSYM_PREFIX').
15705 * mpn/x86/x86-defs.m4: New file.
15706 * mpn/x86/k6/aors_n.asm: New file.
15707 * mpn/x86/k6/divmod_1.asm: New file.
15708 * mpn/x86/k6/divrem_1.asm: New file.
15709 * mpn/x86/k6/lshift.S: Removed (was a copy of the pentium version).
15710 * mpn/x86/k6/lshift.asm: New file.
15711 * mpn/x86/k6/mod_1.asm: New file.
15712 * mpn/x86/k6/mul_1.S: Removed (was a copy of the pentium version).
15713 * mpn/x86/k6/mul_1.asm: New file.
15714 * mpn/x86/k6/rshift.S: Removed (was a copy of the pentium version).
15715 * mpn/x86/k6/rshift.asm: New file.
15716 * mpn/x86/k7/aors_n.asm: New file.
15717 * mpn/x86/k7/aorsmul_1.asm: New file.
15718 * mpn/x86/k7/mul_1.asm: New file.
15719 * mpn/x86/k7/rshift.asm: New file.
15720 * mpn/x86/p6/aorsmul_1.asm: New file.
15721 * mpn/x86/copyi.asm: New file.
15722 * mpn/x86/copyd.asm: New file.
15723 * mpn/lisp/gmpasm-mode.el: New file.
15725 2000-02-16 Torbjorn Granlund <tege@swox.com>
15727 * mpn/sparc32/v9/mul_1.asm: Conditionalize for PIC.
15728 * mpn/sparc32/v9/addmul_1.asm: Likewise.
15729 * mpn/sparc32/v9/submul_1.asm: Likewise.
15730 * mpn/sparc32/v8/supersparc/udiv.asm: Likewise.
15731 * mpn/sparc32/udiv_fp.asm: Likewise.
15733 2000-02-16 Linus Nordberg <linus@swox.se>
15735 * configure.in: Add mechanism for including target specific
15736 m4-files in config.m4.
15737 * configure: Regenerate.
15739 * acinclude.m4 (GMP_PROG_CCAS): Begin assembly lines (except
15740 labels) with a tab character. HP-UX demands it.
15741 (GMP_CHECK_ASM_SIZE): Ditto.
15742 (GMP_CHECK_ASM_LSYM_PREFIX): Ditto.
15743 (GMP_CHECK_ASM_LABEL_SUFFIX): Set to empty string for HP-UX.
15744 (GMP_CHECK_ASM_GLOBL): Change `.xport' --> `.export'.
15745 * aclocal.m4: Regenerate.
15747 2000-02-16 Linus Nordberg <linus@swox.se>
15749 * acinclude.m4 (GMP_CHECK_ASM_LSYM_PREFIX): Define LSYM_PREFIX as
15750 the prefix only, no argument.
15751 * aclocal.m4: Regenerate.
15752 * configure: Regenerate.
15754 * mpn/asm-defs.m4 (L): No argument to LSYM_PREFIX.
15756 2000-02-15 Linus Nordberg <linus@swox.se>
15758 * acinclude.m4: Prefix all temporary shell variables with
15760 (GMP_PROG_CC_FIND): Use defaults if no arguments are passed.
15761 Quote use of arguments.
15762 (GMP_PROG_CCAS): New macro.
15763 (GMP_INIT): New macro.
15764 (GMP_FINISH): New macro.
15765 (GMP_INCLUDE): New macro.
15766 (GMP_SINCLUDE): New macro.
15767 (GMP_DEFINE): New macro.
15768 (GMP_CHECK_ASM_LABEL_SUFFIX): New macro.
15769 (GMP_CHECK_ASM_TEXT): New macro.
15770 (GMP_CHECK_ASM_DATA): New macro.
15771 (GMP_CHECK_ASM_GLOBL): New macro.
15772 (GMP_CHECK_ASM_TYPE): New macro.
15773 (GMP_CHECK_ASM_SIZE): New macro.
15774 (GMP_CHECK_ASM_LSYM_PREFIX): New macro.
15775 (GMP_CHECK_ASM_W32): New macro.
15776 * aclocal.m4: Regenerate.
15778 * configure.in: Find m4 and nm for target.
15779 Use new macros to create config.m4.
15780 Prefix all temporary shell variables with `tmp_'.
15781 Pass `-X 64' to nm for 64-bit PPC target with 64-bit compiler.
15782 * configure: Regenerate.
15784 * Makefile.am (dist-hook): *Really* remove all CVS dirs in
15786 * Makefile.in: Regenerate.
15788 * mpn/Makefile.am: Add target for building .lo and .o from
15790 Pass -DPIC to preprocessor (CPP/m4) when building .lo.
15791 Build .o a second time for target .lo, without -DPIC to
15793 (SUFFIX): Add `.asm'.
15794 (EXTRA_DIST): Add asm-defs.m4.
15795 * mpn/Makefile.in: Regenerate.
15797 * mpf/Makefile.in: Regenerate.
15798 * mpf/tests/Makefile.in: Regenerate.
15799 * mpq/Makefile.in: Regenerate.
15800 * mpq/tests/Makefile.in: Regenerate.
15801 * mpz/Makefile.in: Regenerate.
15802 * mpz/tests/Makefile.in: Regenerate.
15804 2000-02-15 Torbjorn Granlund <tege@swox.com>
15806 * mpn/sparc32/udiv_fp.asm: Change `RODATA' to `DATA'.
15807 * mpn/sparc32/v8/supersparc/udiv.asm: Likewise.
15808 * mpn/sparc32/v9/addmul_1.asm: Likewise.
15809 * mpn/sparc32/v9/submul_1.asm: Likewise.
15810 * mpn/sparc32/v9/mul_1.asm: Likewise.
15812 * mpn/sparc32/add_n.asm: Rename `size' -> `n'.
15813 * mpn/sparc32/sub_n.asm: Likewise.
15815 * sparc32: Rename `.s' and `.S' files to `.asm'.
15816 * sparc64: Rename `.s' and `.S' files to `.asm'.
15818 2000-02-11 Torbjorn Granlund <tege@swox.com>
15820 * config.sub: Adopt to new config.guess sparc naming conventions.
15822 * config.guess (sun4u:SunOS:5.*:*): Change `sparc9' to `sparcv9'.
15823 * config.guess (sun4m:SunOS:5.*:*): Change to sun4[md]:SunOS:5.*:* and
15824 change `sparc8' to `sparcv8'.
15826 * mpn/x86/add_n.S: Use PROLOGUE/EPILOGUE.
15827 * mpn/x86/sub_n.S: Likewise.
15829 * mpn/x86/syntax.h (PROLOGUE): New name for PROLOG.
15830 * mpn/x86/syntax.h (EPILOGUE): New name for EPILOG.
15832 2000-02-11 Linus Nordberg <linus@swox.se>
15834 * configure.in: Better path for 64-bit sparc without 64-bit cc.
15835 Change sparc8 --> sparcv8.
15836 Change sparc9 --> sparcv9.
15837 * configure: Regenerate.
15839 2000-02-10 Linus Nordberg <linus@swox.se>
15841 * configure.in: Use Autoconf.
15842 * Makefile.am: New file.
15844 * AUTHORS: New file.
15845 * COPYING: New file.
15846 * acinclude.m4: New file.
15847 * acconfig.h: New file.
15849 * configure: Generate.
15850 * Makefile.in: Generate.
15851 * aclocal.m4: Generate.
15852 * config.in: Generate.
15854 * install.sh: Remove.
15855 * install-sh: New file from Automake.
15856 * missing: New file from Automake.
15857 * ltconfig: New file from Libtool.
15858 * ltmain.sh: New file from Libtool.
15860 * mpf/Makefile.am: New file.
15861 * mpf/Makefile.in: Generate.
15862 * mpf/configure.in: Remove.
15863 * mpf/tests/Makefile.am: New file.
15864 * mpf/tests/Makefile.in: Generate.
15865 * mpf/tests/configure.in: Remove.
15867 * mpn/Makefile.am: New file.
15868 * mpn/Makefile.in: Generate.
15869 * mpn/configure.in: Remove.
15871 * mpq/Makefile.am: New file.
15872 * mpq/Makefile.in: Generate.
15873 * mpq/configure.in: Remove.
15874 * mpq/tests/Makefile.am: New file.
15875 * mpq/tests/Makefile.in: Generate.
15876 * mpq/tests/configure.in: Remove.
15878 * mpz/Makefile.am: New file.
15879 * mpz/Makefile.in: Generate.
15880 * mpz/configure.in: Remove.
15881 * mpz/tests/Makefile.am: New file.
15882 * mpz/tests/Makefile.in: Generate.
15883 * mpz/tests/configure.in: Remove.
15885 2000-02-10 Torbjorn Granlund <tege@swox.com>
15887 * mpn/x86/add_n.S: Don't use label L0 twice.
15888 * mpn/x86/sub_n.S: Likewise.
15890 2000-01-20 Linus Nordberg <linus@swox.se>
15892 * demos/pexpr.c: Don't use setup_error_handler() in windoze.
15894 2000-01-19 Torbjorn Granlund <tege@swox.com>
15896 * demos/pexpr.c (sigaltstack): #define to sigstack for AIX.
15897 (setup_error_handler): Don't write to ss_size and ss_flags
15900 2000-01-11 Torbjorn Granlund <tege@swox.com>
15902 * mpn/configure.in (hppa2.0*-*-*): Move assignment of
15903 target_makefile_frag to where it belongs.
15905 1999-12-21 Torbjorn Granlund <tege@swox.com>
15907 * longlong.h (v9 umul_ppmm): New #define.
15908 (v9 udiv_qrnnd): New #define.
15910 1999-12-14 Torbjorn Granlund <tege@swox.com>
15912 * mpn/generic/divmod_1.c: Use invert_limb.
15913 * mpn/generic/mod_1.c: Use invert_limb.
15915 * gmp-impl.h (invert_limb): Put definition here.
15916 * mpn/generic/divrem.c (invert_limb): Delete definition.
15917 * mpn/generic/divrem_2.c (invert_limb): Delete definition.
15919 * gmp.h (mpn_divrem): Inhibit for non-gcc.
15920 But declare (undo 1999-11-22 change).
15922 * gmp-impl.h (DItype,UDItype): Do these also if _LONG_LONG_LIMB.
15924 * longlong.h: Move 64-bit hppa code out of __GNUC__ conditional.
15926 * stack-alloc.c (HSIZ): New #define.
15927 (__tmp_alloc): Use HSIZ instead of sizeof(tmp_stack).
15929 1999-12-10 Torbjorn Granlund <tege@swox.com>
15931 * config.sub: Clean up handling of x86 CPUs: Properly recognize
15932 Amd CPUs as unique entities. Use manufacturer's names of
15933 processors ("pentium", etc); still match ambiguous names like
15934 "i586", "i686", "p6" but be conservative in interpreting them.
15936 * configure.in: Recognize x86 CPU types known by config.guess.
15937 * mpn/configure.in: Likewise. Add x86/mmx path component as
15939 (athlon-*-*): Fix typo.
15941 * config.guess: Update x86 recog code to intiallly match
15942 more than just i386.
15943 Call K6-2 and K6-III for "k62" and "k63" respectively.
15945 * config.guess: Recognize x86 CPU types.
15946 Update code for FreeBSD, NetBSD, OpenBSD, Linux.
15948 1999-12-08 Torbjorn Granlund <tege@swox.com>
15950 * mpf/pow_ui.c: Avoid final squaring in loop.
15952 1999-12-07 Torbjorn Granlund <tege@swox.com>
15954 * gmp-impl.h (udiv_qrnnd_preinv2gen): Prefix local variables with `_'.
15955 (udiv_qrnnd_preinv2norm): Likewise.
15957 (HAVE_ALLOCA): #define also if defined (alloca).
15959 1999-12-04 Torbjorn Granlund <tege@swox.com>
15961 * mpn/tests/add_n.c: Set OPS from CLOCK.
15962 * mpn/tests/sub_n.c: Likewise.
15963 * mpn/tests/mul_1.c: Likewise.
15964 * mpn/tests/addmul_1.c: Likewise.
15965 * mpn/tests/submul_1.c: Likewise.
15967 * mpn/tests/lshift.c: Update from add_n.c.
15968 * mpn/tests/rshift.c: Likewise.
15970 1999-12-03 Torbjorn Granlund <tege@swox.com>
15972 * mpn/powerpc64/copy.S: New file.
15974 1999-12-02 Torbjorn Granlund <tege@swox.com>
15976 * mpn/sparc64/copy.s: New file.
15978 * mpn/tests/copy.c: New file.
15980 * mpn/configure.in: Recognize more Amd CPUs; Set special paths for
15983 * configure.in: Recognize Amd x86 CPUs.
15985 * mpz/fdiv_r_2exp.c: In rounding code, read in->_mp_size before
15986 writing to res->_mp_size.
15988 * mpn/powerpc64/*.S: Clean up assembly syntax, add function headers.
15989 * mpn/powerpc64/gmp-mparam.h: (KARATSUBA_MUL_THRESHOLD): #define.
15990 (KARATSUBA_SQR_THRESHOLD): #define.
15992 * mpn/tests/add_n.c (main): Only print test number if TIMES==1
15994 (main): Don't run reference code if NOCHECK.
15995 * mpn/tests/sub_n.c: Likewise.
15996 * mpn/tests/mul_1.c: Likewise.
15997 * mpn/tests/addmul_1.c: Likewise.
15998 * mpn/tests/submul_1.c: Likewise.
16000 * mpn/tests/lshift.c: (main): Only print test number if TIMES==1
16002 * mpn/tests/rshift.c: Likewise.
16004 1999-11-22 Torbjorn Granlund <tege@swox.com>
16006 * gmp.h (mpz_init_set_str): Declare using __gmp_const.
16007 (mpz_set_str): Likewise.
16008 (mpf_init_set_str): Likewise.
16009 (mpf_set_str): Likewise.
16010 (mpn_set_str): Likewise.
16011 (__gmp_0): Likewise.
16012 (mpn_divrem): Remove separate declaration; it's defined later in
16015 * gmp.h: Replace "defined (__STD__)' by (__STDC__-0) in
16016 expressions involving more than one term, to handle Sun's compiler
16017 that most helpfully sets __STDC__ to 0.
16018 * gmp-impl.h: Likewise.
16019 * longlong.h: Likewise.
16021 1999-11-21 Torbjorn Granlund <tege@swox.com>
16023 * mpn/sparc64/gmp-mparam.h (KARATSUBA_MUL_THRESHOLD): #define.
16024 (KARATSUBA_SQR_THRESHOLD): #define.
16026 * mpn/sparc64/lshift.s: Compensate stack references for odd stack ptr.
16027 * mpn/sparc64/rshift.s: Likewise.
16029 * mpn/sparc64/addmul_1.s: Propagate carry properly.
16030 * mpn/sparc64/submul_1.s: Likewise.
16032 * mpn/sparc64/sub_n.s: Rewrite.
16034 * mpn/sparc64/sub_n.s: Get operand order for main subcc right
16035 (before scrapping this code for new code).
16037 1999-11-20 Torbjorn Granlund <tege@swox.com>
16039 * mpn/sparc64/add_n.s: Rewrite.
16041 1999-11-17 Torbjorn Granlund <tege@swox.com>
16043 * mpn/x86/syntax.h (PROLOG): New #define.
16044 (EPILOG): New #define.
16046 * gmp.h (mpn_addsub_n): Declare.
16047 * gmp.h (mpn_add_nc): Declare.
16048 * gmp.h (mpn_sub_nc): Declare.
16049 * mpn/powerpc64/addsub_n.S: New file.
16051 1999-11-17 Torbjorn Granlund <tege@swox.com>
16053 * mpn/alpha/gmp-mparam.h
16054 (KARATSUBA_MUL_THRESHOLD): Only #define #ifndef.
16055 (KARATSUBA_SQR_THRESHOLD): Likewise.
16057 1999-11-14 Torbjorn Granlund <tege@swox.com>
16059 * mpn/x86/mul_1.S: Unroll and optimize for P6 and K7.
16061 1999-11-09 Torbjorn Granlund <tege@swox.com>
16063 * mpn/x86/p6/gmp-mparam.h
16064 (KARATSUBA_MUL_THRESHOLD): Only #define #ifndef.
16065 (KARATSUBA_SQR_THRESHOLD): Likewise.
16067 1999-11-05 Torbjorn Granlund <tege@swox.com>
16069 * mpn/generic/addsub_n.c: New file.
16071 1999-11-02 Torbjorn Granlund <tege@swox.com>
16073 * config.guess: Handle alpha:FreeBSD with alpha:NetBSD.
16075 * configure.in (vax*-*-*): New case.
16076 * config/mt-vax: New file.
16077 * mpn/vax/add_n.s: Rewrite.
16078 * mpn/vax/sub_n.s: Rewrite.
16080 1999-10-31 Torbjorn Granlund <tege@swox.com>
16082 * mpn/vax/rshift.s: New file.
16083 * mpn/vax/lshift.s: New file.
16085 1999-10-29 Torbjorn Granlund <tege@swox.com>
16087 * config.sub: Handle k5 and k6.
16088 * mpn/configure.in: Recognize k6.
16090 * mpf/tests/t-get_d.c (LOW_BOUND, HIGH_BOUND): New #defines.
16091 (main): Tighten error bounds to 14 digits.
16093 * longlong.h (default umul_ppmm, when smul_ppmm exists):
16094 Rename __m0 => __xm0, __m1 => __xm1.
16095 (default smul_ppmm): Likewise.
16097 1999-10-11 Torbjorn Granlund <tege@swox.com>
16099 * config.guess: Reverse the test for POWER vs PowerPC.
16100 * config.guess (sun4m:SunOS:5.*:*): New case.
16101 * config.guess (sun4u:SunOS:5.*:*): New case.
16103 1999-09-29 Torbjorn Granlund <tege@swox.com>
16105 * mpn/generic/divrem_2.c: Clean up comments.
16107 1999-09-23 Torbjorn Granlund <tege@swox.com>
16109 * mpz/tests/Makefile.in: Use move-if-change when generating binaries.
16110 * mpf/tests/Makefile.in: Likewise.
16111 * mpq/tests/Makefile.in: Likewise.
16112 * mpz/tests/move-if-change: New file.
16113 * mpf/tests/move-if-change: New file.
16114 * mpq/tests/move-if-change: New file.
16116 * gmp.h (mpn_incr_u): New macro (from mpn/generic/mul_n.c).
16117 (mpn_decr_u): New macro.
16119 * mpn/generic/mul_n.c (mpn_incr): Delete.
16120 * mpn/generic/mul_n.c: Update usages mpn_incr => mpn_incr_u.
16121 * mpn/generic/divrem_newt.c: Use mpn_incr_u and mpn_decr_u instead of
16122 mpn_add_1 and mpn_sub_1.
16123 * mpn/generic/sqrtrem.c: Likewise.
16124 * mpz/cdiv_q_ui.c: Likewise.
16125 * mpz/cdiv_qr_ui.c: Likewise.
16126 * mpz/fdiv_q_ui.c: Likewise.
16127 * mpz/fdiv_qr_ui.c: Likewise.
16129 * mpn/generic/sqrtrem.c: Start single-limb Newton iteration from 18
16132 1999-07-27 Torbjorn Granlund <tege@swox.com>
16134 * mpn/generic/divrem_1.c (__gmpn_divrem_1n): New function.
16136 * mpn/generic/divrem_2.c: New file, code from divrem.c, `case 2:'.
16137 * mpn/Makefile.in: Compile divrem_2.c.
16138 * make.bat: Compile divrem_2.c.
16139 * mpn/configure.in (functions): Add divrem_2.
16140 * gmp.h: Declare mpn_divrem_2.
16142 * mpn/generic/divrem.c: Delete special cases, handle just divisors
16143 of more than 2 limbs.
16144 * gmp.h (mpn_divrem): Call mpn_divrem_1, mpn_divrem_2, as appropriate.
16146 * mpn/generic/divrem.c: Rework variable usage for better register
16149 1999-07-26 Torbjorn Granlund <tege@swox.com>
16151 * mpn/alpha/ev5/add_n.s: Rewrite for better ev6 speed.
16152 * mpn/alpha/ev5/sub_n.s: Likewise.
16154 1999-07-21 Torbjorn Granlund <tege@swox.com>
16156 * longlong.h (alpha): Define umul_ppmm for cc.
16158 * gmp-impl.h (DItype, UDItype): Define for non-gcc if _LONGLONG is
16161 1999-07-15 Torbjorn Granlund <tege@swox.com>
16163 * longlong.h (powerpc64 count_leading_zeros): Fix typo.
16164 (powerpc64 add_ssaaaa): Fix typos.
16165 (powerpc64 sub_ddmmss): Fix typos.
16167 1999-07-14 Torbjorn Granlund <tege@swox.com>
16169 * mpz/tests/Makefile.in: Pass XCFLAGS when linking.
16170 * mpf/tests/Makefile.in: Likewise.
16171 * mpq/tests/Makefile.in: Likewise.
16172 * mpn/Makefile.in (.S.o): Pass XCFLAGS.
16174 * longlong.h: Add support for 64-bit PowerPC.
16175 * config.sub: Handle "powerpc64".
16176 * configure.in: Likewise.
16177 * mpn/configure.in: Suppress use of config/t-ppc-aix for now,
16178 it seems compiler passes proper options.
16179 * mpn/powerpc64/*.S: New files.
16181 * Makefile.in (FLAGS_TO_PASS): Pass "AR=$(AR)".
16183 1999-07-07 Torbjorn Granlund <tege@swox.com>
16185 * demos/pexpr.c (factor): Change alloca call to a malloc/free pair.
16187 * mpn/powerpc32/syntax.h: Add #define's for crN.
16189 * gmp.h (gmp_rand_algorithm): Remove spurious `,'.
16191 1999-07-05 Torbjorn Granlund <tege@swox.com>
16193 * mpn/generic/divrem_1.c: Normalize divisor when needed.
16195 1999-07-02 Torbjorn Granlund <tege@swox.com>
16197 * mpn/configure.in (powerpc*-apple-mach): New configuration.
16198 * mpn/powerpc32/*: Add support for apple-macho syntax.
16199 * mpn/powerpc32/syntax.h: New file.
16200 * gmp-impl.h: Don't use `__attribute__' syntax for Apple's perversion
16203 1999-05-26 Linus Nordberg <linus@swox.se>
16205 * rand.c (gmp_rand_init): Fix typo.
16207 * mpn/generic/rawrandom.c (mpn_rawrandom): Count bits, not limbs,
16208 to keep track of how many rounds to do in loop. Clean up
16209 temporary allocation. Update `seedsize' inside loop. Mask off
16210 the correct number of bits from final result. Init `mcopyp' even
16211 when not normalizing `m'.
16213 * randlc.c (gmp_rand_init_lc): Fix typo (don't call
16214 mpz_init_set_ui()).
16216 * mpn/generic/rawrandom.c (mpn_rawrandom): Set SIZ(s->seed) when
16219 * tests/rand/Makefile (test, bigtest): Add 33-bit tests.
16221 * tests/rand/gen.c (main): Set precision of variable passed to
16222 mpf_urandomb(). Add option `-p'.
16224 1999-05-25 Linus Nordberg <linus@swox.se>
16226 * randcm.c: Remove.
16227 * randcmui.c: Remove.
16228 * Makefile.in: Remove randcm and randcmui.
16230 * gmp-impl.h: Remove prototypes for __gmp_rand_init_common() and
16231 __gmp_rand_init_common_ui().
16232 * randlc.c (gmp_rand_init_lc): Don't call
16233 __gmp_rand_init_common().
16235 * randlcui.c (gmp_rand_init_lc_ui): Don't call
16236 __gmp_rand_init_common_ui().
16238 * gmp.h (__gmp_rand_state_struct): Remove unused member `maxval'.
16239 * randclr.c (gmp_rand_clear): Remove reference to s->maxval.
16240 * randcm.c (__gmp_rand_init_common): Ditto
16242 * mpn/generic/rawrandom.c (mpn_rawrandom): Don't calculate nlimbs
16245 * gmp.h (__gmp_rand_dist): Remove.
16247 1999-05-24 Linus Nordberg <linus@swox.se>
16249 * mpn/generic/rawrandom.c: Clean up comments.
16251 * gmp.texi: Add documentation for random number generation.
16253 1999-05-21 Linus Nordberg <linus@swox.se>
16255 * gmp.h: Typedef `gmp_rand_state' as an array with one element.
16256 Change prototypes accordingly.
16257 * gmp-impl.h: Change prototypes using `gmp_rand_state'.
16258 * rand.c (gmp_rand_init): Take `gmp_rand_state' as argument
16259 instead of a pointer to a `gmp_rand_state'.
16260 * mpf/urandom.c (mpf_urandomb): Ditto.
16261 * mpz/urandom.c (mpz_urandomb): Ditto.
16262 * mpn/generic/rawrandom.c (mpn_rawrandom): Ditto.
16263 * randcmui.c (__gmp_rand_init_common_ui): Ditto.
16264 * randlc.c (gmp_rand_init_lc): Ditto.
16265 * randlcui.c (gmp_rand_init_lc_ui): Ditto.
16266 * randui.c (gmp_rand_init_ui): Ditto.
16267 * randcm.c (__gmp_rand_init_common): Ditto.
16268 * randclr.c (gmp_rand_clear): Ditto.
16270 * tests/rand/gen.c (main): Pass `s' to rand-funcs instead of address
16273 1999-05-20 Linus Nordberg <linus@swox.se>
16275 * Makefile.in: Rename randi.c --> rand.c, randi_lc.c --> randlc.c,
16276 randicom.c --> randcm.c. Add randui.c, randcmui.c, randlcui.c.
16279 * gmp.h: Add prototypes for gmp_rand_init_ui() and
16280 gmp_rand_init_lc_ui().
16281 * gmp-impl.h: Add prototypes for __gmp_rand_init_common() and
16282 __gmp_rand_init_common_ui().
16284 * randlc.c, randcm.c, randclr.c, rand.c: Change #include of
16285 <gmp.h> to "gmp.h".
16286 * randclr.c: Include stdlib.h for free().
16287 * rand.c: Include gmp-impl.h.
16289 1999-05-12 Torbjorn Granlund <tege@swox.com>
16291 * mpn/configure.in: Put generic m68k alternative last.
16293 1999-05-04 Torbjorn Granlund <tege@swox.com>
16295 * demos/pexpr.c (setup_error_handler): Use sigemptyset to create
16296 empty set (for portability).
16297 (fns): Fix typo '#if #if'.
16298 (mpz_eval_expr): Implement FERMAT and MERSENNE.
16300 * demos/pexpr.c: Cast longjmp argument via long to silent warnings on
16303 1999-05-03 Torbjorn Granlund <tege@swox.com>
16305 * demos/pexpr.c: Add #defines for GMP 1.x and 2.0 compatibility.
16307 * demos/pexpr.c (setup_error_handler): New function; take signal
16308 handler setup code from main(), with major modifications to use modern
16310 (main): Remove signal handler setup code; call setup_error_handler.
16312 1999-04-29 Linus Nordberg <linus@swox.se>
16314 * tests/rand/findcl.c (main): Add option '-i' for interval factor.
16315 Separate v and merit lose figures. Add '-v' for version.
16317 1999-04-28 Linus Nordberg <linus@swox.se>
16319 * tests/rand/statlib.c: Change debugging stuff.
16321 * tests/rand/gmpstat.h: Add debug values definitions.
16323 * tests/rand/findcl.c (main): Print low and high merit on startup.
16324 Print version string on startup. Catch SEGV and HUP. Add option -d
16325 for debug. Fix bug making test for v too hard.
16326 (sh_status): New function.
16327 (sh_status): Flush stdout. Add RCSID.
16329 1999-04-27 Linus Nordberg <linus@swox.se>
16331 * tests/rand/Makefile (clean): Add target.
16333 1999-04-27 Linus Nordberg <linus.nordberg@canit.se>
16335 * tests/rand/stat.c: Include gmpstat.h.
16336 Add global int g_debug.
16338 * tests/rand/spect.c: Include <unistd.h>.
16340 * tests/rand/findcl.c (main): Input is `m', not all factors of `m'.
16341 Print only the very first matching multiplier. Include <unistd.h>.
16342 Flush stdout. Print "done." when done.
16344 * tests/rand/spect.c: Move everything but main() to statlib.c.
16346 * tests/rand/findcl.c: New file.
16348 * tests/rand/gmpstat.h: New file.
16350 * tests/rand/statlib.c (merit, merit_u, f_floor, vz_dot,
16351 spectral_test): New functions.
16353 1999-04-27 Torbjorn Granlund <tege@swox.com>
16355 * mpn/configure.in: Fix typo, "sparc-*)" was "sparc)".
16357 1999-04-21 Torbjorn Granlund <tege@swox.com>
16359 * config.sub: Recognize ev6.
16361 1999-04-12 Linus Nordberg <linus.nordberg@canit.se>
16363 * urandom.c: Split up into randclr.c, randi.c, randi_lc.c,
16365 * randclr.c, randi.c, randi_lc.c, randicom.c: New files.
16366 * Makefile.in: Remove urandom. Add randclr, randi, randi_lc,
16370 1999-03-31 Torbjorn Granlund <tege@matematik.su.se>
16372 * configure.in (sparc9-*-solaris2.[789]*, etc): New alternative.
16373 * mpn/configure.in: Use mt-sprc9 also for ultrasparc*-*-solaris2*.
16375 1999-03-30 Linus Nordberg <linus.nordberg@canit.se>
16377 * urandom.c (__gmp_rand_scheme): Change NULL->0.
16378 Include "gmp.h" instead of <gmp.h>.
16380 1999-03-29 Linus Nordberg <linus.nordberg@canit.se>
16382 * gmp.h (__gmp_rand_data_lc): Now holds a, c, m instead of scheme
16384 (__gmp_rand_lc_scheme_struct): Remove mpz_t's `a' and `m'.
16386 * tests/rand/stat.c (f_freq): Don't print 2nd level results if doing
16389 * tests/rand/gen.c (main): Set default algorithm to mpz_urandomb.
16390 (main): Add option -c.
16392 1999-03-24 Linus Nordberg <linus.nordberg@canit.se>
16394 * tests/rand/Makefile (GMPINC): Rename to GMPH.
16395 (GMPH): Add gmp-mparam.h.
16396 (CFLAGS): Add -I$(GMPLIBDIR)/mpn
16398 1999-03-23 Linus Nordberg <linus.nordberg@canit.se>
16400 * Makefile.in: Compile top-dir/urandom.c.
16403 * mpn/Makefile.in: Compile rawrandom.c.
16406 * mpn/configure.in (functions): Add rawrandom.
16408 * gmp.h (__gmp_rand_scheme_struct): Rename to
16409 __gmp_rand_lc_scheme_struct.
16410 (__gmp_rand_data_lc): Remove member 'n'. Allocate a
16411 __gmp_rand_lc_scheme_struct instead of a pointer to one.
16412 Add prototype for gmp_rand_init_lc(), mpn_rawrandom().
16413 New prototype for mpz_urandomb().
16415 * urandom.c: New file.
16416 (__gmp_rand_init_common): New function.
16417 (gmp_rand_init_lc): New function.
16418 (gmp_rand_init): Don't init data_lc->n. Call gmp_rand_init_lc()
16419 and __gmp_rand_init_common().
16420 (gmp_rand_clear): Remove reference to data_lc->n.
16422 * mpz/urandom.c (gmp_rand_init, gmp_rand_clear): Move to new file
16423 urandom.c in top-dir.
16424 (mpz_urandomb): Add function parameter nbits. Call mpn_rawrandom().
16426 * mpf/urandom.c (mpf_urandomb): Call mpn_rawrandom().
16428 * mpn/generic/rawrandom.c: New file.
16429 (mpn_rawrandom): New function.
16431 1999-03-17 Torbjorn Granlund <tege@matematik.su.se>
16433 * extract-dbl.c: When packing result, adjust exp when sc == 0.
16435 * mpf/tests/t-get_d.c: New file.
16436 * mpf/tests/Makefile.in: Compile t-get_d.c.
16438 1999-03-16 Linus Nordberg <linus.nordberg@canit.se>
16440 * mpz/urandom.c (__gmp_rand_scheme): Add extra braces around the
16443 * make.bat: Compile mpz/urandom.c and mpf/urandom.c
16445 * tests/rand/statlib.c (ks_table): Use mpf_pow_ui() and exp().
16447 * tests/rand/gen.c: Include unistd.h for getopt.
16449 1999-03-15 Linus Nordberg <linus.nordberg@canit.se>
16451 * mpz/urandom.c (gmp_rand_init): New function.
16452 (gmp_rand_clear): New function.
16453 (mpz_urandomb): New function.
16455 * mpz/Makefile.in: Compile urandom.c
16457 * mpf/urandom.c (mpf_urandomb): New function.
16459 * mpf/Makefile.in: Compile urandom.c.
16461 * gmp.h (__gmp_rand_state_struct, __gmp_rand_scheme_struct): New
16462 structs for randomization functions.
16463 (gmp_rand_dist, gmp_rand_alogrithm): New enums for randomization
16465 (mpz_urandomb, mpf_urandomb): Add prototype.
16466 (gmp_rand_init, gmp_rand_clear): Add prototype.
16468 * tests/rand/gen.c, stat.c, statlib.c, statlib.h: New files.
16469 * tests/rand/Makefile, tests/rand/ChangeLog: New files.
16471 1999-03-15 Torbjorn Granlund <tege@matematik.su.se>
16473 * .gdbinit: New file.
16475 * mpz/dump.c: New file.
16476 * mpz/Makefile.in: Compile dump.c.
16477 * make.bat: Likewise.
16478 * gmp.h (mpz_dump): Declare.
16480 1999-03-14 Torbjorn Granlund <tege@matematik.su.se>
16482 * mpz/tests/reuse.c: Also test mpz_invert and mpz_divexact.
16484 * mpz/tests/convert.c: Update to GMP 2 variable syntax.
16486 1999-03-13 Torbjorn Granlund <tege@matematik.su.se>
16488 * mpf/README: New file.
16489 * mpz/README: New file.
16491 * mpf/pow_ui.c: New file.
16492 * mpf/Makefile.in: Compile pow_ui.c.
16493 * make.bat: Likewise.
16494 * gmp.h (mpf_pow_ui): Declare.
16496 1999-03-12 Torbjorn Granlund <tege@matematik.su.se>
16498 * mpn/configure.in: Stage 1 of rewrite.
16499 * mpn/underscore.h: New name for bsd.h.
16500 * mpn/sysv.h: Deleted.
16502 * mpn/m68k/*: Don't include sysdep.h.
16504 * mpn/pa64/README: New file.
16506 1999-03-11 Torbjorn Granlund <tege@matematik.su.se>
16508 * mpn/powerpc32/add_n.S: Add support for both AIX and ELF syntax.
16510 * mpn/powerpc32/sub_n.S: Likewise.
16511 * mpn/powerpc32/lshift.S: Likewise.
16512 * mpn/powerpc32/rshift.S: Likewise.
16513 * mpn/powerpc32/mul_1.S: Likewise.
16514 * mpn/powerpc32/addmul_1.S: Likewise.
16515 * mpn/powerpc32/submul_1.S: Likewise.
16517 * mpn/powerpc32/umul.S: New file.
16518 * mpn/sparc32/v8/umul.S: New file.
16519 * mpn/sparc32/umul.S: New file.
16520 * mpn/x86/umul.S: New file.
16521 * mpn/x86/udiv.S: New file.
16523 * mpn/Makefile.in (mul_basecase.o): Delete rule.
16525 1999-02-22 Torbjorn Granlund <tege@matematik.su.se>
16527 * configure.in (hppa2.0*-*-*): Force use of GCC.
16529 * extract-dbl.c: Handle IEEE denormalized numbrs. Clean up.
16531 1998-12-02 Torbjorn Granlund <tege@matematik.su.se>
16533 * mpn/Makefile.in (CCAS): New macro.
16537 * mpn/Makefile.in (mul_basecase.o): Add dependency.
16538 (sqr_basecase.o): Likewise.
16539 (mod_1.o): Likewise.
16541 * demos/pexpr.c (cputime): Test also __hpux.
16542 (cleanup_and_exit): Check SIGXCPU only #ifdef LIMIT_RESOURCE_USAGE.
16544 * mpz/tests/t-2exp.c: Use urandom, not random.
16546 * mpn/configure.in (arm*-*-*): New alternative.
16548 1998-11-30 Torbjorn Granlund <tege@matematik.su.se>
16550 * gmp-impl.h (union ieee_double_extract): Special case for
16552 (LIMBS): Alias for PTR.
16554 1998-11-26 Torbjorn Granlund <tege@matematik.su.se>
16556 * longlong.h (m68000 umul_ppmm): Use `muluw', not `mulu'.
16557 (m68k stuff): Clean up; add coldfire support.
16559 1998-11-23 Torbjorn Granlund <tege@matematik.su.se>
16561 * mpn/mips3/gmp-mparam.h (KARATSUBA_MUL_THRESHOLD): #define.
16562 (KARATSUBA_SQR_THRESHOLD): #define.
16564 * mpn/sparc32/v9/README: New file.
16566 1998-11-20 Torbjorn Granlund <tege@matematik.su.se>
16568 * mpn/x86/README: New file.
16570 * mpn/arm/gmp-mparam.h: New file.
16571 * mpn/pa64/gmp-mparam.h: New file.
16572 * mpn/hppa/gmp-mparam.h: New file.
16573 * mpn/x86/pentium/gmp-mparam.h: New file.
16574 * mpn/sparc32/v9/gmp-mparam.h: New file.
16575 * mpn/powerpc32/gmp-mparam.h: New file.
16576 * mpn/x86/p6/gmp-mparam.h: New file.
16578 * mpn/alpha/gmp-mparam.h (KARATSUBA_MUL_THRESHOLD): #define.
16579 (KARATSUBA_SQR_THRESHOLD): #define.
16581 * mpn/configure.in: Point to x86/p6 when appropriate.
16583 * mpn/power/umul.s: New file.
16584 * mpn/power/sdiv.s: New file.
16585 * mpn/pa64/addmul_1.S: New file.
16586 * mpn/pa64/submul_1.S: New file.
16587 * mpn/pa64/mul_1.S: New file.
16588 * mpn/pa64/udiv_qrnnd.c: New file.
16589 * mpn/pa64/umul_ppmm.S: New file.
16590 * mpn/mips2/umul.s: New file.
16591 * mpn/m68k/mc68020/umul.s: New file.
16592 * mpn/m68k/mc68020/udiv.s: New file.
16593 * mpn/hppa/hppa1_1/umul.s: New file.
16594 * mpn/alpha/umul.s: New file.
16595 * mpn/a29k/udiv.s: New file.
16596 * mpn/a29k/umul.s: New file.
16598 1998-11-17 Torbjorn Granlund <tege@matematik.su.se>
16600 * mpn/x86/mul_basecase.S: New file for non-pentiums.
16601 * mpn/x86/mul_basecase.S: Move to mpn/x86/pentium.
16603 1998-11-16 Torbjorn Granlund <tege@matematik.su.se>
16605 * make.bat: Compile mul_basecase.c and sqr_basecase.c.
16607 1998-11-10 Torbjorn Granlund <tege@matematik.su.se>
16609 * mpz/invert.c: Defer writing to parameter `invert' until
16612 1998-11-03 Torbjorn Granlund <tege@matematik.su.se>
16614 * mpn/pa64/udiv_qrnnd.c: Handle more border cases.
16616 1998-10-29 Torbjorn Granlund <tege@matematik.su.se>
16618 * insert-dbl.c: Special case biased exponents < 1; Get boundary for
16621 * longlong.h (COUNT_LEADING_ZEROS_NEED_CLZ_TAB): New #define.
16623 1998-10-28 Torbjorn Granlund <tege@matematik.su.se>
16625 * mpn/powerpc32/submul_1.s: Rewrite, optimizing for PPC604.
16626 * mpn/powerpc32/addmul_1.s: Likewise.
16627 * mpn/powerpc32/lshift.s: Likewise.
16629 1998-10-23 Torbjorn Granlund <tege@matematik.su.se>
16631 * config/mt-sprc9-gcc (XCFLAGS): Add -Wa,-xarch=v8plus.
16633 * mpn/sparc32/v9/submul_1.s: New file.
16635 1998-10-21 Torbjorn Granlund <tege@matematik.su.se>
16637 * mpn/config/mt-pa2hpux: New file.
16638 * mpn/configure.in (hppa2.0*-*-*): Use new 64-bit code.
16640 * config.sub: Recognize hppa2.0 as CPU type.
16642 * longlong.h (64-bit hppa): Add umul_ppmm and udiv_qrnnd.
16643 * mpn/pa64/mul_1.S: New file.
16644 * mpn/pa64/addmul_1.S: New file.
16645 * mpn/pa64/submul_1.S: New file.
16646 * mpn/pa64/umul_ppmm.S: New file.
16647 * mpn/pa64/udiv_qrnnd.c: New file.
16649 1998-10-20 Torbjorn Granlund <tege@matematik.su.se>
16651 * mpz/pprime_p.c: Pass 1L, not 1, to mpz_cmp_ui.
16653 * mpz/fdiv_q_2exp.c: Cast `long' argument to `mp_limb_t' for mpn calls.
16654 * mpz/gcd_ui.c: Likewise.
16655 * mpz/add_ui.c: Likewise.
16656 * mpz/sub_ui.c: Likewise.
16658 1998-10-19 Torbjorn Granlund <tege@matematik.su.se>
16660 * mpn/generic/bdivmod.c: Avoid using switch statement with mp_limb_t
16663 1998-10-17 Torbjorn Granlund <tege@matematik.su.se>
16665 * mpn/sparc32/v9/mul_1.s: Misc cleanups.
16666 * mpn/sparc32/v9/addmul_1.s: Misc cleanups.
16668 1998-10-16 Torbjorn Granlund <tege@matematik.su.se>
16670 * mpn/tests/{add,sub,}mul_1.c: Print xlimb using mpn_print.
16672 * mpz/tests/t-powm.c (SIZE): Increase to 50.
16673 (EXP_SIZE): New parameter; use it for computing exp_size.
16675 1998-10-15 Torbjorn Granlund <tege@matematik.su.se>
16677 * mpn/generic/divrem_newt.c: Use TMP_ALLOC interface.
16679 * mpn/generic/sqrtrem.c: Check BITS_PER_MP_LIMB before defining
16680 assembly variants of SQRT.
16682 1998-10-14 Torbjorn Granlund <tege@matematik.su.se>
16684 * mpn/tests: Clean up timing routines. Don't include longlong.h
16685 where it is not needed.
16686 (mpn_print): Handle printing when _LONG_LONG_LIMB.
16687 * mpn/tests/{add,sub,}mul_1.c: Generate xlimb with mpn_random2
16688 and do it whether TIMES != 1 or not.
16690 * mpn/generic/mul_n.c: Delay assignment of `sign' for lower
16693 * mpn/sparc32/v9/mul_1.s: New file.
16695 * config/mt-sprc9-gcc: New file.
16696 * configure.in: Use it.
16698 * mpn/configure.in: Use sparc64 for Solaris 2.7 and later with a
16700 * mpn/configure.in: Use sparc32/v9 for Solaris 2.6 or earlier with
16703 * mpf/sub.c: In initial code for ediff == 0, limit precision
16704 before jumping to `normalize'.
16706 1998-10-13 Torbjorn Granlund <tege@matematik.su.se>
16708 * mpn/hppa/hppa2_0/add_n.s: New file.
16709 * mpn/hppa/hppa2_0/sub_n.s: New file.
16710 * mpn/configure.in: Handle hppa2.0 (32-bit code for now).
16712 * config.guess: Update from egcs 1.1.
16713 (9000/[3478]??:HP-UX:*:*): Properly return 2.0 for all known 2.0
16716 1998-10-07 Torbjorn Granlund <tege@matematik.su.se>
16718 * mpz/root.c (mpz_root): New file.
16719 * mpz/Makefile.in: Compile it.
16720 * make.bat: Likewise.
16721 * gmp.h (mpz_root): Declare.
16723 * mpz/perfpow.c: New file.
16724 * mpz/Makefile.in: Compile it.
16725 * make.bat: Likewise.
16726 * gmp.h (mpz_perfect_power_p): Declare.
16728 * mpz/remove.c: New file.
16729 * mpz/Makefile.in: Compile it.
16730 * make.bat: Likewise.
16731 * gmp.h (mpz_remove): Declare.
16733 * mpz/bin_ui.c: New file.
16734 * mpz/Makefile.in: Compile it.
16735 * make.bat: Likewise.
16736 * gmp.h (mpz_bin_ui): Declare.
16738 * mpz/bin_uiui.c: New file.
16739 * mpz/Makefile.in: Compile it.
16740 * make.bat: Likewise.
16741 * gmp.h (mpz_bin_uiui): Declare.
16743 1998-09-16 Torbjorn Granlund <tege@matematik.su.se>
16745 * longlong.h: Test for __powerpc__ in addition to _ARCH_PPC.
16747 Sat Sep 5 17:22:28 1998 Torbjorn Granlund <tege@matematik.su.se>
16749 * mpf/cmp_si.c: Compare most significant mantissa limb before
16750 trying to deduce anything from the limb count.
16751 * mpf/cmp_ui.c: Likewise.
16753 Tue Aug 18 10:24:39 1998 Torbjorn Granlund <tege@matematik.su.se>
16755 * mpz/pprime_p.c (mpz_probab_prime_p): Add new code block
16756 for doing more dividing.
16758 Sat Aug 15 18:43:17 1998 Torbjorn Granlund <tege@matematik.su.se>
16760 * mpn/generic/divrem_newt.c: New name for divrem_newton.c.
16761 * mpn/Makefile.in: Corresponding changes.
16762 * mpn/configure.in: Likewise.
16764 Wed Aug 12 23:07:09 1998 Torbjorn Granlund <tege@matematik.su.se>
16766 * config.guess: Handle powerpc for NetBSD.
16768 Tue Jul 28 23:10:55 1998 Torbjorn Granlund <tege@matematik.su.se>
16770 * mpz/fib_ui.c: New file.
16771 * mpz/Makefile.in: Compile it.
16772 * make.bat: Likewise.
16773 * gmp.h (mpz_fib_ui): Declare.
16775 Wed Jun 17 22:52:58 1998 Torbjorn Granlund <tege@matematik.su.se>
16777 * make.bat: Fix typo, `asm-synt.h' => `asm-syntax.h'.
16779 Wed Jun 3 11:27:32 1998 Torbjorn Granlund <tege@matematik.su.se>
16781 * config/mt-pwr: New file.
16782 * config/mt-ppc: New file.
16783 * configure.in: Use the new files.
16785 Tue Jun 2 13:04:17 1998 Torbjorn Granlund <tege@matematik.su.se>
16787 * mpn/sparc32/v9/addmul_1.s: New file.
16788 * mpn/config/mt-sprc9: New file.
16789 * mpn/configure.in: Use mt-sprc9.
16791 Tue May 26 11:24:18 1998 Torbjorn Granlund <tege@matematik.su.se>
16793 * demos/factorize.c (factor_using_pollard_rho): Pass correct
16794 parameters in recursive calls; join the two recursion arms.
16796 * mpf/set_q.c: Set result sign.
16797 When normalizing the numerator, don't allow it to increase in size
16800 Tue May 19 17:28:14 1998 Torbjorn Granlund <tege@matematik.su.se>
16802 * demos/factorize.c (factor_using_division): Call fflush
16803 also for the factor 2.
16805 Mon May 18 15:51:01 1998 Torbjorn Granlund <tege@matematik.su.se>
16807 * make.bat: Pass -fomit-frame-pointer. Do not pass -g.
16809 Tue May 5 01:42:50 1998 Torbjorn Granlund <tege@matematik.su.se>
16811 * mpz/Makefile.in (LOCAL_CC): Remove definition.
16813 * gmp.h: Get rid of GMP_SMALL stuff.
16814 * mpz/Makefile.in: Likewise.
16815 * mpq/Makefile.in: Likewise.
16816 * mpf/Makefile.in: Likewise.
16818 * mpz/invert.c: Fix typo in comment.
16820 Mon May 4 23:05:32 1998 Torbjorn Granlund <tege@matematik.su.se>
16822 * mpn/generic/sqrtrem.c: Check that __arch64__ is not defined
16823 before defining sparc SQRT.
16825 Mon Apr 20 19:16:17 1998 Torbjorn Granlund <tege@matematik.su.se>
16827 * mpn/generic/gcdext.c: Allow gp to be NULL.
16829 1998-04-03 Torbjorn Granlund <tege@matematik.su.se>
16831 * mpn/configure.in: Recognize `alphaev5*', not `alphaev5'.
16833 * config.guess: Handle CPU variants for NetBSD.
16835 Mon Mar 16 13:07:54 1998 Torbjorn Granlund <tege@matematik.su.se>
16837 * mpz/pprime_p.c: Use mpn_mod_1/mpn_preinv_mod_1 for computing mod PP,
16838 not mpz_tdiv_r_ui (which expects an `unsigned long').
16839 (mpz_probab_prime_p): Change type of `r' to mp_limb_t.
16841 Thu Mar 12 17:19:04 1998 Torbjorn Granlund <tege@matematik.su.se>
16843 * gmp.h (mpf_ceil, mpf_floor, mpf_trunc): Add declarations.
16845 * config.guess: Update from FSF version.
16846 * config.sub: Likewise.
16848 * config.guess: Add special handling of alpha-*-NetBSD.
16850 Wed Mar 11 00:55:34 1998 Torbjorn Granlund <tege@matematik.su.se>
16852 * mpz/inp_str.c: Update from set_str.c.
16853 Properly increment `nread' when skipping minus sign.
16855 * mpz/set_str.c: Check for empty string after having skipped
16858 Mon Mar 9 19:28:00 1998 Torbjorn Granlund <tege@matematik.su.se>
16860 * mpz/set_str.c: Skip leading zeros.
16862 Wed Mar 4 19:29:16 1998 Torbjorn Granlund <tege@matematik.su.se>
16864 * gmp.h (mpz_cmp_si): Cast argument before calling mpz_cmp_ui.
16866 * demos/factorize.c: Rewrite.
16868 1998-02-04 Torbjorn Granlund <tege@matematik.su.se>
16870 * configure.in (i[3456]86* etc): Check if using gcc before
16873 * configure.in (m68*-*-*): New alterantive.
16874 * config/mt-m68k: New file.
16876 * mpn/alpha/invert-limb.s: Put tables in text segment,
16877 since not all systems support "rdata".
16879 Wed Feb 4 02:20:57 1998 Torbjorn Granlund <tege@matematik.su.se>
16881 * gmp.h (__GNU_MP_VERSION_SNAP): New #define.
16882 (__GNU_MP_VERSION_MINOR): Now 1.
16884 Wed Jan 28 22:29:36 1998 Torbjorn Granlund <tege@tunnis.tmg.se>
16886 * longlong.h (alpha udiv_qrnnd): #define UDIV_NEEDS_NORMALIZATION.
16888 Wed Jan 28 20:28:19 1998 Torbjorn Granlund <tege@sophie.matematik.su.se>
16890 * mpz/pprime_p.c (mpz_probab_prime_p): Delete 59 from tried divisors.
16892 Mon Jan 26 01:39:02 1998 Torbjorn Granlund <tege@tunnis.tmg.se>
16894 * mpz/pprime_p.c (mpz_probab_prime_p): Major overhaul: Check small
16895 numers specifically; check small factors, then perform a fermat test.
16897 Tue Jan 13 14:58:28 1998 Torbjorn Granlund <tege@tunnis.tmg.se>
16899 * longlong.h (alpha udiv_qrnnd): Call __mpn_invert_normalized_limb
16900 and udiv_qrnnd_preinv.
16902 Wed Jan 7 01:52:54 1998 Torbjorn Granlund <tege@tunnis.tmg.se>
16904 * mpn/configure.in (alpha*, extra_functions): Add invert-limb and
16907 * mpn/tests/divrem.c: Get allocations right.
16909 * mpn/generic/divrem.c: Conditionally pre-invert most significant
16912 Tue Jan 6 23:08:54 1998 Torbjorn Granlund <tege@tunnis.tmg.se>
16914 * mpn/generic/divrem_1.c: Rename variables to comply to conventions.
16915 Make `i' have type `mp_size_t'.
16917 Tue Dec 30 22:21:42 1997 Torbjorn Granlund <tege@matematik.su.se>
16919 * mpz/tdiv_qr_ui.c: Return the remainder.
16920 * mpz/tdiv_r_ui.c: Likewise.
16921 * mpz/tdiv_q_ui.c: Likewise.
16922 * gmp.h: Change return type of mpz_tdiv_qr_ui, mpz_tdiv_r_ui,
16925 * mpz/tdiv_ui.c: New file.
16926 * mpz/Makefile.in: Compile it.
16927 * make.bat: Likewise.
16928 * gmp.h (mpz_tdiv_ui): Declare.
16930 Fri Nov 7 04:21:15 1997 Torbjorn Granlund <tege@matematik.su.se>
16932 * mpf/integer.c (FUNC_NAME): Fix bogus test for mpf_trunc.
16934 * demos/isprime.c: New file.
16936 Sat Nov 1 19:32:25 1997 Torbjorn Granlund <tege@matematik.su.se>
16938 * mpz/cmp_abs.c: New file.
16939 * mpz/Makefile.in: Compile it.
16940 * make.bat: Likewise.
16941 * gmp.h (mpz_cmp_abs): Declare.
16943 * mpz/cmp_abs_ui.c: New file.
16944 * mpz/Makefile.in: Compile it.
16945 * make.bat: Likewise.
16946 * gmp.h (mpz_cmp_abs_ui): Declare.
16948 Sat Sep 27 04:49:52 1997 Torbjorn Granlund <tege@tunnis.tmg.se>
16950 * mpz/fdiv_r_2exp.c: Get allocation for `tmp' right.
16952 * mpz/fdiv_q_2exp.c: In final result adjustment code, handle
16953 that intermediate result is zero.
16955 * mpz/tests/t-2exp.c: New file.
16956 * mpz/tests/Makefile.in: Handle t-2exp.c.
16958 Fri Sep 26 16:29:21 1997 Torbjorn Granlund <tege@tunnis.tmg.se>
16960 * mpz/divexact.c: Fix typo in test for whether to copy numerator to
16961 quotient and move that statement to after handling quotient and
16962 denominator overlap. Misc cleanups.
16964 * mpn/generic/gcd.c: Change count argument of mpn_lshift/mpn_rshift
16965 calls to `unsigned int'.
16966 * mpz/divexact.c: Likewise.
16968 Mon Sep 22 02:19:52 1997 Torbjorn Granlund <tege@pro.tmg.se>
16970 * mpz/tests/t-powm.c: Decrease `reps' to 2500.
16972 * mpz/tests/t-pow_ui.c: New file.
16973 * mpz/tests/Makefile.in: Handle t-pow_ui.c.
16975 * mpz/ui_pow_ui.c: Get special cases for exponent and base right.
16977 * mpz/pow_ui.c: Increase temp space allocation by 1 limb.
16978 Split `rsize' into two variables; compute space allocation into
16981 Sun Sep 7 04:15:12 1997 Torbjorn Granlund <tege@pro.tmg.se>
16983 * mpn/pa64/lshift.s: New file.
16984 * mpn/pa64/rshift.s: New file.
16985 * mpn/pa64/sub_n.s: New file.
16987 Sat Sep 6 19:14:13 1997 Torbjorn Granlund <tege@gmp.tmg.se>
16989 * mpn/pa64/add_n.s: New file.
16990 * mpn/pa64: New directory.
16992 Tue Aug 19 16:17:09 1997 Torbjorn Granlund <tege@pro.tmg.se>
16994 * mpz/swap.c: New file.
16995 * mpz/Makefile.in: Compile it.
16996 * make.bat: Likewise.
16997 * gmp.h (mpz_swap): Declare.
16999 * mpn/generic/mul_n.c: Push assignment of x and y pointers into the
17000 if/else clauses in several places. (Decreases register pressure.)
17002 Mon Aug 18 03:29:50 1997 Torbjorn Granlund <tege@pro.tmg.se>
17004 * mpn/thumb/add_n.s: New file.
17005 * mpn/thumb/sub_n.s: New file.
17006 * mpn/arm/add_n.s: New file.
17007 * mpn/arm/sub_n.s: New file.
17009 * mpz/powm.c: After mpn_mul_n and mpn_mul calls, adjust product size
17010 if most significant limb is zero.
17011 * mpz/powm_ui.c: Likewise.
17013 Fri Aug 15 02:13:57 1997 Torbjorn Granlund <tege@pro.tmg.se>
17015 * mpn/arm/m/mul_1.s: New file.
17016 * mpn/arm/m/addmul_1.s: New file.
17018 * mpn/powerpc32/mul_1.s: Rewrite.
17020 * mpn/alpha/mul_1.s: Prefix labels with `.'.
17022 Mon Aug 11 02:37:16 1997 Torbjorn Granlund <tege@pro.tmg.se>
17024 * mpn/powerpc32/add_n.s: Rewrite.
17025 * mpn/powerpc32/sub_n.s: Rewrite.
17027 Sun Aug 10 17:07:15 1997 Torbjorn Granlund <tege@pro.tmg.se>
17029 * mpn/powerpc32/addmul_1.s: Delete obsolete comments.
17030 * mpn/powerpc32/submul_1.s: Likewise.
17032 Fri Jul 25 20:07:54 1997 Torbjorn Granlund <tege@pro.tmg.se>
17034 * mpz/addmul_ui.c: New file.
17035 * mpz/Makefile.in: Compile it.
17036 * make.bat: Likewise.
17037 * gmp.h (mpz_addmul_ui): Declare.
17039 * mpz/setbit.c: Add missing code after final `else'.
17041 Tue Jul 22 17:45:01 1997 Torbjorn Granlund <tege@tunnis.tmg.se>
17043 * mpn/sh/add_n.s: Fix typo.
17044 * mpn/sh/sub_n.s: Likewise.
17046 * longlong.h (ns32k count_trailing_zeros): Fix typo.
17048 * insert-dbl.c: Check for exponent overflow and return Inf.
17050 * mpz/get_d.c: Rewrite to avoid rounding errors.
17052 Thu May 29 11:51:07 1997 Torbjorn Granlund <tege@pro.tmg.se>
17054 * mpq/add.c: Swap some usages of tmp1 and tmp2 to make sure
17055 their allocation suffices.
17056 * mpq/sub.c: Likewise.
17058 Wed Apr 16 02:24:25 1997 Torbjorn Granlund <tege@pro.tmg.se>
17060 * demos/pexpr.c: New file.
17062 * mpn/generic/mul_n.c: Misc optimizations from Robert Harley.
17064 * gmp-impl.h (MPZ_PROVOKE_REALLOC): New #define.
17066 Sat Apr 12 17:54:04 1997 Torbjorn Granlund <tege@pro.tmg.se>
17068 * mpz/tstbit.c: New file.
17069 * mpz/Makefile.in: Compile it.
17070 * make.bat: Likewise.
17071 * gmp.h (mpz_tstbit): Declare.
17073 * mpz/tests/logic.c: Use MPZ_CHECK_FORMAT.
17074 * mpz/tests/bit.c: New test.
17075 * mpz/tests/Makefile.in: Handle bit.c.
17077 * mpz/ior.c: In -OP2,+OP1 case, normalize OP2 after call to mpn_sub_1.
17079 * gmp-impl.h (MPZ_CHECK_FORMAT): New #define.
17081 Thu Apr 10 00:30:14 1997 Torbjorn Granlund <tege@tmg.se>
17083 * longlong.h (POWER/PowerPC): Test _ARCH_PWR instead of _IBMR2.
17085 Wed Apr 9 18:23:31 1997 Torbjorn Granlund <tege@pro.tmg.se>
17087 * gmp-impl.h: Move defaulting of UMUL_TIME and UDIV_TIME from here...
17088 * longlong.h: ...to here.
17090 Sun Mar 30 12:16:23 1997 Torbjorn Granlund <tege@matematik.su.se>
17092 * mpn/generic/next_prime.c: New file.
17094 * mpn/generic/perfsqr.c: Remove definitions of PP and PP_INVERTED.
17095 * gmp-impl.h: Put them here.
17097 Fri Mar 28 08:18:05 1997 Torbjorn Granlund <tege@matematik.su.se>
17099 * gmp-impl.h (MPN_COPY_INCR, MPN_COPY_DECR): Define as inline asm for
17100 for x86, but leave disabled for now.
17102 Fri Feb 28 02:39:47 1997 Torbjorn Granlund <tege@matematik.su.se>
17104 * mpn/Makefile.in (.S.o): Pass SFLAGS and CFLAGS also to compiler
17105 for assembly phase.
17106 (.s.o): Pass SFLAGS.
17108 Wed Feb 26 06:46:08 1997 Torbjorn Granlund <tege@matematik.su.se>
17110 * mpn/configure.in: For Pentium Pro, use default code, not Pentium
17113 * mpn/x86/addmul_1.S: Unroll and optimize for Pentium Pro.
17114 * mpn/x86/submul_1.S: Likewise.
17116 Thu Feb 13 08:26:09 1997 Torbjorn Granlund <tege@matematik.su.se>
17118 * mpf/Makefile.in: Compile floor.o, ceil.o and trunc.o (from
17120 * make.bat: Likewise.
17122 Wed Feb 5 05:58:44 1997 Torbjorn Granlund <tege@matematik.su.se>
17124 * mpn/configure.in (alpha*): Add cntlz to extra_functions.
17126 Wed Feb 4 03:30:45 1997 Torbjorn Granlund <tege@matematik.su.se>
17128 * mpf/integer.c: New file (supporting mpf_floor, mpf_ceil, mpf_trunc).
17130 Mon Feb 3 14:21:36 1997 Torbjorn Granlund <tege@matematik.su.se>
17132 * make.bat: Fix typo, set_dfl_prc => set_dfl_prec.
17134 Sun Feb 2 02:34:33 1997 Torbjorn Granlund <tege@matematik.su.se>
17136 * mpf/out_str.c: After outputting `-', decrement n_digits.
17138 Wed Jan 8 02:50:20 1997 Torbjorn Granlund <tege@quiet.matematik.su.se>
17140 * mpn/generic/divrem.c: qextra_limbs => qxn.
17142 Wed Dec 18 07:50:46 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17144 * mpz/tests/t-tdiv.c (SIZE): Increase to 200.
17146 Tue Dec 17 19:32:48 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17148 * mpn/generic/divrem.c (mpn_divrem_classic): New name for mpn_divrem.
17149 * gmp.h (mpn_divrem): New function.
17150 * mpn/generic/divrem_newton.c: New file.
17151 * mpn/configure.in (functions): Add divrem_newton.
17152 * make.bat: Likewise.
17154 Thu Dec 12 17:55:13 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17156 * gmp.h (_GMP_H_HAVE_FILE): Test also __dj_include_stdio_h_.
17158 Sat Dec 7 09:40:06 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17160 * mpn/alpha/invert-limb.s: New file.
17162 Thu Dec 5 01:25:31 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17164 * mpz/ui_pow_ui.c (mpz_pow2): New (static) function.
17165 (mpz_ui_pow_ui): Rewrite.
17167 * make.bat: `pre_mod_1.c' => `pre_mod_.c'. Fix typo in path to
17170 Fri Nov 15 00:49:55 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17172 * mpz/ui_pow_ui.c: Rewrite for better speed.
17174 Fri Nov 1 16:36:56 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17176 * Makefile.in (recursive make rules): Use `&&' instead of `;' as
17179 Fri Oct 25 17:12:36 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17181 * gmp-impl.h (Cray/uxp MPN_COPY): Really declare as inline.
17183 Thu Oct 24 15:08:19 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17185 * mpn/fujitsu/rshift.c: Fix typo in loop boundaries.
17187 Fri Oct 18 03:13:54 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17189 * mpn/configure.in: Recognize `nextstep' for m68k variants; likewise
17192 * mpn/x86/syntax.h (INSND): New macro.
17193 * mpn/x86/[lr]shift.S: Use INSND.
17194 * mpn/x86/pentium/[lr]shift.S: Likewise.
17195 * mpn/config/t-oldgas (SFLAGS): Pass -DOLD_GAS.
17197 * gmp-impl.h: In code for determining endianess, test also
17198 __BIG_ENDIAN__ and __hppa__. Remove test of __NeXT__.
17200 Wed Oct 16 03:50:34 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17202 * mpf/set_str.c: Let `prec' determine precision used in
17203 exponentiation code; decrease allocation accordingly.
17205 * mpn/vax: Change `jsob*' to `sob*' in all files.
17207 Tue Oct 15 03:54:06 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17209 * longlong.h (m88110 udiv_qrnnd): Change type of intermediate quotient
17210 to DImode (divu.d generates a 64-bit quotient).
17212 * configure.in (m88110*): Fix typo.
17214 * mpf/get_str.c: Compute exp_in_base using `double' to avoid overflow.
17216 * gmp-impl.h (struct bases): Change type of chars_per_bit_exactly from
17218 * mpn/mp_bases.c (__mp_bases): Give 17 digits for chars_per_bit_exactly
17221 * mpf/get_str.c: Let `prec' determine precision used in
17222 exponentiation code; decrease allocation accordingly.
17224 Sun Oct 13 03:31:53 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17226 * longlong.h: Major cleanup.
17227 (__udiv_qrnnd_c): Compute remainders using multiply and subtract,
17228 not explicit `%' operator.
17229 (C umul_ppmm): Get rid of a redundant __ll_lowpart.
17231 * mpz/invert.c: Properly detect all operands that would yield an
17232 undefined inverse; make sure the inverse is always positive.
17234 * mpz/xor.c: New file.
17235 * mpz/Makefile.in: Compile it.
17236 * make.bat: Likewise.
17237 * gmp.h (mpz_xor): Declare.
17239 * mpz/tests/logic.c: Also test mpz_xor.
17241 * mpz/lcm.c: Special case for when either operand equals 0.
17243 Sat Oct 12 01:57:09 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17245 * mpn/generic/gcd.c (find_a): Don't inline on x86.
17247 * Makefile.in (CFLAGS): Default to just `-g'.
17249 * configure.in: Recognize 386 and 486 wherever other x86 cpus are
17251 * configure.in: Use mt-x86 for all x86 cpus.
17252 * config/mt-x86: New file.
17254 * mpn/alpha/cntlz.s: New file.
17256 Tue Oct 8 00:16:18 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17258 * longlong.h: Define smul_ppmm for Fujitsu vpp/uxp.
17259 Rewrite umul_ppmm to actually work on the hardware.
17261 * mpn/x86/sub_n.S: Avoid parens around displacement of `leal'.
17262 * mpn/x86/add_n.S: Likewise.
17264 * mpn/x86/syntax.h (R): Define differently depending on __STDC__.
17266 Mon Oct 7 16:48:08 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17268 * longlong.h: Don't test for __NeXT__ in outer 68k conditional;
17269 add test for __m68k__.
17271 Sun Oct 6 00:59:09 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17273 * gmp.h: Declare mpn_random.
17274 * make.bat: Compile mpn/generic/random.c.
17276 * longlong.h: Define umul_ppmm for Fujitsu vpp/uxp.
17278 * gmp-impl.h: Protect definitions using `__attribute__ ((mode (...)))'
17279 with test also for __GNUC_MINOR__.
17281 * gmp.h: Don't define macros using __builtin_constant_p when using
17284 Fri Oct 4 16:53:50 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17286 * mpz/lcm.c: New file.
17287 * mpz/Makefile.in: Compile it.
17288 * make.bat: Likewise.
17289 * gmp.h (mpz_lcm): Declare.
17291 Wed Sep 25 00:06:21 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17293 * mpq/tests/t-cmp_ui.c: Make sure numerator and denominator of `b' is
17294 within limits of an `unsigned long int'.
17296 * mpz/tests/t-powm_ui.c: Change type of exp2 to `unsigned long int'.
17298 Tue Sep 24 18:58:20 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17300 * mpz/powm_ui.c: Make result always positive.
17302 * urandom.h (urandom): Make it return mp_limb_t.
17304 * gmp-impl.h (CNST_LIMB): New macro.
17305 * mpn/mp_bases.c: Use CNST_LIMB.
17306 * mpn/generic/hamdist.c (popc_limb): Likewise.
17307 * mpn/generic/popcount.c (popc_limb): Likewise.
17308 * mpn/generic/perfsqr.c: Likewise.
17310 Fri Sep 20 03:08:10 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17312 * mpz/pprime_p.c: When n <= 3, don't clear out n before using it.
17314 Wed Sep 18 11:22:45 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17316 * mpn/fujitsu/mul_1.c: New file.
17317 * mpn/fujitsu/addmul_1.c: New file.
17318 * mpn/fujitsu/sub_n.c: New file.
17319 * mpn/fujitsu/add_n.c: Mew file.
17321 Sun Sep 15 03:13:02 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17323 * mpn/generic/random.c: New file.
17324 * mpn/configure.in (functions): Add `random'.
17326 * gmp-impl.h (MPN_COPY): Define as annotated inline function for
17327 Crays and Fujitsu VPPs.
17329 * gmp.h (mp_size_t): Define as `int' for non-MPP Cray.
17330 (mp_exp_t): Likewise.
17332 * configure.in: Add support for Fujitsu VPP machines.
17333 * mpn/configure.in: Likewise.
17334 * config.guess: Likewise.
17335 * config.sub: Likewise.
17337 * mpn/fujitsu/rshift.c: New file.
17338 * mpn/fujitsu/lshift.c: New file.
17339 * mpn/fujitsu: New directory, for Fujitsu VPP machines.
17341 Wed Sep 11 11:34:38 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17343 * mpn/generic/mul_n.c (__gmpn_mul_n): New name for impn_mul_n.
17344 Call __gmpn_mul_basecase, not impn_mul_n_basecase; update parameter
17345 list to work with __gmpn_mul_basecase.
17346 (__gmpn_sqr): New name for impn_sqr_n.
17347 Call __gmpn_sqr_basecase, not impn_sqr_n_basecase; update parameter
17348 list to work with __gmpn_sqr_basecase.
17349 (mpn_mul_n): Update calls to match new names and parameter conventions.
17350 * gmp-impl.h (MPN_MUL_N_RECURSE): Likewise.
17351 (MPN_SQR_RECURSE): New name for MPN_SQR_N_RECURSE.
17352 Update calls to match new names and parameter conventions.
17353 * mpn/generic/mul.c: Never perform multiply explicitly here, call
17354 __gmpn_mul_basecase instead.
17355 Update calls to match new names and parameter conventions.
17357 * mpn/x86/mul_basecase.S: New file.
17358 * mpn/generic/mul_basecase.c: New file.
17359 * mpn/generic/sqr_basecase.c: New file.
17361 Wed Sep 4 02:59:21 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17363 * mpz/set_str.c: Let `0b' and `0B' mean base 2.
17365 Fri Aug 30 00:44:00 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17367 * longlong.h (x86 umul_ppmm): Work around GCC bug that was
17368 triggered by Aug 28 change.
17370 * mpbsd/min.c (digit_value_in_base): New function.
17372 * mpz/set_str.c: Refine allocation size computation, use
17373 chars_per_bit_exactly instead of chars_per_limb.
17375 * mpbsd/Makefile.in (.c.o): Add -D_mpz_realloc=_mp_realloc.
17377 Wed Aug 28 02:52:14 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17379 * longlong.h (x86 umul_ppmm): Don't cast result operands.
17380 (x86 udiv_qrnnd): Likewise.
17381 (default smul_ppmm): Fix typo, umul_ppmm => smul_ppmm.
17382 (default umul_ppmm): New #define using smul_ppmm.
17383 (vax smul_ppmm): New #define.
17384 (vax umul_ppmm): Delete.
17385 (POWER umul_ppmm): Delete.
17386 (IBM 370 smul_ppmm): New #define.
17387 (IBM 370 umul_ppmm): Delete.
17388 (IBM RT/ROMP smul_ppmm): New #define.
17389 (IBM RT/ROMP umul_ppmm): Delete.
17391 Tue Aug 27 01:03:25 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17393 * gmp-impl.h (__gmp_0): Make it `const'.
17395 * mpn/Makefile.in (clean mostlyclean): Comment out recursive clean
17398 * mpn/generic/mul.c: Identify when we do squaring, and call
17399 impn_sqr_n_basecase/impn_sqr_n as appropriate. Use
17400 KARATSUBA_MUL_THRESHOLD and KARATSUBA_SQR_THRESHOLD.
17401 Don't #define KARATSUBA_THRESHOLD.
17403 * mpn/generic/mul_n.c: Don't #define KARATSUBA_THRESHOLD.
17404 (impn_mul_n, impn_sqr_n): Rewrite, based on code contributed by
17406 (impn_sqr_n_basecase): Rewrite.
17408 * gmp-impl.h (KARATSUBA_MUL_THRESHOLD): New #define.
17409 (KARATSUBA_SQR_THRESHOLD): Likewise.
17410 (MPN_SQR_N_RECURSE): Use KARATSUBA_SQR_THRESHOLD.
17411 (MPN_MUL_N_RECURSE): Use KARATSUBA_MUL_THRESHOLD.
17413 * configure.in: Fix typo in last change.
17415 Mon Aug 26 22:25:18 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17417 * mpn/generic/random2.c: Fix typo, `alpha__' => `__alpha'.
17418 * mpf/random2.c: Likewise.
17420 Sun Aug 25 00:07:09 1996 Torbjorn Granlund <tege@quiet.matematik.su.se>
17422 * mpz/tests/t-mul.c: Also test squaring.
17424 Fri Aug 16 05:12:08 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17426 * mp_clz_tab.c (__clz_tab): Declare as `const'.
17427 * version.c (gmp_version): Likewise.
17428 * mpn/generic/sqrtrem.c (even_approx_tab, odd_approx_tab): Likewise.
17430 Thu Aug 15 02:34:47 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17432 * gmp.h: Fix typo, `mips__' => `__mips'.
17434 * mpf/set_str.c: Allow a number to start with a period, if next
17435 position contains a digit.
17437 Tue Aug 13 18:41:25 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17439 * mpz/gcdext.c: Get cofactor sign right for negative input operands.
17440 Clean up code for computing tt.
17442 * mpz/invert.c: Get rid of variable `rv'.
17444 * mpz/divexact.c: Test for zero divisor in special case for zero
17447 Mon Aug 12 18:04:07 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17449 * mpz/?div_*_ui.c: Special case for division by 0.
17450 * mpz/tdiv_q.c: Likewise.
17452 Sat Aug 10 14:45:26 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17454 * mpz/dmincl.c: Special case for division by 0.
17456 * mpz/tdiv_*_ui.c: Delete special case for dividend being 0; handle
17457 it when computing size after mpn_divmod_1 call.
17459 * mp_bpl.c: (__gmp_junk): New variable.
17460 (__gmp_0): New constant.
17462 * gmp-impl.h (DIVIDE_BY_ZERO): New #define.
17464 Fri Aug 9 20:03:27 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17466 * mpz/divexact.c: Test for dividend being zero before testing
17467 for small divisors.
17469 Thu Aug 8 13:20:23 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17471 * configure.in: Require operating system specification for cpus
17472 where assembly syntax differs between system.
17474 * Makefile.in (many targets): Change `-' action prefix to `@'.
17476 * mpn/Makefile.in: (distclean): Fix typo.
17478 * mpq/cmp_ui.c: Rename function to _mpq_cmp_ui.
17479 (mpq_cmp_ui): #undef deleted.
17480 * mpz/cmp_si.c: Rename function to _mpz_cmp_si.
17481 (mpz_cmp_si): #undef deleted.
17482 * mpz/cmp_ui.c: Rename function to _mpz_cmp_ui.
17483 (mpz_cmp_ui): #undef deleted.
17484 * Makefile.in: Corresponding changes.
17486 * mpf/get_prc.c: Return the *highest* precision achievable.
17488 * mpf/get_str.c: Complete rewrite.
17490 * mpf/set_str.c (swapptr): New #define.
17491 (assert): New #define.
17492 * mpf/set_str.c: Set prec to one more than the saved _mp_prec.
17495 * mpz/set_str.c: #include string.h.
17496 * mpf/out_str.c: #include string.h.
17497 * mpbsd/xtom.c: #include string.h and ctype.h.
17498 * mpbsd/mout.c: #include string.h.
17500 Wed Aug 7 11:46:04 EDT 1996 Ken Weber <kweber@mcs.kent.edu>
17502 * mpn/generic/gcd.c: Reorder mpn_gcd argument list.
17503 * mpz/gcd.c: Change call to mpn_gcd.
17504 * gmp.texi: Update manual entry on mpn_gcd.
17505 * mpn/generic/bdivmod.c: Delete limb cache to make mpn_bdivmod
17508 Wed Aug 7 02:15:38 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17510 * mpf/get_str.c: Rewrite code for converting integral part of a
17511 number with both an integral and fractional part.
17513 * mpf/set_str.c: Get rid of variable xxx. New variables madj and radj.
17514 In exp_in_base==0 case, add madj to msize for EXP field.
17516 * mpz/tests/t-gcd.c: Test deleted. Rename t-gcd2.c to t-gcd.c.
17517 Increase reps to 2000.
17518 * mpz/tests/t-gcd2.c: Get rid of mpz_refgcd.
17520 * mpf/set_str.c: Ignore excess limbs in MP,MSIZE.
17522 Thu Jul 25 04:39:10 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17524 * mpn/configure.in: Fix typo in setting path, "sparc" => "sparc32".
17526 Wed Jul 24 02:27:02 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17528 * mpn/generic/gcdext.c: Reorganize and clean up. Get rid of all
17529 signed limb arithmetic.
17531 Mon Jul 22 02:39:56 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17533 * mpn/generic/gcdext.c (mpn_gcdext): For large enough operands,
17534 work with most significant *two* limbs.
17535 (div2): New function (two variants).
17536 (THRESHOLD): New #define.
17538 * mpz/gcdext.c: Fix typo in MPZ_TMP_INIT call.
17540 * longlong.h (alpha UMUL_TIME): Now 30.
17541 (alpha UDIV_TIME): Now 350.
17542 (x86 UMUL_TIME): Now 10 (let Pentium decide).
17543 (SuperSPARC UDIV_TIME): Override default.
17545 * extract-dbl.c (MP_BASE_AS_DOUBLE): Don't redefine here.
17547 * extract-dbl.c: New name for extract-double.c.
17548 * insert-dbl.c: New name for insert-double.c.
17549 * Makefile.in: Corresponding changes.
17550 * make.bat: Likewise.
17552 * mpz/Makefile.in (.c.o): Don't pass non-portable `-f' to cp.
17553 * mpq/Makefile.in: Likewise.
17554 * mpf/Makefile.in: Likewise.
17556 Sat Jul 20 01:35:18 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17558 * mpz/getlimbn.c: Take ABS of integer->_mp_size.
17560 * mpz/divexact.c: Use mpn_divmod_1 if divisor is a single limb.
17562 Thu Jul 18 00:31:15 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17564 * mpn/generic/popcount.c (popc_limb): Use different masking trick
17565 for first step (due to David Seal).
17566 * mpn/generic/hamdist.c (popc_limb): Likewise.
17568 Wed Jul 17 23:21:48 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17570 * mpn/generic/divrem.c: In MPN_COPY_DECR call, copy dsize - 1 limbs.
17572 Sun Jul 14 17:47:46 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17574 * configure.in: Handle sparc9, sparc64, and ultrasparc like sparc8.
17576 Thu Jul 11 14:05:54 1996 J.T. Conklin <jtc@rtl.cygnus.com>
17578 * longlong.h (mc680x0): Define umul_ppmm, udiv_qrnnd, sdiv_qrnnd
17579 for the '020, '030, '040, and '332. Define count_leading_zeros
17580 for the '020, '030, '040, and '060.
17582 Sun Jul 14 15:24:53 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17585 * mpq/equal.c: Take ABS of num1_size before passing it to mpn_cmp.
17587 Fri Jul 12 17:11:17 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17589 * mpn/generic/sqrtrem.c (SQRT): New asm for x86, but leave it
17592 * mpn/generic/sqrtrem.c: Use MP_BASE_AS_DOUBLE.
17594 Wed Jul 10 03:17:45 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17596 * cre-mparam.c: Delete obsolete file.
17598 * gmp.h: #define _LONG_LONG_LIMB if __mips && _ABIN32.
17599 * longlong.h: Test __mips instead of __mips__.
17601 Sun Jul 7 23:19:13 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17603 * longlong.h (_PROTO): Define, unless already defined.
17604 (alpha __udiv_qrnnd): Declare using _PROTO.
17605 (hppa __udiv_qrnnd): Likewise.
17606 (sparc __udiv_qrnnd): Likewise.
17608 Mon Jul 1 01:44:30 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17610 * config.guess: Update from master version; add Cray x90 handling.
17612 Wed Jun 26 05:35:02 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17614 * mpn/power/add_n.s (__mpn_add_n): Work around GAS bug.
17615 * mpn/power/sub_n.s (__mpn_sub_n): Likewise.
17617 * insert-double.c: Rework loop to avoid potential overflow.
17619 * mpq/get_d.c: For vax, if qsize > N_QLIMBS, ignore excess limbs.
17621 * mpq/tests/t-get_d.c (SIZE): Special case for vax.
17623 * gmp.h (mpX_cmp_ui): #define also when ! __GNUC__.
17625 Mon Jun 24 17:13:21 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17627 * longlong.h (vax sdiv_qrnnd): Fix typo.
17629 Sat Jun 15 01:33:33 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17631 * gmp.h: Support `small' and `large' type and function variants,
17632 controlled by GMP_SMALL.
17634 * mpz/Makefile.in (.c.o): Compile each function twice, for small and
17636 (MPZS_OBJS): New variable.
17637 (libmpz.a): Include MPZS_OBJS in archive.
17638 * mpf/Makefile.in: Analogous changes.
17639 * mpq/Makefile.in: Analogous changes.
17641 * gmp.h: Prefix all functions with __gmp, to allow namespace-clean
17644 * mp.h: Rip out __MP_SMALL__ stuff.
17645 (__mpz_struct): mp_size_t => int.
17647 * mpz/invert.c: #include "gmp-impl.h".
17648 Use MPZ_TMP_INIT, not mpz_init.
17650 * mpz/gcdext.c: Rewrite to call mpn_gcdext.
17652 Fri Jun 14 18:05:29 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17654 * mpn/generic/gcdext.c (s0size): New parameter.
17655 * gmp.h (mpn_gcdext): Update prototype.
17657 * mpn/generic/gcdext.c: Major rewrite.
17659 Mon Jun 10 00:14:27 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17661 * mpn/generic/dump.c: Add missing `else'.
17663 Fri Jun 7 03:35:12 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17665 * Makefile.in (gmp_toc.html): Pass -expandinfo to texi2html.
17667 Thu Jun 6 19:00:53 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17669 * Version 2.0.2 released.
17671 * install.sh: New file.
17672 * Makefile.in (INSTALL): Use install.sh.
17673 (install-normal): New name for target `install'.
17674 (install): New dummy target.
17676 * mpz/pow_ui.c: Swap tests for (e == 0) and (bsize == 0).
17677 * mpz/ui_pow_ui.c: Swap tests for (e == 0) and (blimb == 0).
17679 * config/mt-linux (AR_FLAGS): New file.
17680 * configure.in: Use config/mt-linux for all linux systems.
17682 Tue Jun 4 03:42:18 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17684 * Version 2.0.1 released.
17686 * mpf/tests/ref.c: Cast result of TMP_ALLOC to the right pointer type.
17688 * extract-double.c: Test _GMP_IEEE_FLOATS with #if, not plain if.
17690 * insert-double.c: Don't #include stdlib.h.
17692 * gmp-impl.h (union ieee_double_extract): Test sparc and __sparc.
17693 Do not test __sparc__.
17695 * mpf/reldiff.c: Change declaration to work around irix5 compiler bug.
17696 * mpq/equal.c: Likewise.
17698 * mpn/generic/gcd.c: Delete spurious comma at end of enumeration.
17700 * mpn/generic/gcdext.c: Add K&R declaration syntax.
17701 * stack-alloc.h: Likewise.
17702 * insert-double.c: Likewise.
17703 * extract-double.c: Likewise.
17704 * mpf/tests/reuse.c: Likewise.
17705 * mpz/tests/reuse.c: Likewise.
17706 * mpf/tests/t-sub.c: Likewise.
17707 * mpf/tests/t-add.c: Likewise.
17708 * mpf/tests/t-muldiv.c: Likewise.
17709 * mpf/tests/t-conv.c: Likewise.
17710 * mpf/tests/ref.c: Likewise.
17712 * mpn/config/t-oldgas: Renamed from t-freebsd.
17713 * mpn/configure.in: Use t-oldgas for freebsd, netbsd, and some linux
17716 * mpn/powerpc32/mul_1.s: Really clear cy before entering loop.
17717 * mpn/powerpc32/*.s: Fix power/powerpc syntax issues.
17719 * mpn/config/t-ppc-aix: New file.
17720 * mpn/configure.in: Use t-ppc-aix for powerpc like t-pwr-aix for power.
17722 Wed May 29 02:07:31 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17724 * gmp.h (mp_bits_per_limb): Change qualifier from `const' to
17727 * gmp.h (mpf_init_set_str): Add `const' qualifier for 2nd parameter.
17728 * mpf/iset_str.c: Likewise.
17730 Mon May 27 00:15:58 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17732 * gmp-impl.h: Declare __gmp_extract_double.
17734 * mpz/set_q.c: Delete unused variables.
17736 * gmp.h (mpq_equal): Declare.
17738 * mpf/eq.c: mpf_cmp2 -> mpf_eq.
17740 Fri May 24 03:20:44 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17742 * mpz/iset_d.c: Don't include <math.h>.
17744 * insert-double.c (__gmp_scale2): New name for scal2.
17745 * mpz/get_d.c: Corresponding change.
17746 * mpf/get_d.c: Likewise.
17747 * mpq/get_d.c: Likewise.
17748 * gmp-impl.h: Declare __gmp_scale2.
17750 * mpn/generic/scan0.c: Clarify comment.
17752 * mpz/set_q.c: New file.
17753 * Makefile.in: Compile it.
17754 * make.bat: Likewise.
17755 * gmp.h: Declare mpz_set_q.
17757 * insert-double.c: New file.
17758 * Makefile.in: Compile it.
17759 * make.bat: Likewise.
17761 * mpz/get_d.c: New file.
17762 * mpz/Makefile.in: Compile it.
17763 * make.bat: Likewise.
17764 * gmp.h: Declare mpz_get_d.
17766 * mpf/get_d.c: New file.
17767 * mpf/Makefile.in: Compile it.
17768 * make.bat: Likewise.
17769 * gmp.h: Declare mpf_get_d.
17771 * make.bat: Compile things in alphabetical order.
17773 * gmp-impl.h (MP_BASE_AS_DOUBLE): New #define.
17774 (LIMBS_PER_DOUBLE): New #define.
17776 * extract-double.c: New file.
17777 * Makefile.in: Compile it.
17778 * make.bat: Likewise.
17779 * mpz/set_d.c: Rewrite to use __gmp_extract_double.
17780 * mpf/set_d.c: Likewise.
17782 * mpn/configure.in: Use t-pwr-aix also for aix 3.2.4 and up.
17784 Wed May 22 02:48:35 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17786 * gmp-impl.h: Rework code for defining ieee_double_extract.
17787 (IEEE_DOUBLE_BIG_ENDIAN): Macro removed.
17788 (_GMP_IEEE_FLOATS): New macro.
17789 * mpn/vax/gmp-mparam.h: Delete.
17791 * mpn/config/t-pwr-aix: New file.
17792 * mpn/configure.in: Use t-pwr-aix for aix 4 and later.
17794 Mon May 20 16:30:31 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17796 * gmp.h: In code for setting _GMP_H_HAVE_FILE, test more symbols.
17798 * mpf/tests/t-add.c (oo): Add some `l' printf modifiers.
17799 * mpf/tests/t-sub.c (oo): Likewise.
17800 * mpf/tests/t-conv.c (oo): Likewise.
17801 * mpf/tests/t-sqrt.c (oo): Likewise.
17803 * mpz/tests/t-mul.c (_mpn_mul_classic): Remove unused variables.
17805 * mpn/{pyr,i960,clipper}/*.s: Add missing copyright headers.
17807 Fri May 17 02:24:43 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17809 * mpz/set_d.c: Call _mpz_realloc.
17811 * mpq/set_z.c: New file.
17812 * mpq/Makefile.in: Compile it.
17813 * make.bat: Likewise.
17814 * gmp.h: Declare mpq_set_z.
17816 * mp?/Makefile.in (libmp?.a): Depend on Makefile, not Makefile.in.
17817 * mpf/Makefile.in (test): Delete spurious target.
17818 * mpq/Makefile.in (test): Likewise.
17820 * mpf/out_str.c: Use `e' to separate exponent when base <= 10.
17822 * mpn/configure.in: Treat ultrasparc just like sparc v8,
17823 until 64-bit compilers are ready.
17825 * mpf/set_d.c: Make it work for 64-bit machines.
17827 Thu May 16 20:53:57 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17829 * gmp-impl.h: Set IEEE_DOUBLE_BIG_ENDIAN to 0 for little-endian
17831 * mpn/x86/gmp-mparam.h: Delete file.
17833 * configure.in: Treat microsparc like sparc8.
17835 * urandom.h: Test __alpha instead of __alpha__, since the former
17836 is the standard symbol.
17837 * mpn/generic/random2.c: Likewise.
17838 * mpf/random2.c: Likewise.
17840 Tue May 14 13:42:39 1996 Torbjorn Granlund (tege@tiny.matematik.su.se)
17842 * mpz/set_f.c: New file.
17843 * mpz/Makefile.in: Compile it.
17844 * gmp.h: Declare mpz_set_f.
17846 * mpf/set_q.c: Simplify expression in rsize == nsize if-then-else arms.
17848 Tue May 14 13:03:07 1996 Torbjorn Granlund (tege@tiny.matematik.su.se)
17850 * make.bat: Add all new files.
17852 Sun May 12 22:24:36 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17854 * mpf/set_z.c: New file.
17855 * mpf/Makefile.in: Compile it.
17856 * gmp.h: Declare mpf_set_z.
17858 Sat May 11 19:26:25 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17860 * gmp.h: Declare mpf_set_q.
17862 * mpf/set_q.c: Compute prec-1 limbs in mpn_divrem call.
17864 Fri May 10 17:37:38 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17866 * mpf/set_q.c: New file.
17867 * mpf/Makefile.in: Compile it.
17869 * config.sub: Recognize sparc8.
17871 Wed May 8 09:19:11 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17873 * mpf/tests/t-dm2exp.c: New file.
17875 * mpf/tests/t-add.c: Correct header comment.
17876 * mpf/tests/t-sub.c: Likewise.
17877 * mpf/tests/t-sqrt.c: Likewise.
17879 * mpf/div.c: Misc variable name cleanups.
17880 * mpf/div_ui.c: Base more closely on mpf/div.c.
17881 * mpf/ui_div.c: Likewise.
17883 * mpz/tests/Makefile.in (check): Depend on Makefile.
17884 * mpq/tests/Makefile.in (check): Likewise.
17885 * mpf/tests/Makefile.in (check): Likewise.
17887 * mpf/tests/t-muldiv.c: New file.
17888 * mpf/tests/Makefile.in: Compile and run `t-muldiv'.
17889 (t-ref.o): Delete spurious rule.
17891 * mpf/sqrt.c: Properly detect negative input operand.
17893 * mpf/sqrt_ui.c: Delete spurious header comment.
17894 * mpf/sqrt.c: Likewise.
17895 * mpz/sqrt.c: Likewise.
17897 * mpz/tests/reuse.c (main): Read `reps' from command line.
17899 * mpf/tests/reuse.c: New file.
17900 * mpf/tests/Makefile.in: Compile and run `reuse'.
17902 * mpf/mul_ui.c: Disable code for removing low zero limbs.
17904 * mpf/div.c: Fix condition for when vp and qp overlaps.
17906 * mpf/add_ui.c: When sum equals u, copy up to prec+1 limbs.
17908 * mpf/out_str.c: Don't output '\n' after exponent.
17910 * mpf/add_ui.c: New special case for when U is completely cancelled.
17912 Wed Apr 24 05:33:28 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17914 * Version 2.0 released.
17916 * All files: Update FSF's address.
17918 * Makefile.in (gmp_toc.html): New name for gmp.html.
17919 (TAGS): Depend on force.
17921 * mpf/tests/t-conv.c: Pass -base to mpf_set_str.
17923 Sat Apr 20 03:54:06 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17925 * Makefile.in (ps): New target, depend on gmp.ps.
17927 Fri Apr 19 14:03:15 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17929 * mpf/out_str.c: Print `@' before exponent, not `e'.
17931 * make.bat: Update from Makefiles.
17933 Thu Apr 18 01:22:05 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17935 * mpf/set_str.c: If parameter `base' is negative, expect exponent
17936 to be decimal, otherwise in the same base as the mantissa.
17938 Wed Apr 17 17:28:36 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17940 * mpf/set_dfl_prec.c: Don't return anything.
17941 * gmp.h: Corresponding changes.
17943 * mpf/set_dfl_prec.c: Use `unsigned long int' for bit counts.
17944 * mpf/init2.c: Likewise.
17945 * mpf/get_prc.c: Likewise.
17946 * mpf/set_prc.c: Likewise.
17947 * mpf/set_prc_raw.c: Likewise.
17948 * mpz/popcount.c: Likewise.
17949 * mpz/hamdist.c: Likewise.
17950 * mpz/scan1.c: Likewise.
17951 * mpz/scan0.c: Likewise.
17952 * mpn/generic/popcount.c: Likewise.
17953 * mpn/generic/hamdist.c: Likewise.
17954 * mpn/generic/scan1.c: Likewise.
17955 * mpn/generic/scan0.c: Likewise.
17958 * mpf/eq.c: New file, based on mpf/diff.c.
17959 * mpf/diff.c: Delete.
17960 * mpf/Makefile.in: Corresponding changes.
17963 * mpf/reldiff.c: New file.
17964 * mpf/Makefile.in: Compile it.
17965 * gmp.h: Declare mpf_reldiff.
17967 * mpz/iset_d.c: New file.
17968 * mpz/Makefile.in: Compile it.
17969 * gmp.h: Declare mpz_init_set_d.
17971 Tue Apr 16 16:28:31 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17973 * Makefile.in (gmp.html): Pass -acc to texi2html.
17975 Mon Apr 15 16:20:24 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17977 * mpf/set_str.c: Switch off code for defaulting the base from the
17978 leading characters.
17980 * gmp.h (mp?_sign): Delete.
17981 (mp?_sgn): New macros.
17983 Fri Apr 12 17:23:33 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17985 * Makefile.in (gmp.dvi): Delete tmp.* at end of rule.
17987 Wed Apr 10 22:52:02 1996 Torbjorn Granlund (tege@tiny.matematik.su.se)
17989 * mpf/random2.c: Change of `exp' param, mp_size_t => mp_exp_t.
17990 * gmp.h: Corresponding change.
17992 * gmp.h (mp_bits_per_limb): Make it const.
17994 Sat Mar 30 01:20:23 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
17996 * configure.in: Re-enable recognition of with_gcc.
17998 * mpf/Makefile.in (.c.o): Pass XCFLAGS.
17999 * mpn/Makefile.in (.c.o): Likewise.
18000 * mpz/Makefile.in (.c.o): Likewise.
18001 * mpq/Makefile.in (.c.o): Likewise.
18002 * mpbsd/Makefile.in (.c.o): Likewise.
18003 * mpf/tests/Makefile.in (.c.o): Likewise.
18004 * mpz/tests/Makefile.in (.c.o): Likewise.
18005 * mpq/tests/Makefile.in (.c.o): Likewise.
18007 * Makefile.in (XCFLAGS): Default to empty.
18008 (FLAGS_TO_PASS): Pass on XCFLAGS.
18009 (.c.o): Pass XCFLAGS.
18011 * config/mt-m88110 (XCFLAGS): Define instead of CC.
18012 * config/mt-sprc8-gcc (XCFLAGS): Likewise.
18013 * config/mt-supspc-gcc (XCFLAGS): Likewise.
18015 * configure: Don't default CC to "gcc -O2" is -with-gcc=no was
18018 Mon Mar 25 01:07:54 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18020 * urandom.h: Test for __SVR4 in addition to __svr4__.
18022 * mp_bpl.c (mp_bits_per_limb): Declare as `const'.
18024 * Makefile.in (CFLAGS): `-O2' => `-O'.
18025 * mpn/Makefile.in (CFLAGS): Likewise.
18027 * gmp-impl.h: Get rid of obsolete field access macros.
18029 * mpn/mp_bases.c (__mp_bases): 1e39 => 1e38 to work around Solaris
18032 * gmp.h (__MPN): Make it work also for non-ANSI compilers.
18034 Thu Mar 21 01:07:54 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18036 * mpf/sub.c: New special case for ediff <= 1 before generic code.
18037 Simplify generic code for ediff == 0.
18038 Rename uexp => exp.
18040 Mon Mar 11 18:24:57 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18042 * mpf/tests/*.c: Use ref_mpf_sub for error calculation.
18043 * mpf/tests/Makefile.in: Link ref.o to all executables.
18045 * mpf/tests/t-sub.c: Make u = v + 1 with 50% probability.
18047 Sun Mar 10 21:03:17 1996 Torbjorn Granlund (tege@tiny.matematik.su.se)
18049 * mpf/get_str.c: In digit development loop for fractions, change
18050 loop condition from `<' to `<='.
18052 Thu Mar 7 04:58:11 1996 Torbjorn Granlund <tege@tiny.matematik.su.se>
18054 * mpn/mp_bases.c (__mp_bases): 1e100 => 1e39 to avoid overflow warning.
18056 Wed Mar 6 01:10:42 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18058 * mpf/tests/t-sqrt.c: New file.
18059 * mpf/tests/Makefile.in: Corresponding changes.
18061 * mpf/sqrt.c: Special case for square root of zero.
18063 * mpq/add.c: Clean up variable names.
18064 * mpq/sub.c: Update from mpq/add.c.
18066 * mpz/divexact.c: abs => ABS.
18067 * mpz/gcd.c: Likewise. Rewrite final fixup code, to decrease
18068 allocation. Misc cleanups.
18070 Tue Mar 5 22:24:56 1996 Torbjorn Granlund <tege@matematik.su.se>
18072 * mpn/configure.in: Recognize linuxoldld as a synonym for linuxaout.
18074 * gmp.h (mpn_add, mpn_add_1, mpn_sub, mpn_sub_1): Add prototypes.
18076 * mpn/configure.in: Use t-freebsd also for netbsd.
18078 Mon Mar 4 15:13:28 1996 Torbjorn Granlund <tege@matematik.su.se>
18080 * mpq/Makefile.in (cmp.o): Depend on longlong.h.
18082 * mpq/equal.c: New file.
18083 * mpq/Makefile.in: Corresponding changes.
18085 * mpf/tests/t-add.c: New file.
18086 * mpf/tests/t-sub.c: Renamed from t-addsub.c.
18087 * mpf/tests/ref.c: New file.
18088 * mpf/tests/Makefile.in: Corresponding changes.
18090 * gmp-impl.h (SIZ, ABSIZ, PTR, EXP, PREC, ALLOC): New #defines.
18092 Sun Mar 3 07:45:46 1996 Torbjorn Granlund <tege@matematik.su.se>
18094 * mpf/set_str.c: In exponentiation code, allocate 3 extra
18097 * mpf/get_str.c: Allocate sufficient space for tstr.
18098 When calculating exp_in_base, round result down.
18100 * mpf/tests/t-conv.c: New file.
18101 * mpf/tests/Makefile.in: Corresponding changes.
18103 * mp_bpl.c: New file.
18104 * gmp.h: Declare it.
18105 * Makefile.in: Corresponding changes.
18107 Sat Mar 2 06:27:56 1996 Torbjorn Granlund <tege@matematik.su.se>
18109 * mpf/set_prc_raw.c: New file.
18110 * mpf/set_prc.c: Renamed from set_prec.c.
18111 * mpf/get_prc.c: New file.
18112 * mpf/Makefile.in: Corresponding changes.
18113 * gmp.h: Declare new functions.
18115 * mpn/generic/gcdext.c: Add copyright header.
18117 Fri Mar 1 01:22:24 1996 Torbjorn Granlund <tege@matematik.su.se>
18119 * mpn/configure.in: For ppc601, search "power" before "powerpc32".
18121 * mp?/Makefile.in (AR_FLAGS): New variable.
18122 (libmp?.a): Use it.
18124 * make.bat: New file.
18125 * mpn/msdos: New directory.
18126 * mpn/msdos/asm-syntax.h: New file.
18128 * mpn/Makefile.in (distclean maintainer-clean): Delete asm-syntax.h.
18130 * config.sub: Recognize [ctj]90-cray.
18132 * mpn/configure.in: Recognize [ctj]90-cray-unicos*.
18134 * mpn/generic/gcdext.c: Don't use alloca directly, use TMP_* macros.
18136 * mpn/generic/gcd.c: Split increment from use of USIZE to avoid
18137 undefined behaviour.
18139 Thu Feb 29 04:11:24 1996 Torbjorn Granlund <tege@matematik.su.se>
18141 * Makefile.in (install-info-files): Update for new install-info
18144 * mpn/power/add_n.s: Rewrite.
18145 * mpn/power/sub_n.s: Rewrite.
18147 Wed Feb 28 01:34:30 1996 Torbjorn Granlund <tege@matematik.su.se>
18149 * mpz/pow_ui.c: Compute allocation more aggressively for small bases.
18150 * mpz/ui_pow_ui.c: Likewise.
18152 * mpn/mp_bases.c (__mp_bases): Put huge value in 2nd field for index 1.
18154 * mpn/generic/sqrtrem.c: sizeof (mp_limb_t) => BYTES_PER_MP_LIMB.
18155 * mpn/generic/gcd.c: Likewise.
18156 (SIGN_BIT): Compute differently.
18158 Mon Feb 26 00:07:36 1996 Torbjorn Granlund <tege@matematik.su.se>
18160 * All files: mp_limb => mp_limb_t, mp_limb_signed => mp_limb_signed_t.
18162 * Makefile.in (install, install-bsdmp, install-info-files): Depend
18163 on installdirs. chmod all installed files.
18165 Sun Feb 25 01:47:41 1996 Torbjorn Granlund <tege@matematik.su.se>
18167 * mpbsd/configure.in: Delete debugging code.
18169 * All Makefile.in: Update clean targets.
18171 * Makefile.in (AR_FLAGS): New variable.
18172 (libgmp.a): Use it.
18173 (libmp.a): Likewise.
18175 * VERSION: Delete file.
18177 * Makefile.in (installdirs): New target.
18178 * mkinstalldirs: New file (from the texinfo package).
18180 * Makefile.in (INSTALL, INSTALL_DATA, INSTALL_PROGRAM): New variables.
18181 (MAKEINFO, MAKEINFOFLAGS, TEXI2DVI): New variables.
18182 (install-info): New target.
18183 (install, install-bsdmp): Depend on install-info.
18184 ($(srcdir)/gmp.info): Changed from plain gmp.info; put info files
18185 into source directory.
18186 (distclean, mostlyclean): New targets.
18187 (maintainer-clean): New name for realclean.
18188 (uninstall): New target.
18189 (TAGS): New target.
18190 (info, dvi): New targets.
18193 * Makefile.in (install, install-bsdmp): Use INSTALL_DATA.
18195 * mp{n,z,f,bsd}/move-if-change: Delete.
18197 * mpbsd/Makefile.in (stamp-stddefh): Delete target.
18199 * Makefile.in (.c.o): Pass CFLAGS last.
18200 * mpbsd/Makefile.in (.c.o): Likewise.
18201 * mpf/Makefile.in (.c.o): Likewise.
18202 * mpq/Makefile.in (.c.o): Likewise.
18203 * mpz/Makefile.in (.c.o): Likewise.
18204 * mpn/Makefile.in (.c.o): Likewise.
18207 * memory.c: Change allocation error message.
18209 * Makefile.in (install): Prefix gmp.h with $(srcdir).
18210 (install-bsdmp): Prefix mp.h with $(srcdir).
18212 * mp{n,z,f,bsd}/{configure,config.sub}: Delete.
18214 * Makefile.in (gmp.dvi): Set TEXINPUTS also for 2nd tex invocation
18215 (install targets): Install gmp.info-N.
18217 Sat Feb 24 03:36:52 1996 Torbjorn Granlund <tege@matematik.su.se>
18219 * mpf/get_str.c: Fix typo.
18221 * mpz/legendre.c: Clarify expression with extra parens.
18223 * version.c (gmp_version): Not static.
18225 * mpf/iset_str.c: Properly return error code.
18227 * mpf/add.c: Delete unused variables.
18228 * mpf/inp_str.c: Likewise.
18229 * mpq/get_d.c: Likewise.
18231 * mpn/generic/dump.c: #include <stdio.h>.
18232 * mpf/dump.c: Likewise.
18233 * mpf/set_str.c: #include <ctype.h>.
18236 * gmp.h: mpn_sqrt => mpn_sqrtrem.
18238 * Makefile.in (clean, realclean): Clean in mpbsd.
18239 (check): Test in mpf.
18241 * mpf/Makefile.in (clean): Clean in tests.
18242 * mpq/Makefile.in (clean): Clean in tests.
18244 * mpf/tests/Makefile.in: New file.
18245 * mpf/tests/configure.in: New file.
18246 * mpf/tests/t-addsub.c: New file.
18248 * mpf/sub_ui.c: Simply call mpf_sub for now.
18250 * mpf/sub.c: Increase prec by 1.
18251 * mpf/ui_sub.c: Likewise.
18253 Fri Feb 23 00:59:54 1996 Torbjorn Granlund <tege@matematik.su.se>
18255 * mpf/ui_sub.c: Fix typos.
18257 * mpf/get_str.c: When allocating space for tmp, allow for an extra
18258 limb. In code for fraction conversion, add special case for bases
18259 that are a power of 2.
18261 * mpf/out_str.c: Output leading "0.".
18262 Default base to 10, before computing string allocation.
18264 * mpf/get_str.c: Make variables for string size have type size_t.
18265 * gmp.h: Corresponding change.
18267 * mpf/random2.c: Allow creation of prec+1 large mantissas.
18269 * mpf/add_ui.c: Don't abort if u < 0; special case for u <= 0.
18270 Fix typo in MPN_COPY offset.
18271 * mpf/sub_ui.c: Analogous changes.
18273 * mpf/set_prec.c: Rewrite.
18275 * mpf/init2.c: Compute precision as in set_prec.c.
18277 * mpf/div_2exp.c: Special case for u == 0.
18278 * mpf/mul_2exp.c: Likewise. Write r->_mp_size always.
18280 * mpf/sqrt_ui.c: mpn_sqrt => mpn_sqrtrem.
18281 * mpf/sqrt.c: Likewise. When computing new exponent, round quotient
18284 * mpf/add.c: Fix typos.
18285 * mpf/sub.c: Fix typos.
18287 Thu Feb 22 00:24:48 1996 Torbjorn Granlund <tege@matematik.su.se>
18289 * mpz/Makefile.in (stamp-stddefh): Delete target.
18290 (test): Delete target.
18291 * Makefile.in (stamp-stddefh): Delete target.
18292 (cre-stddefh.o): Delete target.
18293 (gmp.dvi): Set TEXINPUTS before invoking tex.
18295 * cre-stddefh.c: Delete.
18297 * mpz/sqrt.c: Fix typo.
18299 * mpz/powm.c: Special case for mod == 0.
18300 * mpz/powm_ui.c: Likewise.
18302 * mpz/get_si.c: Handle -0x80000000 correctly.
18304 * mpz/inp_str.c: Now returns size_t.
18305 Make it return number of bytes read or error indication.
18306 * mpf/inp_str.c: Likewise.
18308 * mpz/out_raw.c: Replace by mpz/out_binary.c, with modifications.
18309 * mpz/inp_raw.c: Rewrite, using mpz/inp_binary as a base.
18310 * mpz/inp_binary.c: Delete.
18312 * mpn/Makefile.in (XCFLAGS): Remove variable.
18313 (.c.o): Don't pass XCFLAGS.
18314 (SFLAGS): Set to nothing.
18315 (.S.o): Pass SFLAGS, not XCFLAGS.
18317 * mpn/config/t-freebsd (SFLAGS): New name for XCFLAGS.
18319 * mpf/out_str.c: Make return number of bytes written or error
18321 * mpz/out_str.c: Likewise.
18322 * gmp.h: Corresponding changes.
18324 * gmp.h (__mpz_struct): mp_size_t => int.
18325 (__mpq_struct): Likewise.
18326 (__mpf_struct): Likewise.
18327 (mp_size_t): int => long int.
18329 * mpn/cray: New directory.
18330 * mpn/cray/gmp-mparam.h: New file.
18331 * mpn/configure.in: Recognize cray variants.
18333 * Makefile.in: Set defaults for prefix, libdir, etc.
18334 (install): New target.
18335 (install-bsdmp): New target.
18336 (gmp.html): New target.
18338 * stack-alloc.c (__tmp_alloc): Cast void ptrs to char * in comparison.
18340 Wed Feb 21 04:35:02 1996 Torbjorn Granlund <tege@matematik.su.se>
18342 * gmp.h: Sort mpn declarations.
18343 (mpn_gcdext): Add declaration.
18345 * mpn/generic/divrem_1.c: New file.
18346 * mpn/Makefile.in (divrem_1.o): New rule.
18347 * configure.in (functions): Add divrem_1.
18349 * mpn/generic/divmod.c: Delete file.
18350 * mpn/configure.in (functions): Delete divmod.
18351 * Makefile.in (divmod.o): Delete rule.
18352 * gmp.h (mpn_divmod): New #define.
18354 * gmp.h (mpn_next_bit_set): Delete spurious declaration.
18356 * mpn/generic/divrem.c (default case): In code assigning
18357 most_significant_q_limb, move reassignment of n0 into if statement.
18359 * gmp.h (mpf_inp_str): Fix typo.
18360 (mpf_out_str): Make prototype match reality.
18361 * mpf/inp_str.c: New file.
18362 * mpf/out_str.c: New file.
18363 * mpf/Makefile.in: Compile new files.
18365 * mpn/Makefile.in (dump.o): Fix dependency path.
18366 (inlines.o): Likewise.
18368 * mpn/configure.in: Make m68060 be the same as m68000. Clean up
18371 Tue Feb 20 01:35:11 1996 Torbjorn Granlund <tege@matematik.su.se>
18373 * mpn/generic/sqrtrem.c: Renamed from sqrt.
18374 * mpn/configure.in (functions): Corresponding change.
18375 * mpn/Makefile.in: Likewise.
18376 * mpz/sqrtrem.c: Likewise.
18377 * mpz/sqrt.c: Likewise.
18378 * mpn/generic/perfsqr.c: Likewise.
18380 * Makefile.in (clean): Also remove libmp.a.
18381 Don't compile cre-conv-tab.c or mp_bases.c.
18382 cre-conv-tab.c: Delete file.
18383 (gmp.ps): New rule.
18385 * mpn/mp_bases.c: New file.
18386 * mpn/Makefile.in: Compile mp_bases.c.
18388 * mpz/set_str.c: Skip initial whitespace.
18389 * mpf/set_str.c: Likewise.
18390 * mpbsd/xtom.c: Likewise.
18392 * gmp.h: Add missing mpz declarations.
18393 Delete all formal parameter names from declarations.
18395 * mpn/Makefile.in: Add dependencies for .c files.
18397 * Makefile.in (check): Write recursive make calls separately, not as
18399 (FLAGS_TO_PASS): New variable. Use it for most recursive makes.
18401 Mon Feb 19 01:02:20 1996 Torbjorn Granlund <tege@matematik.su.se>
18403 * mpn/Makefile.in (.S.o): Pipe cpp output to grep in order to delete
18404 lines starting with #.
18405 (CPP): Set to $(CC) -E to avoid gcc dependency.
18407 * mpn/m68k/syntax.h (moveql): Define to moveq for MIT_SYNTAX.
18409 * mpn/hppa/hppa1_1/pa7100/addmul_1.S: Fix typo in s1_ptr alignment
18411 * mpn/hppa/hppa1_1/pa7100/submul_1.S: Likewise.
18413 * gmp.h: Fix typos in #defines of recently added mpn functions.
18415 * mpz/inp_str.c: Skip all whitespace, not just plain space.
18416 * mpbsd/min.c: Likewise.
18418 * mpn/configure.in (functions): Add gcdext.
18419 * mpn/generic/gcdext.c: New file.
18421 * mpz/legendre.c: mpz_div_2exp => mpz_tdiv_q_2exp.
18423 * gmp.h: Surround mpn declarations with extern "C" { ... }.
18425 * Makefile.in (check): New target.
18427 * mpq/get_d.c: Update comments. Use rsize instead of dsize + N_QLIMBS
18428 when possible. Add special case for nsize == 0.
18430 * gmp.h (mpq_get_d): Add declaration.
18431 (mpq_canonicalize): Likewise.
18432 (mpq_cmp_ui): Likewise.
18433 (mpf_diff): Likewise.
18434 (mpf_ui_sub): Likewise.
18435 (mpf_set_prec): Likewise.
18436 (mpf_random2): Likewise.
18438 * gmp.h (mpz_cmp_ui): New #define.
18439 (mpz_cmp_si): New #define.
18440 (mpq_cmp_ui): New #define.
18441 (mpz_sign): New #define.
18442 (mpq_sign): New #define.
18443 (mpf_sign): New #define.
18444 (mpq_numref): New #define.
18445 (mpq_denref): New #define.
18447 * mpq/set_z.c: File deleted.
18448 * mpq/Makefile.in: Corresponding changes.
18450 Sun Feb 18 01:34:47 1996 Torbjorn Granlund <tege@matematik.su.se>
18452 * mpbsd/sdiv.c: Use _mp_realloc, not _mpz_realloc.
18454 * mpz/inp_binary.c: Default stream to stdin.
18455 * mpz/inp_str.c: Likewise.
18456 * mpz/inp_raw.c: Likewise.
18457 * mpz/out_binary.c: Default stream to stdout.
18458 * mpz/out_raw.c: Likewise.
18459 * mpz/out_str.c: Likewise.
18461 * mpbsd/realloc.c: New file.
18462 * mpbsd/Makefile.in: Corresponding changes.
18464 * mpbsd/min.c: Rewrite (base on mpz/inp_str.c).
18465 * mpbsd/mtox.c: Rewrite (base on mpz/get_str.c).
18467 * mpbsd/mout.c: Rewrite (base on mpz/out_str) but make it output
18468 spaces in each 10th position.
18469 * mpbsd/xtom.c: Rewrite (base on mpz/set_str).
18471 * mpq/tests/Makefile.in (st-cmp): New file.
18472 * mpq/tests/configure.in (srcname): New file.
18474 * mpz/tests/configure.in (srcname): Fix typo.
18476 * mpq/cmp.c: Add check using number of significant bits, to avoid
18477 general multiplication.
18479 Sat Feb 17 11:58:30 1996 Torbjorn Granlund <tege@matematik.su.se>
18481 * mpq/cmp_ui.c: Store cy_limb after the mpn_mul_1 calls.
18483 * mpq/tests: New directory.
18484 * mpq/tests/t-cmp.c: New file.
18485 * mpq/tests/t-cmp_ui.c: New file.
18487 * mpz/tests/dive.c (main): Generate zero numerator.
18488 (get_random_size) : Delete.
18490 * mpz/divexact.c: Add special case for 0/x.
18492 * gmp.h (mpz_mod): Add declaration.
18494 Fri Feb 16 18:18:39 1996 Andreas Schwab <schwab@informatik.uni-dortmund.de>
18496 * mpn/m68k/*: Rewrite code not to use the INSN macros.
18497 (L): New macro to properly prefix local labels for ELF.
18499 Fri Feb 16 00:20:56 1996 Torbjorn Granlund <tege@matematik.su.se>
18501 * gmp-impl.h (ieee_double_extract): Use plain `unsigned int' for
18503 * mpn/generic/inlines.c (_FORCE_INLINES): New #define. Delete
18504 conditional __GNUC__.
18505 * gmp.h (mpn_add, mpn_sub, mpn_add_1, mpn_sub_1):
18506 Only define these if __GNUC__ || _FORCE_INLINES.
18507 * mpf/random2.c: Add missing parameter in non-ANSI header.
18508 * mpn/generic/gcd.c (SIGN_BIT): Do as #define to work around bug
18510 * mpq/get_d.c: #define N_QLIMBS.
18511 * mpz/divexact.c: Obscure division by 0 to silent compiler warnings.
18512 * stack-alloc.c: Cast void* pointer to char* before doing arithmetic
18515 * Makefile.in (mpbsd/libmpbsd.a): New rule.
18516 * configure.in (configdirs): Add mpbsd.
18518 * gmp.h: Add declarations for a few missing mpn functions.
18520 * Makefile.in (libmp.a): New rule.
18522 * mpbsd/mdiv.c: #include "dmincl.c", not "mpz_dmincl.c"
18523 * gmp.h: Move #define of __GNU_MP__ into the `#if __GNU_MP__' block.
18524 * mp.h: Likewise. Update typedefs from gmp.h.
18525 * mpbsd/configure.in: New file.
18526 * mpbsd/Makefile.in: New file.
18527 * mpbsd/configure: Link to master configure.
18528 * mpbsd/config.sub: Link to master config.sub.
18530 * Makefile.in: Set RANLIB_TEST.
18531 * (libgmp.a): Use it.
18532 * (libgmp.a): Do ranlib before moving the libgmp.a to the build
18534 * mp?/Makefile.in: Don't use or set RANLIB.
18536 Thu Feb 15 16:38:41 1996 Torbjorn Granlund <tege@matematik.su.se>
18538 * mpz/add_ui.c: MP_INT => mpz_t.
18539 * mpz/cmp_ui.c: Likewise.
18540 * mpz/fac_ui.c: Likewise.
18541 * mpz/inp_binary.c: Likewise.
18542 * mpz/inp_raw.c: Likewise.
18543 * mpz/legendre.c: Likewise.
18544 * mpz/jacobi.c: Likewise.
18545 * mpz/out_binary.c: Likewise.
18546 * mpz/out_raw.c: Likewise.
18547 * mpz/random2.c: Likewise.
18548 * mpz/random.c: Likewise.
18549 * mpz/realloc.c: Likewise.
18551 * mpz/legendre.c: __mpz_2factor(X) => mpz_scan1(X,0),
18552 __mpz_odd_less1_2factor => mpz_scan1(X,1).
18553 * mpz/ntsup.c: File deleted.
18554 * mpz/Makefile.in: Corresponding changes.
18556 * mpz/pprime_p: Use mpz_scan1 to avoid looping.
18558 * mpz/fac_ui.c: Type of `k' and `p' is `unsigned long'.
18559 * mpz/pprime_p.c: Pass long to *_ui functions.
18560 * mpz/gcdext.c: Likewise.
18561 * mpz/fdiv_r_2exp.c: Likewise.
18562 * mpz/fac_ui.c: Likewise.
18564 * mpz/powm.c: Don't use mpn_rshift when mod_shift_cnt is 0.
18566 * mpz/tests/Makefile.in (st-sqrtrem): Fix typo.
18568 * mpz/cmp_ui.c: #undef mpz_cmp_ui.
18569 * mpz/cmp_si.c: #undef mpz_cmp_si.
18570 * gmp.h (mpz_cmp_ui): New #define.
18571 (mpz_cmp_si): New #define.
18573 Wed Feb 14 22:11:24 1996 Torbjorn Granlund <tege@matematik.su.se>
18575 * gmp.h: Test __cplusplus in addition to __STDC__.
18576 * gmp-impl.h: Likewise.
18578 * gmp.h: Surround declarations with extern "C" { ... }.
18580 Tue Feb 13 15:20:45 1996 Torbjorn Granlund <tege@matematik.su.se>
18582 * mpz/fdiv_r_2exp.c: Use MPN_NORMALIZE.
18583 * mpz/tdiv_r_2exp.c: Likewise.
18585 * mpz/fdiv_r_2exp.c: New file.
18586 * mpz/fdiv_q_2exp.c: New file.
18587 * mpz/tdiv_r_2exp.c: Renamed from mpz/mod_2exp.c.
18588 * mpz/tdiv_q_2exp.c: Renamed from mpz/div_2exp.c
18589 * mpz/Makefile.in: Corresponding changes.
18591 * mpz/scan0.c,scan1.c: New files.
18592 * mpz/Makefile.in: Compile them.
18594 * gmp.h (mpn_normal_size): Delete.
18596 * config.guess: Update from Cygnus version.
18598 * mpn/m68k/rshift.S: Use INSN2 macro for lea instructions.
18599 * mpn/m68k/lshift.S: Likewise.
18601 * mpn/configure.in: Fix configuration for plain 68000.
18603 Mon Feb 12 01:06:06 1996 Torbjorn Granlund <tege@matematik.su.se>
18605 * mpz/tests/t-powm.c: Generate negative BASE operand.
18607 * mpz/powm.c: Make result always positive.
18609 Sun Feb 11 01:44:56 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18611 * mpz/tests/*.c: Add t- prefix.
18612 * mpz/tests/Makefile.in: Corresponding changes.
18613 * mpz/tests/configure.in: Update srctrigger.
18615 * mpz/tests/gcd.c: Generate negative operands.
18616 * mpz/tests/gcd2.c: Likewise.
18618 * mpz/gcdext.c: At end, if G is negative, negate all G, S, and T.
18620 Thu Feb 8 17:16:12 UTC 1996 Ken Weber <kweber@mat.ufrgs.br>
18622 * mp{z,n}/gcd.c: Change mpn_gcd interface.
18624 * gmp.texi: update documentation.
18626 Mon Feb 7 23:58:43 1996 Andreas Schwab <schwab@informatik.uni-dortmund.de>
18628 * mpn/m68k/{lshift,rshift}.S: New files.
18629 * mpn/m68k/syntax.h: New ELF_SYNTAX macros.
18630 (MEM_INDX, R, PROLOG, EPILOG): New macros.
18631 * mpn/m68k/*.S: Use R macro with register name. Use PROLOG and EPILOG
18632 macros. Rename `size' to `s_size' or s1_size to avoid clash with ELF
18634 * mpn/configure.in: New target m68k-*-linux*.
18636 Wed Feb 7 07:41:31 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18638 * Makefile.in (cre-conv-tab): Workaround for SunOS make.
18640 * mpz/tests/reuse.c: New file.
18641 * mpz/tests/Makefile.in: Handle reuse.c.
18643 Tue Feb 6 11:56:24 UTC 1996 Ken Weber <kweber@mat.ufrgs.br>
18645 * mpz/gcd.c: Fix g->size when one op is 0 and g == other op.
18647 Tue Feb 6 01:36:39 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18649 * gmp.h (mpz_divexact): Delete parameter names.
18650 (mpz_lcm): Delete spurious declaration.
18652 * mpz/dmincl.c: Fix typo.
18654 Mon Feb 5 01:11:56 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18656 * mpn/generic/gcd.c (gcd_2): Declare consistently.
18658 * mpz/tdiv_q.c: Optimize division by a single-limb divisor.
18659 * mpz/dmincl.c: Likewise.
18661 * mpz/add.c: Use MPN_NORMALIZE instead of mpn_normal_size.
18662 * mpz/sub.c: Likewise.
18663 * mpn/generic/sqrt.c: Likewise.
18665 * mpn/tests/{add_n,sub_n,lshift,rshift}.c: Put garbage in the
18666 destination arrays.
18668 Fri Feb 2 02:21:27 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18670 * mpz/{jacobi.c,legendre.c,ntsup.c,invert.c}: New files.
18671 * mpz/Makefile.in: Compile them.
18673 * mpn/Makefile.in (INCLUDES): Don't search in `generic'.
18675 Thu Feb 1 02:15:11 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18677 Change from Ken Weber:
18678 * mpz/divexact.c: Make it work when quot is identical to either input.
18680 * mpf/ui_sub.c: New file.
18681 * mpf/Makefile.in: Compile it.
18683 * gmp-impl.h (MPZ_TMP_INIT): alloca -> TMP_ALLOC.
18684 * mpz/{c,f}div_{q,qr,r}.c: Use TMP_DECL/TMP_MARK/TMP_FREE since
18685 these use MPZ_TMP_INIT.
18686 * mpz/mod.c: Likewise.
18687 * mpq/{add,sub}.c: Likewise.
18688 * mpq/canonicalize: Likewise.
18690 * mpq/{add,sub,mul,div}.c: Use mpz_divexact. MP_INT -> mpz_t.
18691 * mpq/canonicalize.c: Likewise.
18693 Wed Jan 31 01:45:00 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18695 * mpn/generic/gcd.c: Misc changes from Ken.
18697 * mpz/tests/gcd2.c: New file.
18698 * mpz/tests/Makefile.in: Handle gcd2.c.
18700 * mpn/generic/gcd.c (mpn_gcd): When GCD == ORIG_V, return vsize,
18701 not orig_vsize. Fix parameter declaration.
18703 * mpz/mod_ui.c: Delete file.
18704 * mpz/Makefile.in: Don't try to compile mod_ui.
18706 * mpz/cdiv_*_ui.c): Make them work right.
18707 * gmp.h: Declare cdiv*.
18709 Tue Jan 30 02:22:56 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18711 * mpz/{cdiv_q.c,cdiv_q_ui.c,cdiv_qr.c,cdiv_qr_ui.c,cdiv_r.c,
18712 cdiv_r_ui.c,cdiv_ui.c}: New files.
18713 * mpz/Makefile.in: Compile them.
18715 * All files: Make file permissions right.
18717 Changes from Ken Weber:
18718 * mpn/generic/accelgcd.c: Delete.
18719 * mpn/generic/bingcd.c: Delete.
18720 * mpn/generic/numbits.c: Delete.
18721 * mpn/generic/gcd.c: New file.
18722 * mpn/configure.in (functions): Update accordingly.
18723 * mpz/divexact.c: New file.
18724 * mpz/Makefile.in: Compile divexact.c.
18725 * mpz/gcd.c: Rewrite to accommodate for gcd changes in mpn.
18726 * gmp.h: declare new functions, delete obsolete declarations.
18727 * mpz/tests/dive.c: New file.
18728 * mpz/tests/Makefile.in: Handle dive.c.
18730 Mon Jan 29 03:53:24 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18732 * mpz/random.c: Handle negative SIZE parameter.
18734 * mpz/tests/tdiv(_ui).c: New name for tst-dm(_ui).c.
18735 * mpz/tests/tst-mdm(_ui).c: Delete.
18736 * mpz/tests/fdiv(_ui).c: New test based in tst-mdm(_ui).
18737 * mpz/tests/*.c: Get rid of tst- prefix for DOS 8+3 naming.
18738 * mpz/tests/Makefile.in: Corresponding changes.
18739 * mpz/tests/configure.in: Update srctrigger.
18741 * mpn/generic/divmod.c: Update from divrem.
18742 * mpn/generic/divrem.c: Misc cleanups.
18744 Sun Jan 28 03:25:08 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18746 * All files: Use new TMP_ALLOC interface.
18748 * mpz/powm_ui.c: Make Jan 25 changes to powm.c also here.
18750 * mpz/tests/powm_ui.c: New file.
18751 * mpz/tests/Makefile.in: Add rules for tst-powm and tst-powm_ui.
18753 * Makefile.in: Update dependency list.
18754 * mpf/Makefile.in: Likewise.
18755 * mpz/Makefile.in: Likewise.
18756 * mpq/Makefile.in: Likewise.
18757 * Makefile.in: Set RANLIB simply to ranlib, and allow configure
18760 * mpz/Makefile.in (conf): Delete spurious target.
18761 (mp_bases.c): Delete.
18762 (cre-conv-tab rules): Delete.
18764 * Makefile.in (cre-conv-tab): Greatly simplify.
18766 Sat Jan 27 13:38:15 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18768 * stack-alloc.c: New file.
18769 * stack-alloc.h: New file.
18771 * gmp.h (__gmp_inline): Define using __inline__.
18773 Thu Jan 25 00:28:37 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18775 * mpn/generic/scan0.c: New file.
18776 * mpn/generic/scan1.c: Renamed from next_bit.c.
18777 * mpn/configure.in (functions): Include scan0 and scan1.
18779 * mpn/m68k/*: #include sysdep.h. Use C_GLOBAL_NAME.
18781 * configure: Update from Cygnus version.
18782 * config.guess: Likewise.
18783 * config.sub: Likewise.
18784 * configure: Pass --nfp to recursive configures.
18786 * mpz/tests/tst-*.c: Adjust SIZE and reps.
18788 * mpz/powm.c: Move esize==0 test earlier.
18789 In final reduction of rp,rsize, don't call mpn_divmod unless
18790 reduction is really needed.
18792 * mpz/tests/tst-powm.c: Fix thinko in checking code.
18794 * All files: Get rid of `__' prefix from mpn_* calls and declarations.
18795 * gmp.h: #define __MPN.
18796 * gmp.h: Use __MPN in #defines for mpn calls.
18798 * mpn/generic/mul_n.c: Prepend `i' to internal routines.
18799 * gmp-impl.h: Add #defines using __MPN for those internal routines.
18801 * mpn/generic/sqrt.c: Change call to mpn_mul to mpn_mul_n.
18803 Wed Jan 24 13:28:19 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18805 * mpn/sparc32/udiv_fp.S: New name for udiv_qrnnd.S.
18806 * mpn/sparc32/udiv_nfp.S: New name for v8/udiv_qrnnd.S.
18807 * mpn/sparc32/v8/supersparc: New directory.
18808 * mpn/sparc32/v8/supersparc/udiv.S: New file.
18810 Tue Jan 23 01:10:11 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18812 This major contribution is from Ken Weber:
18813 * mpn/generic/accelgcd.c: New file.
18814 * mpn/generic/bdivmod.c: New file.
18815 * mpn/generic/bingcd.c: New file.
18816 * mpn/generic/gcd_1.c: Rewrite.
18817 * mpn/generic/numbits.c: New file (to go away soon).
18818 * mpz/gcd.c: Rewrite.
18819 * mpz/tests/tst-gcd.c (SIZE): Now 128.
18820 * gmp.h: Declare new functions.
18821 * mpn/configure.in (functions): List new files.
18822 * gmp-impl.h (MPN_SWAP): Delete.
18823 (MPN_LESS_BITS_LIMB, MPN_LESS_BITS, MPN_MORE_BITS): Delete.
18824 (MPN_COMPL_INCR, MPN_COMPL): Delete.
18826 Mon Jan 22 02:04:59 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18828 * gmp.h (mpn_name): New #define.
18830 * mpn/m88k/mc88110/addmul_1.s: New file.
18831 * mpn/m88k/mc88110/add_n.S: New file.
18832 * mpn/m88k/mc88110/sub_n.S: New file.
18834 * mpn/m88k/sub_n.s: Correctly initialize carry.
18836 * mpn/sparc32/{add_n.S,sub_n.S,lshift.S,rshift.S): `beq' => `be'.
18838 Sun Jan 21 00:04:35 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18840 * mpn/sparc64/addmul_1.s: New file.
18841 * mpn/sparc64/submul_1.s: New file.
18842 * mpn/sparc64/rshift.s: New file.
18844 Sat Jan 20 00:32:54 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18846 * mpz/iset.c: Fix typo introduced Dec 25.
18848 Wed Jan 17 13:16:44 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18850 * config/mt-sprc8-gcc: New name for mt-sparc8-gcc.
18851 * config/mt-sparcv8-gcc: Delete.
18852 * configure.in: Corresponding changes.
18854 Tue Jan 16 16:31:01 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18856 * gmp-impl.h: #include alloca.h when necessary.
18858 * longlong.h: Test __alpha instead of __alpha__, since the former
18859 is the standard symbol.
18861 Mon Jan 15 18:06:57 1996 Torbjorn Granlund <tege@noisy.matematik.su.se>
18863 * mpn/sparc64/mul_1.s: Swap operands of mulx instructions.
18864 * mpn/sparc64/lshift.s: New file.
18866 Fri Dec 29 17:34:03 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
18868 * mpn/x86/pentium/add_n.S: Get rid of #defines for register names.
18869 * mpn/x86/pentium/sub_n.S: Likewise.
18871 Thu Dec 28 03:16:57 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
18873 * mpn/x86/pentium/mul_1.S: Rework loop to avoid AGI between update
18874 of loop induction variable and load insn at beginning of loop.
18875 * mpn/x86/pentium/addmul_1.S: Likewise.
18876 * mpn/x86/pentium/submul_1.S: Likewise.
18878 Mon Dec 25 23:22:55 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
18880 * All files: Prefix user-visible structure fields with _mp_.
18882 Fri Dec 22 20:42:17 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
18884 * mpn/configure.in (m68k configs): Terminate path variable with
18887 Fri Dec 22 03:29:33 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
18889 * mpn/sparc32/add_n.S: Update from sub_n.S to fix bugs, and to
18892 * mpn/configure.in (m68k configs): Update #include path for new
18893 mpn directory organization.
18895 Tue Dec 12 02:53:02 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
18897 * gmp.h: Prefix all structure field with _mp_.
18898 * gmp-impl.h: Define access macros for these fields.
18900 Sun Dec 10 00:47:17 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
18902 * mpn/alpha/addmul_1.s: Prefix labels with `.'.
18903 * mpn/alpha/submul_1.s: Likewise.
18904 * mpn/alpha/[lr]shift.s: Likewise.
18905 * mpn/alpha/udiv_qrnnd.S: Likewise.
18906 * mpn/alpha/ev5/[lr]shift.s: Likewise.
18908 * mpn/alpha/ev5/lshift.s: Fix typos.
18910 Fri Dec 1 14:28:20 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
18912 * mpn/Makefile.in (.SUFFIXES): Define.
18914 Wed Nov 29 23:11:57 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
18916 * mpn/sparc64/{add_n.s, sub_n.s}: New files.
18918 Tue Nov 28 06:03:13 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
18920 * mpn/x86/syntax.h: Handle ELF_SYNTAX.
18921 Rename GAS_SYNTAX => BSD_SYNTAX.
18923 * mpn/configure.in: Handle linuxelf and SysV for x86 variants.
18925 Mon Nov 27 01:32:12 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
18927 * mpn/hppa/hppa1_1/pa7100/submul_1.S: New file.
18929 Sun Nov 26 04:30:47 1995 Torbjorn Granlund <tege@noisy.matematik.su.se>
18931 * mpn/hppa/hppa1_1/pa7100/addmul_1.S: New file.
18933 * mpn/sparc32/add_n.S: Rewrite to use 64 bit loads/stores.
18934 * mpn/sparc32/sub_n.S: Likewise.
18936 Fri Nov 17 00:18:46 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
18938 * mpn/configure.in: Handle m68k on NextStep.
18940 Thu Nov 16 02:30:26 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
18942 * mpn: Reorganize machine-specific directories.
18943 * mpn/configure.in: Corresponding changes.
18944 (sh, sh2): Handle these.
18945 (m68k targets): Create asm-syntax.h.
18947 Thu Nov 9 02:20:50 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
18949 * mpn/generic/mul_n.c (____mpn_sqr_n): Delete code that calls abort.
18950 (____mpn_mul_n): Likewise.
18952 Tue Nov 7 03:25:12 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
18954 * mpf/get_str.c: In exponentiation code (two places), don't swap
18955 input and output areas when calling mpn_mul_1.
18956 * mpf/set_str.c: Likewise.
18958 Fri Nov 3 02:35:58 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
18960 * mpf/Makefile.in: Make sure all objects are listed in dependency list;
18961 delete spurious entries.
18963 * mpf/mul.c: Handle U or V being 0. Allow prec+1 for result precision.
18965 * mpf/set_prec.c: New computation of limb precision.
18966 * mpf/set_dfl_prec.c: Likewise.
18968 * mpf/random2.c: Fix typo computing exp.
18969 * mpf/get_str.c: In (uexp > usize) case, set n_limbs as a function of
18970 the user-requested number of digits, n_digits.
18972 Thu Nov 2 16:25:07 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
18974 * mpn/generic/divrem.c (case 2): Don't move np vector back, it is
18976 (default case): Put most significant limb from np in new variable n2;
18977 decrease size argument for MPN_COPY_DECR; use n2 instead of np[dsize].
18979 Wed Nov 1 02:59:53 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
18981 * mpn/sparc/[lr]shift.S: New files.
18983 Tue Oct 31 00:08:12 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
18985 * mpz/gcd_ui.c: Set w->size unconditionally when v is zero.
18987 * gmp-impl.h (assert): Delete definition.
18989 * mpf/sub.c: Delete all assert calls. Delete variable `cy'.
18991 * mpf/neg.c: Use prec+1 as precision. Optimize for when arguments
18993 * mpf/abs.c: Likewise.
18994 * mpf/{set,neg,abs}.c: Make structure and variable names similar.
18996 Mon Oct 30 12:45:26 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
18998 * mpf/random2.c (random): Test __SVR4 in addition to __svr4__.
18999 * mpn/generic/random2.c (random): Likewise.
19001 Sun Oct 29 01:54:28 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19003 * mpf/div.c: Special handle U or V being 0.
19005 * mpf/random2.c: New file.
19007 * longlong.h (i860 rshift_rhlc): Define.
19008 (i960 udiv_qrnnd): Define.
19009 (i960 count_leading_zeros): Define.
19010 (i960 add_ssaaaa): Define.
19011 (i960 sub_ddmmss): Define.
19012 (i960 rshift_rhlc): Define.
19014 Sat Oct 28 19:09:15 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19016 * mpn/pentium/rshift.S: Fix and generalize condition for when to use
19017 special code for shift by 1.
19018 * mpn/pentium/lshift.S: Likewise.
19020 Thu Oct 26 00:02:56 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19022 * gmp.h: #undef __need_size_t.
19023 * mp.h: Update from gmp.h.
19025 Wed Oct 25 00:17:27 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19027 * mpf/Makefile.in: Compile set_prec.c.
19028 * mpf/realloc.c: Delete this file.
19029 * mpf/Makefile.in: Delete mentions of realloc.c.
19031 * gmp.h (__mpf_struct): Get rid of `alloc' field.
19032 * mpf/clear.c: Likewise.
19033 * mpf/init*.c: Likewise.
19034 * mpf/set_prec.c: Likewise.
19035 * mpf/iset*.c: Likewise.
19037 * mpf/iset_str.c: New file.
19039 * mpn/configure.in: Handle pyramid.
19041 * mpf/set.c: Use prec+1 as precision.
19043 * mpf/set_prec.c: New file.
19045 Tue Oct 24 00:56:41 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19047 * mpn/generic/divrem.c: New file. Will replace mpn/generic/divmod.c
19048 when rest of source is converted.
19049 * mpn/configure.in (functions): Add `divrem'
19050 * mpn/generic/set_str.c: Never call __mpn_mul_1 with zero size.
19052 * mpf/get_str.c: Completely rewritten.
19053 * mpf/add.c: Fix several problems.
19054 * mpf/sub.c: Compare operands from most significant end until
19055 first difference, exclude skipped limbs from computation.
19056 Accordingly simplify normalization code.
19057 * mpf/set_str.c: Fix several problems.
19058 * mpf/dump.c: New file.
19059 * mpf/Makefile.in: Compile dump.c.
19060 * mpf/init2.c: Set prec field correctly.
19062 Sun Oct 22 03:02:09 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19064 * cre-conv-tab.c: #include math.h; don't declare log and floor.
19066 Sat Oct 21 23:04:10 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19068 * mpf/mul_ui.c: Handle U being 0.
19070 Wed Oct 18 19:39:27 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19072 * mpn/generic/set_str.c: Correctly handle input like "000000000000".
19075 Tue Oct 17 15:14:13 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19077 * longlong.h: Define COUNT_LEADING_ZEROS_0 for machines where
19080 Mon Oct 16 19:14:43 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19082 * mpf/add.c: Rewrite.
19083 * mpf/set_str.c: New file. Needs more work.
19085 Sat Oct 14 00:14:04 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19087 * mpf/div_2exp.c: Vastly simplify.
19088 * mpf/mul_2exp.c: Likewise.
19090 * mpf/sub.c: Rewrite.
19092 * gmp-impl.h (udiv_qrnnd_preinv2gen): Terminate comment.
19094 * mpf/dump.c: Free allocated memory.
19096 * gmp-impl.h (assert): Define.
19098 Wed Oct 11 13:31:00 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19100 * mpn/pentium/rshift.S: Install new code to optimize shift-by-1.
19102 Tue Oct 10 00:37:21 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19104 * mpn/pentium/lshift.S: Install new code to optimize shift-by-1.
19106 * mpn/powerpc32/{lshift.s,rshift.s}: New files.
19108 * configure.in: Fix typo.
19110 Sat Oct 7 08:17:09 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19112 * longlong.h (smul_ppmm): Correct type of __m0 and __m1.
19114 Wed Oct 4 16:31:28 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19116 * mpn/configure.in: Handle alphaev5.
19117 * mpn/ev4: New name for alpha subdir.
19118 * mpn/ev5: New subdir.
19119 * mpn/ev5/lshift.s: New file.
19121 Tue Oct 3 15:06:45 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19123 * mpn/alpha/mul_1.s: Avoid static increments of pointers; use
19124 corresponding offsets in ldq and stq instructions instead.
19125 (Loop): Swap cmpult and stq to save one cycle on EV5.
19127 * mpn/tests/{add_n.s,sub_n.s,lshift.s,rshift.s,mul_1.s,addmul_1.s,
19128 submul_1.s}: Don't check results if NOCHECK is defined.
19130 Mon Oct 2 11:40:18 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19132 * longlong.h (mips umul_ppmm [32 and 64 bit versions]):
19133 Make new variants, based on GCC version number, that use `l' and `h'
19134 constraints instead of explicit mflo and mfhi instructions
19136 Sun Oct 1 00:17:47 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19138 * mpn/mc88100/add_n.s: Decrease unrolling factor from 16 to 8.
19139 * mpn/mc88100/sub_n.s: Likewise.
19141 * config/mt-m88110: New file.
19142 * configure.in: Use it.
19144 * mpn/mc88110/mul_1.s: Fix thinko.
19146 Sat Sep 30 21:28:19 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19148 * mpz/set_d.c: Declare `size' at function start.
19150 * experimental: New directory for mpx and mpz2.
19152 * mpz/tdiv_q.c: Clarify comments.
19153 * mpz/{mod.c,mod_ui.c}: New file, for math mod function.
19155 * mpn/sh2/{mul_1.s,addmul_1.s,submul_1.s}: New files.
19157 * mpn/sh/{add_n.s,sub_n.s}: New files.
19159 * mpn/pyr/{add_n.s,sub_n.s,mul_1.s,addmul_1.s}: New files.
19161 * mpn/i960/{add_n.s,sub_n.s}: New files.
19163 * mpn/alpha/addmul_1.s (Loop): Move decrement of r18 to before umulh,
19164 to save cycles on EV5.
19165 * mpn/alpha/submul_1.s: Ditto.
19166 * mpn/alpha/mul_1.s: Ditto.
19168 Thu Sep 28 02:48:59 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19170 * gmp.h (mp_limb, mp_limb_signed): Define as `long long' if
19171 _LONG_LONG_LIMB is defined.
19173 * longlong.h (m88110): Test __m88110__, not __mc88110__
19175 * mpn/mc88110/mul_1.s: Rewrite.
19177 Tue Sep 26 23:29:05 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19179 * config.sub: Update from current Cygnus version.
19181 * mpn/configure.in: Recognize canonical m88*, not mc88*.
19183 Fri Sep 22 14:58:05 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19185 * mpz/set_d.c: New file.
19186 * mpz/Makefile.in: Build new files.
19188 * mpq/get_d.c: Replace usage of scalbn with ldexp.
19190 * mpn/{vax,i386}/gmp-mparam.h: New files.
19191 * gmp-impl.h (ieee_double_extract): Define here.
19192 * mpf/set_d.c (ieee_double_extract): Not here.
19194 Thu Sep 21 00:56:36 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19196 * longlong.h (C umul_ppmm): Use UWtype, not USItype for temps.
19197 (udiv_qrnnd): For cases implemented with call to __udiv_qrnnd,
19198 protect with new symbol LONGLONG_STANDALONE.
19199 (68000 umul_ppmm): Use %# prefix for immediate constants.
19201 Wed Sep 20 15:36:23 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19203 * mpn/generic/divmod_1.c: Handle
19204 divisor_limb == 1 << (BITS_PER_MP_LIMB - 1)
19205 specifically also when normalization_steps != 0.
19207 Mon Sep 18 15:42:30 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19209 * mpq/get_d.c: New file.
19211 Sun Sep 17 02:04:36 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19213 * longlong.h (pyr): Botch up for now.
19215 Sat Sep 16 00:11:50 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19217 * mpn/clipper/mul_1.s: New file.
19218 * mpn/clipper/add_n.s: New file.
19219 * mpn/clipper/sub_n.s: New file.
19220 * mpn/configure.in: Handle clipper*-*-*.
19222 * mpn/configure.in: Recognize rs6000-*-*.
19224 Fri Sep 15 00:41:34 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19226 * mpn/alpha/add_n.s: New file.
19227 * mpn/alpha/sub_n.s: New file.
19229 * mpn/mips3: New name for mpn/r4000.
19230 * mpn/mips2: New name for mpn/r3000.
19231 * mpn/configure.in: Corresponding changes.
19233 * mpn/generic/perfsqr.c (primes): Delete.
19234 (residue_map): Delete.
19236 Thu Sep 14 00:07:58 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19238 * mpn/r3000/sub_n.s: Fix typo.
19240 * dm_trunc.c: Delete spurious file.
19242 * mpz/out_binary.c: Fix typo.
19244 * mpn/configure.in (per-target): Make mips*-*-irix6* imply r4000.
19246 * gmp-impl.h: For sparc and sgi, include alloca.h.
19248 * mpn/z8000/mul_1.s: Replace `test r' with `and r,r'. Replace
19249 `ldk r,#0' with `xor r,r'.
19251 Wed Sep 6 00:58:38 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19253 * mpz/inp_binary.c: New file.
19254 * mpz/out_binary.c: New file.
19255 * mpz/Makefile.in: Build new files.
19257 Tue Sep 5 22:53:51 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19259 * gmp.h (__mpz_struct): Change `long int' => `mp_size_t' for alloc
19262 Sat Sep 2 17:47:59 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19264 * mpn/r4000/{add_n.s,sub_n.s}: Optimize away some pointer arithmetic.
19265 * mpn/r3000/{add_n.s,sub_n.s,lshift.s,rshift.s}: New files,
19266 derived from r4000 code.
19268 Fri Sep 1 05:35:52 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19270 * mpn/r3000/mul_1.s: Fix typo.
19272 * mpn/powerpc32: Fix some old vs new mnemonic issues.
19274 * mpn/powerpc32/{add_n.s,sub_n.s}: New files.
19275 * mpn/r4000/{add_n.s,sub_n.s,lshift.s,rshift.s}: New files.
19277 Wed Aug 30 10:43:47 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19279 * mpn/r3000/mul_1.s ($LC1): Use addiu for immediate add.
19280 * mpn/r4000/{mul_1.s,addmul_1.s,submul_1.s}: New files.
19282 * config.guess: Update to latest FSF revision.
19284 Mon Aug 28 02:18:13 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19286 * mpz/out_str.c: Cast str to char * in fputs call.
19288 * gmp-impl.h: Define UQItype, SItype, and USItype also
19291 Fri Aug 25 01:45:04 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19293 * mpn/i386/syntax.h: Renamed from asm-syntax.h.
19294 * mpn/mc68020/syntax.h: Renamed from asm-syntax.h.
19295 * mpn/configure.in: Corresponding changes.
19297 Sun Aug 13 19:20:04 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
19299 * mpn/generic/random2.c: Test __hpux, not hpux.
19301 Sat Apr 15 20:50:33 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
19303 * mpn/sparc/add_n.S: Make it work for PIC.
19304 * mpn/sparc/sub_n.s: Likewise.
19305 * mpn/sparc8/addmul_1.S: Likewise.
19306 * mpn/sparc8/mul_1.S: Likewise.
19307 * mpn/i386/add_n.S: Likewise.
19308 * mpn/i386/sub_n.S: Likewise.
19310 Thu Apr 13 23:15:03 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
19312 * mpn/configure.in: Don't search power subdir for generic ppc configs.
19313 Add some ppc cpu-specific configs. Misc clean up.
19315 Mon Apr 10 00:16:35 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
19317 * mpz/ui_pow_ui.c: Delete spurious code to handle negative results.
19319 Sun Apr 9 12:38:11 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
19321 * longlong.h (SPARC v8 udiv_qrnnd): Generate remainder in C,
19324 * mpn/generic/sqrt.c (SQRT): Test for __SOFT_FLOAT.
19326 Tue Mar 28 00:19:52 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
19328 * mpn/generic/hamdist.c (popc_limb): Make Mar 16 change here too.
19330 Fri Mar 17 23:29:22 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
19332 * longlong.h (SH umul_ppmm): Define.
19334 Thu Mar 16 16:40:44 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
19336 * mpn/generic/popcount.c (popc_limb): Rearrange 32 bit case
19339 Fri Mar 10 20:03:49 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
19341 * mpn/powerpc32/mul_1.s: Clear cy before entering loop.
19342 Rearrange loop to save a cycle.
19343 * mpn/powerpc32/addmul_1.s: New file.
19344 * mpn/powerpc32/submul_1.s: New file.
19346 Fri Feb 17 22:44:45 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
19348 * mpn/configure.in: Set target_makefile_frag for freebsd
19350 * mpn/config/t-freebsd: New file.
19351 * mpn/Makefile.in: Add #### for frag insertion.
19352 (XCFLAGS): Clear by default.
19353 (.c.o, .S.o rules): Pass XCFLAGS.
19355 Tue Feb 7 16:27:50 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
19357 * longlong.h (68000 umul_ppmm): Merge improvements from henderson.
19359 Tue Jan 24 04:23:20 1995 Torbjorn Granlund (tege@tiny.cygnus.com)
19361 * longlong.h (default umul_ppmm): Store input parameters in temporaries
19362 to avoid reading them twice.
19363 (default smul_ppmm): New definition.
19365 Thu Dec 29 04:20:07 1994 Jim Meyering (meyering@comco.com)
19367 * generic/perfsqr.c (__mpn_perfect_square_p): Remove declaration
19368 of unused variable.
19369 * generic/pre_mod_1.c (__mpn_preinv_mod_1): Likewise.
19370 * mpz/powm.c (pow): Likewise.
19372 * mpz/and.c (mpz_and): Use {} instead of `;' for empty else clause
19373 to placate `gcc -Wall'.
19374 * mpz/ior.c (mpz_ior): Likewise.
19376 Wed Dec 28 13:31:40 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
19378 * mpn/m*68*/*.S: #include asm-syntax.h, not asm.h.
19380 Mon Dec 26 17:15:36 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
19382 * longlong.h: Test for more symbols, in __mc68000__ case.
19384 * mpn/mpn/config.sub: Recognize m68060.
19385 * mpn/configure.in: Change mc* to m* for 68k targets.
19386 * mpn/Makefile.in (.S.o): Delete spurious creation of temp .c file.
19388 Mon Dec 19 01:56:30 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
19390 * config.sub: Recognize pentium as a valid CPU.
19391 * mpn/configure.in: Handle pentium specifically, to use new assembly
19394 Mon Dec 19 00:13:01 1994 Jim Meyering (meyering@comco.com)
19396 * gmp.h: Define _GMP_H_HAVE_FILE if FILE, __STDIO_H__, or H_STDIO
19398 * gmp.h: test _GMP_H_HAVE_FILE instead of FILE everywhere else.
19400 Mon Dec 19 00:04:54 1994 Kent Boortz (boortz@sics.se)
19402 * Makefile.in (recursive makes): Pass CFLAGS.
19404 Sun Dec 18 22:34:49 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
19406 * mpn/pentium: New directory.
19408 * mpz/pprime.c: Make sure to mpz_clear all temporaries.
19410 * longlong.h: Don't use udiv instruction when SUPERSPARC is defined.
19411 * configure.in: Handle supersparc*-.
19412 * config/mt-supspc-gcc: New file.
19413 * config/mt-sparc8-gcc: New name for mt-sparcv8-gcc.
19415 Mon Dec 12 22:22:10 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
19417 * mpn/i386/*.S: #include "asm-syntax.h", not "asm.h".
19418 #include sysdep.h before asm-syntax.h.
19420 * mpn/mc68020/asm-syntax.h: #undef ALIGN before defining it.
19421 * mpn/i386/asm-syntax.h: Likewise.
19423 * mpn/mc68020/asm-syntax.h: New name for asm.h.
19424 * mpn/i386/asm-syntax.h: New name for asm.h.
19426 Tue Dec 6 21:55:25 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
19428 * mpz/array_init.c: Fix typo in declaration.
19430 Fri Nov 18 19:50:52 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
19432 * mpn/Makefile.in (.S.o): Pass CFLAGS and INCLUDES.
19434 Mon Nov 14 00:34:12 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
19436 * mpn/generic/random2.c (random): Test for __svr4__.
19438 Wed Oct 12 23:28:16 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
19440 * cre-conv-tab.c (main): Avoid upper-case X in printf format string.
19442 Tue Aug 23 17:16:35 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
19444 * mpz/perfsqr.c: Use mpn_perfect_square_p.
19445 * mpn/generic/perfsqr.c: New file.
19447 Wed Jul 6 13:46:51 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
19449 * mpz/array_init.c: New file.
19450 * mpz/Makefile.in: Compile array_init.
19451 * gmp.h: Declare mpz_array_init.
19453 Mon Jul 4 01:10:03 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
19455 * mpz/add.c: Fix bogus comment.
19456 * mpz/sub.c: Likewise.
19458 Sat Jul 2 02:14:56 1994 Torbjorn Granlund (tege@adder.cygnus.com)
19460 * mpn/generic/pre_mod_1.c: New file.
19461 * mpz/perfsqr.c: Use __mpn_preinv_mod_1 when faster.
19463 Fri Jul 01 22:10:19 1994 Richard Earnshaw (rwe11@cl.cam.ac.uk)
19465 * longlong.h (arm umul_ppmm): Fix typos in last change. Mark
19466 hard-coded registers with "%|"
19468 Thu Jun 30 03:59:33 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
19470 * mpz/perfsqr.c: Define PP, etc, for machines with 64 bit limbs.
19472 * mpz/perfsqr.c: Don't clobber REM in quadratic residue check loop.
19474 Wed Jun 29 18:45:41 1994 Torbjorn Granlund (tege@adder.cygnus.com)
19476 * mpn/generic/sqrt.c (SQRT): New asm for IBM POWER2.
19478 * mpz/gcd_ui.c: Return 0 if result does not fit an unsigned long.
19480 * gmp.h: Use "defined (__STDC__)" consistently.
19482 Tue Jun 28 18:44:58 1994 Torbjorn Granlund (tege@adder.cygnus.com)
19484 * gmp.h (mpz_get_si): Don't use "signed" keyword for return type.
19486 * mpz/tests/Makefile.in: Use CFLAGS for linking.
19488 * Makefile.in (CFLAGS): Use -O2 here.
19489 * mpn/Makefile (CFLAGS): Not here.
19491 * mpq/cmp_ui.c: Fix typo.
19492 * mpq/canonicalize.c: Fix typo.
19493 * mpz/gcd_ui.c: Handle gcd(0,v) and gcd(u,0) correctly.
19494 * mpn/generic/gcd_1.c: Fix braino in last change.
19496 Mon Jun 27 16:10:27 1994 Torbjorn Granlund (tege@rtl.cygnus.com)
19498 * mpz/gcd_ui.c: Change return type and return result.
19499 Allow destination param to be NULL.
19500 * gmp.h: Corresponding change.
19501 * mpn/generic/gcd_1.c: Handle zero return from mpn_mod_1.
19503 Tue Jun 14 02:17:43 1994 Torbjorn Granlund (tege@tiny.cygnus.com)
19505 * mpn/i386/asm.h (ALIGN): Make it take a parameter.
19506 * mpn/i386/*.S: Use ALIGN to align all loops.
19508 * mpn/i386/*.S: Move colon inside C_GLOBAL_NAME expression.
19509 (Makes old versions of GAS happy.)
19511 Sat May 28 01:43:54 1994 Torbjorn Granlund (tege@adder.cygnus.com)
19513 * Many files: Delete unused variables and labels.
19514 * mpn/generic/dump.c: cast printf width argument to int.
19516 Wed May 25 00:42:37 1994 Torbjorn Granlund (tege@thepub.cygnus.com)
19518 * mpz/gcd.c (mpz_gcd): Normalize after __mpn_sub calls.
19519 (xmod): Ignore return value of __mpn_divmod.
19520 (xmod): Improve normalization code.
19522 Sat May 21 01:30:09 1994 Torbjorn Granlund (tege@adder.cygnus.com)
19524 * mpz/gcdext.c: Cosmetic changes.
19526 * mpz/fdiv_ui.c: New file.
19528 Fri May 20 00:24:53 1994 Torbjorn Granlund (tege@adder.cygnus.com)
19530 * mpz/tests/Makefile.in: Use explicit rules for running tests,
19532 (clean): Delete stmp-*.
19534 * mpz/Makefile.in: Update.
19536 * mpz/div_ui.c: Don't include longlong.h.
19537 * mpz/dm_ui.c: Likewise.
19539 * mpz/fdiv_q.c, mpz/fdiv_q_ui.c, mpz/fdiv_qr.c, mpz/fdiv_qr_ui.c,
19540 mpz/fdiv_r.c, mpz/fdiv_r_ui.c: New files. Code partly from deleted
19541 mdm.c, mdm_ui.c, etc, partly rewritten.
19542 * mpz/dm_floor_ui.c, mpz/dm_floor.c: Delete.
19543 * mpz/mdm.c, mpz/mdm_ui.c, mpz/mdiv.c, mpz/mdiv_ui.c, mpz/mmod.c,
19544 mpz/mmod_ui.c: Delete.
19546 * mpz/tdiv_q.c, mpz/tdiv_q_ui.c, mpz/tdiv_qr.c, mpz/tdiv_qr_ui.c,
19547 mpz/tdiv_r.c, mpz/tdiv_r_ui.c:
19548 New names for files implementing truncating division.
19549 * mpz/div_ui.c, mpz/dm_ui.c, mpz/mod_ui.c: Simplify.
19551 * mpn/Makefile.in (.S.o): Don't rely on CPP being defined, use CC
19553 (clean): Delete tmp-*.
19555 Thu May 19 01:37:44 1994 Torbjorn Granlund (tege@adder.cygnus.com)
19557 * mpz/cmp.c: Call __mpn_cmp.
19559 * mpz/popcount.c: Fix typo.
19561 * mpz/powm_ui.c: Simplify main loop. Keep principal operand size
19562 smaller than MSIZE when possible.
19563 * mpz/powm.c: Likewise.
19565 * mpn/generic/sqrt.c: Move alloca calls into where the memory is
19568 * gmp.h: (_PROTO): New macro.
19569 Add many function declarations; use _PROTO macro in all declarations.
19571 * mpf/*.c: Prepend mpn calls with __.
19573 Wed May 18 20:57:06 1994 Torbjorn Granlund (tege@adder.cygnus.com)
19575 * mpf/*ui*.c: Make ui argument `long' for consistency with mpz
19578 * mpf/div_ui.c: Simplify.
19580 Tue May 17 01:05:14 1994 Torbjorn Granlund (tege@adder.cygnus.com)
19582 * mpz/*.c: Prepend mpn calls with __.
19584 * mpz/mul_ui.c: Use mpn_mul_1.
19586 Mon May 16 17:19:41 1994 Torbjorn Granlund (tege@adder.cygnus.com)
19588 * mpn/i386/mul_1.S: Use C_GLOBAL_NAME.
19589 * mpn/i386/mul_1.S, mpn/i386/addmul_1.S, mpn/i386/submul_1.S:
19592 Sat May 14 14:21:02 1994 Torbjorn Granlund (tege@adder.cygnus.com)
19594 * gmp-impl.h: Don't define abort here.
19596 * mpz/pow_ui.c: Increase temporary allocation.
19597 * mpz/ui_pow_ui.c: Likewise.
19599 * gmp.h (mpz_add_1, mpz_sub_1): Don't call memcpy.
19601 * All Makefile.in: Delete spurious -I arguments.
19602 Update dependencies.
19604 * mpz/popcount.c: New file.
19605 * mpz/hamdist.c: New file.
19607 * All configure: Latest version from Cygnus.
19609 * mpq/Makefile.in: New file.
19610 * mpq/configure.in: New file.
19611 * Makefile.in, configure.in: Enable compilation of mpq.
19613 * mpq/set_z.c: Fix typos.
19614 * mpq/canonicalize.c: Fix typos.
19615 * mpq/cmp_ui.c: Fix typos.
19617 * mpf/add_ui.c: Read U->D into UP always. Delete spurious MPN_COPY.
19618 * mpf/sub_ui.c: Likewise.
19620 * gmp-impl.h: Don't redefine alloca.
19622 * COPYING.LIB: Renamed from COPYING.
19624 Wed May 11 01:45:44 1994 Torbjorn Granlund (tege@adder.cygnus.com)
19626 * mpz/powm_ui.c: When shifting E left by C+1, handle out-of-range
19627 shift counts. Fix typo when testing negative_result.
19628 * mpz/powm.c: Likewise.
19630 * mpz/ui_pow_ui.c: New file.
19631 * mpz/Makefile.in: Update.
19633 * mpz/pow_ui.c: Call __mpn_mul_n instead of __mpn_mul when possible.
19635 * mpz/div.c, mpz/div_ui.c, mpz/gcd.c: Prefix external mpn calls.
19636 * mpz/gcd.c: Declare mpn_xmod.
19638 * mpz/powm.c: Major changes to accommodate changed mpn semantics.
19639 * mpz/powm_ui.c: Update from mpz/powm.c.
19641 * mpz/tests/tst-io.c: New file.
19642 * mpz/tests/tst-logic: New file.
19643 * mpz/tests/Makefile.in: Update.
19645 * mpz/inp_str.c: Get base right when checking for first digit.
19646 * mpz/inp_str.c: Allocate more space for DEST when needed.
19648 * mpz/com.c: Use mpn_add_1 and mpn_sub_1.
19649 * mpz/and.c, mpz/ior.c: Likewise. Simplify somewhat.
19651 * mpz/add_ui.c: Use mpn_add_1 and mpn_sub_1.
19652 Rename parameters to be consistent with mpz/sub_ui.
19653 General simplifications.
19654 * mpz/sub_ui.x: Likewise.
19656 Tue Aug 10 19:41:16 1993 Torbjorn Granlund (tege@prudens.matematik.su.se)
19658 * mpf: New directory.
19659 * mpf/*.c: Merge basic set of mpf functions.
19661 * Many logs missing...
19663 Sun Apr 25 18:40:26 1993 Torbjorn Granlund (tege@pde.nada.kth.se)
19665 * memory.c: Use #if instead of #ifdef for __STDC__ for consistency.
19666 * bsd/xtom.c: Likewise.
19668 * mpz/div.c: Remove free_me and free_me_size and their usage.
19669 Use mpn_divmod for division; corresponding changes in return value
19671 * mpz/powm.c: `carry_digit' => `carry_limb'.
19672 * bsd/sdiv.c: Clearify comment.
19674 Sun Apr 25 00:31:28 1993 Torbjorn Granlund (tege@pde.nada.kth.se)
19676 * longlong.h (__udiv_qrnnd_c): Make all variables `unsigned long int'.
19678 Sat Apr 24 16:23:33 1993 Torbjorn Granlund (tege@pde.nada.kth.se)
19680 * longlong.h (__udiv_qrnnd_c): Make all variables `unsigned long int'.
19682 * gmp-impl.h: #define ABS.
19683 * (Many files): Use ABS instead of abs.
19685 * mpn/generic/sqrt.c, mpz/clrbit.c, mpz/get_si.c, mpz/mod_2exp.c,
19686 mpz/pow_ui.c: Cast 1 to mp_limb before shifting.
19688 * mpz/perfsqr.c: Use #if, not plain if for exclusion of code for
19689 non-32-bit machines.
19691 Tue Apr 20 13:13:58 1993 Torbjorn Granlund (tege@du.nada.kth.se)
19693 * mpn/generic/sqrt.c: Handle overflow for intermediate quotients by
19694 rounding them down to fit.
19696 * mpz/perfsqr.c (PP): Define in hexadecimal to avoid GCC warnings.
19698 * mpz/inp_str.c (char_ok_for_base): New function.
19699 (mpz_inp_str): Use it.
19701 Sun Mar 28 21:54:06 1993 Torbjorn Granlund (tege@cyklop.nada.kth.se)
19703 * mpz/inp_raw.c: Allocate x_index, not xsize limbs.
19705 Mon Mar 15 11:44:06 1993 Torbjorn Granlund (tege@pde.nada.kth.se)
19707 * mpz/pprime.c: Declare param `const'.
19708 * gmp.h: Add declarations for mpz_com.
19710 Thu Feb 18 14:10:34 1993 Torbjorn Granlund (tege@pde.nada.kth.se)
19712 * mpq/add.c, mpq/sub.c: Call mpz_clear for t.
19714 Fri Feb 12 20:27:34 1993 Torbjorn Granlund (tege@cyklop.nada.kth.se)
19716 * mpz/inp_str.c: Recog minus sign as first character.
19718 Wed Feb 3 01:36:02 1993 Torbjorn Granlund (tege@cyklop.nada.kth.se)
19720 * mpz/iset.c: Handle 0 size.
19722 Tue Feb 2 13:03:33 1993 Torbjorn Granlund (tege@cyklop.nada.kth.se)
19724 * mpz/mod_ui.c: Initialize dividend_size before it's used.
19726 Mon Jan 4 09:11:15 1993 Torbjorn Granlund (tege@sics.se)
19728 * bsd/itom.c: Declare param explicitly 'signed'.
19729 * bsd/sdiv.c: Likewise.
19731 * mpq/cmp.c: Remove unused variable tmp_size.
19732 * mpz/powm_ui.c: Fix typo in esize==0 if stmt.
19733 * mpz/powm.c: Likewise.
19735 Sun Nov 29 01:16:11 1992 Torbjorn Granlund (tege@sics.se)
19737 * mpn/generic/divmod_1.c (mpn_divmod_1): Handle
19738 divisor_limb == 1 << (BITS_PER_MP_LIMB - 1)
19741 * Reorganize sources. New directories mpn, mpn/MACH, mpn/generic,
19742 mpz, mpq, bsd. Use full file name for change logs hereafter.
19744 Wed Oct 28 17:40:04 1992 Torbjorn Granlund (tege@jupiter.sics.se)
19746 * longlong.h (__hppa umul_ppmm): Fix typos.
19747 (__hppa sub_ddmmss): Swap input arguments.
19749 * mpz_perfsqr.c (mpz_perfect_square_p): Avoid , before } in
19752 Sun Oct 25 20:30:06 1992 Torbjorn Granlund (tege@jupiter.sics.se)
19754 * mpz_pprime.c (mpz_probab_prime_p): Handle numbers <= 3
19755 specifically (used to consider all negative numbers prime).
19757 * mpz_powm_ui: `carry_digit' => `carry_limb'.
19759 * sdiv: Handle zero dividend specifically. Replace most code in
19760 this function with a call to mpn_divmod_1.
19762 Fri Sep 11 22:15:55 1992 Torbjorn Granlund (tege@tarrega.sics.se)
19764 * mpq_clear: Don't free the MP_RAT!
19766 * mpn_lshift, mpn_rshift, mpn_rshiftci: Remove `long' from 4:th arg.
19768 Thu Sep 3 01:47:07 1992 Torbjorn Granlund (tege@jupiter.sics.se)
19770 * All files: Remove leading _ from mpn function names.
19772 Wed Sep 2 22:21:16 1992 Torbjorn Granlund (tege@jupiter.sics.se)
19774 Fix from Jan-Hein Buhrman:
19775 * mpz_mdiv.c, mpz_mmod.c, mpz_mdm.c: Make them work as documented.
19777 * mpz_mmod.c, mpz_mdm.c: Move decl of TEMP_DIVISOR to reflect its
19780 Sun Aug 30 18:37:15 1992 Torbjorn Granlund (tege@jupiter.sics.se)
19782 * _mpz_get_str: Use mpz_sizeinbase for computing out_len.
19783 * _mpz_get_str: Don't remove leading zeros. Abort if there are some.
19785 Wed Mar 4 17:56:56 1992 Torbjorn Granlund (tege@zevs.sics.se)
19787 * gmp.h: Change definition of MP_INT to make the & before params
19788 optional. Use typedef to define it.
19789 * mp.h: Use typedef to define MINT.
19791 Tue Feb 18 14:38:39 1992 Torbjorn Granlund (tege@zevs.sics.se)
19793 longlong.h (hppa umul_ppmm): Add missing semicolon. Declare type
19796 Fri Feb 14 21:33:21 1992 Torbjorn Granlund (tege@zevs.sics.se)
19798 * longlong.h: Make default count_leading_zeros work for machines >
19799 32 bits. Prepend `__' before local variables to avoid conflicts
19800 with users' variables.
19802 * mpn_dm_1.c: Remove udiv_qrnnd_preinv ...
19803 * gmp-impl.h: ... and put it here.
19804 * mpn_mod_1: Use udiv_qrnnd_preinv if it is faster than udiv_qrnnd.
19806 Tue Feb 11 17:20:12 1992 Torbjorn Granlund (tege@zevs.sics.se)
19808 * mpn_mul: Enhance base case by handling small multiplicands.
19809 * mpn_dm_1.c: Revert last change.
19811 Mon Feb 10 11:55:15 1992 Torbjorn Granlund (tege@zevs.sics.se)
19813 * mpn_dm_1.c: Don't define udiv_qrnnd_preinv unless needed.
19815 Fri Feb 7 16:26:16 1992 Torbjorn Granlund (tege@zevs.sics.se)
19817 * mpn_mul: Replace code for base case.
19819 Thu Feb 6 15:10:42 1992 Torbjorn Granlund (tege@zevs.sics.se)
19821 * mpn_dm_1.c (_mpn_divmod_1): Add code for avoiding division by
19822 pre-inverting divisor.
19824 Sun Feb 2 11:10:25 1992 Torbjorn Granlund (tege@zevs.sics.se)
19826 * longlong.h: Make __LLDEBUG__ work differently.
19827 (_IBMR2): Reinsert old code.
19829 Sat Feb 1 16:43:00 1992 Torbjorn Granlund (tege@zevs.sics.se)
19831 * longlong.h (#ifdef _IBMR2): Replace udiv_qrnnd with new code
19832 using floating point operations. Don't define
19833 UDIV_NEEDS_NORMALIZATION any longer.
19835 Fri Jan 31 15:09:13 1992 Torbjorn Granlund (tege@zevs.sics.se)
19837 * longlong.h: Define UMUL_TIME and UDIV_TIME for most machines.
19838 * longlong.h (#ifdef __hppa): Define umul_ppmm.
19840 Wed Jan 29 16:41:36 1992 Torbjorn Granlund (tege@zevs.sics.se)
19842 * mpn_cmp: Only one length parameter, assume operand lengths are
19843 the same. Don't require normalization.
19844 * mpq_cmp, mpz_add, mpz_sub, mpz_gcd, mpn_mul, mpn_sqrt: Change for
19845 new mpn_cmp definition.
19847 Tue Jan 28 11:18:55 1992 Torbjorn Granlund (tege@zevs.sics.se)
19849 * _mpz_get_str: Fix typo in comment.
19851 Mon Jan 27 09:44:16 1992 Torbjorn Granlund (tege@zevs.sics.se)
19853 * Makefile.in: Add new files.
19855 * mpn_dm_1.c: New file with function _mpn_divmod_1.
19856 * mpz_dm_ui.c (mpz_divmod_ui): Use _mpn_divmod_1.
19857 * mpz_div_ui: Likewise.
19859 * mpn_mod_1.c: New file with function _mpn_mod_1.
19860 * mpz_mod_ui: Use _mpn_mod_1.
19862 Thu Jan 23 18:54:09 1992 Torbjorn Granlund (tege@zevs.sics.se)
19864 Bug found by Paul Zimmermann (zimmermann@inria.inria.fr):
19865 * mpz_div_ui.c (mpz_div_ui), mpz_dm_ui.c (mpz_divmod_ui):
19866 Handle dividend == 0.
19868 Wed Jan 22 12:02:26 1992 Torbjorn Granlund (tege@zevs.sics.se)
19870 * mpz_pprime.c: Use "" for #include.
19872 Sun Jan 19 13:36:55 1992 Torbjorn Granlund (tege@zevs.sics.se)
19874 * mpn_rshiftci.c (header): Correct comment.
19876 Wed Jan 15 18:56:04 1992 Torbjorn Granlund (tege@zevs.sics.se)
19878 * mpz_powm, mpz_powm_ui (if (bsize > msize)): Do alloca (bsize + 1)
19879 to make space for ignored quotient at the end. (The quotient might
19880 always be an extra limb.)
19882 Tue Jan 14 21:28:48 1992 Torbjorn Granlund (tege@zevs.sics.se)
19884 * mpz_powm_ui: Fix comment.
19885 * mpz_powm: Likewise.
19887 Mon Jan 13 18:16:25 1992 Torbjorn Granlund (tege@zevs.sics.se)
19889 * tests/Makefile.in: Prepend $(TEST_PREFIX) to Makefile target.
19891 Sun Jan 12 13:54:28 1992 Torbjorn Granlund (tege@zevs.sics.se)
19893 Fixes from Kazumaro Aoki:
19894 * mpz_out_raw: Take abs of size to handle negative values.
19895 * mpz_inp_raw: Reallocate before reading ptr from X.
19896 * mpz_inp_raw: Store, don't read, size to x->size.
19898 Tue Jan 7 17:50:25 1992 Torbjorn Granlund (tege@zevs.sics.se)
19900 * gmp.h, mp.h: Remove parameter names from prototypes.
19902 Sun Dec 15 00:09:36 1991 Torbjorn Granlund (tege@zevs.sics.se)
19904 * tests/Makefile.in: Prepend "./" to file names when executing
19907 * Makefile.in: Fix many problems.
19909 Sat Dec 14 01:00:02 1991 Torbjorn Granlund (tege@zevs.sics.se)
19911 * mpn_sqrt.c: New file with _mpn_sqrt.
19912 * mpz_sqrt, mpz_sqrtrem, mpz_perfect_square_p: Use _mpn_sqrt.
19913 * msqrt.c: Delete. Create from mpz_sqrtrem.c in Makefile.in.
19914 * mpz_do_sqrt.c: Delete.
19915 * Makefile.in: Update to reflect these changes.
19917 * Makefile.in, configure, configure.subr: New files
19918 (from bothner@cygnus.com).
19919 * dist-Makefile: Delete.
19921 * mpz_fac_ui: Fix comment.
19923 * mpz_random2: Rewrite a bit to make it possible for the most
19924 significant limb to be == 1.
19926 * mpz_pprime.c (mpz_probab_prime_p): Remove \t\n.
19928 Fri Dec 13 23:10:02 1991 Torbjorn Granlund (tege@zevs.sics.se)
19930 * mpz_do_sqrt: Simplify special case for U == 0.
19931 * m*sqrt*.c, mpz_perfsqr.c (mpz_perfect_square_p):
19932 Rename _mpz_impl_sqrt to _mpz_do_sqrt.
19934 Fri Dec 13 12:52:28 1991 Torbjorn Granlund (tege@zevs.sics.se)
19936 * gmp-impl.h (MPZ_TMP_INIT): Cast to the right type.
19938 Thu Dec 12 22:17:29 1991 Torbjorn Granlund (tege@zevs.sics.se)
19940 * mpn_add, mpn_sub, mpn_mul, mpn_div: Change type of several
19941 variables to mp_size.
19943 Wed Dec 11 22:00:34 1991 Torbjorn Granlund (tege@zevs.sics.se)
19945 * mpn_rshift.c: Fix header comments.
19947 Mon Dec 9 17:46:10 1991 Torbjorn Granlund (tege@zevs.sics.se)
19951 * gmp-impl.h (MPZ_TMP_INIT): Cast alloca return value.
19953 * dist-Makefile: Add missing dependency for cre-mparam.
19955 * mpz_mdiv.c, mpz_mmod.c, mpz_mdm.c, mpz_mdiv_ui.c,
19956 mpz_mmod_ui.c, mpz_mdm_ui.c: Remove obsolete comment.
19958 * dist-Makefile (clean): clean in tests subdir too.
19959 * tests/Makefile: Define default values for ROOT and SUB.
19961 * longlong.h (__a29k__ udiv_qrnnd): Change "q" to "1" for operand
19964 Mon Nov 11 00:06:05 1991 Torbjorn Granlund (tege@zevs.sics.se)
19966 * mpz_sizeinb.c (mpz_sizeinbase): Special code for size == 0.
19968 Sat Nov 9 23:47:38 1991 Torbjorn Granlund (tege@zevs.sics.se)
19972 * dist-Makefile, Makefile, tests/Makefile: Merge tests into
19975 Fri Nov 8 22:57:19 1991 Torbjorn Granlund (tege@zevs.sics.se)
19977 * gmp.h: Don't use keyword `signed' for non-ANSI compilers.
19979 Thu Nov 7 22:06:46 1991 Torbjorn Granlund (tege@zevs.sics.se)
19981 * longlong.h: Cosmetic changes to keep it identical to gcc2 version
19983 * longlong.h (__ibm032__): Fix operand order for add_ssaaaa and
19986 Mon Nov 4 00:36:46 1991 Torbjorn Granlund (tege@zevs.sics.se)
19988 * mpn_mul: Fix indentation.
19990 * mpz_do_sqrt: Don't assume 32 bit limbs (had constant
19992 * mpz_do_sqrt: Handle overflow in conversion from double returned
19993 by SQRT to mp_limb.
19995 * gmp.h: Add missing function definitions.
19997 Sun Nov 3 18:25:25 1991 Torbjorn Granlund (tege@zevs.sics.se)
19999 * mpz_pow_ui: Change type of `i' to int.
20001 * ChangeLog: Add change log entry.
20002 * ChangeLog: Add change log entry.
20003 * ChangeLog: Add change log entry.
20004 * ChangeLog: Add change log entry.
20005 * ChangeLog: Add change log entry.
20006 * ChangeLog: Add change log entry.
20007 * ChangeLog: Add change log entry.
20008 * ChangeLog: Add change log entry.
20011 * mpz_pow_ui.c: Fix typo in comment.
20013 * dist-Makefile: Create rpow.c from mpz_powm_ui.c.
20014 * mpz_powm_ui.c: Add code for rpow.
20015 * rpow.c: Delete this file. The rpow function is now implemented
20018 * mpz_fac_ui.c: New file.
20019 * gmp.h, dist-Makefile: Add stuff for mpz_fac_ui.
20021 Bug found by John Amanatides (amana@sasquatch.cs.yorku.ca):
20022 * mpz_powm_ui, mpz_powm: Call _mpn_mul in the right way, with
20023 the first argument not smaller than the second.
20025 Tue Oct 29 13:56:55 1991 Torbjorn Granlund (tege@zevs.sics.se)
20027 * cre-conv-tab.c (main), cre-mparam.c (main): Fix typo in output
20030 Mon Oct 28 00:35:29 1991 Torbjorn Granlund (tege@zevs.sics.se)
20032 * mpz_random2: Handle size == 0.
20034 * gmp-impl.h (struct __mp_bases): Rename chars_per_limb_exactly to
20035 chars_per_bit_exactly, and change its definition.
20036 * cre-conv-tab.c (main): Output field according to its new
20038 * mpz_out_str, _mpz_get_str, mpz_sizeinb, mout:
20039 Use chars_per_bit_exactly.
20041 * mpz_random2: Change the loop termination condition in order to
20042 get a large most significant limb with higher probability.
20044 * gmp.h: Add declaration of new mpz_random2 and mpz_get_si.
20045 * mpz_get_si.c: New file.
20046 * dist-Makefile: Add mpz_random2 and mpz_get_si.
20048 * mpz_sizeinb.c (mpz_sizeinbase): Special code for base being a
20049 power of 2, giving exact result.
20051 * mpn_mul: Fix MPN_MUL_VERIFY in various ways.
20052 * mpn_mul: New macro KARATSUBA_THRESHOLD.
20053 * mpn_mul (karatsuba's algorithm): Don't write intermediate results
20054 to prodp, use temporary pp instead. (Intermediate results can be
20055 larger than the final result, possibly writing into hyperspace.)
20056 * mpn_mul: Make smarter choice between Karatsuba's algorithm and the
20057 shortcut algorithm.
20058 * mpn_mul: Fix typo, cy instead of xcy. Unify carry handling code.
20060 Sun Oct 27 19:57:32 1991 Torbjorn Granlund (tege@zevs.sics.se)
20062 * mpn_mul: In non-classical case, choose Karatsuba's algorithm only
20063 when usize > 1.5 vsize.
20065 * mpn_mul: Break between classical and Karatsuba's algorithm at
20066 KARATSUBA_THRESHOLD, if defined. Default to 8.
20068 * mpn_div: Kludge to fix stray memory read.
20070 Sat Oct 26 20:06:14 1991 Torbjorn Granlund (tege@zevs.sics.se)
20072 * mpz_gcdext: Handle a = b = 0. Remove memory leakage by calling
20073 mpz_clear for all temporary variables.
20075 * mpz_gcd: Reduce w_bcnt in _mpn_lshift call to hold that
20076 function's argument constraints. Compute wsize correctly.
20078 * mpz_gcd: Fix typo in comment.
20080 * memory.c (_mp_default_allocate, _mp_default_reallocate): Call
20081 abort if allocation fails, don't just exit.
20083 Fri Oct 25 22:17:20 1991 Torbjorn Granlund (tege@zevs.sics.se)
20085 * mpz_random2.c: New file.
20087 Thu Oct 17 18:06:42 1991 Torbjorn Granlund (tege@zevs.sics.se)
20089 Bugs found by Pierre-Joseph Gailly (pjg@sunbim.be):
20090 * mpq_cmp: Take sign into account, don't just compare the
20092 * mpq_cmp: Call _mpn_mul in the right way, with the first argument
20093 not smaller than the second.
20095 Wed Oct 16 19:27:32 1991 Torbjorn Granlund (tege@zevs.sics.se)
20097 * mpz_random: Ensure the result is normalized.
20099 Tue Oct 15 14:55:13 1991 Torbjorn Granlund (tege@zevs.sics.se)
20101 * mpz_clrbit: Support non-ANSI compilers.
20103 Wed Oct 9 18:03:28 1991 Torbjorn Granlund (tege@zevs.sics.se)
20105 * longlong.h (68k add_ssaaaa, sub_ddmmss): Generalize constraints.
20107 Tue Oct 8 17:42:59 1991 Torbjorn Granlund (tege@zevs.sics.se)
20109 * mpz_mdm_ui: Add comments.
20111 * mpz_mdiv: Use MPZ_TMP_INIT instead of mpz_init.
20112 * mpz_init_ui: Change spacing and header comment.
20114 Thu Oct 3 18:36:13 1991 Torbjorn Granlund (tege@zevs.sics.se)
20116 * dist-Makefile: Prepend `./' before some filenames.
20118 Sun Sep 29 14:02:11 1991 Torbjorn Granlund (tege@zevs.sics.se)
20120 Released 1.1 (public).
20122 * mpz_com: New name of mpz_not.
20123 * dist-Makefile: Change mpz_not to mpz_com.
20125 Tue Sep 24 12:44:11 1991 Torbjorn Granlund (tege@zevs.sics.se)
20127 * longlong.h: Fix header comment.
20129 Mon Sep 9 15:16:24 1991 Torbjorn Granlund (tege@zevs.sics.se)
20133 * mpn_mul.c (_mpn_mul): Handle leading zero limbs in non-Karatsuba
20136 * longlong.h (m68000 umul_ppmm): Clobber one register less by
20137 slightly rearranging the code.
20139 Sun Sep 1 18:53:25 1991 Torbjorn Granlund (tege@zevs.sics.se)
20141 * dist-Makefile (stamp-stddefh): Fix typo.
20143 Sat Aug 31 20:41:31 1991 Torbjorn Granlund (tege@zevs.sics.se)
20147 * mpz_mdiv.c, mpz_mmod.c, mpz_mdm.c, mpz_mdiv_ui.c,
20148 mpz_mmod_ui.c, mpz_mdm_ui.c: New files and functions.
20149 * gmp.h, gmp.texi: Define the new functions.
20151 Fri Aug 30 08:32:56 1991 Torbjorn Granlund (tege@zevs.sics.se)
20153 * mpz_gcdext: Compute t argument from the other quantities at the
20154 end, of the function, not in the loop. New feature: Allow t to be
20157 * mpz_add.c, mpz_sub.c, mpz_mul.c, mpz_powm.c, mpz_gcd.c: Don't
20158 include "mp.h". Use type name `MP_INT' always.
20160 * dist-Makefile, mpz_cmp.c: Merge mcmp.c from mpz_cmp.c.
20162 Wed Aug 28 00:45:11 1991 Torbjorn Granlund (tege@zevs.sics.se)
20164 * dist-Makefile (documentation): Go via tmp.texi to avoid the
20165 creation of gmp.dvi if any errors occur. Make tex read input
20168 Fri Aug 23 15:58:52 1991 Torbjorn Granlund (tege@zevs.sics.se)
20170 * longlong.h (68020, i386): Don't define machine-dependent
20171 __umulsidi3 (so the default definition is used).
20172 * longlong.h (all machines): Cast all operands, sources and
20173 destinations, to `unsigned long int'.
20174 * longlong.h: Add gmicro support.
20176 Thu Aug 22 00:28:29 1991 Torbjorn Granlund (tege@zevs.sics.se)
20178 * longlong.h: Rename BITS_PER_LONG to LONG_TYPE_SIZE.
20179 * longlong.h (__ibm032__): Define count_leading_zeros and umul_ppmm.
20180 * longlong.h: Define UMUL_TIME and UDIV_TIME for some CPUs.
20181 * _mpz_get_str.c: Add code to do division by big_base using only
20182 umul_qrnnd, if that is faster. Use UMUL_TIME and UDIV_TIME to
20183 decide which variant to use.
20185 Wed Aug 21 15:45:23 1991 Torbjorn Granlund (tege@zevs.sics.se)
20187 * longlong.h (__sparc__ umul_ppmm): Move two insn from end to the
20188 nops. (Saves two insn.)
20190 * longlong.h (__sparc__ umul_ppmm): Rewrite in order to avoid
20191 branch, and to permit input/output register overlap.
20193 * longlong.h (__29k__): Remove duplicated udiv_qrnnd definition.
20194 * longlong.h (__29k__ umul_ppmm): Split asm instructions into two
20195 asm statements (gives better code if either the upper or lower
20196 part of the product is unused.
20198 Tue Aug 20 17:57:59 1991 Torbjorn Granlund (tege@zevs.sics.se)
20200 * _mpz_get_str.c (outside of functions): Remove
20201 num_to_ascii_lower_case and num_to_ascii_upper_case. Use string
20202 constants in the function instead.
20204 Mon Aug 19 00:37:42 1991 Torbjorn Granlund (tege@zevs.sics.se)
20206 * cre-conv-tab.c (main): Output table in hex. Output 4 fields, not
20207 3, for components 0 and 1.
20209 * gmp.h: Add declaration of mpq_neg.
20211 Released 1.0beta.13.
20213 * _mpz_set_str.c (mpz_set_str): Cast EOF and SPC to char before
20214 comparing to enum literals SPC and EOF. This makes the code work
20215 for compilers where `char' is unsigned. (Bug found by Brian
20218 Released 1.0beta.12.
20220 * mpz_mod_ui: Remove references to quot. Remove quot_ptr, quot_size
20221 declarations and assignment code.
20223 Sun Aug 18 14:44:26 1991 Torbjorn Granlund (tege@zevs.sics.se)
20225 * mpz_mod_ui: Handle dividend < 0.
20227 Released 1.0beta.11.
20229 * mpz_dm_ui, mpz_div_ui, mpz_mod_ui, sdiv: Make them share the same
20230 general structure, variable names, etc.
20232 * sdiv: Un-normalize the remainder in n1 before it is negated.
20234 * longlong.h: Mention UDIV_NEEDS_NORMALIZATION in description of
20237 * mpz_dm_ui.c (mpz_divmod_ui), mpz_div_ui.c (mpz_div_ui): Increment
20238 the quotient size if the dividend size is incremented. (Bug found
20241 * mpz_mod_ui: Shift back the remainder, if UDIV_NEEDS_NORMALIZATION.
20242 (Bug found by Brian Beuning.)
20244 * mpz_mod_ui: Replace "digit" by "limb".
20246 * mpz_perfsqr.c (mpz_perfect_square_p): Disable second test case
20247 for non-32-bit machines (PP is hardwired for such machines).
20248 * mpz_perfsqr.c (outside of functions): Define PP value with an L.
20250 * mpn_mul.c (_mpn_mul): Add verification code that is activated if
20251 DEBUG is defined. Replace "digit" by "limb".
20252 * mpn_mul.c (_mpn_mul: Karatsuba's algorithm: 4.): Normalize temp
20253 after the addition.
20254 * mpn_mul.c (_mpn_mul: Karatsuba's algorithm: 1.): Compare u0_size
20255 and v0_size, and according to the result, swap arguments in
20256 recursive call. (Don't violate mpn_mul's own argument
20259 Fri Aug 16 13:47:12 1991 Torbjorn Granlund (tege@zevs.sics.se)
20261 Released 1.0beta.10.
20263 * longlong.h (IBMR2): Add udiv_qrnnd.
20265 * mpz_perfsqr: Remove unused variables.
20267 * mpz_and (case for different signs): Initialize loop variable i!
20269 * dist-Makefile: Update automatically generated dependencies.
20270 * dist-Makefile (madd.c, msub.c, pow.c, mult.c, gcd.c): Add mp.h,
20271 etc to dependency file lists.
20273 * longlong.h (add_ssaaaa, sub_ddmmss [C default versions]): Make __x
20274 `unsigned long int'.
20275 * longlong.h: Add `int' after `unsigned' and `long' everywhere.
20277 Wed Aug 14 18:06:48 1991 Torbjorn Granlund (tege@zevs.sics.se)
20279 * longlong.h: Add ARM, i860 support.
20281 * mpn_lshift, mpn_rshift, mpn_rshiftci: Rename *_word with *_limb.
20283 Tue Aug 13 21:57:43 1991 Torbjorn Granlund (tege@zevs.sics.se)
20285 * _mpz_get_str.c, _mpz_set_str.c, mpz_sizeinb.c (mpz_sizeinbase),
20286 mpz_out_str.c, mout.c: Remove declaration of __mp_bases.
20287 * gmp-impl.h: Put it here, and make it `const'.
20288 * cre-conv-tab.c (main): Make struct __mp_bases `const'.
20290 Mon Aug 12 17:11:46 1991 Torbjorn Granlund (tege@zevs.sics.se)
20292 * cre-conv-tab.c (main): Use %lu in printf for long ints.
20294 * dist-Makefile: Fix cre-* dependencies.
20296 * cre-conv-tab.c (main): Output field big_base_inverted.
20298 * gmp-impl.h (struct bases): New field big_base_inverted.
20299 * gmp-impl.h (struct bases): Change type of chars_per_limb_exactly
20300 to float (in order to keep the structure smaller).
20302 * mp.h, gmp.h: Change names of macros for avoiding multiple
20305 Fri Aug 9 18:01:36 1991 Torbjorn Granlund (tege@zevs.sics.se)
20307 * _mpz_get_str: Only shift limb array if normalization_steps != 0
20310 * longlong.h (sparc umul_ppmm): Use __asm__, not asm.
20311 * longlong.h (IBMR2 umul_ppmm): Refer to __m0 and __m1, not to m0
20312 and m1 (overlap between output and input operands did not work).
20313 * longlong.h: Add VAX, ROMP and HP-PA support.
20314 * longlong.h: Sort the machine dependent code in alphabetical order
20316 * longlong.h: Hack comments.
20318 Thu Aug 8 14:13:36 1991 Torbjorn Granlund (tege@zevs.sics.se)
20320 Released 1.0beta.9.
20322 * longlong.h: Define BITS_PER_LONG to 32 if it's not already
20324 * Define __BITS4 to BITS_PER_LONG / 4.
20325 * Don't assume 32 bit word size in "count_leading_zeros" C macro.
20326 Use __BITS4 and BITS_PER_LONG instead.
20328 * longlong.h: Don't #undef internal macros (reverse change of Aug 3).
20330 * longlong.h (68k): Define add_ssaaaa sub_ddmmss, and umul_ppmm
20331 even for plain mc68000.
20333 * mpq_div: Flip the sign of the numerator *and* denominator of the
20334 result if the intermediate denominator is negative.
20336 * mpz_and.c, mpz_ior.c: Use MPN_COPY for all copying operations.
20338 * mpz_and.c: Compute the result size more conservatively.
20339 * mpz_ior.c: Likewise.
20341 * mpz_realloc: Never allocate zero space even if NEW_SIZE == 0.
20343 * dist-Makefile: Remove madd.c, msub.c, pow.c, mult.c, gcd.c from
20346 * dist-Makefile: Create mult.c from mpz_mul.c.
20347 * mult.c: Delete this file.
20349 * _mpz_set_str: Normalize the result (for bases 2, 4, 8... it was
20350 not done properly if the input string had many leading zeros).
20352 Sun Aug 4 16:54:14 1991 Torbjorn Granlund (tege@zevs.sics.se)
20354 * dist-Makefile (gcd.c, pow.c, madd.c, msub.c): Make these targets
20355 work with VPATH and GNU MP.
20357 * mpz_gcd: Don't call mpz_set; inline its functionality.
20359 * mpq_mul, mpq_div: Fix several serious typos.
20361 * mpz_dmincl, mpz_div: Don't normalize the quotient if it's already
20364 * mpq_neg.c: New file.
20366 * dist-Makefile: Remove obsolete dependencies.
20368 * mpz_sub: Fix typo.
20370 Bugs found by Pierre-Joseph Gailly (pjg@sunbim.be):
20371 * mpq_mul, mpq_div: Initialize tmp[12] variables even when the gcd
20373 * mpz_gcd: Handle gcd(0,v) and gcd(u,0) in special cases.
20375 Sat Aug 3 23:45:28 1991 Torbjorn Granlund (tege@zevs.sics.se)
20377 * longlong.h: Clean up comments.
20378 * longlong.h: #undef internal macros.
20380 Fri Aug 2 18:29:11 1991 Torbjorn Granlund (tege@zevs.sics.se)
20382 * mpq_set_si, mpq_set_ui: Canonicalize 0/x to 0/1.
20383 * mpq_set_si, mpq_set_ui: Cosmetic formatting changes.
20385 * mpz_dmincl.c: Normalize the remainder before shifting it back.
20387 * mpz_dm_ui.c (mpz_divmod_ui): Handle rem == dividend.
20389 * mpn_div.c: Fix comment.
20391 * mpz_add.c, mpz_sub.c: Use __MP_INT (not MP_INT) for intermediate
20392 type, in order to work for both GNU and Berkeley functions.
20394 * dist-Makefile: Create gcd.c from mpz_gcd.c, pow.c from mpz_powm,
20395 madd.c from mpz_add.c, msub.c from mpz_sub.c.
20397 * pow.c, gcd.c, mpz_powmincl.c, madd.c, msub.c: Remove these.
20398 * mpz_powm.c, mpz_gcd.c, mpz_add.c, mpz_sub.c: #ifdef for GNU and
20399 Berkeley function name variants.
20400 * dist-Makefile: Add created files to "clean" target.
20402 Tue Jul 16 15:19:46 1991 Torbjorn Granlund (tege@zevs.sics.se)
20404 * mpq_get_den: No need for absolute value of the size, the
20405 denominator is always positive.
20407 * mpz_get_ui: If the operand is zero, return zero. Don't read the
20410 * mpz_dmincl.c: Don't ignore the return value from _mpn_rshift, it
20411 is the size of the remainder.
20413 Mon Jul 15 11:08:05 1991 Torbjorn Granlund (tege@zevs.sics.se)
20415 * Several files: Remove unused variables and functions.
20417 * gmp-impl.h: Declare _mpz_impl_sqrt.
20419 * mpz_dm_ui (mpz_divmod_ui), sdiv: Shift back the remainder if
20420 UDIV_NEEDS_NORMALIZATION. (Fix from Brian Beuning.)
20422 * mpz_dm_ui.c, sdiv: Replace *digit with *limb.
20424 * mpz_ior: Add missing else statement in -OP1 | -OP2 case.
20425 * mpz_ior: Add missing else statement in OP1 | -OP2 case.
20426 * mpz_ior: Swap also OP1 and OP2 pointers in -OP1 & OP2 case.
20427 * mpz_ior: Duplicate _mpz_realloc code.
20429 * mpz_and: Add missing else statement in -OP1 & -OP2 case.
20430 * mpz_and: Rewrite OP1 & -OP2 case.
20431 * mpz_and: Swap also OP1 and OP2 pointers in -OP1 & OP2 case.
20433 * mpz_gcdext: Loop in d1.size (not b->size). (Fix from Brian
20436 * mpz_perfsqr: Fix argument order in _mpz_impl_sqrt call. (Fix from
20439 Fri Jul 12 17:10:33 1991 Torbjorn Granlund (tege@zevs.sics.se)
20441 * mpq_set.c, mpq_set_ui.c, mpq_set_si.c, mpq_inv.c,
20442 mpq_get_num.c, mpq_get_den.c, mpq_set_num.c, mpq_set_den.c:
20445 * mpz_dmincl.c: Remove second re-allocation of rem->d. It
20446 was never executed.
20448 * dist-Makefile: Use `-r' instead of `-x' for test for ranlib (as
20449 some unixes' test doesn't have the -r option).
20451 * *.*: Cast allocated pointers to the appropriate type (makes old C
20452 compilers happier).
20454 * cre-conv-tab.c (main): Divide max_uli by 2 and multiply again
20455 after conversion to double. (Kludge for broken C compilers.)
20457 * dist-Makefile (stamp-stddefh): New target. Test if "stddef.h"
20458 exists in the system and creates a minimal one if it does not
20460 * cre-stddefh.c: New file.
20461 * dist-Makefile: Make libgmp.a and libmp.a depend on stamp-stddefh.
20462 * dist-Makefile (clean): Add some more.
20463 * gmp.h, mp.h: Unconditionally include "stddef.h".
20465 Thu Jul 11 10:08:21 1991 Torbjorn Granlund (tege@zevs.sics.se)
20467 * min: Do ungetc of last read character.
20468 * min.c: include stdio.h.
20470 * dist-Makefile: Go via tmp- files for cre* redirection.
20471 * dist-Makefile: Add tmp* to "clean" target.
20473 * dist-Makefile: Use LOCAL_CC for cre*, to simplyfy cross
20476 * gmp.h, mp.h: Don't define NULL here.
20477 * gmp-impl.h: Define it here.
20479 Wed Jul 10 14:13:33 1991 Torbjorn Granlund (tege@zevs.sics.se)
20481 * mpz_mod_2exp: Don't copy too much, overwriting most significant
20484 * mpz_and, mpz_ior: Don't read op[12]_ptr from op[12] when
20485 reallocating res, if op[12]_ptr got their value from alloca.
20487 * mpz_and, mpz_ior: Clear up comments.
20489 * cre-mparam.c: Output parameters for `short int' and `int'.
20491 * mpz_and, mpz_ior: Negate negative op[12]_size in several places.
20493 Tue Jul 9 18:40:30 1991 Torbjorn Granlund (tege@zevs.sics.se)
20495 * gmp.h, mp.h: Test for _SIZE_T defined before typedef'ing size_t.
20496 (Fix for Sun lossage.)
20498 * gmp.h: Add declaration of mpq_clear.
20500 * dist-Makefile: Chack if "ranlib" exists, before using it.
20501 * dist-Makefile: Add mpz_sqrtrem.c and mpz_size.c.
20502 * mpz_powm: Fix typo, "pow" instead of "mpz_powm".
20504 Fri Jul 5 19:08:09 1991 Torbjorn Granlund (tege@zevs.sics.se)
20506 * move: Remove incorrect comment.
20508 * mpz_free, mpq_free: Rename to *_clear.
20509 * dist-Makefile: Likewise.
20510 * mpq_add, mpq_sub, mpq_mul, mpq_div: Likewise.
20512 * mpz_dmincl.c: Don't call "move", inline its functionality.
20514 Thu Jul 4 00:06:39 1991 Torbjorn Granlund (tege@zevs.sics.se)
20516 * Makefile: Include dist-Makefile. Fix dist target to include
20517 dist-Makefile (with the name "Makefile" in the archive).
20519 * dist-Makefile: New file made from Makefile. Add new mpz_...
20522 * mpz_powincl.c New file for mpz_powm (Berkeley MP pow)
20523 functionality. Avoids code duplication.
20524 * pow.c, mpz_powm.c: Include mpz_powincl.c
20526 * mpz_dmincl.c: New file containing general division code. Avoids
20528 * mpz_dm.c (mpz_divmod), mpz_mod.c (mpz_mod), mdiv.c (mdiv): Include
20531 * _mpz_get_str: Don't call memmove, unless HAS_MEMMOVE is defined.
20532 Instead, write the overlapping memory copying inline.
20534 * mpz_dm_ui.c: New name for mpz_divmod_ui.c (SysV file name limit).
20536 * longlong.h: Don't use #elif.
20537 * mpz_do_sqrt.c: Likewise.
20539 * longlong.h: Use __asm__ instead of asm.
20540 * longlong.h (sparc udiv_qrnnd): Make it to one string over several
20543 * longlong.h: Preend __ll_ to B, highpart, and lowpart.
20545 * longlong.h: Move array t in count_leading_zeros to the new file
20546 mp_clz_tab.c. Rename the array __clz_tab.
20547 * All files: #ifdef for traditional C compatibility.
20549 Wed Jul 3 11:42:14 1991 Torbjorn Granlund (tege@zevs.sics.se)
20551 * mpz_and: Initialize res_ptr always (used to be initialized only
20552 when reallocating).
20554 * longlong.h (umul_ppmm [C variant]): Make __ul...__vh
20555 `unsigned int', and cast the multiplications. This way
20556 compilers more easily can choose cheaper multiplication
20559 * mpz_mod_2exp: Handle input argument < modulo argument.
20560 * mpz_many: Make sure mp_size is the type for sizes, not int.
20562 * mpz_init, mpz_init_set*, mpq_init, mpq_add, mpq_sub, mpq_mul,
20563 mpq_div: Change mpz_init* interface. Structure pointer as first
20564 arg to initialization function, no longer *return* struct.
20566 Sun Jun 30 19:21:44 1991 Torbjorn Granlund (tege@zevs.sics.se)
20568 * Rename mpz_impl_sqrt.c to mpz_do_sqrt.c to satisfy SysV 14
20569 character file name length limit.
20571 * Most files: Rename MINT to MP_INT. Rename MRAT to MP_RAT.
20572 * mpz_sizeinb.c: New file with function mpz_sizeinbase.
20573 * mp_bases.c: New file, with array __mp_bases.
20574 * _mpz_get_str, _mpz_set_str: Remove struct bases, use extern
20575 __mp_bases instead.
20576 * mout, mpz_out_str: Use array __mp_bases instead of function
20578 * mpz_get_cvtlen.c: Remove.
20579 * Makefile: Update.
20581 Sat Jun 29 21:57:28 1991 Torbjorn Granlund (tege@zevs.sics.se)
20583 * longlong.h (__sparc8__ umul_ppmm): Insert 3 nop:s for wr delay.
20584 * longlong.h (___IBMR2__): Define umul_ppmm, add_ssaaaa, sub_ddmmss.
20585 * longlong.h (__sparc__): Don't call .umul; expand asm instead.
20586 Don't define __umulsidi3 (i.e. use default definition).
20588 Mon Jun 24 17:37:23 1991 Torbjorn Granlund (tege@amon.sics.se)
20590 * _mpz_get_str.c (num_to_ascii_lower_case, num_to_ascii_upper_case):
20593 Sat Jun 22 13:54:01 1991 Torbjorn Granlund (tege@zevs.sics.se)
20595 * mpz_gcdext.c: New file.
20597 * mpn_mul: Handle carry and unexpected operand sizes in last
20598 additions/subtractions. (Bug trigged when v1_size == 1.)
20600 * mp*_alloc*: Rename functions to mp*_init* (files to mp*_iset*.c).
20601 * mpq_*: Call mpz_init*.
20603 * mpz_pow_ui, rpow: Use _mpn_mul instead of mult. Restructure.
20605 Wed May 29 20:32:33 1991 Torbjorn Granlund (tege@zevs.sics.se)
20607 * mpz_get_cvtlen: multiply by size.
20609 Sun May 26 15:01:15 1991 Torbjorn Granlund (tege@bella.nada.kth.se)
20611 Alpha-release 0.95.
20613 Fixes from Doug Lea (dl@g.oswego.edu):
20614 * mpz_mul_ui: Loop to MULT_SIZE (not PROD_SIZE). Adjust PROD_SIZE
20616 * mpz_div: Prepend _ to mpz_realloc.
20617 * mpz_set_xs, mpz_set_ds: Fix typos in function name.
20619 Sat May 25 22:51:16 1991 Torbjorn Granlund (tege@bella.nada.kth.se)
20621 * mpz_divmod_ui: New function.
20623 * sdiv: Make the sign of the remainder correct.
20625 Thu May 23 15:28:24 1991 Torbjorn Granlund (tege@zevs.sics.se)
20627 * Alpha-release 0.94.
20629 * mpz_mul_ui: Include longlong.h.
20631 * mpz_perfsqr.c (mpz_perfect_square_p): Call _mpz_impl_sqrt instead
20634 * mpz_impl_sqrt: Don't call "move", inline its functionality.
20636 * mdiv: Use MPN_COPY instead of memcpy.
20637 * rpow, mpz_mul, mpz_mod_2exp: Likewise.
20638 * pow.c: Likewise, and fix bug in the size arg.
20640 * xtom: Don't use mpz_alloc, inline needed code instead. Call
20641 _mpz_set_str instead of mpz_set_str.
20643 * Makefile: Make two libraries, libmp.a and libgmp.a.
20645 Thu May 22 20:25:29 1991 Torbjorn Granlund (tege@zevs.sics.se)
20647 * Add manual to distribution.
20648 * Fold in many missing routines descibed in the manual.
20651 Wed May 22 13:48:46 1991 Torbjorn Granlund (tege@zevs.sics.se)
20653 * mpz_set_str: Make it handle 0x prefix OK.
20655 Sat May 18 18:31:02 1991 Torbjorn Granlund (tege@zevs.sics.se)
20657 * memory.c (_mp_default_reallocate): Swap OLD_SIZE and NEW_SIZE
20659 * mpz_realloc (_mpz_realloc): Swap in call to _mp_reallocate_func.
20662 Thu May 16 20:43:05 1991 Torbjorn Granlund (tege@zevs.sics.se)
20664 * memory.c: Make the default allocations functions global.
20665 * mp_set_fns (mp_set_memory_functions): Make a NULL pointer mean the
20666 default memory function.
20668 Wed May 8 20:02:42 1991 Torbjorn Granlund (tege@zevs.sics.se)
20670 * mpz_div: Handle DEN the same as QUOT correctly by copying DEN->D
20671 even if no normalization is needed.
20672 * mpz_div: Rework reallocation scheme, to avoid excess copying.
20674 * mpz_sub_ui.c, mpz_add_ui.c: New files.
20676 * mpz_cmp.c, mpz_cmp_ui.c: New files.
20678 * mpz_mul_2exp: Handle zero input MINT correctly.
20680 * mpn_rshiftci: Don't handle shift counts > BITS_PER_MP_DIGIT.
20682 * mpz_out_raw.c, mpz_inp_raw.c: New files for raw I/O.
20684 Tue May 7 15:44:58 1991 Torbjorn Granlund (tege@zevs.sics.se)
20686 * mpn_rshift: Don't handle shift counts > BITS_PER_MP_DIGIT.
20687 * mpz_div_2exp: Don't call _mpn_rshift with cnt > BITS_PER_MP_DIGIT.
20688 * gcd, mpz_gcd: Likewise.
20690 * gcd, mpz_gcd: Handle common 2 factors correctly.
20692 Mon May 6 20:22:59 1991 Torbjorn Granlund (tege@zevs.sics.se)
20694 * gmp-impl.h (MPN_COPY): Inline a loop instead of calling memcpy.
20696 * gmp-impl.h, mpz_get_str, rpow: Swap DST and SRC in TMPCOPY* macros.
20698 Sun May 5 15:16:23 1991 Torbjorn Granlund (tege@zevs.sics.se)
20700 * mpz_div: Remove test for QUOT == 0.
20702 Sun Apr 28 20:21:04 1991 Torbjorn Granlund (tege@zevs.sics.se)
20704 * pow: Don't make MOD normalization in place, as it's a bad idea to
20705 write on an input parameter.
20706 * pow: Reduce BASE if it's > MOD.
20707 * pow, mult, mpz_mul: Simplify realloc code.
20709 Sat Apr 27 21:03:11 1991 Torbjorn Granlund (tege@zevs.sics.se)
20711 * Install multplication using Karatsuba's algorithm as default.
20713 Fri Apr 26 01:03:57 1991 Torbjorn Granlund (tege@zevs.sics.se)
20715 * msqrt: Store in ROOT even for U==0, to make msqrt(0) defined.
20717 * mpz_div_2exp.c, mpz_mul_2exp.c: New files for shifting right and
20718 left, respectively.
20719 * gmp.h: Add definitions for mpz_div_2exp and mpz_mul_2exp.
20721 * mlshift.c, mrshift.c: Remove.
20723 Wed Apr 24 21:39:22 1991 Torbjorn Granlund (tege@zevs.sics.se)
20725 * mpn_mul: Check only for m2_size == 0 in function header.
20727 Mon Apr 22 01:31:57 1991 Torbjorn Granlund (tege@zevs.sics.se)
20729 * karatsuba.c: New file for Karatsuba's multplication algorithm.
20731 * mpz_random, mpz_init, mpz_mod_2exp: New files and functions.
20733 * mpn_cmp: Fix header comment.
20735 Sun Apr 21 00:10:44 1991 Torbjorn Granlund (tege@zevs.sics.se)
20737 * pow: Switch off initial base reduction.
20739 Sat Apr 20 22:06:05 1991 Torbjorn Granlund (tege@echnaton.sics.se)
20741 * mpz_get_str: Don't generate initial zeros for initial word.
20742 Used to write outside of allocated storage.
20744 Mon Apr 15 15:48:08 1991 Torbjorn Granlund (tege@zevs.sics.se)
20746 * _mpz_realloc: Make it accept size in number of mp_digits.
20747 * Most functions: Use new _mpz_realloc definition.
20749 * mpz_set_str: Remove calls _mp_free_func.
20751 * Most functions: Rename mpn_* to _mpn_*. Rename mpz_realloc to
20753 * mpn_lshift: Redefine _mpn_lshift to only handle small shifts.
20754 * mdiv, mpz_div, ...: Changes for new definition of _mpn_lshift.
20755 * msqrt, mp*_*shift*: Define cnt as unsigned (for speed).
20757 Sat Apr 6 14:05:16 1991 Torbjorn Granlund (tege@musta.nada.kth.se)
20759 * mpn_mul: Multiply by the first digit in M2 in a special
20760 loop instead of zeroing the product area.
20762 * mpz_abs.c: New file.
20764 * sdiv: Implement as mpz_div_si for speed.
20766 * mpn_add: Make it work for second source operand == 0.
20768 * msub: Negate the correct operand, i.e. V before swapping, not
20769 the smaller of U and V!
20770 * madd, msub: Update abs_* when swapping operands, and not after
20773 Fri Apr 5 00:19:36 1991 Torbjorn Granlund (tege@black.nada.kth.se)
20775 * mpn_sub: Make it work for subtrahend == 0.
20777 * madd, msub: Rewrite to minimize mpn_cmp calls. Ensure
20778 mpn_cmp is called with positive sizes (used to be called
20779 incorrectly with negative sizes sometimes).
20781 * msqrt: Make it divide by zero if fed with a negative number.
20782 * Remove if statement at end of precision calculation that was
20785 * itom, mp.h: The argument is of type short, not int.
20787 * mpz_realloc, gmp.h: Make mpz_realloc return the new digit pointer.
20789 * mpz_get_str.c, mpz_set_str.c, mpz_new_str.c: Don't include mp.h.
20791 * Add COPYING to distribution.
20793 * mpz_div_ui.c, mpz_div_si.c, mpz_new_ui.c, mpz_new_si.c: New files.
20795 Fri Mar 15 00:26:29 1991 Torbjorn Granlund (tege@musta.nada.kth.se)
20797 * Add Copyleft headers to all files.
20799 * mpn_mul.c, mpn_div.c: Add header comments.
20800 * mult.c, mdiv.c: Update header comments.
20802 * mpq_add.c, mpq_sub.c, mpq_div.c, mpq_new.c, mpq_new_ui.c,
20803 mpq_free.c: New files for rational arithmetics.
20805 * mpn_lshift.c: Avoid writing the most significant word if it is 0.
20807 * mdiv.c: Call mpn_lshift for the normalization.
20808 * mdiv.c: Remove #ifdefs.
20810 * Makefile: Add ChangeLog to DISTFILES.
20812 * mpn_div.c: Make the add_back code work (by removing abort()).
20813 * mpn_div.c: Make it return if the quotient is size as compared
20814 with the difference NSIZE - DSIZE. If the stored quotient is
20815 larger than that, return 1, otherwise 0.
20816 * gmp.h: Fix mpn_div declaration.
20817 * mdiv.c: Adopt call to mpn_div.
20818 * mpz_div.c: New file (developed from mdiv.c).
20820 * README: Update routine names.
20822 Thu Mar 14 18:45:28 1991 Torbjorn Granlund (tege@musta.nada.kth.se)
20824 * mpq_mul.c: New file for rational multplication.
20826 * gmp.h: Add definitions for rational arithmetics.
20828 * mpn_div: Kludge the case where the high numerator digit > the
20829 high denominator digit. (This code is going to be optimized later.)
20831 * New files: gmp.h for GNU specific functions, gmp-common.h for
20832 definitions common for mp.h and gmp.h.
20834 * Ensure mp.h just defines what BSD mp.h defines.
20836 * pow.c: Fix typo for bp allocation.
20838 * Rename natural number functions to mpn_*, integer functions to
20841 Tue Mar 5 18:47:04 1991 Torbjorn Granlund (tege@musta.nada.kth.se)
20843 * mdiv.c (_mp_divide, case 2): Change test for estimate of Q from
20844 "n0 >= r" to "n0 > r".
20846 * msqrt: Tune the increasing precision scheme, to do fewer steps.
20848 Tue Mar 3 18:50:10 1991 Torbjorn Granlund (tege@musta.nada.kth.se)
20850 * msqrt: Use the low level routines. Use low precision in the
20851 beginning, and increase the precision as the result converges.
20852 (This optimization gave a 6-fold speedup.)
20857 mode: indented-text
20860 version-control: never
20861 eval: (unless (string-match "GNU Emacs \\(21\.[4-9]\\|22\.\\)" (emacs-version))
20863 (goto-char (point-min))
20864 (when (looking-at "Copyright")
20865 (search-forward "\n\n")
20866 (skip-chars-forward "\n")
20867 (narrow-to-region (point) (point-max))
20868 (message "Note! narrowed to hide copyright notice"))))