home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Gadgets 1
/
ADE-1.bin
/
ade-dist
/
gmp-2.0.2-diffs.gz
/
gmp-2.0.2-diffs
Wrap
Text File
|
1996-10-13
|
140KB
|
3,493 lines
This file contains patches that transform the baseline version into
the amiga version. Assuming that you have unarchived the baseline
version in the current directory, just run the command:
patch -p1 -E -b .pbak <diff-file
where 'diff-file' is this patch file. After running patch you should
remove all the generated *.pbak files, and look for any *.rej files
that indicate a problem patching the baseline source.
diff -rup --new-file baseline/fsf/gmp/Makefile.in amiga/fsf/gmp/Makefile.in
--- baseline/fsf/gmp/Makefile.in Thu Jun 6 11:21:19 1996
+++ amiga/fsf/gmp/Makefile.in Sat Sep 28 00:00:00 1996
@@ -25,8 +25,12 @@ prefix = /usr/local
exec_prefix = $(prefix)
libdir = $(exec_prefix)/lib
infodir = $(prefix)/info
+guidedir = $(prefix)/guide
+dvidir = $(prefix)/dvi
+psdir = $(prefix)/ps
includedir = $(prefix)/include
+
CC = gcc
LOCAL_CC = $(CC)
CFLAGS = -g -O
@@ -42,6 +46,8 @@ INSTALL_DATA = $(INSTALL)
MAKEINFO = makeinfo
MAKEINFOFLAGS =
TEXI2DVI = texi2dvi
+TEXI2HTML = texi2html
+DVIPS = dvips
LN = ln -s
#### host and target specific makefile fragments come in here.
@@ -59,7 +65,7 @@ FILES = gmp.h mp.h gmp-impl.h longlong.h
INCLUDES = -I. -Impn -I$(srcdir)
FLAGS_TO_PASS = "CC=$(CC)" "CFLAGS=$(CFLAGS)" "XCFLAGS=$(XCFLAGS)"
-all: libgmp.a
+all: libgmp.a libmp.a info dvi ps guide # html
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(XCFLAGS) $<
@@ -110,34 +116,44 @@ check: libgmp.a
doc: gmp.dvi gmp.info
-info: $(srcdir)/gmp.info
-$(srcdir)/gmp.info: $(srcdir)/gmp.texi
- cd $(srcdir); $(MAKEINFO) gmp.texi
+info: gmp.info
+gmp.info: gmp.texi
+ $(MAKEINFO) -I$(srcdir) $(srcdir)/gmp.texi --no-split --output=$@
+
+guide: gmp.guide
+gmp.guide: gmp.texi
+ $(MAKEINFO) -I$(srcdir) $(srcdir)/gmp.texi --no-split --output=$@ --amiga
dvi: gmp.dvi
-gmp.dvi: $(srcdir)/gmp.texi
- rm -f tmp.texi
- $(LN) $(srcdir)/gmp.texi tmp.texi
- TEXINPUTS=.:$(srcdir) $(TEXI2DVI) tmp.texi
- rm -f tmp.texi
- mv tmp.dvi gmp.dvi
- rm -f tmp.*
+gmp.dvi: gmp.texi
+ TEXINPUTS=.:$(srcdir) $(TEXI2DVI) $(srcdir)/gmp.texi
ps: gmp.ps
gmp.ps: gmp.dvi
- dvips gmp.dvi -o gmp.ps
+ $(DVIPS) -o $@ $?
html: gmp_toc.html
-gmp_toc.html: $(srcdir)/gmp.texi
- texi2html -acc -split_chapter $(srcdir)/gmp.texi
+gmp_toc.html: gmp.texi
+ $(TEXI2HTML) -acc -split_chapter $(srcdir)/gmp.texi
# The semicolon is to prevent the install.sh -> install default rule
# from doing anything. Having it run true helps avoid problems and
# noise from versions of make which don't like to have null commands.
-install: install-normal ; @true
+install: install-all ; @true
install-strip: install-normal
-install-normal: installdirs libgmp.a gmp.info install-info-files
+install-all: installdirs libgmp.a libmp.a gmp.info install-info-files \
+ install-dvi-files install-ps-files install-guide-files
+ $(INSTALL_DATA) libgmp.a $(libdir)/libgmp.a
+ -chmod a-x $(libdir)/libgmp.a
+ $(INSTALL_DATA) $(srcdir)/gmp.h $(includedir)/gmp.h
+ -chmod a-x $(includedir)/gmp.h
+ $(INSTALL_DATA) libmp.a $(libdir)/libmp.a
+ -chmod a-x $(libdir)/libmp.a
+ $(INSTALL_DATA) $(srcdir)/mp.h $(includedir)/mp.h
+ -chmod a-x $(includedir)/mp.h
+install-normal: installdirs libgmp.a gmp.info install-info-files \
+ install-dvi-files install-ps-files install-guide-files
$(INSTALL_DATA) libgmp.a $(libdir)/libgmp.a
-chmod a-x $(libdir)/libgmp.a
$(INSTALL_DATA) $(srcdir)/gmp.h $(includedir)/gmp.h
@@ -147,17 +163,27 @@ install-bsdmp: installdirs libmp.a gmp.i
-chmod a-x $(libdir)/libmp.a
$(INSTALL_DATA) $(srcdir)/mp.h $(includedir)/mp.h
-chmod a-x $(includedir)/mp.h
-install-info-files: installdirs $(srcdir)/gmp.info
- cd $(srcdir); for f in gmp.info*; \
+install-info-files: installdirs gmp.info
+ for f in gmp.info*; \
do $(INSTALL_DATA) $$f $(infodir)/$$f; done
-chmod a-x $(infodir)/gmp.info*
# Attempt to edit the info directory node
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
install-info --dir-file=$(infodir)/dir $(infodir)/gmp.info; \
else true; fi
+install-dvi-files: installdirs gmp.dvi
+ $(INSTALL_DATA) gmp.dvi $(dvidir)/gmp.dvi
+ -chmod a-x $(dvidir)/gmp.dvi
+install-ps-files: installdirs gmp.ps
+ $(INSTALL_DATA) gmp.ps $(psdir)/gmp.ps
+ -chmod a-x $(psdir)/gmp.ps
+install-guide-files: installdirs gmp.guide
+ $(INSTALL_DATA) gmp.guide $(guidedir)/gmp.guide
+ -chmod a-x $(guidedir)/gmp.guide
installdirs: $(srcdir)/mkinstalldirs
- $(srcdir)/mkinstalldirs $(includedir) $(libdir) $(infodir)
+ $(srcdir)/mkinstalldirs $(includedir) $(libdir) $(infodir) \
+ $(psdir) $(guidedir) $(dvidir)
uninstall:
rm -f $(libdir)/libgmp.a
@@ -169,6 +195,7 @@ uninstall:
clean mostlyclean:
rm -f *.o libgmp.a libmp.a gmp.dvi gmp.ps tmp.* tmp-*
rm -f gmp.?? gmp.??s gmp.log gmp.toc gmp.*aux gmp*.html
+ rm -f gmp.guide
-cd mpn; $(MAKE) $@
-cd mpz; $(MAKE) $@
-cd mpf; $(MAKE) $@
@@ -182,7 +209,7 @@ distclean: clean
-cd mpq; $(MAKE) $@
-cd mpbsd; $(MAKE) $@
maintainer-clean: distclean
- rm -f $(srcdir)/gmp.info*
+ rm -f gmp.info*
TAGS: force
cd $(srcdir); etags *.[ch] mp*/*.c mpn/generic/*.c >TAGS
diff -rup --new-file baseline/fsf/gmp/Product-Info amiga/fsf/gmp/Product-Info
--- baseline/fsf/gmp/Product-Info Wed Dec 31 17:00:00 1969
+++ amiga/fsf/gmp/Product-Info Sat Sep 28 00:00:00 1996
@@ -0,0 +1,33 @@
+.name
+gmp
+.fullname
+GNU arbitrary precision arithmetic library
+.type
+Library
+.short
+Arbitrary precision math library.
+.description
+GNU MP is a library for arbitrary precision arithmetic, operating on
+signed integers and rational numbers. It has a rich set of functions,
+and the functions have a regular interface.
+
+The author has tried to make these functions as fast as possible, both
+for small operands and for huge operands. The speed is achieved by
+using fullwords as the basic arithmetic type, by using fast
+algorithms, by defining inline assembler for mixed sized
+multiplication and division (i.e 32*32->64 bit multiplication and
+64/32->32,32 bit division), and by hacking the code with emphasis on
+speed (and not simplicity and elegance).
+
+The speed of GNU MP is about 5 to 100 times that of Berkeley MP for
+small operands. The speed-up increases with the operand sizes for
+certain operations, for which GNU MP has asymptotically faster
+algorithms.
+.version
+2.0.2
+.author
+Torbjorn Granlund
+.distribution
+GNU Public License
+.described-by
+Fred Fish (fnf@amigalib.com)
diff -rup --new-file baseline/fsf/gmp/config.sub amiga/fsf/gmp/config.sub
--- baseline/fsf/gmp/config.sub Fri May 10 08:39:12 1996
+++ amiga/fsf/gmp/config.sub Sat Sep 28 00:00:00 1996
@@ -213,11 +213,11 @@ case $basic_machine in
os=-sysv
;;
amiga | amiga-*)
- basic_machine=m68k-cbm
+ basic_machine=m68k-unknown
;;
- amigados)
- basic_machine=m68k-cbm
- os=-amigados
+ amigaos)
+ basic_machine=m68k-unknown
+ os=-amigaos
;;
amigaunix | amix)
basic_machine=m68k-cbm
@@ -816,7 +816,7 @@ case $os in
-gnu* | -bsd* | -mach* | -lites* | -minix* | -genix* | -ultrix* | -irix* \
| -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[3456]* \
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -amigados* | -msdos* | -moss* | -newsos* | -unicos* | -aos* \
+ | -amigaos* | -msdos* | -moss* | -newsos* | -unicos* | -aos* \
| -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
| -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* | -lites* \
@@ -970,7 +970,7 @@ case $basic_machine in
os=-sysv
;;
*-cbm)
- os=-amigados
+ os=-amigaos
;;
*-dg)
os=-dgux
diff -rup --new-file baseline/fsf/gmp/configure amiga/fsf/gmp/configure
--- baseline/fsf/gmp/configure Thu Jun 6 11:25:33 1996
+++ amiga/fsf/gmp/configure Sat Sep 28 00:00:00 1996
@@ -61,7 +61,7 @@ moveifchange=
norecursion=
other_options=
package_makefile_frag=
-prefix=/usr/local
+prefix=/ade
progname=
program_prefix=
program_prefixoption=
@@ -80,7 +80,7 @@ subdirs=
target_alias=NOTARGET
target_makefile_frag=
undefs=NOUNDEFS
-version="$Revision: 1.218 (modified for gmp) $"
+version="$Revision: 1.222.4.1 $"
x11=default
### we might need to use some other shell than /bin/sh for running subshells
@@ -100,7 +100,8 @@ NO_EDIT="This file was generated automat
progname=$0
# if PWD already has a value, it is probably wrong.
-if [ -n "$PWD" ]; then PWD=`pwd`; fi
+# The AmigaOS pdksh can't change the value of PWD, it's readonly.
+# if [ -n "$PWD" ]; then PWD=`pwd`; fi
case "${progname}" in
/*) ;;
@@ -180,8 +181,8 @@ do
esac
enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
- eval $enableopt="$optarg"
- enableoptions="$enableoptions $option"
+ eval "$enableopt='$optarg'"
+ enableoptions="$enableoptions '$option'"
;;
--exec-prefix* | --ex*)
exec_prefix=$optarg
@@ -690,6 +691,44 @@ s/\\\n//g
rm -f Makefile.cc
fi
+# Generate a default definition for YACC. This is used if the makefile can't
+# locate bison or byacc in objdir.
+
+for prog in 'bison -y' byacc yacc
+do
+ set dummy $prog; tmp=$2
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/$tmp; then
+ DEFAULT_YACC="$prog"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ test -n "$DEFAULT_YACC" && break
+done
+
+# Generate a default definition for LEX. This is used if the makefile can't
+# locate flex in objdir.
+
+for prog in flex lex
+do
+ set dummy $prog; tmp=$2
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/$tmp; then
+ DEFAULT_LEX="$prog"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ test -n "$DEFAULT_LEX" && break
+done
+
if [ "${build}" != "${host}" ]; then
# If we are doing a Canadian Cross, in which the host and build systems
# are not the same, we set reasonable default values for the tools.
@@ -785,7 +824,7 @@ s/\\\n//g
export RANLIB
else
# If CC is still not set, try to get gcc.
- if [ x$with_gcc != xno -a -z "${CC}" ]; then
+ if [ -z "${CC}" ]; then
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
for dir in $PATH; do
test -z "$dir" && dir=.
@@ -1087,6 +1126,8 @@ EOF
-e "s:^program_suffix[ ]*=.*$:program_suffix = ${program_suffix}:" \
-e "s:^program_transform_name[ ]*=.*$:program_transform_name = ${program_transform_name}:" \
-e "s:^tooldir[ ]*=.*$:tooldir = ${tooldir}:" \
+ -e "s:^DEFAULT_YACC[ ]*=.*$:DEFAULT_YACC = ${DEFAULT_YACC}:" \
+ -e "s:^DEFAULT_LEX[ ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \
${subdir}/Makefile.tem >> ${Makefile}
# If this is a Canadian Cross, preset the values of many more
diff -rup --new-file baseline/fsf/gmp/gmp.info amiga/fsf/gmp/gmp.info
--- baseline/fsf/gmp/gmp.info Thu Jun 6 12:30:58 1996
+++ amiga/fsf/gmp/gmp.info Wed Dec 31 17:00:00 1969
@@ -1,75 +0,0 @@
-This is Info file gmp.info, produced by Makeinfo-1.64 from the input
-file gmp.texi.
-
-START-INFO-DIR-ENTRY
-* gmp: (gmp.info). GNU Multiple Precision Arithmetic Library.
-END-INFO-DIR-ENTRY
-
- This file documents GNU MP, a library for arbitrary-precision
-arithmetic.
-
- Copyright (C) 1991, 1993, 1994, 1995, 1996 Free Software Foundation,
-Inc.
-
- Permission is granted to make and distribute verbatim copies of this
-manual provided the copyright notice and this permission notice are
-preserved on all copies.
-
- Permission is granted to copy and distribute modified versions of
-this manual under the conditions for verbatim copying, provided that
-the entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
- Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be stated in a
-translation approved by the Foundation.
-
-
-Indirect:
-gmp.info-1: 1018
-gmp.info-2: 50874
-gmp.info-3: 94190
-
-Tag Table:
-(Indirect)
-Node: Top1018
-Node: Copying2028
-Node: Introduction to MP3728
-Node: Installing MP5657
-Node: MP Basics10220
-Node: Reporting Bugs16508
-Node: Integer Functions18028
-Node: Initializing Integers18635
-Node: Assigning Integers20751
-Node: Simultaneous Integer Init & Assign22026
-Node: Converting Integers23640
-Node: Integer Arithmetic25309
-Node: Comparison Functions36185
-Node: Integer Logic and Bit Fiddling37087
-Node: I/O of Integers39148
-Node: Miscellaneous Integer Functions41629
-Node: Rational Number Functions43299
-Node: Initializing Rationals44594
-Node: Assigning Rationals45764
-Node: Comparing Rationals46727
-Node: Applying Integer Functions48010
-Node: Miscellaneous Rational Functions48828
-Node: Floating-point Functions50874
-Node: Initializing Floats52722
-Node: Assigning Floats55474
-Node: Simultaneous Float Init & Assign57066
-Node: Converting Floats58583
-Node: Float Arithmetic60162
-Node: Float Comparison62071
-Node: I/O of Floats63097
-Node: Miscellaneous Float Functions65213
-Node: Low-level Functions65896
-Node: BSD Compatible Functions82264
-Node: Custom Allocation86600
-Node: Contributors88938
-Node: References90537
-Node: Concept Index91573
-Node: Function Index94190
-
-End Tag Table
diff -rup --new-file baseline/fsf/gmp/gmp.info-1 amiga/fsf/gmp/gmp.info-1
--- baseline/fsf/gmp/gmp.info-1 Thu Jun 6 12:30:58 1996
+++ amiga/fsf/gmp/gmp.info-1 Wed Dec 31 17:00:00 1969
@@ -1,1283 +0,0 @@
-This is Info file gmp.info, produced by Makeinfo-1.64 from the input
-file gmp.texi.
-
-START-INFO-DIR-ENTRY
-* gmp: (gmp.info). GNU Multiple Precision Arithmetic Library.
-END-INFO-DIR-ENTRY
-
- This file documents GNU MP, a library for arbitrary-precision
-arithmetic.
-
- Copyright (C) 1991, 1993, 1994, 1995, 1996 Free Software Foundation,
-Inc.
-
- Permission is granted to make and distribute verbatim copies of this
-manual provided the copyright notice and this permission notice are
-preserved on all copies.
-
- Permission is granted to copy and distribute modified versions of
-this manual under the conditions for verbatim copying, provided that
-the entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
- Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be stated in a
-translation approved by the Foundation.
-
-
-File: gmp.info, Node: Top, Next: Copying, Prev: (dir), Up: (dir)
-
-GNU MP
-******
-
- This manual documents how to install and use the GNU multiple
-precision arithmetic library, version 2.0.2.
-
-* Menu:
-
-* Copying:: GMP Copying Conditions (LGPL).
-* Introduction to MP:: Brief introduction to GNU MP.
-* Installing MP:: How to configure and compile the MP library.
-* MP Basics:: What every MP user should now.
-* Reporting Bugs:: How to usefully report bugs.
-* Integer Functions:: Functions for arithmetic on signed integers.
-* Rational Number Functions:: Functions for arithmetic on rational numbers.
-* Floating-point Functions:: Functions for arithmetic on floats.
-* Low-level Functions:: Fast functions for natural numbers.
-* BSD Compatible Functions:: All functions found in BSD MP.
-* Custom Allocation:: How to customize the internal allocation.
-
-* Contributors::
-* References::
-* Concept Index::
-* Function Index::
-
-
-File: gmp.info, Node: Copying, Next: Introduction to MP, Prev: Top, Up: Top
-
-GNU MP Copying Conditions
-*************************
-
- This library is "free"; this means that everyone is free to use it
-and free to redistribute it on a free basis. The library is not in the
-public domain; it is copyrighted and there are restrictions on its
-distribution, but these restrictions are designed to permit everything
-that a good cooperating citizen would want to do. What is not allowed
-is to try to prevent others from further sharing any version of this
-library that they might get from you.
-
- Specifically, we want to make sure that you have the right to give
-away copies of the library, that you receive source code or else can
-get it if you want it, that you can change this library or use pieces
-of it in new free programs, and that you know you can do these things.
-
- To make sure that everyone has such rights, we have to forbid you to
-deprive anyone else of these rights. For example, if you distribute
-copies of the GNU MP library, you must give the recipients all the
-rights that you have. You must make sure that they, too, receive or
-can get the source code. And you must tell them their rights.
-
- Also, for our own protection, we must make certain that everyone
-finds out that there is no warranty for the GNU MP library. If it is
-modified by someone else and passed on, we want their recipients to
-know that what they have is not what we distributed, so that any
-problems introduced by others will not reflect on our reputation.
-
- The precise conditions of the license for the GNU MP library are
-found in the Library General Public License that accompany the source
-code.
-
-
-File: gmp.info, Node: Introduction to MP, Next: Installing MP, Prev: Copying, Up: Top
-
-Introduction to GNU MP
-**********************
-
- GNU MP is a portable library written in C for arbitrary precision
-arithmetic on integers, rational numbers, and floating-point numbers.
-It aims to provide the fastest possible arithmetic for all applications
-that need higher precision than is directly supported by the basic C
-types.
-
- Many applications use just a few hundred bits of precision; but some
-applications may need thousands or even millions of bits. MP is
-designed to give good performance for both, by choosing algorithms
-based on the sizes of the operands, and by carefully keeping the
-overhead at a minimum.
-
- The speed of MP is achieved by using fullwords as the basic
-arithmetic type, by using sophisticated algorithms, by including
-carefully optimized assembly code for the most common inner loops for
-many different CPUs, and by a general emphasis on speed (as opposed to
-simplicity or elegance).
-
- There is carefully optimized assembly code for these CPUs: DEC
-Alpha, Amd 29000, HPPA 1.0 and 1.1, Intel Pentium and generic x86,
-Intel i960, Motorola MC68000, MC68020, MC88100, and MC88110,
-Motorola/IBM PowerPC, National NS32000, IBM POWER, MIPS R3000, R4000,
-SPARCv7, SuperSPARC, generic SPARCv8, and DEC VAX. Some optimizations
-also for ARM, Clipper, IBM ROMP (RT), and Pyramid AP/XP.
-
- This version of MP is released under a more liberal license than
-previous versions. It is now permitted to link MP to non-free
-programs, as long as MP source code is provided when distributing the
-non-free program.
-
-How to use this Manual
-======================
-
- Everyone should read *Note MP Basics::. If you need to install the
-library yourself, you need to read *Note Installing MP::, too.
-
- The rest of the manual can be used for later reference, although it
-is probably a good idea to glance through it.
-
-
-File: gmp.info, Node: Installing MP, Next: MP Basics, Prev: Introduction to MP, Up: Top
-
-Installing MP
-*************
-
- To build MP, you first have to configure it for your CPU and
-operating system. You need a C compiler, preferably GCC, but any
-reasonable compiler should work. And you need a standard Unix `make'
-program, plus some other standard Unix utility programs.
-
- (If you're on an MS-DOS machine, your can build MP using `make.bat'.
-It requires that djgpp is installed. It does not require
-configuration, nor is `make' needed; `make.bat' both configures and
-builds the library.)
-
- Here are the steps needed to install the library on Unix systems:
-
- 1. In most cases, `./configure --target=cpu-vendor-os', should work
- both for native and cross-compilation. If you get error messages,
- your machine might not be supported.
-
- If you want to compile in a separate object directory, cd to that
- directory, and prefix the configure command with the path to the
- MP source directory. Not all `make' programs have the necessary
- features to support this. In particular, SunOS and Slowaris
- `make' have bugs that makes them unable to build from a separate
- object directory. Use GNU `make' instead.
-
- In addition to the standard cpu-vendor-os tuples, MP recognizes
- sparc8 and supersparc as valid CPU names. Specifying these CPU
- names for relevant systems will improve performance significantly.
-
- In general, if you want a library that runs as fast as possible,
- you should make sure you configure MP for the exact CPU type your
- system uses.
-
- If you have `gcc' in your `PATH', it will be used by default. To
- override this, pass `-with-gcc=no' to `configure'.
-
- 2. `make'
-
- This will compile MP, and create a library archive file `libgmp.a'
- in the working directory.
-
- 3. `make check'
-
- This will make sure MP was built correctly. If you get error
- messages, please report this to `bug-gmp@prep.ai.mit.edu'. (*Note
- Reporting Bugs::, for information on what to include in useful bug
- reports.)
-
- 4. `make install'
-
- This will copy the file `gmp.h' and `libgmp.a', as well as the info
- files, to `/usr/local' (or if you passed the `--prefix' option to
- `configure', to the directory given as argument to `--prefix').
-
-If you wish to build and install the BSD MP compatible functions, use
-`make libmp.a' and `make install-bsdmp'.
-
- There are some other useful make targets:
-
- * `doc'
-
- Create a DVI version of the manual, in `gmp.dvi' and a set of info
- files, in `gmp.info', `gmp.info-1', `gmp.info-2', etc.
-
- * `ps'
-
- Create a Postscript version of the manual, in `gmp.ps'.
-
- * `html'
-
- Create a HTML version of the manual, in `gmp.html'.
-
- * `clean'
-
- Delete all object files and archive files, but not the
- configuration files.
-
- * `distclean'
-
- Delete all files not included in the distribution.
-
- * `uninstall'
-
- Delete all files copied by `make install'.
-
-Known Build Problems
-====================
-
- GCC 2.7.2 (as well as 2.6.3) for the RS/6000 and PowerPC can not be
-used to compile MP, due to a bug in GCC. If you want to use GCC for
-these machines, you need to apply the patch below to GCC, or use a
-later version of the compiler.
-
- If you are on a Sequent Symmetry, use the GNU assembler instead of
-the system's assembler, since the latter has serious bugs.
-
- The system compiler on NeXT is a massacred and old gcc, even if the
-compiler calls itself `cc'. This compiler cannot be used to build MP.
-You need to get a real gcc, and install that before you compile MP.
-(NeXT might have fixed this in newer releases of their system.)
-
- The system C compiler under SunOS 4 has a bug that makes it
-miscompile mpq/get_d.c. This will make `make check' fail.
-
- Please report other problems to `bug-gmp@prep.ai.mit.edu'. *Note
-Reporting Bugs::.
-
- Patch to apply to GCC 2.6.3 and 2.7.2:
-
- *** config/rs6000/rs6000.md Sun Feb 11 08:22:11 1996
- --- config/rs6000/rs6000.md.new Sun Feb 18 03:33:37 1996
- ***************
- *** 920,926 ****
- (set (match_operand:SI 0 "gpc_reg_operand" "=r")
- (not:SI (match_dup 1)))]
- ""
- ! "nor. %0,%2,%1"
- [(set_attr "type" "compare")])
-
- (define_insn ""
- --- 920,926 ----
- (set (match_operand:SI 0 "gpc_reg_operand" "=r")
- (not:SI (match_dup 1)))]
- ""
- ! "nor. %0,%1,%1"
- [(set_attr "type" "compare")])
-
- (define_insn ""
-
-
-File: gmp.info, Node: MP Basics, Next: Reporting Bugs, Prev: Installing MP, Up: Top
-
-MP Basics
-*********
-
- All declarations needed to use MP are collected in the include file
-`gmp.h'. It is designed to work with both C and C++ compilers.
-
-Nomenclature and Types
-======================
-
-In this manual, "integer" usually means a multiple precision integer, as
-defined by the MP library. The C data type for such integers is
-`mpz_t'. Here are some examples of how to declare such integers:
-
- mpz_t sum;
-
- struct foo { mpz_t x, y; };
-
- mpz_t vec[20];
-
-"Rational number" means a multiple precision fraction. The C data type
-for these fractions is `mpq_t'. For example:
-
- mpq_t quotient;
-
-"Floating point number" or "Float" for short, is an arbitrary precision
-mantissa with an limited precision exponent. The C data type for such
-objects is `mpf_t'.
-
-A "limb" means the part of a multi-precision number that fits in a
-single word. (We chose this word because a limb of the human body is
-analogous to a digit, only larger, and containing several digits.)
-Normally a limb contains 32 or 64 bits. The C data type for a limb is
-`mp_limb_t'.
-
-Function Classes
-================
-
- There are six classes of functions in the MP library:
-
- 1. Functions for signed integer arithmetic, with names beginning with
- `mpz_'. The associated type is `mpz_t'. There are about 100
- functions in this class.
-
- 2. Functions for rational number arithmetic, with names beginning with
- `mpq_'. The associated type is `mpq_t'. There are about 20
- functions in this class, but the functions in the previous class
- can be used for performing arithmetic on the numerator and
- denominator separately.
-
- 3. Functions for floating-point arithmetic, with names beginning with
- `mpf_'. The associated type is `mpf_t'. There are about 50
- functions is this class.
-
- 4. Functions compatible with Berkeley MP, such as `itom', `madd', and
- `mult'. The associated type is `MINT'.
-
- 5. Fast low-level functions that operate on natural numbers. These
- are used by the functions in the preceding groups, and you can
- also call them directly from very time-critical user programs.
- These functions' names begin with `mpn_'. There are about 30
- (hard-to-use) functions in this class.
-
- The associated type is array of `mp_limb_t'.
-
- 6. Miscellaneous functions. Functions for setting up custom
- allocation.
-
-MP Variable Conventions
-=======================
-
- As a general rule, all MP functions expect output arguments before
-input arguments. This notation is based on an analogy with the
-assignment operator. (The BSD MP compatibility functions disobey this
-rule, having the output argument(s) last.)
-
- MP allows you to use the same variable for both input and output in
-the same expression. For example, the main function for integer
-multiplication, `mpz_mul', can be used like this: `mpz_mul (x, x, x)'.
-This computes the square of X and puts the result back in X.
-
- Before you can assign to an MP variable, you need to initialize it
-by calling one of the special initialization functions. When you're
-done with a variable, you need to clear it out, using one of the
-functions for that purpose. Which function to use depends on the type
-of variable. See the chapters on integer functions, rational number
-functions, and floating-point functions for details.
-
- A variable should only be initialized once, or at least cleared out
-between each initialization. After a variable has been initialized, it
-may be assigned to any number of times.
-
- For efficiency reasons, avoid to initialize and clear out a variable
-in loops. Instead, initialize it before entering the loop, and clear
-it out after the loop has exited.
-
- You don't need to be concerned about allocating additional space for
-MP variables. All functions in MP automatically allocate additional
-space when a variable does not already have enough space. They do not,
-however, reduce the space when a smaller number is stored in the
-object. Most of the time, this policy is best, since it avoids
-frequent re-allocation.
-
-Useful Macros and Constants
-===========================
-
- - Global Constant: const int mp_bits_per_limb
- The number of bits per limb.
-
- - Macro: __GNU_MP_VERSION
- - Macro: __GNU_MP_VERSION_MINOR
- The major and minor MP version, respectively, as integers.
-
-Compatibility with Version 1.x
-==============================
-
- This version of MP is upward compatible with previous versions of
-MP, with a few exceptions.
-
- 1. Integer division functions round the result differently. The old
- functions (`mpz_div', `mpz_divmod', `mpz_mdiv', `mpz_mdivmod',
- etc) now all use floor rounding (i.e., they round the quotient to
- -infinity). There are a lot of new functions for integer
- division, giving the user better control over the rounding.
-
- 2. The function `mpz_mod' now compute the true *mod* function.
-
- 3. The functions `mpz_powm' and `mpz_powm_ui' now use *mod* for
- reduction.
-
- 4. The assignment functions for rational numbers do no longer
- canonicalize their results. In the case a non-canonical result
- could arise from an assignment, the user need to insert an
- explicit call to `mpq_canonicalize'. This change was made for
- efficiency.
-
- 5. Output generated by `mpz_out_raw' in this release cannot be read
- by `mpz_inp_raw' in previous releases. This change was made for
- making the file format truly portable between machines with
- different word sizes.
-
- 6. Several `mpn' functions have changed. But they were intentionally
- undocumented in previous releases.
-
- 7. The functions `mpz_cmp_ui', `mpz_cmp_si', and `mpq_cmp_ui' are now
- implementated as macros, and thereby sometimes evaluate their
- arguments multiple times.
-
- 8. The functions `mpz_pow_ui' and `mpz_ui_pow_ui' now yield 1 for
- 0^0. (In version 1, they yielded 0.)
-
-
-Getting the Latest Version of MP
-================================
-
- The latest version of the MP library is available by anonymous ftp
-from from `prep.ai.mit.edu'. The file name is
-`/pub/gnu/gmp-M.N.tar.gz'. Many sites around the world mirror `prep';
-please use a mirror site near you.
-
-
-File: gmp.info, Node: Reporting Bugs, Next: Integer Functions, Prev: MP Basics, Up: Top
-
-Reporting Bugs
-**************
-
- If you think you have found a bug in the MP library, please
-investigate it and report it. We have made this library available to
-you, and it is not to ask too much from you, to ask you to report the
-bugs that you find.
-
- There are a few things you should think about when you put your bug
-report together.
-
- You have to send us a test case that makes it possible for us to
-reproduce the bug. Include instructions on how to run the test case.
-
- You also have to explain what is wrong; if you get a crash, or if
-the results printed are incorrect and in that case, in what way.
-
- It is not uncommon that an observed problem is actually due to a bug
-in the compiler used when building MP; the MP code tends to explore
-interesting corners in compilers. Therefore, please include compiler
-version information in your bug report. This can be extracted using
-`what `which cc`', or, if you're using gcc, `gcc -v'. Also, include
-the output from `uname -a'.
-
- If your bug report is good, we will do our best to help you to get a
-corrected version of the library; if the bug report is poor, we won't
-do anything about it (aside of chiding you to send better bug reports).
-
- Send your bug report to: `bug-gmp@prep.ai.mit.edu'.
-
- If you think something in this manual is unclear, or downright
-incorrect, or if the language needs to be improved, please send a note
-to the same address.
-
-
-File: gmp.info, Node: Integer Functions, Next: Rational Number Functions, Prev: Reporting Bugs, Up: Top
-
-Integer Functions
-*****************
-
- This chapter describes the MP functions for performing integer
-arithmetic. These functions start with the prefix `mpz_'.
-
- Arbitrary precision integers are stored in objects of type `mpz_t'.
-
-* Menu:
-
-* Initializing Integers::
-* Assigning Integers::
-* Simultaneous Integer Init & Assign::
-* Converting Integers::
-* Integer Arithmetic::
-* Comparison Functions::
-* Integer Logic and Bit Fiddling::
-* I/O of Integers::
-* Miscellaneous Integer Functions::
-
-
-File: gmp.info, Node: Initializing Integers, Next: Assigning Integers, Up: Integer Functions
-
-Initialization and Assignment Functions
-=======================================
-
- The functions for integer arithmetic assume that all integer objects
-are initialized. You do that by calling the function `mpz_init'.
-
- - Function: void mpz_init (mpz_t INTEGER)
- Initialize INTEGER with limb space and set the initial numeric
- value to 0. Each variable should normally only be initialized
- once, or at least cleared out (using `mpz_clear') between each
- initialization.
-
- Here is an example of using `mpz_init':
-
- {
- mpz_t integ;
- mpz_init (integ);
- ...
- mpz_add (integ, ...);
- ...
- mpz_sub (integ, ...);
-
- /* Unless the program is about to exit, do ... */
- mpz_clear (integ);
- }
-
-As you can see, you can store new values any number of times, once an
-object is initialized.
-
- - Function: void mpz_clear (mpz_t INTEGER)
- Free the limb space occupied by INTEGER. Make sure to call this
- function for all `mpz_t' variables when you are done with them.
-
- - Function: void * _mpz_realloc (mpz_t INTEGER, mp_size_t NEW_ALLOC)
- Change the limb space allocation to NEW_ALLOC limbs. This
- function is not normally called from user code, but it can be used
- to give memory back to the heap, or to increase the space of a
- variable to avoid repeated automatic re-allocation.
-
- - Function: void mpz_array_init (mpz_t INTEGER_ARRAY[], size_t
- ARRAY_SIZE, mp_size_t FIXED_NUM_BITS)
- Allocate *fixed* limb space for all ARRAY_SIZE integers in
- INTEGER_ARRAY. The fixed allocation for each integer in the array
- is enough to store FIXED_NUM_BITS. If the fixed space will be
- insufficient for storing the result of a subsequent calculation,
- the result is unpredictable.
-
- This function is useful for decreasing the working set for some
- algorithms that use large integer arrays.
-
- There is no way to de-allocate the storage allocated by this
- function. Don't call `mpz_clear'!
-
-
-File: gmp.info, Node: Assigning Integers, Next: Simultaneous Integer Init & Assign, Prev: Initializing Integers, Up: Integer Functions
-
-Assignment Functions
---------------------
-
- These functions assign new values to already initialized integers
-(*note Initializing Integers::.).
-
- - Function: void mpz_set (mpz_t ROP, mpz_t OP)
- - Function: void mpz_set_ui (mpz_t ROP, unsigned long int OP)
- - Function: void mpz_set_si (mpz_t ROP, signed long int OP)
- - Function: void mpz_set_d (mpz_t ROP, double OP)
- - Function: void mpz_set_q (mpz_t ROP, mpq_t OP)
- - Function: void mpz_set_f (mpz_t ROP, mpf_t OP)
- Set the value of ROP from OP.
-
- - Function: int mpz_set_str (mpz_t ROP, char *STR, int BASE)
- Set the value of ROP from STR, a '\0'-terminated C string in base
- BASE. White space is allowed in the string, and is simply
- ignored. The base may vary from 2 to 36. If BASE is 0, the
- actual base is determined from the leading characters: if the
- first two characters are `0x' or `0X', hexadecimal is assumed,
- otherwise if the first character is `0', octal is assumed,
- otherwise decimal is assumed.
-
- This function returns 0 if the entire string up to the '\0' is a
- valid number in base BASE. Otherwise it returns -1.
-
-
-File: gmp.info, Node: Simultaneous Integer Init & Assign, Next: Converting Integers, Prev: Assigning Integers, Up: Integer Functions
-
-Combined Initialization and Assignment Functions
-------------------------------------------------
-
- For convenience, MP provides a parallel series of initialize-and-set
-functions which initialize the output and then store the value there.
-These functions' names have the form `mpz_init_set...'
-
- Here is an example of using one:
-
- {
- mpz_t pie;
- mpz_init_set_str (pie, "3141592653589793238462643383279502884", 10);
- ...
- mpz_sub (pie, ...);
- ...
- mpz_clear (pie);
- }
-
-Once the integer has been initialized by any of the `mpz_init_set...'
-functions, it can be used as the source or destination operand for the
-ordinary integer functions. Don't use an initialize-and-set function
-on a variable already initialized!
-
- - Function: void mpz_init_set (mpz_t ROP, mpz_t OP)
- - Function: void mpz_init_set_ui (mpz_t ROP, unsigned long int OP)
- - Function: void mpz_init_set_si (mpz_t ROP, signed long int OP)
- - Function: void mpz_init_set_d (mpz_t ROP, double OP)
- Initialize ROP with limb space and set the initial numeric value
- from OP.
-
- - Function: int mpz_init_set_str (mpz_t ROP, char *STR, int BASE)
- Initialize ROP and set its value like `mpz_set_str' (see its
- documentation above for details).
-
- If the string is a correct base BASE number, the function returns
- 0; if an error occurs it returns -1. ROP is initialized even if
- an error occurs. (I.e., you have to call `mpz_clear' for it.)
-
-
-File: gmp.info, Node: Converting Integers, Next: Integer Arithmetic, Prev: Simultaneous Integer Init & Assign, Up: Integer Functions
-
-Conversion Functions
-====================
-
- This section describes functions for converting arbitrary precision
-integers to standard C types. Functions for converting *to* arbitrary
-precision integers are described in *Note Assigning Integers:: and
-*Note I/O of Integers::.
-
- - Function: unsigned long int mpz_get_ui (mpz_t OP)
- Return the least significant part from OP. This function combined
- with
- `mpz_tdiv_q_2exp(..., OP, CHAR_BIT*sizeof(unsigned long int))' can
- be used to extract the limbs of an integer.
-
- - Function: signed long int mpz_get_si (mpz_t OP)
- If OP fits into a `signed long int' return the value of OP.
- Otherwise return the least significant part of OP, with the same
- sign as OP.
-
- If OP is too large to fit in a `signed long int', the returned
- result is probably not very useful.
-
- - Function: double mpz_get_d (mpz_t OP)
- Convert OP to a double.
-
- - Function: char * mpz_get_str (char *STR, int BASE, mpz_t OP)
- Convert OP to a string of digits in base BASE. The base may vary
- from 2 to 36.
-
- If STR is NULL, space for the result string is allocated using the
- default allocation function, and a pointer to the string is
- returned.
-
- If STR is not NULL, it should point to a block of storage enough
- large for the result. To find out the right amount of space to
- provide for STR, use `mpz_sizeinbase (OP, BASE) + 2'. The two
- extra bytes are for a possible minus sign, and for the terminating
- null character.
-
-
-File: gmp.info, Node: Integer Arithmetic, Next: Comparison Functions, Prev: Converting Integers, Up: Integer Functions
-
-Arithmetic Functions
-====================
-
- - Function: void mpz_add (mpz_t ROP, mpz_t OP1, mpz_t OP2)
- - Function: void mpz_add_ui (mpz_t ROP, mpz_t OP1, unsigned long int
- OP2)
- Set ROP to OP1 + OP2.
-
- - Function: void mpz_sub (mpz_t ROP, mpz_t OP1, mpz_t OP2)
- - Function: void mpz_sub_ui (mpz_t ROP, mpz_t OP1, unsigned long int
- OP2)
- Set ROP to OP1 - OP2.
-
- - Function: void mpz_mul (mpz_t ROP, mpz_t OP1, mpz_t OP2)
- - Function: void mpz_mul_ui (mpz_t ROP, mpz_t OP1, unsigned long int
- OP2)
- Set ROP to OP1 times OP2.
-
- - Function: void mpz_mul_2exp (mpz_t ROP, mpz_t OP1, unsigned long int
- OP2)
- Set ROP to OP1 times 2 raised to OP2. This operation can also be
- defined as a left shift, OP2 steps.
-
- - Function: void mpz_neg (mpz_t ROP, mpz_t OP)
- Set ROP to -OP.
-
- - Function: void mpz_abs (mpz_t ROP, mpz_t OP)
- Set ROP to the absolute value of OP.
-
- - Function: void mpz_fac_ui (mpz_t ROP, unsigned long int OP)
- Set ROP to OP!, the factorial of OP.
-
-Division functions
-------------------
-
- Division is undefined if the divisor is zero, and passing a zero
-divisor to the divide or modulo functions, as well passing a zero mod
-argument to the `mpz_powm' and `mpz_powm_ui' functions, will make these
-functions intentionally divide by zero. This gives the user the
-possibility to handle arithmetic exceptions in these functions in the
-same manner as other arithmetic exceptions.
-
- There are three main groups of division functions:
- * Functions that truncate the quotient towards 0. The names of these
- functions start with `mpz_tdiv'. The `t' in the name is short for
- `truncate'.
-
- * Functions that round the quotient towards -infinity. The names of
- these routines start with `mpz_fdiv'. The `f' in the name is
- short for `floor'.
-
- * Functions that round the quotient towards +infinity. The names of
- these routines start with `mpz_cdiv'. The `c' in the name is
- short for `ceil'.
-
- For each rounding mode, there are a couple of variants. Here `q'
-means that the quotient is computed, while `r' means that the remainder
-is computed. Functions that compute both the quotient and remainder
-have `qr' in the name.
-
- - Function: void mpz_tdiv_q (mpz_t ROP, mpz_t OP1, mpz_t OP2)
- - Function: void mpz_tdiv_q_ui (mpz_t ROP, mpz_t OP1, unsigned long
- int OP2)
- Set ROP to [OP1/OP2]. The quotient is truncated towards 0.
-
- - Function: void mpz_tdiv_r (mpz_t ROP, mpz_t OP1, mpz_t OP2)
- - Function: void mpz_tdiv_r_ui (mpz_t ROP, mpz_t OP1, unsigned long
- int OP2)
- Set ROP to (OP1 - [OP1/OP2] * OP2). Unless the remainder is zero,
- it has the same sign as the dividend.
-
- - Function: void mpz_tdiv_qr (mpz_t ROP1, mpz_t ROP2, mpz_t OP1, mpz_t
- OP2)
- - Function: void mpz_tdiv_qr_ui (mpz_t ROP1, mpz_t ROP2, mpz_t OP1,
- unsigned long int OP2)
- Divide OP1 by OP2 and put the quotient in ROP1 and the remainder
- in ROP2. The quotient is rounded towards 0. Unless the remainder
- is zero, it has the same sign as the dividend.
-
- If ROP1 and ROP2 are the same variable, the results are undefined.
-
- - Function: void mpz_fdiv_q (mpz_t ROP1, mpz_t OP1, mpz_t OP2)
- - Function: void mpz_fdiv_q_ui (mpz_t ROP, mpz_t OP1, unsigned long
- int OP2)
- Set ROP to OP1/OP2. The quotient is rounded towards -infinity.
-
- - Function: void mpz_fdiv_r (mpz_t ROP, mpz_t OP1, mpz_t OP2)
- - Function: unsigned long int mpz_fdiv_r_ui (mpz_t ROP, mpz_t OP1,
- unsigned long int OP2)
- Divide OP1 by OP2 and put the remainder in ROP. Unless the
- remainder is zero, it has the same sign as the divisor.
-
- For `mpz_fdiv_r_ui' the remainder is small enough to fit in an
- `unsigned long int', and is therefore returned.
-
- - Function: void mpz_fdiv_qr (mpz_t ROP1, mpz_t ROP2, mpz_t OP1, mpz_t
- OP2)
- - Function: unsigned long int mpz_fdiv_qr_ui (mpz_t ROP1, mpz_t ROP2,
- mpz_t OP1, unsigned long int OP2)
- Divide OP1 by OP2 and put the quotient in ROP1 and the remainder
- in ROP2. The quotient is rounded towards -infinity. Unless the
- remainder is zero, it has the same sign as the divisor.
-
- For `mpz_fdiv_qr_ui' the remainder is small enough to fit in an
- `unsigned long int', and is therefore returned.
-
- If ROP1 and ROP2 are the same variable, the results are undefined.
-
- - Function: unsigned long int mpz_fdiv_ui (mpz_t OP1, unsigned long
- int OP2)
- This function is similar to `mpz_fdiv_r_ui', but the remainder is
- only returned; it is not stored anywhere.
-
- - Function: void mpz_cdiv_q (mpz_t ROP1, mpz_t OP1, mpz_t OP2)
- - Function: void mpz_cdiv_q_ui (mpz_t ROP, mpz_t OP1, unsigned long
- int OP2)
- Set ROP to OP1/OP2. The quotient is rounded towards +infinity.
-
- - Function: void mpz_cdiv_r (mpz_t ROP, mpz_t OP1, mpz_t OP2)
- - Function: unsigned long int mpz_cdiv_r_ui (mpz_t ROP, mpz_t OP1,
- unsigned long int OP2)
- Divide OP1 by OP2 and put the remainder in ROP. Unless the
- remainder is zero, it has the opposite sign as the divisor.
-
- For `mpz_cdiv_r_ui' the negated remainder is small enough to fit
- in an `unsigned long int', and it is therefore returned.
-
- - Function: void mpz_cdiv_qr (mpz_t ROP1, mpz_t ROP2, mpz_t OP1, mpz_t
- OP2)
- - Function: unsigned long int mpz_cdiv_qr_ui (mpz_t ROP1, mpz_t ROP2,
- mpz_t OP1, unsigned long int OP2)
- Divide OP1 by OP2 and put the quotient in ROP1 and the remainder
- in ROP2. The quotient is rounded towards +infinity. Unless the
- remainder is zero, it has the opposite sign as the divisor.
-
- For `mpz_cdiv_qr_ui' the negated remainder is small enough to fit
- in an `unsigned long int', and it is therefore returned.
-
- If ROP1 and ROP2 are the same variable, the results are undefined.
-
- - Function: unsigned long int mpz_cdiv_ui (mpz_t OP1, unsigned long
- int OP2)
- Return the negated remainder, similar to `mpz_cdiv_r_ui'. (The
- difference is that this function doesn't store the remainder
- anywhere.)
-
- - Function: void mpz_mod (mpz_t ROP, mpz_t OP1, mpz_t OP2)
- - Function: unsigned long int mpz_mod_ui (mpz_t ROP, mpz_t OP1,
- unsigned long int OP2)
- Set ROP to OP1 `mod' OP2. The sign of the divisor is ignored, and
- the result is always non-negative.
-
- For `mpz_mod_ui' the remainder is small enough to fit in an
- `unsigned long int', and is therefore returned.
-
- - Function: void mpz_divexact (mpz_t ROP, mpz_t OP1, mpz_t OP2)
- Set ROP to OP1/OP2. This function produces correct results only
- when it is known in advance that OP2 divides OP1.
-
- Since mpz_divexact is much faster than any of the other routines
- that produce the quotient (*note References::. Jebelean), it is
- the best choice for instances in which exact division is known to
- occur, such as reducing a rational to lowest terms.
-
- - Function: void mpz_tdiv_q_2exp (mpz_t ROP, mpz_t OP1, unsigned long
- int OP2)
- Set ROP to OP1 divided by 2 raised to OP2. The quotient is
- rounded towards 0.
-
- - Function: void mpz_tdiv_r_2exp (mpz_t ROP, mpz_t OP1, unsigned long
- int OP2)
- Divide OP1 by (2 raised to OP2) and put the remainder in ROP.
- Unless it is zero, ROP will have the same sign as OP1.
-
- - Function: void mpz_fdiv_q_2exp (mpz_t ROP, mpz_t OP1, unsigned long
- int OP2)
- Set ROP to OP1 divided by 2 raised to OP2. The quotient is
- rounded towards -infinity.
-
- - Function: void mpz_fdiv_r_2exp (mpz_t ROP, mpz_t OP1, unsigned long
- int OP2)
- Divide OP1 by (2 raised to OP2) and put the remainder in ROP. The
- sign of ROP will always be positive.
-
- This operation can also be defined as masking of the OP2 least
- significant bits.
-
-Exponentialization Functions
-----------------------------
-
- - Function: void mpz_powm (mpz_t ROP, mpz_t BASE, mpz_t EXP, mpz_t MOD)
- - Function: void mpz_powm_ui (mpz_t ROP, mpz_t BASE, unsigned long int
- EXP, mpz_t MOD)
- Set ROP to (BASE raised to EXP) `mod' MOD. If EXP is negative,
- the result is undefined.
-
- - Function: void mpz_pow_ui (mpz_t ROP, mpz_t BASE, unsigned long int
- EXP)
- - Function: void mpz_ui_pow_ui (mpz_t ROP, unsigned long int BASE,
- unsigned long int EXP)
- Set ROP to BASE raised to EXP. The case of 0^0 yields 1.
-
-Square Root Functions
----------------------
-
- - Function: void mpz_sqrt (mpz_t ROP, mpz_t OP)
- Set ROP to the truncated integer part of the square root of OP.
-
- - Function: void mpz_sqrtrem (mpz_t ROP1, mpz_t ROP2, mpz_t OP)
- Set ROP1 to the truncated integer part of the square root of OP,
- like `mpz_sqrt'. Set ROP2 to OP-ROP1*ROP1, (i.e., zero if OP is a
- perfect square).
-
- If ROP1 and ROP2 are the same variable, the results are undefined.
-
- - Function: int mpz_perfect_square_p (mpz_t OP)
- Return non-zero if OP is a perfect square, i.e., if the square
- root of OP is an integer. Return zero otherwise.
-
-Number Theoretic Functions
---------------------------
-
- - Function: int mpz_probab_prime_p (mpz_t OP, int REPS)
- If this function returns 0, OP is definitely not prime. If it
- returns 1, then OP is `probably' prime. The probability of a
- false positive is (1/4)**REPS. A reasonable value of reps is 25.
-
- An implementation of the probabilistic primality test found in
- Seminumerical Algorithms (*note References::. Knuth).
-
- - Function: void mpz_gcd (mpz_t ROP, mpz_t OP1, mpz_t OP2)
- Set ROP to the greatest common divisor of OP1 and OP2.
-
- - Function: unsigned long int mpz_gcd_ui (mpz_t ROP, mpz_t OP1,
- unsigned long int OP2)
- Compute the greatest common divisor of OP1 and OP2. If ROP is not
- NULL, store the result there.
-
- If the result is small enough to fit in an `unsigned long int', it
- is returned. If the result does not fit, 0 is returned, and the
- result is equal to the argument OP1. Note that the result will
- always fit if OP2 is non-zero.
-
- - Function: void mpz_gcdext (mpz_t G, mpz_t S, mpz_t T, mpz_t A, mpz_t
- B)
- Compute G, S, and T, such that AS + BT = G = `gcd' (A, B). If T is
- NULL, that argument is not computed.
-
- - Function: int mpz_invert (mpz_t ROP, mpz_t OP1, mpz_t OP2)
- Compute the inverse of OP1 modulo OP2 and put the result in ROP.
- Return non-zero if an inverse exist, zero otherwise. When the
- function returns zero, do not assume anything about the value in
- ROP.
-
- - Function: int mpz_jacobi (mpz_t OP1, mpz_t OP2)
- - Function: int mpz_legendre (mpz_t OP1, mpz_t OP2)
- Compute the Jacobi and Legendre symbols, respectively.
-
-
-File: gmp.info, Node: Comparison Functions, Next: Integer Logic and Bit Fiddling, Prev: Integer Arithmetic, Up: Integer Functions
-
-Comparison Functions
-====================
-
- - Function: int mpz_cmp (mpz_t OP1, mpz_t OP2)
- Compare OP1 and OP2. Return a positive value if OP1 > OP2, zero
- if OP1 = OP2, and a negative value if OP1 < OP2.
-
- - Macro: int mpz_cmp_ui (mpz_t OP1, unsigned long int OP2)
- - Macro: int mpz_cmp_si (mpz_t OP1, signed long int OP2)
- Compare OP1 and OP2. Return a positive value if OP1 > OP2, zero
- if OP1 = OP2, and a negative value if OP1 < OP2.
-
- These functions are actually implemented as macros. They evaluate
- their arguments multiple times.
-
- - Macro: int mpz_sgn (mpz_t OP)
- Return +1 if OP > 0, 0 if OP = 0, and -1 if OP < 0.
-
- This function is actually implemented as a macro. It evaluates its
- arguments multiple times.
-
-
-File: gmp.info, Node: Integer Logic and Bit Fiddling, Next: I/O of Integers, Prev: Comparison Functions, Up: Integer Functions
-
-Logical and Bit Manipulation Functions
-======================================
-
- These functions behave as if two's complement arithmetic were used
-(although sign-magnitude is used by the actual implementation).
-
- - Function: void mpz_and (mpz_t ROP, mpz_t OP1, mpz_t OP2)
- Set ROP to OP1 logical-and OP2.
-
- - Function: void mpz_ior (mpz_t ROP, mpz_t OP1, mpz_t OP2)
- Set ROP to OP1 inclusive-or OP2.
-
- - Function: void mpz_com (mpz_t ROP, mpz_t OP)
- Set ROP to the one's complement of OP.
-
- - Function: unsigned long int mpz_popcount (mpz_t OP)
- For non-negative numbers, return the population count of OP. For
- negative numbers, return the largest possible value (MAX_ULONG).
-
- - Function: unsigned long int mpz_hamdist (mpz_t OP1, mpz_t OP2)
- If OP1 and OP2 are both non-negative, return the hamming distance
- between the two operands. Otherwise, return the largest possible
- value (MAX_ULONG).
-
- It is possible to extend this function to return a useful value
- when the operands are both negative, but the current
- implementation returns MAX_ULONG in this case. *Do not depend on
- this behavior, since it will change in future versions of the
- library.*
-
- - Function: unsigned long int mpz_scan0 (mpz_t OP, unsigned long int
- STARTING_BIT)
- Scan OP, starting with bit STARTING_BIT, towards more significant
- bits, until the first clear bit is found. Return the index of the
- found bit.
-
- - Function: unsigned long int mpz_scan1 (mpz_t OP, unsigned long int
- STARTING_BIT)
- Scan OP, starting with bit STARTING_BIT, towards more significant
- bits, until the first set bit is found. Return the index of the
- found bit.
-
- - Function: void mpz_setbit (mpz_t ROP, unsigned long int BIT_INDEX)
- Set bit BIT_INDEX in OP1.
-
- - Function: void mpz_clrbit (mpz_t ROP, unsigned long int BIT_INDEX)
- Clear bit BIT_INDEX in OP1.
-
-
-File: gmp.info, Node: I/O of Integers, Next: Miscellaneous Integer Functions, Prev: Integer Logic and Bit Fiddling, Up: Integer Functions
-
-Input and Output Functions
-==========================
-
- Functions that perform input from a stdio stream, and functions that
-output to a stdio stream. Passing a NULL pointer for a STREAM argument
-to any of these functions will make them read from `stdin' and write to
-`stdout', respectively.
-
- When using any of these functions, it is a good idea to include
-`stdio.h' before `gmp.h', since that will allow `gmp.h' to define
-prototypes for these functions.
-
- - Function: size_t mpz_out_str (FILE *STREAM, int BASE, mpz_t OP)
- Output OP on stdio stream STREAM, as a string of digits in base
- BASE. The base may vary from 2 to 36.
-
- Return the number of bytes written, or if an error occurred,
- return 0.
-
- - Function: size_t mpz_inp_str (mpz_t ROP, FILE *STREAM, int BASE)
- Input a possibly white-space preceded string in base BASE from
- stdio stream STREAM, and put the read integer in ROP. The base
- may vary from 2 to 36. If BASE is 0, the actual base is
- determined from the leading characters: if the first two
- characters are `0x' or `0X', hexadecimal is assumed, otherwise if
- the first character is `0', octal is assumed, otherwise decimal is
- assumed.
-
- Return the number of bytes read, or if an error occurred, return 0.
-
- - Function: size_t mpz_out_raw (FILE *STREAM, mpz_t OP)
- Output OP on stdio stream STREAM, in raw binary format. The
- integer is written in a portable format, with 4 bytes of size
- information, and that many bytes of limbs. Both the size and the
- limbs are written in decreasing significance order (i.e., in
- big-endian).
-
- The output can be read with `mpz_inp_raw'.
-
- Return the number of bytes written, or if an error occurred,
- return 0.
-
- The output of this can not be read by `mpz_inp_raw' from GMP 1,
- because of changes necessary for compatibility between 32-bit and
- 64-bit machines.
-
- - Function: size_t mpz_inp_raw (mpz_t ROP, FILE *STREAM)
- Input from stdio stream STREAM in the format written by
- `mpz_out_raw', and put the result in ROP. Return the number of
- bytes read, or if an error occurred, return 0.
-
- This routine can read the output from `mpz_out_raw' also from GMP
- 1, in spite of changes necessary for compatibility between 32-bit
- and 64-bit machines.
-
-
-File: gmp.info, Node: Miscellaneous Integer Functions, Prev: I/O of Integers, Up: Integer Functions
-
-Miscellaneous Functions
-=======================
-
- - Function: void mpz_random (mpz_t ROP, mp_size_t MAX_SIZE)
- Generate a random integer of at most MAX_SIZE limbs. The generated
- random number doesn't satisfy any particular requirements of
- randomness. Negative random numbers are generated when MAX_SIZE
- is negative.
-
- - Function: void mpz_random2 (mpz_t ROP, mp_size_t MAX_SIZE)
- Generate a random integer of at most MAX_SIZE limbs, with long
- strings of zeros and ones in the binary representation. Useful
- for testing functions and algorithms, since this kind of random
- numbers have proven to be more likely to trigger corner-case bugs.
- Negative random numbers are generated when MAX_SIZE is negative.
-
- - Function: size_t mpz_size (mpz_t OP)
- Return the size of OP measured in number of limbs. If OP is zero,
- the returned value will be zero.
-
- *This function is obsolete. It will disappear from future MP
- releases.*
-
- - Function: size_t mpz_sizeinbase (mpz_t OP, int BASE)
- Return the size of OP measured in number of digits in base BASE.
- The base may vary from 2 to 36. The returned value will be exact
- or 1 too big. If BASE is a power of 2, the returned value will
- always be exact.
-
- This function is useful in order to allocate the right amount of
- space before converting OP to a string. The right amount of
- allocation is normally two more than the value returned by
- `mpz_sizeinbase' (one extra for a minus sign and one for the
- terminating '\0').
-
-
-File: gmp.info, Node: Rational Number Functions, Next: Floating-point Functions, Prev: Integer Functions, Up: Top
-
-Rational Number Functions
-*************************
-
- This chapter describes the MP functions for performing arithmetic on
-rational numbers. These functions start with the prefix `mpq_'.
-
- Rational numbers are stored in objects of type `mpq_t'.
-
- All rational arithmetic functions assume operands have a canonical
-form, and canonicalize their result. The canonical from means that the
-denominator and the numerator have no common factors, and that the
-denominator is positive. Zero has the unique representation 0/1.
-
- Pure assignment functions do not canonicalize the assigned variable.
-It is the responsibility of the user to canonicalize the assigned
-variable before any arithmetic operations are performed on that
-variable. *Note that this is an incompatible change from version 1 of
-the library.*
-
- - Function: void mpq_canonicalize (mpq_t OP)
- Remove any factors that are common to the numerator and
- denominator of OP, and make the denominator positive.
-
-* Menu:
-
-* Initializing Rationals::
-* Assigning Rationals::
-* Simultaneous Integer Init & Assign::
-* Comparing Rationals::
-* Applying Integer Functions::
-* Miscellaneous Rational Functions::
-
-
-File: gmp.info, Node: Initializing Rationals, Next: Assigning Rationals, Prev: Rational Number Functions, Up: Rational Number Functions
-
-Initialization and Assignment Functions
-=======================================
-
- - Function: void mpq_init (mpq_t DEST_RATIONAL)
- Initialize DEST_RATIONAL and set it to 0/1. Each variable should
- normally only be initialized once, or at least cleared out (using
- the function `mpq_clear') between each initialization.
-
- - Function: void mpq_clear (mpq_t RATIONAL_NUMBER)
- Free the space occupied by RATIONAL_NUMBER. Make sure to call this
- function for all `mpq_t' variables when you are done with them.
-
- - Function: void mpq_set (mpq_t ROP, mpq_t OP)
- - Function: void mpq_set_z (mpq_t ROP, mpz_t OP)
- Assign ROP from OP.
-
- - Function: void mpq_set_ui (mpq_t ROP, unsigned long int OP1,
- unsigned long int OP2)
- - Function: void mpq_set_si (mpq_t ROP, signed long int OP1, unsigned
- long int OP2)
- Set the value of ROP to OP1/OP2. Note that if OP1 and OP2 have
- common factors, ROP has to be passed to `mpq_canonicalize' before
- any operations are performed on ROP.
-
-
-File: gmp.info, Node: Assigning Rationals, Next: Comparing Rationals, Prev: Initializing Rationals, Up: Rational Number Functions
-
-Arithmetic Functions
-====================
-
- - Function: void mpq_add (mpq_t SUM, mpq_t ADDEND1, mpq_t ADDEND2)
- Set SUM to ADDEND1 + ADDEND2.
-
- - Function: void mpq_sub (mpq_t DIFFERENCE, mpq_t MINUEND, mpq_t
- SUBTRAHEND)
- Set DIFFERENCE to MINUEND - SUBTRAHEND.
-
- - Function: void mpq_mul (mpq_t PRODUCT, mpq_t MULTIPLIER, mpq_t
- MULTIPLICAND)
- Set PRODUCT to MULTIPLIER times MULTIPLICAND.
-
- - Function: void mpq_div (mpq_t QUOTIENT, mpq_t DIVIDEND, mpq_t
- DIVISOR)
- Set QUOTIENT to DIVIDEND/DIVISOR.
-
- - Function: void mpq_neg (mpq_t NEGATED_OPERAND, mpq_t OPERAND)
- Set NEGATED_OPERAND to -OPERAND.
-
- - Function: void mpq_inv (mpq_t INVERTED_NUMBER, mpq_t NUMBER)
- Set INVERTED_NUMBER to 1/NUMBER. If the new denominator is zero,
- this routine will divide by zero.
-
-
-File: gmp.info, Node: Comparing Rationals, Next: Applying Integer Functions, Prev: Assigning Rationals, Up: Rational Number Functions
-
-Comparison Functions
-====================
-
- - Function: int mpq_cmp (mpq_t OP1, mpq_t OP2)
- Compare OP1 and OP2. Return a positive value if OP1 > OP2, zero
- if OP1 = OP2, and a negative value if OP1 < OP2.
-
- To determine if two rationals are equal, `mpq_equal' is faster than
- `mpq_cmp'.
-
- - Macro: int mpq_cmp_ui (mpq_t OP1, unsigned long int NUM2, unsigned
- long int DEN2)
- Compare OP1 and NUM2/DEN2. Return a positive value if OP1 >
- NUM2/DEN2, zero if OP1 = NUM2/DEN2, and a negative value if OP1 <
- NUM2/DEN2.
-
- This routine allows that NUM2 and DEN2 have common factors.
-
- This function is actually implemented as a macro. It evaluates its
- arguments multiple times.
-
- - Macro: int mpq_sgn (mpq_t OP)
- Return +1 if OP > 0, 0 if OP = 0, and -1 if OP < 0.
-
- This function is actually implemented as a macro. It evaluates its
- arguments multiple times.
-
- - Function: int mpq_equal (mpq_t OP1, mpq_t OP2)
- Return non-zero if OP1 and OP2 are equal, zero if they are
- non-equal. Although `mpq_cmp' can be used for the same purpose,
- this function is much faster.
-
-
-File: gmp.info, Node: Applying Integer Functions, Next: Miscellaneous Rational Functions, Prev: Comparing Rationals, Up: Rational Number Functions
-
-Applying Integer Functions to Rationals
-=======================================
-
- The set of `mpq' functions is quite small. In particular, there are
-no functions for either input or output. But there are two macros that
-allow us to apply any `mpz' function on the numerator or denominator of
-a rational number. If these macros are used to assign to the rational
-number, `mpq_canonicalize' normally need to be called afterwards.
-
- - Macro: mpz_t mpq_numref (mpq_t OP)
- - Macro: mpz_t mpq_denref (mpq_t OP)
- Return a reference to the numerator and denominator of OP,
- respectively. The `mpz' functions can be used on the result of
- these macros.
-
-
-File: gmp.info, Node: Miscellaneous Rational Functions, Prev: Applying Integer Functions, Up: Rational Number Functions
-
-Miscellaneous Functions
-=======================
-
- - Function: double mpq_get_d (mpq_t OP)
- Convert OP to a double.
-
- These functions assign between either the numerator or denominator
-of a rational, and an integer. Instead of using these functions, it is
-preferable to use the more general mechanisms `mpq_numref' and
-`mpq_denref', together with `mpz_set'.
-
- - Function: void mpq_set_num (mpq_t RATIONAL, mpz_t NUMERATOR)
- Copy NUMERATOR to the numerator of RATIONAL. When this risks to
- make the numerator and denominator of RATIONAL have common
- factors, you have to pass RATIONAL to `mpq_canonicalize' before
- any operations are performed on RATIONAL.
-
- This function is equivalent to `mpz_set (mpq_numref (RATIONAL),
- NUMERATOR)'.
-
- - Function: void mpq_set_den (mpq_t RATIONAL, mpz_t DENOMINATOR)
- Copy DENOMINATOR to the denominator of RATIONAL. When this risks
- to make the numerator and denominator of RATIONAL have common
- factors, or if the denominator might be negative, you have to pass
- RATIONAL to `mpq_canonicalize' before any operations are performed
- on RATIONAL.
-
- *In version 1 of the library, negative denominators were handled by
- copying the sign to the numerator. That is no longer done.*
-
- This function is equivalent to `mpz_set (mpq_denref (RATIONAL),
- DENOMINATORS)'.
-
- - Function: void mpq_get_num (mpz_t NUMERATOR, mpq_t RATIONAL)
- Copy the numerator of RATIONAL to the integer NUMERATOR, to
- prepare for integer operations on the numerator.
-
- This function is equivalent to `mpz_set (NUMERATOR, mpq_numref
- (RATIONAL))'.
-
- - Function: void mpq_get_den (mpz_t DENOMINATOR, mpq_t RATIONAL)
- Copy the denominator of RATIONAL to the integer DENOMINATOR, to
- prepare for integer operations on the denominator.
-
- This function is equivalent to `mpz_set (DENOMINATOR, mpq_denref
- (RATIONAL))'.
-
diff -rup --new-file baseline/fsf/gmp/gmp.info-2 amiga/fsf/gmp/gmp.info-2
--- baseline/fsf/gmp/gmp.info-2 Thu Jun 6 12:30:58 1996
+++ amiga/fsf/gmp/gmp.info-2 Wed Dec 31 17:00:00 1969
@@ -1,1035 +0,0 @@
-This is Info file gmp.info, produced by Makeinfo-1.64 from the input
-file gmp.texi.
-
-START-INFO-DIR-ENTRY
-* gmp: (gmp.info). GNU Multiple Precision Arithmetic Library.
-END-INFO-DIR-ENTRY
-
- This file documents GNU MP, a library for arbitrary-precision
-arithmetic.
-
- Copyright (C) 1991, 1993, 1994, 1995, 1996 Free Software Foundation,
-Inc.
-
- Permission is granted to make and distribute verbatim copies of this
-manual provided the copyright notice and this permission notice are
-preserved on all copies.
-
- Permission is granted to copy and distribute modified versions of
-this manual under the conditions for verbatim copying, provided that
-the entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
- Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be stated in a
-translation approved by the Foundation.
-
-
-File: gmp.info, Node: Floating-point Functions, Next: Low-level Functions, Prev: Rational Number Functions, Up: Top
-
-Floating-point Functions
-************************
-
- This is a description of the *preliminary* interface for
-floating-point arithmetic in GNU MP 2.
-
- The floating-point functions expect arguments of type `mpf_t'.
-
- The MP floating-point functions have an interface that is similar to
-the MP integer functions. The function prefix for floating-point
-operations is `mpf_'.
-
- There is one significant characteristic of floating-point numbers
-that has motivated a difference between this function class and other
-MP function classes: the inherent inexactness of floating point
-arithmetic. The user has to specify the precision of each variable. A
-computation that assigns a variable will take place with the precision
-of the assigned variable; the precision of variables used as input is
-ignored.
-
- The precision of a calculation is defined as follows: Compute the
-requested operation exactly (with "infinite precision"), and truncate
-the result to the destination variable precision. Even if the user has
-asked for a very high precision, MP will not calculate with superfluous
-digits. For example, if two low-precision numbers of nearly equal
-magnitude are added, the precision of the result will be limited to
-what is required to represent the result accurately.
-
- The MP floating-point functions are *not* intended as a smooth
-extension to the IEEE P754 arithmetic. Specifically, the results
-obtained on one computer often differs from the results obtained on a
-computer with a different word size.
-
-* Menu:
-
-* Initializing Floats::
-* Assigning Floats::
-* Simultaneous Float Init & Assign::
-* Converting Floats::
-* Float Arithmetic::
-* Float Comparison::
-* I/O of Floats::
-* Miscellaneous Float Functions::
-
-
-File: gmp.info, Node: Initializing Floats, Next: Assigning Floats, Up: Floating-point Functions
-
-Initialization and Assignment Functions
-=======================================
-
- - Function: void mpf_set_default_prec (unsigned long int PREC)
- Set the default precision to be *at least* PREC bits. All
- subsequent calls to `mpf_init' will use this precision, but
- previously initialized variables are unaffected.
-
- An `mpf_t' object must be initialized before storing the first value
-in it. The functions `mpf_init' and `mpf_init2' are used for that
-purpose.
-
- - Function: void mpf_init (mpf_t X)
- Initialize X to 0. Normally, a variable should be initialized
- once only or at least be cleared, using `mpf_clear', between
- initializations. The precision of X is undefined unless a default
- precision has already been established by a call to
- `mpf_set_default_prec'.
-
- - Function: void mpf_init2 (mpf_t X, unsigned long int PREC)
- Initialize X to 0 and set its precision to be *at least* PREC
- bits. Normally, a variable should be initialized once only or at
- least be cleared, using `mpf_clear', between initializations.
-
- - Function: void mpf_clear (mpf_t X)
- Free the space occupied by X. Make sure to call this function for
- all `mpf_t' variables when you are done with them.
-
- Here is an example on how to initialize floating-point variables:
- {
- mpf_t x, y;
- mpf_init (x); /* use default precision */
- mpf_init2 (y, 256); /* precision *at least* 256 bits */
- ...
- /* Unless the program is about to exit, do ... */
- mpf_clear (x);
- mpf_clear (y);
- }
-
- The following three functions are useful for changing the precision
-during a calculation. A typical use would be for adjusting the
-precision gradually in iterative algorithms like Newton-Raphson, making
-the computation precision closely match the actual accurate part of the
-numbers.
-
- - Function: void mpf_set_prec (mpf_t ROP, unsigned long int PREC)
- Set the precision of ROP to be *at least* PREC bits. Since
- changing the precision involves calls to `realloc', this routine
- should not be called in a tight loop.
-
- - Function: unsigned long int mpf_get_prec (mpf_t OP)
- Return the precision actually used for assignments of OP.
-
- - Function: void mpf_set_prec_raw (mpf_t ROP, unsigned long int PREC)
- Set the precision of ROP to be *at least* PREC bits. This is a
- low-level function that does not change the allocation. The PREC
- argument must not be larger that the precision previously returned
- by `mpf_get_prec'. It is crucial that the precision of ROP is
- ultimately reset to exactly the value returned by `mpf_get_prec'.
-
-
-File: gmp.info, Node: Assigning Floats, Next: Simultaneous Float Init & Assign, Prev: Initializing Floats, Up: Floating-point Functions
-
-Assignment Functions
---------------------
-
- These functions assign new values to already initialized floats
-(*note Initializing Floats::.).
-
- - Function: void mpf_set (mpf_t ROP, mpf_t OP)
- - Function: void mpf_set_ui (mpf_t ROP, unsigned long int OP)
- - Function: void mpf_set_si (mpf_t ROP, signed long int OP)
- - Function: void mpf_set_d (mpf_t ROP, double OP)
- - Function: void mpf_set_z (mpf_t ROP, mpz_t OP)
- - Function: void mpf_set_q (mpf_t ROP, mpq_t OP)
- Set the value of ROP from OP.
-
- - Function: int mpf_set_str (mpf_t ROP, char *STR, int BASE)
- Set the value of ROP from the string in STR. The string is of the
- form `M@N' or, if the base is 10 or less, alternatively `MeN'.
- `M' is the mantissa and `N' is the exponent. The mantissa is
- always in the specified base. The exponent is either in the
- specified base or, if BASE is negative, in decimal.
-
- The argument BASE may be in the ranges 2 to 36, or -36 to -2.
- Negative values are used to specify that the exponent is in
- decimal.
-
- Unlike the corresponding `mpz' function, the base will not be
- determined from the leading characters of the string if BASE is 0.
- This is so that numbers like `0.23' are not interpreted as octal.
-
- White space is allowed in the string, and is simply ignored.
-
- This function returns 0 if the entire string up to the '\0' is a
- valid number in base BASE. Otherwise it returns -1.
-
-
-File: gmp.info, Node: Simultaneous Float Init & Assign, Next: Converting Floats, Prev: Assigning Floats, Up: Floating-point Functions
-
-Combined Initialization and Assignment Functions
-------------------------------------------------
-
- For convenience, MP provides a parallel series of initialize-and-set
-functions which initialize the output and then store the value there.
-These functions' names have the form `mpf_init_set...'
-
- Once the float has been initialized by any of the `mpf_init_set...'
-functions, it can be used as the source or destination operand for the
-ordinary float functions. Don't use an initialize-and-set function on
-a variable already initialized!
-
- - Function: void mpf_init_set (mpf_t ROP, mpf_t OP)
- - Function: void mpf_init_set_ui (mpf_t ROP, unsigned long int OP)
- - Function: void mpf_init_set_si (mpf_t ROP, signed long int OP)
- - Function: void mpf_init_set_d (mpf_t ROP, double OP)
- Initialize ROP and set its value from OP.
-
- The precision of ROP will be taken from the active default
- precision, as set by `mpf_set_default_prec'.
-
- - Function: int mpf_init_set_str (mpf_t ROP, char *STR, int BASE)
- Initialize ROP and set its value from the string in STR. See
- `mpf_set_str' above for details on the assignment operation.
-
- Note that ROP is initialized even if an error occurs. (I.e., you
- have to call `mpf_clear' for it.)
-
- The precision of ROP will be taken from the active default
- precision, as set by `mpf_set_default_prec'.
-
-
-File: gmp.info, Node: Converting Floats, Next: Float Arithmetic, Prev: Simultaneous Float Init & Assign, Up: Floating-point Functions
-
-Conversion Functions
-====================
-
- - Function: double mpf_get_d (mpf_t OP)
- Convert OP to a double.
-
- - Function: char * mpf_get_str (char *STR, mp_exp_t *EXPPTR, int BASE,
- size_t N_DIGITS, mpf_t OP)
- Convert OP to a string of digits in base BASE. The base may vary
- from 2 to 36. Generate at most N_DIGITS significant digits, or if
- N_DIGITS is 0, the maximum number of digits accurately
- representable by OP.
-
- If STR is NULL, space for the mantissa is allocated using the
- default allocation function, and a pointer to the string is
- returned.
-
- If STR is not NULL, it should point to a block of storage enough
- large for the mantissa, i.e., N_DIGITS + 2. The two extra bytes
- are for a possible minus sign, and for the terminating null
- character.
-
- The exponent is written through the pointer EXPPTR.
-
- If N_DIGITS is 0, the maximum number of digits meaningfully
- achievable from the precision of OP will be generated. Note that
- the space requirements for STR in this case will be impossible for
- the user to predetermine. Therefore, you need to pass NULL for
- the string argument whenever N_DIGITS is 0.
-
- The generated string is a fraction, with an implicit radix point
- immediately to the left of the first digit. For example, the
- number 3.1416 would be returned as "31416" in the string and 1
- written at EXPPTR.
-
-
-File: gmp.info, Node: Float Arithmetic, Next: Float Comparison, Prev: Converting Floats, Up: Floating-point Functions
-
-Arithmetic Functions
-====================
-
- - Function: void mpf_add (mpf_t ROP, mpf_t OP1, mpf_t OP2)
- - Function: void mpf_add_ui (mpf_t ROP, mpf_t OP1, unsigned long int
- OP2)
- Set ROP to OP1 + OP2.
-
- - Function: void mpf_sub (mpf_t ROP, mpf_t OP1, mpf_t OP2)
- - Function: void mpf_ui_sub (mpf_t ROP, unsigned long int OP1, mpf_t
- OP2)
- - Function: void mpf_sub_ui (mpf_t ROP, mpf_t OP1, unsigned long int
- OP2)
- Set ROP to OP1 - OP2.
-
- - Function: void mpf_mul (mpf_t ROP, mpf_t OP1, mpf_t OP2)
- - Function: void mpf_mul_ui (mpf_t ROP, mpf_t OP1, unsigned long int
- OP2)
- Set ROP to OP1 times OP2.
-
- Division is undefined if the divisor is zero, and passing a zero
-divisor to the divide functions will make these functions intentionally
-divide by zero. This gives the user the possibility to handle
-arithmetic exceptions in these functions in the same manner as other
-arithmetic exceptions.
-
- - Function: void mpf_div (mpf_t ROP, mpf_t OP1, mpf_t OP2)
- - Function: void mpf_ui_div (mpf_t ROP, unsigned long int OP1, mpf_t
- OP2)
- - Function: void mpf_div_ui (mpf_t ROP, mpf_t OP1, unsigned long int
- OP2)
- Set ROP to OP1/OP2.
-
- - Function: void mpf_sqrt (mpf_t ROP, mpf_t OP)
- - Function: void mpf_sqrt_ui (mpf_t ROP, unsigned long int OP)
- Set ROP to the square root of OP.
-
- - Function: void mpf_neg (mpf_t ROP, mpf_t OP)
- Set ROP to -OP.
-
- - Function: void mpf_abs (mpf_t ROP, mpf_t OP)
- Set ROP to the absolute value of OP.
-
- - Function: void mpf_mul_2exp (mpf_t ROP, mpf_t OP1, unsigned long int
- OP2)
- Set ROP to OP1 times 2 raised to OP2.
-
- - Function: void mpf_div_2exp (mpf_t ROP, mpf_t OP1, unsigned long int
- OP2)
- Set ROP to OP1 divided by 2 raised to OP2.
-
-
-File: gmp.info, Node: Float Comparison, Next: I/O of Floats, Prev: Float Arithmetic, Up: Floating-point Functions
-
-Comparison Functions
-====================
-
- - Function: int mpf_cmp (mpf_t OP1, mpf_t OP2)
- - Function: int mpf_cmp_ui (mpf_t OP1, unsigned long int OP2)
- - Function: int mpf_cmp_si (mpf_t OP1, signed long int OP2)
- Compare OP1 and OP2. Return a positive value if OP1 > OP2, zero
- if OP1 = OP2, and a negative value if OP1 < OP2.
-
- - Function: int mpf_eq (mpf_t OP1, mpf_t OP2, unsigned long int op3)
- Return non-zero if the first OP3 bits of OP1 and OP2 are equal,
- zero otherwise. I.e., test of OP1 and OP2 are approximately equal.
-
- - Function: void mpf_reldiff (mpf_t ROP, mpf_t OP1, mpf_t OP2)
- Compute the relative difference between OP1 and OP2 and store the
- result in ROP.
-
- - Macro: int mpf_sgn (mpf_t OP)
- Return +1 if OP > 0, 0 if OP = 0, and -1 if OP < 0.
-
- This function is actually implemented as a macro. It evaluates its
- arguments multiple times.
-
-
-File: gmp.info, Node: I/O of Floats, Next: Miscellaneous Float Functions, Prev: Float Comparison, Up: Floating-point Functions
-
-Input and Output Functions
-==========================
-
- Functions that perform input from a stdio stream, and functions that
-output to a stdio stream. Passing a NULL pointer for a STREAM argument
-to any of these functions will make them read from `stdin' and write to
-`stdout', respectively.
-
- When using any of these functions, it is a good idea to include
-`stdio.h' before `gmp.h', since that will allow `gmp.h' to define
-prototypes for these functions.
-
- - Function: size_t mpf_out_str (FILE *STREAM, int BASE, size_t
- N_DIGITS, mpf_t OP)
- Output OP on stdio stream STREAM, as a string of digits in base
- BASE. The base may vary from 2 to 36. Print at most N_DIGITS
- significant digits, or if N_DIGITS is 0, the maximum number of
- digits accurately representable by OP.
-
- In addition to the significant digits, a leading `0.' and a
- trailing exponent, in the form `eNNN', are printed. If BASE is
- greater than 10, `@' will be used instead of `e' as exponent
- delimiter.
-
- Return the number of bytes written, or if an error occurred,
- return 0.
-
- - Function: size_t mpf_inp_str (mpf_t ROP, FILE *STREAM, int BASE)
- Input a string in base BASE from stdio stream STREAM, and put the
- read float in ROP. The string is of the form `M@N' or, if the
- base is 10 or less, alternatively `MeN'. `M' is the mantissa and
- `N' is the exponent. The mantissa is always in the specified
- base. The exponent is either in the specified base or, if BASE is
- negative, in decimal.
-
- The argument BASE may be in the ranges 2 to 36, or -36 to -2.
- Negative values are used to specify that the exponent is in
- decimal.
-
- Unlike the corresponding `mpz' function, the base will not be
- determined from the leading characters of the string if BASE is 0.
- This is so that numbers like `0.23' are not interpreted as octal.
-
- Return the number of bytes read, or if an error occurred, return 0.
-
-
-File: gmp.info, Node: Miscellaneous Float Functions, Prev: I/O of Floats, Up: Floating-point Functions
-
-Miscellaneous Functions
-=======================
-
- - Function: void mpf_random2 (mpf_t ROP, mp_size_t MAX_SIZE, mp_exp_t
- MAX_EXP)
- Generate a random float of at most MAX_SIZE limbs, with long
- strings of zeros and ones in the binary representation. The
- exponent of the number is in the interval -EXP to EXP. This
- function is useful for testing functions and algorithms, since
- this kind of random numbers have proven to be more likely to
- trigger corner-case bugs. Negative random numbers are generated
- when MAX_SIZE is negative.
-
-
-File: gmp.info, Node: Low-level Functions, Next: BSD Compatible Functions, Prev: Floating-point Functions, Up: Top
-
-Low-level Functions
-*******************
-
- This chapter describes low-level MP functions, used to implement the
-high-level MP functions, but also intended for time-critical user code.
-
- These functions start with the prefix `mpn_'.
-
- The `mpn' functions are designed to be as fast as possible, *not* to
-provide a coherent calling interface. The different functions have
-somewhat similar interfaces, but there are variations that make them
-hard to use. These functions do as little as possible apart from the
-real multiple precision computation, so that no time is spent on things
-that not all callers need.
-
- A source operand is specified by a pointer to the least significant
-limb and a limb count. A destination operand is specified by just a
-pointer. It is the responsibility of the caller to ensure that the
-destination has enough space for storing the result.
-
- With this way of specifying operands, it is possible to perform
-computations on subranges of an argument, and store the result into a
-subrange of a destination.
-
- A common requirement for all functions is that each source area
-needs at least one limb. No size argument may be zero.
-
- The `mpn' functions is the base for the implementation of the `mpz_',
-`mpf_', and `mpq_' functions.
-
- This example adds the number beginning at SRC1_PTR and the number
-beginning at SRC2_PTR and writes the sum at DEST_PTR. All areas have
-SIZE limbs.
-
- cy = mpn_add_n (dest_ptr, src1_ptr, src2_ptr, size)
-
-In the notation used here, a source operand is identified by the
-pointer to the least significant limb, and the limb count in braces.
-For example, {s1_ptr, s1_size}.
-
- - Function: mp_limb_t mpn_add_n (mp_limb_t * DEST_PTR, const mp_limb_t
- * SRC1_PTR, const mp_limb_t * SRC2_PTR, mp_size_t SIZE)
- Add {SRC1_PTR, SIZE} and {SRC2_PTR, SIZE}, and write the SIZE
- least significant limbs of the result to DEST_PTR. Return carry,
- either 0 or 1.
-
- This is the lowest-level function for addition. It is the
- preferred function for addition, since it is written in assembly
- for most targets. For addition of a variable to itself (i.e.,
- SRC1_PTR equals SRC2_PTR, use `mpn_lshift' with a count of 1 for
- optimal speed.
-
- - Function: mp_limb_t mpn_add_1 (mp_limb_t * DEST_PTR, const mp_limb_t
- * SRC1_PTR, mp_size_t SIZE, mp_limb_t SRC2_LIMB)
- Add {SRC1_PTR, SIZE} and SRC2_LIMB, and write the SIZE least
- significant limbs of the result to DEST_PTR. Return carry, either
- 0 or 1.
-
- - Function: mp_limb_t mpn_add (mp_limb_t * DEST_PTR, const mp_limb_t *
- SRC1_PTR, mp_size_t SRC1_SIZE, const mp_limb_t * SRC2_PTR,
- mp_size_t SRC2_SIZE)
- Add {SRC1_PTR, SRC1_SIZE} and {SRC2_PTR, SRC2_SIZE}, and write the
- SRC1_SIZE least significant limbs of the result to DEST_PTR.
- Return carry, either 0 or 1.
-
- This function requires that SRC1_SIZE is greater than or equal to
- SRC2_SIZE.
-
- - Function: mp_limb_t mpn_sub_n (mp_limb_t * DEST_PTR, const mp_limb_t
- * SRC1_PTR, const mp_limb_t * SRC2_PTR, mp_size_t SIZE)
- Subtract {SRC2_PTR, SRC2_SIZE} from {SRC1_PTR, SIZE}, and write
- the SIZE least significant limbs of the result to DEST_PTR.
- Return borrow, either 0 or 1.
-
- This is the lowest-level function for subtraction. It is the
- preferred function for subtraction, since it is written in
- assembly for most targets.
-
- - Function: mp_limb_t mpn_sub_1 (mp_limb_t * DEST_PTR, const mp_limb_t
- * SRC1_PTR, mp_size_t SIZE, mp_limb_t SRC2_LIMB)
- Subtract SRC2_LIMB from {SRC1_PTR, SIZE}, and write the SIZE least
- significant limbs of the result to DEST_PTR. Return borrow,
- either 0 or 1.
-
- - Function: mp_limb_t mpn_sub (mp_limb_t * DEST_PTR, const mp_limb_t *
- SRC1_PTR, mp_size_t SRC1_SIZE, const mp_limb_t * SRC2_PTR,
- mp_size_t SRC2_SIZE)
- Subtract {SRC2_PTR, SRC2_SIZE} from {SRC1_PTR, SRC1_SIZE}, and
- write the SRC1_SIZE least significant limbs of the result to
- DEST_PTR. Return borrow, either 0 or 1.
-
- This function requires that SRC1_SIZE is greater than or equal to
- SRC2_SIZE.
-
- - Function: void mpn_mul_n (mp_limb_t * DEST_PTR, const mp_limb_t *
- SRC1_PTR, const mp_limb_t * SRC2_PTR, mp_size_t SIZE)
- Multiply {SRC1_PTR, SIZE} and {SRC2_PTR, SIZE}, and write the
- *entire* result to DEST_PTR.
-
- The destination has to have space for 2SIZE limbs, even if the
- significant result might be one limb smaller.
-
- - Function: mp_limb_t mpn_mul_1 (mp_limb_t * DEST_PTR, const mp_limb_t
- * SRC1_PTR, mp_size_t SIZE, mp_limb_t SRC2_LIMB)
- Multiply {SRC1_PTR, SIZE} and SRC2_LIMB, and write the SIZE least
- significant limbs of the product to DEST_PTR. Return the most
- significant limb of the product.
-
- This is a low-level function that is a building block for general
- multiplication as well as other operations in MP. It is written
- in assembly for most targets.
-
- Don't call this function if SRC2_LIMB is a power of 2; use
- `mpn_lshift' with a count equal to the logarithm of SRC2_LIMB
- instead, for optimal speed.
-
- - Function: mp_limb_t mpn_addmul_1 (mp_limb_t * DEST_PTR, const
- mp_limb_t * SRC1_PTR, mp_size_t SIZE, mp_limb_t SRC2_LIMB)
- Multiply {SRC1_PTR, SIZE} and SRC2_LIMB, and add the SIZE least
- significant limbs of the product to {DEST_PTR, SIZE} and write the
- result to DEST_PTR DEST_PTR. Return the most significant limb of
- the product, plus carry-out from the addition.
-
- This is a low-level function that is a building block for general
- multiplication as well as other operations in MP. It is written
- in assembly for most targets.
-
- - Function: mp_limb_t mpn_submul_1 (mp_limb_t * DEST_PTR, const
- mp_limb_t * SRC1_PTR, mp_size_t SIZE, mp_limb_t SRC2_LIMB)
- Multiply {SRC1_PTR, SIZE} and SRC2_LIMB, and subtract the SIZE
- least significant limbs of the product from {DEST_PTR, SIZE} and
- write the result to DEST_PTR. Return the most significant limb of
- the product, minus borrow-out from the subtraction.
-
- This is a low-level function that is a building block for general
- multiplication and division as well as other operations in MP. It
- is written in assembly for most targets.
-
- - Function: mp_limb_t mpn_mul (mp_limb_t * DEST_PTR, const mp_limb_t *
- SRC1_PTR, mp_size_t SRC1_SIZE, const mp_limb_t * SRC2_PTR,
- mp_size_t SRC2_SIZE)
- Multiply {SRC1_PTR, SRC1_SIZE} and {SRC2_PTR, SRC2_SIZE}, and
- write the result to DEST_PTR. Return the most significant limb of
- the result.
-
- The destination has to have space for SRC1_SIZE + SRC1_SIZE limbs,
- even if the result might be one limb smaller.
-
- This function requires that SRC1_SIZE is greater than or equal to
- SRC2_SIZE. The destination must be distinct from either input
- operands.
-
- - Function: mp_size_t mpn_divrem (mp_limb_t * R1P, mp_size_t XSIZE,
- mp_limb_t * RS2P, mp_size_t RS2SIZE, const mp_limb_t * S3P,
- mp_size_t S3SIZE)
- Divide {RS2P, RS2SIZE} by {S3P, S3SIZE}, and write the quotient at
- R1P, with the exception of the most significant limb, which is
- returned. The remainder replaces the dividend at RS2P.
-
- In addition to an integer quotient, XSIZE fraction limbs are
- developed, and stored after the integral limbs. For most usages,
- XSIZE will be zero.
-
- It is required that RS2SIZE is greater than or equal to S3SIZE.
- It is required that the most significant bit of the divisor is set.
-
- If the quotient is not needed, pass RS2P + S3SIZE as R1P. Aside
- from that special case, no overlap between arguments is permitted.
-
- Return the most significant limb of the quotient, either 0 or 1.
-
- The area at R1P needs to be RS2SIZE - S3SIZE + XSIZE limbs large.
-
- - Function: mp_limb_t mpn_divrem_1 (mp_limb_t * R1P, mp_size_t XSIZE,
- mp_limb_t * S2P, mp_size_t S2SIZE, mp_limb_t S3LIMB)
- Divide {S2P, S2SIZE} by S3LIMB, and write the quotient at R1P.
- Return the remainder.
-
- In addition to an integer quotient, XSIZE fraction limbs are
- developed, and stored after the integral limbs. For most usages,
- XSIZE will be zero.
-
- The areas at R1P and S2P have to be identical or completely
- separate, not partially overlapping.
-
- - Function: mp_size_t mpn_divmod (mp_limb_t * R1P, mp_limb_t * RS2P,
- mp_size_t RS2SIZE, const mp_limb_t * S3P, mp_size_t S3SIZE)
- *This interface is obsolete. It will disappear from future
- releases. Use `mpn_divrem' in its stead.*
-
- - Function: mp_limb_t mpn_divmod_1 (mp_limb_t * R1P, mp_limb_t * S2P,
- mp_size_t S2SIZE, mp_limb_t S3LIMB)
- *This interface is obsolete. It will disappear from future
- releases. Use `mpn_divrem_1' in its stead.*
-
- - Function: mp_limb_t mpn_mod_1 (mp_limb_t * S1P, mp_size_t S1SIZE,
- mp_limb_t S2LIMB)
- Divide {S1P, S1SIZE} by S2LIMB, and return the remainder.
-
- - Function: mp_limb_t mpn_preinv_mod_1 (mp_limb_t * S1P, mp_size_t
- S1SIZE, mp_limb_t S2LIMB, mp_limb_t S3LIMB)
- *This interface is obsolete. It will disappear from future
- releases. Use `mpn_mod_1' in its stead.*
-
- - Function: mp_limb_t mpn_bdivmod (mp_limb_t * DEST_PTR, mp_limb_t *
- S1P, mp_size_t S1SIZE, const mp_limb_t * S2P, mp_size_t
- S2SIZE, unsigned long int D)
- The function puts the low [D/BITS_PER_MP_LIMB] limbs of Q = {S1P,
- S1SIZE}/{S2P, S2SIZE} mod 2^D at DEST_PTR, and returns the high D
- mod BITS_PER_MP_LIMB bits of Q.
-
- {S1P, S1SIZE} - Q * {S2P, S2SIZE} mod 2^(S1SIZE*BITS_PER_MP_LIMB)
- is placed at S1P. Since the low [D/BITS_PER_MP_LIMB] limbs of
- this difference are zero, it is possible to overwrite the low
- limbs at S1P with this difference, provided DEST_PTR <= S1P.
-
- This function requires that S1SIZE * BITS_PER_MP_LIMB >= D, and
- that {S2P, S2SIZE} is odd.
-
- *This interface is preliminary. It might change incompatibly in
- future revisions.*
-
- - Function: mp_limb_t mpn_lshift (mp_limb_t * DEST_PTR, const
- mp_limb_t * SRC_PTR, mp_size_t SRC_SIZE, unsigned long int
- COUNT)
- Shift {SRC_PTR, SRC_SIZE} COUNT bits to the left, and write the
- SRC_SIZE least significant limbs of the result to DEST_PTR. COUNT
- might be in the range 1 to n - 1, on an n-bit machine. The bits
- shifted out to the left are returned.
-
- Overlapping of the destination space and the source space is
- allowed in this function, provided DEST_PTR >= SRC_PTR.
-
- This function is written in assembly for most targets.
-
- - Function: mp_limp_t mpn_rshift (mp_limb_t * DEST_PTR, const
- mp_limb_t * SRC_PTR, mp_size_t SRC_SIZE, unsigned long int
- COUNT)
- Shift {SRC_PTR, SRC_SIZE} COUNT bits to the right, and write the
- SRC_SIZE most significant limbs of the result to DEST_PTR. COUNT
- might be in the range 1 to n - 1, on an n-bit machine. The bits
- shifted out to the right are returned.
-
- Overlapping of the destination space and the source space is
- allowed in this function, provided DEST_PTR <= SRC_PTR.
-
- This function is written in assembly for most targets.
-
- - Function: int mpn_cmp (const mp_limb_t * SRC1_PTR, const mp_limb_t *
- SRC2_PTR, mp_size_t SIZE)
- Compare {SRC1_PTR, SIZE} and {SRC2_PTR, SIZE} and return a
- positive value if src1 > src2, 0 of they are equal, and a negative
- value if src1 < src2.
-
- - Function: mp_size_t mpn_gcd (mp_limb_t * DEST_PTR, mp_limb_t *
- SRC1_PTR, mp_size_t SRC1_SIZE, mp_limb_t * SRC2_PTR,
- mp_size_t SRC2_SIZE)
- Puts at DEST_PTR the greatest common divisor of {SRC1_PTR,
- SRC1_SIZE} and {SRC2_PTR, SRC2_SIZE}; both source operands are
- destroyed by the operation. The size in limbs of the greatest
- common divisor is returned.
-
- {SRC1_PTR, SRC1_SIZE} must be odd, and {SRC2_PTR, SRC2_SIZE} must
- have at least as many bits as {SRC1_PTR, SRC1_SIZE}.
-
- *This interface is preliminary. It might change incompatibly in
- future revisions.*
-
- - Function: mp_limb_t mpn_gcd_1 (const mp_limb_t * SRC1_PTR, mp_size_t
- SRC1_SIZE, mp_limb_t SRC2_LIMB)
- Return the greatest common divisor of {SRC1_PTR, SRC1_SIZE} and
- SRC2_LIMB, where SRC2_LIMB (as well as SRC1_SIZE) must be
- different from 0.
-
- - Function: mp_size_t mpn_gcdext (mp_limb_t * R1P, mp_limb_t * R2P,
- mp_limb_t * S1P, mp_size_t S1SIZE, mp_limb_t * S2P, mp_size_t
- S2SIZE)
- Puts at R1P the greatest common divisor of {S1P, S1SIZE} and {S2P,
- S2SIZE}. The first cofactor is written at R2P. Both source
- operands are destroyed by the operation. The size in limbs of the
- greatest common divisor is returned.
-
- *This interface is preliminary. It might change incompatibly in
- future revisions.*
-
- - Function: mp_size_t mpn_sqrtrem (mp_limb_t * R1P, mp_limb_t * R2P,
- const mp_limb_t * SP, mp_size_t SIZE)
- Compute the square root of {SP, SIZE} and put the result at R1P.
- Write the remainder at R2P, unless R2P is NULL.
-
- Return the size of the remainder, whether R2P was NULL or non-NULL.
- Iff the operand was a perfect square, the return value will be 0.
-
- The areas at R1P and SP have to be distinct. The areas at R2P and
- SP have to be identical or completely separate, not partially
- overlapping.
-
- The area at R1P needs to have space for ceil(SIZE/2) limbs. The
- area at R2P needs to be SIZE limbs large.
-
- *This interface is preliminary. It might change incompatibly in
- future revisions.*
-
- - Function: mp_size_t mpn_get_str (unsigned char *STR, int BASE,
- mp_limb_t * S1P, mp_size_t S1SIZE)
- Convert {S1P, S1SIZE} to a raw unsigned char array in base BASE.
- The string is not in ASCII; to convert it to printable format, add
- the ASCII codes for `0' or `A', depending on the base and range.
- There may be leading zeros in the string.
-
- The area at S1P is clobbered.
-
- Return the number of characters in STR.
-
- The area at STR has to have space for the largest possible number
- represented by a S1SIZE long limb array, plus one extra character.
-
- - Function: mp_size_t mpn_set_str (mp_limb_t * R1P, const char *STR,
- size_t strsize, int BASE)
- Convert the raw unsigned char array at STR of length STRSIZE to a
- limb array {S1P, S1SIZE}. The base of STR is BASE.
-
- Return the number of limbs stored in R1P.
-
- - Function: unsigned long int mpn_scan0 (const mp_limb_t * S1P,
- unsigned long int BIT)
- Scan S1P from bit position BIT for the next clear bit.
-
- It is required that there be a clear bit within the area at S1P at
- or beyond bit position BIT, so that the function has something to
- return.
-
- *This interface is preliminary. It might change incompatibly in
- future revisions.*
-
- - Function: unsigned long int mpn_scan1 (const mp_limb_t * S1P,
- unsigned long int BIT)
- Scan S1P from bit position BIT for the next set bit.
-
- It is required that there be a set bit within the area at S1P at or
- beyond bit position BIT, so that the function has something to
- return.
-
- *This interface is preliminary. It might change incompatibly in
- future revisions.*
-
- - Function: void mpn_random2 (mp_limb_t * R1P, mp_size_t R1SIZE)
- Generate a random number of length R1SIZE with long strings of
- zeros and ones in the binary representation, and store it at R1P.
-
- The generated random numbers are intended for testing the
- correctness of the implementation of the `mpn' routines.
-
- - Function: unsigned long int mpn_popcount (const mp_limb_t * S1P,
- unsigned long int SIZE)
- Count the number of set bits in {S1P, SIZE}.
-
- - Function: unsigned long int mpn_hamdist (const mp_limb_t * S1P,
- const mp_limb_t * S2P, unsigned long int SIZE)
- Compute the hamming distance between {S1P, SIZE} and {S2P, SIZE}.
-
- - Function: int mpn_perfect_square_p (const mp_limb_t * S1P, mp_size_t
- SIZE)
- Return non-zero iff {S1P, SIZE} is a perfect square.
-
-
-File: gmp.info, Node: BSD Compatible Functions, Next: Custom Allocation, Prev: Low-level Functions, Up: Top
-
-Berkeley MP Compatible Functions
-********************************
-
- These functions are intended to be fully compatible with the
-Berkeley MP library which is available on many BSD derived U*ix systems.
-
- The original Berkeley MP library has a usage restriction: you cannot
-use the same variable as both source and destination in a single
-function call. The compatible functions in GNU MP do not share this
-restriction--inputs and outputs may overlap.
-
- It is not recommended that new programs are written using these
-functions. Apart from the incomplete set of functions, the interface
-for initializing `MINT' objects is more error prone, and the `pow'
-function collides with `pow' in `libm.a'.
-
- Include the header `mp.h' to get the definition of the necessary
-types and functions. If you are on a BSD derived system, make sure to
-include GNU `mp.h' if you are going to link the GNU `libmp.a' to you
-program. This means that you probably need to give the -I<dir> option
-to the compiler, where <dir> is the directory where you have GNU `mp.h'.
-
- - Function: MINT * itom (signed short int INITIAL_VALUE)
- Allocate an integer consisting of a `MINT' object and dynamic limb
- space. Initialize the integer to INITIAL_VALUE. Return a pointer
- to the `MINT' object.
-
- - Function: MINT * xtom (char *INITIAL_VALUE)
- Allocate an integer consisting of a `MINT' object and dynamic limb
- space. Initialize the integer from INITIAL_VALUE, a hexadecimal,
- '\0'-terminate C string. Return a pointer to the `MINT' object.
-
- - Function: void move (MINT *SRC, MINT *DEST)
- Set DEST to SRC by copying. Both variables must be previously
- initialized.
-
- - Function: void madd (MINT *SRC_1, MINT *SRC_2, MINT *DESTINATION)
- Add SRC_1 and SRC_2 and put the sum in DESTINATION.
-
- - Function: void msub (MINT *SRC_1, MINT *SRC_2, MINT *DESTINATION)
- Subtract SRC_2 from SRC_1 and put the difference in DESTINATION.
-
- - Function: void mult (MINT *SRC_1, MINT *SRC_2, MINT *DESTINATION)
- Multiply SRC_1 and SRC_2 and put the product in DESTINATION.
-
- - Function: void mdiv (MINT *DIVIDEND, MINT *DIVISOR, MINT *QUOTIENT,
- MINT *REMAINDER)
- - Function: void sdiv (MINT *DIVIDEND, signed short int DIVISOR, MINT
- *QUOTIENT, signed short int *REMAINDER)
- Set QUOTIENT to DIVIDEND/DIVISOR, and REMAINDER to DIVIDEND mod
- DIVISOR. The quotient is rounded towards zero; the remainder has
- the same sign as the dividend unless it is zero.
-
- Some implementations of these functions work differently--or not
- at all--for negative arguments.
-
- - Function: void msqrt (MINT *OPERAND, MINT *ROOT, MINT *REMAINDER)
- Set ROOT to the truncated integer part of the square root of
- OPERAND. Set REMAINDER to OPERAND-ROOT*ROOT, (i.e., zero if
- OPERAND is a perfect square).
-
- If ROOT and REMAINDER are the same variable, the results are
- undefined.
-
- - Function: void pow (MINT *BASE, MINT *EXP, MINT *MOD, MINT *DEST)
- Set DEST to (BASE raised to EXP) modulo MOD.
-
- - Function: void rpow (MINT *BASE, signed short int EXP, MINT *DEST)
- Set DEST to BASE raised to EXP.
-
- - Function: void gcd (MINT *OPERAND1, MINT *OPERAND2, MINT *RES)
- Set RES to the greatest common divisor of OPERAND1 and OPERAND2.
-
- - Function: int mcmp (MINT *OPERAND1, MINT *OPERAND2)
- Compare OPERAND1 and OPERAND2. Return a positive value if
- OPERAND1 > OPERAND2, zero if OPERAND1 = OPERAND2, and a negative
- value if OPERAND1 < OPERAND2.
-
- - Function: void min (MINT *DEST)
- Input a decimal string from `stdin', and put the read integer in
- DEST. SPC and TAB are allowed in the number string, and are
- ignored.
-
- - Function: void mout (MINT *SRC)
- Output SRC to `stdout', as a decimal string. Also output a
- newline.
-
- - Function: char * mtox (MINT *OPERAND)
- Convert OPERAND to a hexadecimal string, and return a pointer to
- the string. The returned string is allocated using the default
- memory allocation function, `malloc' by default.
-
- - Function: void mfree (MINT *OPERAND)
- De-allocate, the space used by OPERAND. *This function should
- only be passed a value returned by `itom' or `xtom'.*
-
-
-File: gmp.info, Node: Custom Allocation, Next: Contributors, Prev: BSD Compatible Functions, Up: Top
-
-Custom Allocation
-*****************
-
- By default, the MP functions use `malloc', `realloc', and `free' for
-memory allocation. If `malloc' or `realloc' fails, the MP library
-terminates execution after printing a fatal error message to standard
-error.
-
- For some applications, you may wish to allocate memory in other
-ways, or you may not want to have a fatal error when there is no more
-memory available. To accomplish this, you can specify alternative
-memory allocation functions.
-
- - Function: void mp_set_memory_functions (
- void *(*ALLOC_FUNC_PTR) (size_t),
- void *(*REALLOC_FUNC_PTR) (void *, size_t, size_t),
- void (*FREE_FUNC_PTR) (void *, size_t))
- Replace the current allocation functions from the arguments. If
- an argument is NULL, the corresponding default function is
- retained.
-
- *Make sure to call this function in such a way that there are no
- active MP objects that were allocated using the previously active
- allocation function! Usually, that means that you have to call
- this function before any other MP function.*
-
- The functions you supply should fit the following declarations:
-
- - Function: void * allocate_function (size_t ALLOC_SIZE)
- This function should return a pointer to newly allocated space
- with at least ALLOC_SIZE storage units.
-
- - Function: void * reallocate_function (void *PTR, size_t OLD_SIZE,
- size_t NEW_SIZE)
- This function should return a pointer to newly allocated space of
- at least NEW_SIZE storage units, after copying at least the first
- OLD_SIZE storage units from PTR. It should also de-allocate the
- space at PTR.
-
- You can assume that the space at PTR was formerly returned from
- `allocate_function' or `reallocate_function', for a request for
- OLD_SIZE storage units.
-
- - Function: void deallocate_function (void *PTR, size_t SIZE)
- De-allocate the space pointed to by PTR.
-
- You can assume that the space at PTR was formerly returned from
- `allocate_function' or `reallocate_function', for a request for
- SIZE storage units.
-
- (A "storage unit" is the unit in which the `sizeof' operator returns
-the size of an object, normally an 8 bit byte.)
-
-
-File: gmp.info, Node: Contributors, Next: References, Prev: Custom Allocation, Up: Top
-
-Contributors
-************
-
- I would like to thank Gunnar Sjoedin and Hans Riesel for their help
-with mathematical problems, Richard Stallman for his help with design
-issues and for revising the first version of this manual, Brian Beuning
-and Doug Lea for their testing of early versions of the library.
-
- John Amanatides of York University in Canada contributed the function
-`mpz_probab_prime_p'.
-
- Paul Zimmermann of Inria sparked the development of GMP 2, with his
-comparisons between bignum packages.
-
- Ken Weber (Kent State University, Universidade Federal do Rio Grande
-do Sul) contributed `mpz_gcd', `mpz_divexact', `mpn_gcd', and
-`mpn_bdivmod', partially supported by CNPq (Brazil) grant 301314194-2.
-
- Per Bothner of Cygnus Support helped to set up MP to use Cygnus'
-configure. He has also made valuable suggestions and tested numerous
-intermediary releases.
-
- Joachim Hollman was involved in the design of the `mpf' interface,
-and in the `mpz' design revisions for version 2.
-
- Bennet Yee contributed the functions `mpz_jacobi' and `mpz_legendre'.
-
- Andreas Schwab contributed the files `mpn/m68k/lshift.S' and
-`mpn/m68k/rshift.S'.
-
- The development of floating point functions of GNU MP 2, were
-supported in part by the ESPRIT-BRA (Basic Research Activities) 6846
-project POSSO (POlynomial System SOlving).
-
- GNU MP 2 was finished and released by TMG Datakonsult,
-Sodermannagatan 5, 116 23 STOCKHOLM, SWEDEN, in cooperation with the
-IDA Center for Computing Sciences, USA.
-
-
-File: gmp.info, Node: References, Prev: Contributors, Up: Top
-
-References
-**********
-
- * Donald E. Knuth, "The Art of Computer Programming", vol 2,
- "Seminumerical Algorithms", 2nd edition, Addison-Wesley, 1981.
-
- * John D. Lipson, "Elements of Algebra and Algebraic Computing", The
- Benjamin Cummings Publishing Company Inc, 1981.
-
- * Richard M. Stallman, "Using and Porting GCC", Free Software
- Foundation, 1995.
-
- * Peter L. Montgomery, "Modular Multiplication Without Trial
- Division", in Mathematics of Computation, volume 44, number 170,
- April 1985.
-
- * Torbjorn Granlund and Peter L. Montgomery, "Division by Invariant
- Integers using Multiplication", in Proceedings of the SIGPLAN
- PLDI'94 Conference, June 1994.
-
- * Tudor Jebelean, "An algorithm for exact division", Journal of
- Symbolic Computation, v. 15, 1993, pp. 169-180.
-
- * Kenneth Weber, "The accelerated integer GCD algorithm", ACM
- Transactions on Mathematical Software, v. 21 (March), 1995, pp.
- 111-122.
-
-
-File: gmp.info, Node: Concept Index, Up: Top
-
-Concept Index
-*************
-
-* Menu:
-
-* gmp.h: MP Basics.
-* mp.h: BSD Compatible Functions.
-* Arithmetic functions <1>: Float Arithmetic.
-* Arithmetic functions: Integer Arithmetic.
-* Bit manipulation functions: Integer Logic and Bit Fiddling.
-* BSD MP compatible functions: BSD Compatible Functions.
-* Comparison functions: Float Comparison.
-* Conditions for copying GNU MP: Copying.
-* Conversion functions <1>: Converting Integers.
-* Conversion functions: Converting Floats.
-* Copying conditions: Copying.
-* Float arithmetic functions: Float Arithmetic.
-* Float assignment functions: Assigning Floats.
-* Float comparisons functions: Float Comparison.
-* Float functions: Floating-point Functions.
-* Float input and output functions: I/O of Floats.
-* Floating-point functions: Floating-point Functions.
-* Floating-point number: MP Basics.
-* I/O functions <1>: I/O of Floats.
-* I/O functions: I/O of Integers.
-* Initialization and assignment functions <1>: Simultaneous Float Init & Assign.
-* Initialization and assignment functions: Simultaneous Integer Init & Assign.
-* Input functions <1>: I/O of Integers.
-* Input functions: I/O of Floats.
-* Installation: Installing MP.
-* Integer: MP Basics.
-* Integer arithmetic functions: Integer Arithmetic.
-* Integer assignment functions: Assigning Integers.
-* Integer conversion functions: Converting Integers.
-* Integer functions: Integer Functions.
-* Integer input and output functions: I/O of Integers.
-* Limb: MP Basics.
-* Logical functions: Integer Logic and Bit Fiddling.
-* Low-level functions: Low-level Functions.
-* Miscellaneous float functions: Miscellaneous Float Functions.
-* Miscellaneous integer functions: Miscellaneous Integer Functions.
-* Output functions <1>: I/O of Floats.
-* Output functions: I/O of Integers.
-* Rational number: MP Basics.
-* Rational number functions: Rational Number Functions.
-* Reporting bugs: Reporting Bugs.
-* User-defined precision: Floating-point Functions.
-
diff -rup --new-file baseline/fsf/gmp/gmp.info-3 amiga/fsf/gmp/gmp.info-3
--- baseline/fsf/gmp/gmp.info-3 Thu Jun 6 12:30:58 1996
+++ amiga/fsf/gmp/gmp.info-3 Wed Dec 31 17:00:00 1969
@@ -1,259 +0,0 @@
-This is Info file gmp.info, produced by Makeinfo-1.64 from the input
-file gmp.texi.
-
-START-INFO-DIR-ENTRY
-* gmp: (gmp.info). GNU Multiple Precision Arithmetic Library.
-END-INFO-DIR-ENTRY
-
- This file documents GNU MP, a library for arbitrary-precision
-arithmetic.
-
- Copyright (C) 1991, 1993, 1994, 1995, 1996 Free Software Foundation,
-Inc.
-
- Permission is granted to make and distribute verbatim copies of this
-manual provided the copyright notice and this permission notice are
-preserved on all copies.
-
- Permission is granted to copy and distribute modified versions of
-this manual under the conditions for verbatim copying, provided that
-the entire resulting derived work is distributed under the terms of a
-permission notice identical to this one.
-
- Permission is granted to copy and distribute translations of this
-manual into another language, under the above conditions for modified
-versions, except that this permission notice may be stated in a
-translation approved by the Foundation.
-
-
-File: gmp.info, Node: Function Index, Up: Top
-
-Function and Type Index
-***********************
-
-* Menu:
-
-* mp_limb_t: MP Basics.
-* mpf_t: MP Basics.
-* mpq_t: MP Basics.
-* mpz_t: MP Basics.
-* __GNU_MP_VERSION: MP Basics.
-* __GNU_MP_VERSION_MINOR: MP Basics.
-* _mpz_realloc: Initializing Integers.
-* allocate_function: Custom Allocation.
-* deallocate_function: Custom Allocation.
-* gcd: BSD Compatible Functions.
-* itom: BSD Compatible Functions.
-* madd: BSD Compatible Functions.
-* mcmp: BSD Compatible Functions.
-* mdiv: BSD Compatible Functions.
-* mfree: BSD Compatible Functions.
-* min: BSD Compatible Functions.
-* mout: BSD Compatible Functions.
-* move: BSD Compatible Functions.
-* mp_set_memory_functions: Custom Allocation.
-* mpf_abs: Float Arithmetic.
-* mpf_add: Float Arithmetic.
-* mpf_add_ui: Float Arithmetic.
-* mpf_clear: Initializing Floats.
-* mpf_cmp: Float Comparison.
-* mpf_cmp_si: Float Comparison.
-* mpf_cmp_ui: Float Comparison.
-* mpf_div: Float Arithmetic.
-* mpf_div_2exp: Float Arithmetic.
-* mpf_div_ui: Float Arithmetic.
-* mpf_eq: Float Comparison.
-* mpf_get_d: Converting Floats.
-* mpf_get_prec: Initializing Floats.
-* mpf_get_str: Converting Floats.
-* mpf_init: Initializing Floats.
-* mpf_init2: Initializing Floats.
-* mpf_init_set: Simultaneous Float Init & Assign.
-* mpf_init_set_d: Simultaneous Float Init & Assign.
-* mpf_init_set_si: Simultaneous Float Init & Assign.
-* mpf_init_set_str: Simultaneous Float Init & Assign.
-* mpf_init_set_ui: Simultaneous Float Init & Assign.
-* mpf_inp_str: I/O of Floats.
-* mpf_mul: Float Arithmetic.
-* mpf_mul_2exp: Float Arithmetic.
-* mpf_mul_ui: Float Arithmetic.
-* mpf_neg: Float Arithmetic.
-* mpf_out_str: I/O of Floats.
-* mpf_random2: Miscellaneous Float Functions.
-* mpf_reldiff: Float Comparison.
-* mpf_set: Assigning Floats.
-* mpf_set_d: Assigning Floats.
-* mpf_set_default_prec: Initializing Floats.
-* mpf_set_prec: Initializing Floats.
-* mpf_set_prec_raw: Initializing Floats.
-* mpf_set_q: Assigning Floats.
-* mpf_set_si: Assigning Floats.
-* mpf_set_str: Assigning Floats.
-* mpf_set_ui: Assigning Floats.
-* mpf_set_z: Assigning Floats.
-* mpf_sgn: Float Comparison.
-* mpf_sqrt: Float Arithmetic.
-* mpf_sqrt_ui: Float Arithmetic.
-* mpf_sub: Float Arithmetic.
-* mpf_sub_ui: Float Arithmetic.
-* mpf_ui_div: Float Arithmetic.
-* mpf_ui_sub: Float Arithmetic.
-* mpn_add: Low-level Functions.
-* mpn_add_1: Low-level Functions.
-* mpn_add_n: Low-level Functions.
-* mpn_addmul_1: Low-level Functions.
-* mpn_bdivmod: Low-level Functions.
-* mpn_cmp: Low-level Functions.
-* mpn_divmod: Low-level Functions.
-* mpn_divmod_1: Low-level Functions.
-* mpn_divrem: Low-level Functions.
-* mpn_divrem_1: Low-level Functions.
-* mpn_gcd: Low-level Functions.
-* mpn_gcd_1: Low-level Functions.
-* mpn_gcdext: Low-level Functions.
-* mpn_get_str: Low-level Functions.
-* mpn_hamdist: Low-level Functions.
-* mpn_lshift: Low-level Functions.
-* mpn_mod_1: Low-level Functions.
-* mpn_mul: Low-level Functions.
-* mpn_mul_1: Low-level Functions.
-* mpn_mul_n: Low-level Functions.
-* mpn_perfect_square_p: Low-level Functions.
-* mpn_popcount: Low-level Functions.
-* mpn_preinv_mod_1: Low-level Functions.
-* mpn_random2: Low-level Functions.
-* mpn_rshift: Low-level Functions.
-* mpn_scan0: Low-level Functions.
-* mpn_scan1: Low-level Functions.
-* mpn_set_str: Low-level Functions.
-* mpn_sqrtrem: Low-level Functions.
-* mpn_sub: Low-level Functions.
-* mpn_sub_1: Low-level Functions.
-* mpn_sub_n: Low-level Functions.
-* mpn_submul_1: Low-level Functions.
-* mpq_add: Assigning Rationals.
-* mpq_canonicalize: Rational Number Functions.
-* mpq_clear: Initializing Rationals.
-* mpq_cmp: Comparing Rationals.
-* mpq_cmp_ui: Comparing Rationals.
-* mpq_denref: Applying Integer Functions.
-* mpq_div: Assigning Rationals.
-* mpq_equal: Comparing Rationals.
-* mpq_get_d: Miscellaneous Rational Functions.
-* mpq_get_den: Miscellaneous Rational Functions.
-* mpq_get_num: Miscellaneous Rational Functions.
-* mpq_init: Initializing Rationals.
-* mpq_inv: Assigning Rationals.
-* mpq_mul: Assigning Rationals.
-* mpq_neg: Assigning Rationals.
-* mpq_numref: Applying Integer Functions.
-* mpq_set: Initializing Rationals.
-* mpq_set_den: Miscellaneous Rational Functions.
-* mpq_set_num: Miscellaneous Rational Functions.
-* mpq_set_si: Initializing Rationals.
-* mpq_set_ui: Initializing Rationals.
-* mpq_set_z: Initializing Rationals.
-* mpq_sgn: Comparing Rationals.
-* mpq_sub: Assigning Rationals.
-* mpz_abs: Integer Arithmetic.
-* mpz_add: Integer Arithmetic.
-* mpz_add_ui: Integer Arithmetic.
-* mpz_and: Integer Logic and Bit Fiddling.
-* mpz_array_init: Initializing Integers.
-* mpz_cdiv_q: Integer Arithmetic.
-* mpz_cdiv_q_ui: Integer Arithmetic.
-* mpz_cdiv_qr: Integer Arithmetic.
-* mpz_cdiv_qr_ui: Integer Arithmetic.
-* mpz_cdiv_r: Integer Arithmetic.
-* mpz_cdiv_r_ui: Integer Arithmetic.
-* mpz_cdiv_ui: Integer Arithmetic.
-* mpz_clear: Initializing Integers.
-* mpz_clrbit: Integer Logic and Bit Fiddling.
-* mpz_cmp: Comparison Functions.
-* mpz_cmp_si: Comparison Functions.
-* mpz_cmp_ui: Comparison Functions.
-* mpz_com: Integer Logic and Bit Fiddling.
-* mpz_divexact: Integer Arithmetic.
-* mpz_fac_ui: Integer Arithmetic.
-* mpz_fdiv_q: Integer Arithmetic.
-* mpz_fdiv_q_2exp: Integer Arithmetic.
-* mpz_fdiv_q_ui: Integer Arithmetic.
-* mpz_fdiv_qr: Integer Arithmetic.
-* mpz_fdiv_qr_ui: Integer Arithmetic.
-* mpz_fdiv_r: Integer Arithmetic.
-* mpz_fdiv_r_2exp: Integer Arithmetic.
-* mpz_fdiv_r_ui: Integer Arithmetic.
-* mpz_fdiv_ui: Integer Arithmetic.
-* mpz_gcd: Integer Arithmetic.
-* mpz_gcd_ui: Integer Arithmetic.
-* mpz_gcdext: Integer Arithmetic.
-* mpz_get_d: Converting Integers.
-* mpz_get_si: Converting Integers.
-* mpz_get_str: Converting Integers.
-* mpz_get_ui: Converting Integers.
-* mpz_hamdist: Integer Logic and Bit Fiddling.
-* mpz_init: Initializing Integers.
-* mpz_init_set: Simultaneous Integer Init & Assign.
-* mpz_init_set_d: Simultaneous Integer Init & Assign.
-* mpz_init_set_si: Simultaneous Integer Init & Assign.
-* mpz_init_set_str: Simultaneous Integer Init & Assign.
-* mpz_init_set_ui: Simultaneous Integer Init & Assign.
-* mpz_inp_raw: I/O of Integers.
-* mpz_inp_str: I/O of Integers.
-* mpz_invert: Integer Arithmetic.
-* mpz_ior: Integer Logic and Bit Fiddling.
-* mpz_jacobi: Integer Arithmetic.
-* mpz_legendre: Integer Arithmetic.
-* mpz_mod: Integer Arithmetic.
-* mpz_mod_ui: Integer Arithmetic.
-* mpz_mul: Integer Arithmetic.
-* mpz_mul_2exp: Integer Arithmetic.
-* mpz_mul_ui: Integer Arithmetic.
-* mpz_neg: Integer Arithmetic.
-* mpz_out_raw: I/O of Integers.
-* mpz_out_str: I/O of Integers.
-* mpz_perfect_square_p: Integer Arithmetic.
-* mpz_popcount: Integer Logic and Bit Fiddling.
-* mpz_pow_ui: Integer Arithmetic.
-* mpz_powm: Integer Arithmetic.
-* mpz_powm_ui: Integer Arithmetic.
-* mpz_probab_prime_p: Integer Arithmetic.
-* mpz_random: Miscellaneous Integer Functions.
-* mpz_random2: Miscellaneous Integer Functions.
-* mpz_scan0: Integer Logic and Bit Fiddling.
-* mpz_scan1: Integer Logic and Bit Fiddling.
-* mpz_set: Assigning Integers.
-* mpz_set_d: Assigning Integers.
-* mpz_set_f: Assigning Integers.
-* mpz_set_q: Assigning Integers.
-* mpz_set_si: Assigning Integers.
-* mpz_set_str: Assigning Integers.
-* mpz_set_ui: Assigning Integers.
-* mpz_setbit: Integer Logic and Bit Fiddling.
-* mpz_sgn: Comparison Functions.
-* mpz_size: Miscellaneous Integer Functions.
-* mpz_sizeinbase: Miscellaneous Integer Functions.
-* mpz_sqrt: Integer Arithmetic.
-* mpz_sqrtrem: Integer Arithmetic.
-* mpz_sub: Integer Arithmetic.
-* mpz_sub_ui: Integer Arithmetic.
-* mpz_tdiv_q: Integer Arithmetic.
-* mpz_tdiv_q_2exp: Integer Arithmetic.
-* mpz_tdiv_q_ui: Integer Arithmetic.
-* mpz_tdiv_qr: Integer Arithmetic.
-* mpz_tdiv_qr_ui: Integer Arithmetic.
-* mpz_tdiv_r: Integer Arithmetic.
-* mpz_tdiv_r_2exp: Integer Arithmetic.
-* mpz_tdiv_r_ui: Integer Arithmetic.
-* mpz_ui_pow_ui: Integer Arithmetic.
-* msqrt: BSD Compatible Functions.
-* msub: BSD Compatible Functions.
-* mtox: BSD Compatible Functions.
-* mult: BSD Compatible Functions.
-* pow: BSD Compatible Functions.
-* reallocate_function: Custom Allocation.
-* rpow: BSD Compatible Functions.
-* sdiv: BSD Compatible Functions.
-* xtom: BSD Compatible Functions.
-
-
diff -rup --new-file baseline/fsf/gmp/manifests/bin amiga/fsf/gmp/manifests/bin
--- baseline/fsf/gmp/manifests/bin Wed Dec 31 17:00:00 1969
+++ amiga/fsf/gmp/manifests/bin Sat Sep 28 00:00:00 1996
@@ -0,0 +1,10 @@
+COPYING
+COPYING.info
+dvi/gmp.dvi
+guide/gmp.guide
+include/gmp.h
+include/mp.h
+info/gmp.info
+lib/libgmp.a
+lib/libmp.a
+ps/gmp.ps
diff -rup --new-file baseline/fsf/gmp/manifests/src amiga/fsf/gmp/manifests/src
--- baseline/fsf/gmp/manifests/src Wed Dec 31 17:00:00 1969
+++ amiga/fsf/gmp/manifests/src Sat Sep 28 00:00:00 1996
@@ -0,0 +1,459 @@
+fsf/gmp/COPYING.LIB
+fsf/gmp/ChangeLog
+fsf/gmp/INSTALL
+fsf/gmp/Makefile.in
+fsf/gmp/NEWS
+fsf/gmp/PROJECTS
+fsf/gmp/Product-Info
+fsf/gmp/README
+fsf/gmp/SPEED
+fsf/gmp/config.guess
+fsf/gmp/config.sub
+fsf/gmp/config/mt-linux
+fsf/gmp/config/mt-m88110
+fsf/gmp/config/mt-sprc8-gcc
+fsf/gmp/config/mt-supspc-gcc
+fsf/gmp/configure
+fsf/gmp/configure.in
+fsf/gmp/cre-mparam.c
+fsf/gmp/demos/factorize.c
+fsf/gmp/extract-double.c
+fsf/gmp/gmp-impl.h
+fsf/gmp/gmp.h
+fsf/gmp/gmp.texi
+fsf/gmp/insert-double.c
+fsf/gmp/install.sh
+fsf/gmp/longlong.h
+fsf/gmp/make.bat
+fsf/gmp/manifests/bin
+fsf/gmp/manifests/src
+fsf/gmp/memory.c
+fsf/gmp/mkinstalldirs
+fsf/gmp/move-if-change
+fsf/gmp/mp.h
+fsf/gmp/mp_bpl.c
+fsf/gmp/mp_clz_tab.c
+fsf/gmp/mp_set_fns.c
+fsf/gmp/mpbsd/Makefile.in
+fsf/gmp/mpbsd/configure.in
+fsf/gmp/mpbsd/itom.c
+fsf/gmp/mpbsd/mdiv.c
+fsf/gmp/mpbsd/mfree.c
+fsf/gmp/mpbsd/min.c
+fsf/gmp/mpbsd/mout.c
+fsf/gmp/mpbsd/move.c
+fsf/gmp/mpbsd/mtox.c
+fsf/gmp/mpbsd/realloc.c
+fsf/gmp/mpbsd/sdiv.c
+fsf/gmp/mpbsd/xtom.c
+fsf/gmp/mpf/Makefile.in
+fsf/gmp/mpf/abs.c
+fsf/gmp/mpf/add.c
+fsf/gmp/mpf/add_ui.c
+fsf/gmp/mpf/clear.c
+fsf/gmp/mpf/cmp.c
+fsf/gmp/mpf/cmp_si.c
+fsf/gmp/mpf/cmp_ui.c
+fsf/gmp/mpf/configure.in
+fsf/gmp/mpf/div.c
+fsf/gmp/mpf/div_2exp.c
+fsf/gmp/mpf/div_ui.c
+fsf/gmp/mpf/dump.c
+fsf/gmp/mpf/eq.c
+fsf/gmp/mpf/get_d.c
+fsf/gmp/mpf/get_prc.c
+fsf/gmp/mpf/get_str.c
+fsf/gmp/mpf/init.c
+fsf/gmp/mpf/init2.c
+fsf/gmp/mpf/inp_str.c
+fsf/gmp/mpf/iset.c
+fsf/gmp/mpf/iset_d.c
+fsf/gmp/mpf/iset_si.c
+fsf/gmp/mpf/iset_str.c
+fsf/gmp/mpf/iset_ui.c
+fsf/gmp/mpf/mul.c
+fsf/gmp/mpf/mul_2exp.c
+fsf/gmp/mpf/mul_ui.c
+fsf/gmp/mpf/neg.c
+fsf/gmp/mpf/out_str.c
+fsf/gmp/mpf/random2.c
+fsf/gmp/mpf/reldiff.c
+fsf/gmp/mpf/set.c
+fsf/gmp/mpf/set_d.c
+fsf/gmp/mpf/set_dfl_prec.c
+fsf/gmp/mpf/set_prc.c
+fsf/gmp/mpf/set_prc_raw.c
+fsf/gmp/mpf/set_q.c
+fsf/gmp/mpf/set_si.c
+fsf/gmp/mpf/set_str.c
+fsf/gmp/mpf/set_ui.c
+fsf/gmp/mpf/set_z.c
+fsf/gmp/mpf/size.c
+fsf/gmp/mpf/sqrt.c
+fsf/gmp/mpf/sqrt_ui.c
+fsf/gmp/mpf/sub.c
+fsf/gmp/mpf/sub_ui.c
+fsf/gmp/mpf/tests/Makefile.in
+fsf/gmp/mpf/tests/configure.in
+fsf/gmp/mpf/tests/ref.c
+fsf/gmp/mpf/tests/reuse.c
+fsf/gmp/mpf/tests/t-add.c
+fsf/gmp/mpf/tests/t-conv.c
+fsf/gmp/mpf/tests/t-dm2exp.c
+fsf/gmp/mpf/tests/t-muldiv.c
+fsf/gmp/mpf/tests/t-sqrt.c
+fsf/gmp/mpf/tests/t-sub.c
+fsf/gmp/mpf/ui_div.c
+fsf/gmp/mpf/ui_sub.c
+fsf/gmp/mpn/Makefile.in
+fsf/gmp/mpn/README
+fsf/gmp/mpn/a29k/add_n.s
+fsf/gmp/mpn/a29k/addmul_1.s
+fsf/gmp/mpn/a29k/lshift.s
+fsf/gmp/mpn/a29k/mul_1.s
+fsf/gmp/mpn/a29k/rshift.s
+fsf/gmp/mpn/a29k/sub_n.s
+fsf/gmp/mpn/a29k/submul_1.s
+fsf/gmp/mpn/alpha/README
+fsf/gmp/mpn/alpha/add_n.s
+fsf/gmp/mpn/alpha/addmul_1.s
+fsf/gmp/mpn/alpha/ev5/add_n.s
+fsf/gmp/mpn/alpha/ev5/lshift.s
+fsf/gmp/mpn/alpha/ev5/rshift.s
+fsf/gmp/mpn/alpha/ev5/sub_n.s
+fsf/gmp/mpn/alpha/gmp-mparam.h
+fsf/gmp/mpn/alpha/lshift.s
+fsf/gmp/mpn/alpha/mul_1.s
+fsf/gmp/mpn/alpha/rshift.s
+fsf/gmp/mpn/alpha/sub_n.s
+fsf/gmp/mpn/alpha/submul_1.s
+fsf/gmp/mpn/alpha/udiv_qrnnd.S
+fsf/gmp/mpn/bsd.h
+fsf/gmp/mpn/clipper/add_n.s
+fsf/gmp/mpn/clipper/mul_1.s
+fsf/gmp/mpn/clipper/sub_n.s
+fsf/gmp/mpn/config/t-oldgas
+fsf/gmp/mpn/config/t-ppc-aix
+fsf/gmp/mpn/config/t-pwr-aix
+fsf/gmp/mpn/configure.in
+fsf/gmp/mpn/cray/gmp-mparam.h
+fsf/gmp/mpn/generic/add_n.c
+fsf/gmp/mpn/generic/addmul_1.c
+fsf/gmp/mpn/generic/bdivmod.c
+fsf/gmp/mpn/generic/cmp.c
+fsf/gmp/mpn/generic/divmod_1.c
+fsf/gmp/mpn/generic/divrem.c
+fsf/gmp/mpn/generic/divrem_1.c
+fsf/gmp/mpn/generic/dump.c
+fsf/gmp/mpn/generic/gcd.c
+fsf/gmp/mpn/generic/gcd_1.c
+fsf/gmp/mpn/generic/gcdext.c
+fsf/gmp/mpn/generic/get_str.c
+fsf/gmp/mpn/generic/gmp-mparam.h
+fsf/gmp/mpn/generic/hamdist.c
+fsf/gmp/mpn/generic/inlines.c
+fsf/gmp/mpn/generic/lshift.c
+fsf/gmp/mpn/generic/mod_1.c
+fsf/gmp/mpn/generic/mul.c
+fsf/gmp/mpn/generic/mul_1.c
+fsf/gmp/mpn/generic/mul_n.c
+fsf/gmp/mpn/generic/perfsqr.c
+fsf/gmp/mpn/generic/popcount.c
+fsf/gmp/mpn/generic/pre_mod_1.c
+fsf/gmp/mpn/generic/random2.c
+fsf/gmp/mpn/generic/rshift.c
+fsf/gmp/mpn/generic/scan0.c
+fsf/gmp/mpn/generic/scan1.c
+fsf/gmp/mpn/generic/set_str.c
+fsf/gmp/mpn/generic/sqrtrem.c
+fsf/gmp/mpn/generic/sub_n.c
+fsf/gmp/mpn/generic/submul_1.c
+fsf/gmp/mpn/generic/udiv_w_sdiv.c
+fsf/gmp/mpn/hppa/README
+fsf/gmp/mpn/hppa/add_n.s
+fsf/gmp/mpn/hppa/hppa1_1/addmul_1.s
+fsf/gmp/mpn/hppa/hppa1_1/mul_1.s
+fsf/gmp/mpn/hppa/hppa1_1/pa7100/add_n.s
+fsf/gmp/mpn/hppa/hppa1_1/pa7100/addmul_1.S
+fsf/gmp/mpn/hppa/hppa1_1/pa7100/lshift.s
+fsf/gmp/mpn/hppa/hppa1_1/pa7100/rshift.s
+fsf/gmp/mpn/hppa/hppa1_1/pa7100/sub_n.s
+fsf/gmp/mpn/hppa/hppa1_1/pa7100/submul_1.S
+fsf/gmp/mpn/hppa/hppa1_1/submul_1.s
+fsf/gmp/mpn/hppa/hppa1_1/udiv_qrnnd.s
+fsf/gmp/mpn/hppa/lshift.s
+fsf/gmp/mpn/hppa/rshift.s
+fsf/gmp/mpn/hppa/sub_n.s
+fsf/gmp/mpn/hppa/udiv_qrnnd.s
+fsf/gmp/mpn/i960/README
+fsf/gmp/mpn/i960/add_n.s
+fsf/gmp/mpn/i960/addmul_1.s
+fsf/gmp/mpn/i960/mul_1.s
+fsf/gmp/mpn/i960/sub_n.s
+fsf/gmp/mpn/m68k/add_n.S
+fsf/gmp/mpn/m68k/lshift.S
+fsf/gmp/mpn/m68k/mc68020/addmul_1.S
+fsf/gmp/mpn/m68k/mc68020/mul_1.S
+fsf/gmp/mpn/m68k/mc68020/submul_1.S
+fsf/gmp/mpn/m68k/rshift.S
+fsf/gmp/mpn/m68k/sub_n.S
+fsf/gmp/mpn/m68k/syntax.h
+fsf/gmp/mpn/m88k/add_n.s
+fsf/gmp/mpn/m88k/mc88110/add_n.S
+fsf/gmp/mpn/m88k/mc88110/addmul_1.s
+fsf/gmp/mpn/m88k/mc88110/mul_1.s
+fsf/gmp/mpn/m88k/mc88110/sub_n.S
+fsf/gmp/mpn/m88k/mul_1.s
+fsf/gmp/mpn/m88k/sub_n.s
+fsf/gmp/mpn/mips2/add_n.s
+fsf/gmp/mpn/mips2/addmul_1.s
+fsf/gmp/mpn/mips2/lshift.s
+fsf/gmp/mpn/mips2/mul_1.s
+fsf/gmp/mpn/mips2/rshift.s
+fsf/gmp/mpn/mips2/sub_n.s
+fsf/gmp/mpn/mips2/submul_1.s
+fsf/gmp/mpn/mips3/README
+fsf/gmp/mpn/mips3/add_n.s
+fsf/gmp/mpn/mips3/addmul_1.s
+fsf/gmp/mpn/mips3/gmp-mparam.h
+fsf/gmp/mpn/mips3/lshift.s
+fsf/gmp/mpn/mips3/mul_1.s
+fsf/gmp/mpn/mips3/rshift.s
+fsf/gmp/mpn/mips3/sub_n.s
+fsf/gmp/mpn/mips3/submul_1.s
+fsf/gmp/mpn/mp_bases.c
+fsf/gmp/mpn/msdos/asm-syntax.h
+fsf/gmp/mpn/ns32k/add_n.s
+fsf/gmp/mpn/ns32k/addmul_1.s
+fsf/gmp/mpn/ns32k/mul_1.s
+fsf/gmp/mpn/ns32k/sub_n.s
+fsf/gmp/mpn/ns32k/submul_1.s
+fsf/gmp/mpn/power/add_n.s
+fsf/gmp/mpn/power/addmul_1.s
+fsf/gmp/mpn/power/lshift.s
+fsf/gmp/mpn/power/mul_1.s
+fsf/gmp/mpn/power/rshift.s
+fsf/gmp/mpn/power/sub_n.s
+fsf/gmp/mpn/power/submul_1.s
+fsf/gmp/mpn/powerpc32/add_n.s
+fsf/gmp/mpn/powerpc32/addmul_1.s
+fsf/gmp/mpn/powerpc32/lshift.s
+fsf/gmp/mpn/powerpc32/mul_1.s
+fsf/gmp/mpn/powerpc32/rshift.s
+fsf/gmp/mpn/powerpc32/sub_n.s
+fsf/gmp/mpn/powerpc32/submul_1.s
+fsf/gmp/mpn/powerpc64/gmp-mparam.h
+fsf/gmp/mpn/pyr/add_n.s
+fsf/gmp/mpn/pyr/addmul_1.s
+fsf/gmp/mpn/pyr/mul_1.s
+fsf/gmp/mpn/pyr/sub_n.s
+fsf/gmp/mpn/sh/add_n.s
+fsf/gmp/mpn/sh/sh2/addmul_1.s
+fsf/gmp/mpn/sh/sh2/mul_1.s
+fsf/gmp/mpn/sh/sh2/submul_1.s
+fsf/gmp/mpn/sh/sub_n.s
+fsf/gmp/mpn/sparc32/README
+fsf/gmp/mpn/sparc32/add_n.S
+fsf/gmp/mpn/sparc32/addmul_1.S
+fsf/gmp/mpn/sparc32/lshift.S
+fsf/gmp/mpn/sparc32/mul_1.S
+fsf/gmp/mpn/sparc32/rshift.S
+fsf/gmp/mpn/sparc32/sub_n.S
+fsf/gmp/mpn/sparc32/submul_1.S
+fsf/gmp/mpn/sparc32/udiv_fp.S
+fsf/gmp/mpn/sparc32/udiv_nfp.S
+fsf/gmp/mpn/sparc32/v8/addmul_1.S
+fsf/gmp/mpn/sparc32/v8/mul_1.S
+fsf/gmp/mpn/sparc32/v8/submul_1.S
+fsf/gmp/mpn/sparc32/v8/supersparc/udiv.S
+fsf/gmp/mpn/sparc64/add_n.s
+fsf/gmp/mpn/sparc64/addmul_1.s
+fsf/gmp/mpn/sparc64/gmp-mparam.h
+fsf/gmp/mpn/sparc64/lshift.s
+fsf/gmp/mpn/sparc64/mul_1.s
+fsf/gmp/mpn/sparc64/rshift.s
+fsf/gmp/mpn/sparc64/sub_n.s
+fsf/gmp/mpn/sparc64/submul_1.s
+fsf/gmp/mpn/sysv.h
+fsf/gmp/mpn/tests/add_n.c
+fsf/gmp/mpn/tests/addmul_1.c
+fsf/gmp/mpn/tests/divmod_1.c
+fsf/gmp/mpn/tests/divrem.c
+fsf/gmp/mpn/tests/lshift.c
+fsf/gmp/mpn/tests/mul_1.c
+fsf/gmp/mpn/tests/rshift.c
+fsf/gmp/mpn/tests/sub_n.c
+fsf/gmp/mpn/tests/submul_1.c
+fsf/gmp/mpn/tests/tst-addsub.c
+fsf/gmp/mpn/vax/add_n.s
+fsf/gmp/mpn/vax/addmul_1.s
+fsf/gmp/mpn/vax/mul_1.s
+fsf/gmp/mpn/vax/sub_n.s
+fsf/gmp/mpn/vax/submul_1.s
+fsf/gmp/mpn/x86/add_n.S
+fsf/gmp/mpn/x86/addmul_1.S
+fsf/gmp/mpn/x86/lshift.S
+fsf/gmp/mpn/x86/mul_1.S
+fsf/gmp/mpn/x86/pentium/README
+fsf/gmp/mpn/x86/pentium/add_n.S
+fsf/gmp/mpn/x86/pentium/addmul_1.S
+fsf/gmp/mpn/x86/pentium/lshift.S
+fsf/gmp/mpn/x86/pentium/mul_1.S
+fsf/gmp/mpn/x86/pentium/rshift.S
+fsf/gmp/mpn/x86/pentium/sub_n.S
+fsf/gmp/mpn/x86/pentium/submul_1.S
+fsf/gmp/mpn/x86/rshift.S
+fsf/gmp/mpn/x86/sub_n.S
+fsf/gmp/mpn/x86/submul_1.S
+fsf/gmp/mpn/x86/syntax.h
+fsf/gmp/mpn/z8000/add_n.s
+fsf/gmp/mpn/z8000/gmp-mparam.h
+fsf/gmp/mpn/z8000/mul_1.s
+fsf/gmp/mpn/z8000/sub_n.s
+fsf/gmp/mpn/z8000x/add_n.s
+fsf/gmp/mpn/z8000x/sub_n.s
+fsf/gmp/mpq/Makefile.in
+fsf/gmp/mpq/add.c
+fsf/gmp/mpq/canonicalize.c
+fsf/gmp/mpq/clear.c
+fsf/gmp/mpq/cmp.c
+fsf/gmp/mpq/cmp_ui.c
+fsf/gmp/mpq/configure.in
+fsf/gmp/mpq/div.c
+fsf/gmp/mpq/equal.c
+fsf/gmp/mpq/get_d.c
+fsf/gmp/mpq/get_den.c
+fsf/gmp/mpq/get_num.c
+fsf/gmp/mpq/init.c
+fsf/gmp/mpq/inv.c
+fsf/gmp/mpq/mul.c
+fsf/gmp/mpq/neg.c
+fsf/gmp/mpq/set.c
+fsf/gmp/mpq/set_den.c
+fsf/gmp/mpq/set_num.c
+fsf/gmp/mpq/set_si.c
+fsf/gmp/mpq/set_ui.c
+fsf/gmp/mpq/set_z.c
+fsf/gmp/mpq/sub.c
+fsf/gmp/mpq/tests/Makefile.in
+fsf/gmp/mpq/tests/configure.in
+fsf/gmp/mpq/tests/t-cmp.c
+fsf/gmp/mpq/tests/t-cmp_ui.c
+fsf/gmp/mpq/tests/t-get_d.c
+fsf/gmp/mpz/Makefile.in
+fsf/gmp/mpz/abs.c
+fsf/gmp/mpz/add.c
+fsf/gmp/mpz/add_ui.c
+fsf/gmp/mpz/and.c
+fsf/gmp/mpz/array_init.c
+fsf/gmp/mpz/cdiv_q.c
+fsf/gmp/mpz/cdiv_q_ui.c
+fsf/gmp/mpz/cdiv_qr.c
+fsf/gmp/mpz/cdiv_qr_ui.c
+fsf/gmp/mpz/cdiv_r.c
+fsf/gmp/mpz/cdiv_r_ui.c
+fsf/gmp/mpz/cdiv_ui.c
+fsf/gmp/mpz/clear.c
+fsf/gmp/mpz/clrbit.c
+fsf/gmp/mpz/cmp.c
+fsf/gmp/mpz/cmp_si.c
+fsf/gmp/mpz/cmp_ui.c
+fsf/gmp/mpz/com.c
+fsf/gmp/mpz/configure.in
+fsf/gmp/mpz/divexact.c
+fsf/gmp/mpz/dmincl.c
+fsf/gmp/mpz/fac_ui.c
+fsf/gmp/mpz/fdiv_q.c
+fsf/gmp/mpz/fdiv_q_2exp.c
+fsf/gmp/mpz/fdiv_q_ui.c
+fsf/gmp/mpz/fdiv_qr.c
+fsf/gmp/mpz/fdiv_qr_ui.c
+fsf/gmp/mpz/fdiv_r.c
+fsf/gmp/mpz/fdiv_r_2exp.c
+fsf/gmp/mpz/fdiv_r_ui.c
+fsf/gmp/mpz/fdiv_ui.c
+fsf/gmp/mpz/gcd.c
+fsf/gmp/mpz/gcd_ui.c
+fsf/gmp/mpz/gcdext.c
+fsf/gmp/mpz/get_d.c
+fsf/gmp/mpz/get_si.c
+fsf/gmp/mpz/get_str.c
+fsf/gmp/mpz/get_ui.c
+fsf/gmp/mpz/getlimbn.c
+fsf/gmp/mpz/hamdist.c
+fsf/gmp/mpz/init.c
+fsf/gmp/mpz/inp_raw.c
+fsf/gmp/mpz/inp_str.c
+fsf/gmp/mpz/invert.c
+fsf/gmp/mpz/ior.c
+fsf/gmp/mpz/iset.c
+fsf/gmp/mpz/iset_d.c
+fsf/gmp/mpz/iset_si.c
+fsf/gmp/mpz/iset_str.c
+fsf/gmp/mpz/iset_ui.c
+fsf/gmp/mpz/jacobi.c
+fsf/gmp/mpz/legendre.c
+fsf/gmp/mpz/mod.c
+fsf/gmp/mpz/mul.c
+fsf/gmp/mpz/mul_2exp.c
+fsf/gmp/mpz/mul_ui.c
+fsf/gmp/mpz/neg.c
+fsf/gmp/mpz/out_raw.c
+fsf/gmp/mpz/out_str.c
+fsf/gmp/mpz/perfsqr.c
+fsf/gmp/mpz/popcount.c
+fsf/gmp/mpz/pow_ui.c
+fsf/gmp/mpz/powm.c
+fsf/gmp/mpz/powm_ui.c
+fsf/gmp/mpz/pprime_p.c
+fsf/gmp/mpz/random.c
+fsf/gmp/mpz/random2.c
+fsf/gmp/mpz/realloc.c
+fsf/gmp/mpz/scan0.c
+fsf/gmp/mpz/scan1.c
+fsf/gmp/mpz/set.c
+fsf/gmp/mpz/set_d.c
+fsf/gmp/mpz/set_f.c
+fsf/gmp/mpz/set_q.c
+fsf/gmp/mpz/set_si.c
+fsf/gmp/mpz/set_str.c
+fsf/gmp/mpz/set_ui.c
+fsf/gmp/mpz/setbit.c
+fsf/gmp/mpz/size.c
+fsf/gmp/mpz/sizeinbase.c
+fsf/gmp/mpz/sqrt.c
+fsf/gmp/mpz/sqrtrem.c
+fsf/gmp/mpz/sub.c
+fsf/gmp/mpz/sub_ui.c
+fsf/gmp/mpz/tdiv_q.c
+fsf/gmp/mpz/tdiv_q_2exp.c
+fsf/gmp/mpz/tdiv_q_ui.c
+fsf/gmp/mpz/tdiv_qr.c
+fsf/gmp/mpz/tdiv_qr_ui.c
+fsf/gmp/mpz/tdiv_r.c
+fsf/gmp/mpz/tdiv_r_2exp.c
+fsf/gmp/mpz/tdiv_r_ui.c
+fsf/gmp/mpz/tests/Makefile.in
+fsf/gmp/mpz/tests/configure.in
+fsf/gmp/mpz/tests/convert.c
+fsf/gmp/mpz/tests/dive.c
+fsf/gmp/mpz/tests/io-binary.c
+fsf/gmp/mpz/tests/io.c
+fsf/gmp/mpz/tests/logic.c
+fsf/gmp/mpz/tests/reuse.c
+fsf/gmp/mpz/tests/t-fdiv.c
+fsf/gmp/mpz/tests/t-fdiv_ui.c
+fsf/gmp/mpz/tests/t-gcd.c
+fsf/gmp/mpz/tests/t-gcd2.c
+fsf/gmp/mpz/tests/t-mul.c
+fsf/gmp/mpz/tests/t-powm.c
+fsf/gmp/mpz/tests/t-powm_ui.c
+fsf/gmp/mpz/tests/t-sqrtrem.c
+fsf/gmp/mpz/tests/t-tdiv.c
+fsf/gmp/mpz/tests/t-tdiv_ui.c
+fsf/gmp/mpz/ui_pow_ui.c
+fsf/gmp/stack-alloc.c
+fsf/gmp/stack-alloc.h
+fsf/gmp/texinfo.tex
+fsf/gmp/urandom.h
+fsf/gmp/version.c
diff -rup --new-file baseline/fsf/gmp/mpn/configure.in amiga/fsf/gmp/mpn/configure.in
--- baseline/fsf/gmp/mpn/configure.in Mon Jun 3 22:52:01 1996
+++ amiga/fsf/gmp/mpn/configure.in Sat Sep 28 00:00:00 1996
@@ -60,6 +60,12 @@ case "${target}" in
# Motorola 68k configurations. Let m68k mean 68020-68040.
# mc68000 or mc68060 configurations need to be specified explicitly
+ # For AmigaOS, we want to build for the lowest common denominator
+ # by default.
+ m68k*-*-amigaos)
+ echo '#define MIT_SYNTAX' >asm-syntax.h
+ echo '#include "'$srcdir'/m68k/syntax.h"' >>asm-syntax.h
+ path="m68k/mc68000" ;;
m680[234]0*-*-linuxaout* | m68k*-*-linuxaout*)
echo '#define MIT_SYNTAX' >asm-syntax.h
echo '#include "'$srcdir'/m68k/syntax.h"' >>asm-syntax.h