From 2054828fa8949ceffe182d09cabfa9d5222e1a2a Mon Sep 17 00:00:00 2001 From: Lionel Sambuc Date: Sat, 25 Aug 2018 12:14:59 +0200 Subject: [PATCH] Remove GCC Libraries dependencies Change-Id: I75608863e4d321df1333649b23db63ec411c319e --- external/lgpl3/gmp/Makefile.netbsd-gmp | 19 - external/lgpl3/gmp/README | 61 - external/lgpl3/gmp/build-gmp-Makefile.inc.awk | 37 - external/lgpl3/gmp/fetch.sh | 31 - external/lgpl3/gmp/lib/libgmp/Makefile | 261 -- .../gmp/lib/libgmp/arch/alpha/Makefile.inc | 192 -- .../lgpl3/gmp/lib/libgmp/arch/alpha/config.h | 630 ----- .../lgpl3/gmp/lib/libgmp/arch/alpha/config.m4 | 35 - .../gmp/lib/libgmp/arch/alpha/gmp-mparam.h | 75 - .../lgpl3/gmp/lib/libgmp/arch/alpha/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/arm/Makefile.inc | 195 -- .../lgpl3/gmp/lib/libgmp/arch/arm/config.h | 630 ----- .../lgpl3/gmp/lib/libgmp/arch/arm/config.m4 | 35 - .../gmp/lib/libgmp/arch/arm/gmp-mparam.h | 116 - external/lgpl3/gmp/lib/libgmp/arch/arm/gmp.h | 2229 ---------------- .../gmp/lib/libgmp/arch/armeb/Makefile.inc | 195 -- .../lgpl3/gmp/lib/libgmp/arch/armeb/config.h | 630 ----- .../lgpl3/gmp/lib/libgmp/arch/armeb/config.m4 | 34 - .../gmp/lib/libgmp/arch/armeb/gmp-mparam.h | 116 - .../lgpl3/gmp/lib/libgmp/arch/armeb/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/coldfire/Makefile.inc | 184 -- .../gmp/lib/libgmp/arch/coldfire/config.h | 630 ----- .../gmp/lib/libgmp/arch/coldfire/config.m4 | 19 - .../gmp/lib/libgmp/arch/coldfire/gmp-mparam.h | 22 - .../lgpl3/gmp/lib/libgmp/arch/coldfire/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/earm/Makefile.inc | 195 -- .../lgpl3/gmp/lib/libgmp/arch/earm/config.h | 630 ----- .../lgpl3/gmp/lib/libgmp/arch/earm/config.m4 | 35 - .../gmp/lib/libgmp/arch/earm/gmp-mparam.h | 116 - external/lgpl3/gmp/lib/libgmp/arch/earm/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/earmeb/Makefile.inc | 195 -- .../lgpl3/gmp/lib/libgmp/arch/earmeb/config.h | 630 ----- .../gmp/lib/libgmp/arch/earmeb/config.m4 | 35 - .../gmp/lib/libgmp/arch/earmeb/gmp-mparam.h | 116 - .../lgpl3/gmp/lib/libgmp/arch/earmeb/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/earmhf/Makefile.inc | 195 -- .../lgpl3/gmp/lib/libgmp/arch/earmhf/config.h | 630 ----- .../gmp/lib/libgmp/arch/earmhf/config.m4 | 35 - .../gmp/lib/libgmp/arch/earmhf/gmp-mparam.h | 116 - .../lgpl3/gmp/lib/libgmp/arch/earmhf/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/earmhfeb/Makefile.inc | 195 -- .../gmp/lib/libgmp/arch/earmhfeb/config.h | 630 ----- .../gmp/lib/libgmp/arch/earmhfeb/config.m4 | 35 - .../gmp/lib/libgmp/arch/earmhfeb/gmp-mparam.h | 116 - .../lgpl3/gmp/lib/libgmp/arch/earmhfeb/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/hppa/Makefile.inc | 189 -- .../lgpl3/gmp/lib/libgmp/arch/hppa/config.h | 630 ----- .../lgpl3/gmp/lib/libgmp/arch/hppa/config.m4 | 34 - .../gmp/lib/libgmp/arch/hppa/gmp-mparam.h | 62 - external/lgpl3/gmp/lib/libgmp/arch/hppa/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/i386/Makefile.inc | 218 -- .../lgpl3/gmp/lib/libgmp/arch/i386/config.h | 630 ----- .../lgpl3/gmp/lib/libgmp/arch/i386/config.m4 | 38 - .../gmp/lib/libgmp/arch/i386/gmp-mparam.h | 58 - external/lgpl3/gmp/lib/libgmp/arch/i386/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/ia64/Makefile.inc | 195 -- .../lgpl3/gmp/lib/libgmp/arch/ia64/config.h | 630 ----- .../lgpl3/gmp/lib/libgmp/arch/ia64/config.m4 | 35 - .../gmp/lib/libgmp/arch/ia64/gmp-mparam.h | 189 -- external/lgpl3/gmp/lib/libgmp/arch/ia64/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/m68000/Makefile.inc | 186 -- .../lgpl3/gmp/lib/libgmp/arch/m68000/config.h | 630 ----- .../gmp/lib/libgmp/arch/m68000/config.m4 | 38 - .../gmp/lib/libgmp/arch/m68000/gmp-mparam.h | 65 - .../lgpl3/gmp/lib/libgmp/arch/m68000/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/m68k/Makefile.inc | 186 -- .../lgpl3/gmp/lib/libgmp/arch/m68k/config.h | 630 ----- .../lgpl3/gmp/lib/libgmp/arch/m68k/config.m4 | 38 - .../gmp/lib/libgmp/arch/m68k/gmp-mparam.h | 65 - external/lgpl3/gmp/lib/libgmp/arch/m68k/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/mips64eb/Makefile.inc | 237 -- .../gmp/lib/libgmp/arch/mips64eb/config.h | 646 ----- .../gmp/lib/libgmp/arch/mips64eb/config.m4 | 34 - .../gmp/lib/libgmp/arch/mips64eb/gmp-mparam.h | 67 - .../lgpl3/gmp/lib/libgmp/arch/mips64eb/gmp.h | 2237 ---------------- .../gmp/lib/libgmp/arch/mips64el/Makefile.inc | 219 -- .../gmp/lib/libgmp/arch/mips64el/config.h | 648 ----- .../gmp/lib/libgmp/arch/mips64el/config.m4 | 34 - .../gmp/lib/libgmp/arch/mips64el/gmp-mparam.h | 67 - .../lgpl3/gmp/lib/libgmp/arch/mips64el/gmp.h | 2237 ---------------- .../gmp/lib/libgmp/arch/mipseb/Makefile.inc | 187 -- .../lgpl3/gmp/lib/libgmp/arch/mipseb/config.h | 630 ----- .../gmp/lib/libgmp/arch/mipseb/config.m4 | 34 - .../gmp/lib/libgmp/arch/mipseb/gmp-mparam.h | 62 - .../lgpl3/gmp/lib/libgmp/arch/mipseb/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/mipsel/Makefile.inc | 187 -- .../lgpl3/gmp/lib/libgmp/arch/mipsel/config.h | 630 ----- .../gmp/lib/libgmp/arch/mipsel/config.m4 | 34 - .../gmp/lib/libgmp/arch/mipsel/gmp-mparam.h | 62 - .../lgpl3/gmp/lib/libgmp/arch/mipsel/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/or1k/Makefile.inc | 184 -- .../lgpl3/gmp/lib/libgmp/arch/or1k/config.h | 630 ----- .../lgpl3/gmp/lib/libgmp/arch/or1k/config.m4 | 19 - .../gmp/lib/libgmp/arch/or1k/gmp-mparam.h | 22 - external/lgpl3/gmp/lib/libgmp/arch/or1k/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/powerpc/Makefile.inc | 193 -- .../gmp/lib/libgmp/arch/powerpc/config.h | 630 ----- .../gmp/lib/libgmp/arch/powerpc/config.m4 | 38 - .../gmp/lib/libgmp/arch/powerpc/gmp-mparam.h | 203 -- .../lgpl3/gmp/lib/libgmp/arch/powerpc/gmp.h | 2231 ---------------- .../lib/libgmp/arch/powerpc64/Makefile.inc | 161 -- .../gmp/lib/libgmp/arch/powerpc64/config.h | 587 ----- .../gmp/lib/libgmp/arch/powerpc64/config.m4 | 36 - .../lib/libgmp/arch/powerpc64/gmp-mparam.h | 22 - .../lgpl3/gmp/lib/libgmp/arch/powerpc64/gmp.h | 2284 ----------------- .../lgpl3/gmp/lib/libgmp/arch/powerpc64/mp.h | 164 -- .../gmp/lib/libgmp/arch/riscv32/Makefile.inc | 184 -- .../gmp/lib/libgmp/arch/riscv32/config.h | 630 ----- .../gmp/lib/libgmp/arch/riscv32/config.m4 | 19 - .../gmp/lib/libgmp/arch/riscv32/gmp-mparam.h | 22 - .../lgpl3/gmp/lib/libgmp/arch/riscv32/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/riscv64/Makefile.inc | 184 -- .../gmp/lib/libgmp/arch/riscv64/config.h | 630 ----- .../gmp/lib/libgmp/arch/riscv64/config.m4 | 19 - .../gmp/lib/libgmp/arch/riscv64/gmp-mparam.h | 22 - .../lgpl3/gmp/lib/libgmp/arch/riscv64/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/sh3eb/Makefile.inc | 186 -- .../lgpl3/gmp/lib/libgmp/arch/sh3eb/config.h | 630 ----- .../lgpl3/gmp/lib/libgmp/arch/sh3eb/config.m4 | 32 - .../gmp/lib/libgmp/arch/sh3eb/gmp-mparam.h | 22 - .../lgpl3/gmp/lib/libgmp/arch/sh3eb/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/sh3el/Makefile.inc | 184 -- .../lgpl3/gmp/lib/libgmp/arch/sh3el/config.h | 630 ----- .../lgpl3/gmp/lib/libgmp/arch/sh3el/config.m4 | 19 - .../gmp/lib/libgmp/arch/sh3el/gmp-mparam.h | 22 - .../lgpl3/gmp/lib/libgmp/arch/sh3el/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/sparc/Makefile.inc | 190 -- .../lgpl3/gmp/lib/libgmp/arch/sparc/config.h | 630 ----- .../lgpl3/gmp/lib/libgmp/arch/sparc/config.m4 | 34 - .../gmp/lib/libgmp/arch/sparc/gmp-mparam.h | 57 - .../lgpl3/gmp/lib/libgmp/arch/sparc/gmp.h | 2229 ---------------- .../gmp/lib/libgmp/arch/sparc64/Makefile.inc | 186 -- .../gmp/lib/libgmp/arch/sparc64/config.h | 630 ----- .../gmp/lib/libgmp/arch/sparc64/config.m4 | 35 - .../gmp/lib/libgmp/arch/sparc64/gmp-mparam.h | 128 - .../lgpl3/gmp/lib/libgmp/arch/sparc64/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/vax/Makefile.inc | 199 -- .../lgpl3/gmp/lib/libgmp/arch/vax/config.h | 630 ----- .../lgpl3/gmp/lib/libgmp/arch/vax/config.m4 | 33 - .../gmp/lib/libgmp/arch/vax/gmp-mparam.h | 49 - external/lgpl3/gmp/lib/libgmp/arch/vax/gmp.h | 2231 ---------------- .../gmp/lib/libgmp/arch/x86_64/Makefile.inc | 205 -- .../lgpl3/gmp/lib/libgmp/arch/x86_64/config.h | 630 ----- .../gmp/lib/libgmp/arch/x86_64/config.m4 | 36 - .../gmp/lib/libgmp/arch/x86_64/gmp-mparam.h | 212 -- .../lgpl3/gmp/lib/libgmp/arch/x86_64/gmp.h | 2231 ---------------- external/lgpl3/gmp/lib/libgmp/shlib_version | 6 - external/lgpl3/gmp/patches/0000-gmp.patch | 613 ----- external/lgpl3/mpc/fetch.sh | 29 - external/lgpl3/mpc/lib/libmpc/Makefile | 107 - external/lgpl3/mpc/lib/libmpc/config.h | 124 - external/lgpl3/mpfr/fetch.sh | 31 - external/lgpl3/mpfr/lib/libmpfr/Makefile | 530 ---- external/lgpl3/mpfr/patches/0000-mpfr.patch | 75 - lib/Makefile | 8 +- tools/gmp/Makefile | 19 - tools/mpc/Makefile | 16 - tools/mpfr/Makefile | 15 - 158 files changed, 2 insertions(+), 90883 deletions(-) delete mode 100644 external/lgpl3/gmp/Makefile.netbsd-gmp delete mode 100644 external/lgpl3/gmp/README delete mode 100644 external/lgpl3/gmp/build-gmp-Makefile.inc.awk delete mode 100755 external/lgpl3/gmp/fetch.sh delete mode 100644 external/lgpl3/gmp/lib/libgmp/Makefile delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/alpha/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/alpha/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/alpha/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/alpha/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/alpha/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/arm/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/arm/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/arm/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/arm/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/arm/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/armeb/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/armeb/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/armeb/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/armeb/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/armeb/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/coldfire/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/coldfire/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/coldfire/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/coldfire/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/coldfire/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/earm/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/earm/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/earm/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/earm/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/earm/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/earmeb/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/earmeb/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/earmeb/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/earmeb/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/earmeb/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/earmhf/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/earmhf/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/earmhf/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/earmhf/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/earmhf/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/earmhfeb/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/earmhfeb/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/earmhfeb/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/earmhfeb/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/earmhfeb/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/hppa/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/hppa/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/hppa/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/hppa/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/hppa/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/i386/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/i386/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/i386/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/i386/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/i386/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/ia64/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/ia64/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/ia64/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/ia64/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/ia64/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/m68000/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/m68000/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/m68000/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/m68000/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/m68000/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/m68k/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/m68k/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/m68k/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/m68k/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/m68k/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/mips64eb/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/mips64eb/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/mips64eb/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/mips64eb/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/mips64eb/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/mips64el/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/mips64el/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/mips64el/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/mips64el/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/mips64el/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/mipseb/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/mipseb/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/mipseb/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/mipseb/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/mipseb/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/mipsel/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/mipsel/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/mipsel/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/mipsel/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/mipsel/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/or1k/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/or1k/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/or1k/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/or1k/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/or1k/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/powerpc/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/powerpc/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/powerpc/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/powerpc/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/powerpc/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/powerpc64/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/powerpc64/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/powerpc64/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/powerpc64/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/powerpc64/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/powerpc64/mp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/riscv32/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/riscv32/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/riscv32/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/riscv32/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/riscv32/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/riscv64/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/riscv64/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/riscv64/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/riscv64/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/riscv64/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/sh3eb/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/sh3eb/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/sh3eb/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/sh3eb/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/sh3eb/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/sh3el/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/sh3el/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/sh3el/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/sh3el/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/sh3el/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/sparc/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/sparc/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/sparc/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/sparc/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/sparc/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/sparc64/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/sparc64/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/sparc64/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/sparc64/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/sparc64/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/vax/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/vax/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/vax/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/vax/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/vax/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/x86_64/Makefile.inc delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/x86_64/config.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/x86_64/config.m4 delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/x86_64/gmp-mparam.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/arch/x86_64/gmp.h delete mode 100644 external/lgpl3/gmp/lib/libgmp/shlib_version delete mode 100644 external/lgpl3/gmp/patches/0000-gmp.patch delete mode 100755 external/lgpl3/mpc/fetch.sh delete mode 100644 external/lgpl3/mpc/lib/libmpc/Makefile delete mode 100644 external/lgpl3/mpc/lib/libmpc/config.h delete mode 100755 external/lgpl3/mpfr/fetch.sh delete mode 100644 external/lgpl3/mpfr/lib/libmpfr/Makefile delete mode 100644 external/lgpl3/mpfr/patches/0000-mpfr.patch delete mode 100644 tools/gmp/Makefile delete mode 100644 tools/mpc/Makefile delete mode 100644 tools/mpfr/Makefile diff --git a/external/lgpl3/gmp/Makefile.netbsd-gmp b/external/lgpl3/gmp/Makefile.netbsd-gmp deleted file mode 100644 index dd6b49bf5..000000000 --- a/external/lgpl3/gmp/Makefile.netbsd-gmp +++ /dev/null @@ -1,19 +0,0 @@ -# $NetBSD: Makefile.netbsd-gmp,v 1.4 2014/03/18 18:20:36 riastradh Exp $ - -# hack makefile to help build gmp ./configure - -.include - -CCADDFLAGS= --sysroot=${DESTDIR} -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/ -I${.OBJDIR}/.native/gcc/include - -TARGET?=${MACHINE_GNU_PLATFORM} -#TARGET=mips64el-netbsd -ENV_ARGS=\ - CC=${CC:Q}' '${CCADDFLAGS:Q} \ - CPP=${CPP:Q}' '-I${DESTDIR}/usr/include \ - AS=${AS:Q} AWK=${TOOL_AWK:Q} LD=${LD:Q} \ - NM=${NM:Q} OBJDUMP=${OBJDUMP:Q} \ - LIBS=-lintl - -all: - env ${ENV_ARGS} ${NETBSDSRCDIR}/external/lgpl3/gmp/dist/configure --host=${TARGET} --target=${TARGET} diff --git a/external/lgpl3/gmp/README b/external/lgpl3/gmp/README deleted file mode 100644 index 3e7fedd57..000000000 --- a/external/lgpl3/gmp/README +++ /dev/null @@ -1,61 +0,0 @@ -$NetBSD: README,v 1.6 2013/12/04 11:43:52 mrg Exp $ - -GMP in NetBSD. We need GMP for GCC >= 4.2. - - -Building GMP without configure - how to port GMP build to a new platform. - -The GMP build doesn't map very well to normal make. The ./configure phase -creates a bunch of symlinks and weeds out the sources lists, and there are -files with the same name in different subdirectories linked into the same -final product. All of these issues need to be dealt with. - -There are a few steps to this: - - - run ./configure, save the output. you can use the makefile - "Makefile.netbsd-gmp" in this directory to run this with the - right options, etc. run it with nbmake-$MACHINE. - - - create src/external/gpl3/gmp/lib/libgmp/arch/${MACHINE_ARCH} dir, - and copy these files into it: - config.h - config.m4 - gmp-mparam.h - gmp.h - mp.h - - some of these files might have src/obj references. in particular - fix GMP_MPARAM_H_SUGGEST to start from ./mpn/... and make sure - we #define __GMP_CC to "gcc -std=gnu99", and make sure that - CONFIG_TOP_SRCDIR is not defined in config.m4 - - XXX make this automatic - - - - parse the ./configure output and note all created symlinks - for mpn. these need to be converted into a new Makefile.inc. - there is a script in this subdir build-gmp-Makefile.inc.awk - that can be used to do this. it should just work to generate - the first section of Makefile.inc if fed the entire configure - output. - - assembler files generally want -DOPERATION_${foo} defined for - each way they are compiled or pre-processed. the pre-processor - used is m4 to parse, and we and create .s files from the .asm - files that we then we feed into $CC. - -The amd64 port is a good reference to compare. The trialdivtab.h -generation may need to be moved the into libgmp/Makefile itself. - -This mips64* ports need some minor hacks to the generated gmp*.h -files to fix their library builds for compat issues. See these -files in: - http://mail-index.netbsd.org/source-changes/2011/07/10/msg024467.html - - -This is still a work in progress and methods used to build may be -changed at any time. - - -mrg@netbsd.org -- 2011/06/22 diff --git a/external/lgpl3/gmp/build-gmp-Makefile.inc.awk b/external/lgpl3/gmp/build-gmp-Makefile.inc.awk deleted file mode 100644 index d749115b7..000000000 --- a/external/lgpl3/gmp/build-gmp-Makefile.inc.awk +++ /dev/null @@ -1,37 +0,0 @@ -#! /usr/bin/awk -f - -/^config.status: linking/ { - # $3 = src - # $5 = dst - - sub(/mpn\//, "", $5) - sub(/.*external\/lgpl3\/gmp\/dist\//, "", $3) - - srcname = $3 - sub(/.*\//, "", srcname) - - if (match($3, /\.c$/)) { - if ($5 == srcname) { - c_list[$5] = $3 - } else { - c_src_list[$5] = $3 - } - } else if (match($3, /\.(asm|s|S)$/)) { - asm_list[$5] = $3 - } -} - -END { - printf("SRCS+= \\\n"); - for (c in c_list) { - printf("\t%s \\\n", c) - } - printf("\nC_SRCS_LIST= \\\n"); - for (c in c_src_list) { - printf("\t%s\t\t%s \\\n", c, c_src_list[c]) - } - printf("\nASM_SRCS_LIST= \\\n"); - for (asm in asm_list) { - printf("\t%s\t\t%s \\\n", asm, asm_list[asm]) - } -} diff --git a/external/lgpl3/gmp/fetch.sh b/external/lgpl3/gmp/fetch.sh deleted file mode 100755 index d17dfa474..000000000 --- a/external/lgpl3/gmp/fetch.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -# Make sure we're in our directory (i.e., where this shell script is) -echo $0 -cd `dirname $0` - -# Configure fetch method -URL="http://www.minix3.org/pkgsrc/distfiles/minix/3.4.0/gmp-5.1.3.tar.bz2" -BACKUP_URL="ftp://ftp.gmplib.org/pub/gmp-5.1.3/gmp-5.1.3.tar.bz2" -FETCH=ftp -which curl >/dev/null -if [ $? -eq 0 ]; then - FETCH="curl -O -f" -fi - -# Fetch sources if not available -if [ ! -d dist ]; -then - if [ ! -f gmp-5.1.3.tar.bz2 ]; then - $FETCH $URL - if [ $? -ne 0 ]; then - $FETCH $BACKUP_URL - fi - fi - - tar -oxjf gmp-5.1.3.tar.bz2 - mv gmp-5.1.3 dist && \ - cd dist && \ - cat ../patches/* |patch -p1 -fi - diff --git a/external/lgpl3/gmp/lib/libgmp/Makefile b/external/lgpl3/gmp/lib/libgmp/Makefile deleted file mode 100644 index 91a221274..000000000 --- a/external/lgpl3/gmp/lib/libgmp/Makefile +++ /dev/null @@ -1,261 +0,0 @@ -# $NetBSD: Makefile,v 1.24 2013/12/19 01:07:03 gdt Exp $ - -.include - -# We don't install gmp, just provide it for GCC. -LIBISPRIVATE?= yes - -GMP_MACHINE_ARCH?= ${MACHINE_ARCH:S/earmv4/arm/:C/armv[5-7]/arm/} - -.if ${LIBISPRIVATE} != "yes" -INCS= gmp.h -INCSDIR= /usr/include -.endif - -DIST=${.CURDIR}/../../dist - -LIB= gmp - -MPF_SRCS = \ - init.c init2.c inits.c set.c \ - set_ui.c set_si.c set_str.c set_d.c \ - set_z.c iset.c iset_ui.c iset_si.c \ - iset_str.c iset_d.c clear.c clears.c \ - get_str.c dump.c size.c eq.c reldiff.c \ - sqrt.c random2.c inp_str.c out_str.c \ - add.c add_ui.c sub.c sub_ui.c ui_sub.c \ - mul.c mul_ui.c div.c div_ui.c \ - cmp.c cmp_d.c cmp_ui.c cmp_si.c \ - mul_2exp.c div_2exp.c abs.c neg.c \ - set_q.c get_d.c get_d_2exp.c set_dfl_prec.c \ - set_prc.c set_prc_raw.c get_dfl_prec.c \ - get_prc.c ui_div.c sqrt_ui.c \ - ceilfloor.c trunc.c pow_ui.c \ - urandomb.c swap.c \ - fits_sint.c fits_slong.c fits_sshort.c \ - fits_uint.c fits_ulong.c fits_ushort.c \ - get_si.c get_ui.c \ - int_p.c - -MPZ_SRCS = \ - abs.c add.c add_ui.c \ - aorsmul.c aorsmul_i.c and.c array_init.c \ - bin_ui.c bin_uiui.c \ - cdiv_q.c cdiv_q_ui.c \ - cdiv_qr.c cdiv_qr_ui.c \ - cdiv_r.c cdiv_r_ui.c cdiv_ui.c \ - cfdiv_q_2exp.c cfdiv_r_2exp.c \ - clear.c clears.c clrbit.c \ - cmp.c cmp_d.c cmp_si.c cmp_ui.c \ - cmpabs.c cmpabs_d.c cmpabs_ui.c \ - com.c combit.c \ - cong.c cong_2exp.c cong_ui.c \ - divexact.c divegcd.c dive_ui.c \ - divis.c divis_ui.c divis_2exp.c dump.c \ - export.c fac_ui.c fdiv_q.c \ - fdiv_q_ui.c fdiv_qr.c fdiv_qr_ui.c \ - fdiv_r.c fdiv_r_ui.c \ - fdiv_ui.c fib_ui.c fib2_ui.c fits_sint.c \ - fits_slong.c fits_sshort.c fits_uint.c \ - fits_ulong.c fits_ushort.c gcd.c \ - gcd_ui.c gcdext.c get_d.c get_d_2exp.c \ - get_si.c get_str.c get_ui.c getlimbn.c \ - hamdist.c \ - import.c init.c init2.c inits.c \ - inp_raw.c inp_str.c invert.c \ - ior.c iset.c iset_d.c iset_si.c \ - iset_str.c iset_ui.c jacobi.c kronsz.c \ - kronuz.c kronzs.c kronzu.c \ - lcm.c lcm_ui.c lucnum_ui.c lucnum2_ui.c \ - millerrabin.c mod.c mul.c mul_2exp.c \ - mul_si.c mul_ui.c \ - n_pow_ui.c neg.c nextprime.c \ - out_raw.c out_str.c perfpow.c perfsqr.c \ - popcount.c pow_ui.c powm.c powm_sec.c \ - powm_ui.c pprime_p.c random.c random2.c \ - realloc.c realloc2.c remove.c \ - root.c rootrem.c rrandomb.c scan0.c \ - scan1.c set.c set_d.c set_f.c \ - set_q.c set_si.c set_str.c set_ui.c \ - setbit.c \ - size.c sizeinbase.c sqrt.c \ - sqrtrem.c sub.c sub_ui.c swap.c \ - tdiv_ui.c tdiv_q.c tdiv_q_2exp.c \ - tdiv_q_ui.c tdiv_qr.c tdiv_qr_ui.c \ - tdiv_r.c tdiv_r_2exp.c tdiv_r_ui.c \ - tstbit.c ui_pow_ui.c ui_sub.c urandomb.c \ - urandomm.c xor.c - -MPQ_SRCS = \ - abs.c aors.c \ - canonicalize.c clear.c clears.c \ - cmp.c cmp_si.c cmp_ui.c div.c \ - get_d.c get_den.c get_num.c get_str.c \ - init.c inits.c inp_str.c inv.c \ - md_2exp.c mul.c neg.c out_str.c \ - set.c set_den.c set_num.c \ - set_si.c set_str.c set_ui.c \ - equal.c set_z.c set_d.c \ - set_f.c swap.c - -MPN_GENERIC_SRCS = \ - popcount.c \ - hamdist.c - -PRINTF_SRCS = \ - asprintf.c asprntffuns.c \ - doprnt.c doprntf.c doprnti.c \ - fprintf.c \ - obprintf.c obvprintf.c obprntffuns.c \ - printf.c printffuns.c \ - snprintf.c snprntffuns.c \ - sprintf.c sprintffuns.c \ - vasprintf.c vfprintf.c vprintf.c \ - vsnprintf.c vsprintf.c \ - repl-vsnprintf.c - -SCANF_SRCS = \ - doscan.c fscanf.c fscanffuns.c \ - scanf.c sscanf.c sscanffuns.c \ - vfscanf.c vscanf.c vsscanf.c - -SRCS+= \ - assert.c compat.c errno.c extract-dbl.c invalid.c memory.c \ - mp_bpl.c mp_clz_tab.c mp_dv_tab.c mp_minv_tab.c mp_get_fns.c \ - mp_set_fns.c randclr.c randdef.c randiset.c randlc2s.c \ - randlc2x.c randmt.c randmts.c rands.c randsd.c randsdui.c \ - randbui.c randmui.c version.c nextprime.c - -SRCS+= tal-reent.c - -# these are generated -SRCS+= fib_table.c mp_bases.c - -# Build the files that may have multiple identical base names under -# different names. -.for _dir _srcfile in \ - ${MPF_SRCS:C/^/mpf /} \ - ${MPZ_SRCS:C/^/mpz /} \ - ${MPQ_SRCS:C/^/mpq /} \ - ${PRINTF_SRCS:C/^/printf /} \ - ${SCANF_SRCS:C/^/scanf /} -${_dir}_${_srcfile}: #Makefile - echo '#include "'${_dir}/${_srcfile}'"' > ${.TARGET} - -SRCS+= ${_dir}_${_srcfile} -CLEANFILES+= ${_dir}_${_srcfile} - -.endfor - -CPPFLAGS+= -I. -I${DIST} -I${.CURDIR}/arch/${GMP_MACHINE_ARCH} \ - -D__GMP_WITHIN_GMP -DHAVE_CONFIG_H - -WITHOUT_MAN= yes - -DPSRCS= fac_table.h fib_table.h fib_table.c jacobitab.h mp_bases.h \ - mp_bases.c perfsqr.h trialdivtab.h - -gen-fac: gen-fac.c - ${HOST_CC} -o ${.OBJDIR}/gen-fac ${.ALLSRC} - -fac_table.h: gen-fac - ${.OBJDIR}/gen-fac ${GMP_LIMB_BITS} 0 > ${.OBJDIR}/fac_table.h - -gen-fib: gen-fib.c - ${HOST_CC} -o ${.OBJDIR}/gen-fib ${.ALLSRC} - -fib_table.h: gen-fib - ${.OBJDIR}/gen-fib header ${GMP_LIMB_BITS} 0 > ${.OBJDIR}/fib_table.h - -fib_table.c: gen-fib - ${.OBJDIR}/gen-fib table ${GMP_LIMB_BITS} 0 > ${.OBJDIR}/fib_table.c - -gen-bases: gen-bases.c - ${HOST_CC} -o ${.OBJDIR}/gen-bases ${.ALLSRC} -lm - -mp_bases.h: gen-bases - ${.OBJDIR}/gen-bases header ${GMP_LIMB_BITS} 0 > ${.OBJDIR}/mp_bases.h - -mp_bases.c: gen-bases - ${.OBJDIR}/gen-bases table ${GMP_LIMB_BITS} 0 > ${.OBJDIR}/mp_bases.c - -gen-jacobitab: gen-jacobitab.c - ${HOST_CC} -o ${.OBJDIR}/gen-jacobitab ${.ALLSRC} -lm - -jacobitab.h: gen-jacobitab - ${.OBJDIR}/gen-jacobitab > ${.OBJDIR}/jacobitab.h - -perfsqr.h: gen-psqr.c - ${HOST_CC} -o ${.OBJDIR}/gen-psqr ${.ALLSRC} - ${.OBJDIR}/gen-psqr ${GMP_LIMB_BITS} 0 > ${.OBJDIR}/perfsqr.h - -gen-trialdivtab: gen-trialdivtab.c - ${HOST_CC} -o ${.OBJDIR}/gen-trialdivtab ${.ALLSRC} -lm - -trialdiv.c: trialdivtab.h -trialdivtab.h: gen-trialdivtab Makefile - ${.OBJDIR}/gen-trialdivtab $(GMP_LIMB_BITS) 8000 > ${.OBJDIR}/trialdivtab.h - -CLEANFILES+= ${DPSRCS} gen-fac gen-fib gen-bases gen-jacobitab \ - gen-psqr gen-trialdivtab - -.include "${.CURDIR}/arch/${GMP_MACHINE_ARCH}/Makefile.inc" - -# Makefile.inc must define GMP_LIMB_BITS. -.if !defined(GMP_LIMB_BITS) -.BEGIN: - @echo "GMP_LIMB_BITS not defined!" - false -.endif - -# XXX stuff looks for "../config.m4" -dummy: - mkdir dummy -${.OBJDIR}/config.m4: ${.CURDIR}/arch/${GMP_MACHINE_ARCH}/config.m4 - rm -f ${.OBJDIR}/config.m4 && cp ${.CURDIR}/arch/${GMP_MACHINE_ARCH}/config.m4 ${.OBJDIR}/config.m4 - -CLEANFILES+= config.m4 -clean: cleandummy -cleandummy: .PHONY - -rmdir dummy - -BUILD_S_INCS= -I${.CURDIR} -I${.OBJDIR}/dummy -I${DIST}/ -I${DIST}/mpn \ - -I${.OBJDIR} - -.for _build _src in ${ASM_SRCS_LIST} -${_build:R}.s: Makefile dummy ${.OBJDIR}/config.m4 ${DIST}/${_src} - ${TOOL_M4} -DCONFIG_TOP_SRCDIR=${DIST} ${BUILD_S_INCS} \ - ${M4FLAGS} ${M4FLAGS.${.TARGET:R}} \ - -DOPERATION_${.TARGET:R} ${DIST}/${_src} > ${.TARGET} - -SRCS+= ${_build:R}.s -CLEANFILES+= ${_build:R}.s -.endfor - -.for _build _src in ${C_SRCS_LIST} -mpn_${_build}: Makefile - echo '#include "${_src}"' > ${.TARGET} - -CPPFLAGS.mpn_${_build}+= -DOPERATION_${_build:R} - -SRCS+= mpn_${_build} -CLEANFILES+= mpn_${_build} -.endfor - -.include - -.PATH: ${DIST} \ - ${DIST}/rand \ - ${DIST}/mpn/generic \ - ${.CURDIR}/arch/${GMP_MACHINE_ARCH} \ - ${DIST}/mpf \ - ${DIST}/mpz - -# Don't warn about functions which cannot be stack smash protected as -# there are a lot of them. -COPTS += -Wno-stack-protector -.if !empty(GMP_MACHINE_ARCH:M*arm*) -COPTS += -marm -.endif - -CWARNFLAGS.clang+= -Wno-unused-value -Wno-tautological-compare -Wno-parentheses diff --git a/external/lgpl3/gmp/lib/libgmp/arch/alpha/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/alpha/Makefile.inc deleted file mode 100644 index 913a82868..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/alpha/Makefile.inc +++ /dev/null @@ -1,192 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.4 2013/12/04 00:49:17 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom44_mul.c \ - toom8h_mul.c \ - toom2_sqr.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom_interpolate_6pts.c \ - toom54_mul.c \ - dcpi1_divappr_q.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - toom_couple_handling.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - div_q.c \ - jacbase.c \ - addcnd_n.c \ - hgcd_matrix.c \ - mullo_n.c \ - toom33_mul.c \ - toom_eval_dgr3_pm1.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - mul_basecase.c \ - toom8_sqr.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - subcnd_n.c \ - toom_eval_pm2.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - toom_interpolate_8pts.c \ - remove.c \ - lshiftc.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - -ASM_SRCS_LIST= \ - sqr_diagonal.asm mpn/alpha/sqr_diagonal.asm \ - add_n.asm mpn/alpha/add_n.asm \ - sublsh1_n.asm mpn/alpha/aorslsh1_n.asm \ - cntlz.asm mpn/alpha/cntlz.asm \ - submul_1.asm mpn/alpha/submul_1.asm \ - umul.asm mpn/alpha/umul.asm \ - lshift.asm mpn/alpha/lshift.asm \ - mul_1.asm mpn/alpha/mul_1.asm \ - copyd.asm mpn/alpha/copyd.asm \ - bdiv_dbm1c.asm mpn/alpha/bdiv_dbm1c.asm \ - com.asm mpn/alpha/com.asm \ - copyi.asm mpn/alpha/copyi.asm \ - rshift.asm mpn/alpha/rshift.asm \ - mod_34lsub1.asm mpn/alpha/mod_34lsub1.asm \ - mode1o.asm mpn/alpha/mode1o.asm \ - addlsh1_n.asm mpn/alpha/aorslsh1_n.asm \ - invert_limb.asm mpn/alpha/invert_limb.asm \ - addmul_1.asm mpn/alpha/addmul_1.asm \ - divrem_2.asm mpn/alpha/divrem_2.asm \ - sub_n.asm mpn/alpha/sub_n.asm \ - -GMP_LIMB_BITS=64 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/alpha/config.h b/external/lgpl3/gmp/lib/libgmp/arch/alpha/config.h deleted file mode 100644 index 902dd3c3a..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/alpha/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/alpha/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -/* #undef HAVE_CALLING_CONVENTIONS */ - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -/* #undef HAVE_DOUBLE_IEEE_BIG_ENDIAN */ -#define HAVE_DOUBLE_IEEE_LITTLE_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -#define HAVE_HOST_CPU_FAMILY_alpha 1 -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -/* #undef HAVE_LIMB_BIG_ENDIAN */ -#define HAVE_LIMB_LITTLE_ENDIAN 1 - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#define HAVE_NATIVE_mpn_add_n 1 -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -#define HAVE_NATIVE_mpn_add_nc 1 -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addcnd_n */ -#define HAVE_NATIVE_mpn_addlsh1_n 1 -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -/* #undef HAVE_NATIVE_mpn_and_n */ -/* #undef HAVE_NATIVE_mpn_andn_n */ -#define HAVE_NATIVE_mpn_bdiv_dbm1c 1 -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -#define HAVE_NATIVE_mpn_com 1 -#define HAVE_NATIVE_mpn_copyd 1 -#define HAVE_NATIVE_mpn_copyi 1 -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -#define HAVE_NATIVE_mpn_divrem_2 1 -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -#define HAVE_NATIVE_mpn_invert_limb 1 -/* #undef HAVE_NATIVE_mpn_ior_n */ -/* #undef HAVE_NATIVE_mpn_iorn_n */ -#define HAVE_NATIVE_mpn_lshift 1 -/* #undef HAVE_NATIVE_mpn_lshiftc */ -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -#define HAVE_NATIVE_mpn_mod_34lsub1 1 -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -#define HAVE_NATIVE_mpn_modexact_1c_odd 1 -#define HAVE_NATIVE_mpn_mul_1 1 -#define HAVE_NATIVE_mpn_mul_1c 1 -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -/* #undef HAVE_NATIVE_mpn_nand_n */ -/* #undef HAVE_NATIVE_mpn_nior_n */ -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1add_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_n */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -#define HAVE_NATIVE_mpn_rshift 1 -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -#define HAVE_NATIVE_mpn_sqr_diagonal 1 -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -#define HAVE_NATIVE_mpn_sub_n 1 -#define HAVE_NATIVE_mpn_sub_nc 1 -/* #undef HAVE_NATIVE_mpn_subcnd_n */ -#define HAVE_NATIVE_mpn_sublsh1_n 1 -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -#define HAVE_NATIVE_mpn_umul_ppmm 1 -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -/* #undef HAVE_NATIVE_mpn_xor_n */ -/* #undef HAVE_NATIVE_mpn_xnor_n */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -#define HAVE_SPEED_CYCLECOUNTER 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX "$" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 8 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 8 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 8 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/alpha/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/alpha/config.m4 deleted file mode 100644 index 19ab7853a..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/alpha/config.m4 +++ /dev/null @@ -1,35 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .section .rodata>) -define(, <.type $1,@$2>) -define(, <.size $1,$2>) -define(, <$>) -define(, <.long>) -define(,) -define(,<20>) -define(,<4>) -define(,64) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`alpha/alpha-defs.m4') -include_mpn(`alpha/default.m4') -define_not_for_expansion(`HAVE_HOST_CPU_alpha') -define_not_for_expansion(`HAVE_ABI_standard') -define_not_for_expansion(`HAVE_LIMB_LITTLE_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/alpha/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/alpha/gmp-mparam.h deleted file mode 100644 index ddd9f9161..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/alpha/gmp-mparam.h +++ /dev/null @@ -1,75 +0,0 @@ -/* Alpha EV4 gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005, 2009 -Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#define GMP_LIMB_BITS 64 -#define BYTES_PER_MP_LIMB 8 - - -/* 175MHz 21064 */ - -/* Generated by tuneup.c, 2009-01-15, gcc 3.2 */ - -#define MUL_TOOM22_THRESHOLD 12 -#define MUL_TOOM33_THRESHOLD 69 -#define MUL_TOOM44_THRESHOLD 88 - -#define SQR_BASECASE_THRESHOLD 4 -#define SQR_TOOM2_THRESHOLD 20 -#define SQR_TOOM3_THRESHOLD 62 -#define SQR_TOOM4_THRESHOLD 155 - -#define MULLO_BASECASE_THRESHOLD 0 /* always */ -#define MULLO_DC_THRESHOLD 40 -#define MULLO_MUL_N_THRESHOLD 202 - -#define DIV_SB_PREINV_THRESHOLD 0 /* preinv always */ -#define DIV_DC_THRESHOLD 38 -#define POWM_THRESHOLD 60 - -#define MATRIX22_STRASSEN_THRESHOLD 17 -#define HGCD_THRESHOLD 80 -#define GCD_DC_THRESHOLD 237 -#define GCDEXT_DC_THRESHOLD 198 -#define JACOBI_BASE_METHOD 2 - -#define DIVREM_1_NORM_THRESHOLD 0 /* preinv always */ -#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_1_THRESHOLD 2 -#define MOD_1_2_THRESHOLD 9 -#define MOD_1_4_THRESHOLD 20 -#define USE_PREINV_DIVREM_1 1 /* preinv always */ -#define USE_PREINV_MOD_1 1 /* preinv always */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always */ - -#define GET_STR_DC_THRESHOLD 20 -#define GET_STR_PRECOMPUTE_THRESHOLD 37 -#define SET_STR_DC_THRESHOLD 746 -#define SET_STR_PRECOMPUTE_THRESHOLD 1332 - -#define MUL_FFT_TABLE { 240, 480, 1344, 2304, 5120, 20480, 49152, 0 } -#define MUL_FFT_MODF_THRESHOLD 232 -#define MUL_FFT_THRESHOLD 1664 - -#define SQR_FFT_TABLE { 240, 480, 1216, 2304, 5120, 12288, 49152, 0 } -#define SQR_FFT_MODF_THRESHOLD 232 -#define SQR_FFT_THRESHOLD 1408 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/alpha/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/alpha/gmp.h deleted file mode 100644 index 68e13c007..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/alpha/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 64 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || \ - (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-O2 -pedantic -Wa,-mev4 -mcpu=ev4" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/arm/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/arm/Makefile.inc deleted file mode 100644 index d1ed4ebc2..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/arm/Makefile.inc +++ /dev/null @@ -1,195 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.6 2013/12/04 00:49:17 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom44_mul.c \ - toom8h_mul.c \ - toom2_sqr.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom54_mul.c \ - toom_interpolate_6pts.c \ - dcpi1_divappr_q.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - toom_couple_handling.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - div_q.c \ - jacbase.c \ - hgcd_matrix.c \ - mullo_n.c \ - toom33_mul.c \ - toom_eval_dgr3_pm1.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - mul_basecase.c \ - toom8_sqr.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - toom_eval_pm2.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - toom_interpolate_8pts.c \ - remove.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - -ASM_SRCS_LIST= \ - nand_n.asm mpn/arm/logops_n.asm \ - rsh1sub_n.asm mpn/arm/rsh1aors_n.asm \ - add_n.asm mpn/arm/aors_n.asm \ - rsh1add_n.asm mpn/arm/rsh1aors_n.asm \ - sublsh1_n.asm mpn/arm/aorslsh1_n.asm \ - addcnd_n.asm mpn/arm/aorscnd_n.asm \ - xor_n.asm mpn/arm/logops_n.asm \ - submul_1.asm mpn/arm/aorsmul_1.asm \ - nior_n.asm mpn/arm/logops_n.asm \ - lshift.asm mpn/arm/lshift.asm \ - and_n.asm mpn/arm/logops_n.asm \ - mul_1.asm mpn/arm/mul_1.asm \ - copyd.asm mpn/arm/copyd.asm \ - bdiv_dbm1c.asm mpn/arm/bdiv_dbm1c.asm \ - udiv.asm mpn/arm/udiv.asm \ - andn_n.asm mpn/arm/logops_n.asm \ - com.asm mpn/arm/com.asm \ - copyi.asm mpn/arm/copyi.asm \ - subcnd_n.asm mpn/arm/aorscnd_n.asm \ - rshift.asm mpn/arm/rshift.asm \ - iorn_n.asm mpn/arm/logops_n.asm \ - ior_n.asm mpn/arm/logops_n.asm \ - mod_34lsub1.asm mpn/arm/mod_34lsub1.asm \ - xnor_n.asm mpn/arm/logops_n.asm \ - lshiftc.asm mpn/arm/lshiftc.asm \ - mode1o.asm mpn/arm/mode1o.asm \ - addlsh1_n.asm mpn/arm/aorslsh1_n.asm \ - invert_limb.asm mpn/arm/invert_limb.asm \ - addmul_1.asm mpn/arm/aorsmul_1.asm \ - sub_n.asm mpn/arm/aors_n.asm \ - -GMP_LIMB_BITS=32 - -M4FLAGS= -DPIC -COPTS+= -fPIC diff --git a/external/lgpl3/gmp/lib/libgmp/arch/arm/config.h b/external/lgpl3/gmp/lib/libgmp/arch/arm/config.h deleted file mode 100644 index bc651bca0..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/arm/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/arm/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -#define HAVE_CALLING_CONVENTIONS 1 - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -/* #undef HAVE_DOUBLE_IEEE_BIG_ENDIAN */ -#define HAVE_DOUBLE_IEEE_LITTLE_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -/* #undef HAVE_LIMB_BIG_ENDIAN */ -#define HAVE_LIMB_LITTLE_ENDIAN 1 - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#define HAVE_NATIVE_mpn_add_n 1 -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -#define HAVE_NATIVE_mpn_add_nc 1 -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -#define HAVE_NATIVE_mpn_addcnd_n 1 -#define HAVE_NATIVE_mpn_addlsh1_n 1 -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -#define HAVE_NATIVE_mpn_and_n 1 -#define HAVE_NATIVE_mpn_andn_n 1 -#define HAVE_NATIVE_mpn_bdiv_dbm1c 1 -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -#define HAVE_NATIVE_mpn_com 1 -#define HAVE_NATIVE_mpn_copyd 1 -#define HAVE_NATIVE_mpn_copyi 1 -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -#define HAVE_NATIVE_mpn_invert_limb 1 -#define HAVE_NATIVE_mpn_ior_n 1 -#define HAVE_NATIVE_mpn_iorn_n 1 -#define HAVE_NATIVE_mpn_lshift 1 -#define HAVE_NATIVE_mpn_lshiftc 1 -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -#define HAVE_NATIVE_mpn_mod_34lsub1 1 -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -#define HAVE_NATIVE_mpn_modexact_1c_odd 1 -#define HAVE_NATIVE_mpn_mul_1 1 -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -#define HAVE_NATIVE_mpn_nand_n 1 -#define HAVE_NATIVE_mpn_nior_n 1 -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -#define HAVE_NATIVE_mpn_rsh1add_n 1 -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -#define HAVE_NATIVE_mpn_rsh1sub_n 1 -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -#define HAVE_NATIVE_mpn_rshift 1 -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -#define HAVE_NATIVE_mpn_sub_n 1 -#define HAVE_NATIVE_mpn_sub_nc 1 -#define HAVE_NATIVE_mpn_subcnd_n 1 -#define HAVE_NATIVE_mpn_sublsh1_n 1 -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -#define HAVE_NATIVE_mpn_udiv_qrnnd 1 -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -#define HAVE_NATIVE_mpn_xor_n 1 -#define HAVE_NATIVE_mpn_xnor_n 1 - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #undef HAVE_SPEED_CYCLECOUNTER */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 4 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/arm/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/arm/config.m4 deleted file mode 100644 index 1e0ed7ff2..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/arm/config.m4 +++ /dev/null @@ -1,35 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .section .rodata>) -define(, <.type $1,#$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(,<78>) -define(,<41>) -define(,<4>) -define(,32) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`arm/arm-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_arm') -define_not_for_expansion(`HAVE_ABI_standard') -define_not_for_expansion(`HAVE_LIMB_LITTLE_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/arm/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/arm/gmp-mparam.h deleted file mode 100644 index e6321dde8..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/arm/gmp-mparam.h +++ /dev/null @@ -1,116 +0,0 @@ -/* gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2009, 2010 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#define GMP_LIMB_BITS 32 -#define BYTES_PER_MP_LIMB 4 - -/* 1193MHz ARM (gcc55.fsffrance.org) */ - -#define DIVREM_1_NORM_THRESHOLD 0 /* preinv always */ -#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1N_TO_MOD_1_1_THRESHOLD 56 -#define MOD_1U_TO_MOD_1_1_THRESHOLD 11 -#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 /* never mpn_mod_1_1p */ -#define MOD_1_2_TO_MOD_1_4_THRESHOLD MP_SIZE_T_MAX -#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 71 -#define USE_PREINV_DIVREM_1 1 /* preinv always */ -#define DIVREM_2_THRESHOLD 0 /* preinv always */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define BMOD_1_TO_MOD_1_THRESHOLD 41 - -#define MUL_TOOM22_THRESHOLD 36 -#define MUL_TOOM33_THRESHOLD 125 -#define MUL_TOOM44_THRESHOLD 193 -#define MUL_TOOM6H_THRESHOLD 303 -#define MUL_TOOM8H_THRESHOLD 418 - -#define MUL_TOOM32_TO_TOOM43_THRESHOLD 125 -#define MUL_TOOM32_TO_TOOM53_THRESHOLD 176 -#define MUL_TOOM42_TO_TOOM53_THRESHOLD 114 -#define MUL_TOOM42_TO_TOOM63_THRESHOLD 129 - -#define SQR_BASECASE_THRESHOLD 12 -#define SQR_TOOM2_THRESHOLD 78 -#define SQR_TOOM3_THRESHOLD 137 -#define SQR_TOOM4_THRESHOLD 212 -#define SQR_TOOM6_THRESHOLD 306 -#define SQR_TOOM8_THRESHOLD 422 - -#define MULMOD_BNM1_THRESHOLD 20 -#define SQRMOD_BNM1_THRESHOLD 26 - -#define MUL_FFT_MODF_THRESHOLD 436 /* k = 5 */ -#define MUL_FFT_TABLE3 \ - { { 436, 5}, { 27, 6}, { 28, 7}, { 15, 6}, \ - { 32, 7}, { 17, 6}, { 35, 7}, { 19, 6}, \ - { 39, 7}, { 29, 8}, { 15, 7}, { 35, 8}, \ - { 19, 7}, { 41, 8}, { 23, 7}, { 49, 8}, \ - { 27, 9}, { 15, 8}, { 31, 7}, { 63, 8}, \ - { 256, 9}, { 512,10}, { 1024,11}, { 2048,12}, \ - { 4096,13}, { 8192,14}, { 16384,15}, { 32768,16} } -#define MUL_FFT_TABLE3_SIZE 28 -#define MUL_FFT_THRESHOLD 5760 - -#define SQR_FFT_MODF_THRESHOLD 404 /* k = 5 */ -#define SQR_FFT_TABLE3 \ - { { 404, 5}, { 13, 4}, { 27, 5}, { 27, 6}, \ - { 28, 7}, { 15, 6}, { 32, 7}, { 17, 6}, \ - { 35, 7}, { 29, 8}, { 15, 7}, { 35, 8}, \ - { 19, 7}, { 41, 8}, { 23, 7}, { 47, 8}, \ - { 27, 9}, { 15, 8}, { 39, 9}, { 512,10}, \ - { 1024,11}, { 2048,12}, { 4096,13}, { 8192,14}, \ - { 16384,15}, { 32768,16} } -#define SQR_FFT_TABLE3_SIZE 26 -#define SQR_FFT_THRESHOLD 3776 - -#define MULLO_BASECASE_THRESHOLD 0 /* always */ -#define MULLO_DC_THRESHOLD 137 -#define MULLO_MUL_N_THRESHOLD 11479 - -#define DC_DIV_QR_THRESHOLD 150 -#define DC_DIVAPPR_Q_THRESHOLD 494 -#define DC_BDIV_QR_THRESHOLD 148 -#define DC_BDIV_Q_THRESHOLD 345 - -#define INV_MULMOD_BNM1_THRESHOLD 70 -#define INV_NEWTON_THRESHOLD 474 -#define INV_APPR_THRESHOLD 478 - -#define BINV_NEWTON_THRESHOLD 542 -#define REDC_1_TO_REDC_N_THRESHOLD 117 - -#define MU_DIV_QR_THRESHOLD 2089 -#define MU_DIVAPPR_Q_THRESHOLD 2172 -#define MUPI_DIV_QR_THRESHOLD 225 -#define MU_BDIV_QR_THRESHOLD 1528 -#define MU_BDIV_Q_THRESHOLD 2089 - -#define MATRIX22_STRASSEN_THRESHOLD 16 -#define HGCD_THRESHOLD 197 -#define GCD_DC_THRESHOLD 902 -#define GCDEXT_DC_THRESHOLD 650 -#define JACOBI_BASE_METHOD 2 - -#define GET_STR_DC_THRESHOLD 20 -#define GET_STR_PRECOMPUTE_THRESHOLD 39 -#define SET_STR_DC_THRESHOLD 1045 -#define SET_STR_PRECOMPUTE_THRESHOLD 2147 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/arm/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/arm/gmp.h deleted file mode 100644 index b4eefaeda..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/arm/gmp.h +++ /dev/null @@ -1,2229 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 32 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || (__GNUC__ == 4 && __GNUC_MINOR__ == 2) \ - || (defined __GNUC_GNU_INLINE__ && defined __cplusplus) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#else -#define __GMP_EXTERN_INLINE extern __inline__ -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-marm -O2 -pedantic -fomit-frame-pointer" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/armeb/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/armeb/Makefile.inc deleted file mode 100644 index d1ed4ebc2..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/armeb/Makefile.inc +++ /dev/null @@ -1,195 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.6 2013/12/04 00:49:17 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom44_mul.c \ - toom8h_mul.c \ - toom2_sqr.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom54_mul.c \ - toom_interpolate_6pts.c \ - dcpi1_divappr_q.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - toom_couple_handling.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - div_q.c \ - jacbase.c \ - hgcd_matrix.c \ - mullo_n.c \ - toom33_mul.c \ - toom_eval_dgr3_pm1.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - mul_basecase.c \ - toom8_sqr.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - toom_eval_pm2.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - toom_interpolate_8pts.c \ - remove.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - -ASM_SRCS_LIST= \ - nand_n.asm mpn/arm/logops_n.asm \ - rsh1sub_n.asm mpn/arm/rsh1aors_n.asm \ - add_n.asm mpn/arm/aors_n.asm \ - rsh1add_n.asm mpn/arm/rsh1aors_n.asm \ - sublsh1_n.asm mpn/arm/aorslsh1_n.asm \ - addcnd_n.asm mpn/arm/aorscnd_n.asm \ - xor_n.asm mpn/arm/logops_n.asm \ - submul_1.asm mpn/arm/aorsmul_1.asm \ - nior_n.asm mpn/arm/logops_n.asm \ - lshift.asm mpn/arm/lshift.asm \ - and_n.asm mpn/arm/logops_n.asm \ - mul_1.asm mpn/arm/mul_1.asm \ - copyd.asm mpn/arm/copyd.asm \ - bdiv_dbm1c.asm mpn/arm/bdiv_dbm1c.asm \ - udiv.asm mpn/arm/udiv.asm \ - andn_n.asm mpn/arm/logops_n.asm \ - com.asm mpn/arm/com.asm \ - copyi.asm mpn/arm/copyi.asm \ - subcnd_n.asm mpn/arm/aorscnd_n.asm \ - rshift.asm mpn/arm/rshift.asm \ - iorn_n.asm mpn/arm/logops_n.asm \ - ior_n.asm mpn/arm/logops_n.asm \ - mod_34lsub1.asm mpn/arm/mod_34lsub1.asm \ - xnor_n.asm mpn/arm/logops_n.asm \ - lshiftc.asm mpn/arm/lshiftc.asm \ - mode1o.asm mpn/arm/mode1o.asm \ - addlsh1_n.asm mpn/arm/aorslsh1_n.asm \ - invert_limb.asm mpn/arm/invert_limb.asm \ - addmul_1.asm mpn/arm/aorsmul_1.asm \ - sub_n.asm mpn/arm/aors_n.asm \ - -GMP_LIMB_BITS=32 - -M4FLAGS= -DPIC -COPTS+= -fPIC diff --git a/external/lgpl3/gmp/lib/libgmp/arch/armeb/config.h b/external/lgpl3/gmp/lib/libgmp/arch/armeb/config.h deleted file mode 100644 index 4c86fc470..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/armeb/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/arm/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -#define HAVE_CALLING_CONVENTIONS 1 - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -/* #undef HAVE_DOUBLE_IEEE_BIG_ENDIAN */ -/* #undef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN */ -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -/* #undef HAVE_LIMB_BIG_ENDIAN */ -#define HAVE_LIMB_LITTLE_ENDIAN 1 - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#define HAVE_NATIVE_mpn_add_n 1 -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -#define HAVE_NATIVE_mpn_add_nc 1 -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -#define HAVE_NATIVE_mpn_addcnd_n 1 -#define HAVE_NATIVE_mpn_addlsh1_n 1 -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -#define HAVE_NATIVE_mpn_and_n 1 -#define HAVE_NATIVE_mpn_andn_n 1 -#define HAVE_NATIVE_mpn_bdiv_dbm1c 1 -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -#define HAVE_NATIVE_mpn_com 1 -#define HAVE_NATIVE_mpn_copyd 1 -#define HAVE_NATIVE_mpn_copyi 1 -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -#define HAVE_NATIVE_mpn_invert_limb 1 -#define HAVE_NATIVE_mpn_ior_n 1 -#define HAVE_NATIVE_mpn_iorn_n 1 -#define HAVE_NATIVE_mpn_lshift 1 -#define HAVE_NATIVE_mpn_lshiftc 1 -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -#define HAVE_NATIVE_mpn_mod_34lsub1 1 -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -#define HAVE_NATIVE_mpn_modexact_1c_odd 1 -#define HAVE_NATIVE_mpn_mul_1 1 -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -#define HAVE_NATIVE_mpn_nand_n 1 -#define HAVE_NATIVE_mpn_nior_n 1 -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -#define HAVE_NATIVE_mpn_rsh1add_n 1 -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -#define HAVE_NATIVE_mpn_rsh1sub_n 1 -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -#define HAVE_NATIVE_mpn_rshift 1 -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -#define HAVE_NATIVE_mpn_sub_n 1 -#define HAVE_NATIVE_mpn_sub_nc 1 -#define HAVE_NATIVE_mpn_subcnd_n 1 -#define HAVE_NATIVE_mpn_sublsh1_n 1 -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -#define HAVE_NATIVE_mpn_udiv_qrnnd 1 -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -#define HAVE_NATIVE_mpn_xor_n 1 -#define HAVE_NATIVE_mpn_xnor_n 1 - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #undef HAVE_SPEED_CYCLECOUNTER */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 4 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/armeb/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/armeb/config.m4 deleted file mode 100644 index 1774f0bd2..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/armeb/config.m4 +++ /dev/null @@ -1,34 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .section .rodata>) -define(, <.type $1,#$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(,<78>) -define(,<41>) -define(,<4>) -define(,32) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`arm/arm-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_armeb') -define_not_for_expansion(`HAVE_ABI_standard') -define_not_for_expansion(`HAVE_LIMB_LITTLE_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/armeb/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/armeb/gmp-mparam.h deleted file mode 100644 index e6321dde8..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/armeb/gmp-mparam.h +++ /dev/null @@ -1,116 +0,0 @@ -/* gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2009, 2010 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#define GMP_LIMB_BITS 32 -#define BYTES_PER_MP_LIMB 4 - -/* 1193MHz ARM (gcc55.fsffrance.org) */ - -#define DIVREM_1_NORM_THRESHOLD 0 /* preinv always */ -#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1N_TO_MOD_1_1_THRESHOLD 56 -#define MOD_1U_TO_MOD_1_1_THRESHOLD 11 -#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 /* never mpn_mod_1_1p */ -#define MOD_1_2_TO_MOD_1_4_THRESHOLD MP_SIZE_T_MAX -#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 71 -#define USE_PREINV_DIVREM_1 1 /* preinv always */ -#define DIVREM_2_THRESHOLD 0 /* preinv always */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define BMOD_1_TO_MOD_1_THRESHOLD 41 - -#define MUL_TOOM22_THRESHOLD 36 -#define MUL_TOOM33_THRESHOLD 125 -#define MUL_TOOM44_THRESHOLD 193 -#define MUL_TOOM6H_THRESHOLD 303 -#define MUL_TOOM8H_THRESHOLD 418 - -#define MUL_TOOM32_TO_TOOM43_THRESHOLD 125 -#define MUL_TOOM32_TO_TOOM53_THRESHOLD 176 -#define MUL_TOOM42_TO_TOOM53_THRESHOLD 114 -#define MUL_TOOM42_TO_TOOM63_THRESHOLD 129 - -#define SQR_BASECASE_THRESHOLD 12 -#define SQR_TOOM2_THRESHOLD 78 -#define SQR_TOOM3_THRESHOLD 137 -#define SQR_TOOM4_THRESHOLD 212 -#define SQR_TOOM6_THRESHOLD 306 -#define SQR_TOOM8_THRESHOLD 422 - -#define MULMOD_BNM1_THRESHOLD 20 -#define SQRMOD_BNM1_THRESHOLD 26 - -#define MUL_FFT_MODF_THRESHOLD 436 /* k = 5 */ -#define MUL_FFT_TABLE3 \ - { { 436, 5}, { 27, 6}, { 28, 7}, { 15, 6}, \ - { 32, 7}, { 17, 6}, { 35, 7}, { 19, 6}, \ - { 39, 7}, { 29, 8}, { 15, 7}, { 35, 8}, \ - { 19, 7}, { 41, 8}, { 23, 7}, { 49, 8}, \ - { 27, 9}, { 15, 8}, { 31, 7}, { 63, 8}, \ - { 256, 9}, { 512,10}, { 1024,11}, { 2048,12}, \ - { 4096,13}, { 8192,14}, { 16384,15}, { 32768,16} } -#define MUL_FFT_TABLE3_SIZE 28 -#define MUL_FFT_THRESHOLD 5760 - -#define SQR_FFT_MODF_THRESHOLD 404 /* k = 5 */ -#define SQR_FFT_TABLE3 \ - { { 404, 5}, { 13, 4}, { 27, 5}, { 27, 6}, \ - { 28, 7}, { 15, 6}, { 32, 7}, { 17, 6}, \ - { 35, 7}, { 29, 8}, { 15, 7}, { 35, 8}, \ - { 19, 7}, { 41, 8}, { 23, 7}, { 47, 8}, \ - { 27, 9}, { 15, 8}, { 39, 9}, { 512,10}, \ - { 1024,11}, { 2048,12}, { 4096,13}, { 8192,14}, \ - { 16384,15}, { 32768,16} } -#define SQR_FFT_TABLE3_SIZE 26 -#define SQR_FFT_THRESHOLD 3776 - -#define MULLO_BASECASE_THRESHOLD 0 /* always */ -#define MULLO_DC_THRESHOLD 137 -#define MULLO_MUL_N_THRESHOLD 11479 - -#define DC_DIV_QR_THRESHOLD 150 -#define DC_DIVAPPR_Q_THRESHOLD 494 -#define DC_BDIV_QR_THRESHOLD 148 -#define DC_BDIV_Q_THRESHOLD 345 - -#define INV_MULMOD_BNM1_THRESHOLD 70 -#define INV_NEWTON_THRESHOLD 474 -#define INV_APPR_THRESHOLD 478 - -#define BINV_NEWTON_THRESHOLD 542 -#define REDC_1_TO_REDC_N_THRESHOLD 117 - -#define MU_DIV_QR_THRESHOLD 2089 -#define MU_DIVAPPR_Q_THRESHOLD 2172 -#define MUPI_DIV_QR_THRESHOLD 225 -#define MU_BDIV_QR_THRESHOLD 1528 -#define MU_BDIV_Q_THRESHOLD 2089 - -#define MATRIX22_STRASSEN_THRESHOLD 16 -#define HGCD_THRESHOLD 197 -#define GCD_DC_THRESHOLD 902 -#define GCDEXT_DC_THRESHOLD 650 -#define JACOBI_BASE_METHOD 2 - -#define GET_STR_DC_THRESHOLD 20 -#define GET_STR_PRECOMPUTE_THRESHOLD 39 -#define SET_STR_DC_THRESHOLD 1045 -#define SET_STR_PRECOMPUTE_THRESHOLD 2147 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/armeb/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/armeb/gmp.h deleted file mode 100644 index 28d6602d2..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/armeb/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 32 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-marm -O2 -pedantic -fomit-frame-pointer" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/coldfire/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/coldfire/Makefile.inc deleted file mode 100644 index d55ad0262..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/coldfire/Makefile.inc +++ /dev/null @@ -1,184 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.3 2013/12/04 00:49:17 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom2_sqr.c \ - toom44_mul.c \ - toom8h_mul.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom_interpolate_6pts.c \ - toom54_mul.c \ - dcpi1_divappr_q.c \ - copyd.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - com.c \ - copyi.c \ - toom_couple_handling.c \ - lshift.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - mod_34lsub1.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - rshift.c \ - div_q.c \ - jacbase.c \ - addcnd_n.c \ - hgcd_matrix.c \ - toom_eval_dgr3_pm1.c \ - mullo_n.c \ - toom33_mul.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - bdiv_dbm1c.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - toom8_sqr.c \ - mul_basecase.c \ - addmul_1.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - mul_1.c \ - sub_n.c \ - toom_eval_pm2.c \ - add_n.c \ - subcnd_n.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - submul_1.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - mode1o.c \ - toom_interpolate_8pts.c \ - remove.c \ - lshiftc.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - -GMP_LIMB_BITS=32 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/coldfire/config.h b/external/lgpl3/gmp/lib/libgmp/arch/coldfire/config.h deleted file mode 100644 index 6247543e1..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/coldfire/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/generic/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -/* #undef HAVE_CALLING_CONVENTIONS */ - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -#define HAVE_DOUBLE_IEEE_BIG_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN */ -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -#define HAVE_LIMB_BIG_ENDIAN 1 -/* #undef HAVE_LIMB_LITTLE_ENDIAN */ - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -/* #undef HAVE_NATIVE_mpn_add_n */ -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -/* #undef HAVE_NATIVE_mpn_add_nc */ -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addcnd_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -/* #undef HAVE_NATIVE_mpn_and_n */ -/* #undef HAVE_NATIVE_mpn_andn_n */ -/* #undef HAVE_NATIVE_mpn_bdiv_dbm1c */ -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_com */ -/* #undef HAVE_NATIVE_mpn_copyd */ -/* #undef HAVE_NATIVE_mpn_copyi */ -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -/* #undef HAVE_NATIVE_mpn_invert_limb */ -/* #undef HAVE_NATIVE_mpn_ior_n */ -/* #undef HAVE_NATIVE_mpn_iorn_n */ -/* #undef HAVE_NATIVE_mpn_lshift */ -/* #undef HAVE_NATIVE_mpn_lshiftc */ -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -/* #undef HAVE_NATIVE_mpn_mod_34lsub1 */ -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -/* #undef HAVE_NATIVE_mpn_modexact_1c_odd */ -/* #undef HAVE_NATIVE_mpn_mul_1 */ -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -/* #undef HAVE_NATIVE_mpn_nand_n */ -/* #undef HAVE_NATIVE_mpn_nior_n */ -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1add_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_n */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -/* #undef HAVE_NATIVE_mpn_rshift */ -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -/* #undef HAVE_NATIVE_mpn_sub_n */ -/* #undef HAVE_NATIVE_mpn_sub_nc */ -/* #undef HAVE_NATIVE_mpn_subcnd_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -/* #undef HAVE_NATIVE_mpn_xor_n */ -/* #undef HAVE_NATIVE_mpn_xnor_n */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #undef HAVE_SPEED_CYCLECOUNTER */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -/* #undef LSYM_PREFIX */ - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 4 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/coldfire/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/coldfire/config.m4 deleted file mode 100644 index 56f7395ec..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/coldfire/config.m4 +++ /dev/null @@ -1,19 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,<4>) -define(,32) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_m5407') -define_not_for_expansion(`HAVE_ABI_standard') -define_not_for_expansion(`HAVE_LIMB_BIG_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_BIG_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/coldfire/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/coldfire/gmp-mparam.h deleted file mode 100644 index aab5fa510..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/coldfire/gmp-mparam.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Generic C gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 2000 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - - -/* Values for GMP_LIMB_BITS etc will be determined by ./configure and put - in config.h. */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/coldfire/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/coldfire/gmp.h deleted file mode 100644 index ae8d849d0..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/coldfire/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 32 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || \ - (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-O2 -pedantic" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/earm/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/earm/Makefile.inc deleted file mode 100644 index c11180eb1..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/earm/Makefile.inc +++ /dev/null @@ -1,195 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.7 2014/01/15 22:23:14 joerg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom44_mul.c \ - toom8h_mul.c \ - toom2_sqr.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom54_mul.c \ - toom_interpolate_6pts.c \ - dcpi1_divappr_q.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - toom_couple_handling.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - div_q.c \ - jacbase.c \ - hgcd_matrix.c \ - mullo_n.c \ - toom33_mul.c \ - toom_eval_dgr3_pm1.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - mul_basecase.c \ - toom8_sqr.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - toom_eval_pm2.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - toom_interpolate_8pts.c \ - remove.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - -ASM_SRCS_LIST= \ - nand_n.asm mpn/arm/logops_n.asm \ - rsh1sub_n.asm mpn/arm/rsh1aors_n.asm \ - add_n.asm mpn/arm/aors_n.asm \ - rsh1add_n.asm mpn/arm/rsh1aors_n.asm \ - sublsh1_n.asm mpn/arm/aorslsh1_n.asm \ - addcnd_n.asm mpn/arm/aorscnd_n.asm \ - xor_n.asm mpn/arm/logops_n.asm \ - submul_1.asm mpn/arm/aorsmul_1.asm \ - nior_n.asm mpn/arm/logops_n.asm \ - lshift.asm mpn/arm/lshift.asm \ - and_n.asm mpn/arm/logops_n.asm \ - mul_1.asm mpn/arm/mul_1.asm \ - copyd.asm mpn/arm/copyd.asm \ - bdiv_dbm1c.asm mpn/arm/bdiv_dbm1c.asm \ - udiv.asm mpn/arm/udiv.asm \ - andn_n.asm mpn/arm/logops_n.asm \ - com.asm mpn/arm/com.asm \ - copyi.asm mpn/arm/copyi.asm \ - subcnd_n.asm mpn/arm/aorscnd_n.asm \ - rshift.asm mpn/arm/rshift.asm \ - iorn_n.asm mpn/arm/logops_n.asm \ - ior_n.asm mpn/arm/logops_n.asm \ - mod_34lsub1.asm mpn/arm/mod_34lsub1.asm \ - xnor_n.asm mpn/arm/logops_n.asm \ - lshiftc.asm mpn/arm/lshiftc.asm \ - mode1o.asm mpn/arm/mode1o.asm \ - addlsh1_n.asm mpn/arm/aorslsh1_n.asm \ - invert_limb.asm mpn/arm/invert_limb.asm \ - addmul_1.asm mpn/arm/aorsmul_1.asm \ - sub_n.asm mpn/arm/aors_n.asm \ - -GMP_LIMB_BITS=32 - -M4FLAGS= -DPIC -COPTS+= -fPIC diff --git a/external/lgpl3/gmp/lib/libgmp/arch/earm/config.h b/external/lgpl3/gmp/lib/libgmp/arch/earm/config.h deleted file mode 100644 index bc651bca0..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/earm/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/arm/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -#define HAVE_CALLING_CONVENTIONS 1 - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -/* #undef HAVE_DOUBLE_IEEE_BIG_ENDIAN */ -#define HAVE_DOUBLE_IEEE_LITTLE_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -/* #undef HAVE_LIMB_BIG_ENDIAN */ -#define HAVE_LIMB_LITTLE_ENDIAN 1 - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#define HAVE_NATIVE_mpn_add_n 1 -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -#define HAVE_NATIVE_mpn_add_nc 1 -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -#define HAVE_NATIVE_mpn_addcnd_n 1 -#define HAVE_NATIVE_mpn_addlsh1_n 1 -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -#define HAVE_NATIVE_mpn_and_n 1 -#define HAVE_NATIVE_mpn_andn_n 1 -#define HAVE_NATIVE_mpn_bdiv_dbm1c 1 -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -#define HAVE_NATIVE_mpn_com 1 -#define HAVE_NATIVE_mpn_copyd 1 -#define HAVE_NATIVE_mpn_copyi 1 -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -#define HAVE_NATIVE_mpn_invert_limb 1 -#define HAVE_NATIVE_mpn_ior_n 1 -#define HAVE_NATIVE_mpn_iorn_n 1 -#define HAVE_NATIVE_mpn_lshift 1 -#define HAVE_NATIVE_mpn_lshiftc 1 -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -#define HAVE_NATIVE_mpn_mod_34lsub1 1 -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -#define HAVE_NATIVE_mpn_modexact_1c_odd 1 -#define HAVE_NATIVE_mpn_mul_1 1 -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -#define HAVE_NATIVE_mpn_nand_n 1 -#define HAVE_NATIVE_mpn_nior_n 1 -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -#define HAVE_NATIVE_mpn_rsh1add_n 1 -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -#define HAVE_NATIVE_mpn_rsh1sub_n 1 -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -#define HAVE_NATIVE_mpn_rshift 1 -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -#define HAVE_NATIVE_mpn_sub_n 1 -#define HAVE_NATIVE_mpn_sub_nc 1 -#define HAVE_NATIVE_mpn_subcnd_n 1 -#define HAVE_NATIVE_mpn_sublsh1_n 1 -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -#define HAVE_NATIVE_mpn_udiv_qrnnd 1 -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -#define HAVE_NATIVE_mpn_xor_n 1 -#define HAVE_NATIVE_mpn_xnor_n 1 - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #undef HAVE_SPEED_CYCLECOUNTER */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 4 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/earm/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/earm/config.m4 deleted file mode 100644 index 1e0ed7ff2..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/earm/config.m4 +++ /dev/null @@ -1,35 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .section .rodata>) -define(, <.type $1,#$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(,<78>) -define(,<41>) -define(,<4>) -define(,32) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`arm/arm-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_arm') -define_not_for_expansion(`HAVE_ABI_standard') -define_not_for_expansion(`HAVE_LIMB_LITTLE_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/earm/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/earm/gmp-mparam.h deleted file mode 100644 index e6321dde8..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/earm/gmp-mparam.h +++ /dev/null @@ -1,116 +0,0 @@ -/* gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2009, 2010 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#define GMP_LIMB_BITS 32 -#define BYTES_PER_MP_LIMB 4 - -/* 1193MHz ARM (gcc55.fsffrance.org) */ - -#define DIVREM_1_NORM_THRESHOLD 0 /* preinv always */ -#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1N_TO_MOD_1_1_THRESHOLD 56 -#define MOD_1U_TO_MOD_1_1_THRESHOLD 11 -#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 /* never mpn_mod_1_1p */ -#define MOD_1_2_TO_MOD_1_4_THRESHOLD MP_SIZE_T_MAX -#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 71 -#define USE_PREINV_DIVREM_1 1 /* preinv always */ -#define DIVREM_2_THRESHOLD 0 /* preinv always */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define BMOD_1_TO_MOD_1_THRESHOLD 41 - -#define MUL_TOOM22_THRESHOLD 36 -#define MUL_TOOM33_THRESHOLD 125 -#define MUL_TOOM44_THRESHOLD 193 -#define MUL_TOOM6H_THRESHOLD 303 -#define MUL_TOOM8H_THRESHOLD 418 - -#define MUL_TOOM32_TO_TOOM43_THRESHOLD 125 -#define MUL_TOOM32_TO_TOOM53_THRESHOLD 176 -#define MUL_TOOM42_TO_TOOM53_THRESHOLD 114 -#define MUL_TOOM42_TO_TOOM63_THRESHOLD 129 - -#define SQR_BASECASE_THRESHOLD 12 -#define SQR_TOOM2_THRESHOLD 78 -#define SQR_TOOM3_THRESHOLD 137 -#define SQR_TOOM4_THRESHOLD 212 -#define SQR_TOOM6_THRESHOLD 306 -#define SQR_TOOM8_THRESHOLD 422 - -#define MULMOD_BNM1_THRESHOLD 20 -#define SQRMOD_BNM1_THRESHOLD 26 - -#define MUL_FFT_MODF_THRESHOLD 436 /* k = 5 */ -#define MUL_FFT_TABLE3 \ - { { 436, 5}, { 27, 6}, { 28, 7}, { 15, 6}, \ - { 32, 7}, { 17, 6}, { 35, 7}, { 19, 6}, \ - { 39, 7}, { 29, 8}, { 15, 7}, { 35, 8}, \ - { 19, 7}, { 41, 8}, { 23, 7}, { 49, 8}, \ - { 27, 9}, { 15, 8}, { 31, 7}, { 63, 8}, \ - { 256, 9}, { 512,10}, { 1024,11}, { 2048,12}, \ - { 4096,13}, { 8192,14}, { 16384,15}, { 32768,16} } -#define MUL_FFT_TABLE3_SIZE 28 -#define MUL_FFT_THRESHOLD 5760 - -#define SQR_FFT_MODF_THRESHOLD 404 /* k = 5 */ -#define SQR_FFT_TABLE3 \ - { { 404, 5}, { 13, 4}, { 27, 5}, { 27, 6}, \ - { 28, 7}, { 15, 6}, { 32, 7}, { 17, 6}, \ - { 35, 7}, { 29, 8}, { 15, 7}, { 35, 8}, \ - { 19, 7}, { 41, 8}, { 23, 7}, { 47, 8}, \ - { 27, 9}, { 15, 8}, { 39, 9}, { 512,10}, \ - { 1024,11}, { 2048,12}, { 4096,13}, { 8192,14}, \ - { 16384,15}, { 32768,16} } -#define SQR_FFT_TABLE3_SIZE 26 -#define SQR_FFT_THRESHOLD 3776 - -#define MULLO_BASECASE_THRESHOLD 0 /* always */ -#define MULLO_DC_THRESHOLD 137 -#define MULLO_MUL_N_THRESHOLD 11479 - -#define DC_DIV_QR_THRESHOLD 150 -#define DC_DIVAPPR_Q_THRESHOLD 494 -#define DC_BDIV_QR_THRESHOLD 148 -#define DC_BDIV_Q_THRESHOLD 345 - -#define INV_MULMOD_BNM1_THRESHOLD 70 -#define INV_NEWTON_THRESHOLD 474 -#define INV_APPR_THRESHOLD 478 - -#define BINV_NEWTON_THRESHOLD 542 -#define REDC_1_TO_REDC_N_THRESHOLD 117 - -#define MU_DIV_QR_THRESHOLD 2089 -#define MU_DIVAPPR_Q_THRESHOLD 2172 -#define MUPI_DIV_QR_THRESHOLD 225 -#define MU_BDIV_QR_THRESHOLD 1528 -#define MU_BDIV_Q_THRESHOLD 2089 - -#define MATRIX22_STRASSEN_THRESHOLD 16 -#define HGCD_THRESHOLD 197 -#define GCD_DC_THRESHOLD 902 -#define GCDEXT_DC_THRESHOLD 650 -#define JACOBI_BASE_METHOD 2 - -#define GET_STR_DC_THRESHOLD 20 -#define GET_STR_PRECOMPUTE_THRESHOLD 39 -#define SET_STR_DC_THRESHOLD 1045 -#define SET_STR_PRECOMPUTE_THRESHOLD 2147 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/earm/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/earm/gmp.h deleted file mode 100644 index 28d6602d2..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/earm/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 32 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-marm -O2 -pedantic -fomit-frame-pointer" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/earmeb/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/earmeb/Makefile.inc deleted file mode 100644 index d29d43874..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/earmeb/Makefile.inc +++ /dev/null @@ -1,195 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.3 2013/12/04 00:49:17 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom44_mul.c \ - toom8h_mul.c \ - toom2_sqr.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom54_mul.c \ - toom_interpolate_6pts.c \ - dcpi1_divappr_q.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - toom_couple_handling.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - div_q.c \ - jacbase.c \ - hgcd_matrix.c \ - mullo_n.c \ - toom33_mul.c \ - toom_eval_dgr3_pm1.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - mul_basecase.c \ - toom8_sqr.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - toom_eval_pm2.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - toom_interpolate_8pts.c \ - remove.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - -ASM_SRCS_LIST= \ - nand_n.asm mpn/arm/logops_n.asm \ - rsh1sub_n.asm mpn/arm/rsh1aors_n.asm \ - add_n.asm mpn/arm/aors_n.asm \ - rsh1add_n.asm mpn/arm/rsh1aors_n.asm \ - sublsh1_n.asm mpn/arm/aorslsh1_n.asm \ - addcnd_n.asm mpn/arm/aorscnd_n.asm \ - xor_n.asm mpn/arm/logops_n.asm \ - submul_1.asm mpn/arm/aorsmul_1.asm \ - nior_n.asm mpn/arm/logops_n.asm \ - lshift.asm mpn/arm/lshift.asm \ - and_n.asm mpn/arm/logops_n.asm \ - mul_1.asm mpn/arm/mul_1.asm \ - copyd.asm mpn/arm/copyd.asm \ - bdiv_dbm1c.asm mpn/arm/bdiv_dbm1c.asm \ - udiv.asm mpn/arm/udiv.asm \ - andn_n.asm mpn/arm/logops_n.asm \ - com.asm mpn/arm/com.asm \ - copyi.asm mpn/arm/copyi.asm \ - subcnd_n.asm mpn/arm/aorscnd_n.asm \ - rshift.asm mpn/arm/rshift.asm \ - iorn_n.asm mpn/arm/logops_n.asm \ - ior_n.asm mpn/arm/logops_n.asm \ - mod_34lsub1.asm mpn/arm/mod_34lsub1.asm \ - xnor_n.asm mpn/arm/logops_n.asm \ - lshiftc.asm mpn/arm/lshiftc.asm \ - mode1o.asm mpn/arm/mode1o.asm \ - addlsh1_n.asm mpn/arm/aorslsh1_n.asm \ - invert_limb.asm mpn/arm/invert_limb.asm \ - addmul_1.asm mpn/arm/aorsmul_1.asm \ - sub_n.asm mpn/arm/aors_n.asm \ - -GMP_LIMB_BITS=32 - -M4FLAGS= -DPIC -COPTS+= -fPIC diff --git a/external/lgpl3/gmp/lib/libgmp/arch/earmeb/config.h b/external/lgpl3/gmp/lib/libgmp/arch/earmeb/config.h deleted file mode 100644 index 48f795e40..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/earmeb/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/arm/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -#define HAVE_CALLING_CONVENTIONS 1 - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -#define HAVE_DOUBLE_IEEE_BIG_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN */ -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -#define HAVE_LIMB_BIG_ENDIAN 1 -/* #undef HAVE_LIMB_LITTLE_ENDIAN */ - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#define HAVE_NATIVE_mpn_add_n 1 -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -#define HAVE_NATIVE_mpn_add_nc 1 -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -#define HAVE_NATIVE_mpn_addcnd_n 1 -#define HAVE_NATIVE_mpn_addlsh1_n 1 -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -#define HAVE_NATIVE_mpn_and_n 1 -#define HAVE_NATIVE_mpn_andn_n 1 -#define HAVE_NATIVE_mpn_bdiv_dbm1c 1 -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -#define HAVE_NATIVE_mpn_com 1 -#define HAVE_NATIVE_mpn_copyd 1 -#define HAVE_NATIVE_mpn_copyi 1 -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -#define HAVE_NATIVE_mpn_invert_limb 1 -#define HAVE_NATIVE_mpn_ior_n 1 -#define HAVE_NATIVE_mpn_iorn_n 1 -#define HAVE_NATIVE_mpn_lshift 1 -#define HAVE_NATIVE_mpn_lshiftc 1 -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -#define HAVE_NATIVE_mpn_mod_34lsub1 1 -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -#define HAVE_NATIVE_mpn_modexact_1c_odd 1 -#define HAVE_NATIVE_mpn_mul_1 1 -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -#define HAVE_NATIVE_mpn_nand_n 1 -#define HAVE_NATIVE_mpn_nior_n 1 -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -#define HAVE_NATIVE_mpn_rsh1add_n 1 -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -#define HAVE_NATIVE_mpn_rsh1sub_n 1 -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -#define HAVE_NATIVE_mpn_rshift 1 -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -#define HAVE_NATIVE_mpn_sub_n 1 -#define HAVE_NATIVE_mpn_sub_nc 1 -#define HAVE_NATIVE_mpn_subcnd_n 1 -#define HAVE_NATIVE_mpn_sublsh1_n 1 -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -#define HAVE_NATIVE_mpn_udiv_qrnnd 1 -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -#define HAVE_NATIVE_mpn_xor_n 1 -#define HAVE_NATIVE_mpn_xnor_n 1 - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #undef HAVE_SPEED_CYCLECOUNTER */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 4 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/earmeb/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/earmeb/config.m4 deleted file mode 100644 index b92578730..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/earmeb/config.m4 +++ /dev/null @@ -1,35 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .section .rodata>) -define(, <.type $1,#$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(,<78>) -define(,<41>) -define(,<4>) -define(,32) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`arm/arm-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_armeb') -define_not_for_expansion(`HAVE_ABI_standard') -define_not_for_expansion(`HAVE_LIMB_BIG_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_BIG_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/earmeb/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/earmeb/gmp-mparam.h deleted file mode 100644 index e6321dde8..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/earmeb/gmp-mparam.h +++ /dev/null @@ -1,116 +0,0 @@ -/* gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2009, 2010 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#define GMP_LIMB_BITS 32 -#define BYTES_PER_MP_LIMB 4 - -/* 1193MHz ARM (gcc55.fsffrance.org) */ - -#define DIVREM_1_NORM_THRESHOLD 0 /* preinv always */ -#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1N_TO_MOD_1_1_THRESHOLD 56 -#define MOD_1U_TO_MOD_1_1_THRESHOLD 11 -#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 /* never mpn_mod_1_1p */ -#define MOD_1_2_TO_MOD_1_4_THRESHOLD MP_SIZE_T_MAX -#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 71 -#define USE_PREINV_DIVREM_1 1 /* preinv always */ -#define DIVREM_2_THRESHOLD 0 /* preinv always */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define BMOD_1_TO_MOD_1_THRESHOLD 41 - -#define MUL_TOOM22_THRESHOLD 36 -#define MUL_TOOM33_THRESHOLD 125 -#define MUL_TOOM44_THRESHOLD 193 -#define MUL_TOOM6H_THRESHOLD 303 -#define MUL_TOOM8H_THRESHOLD 418 - -#define MUL_TOOM32_TO_TOOM43_THRESHOLD 125 -#define MUL_TOOM32_TO_TOOM53_THRESHOLD 176 -#define MUL_TOOM42_TO_TOOM53_THRESHOLD 114 -#define MUL_TOOM42_TO_TOOM63_THRESHOLD 129 - -#define SQR_BASECASE_THRESHOLD 12 -#define SQR_TOOM2_THRESHOLD 78 -#define SQR_TOOM3_THRESHOLD 137 -#define SQR_TOOM4_THRESHOLD 212 -#define SQR_TOOM6_THRESHOLD 306 -#define SQR_TOOM8_THRESHOLD 422 - -#define MULMOD_BNM1_THRESHOLD 20 -#define SQRMOD_BNM1_THRESHOLD 26 - -#define MUL_FFT_MODF_THRESHOLD 436 /* k = 5 */ -#define MUL_FFT_TABLE3 \ - { { 436, 5}, { 27, 6}, { 28, 7}, { 15, 6}, \ - { 32, 7}, { 17, 6}, { 35, 7}, { 19, 6}, \ - { 39, 7}, { 29, 8}, { 15, 7}, { 35, 8}, \ - { 19, 7}, { 41, 8}, { 23, 7}, { 49, 8}, \ - { 27, 9}, { 15, 8}, { 31, 7}, { 63, 8}, \ - { 256, 9}, { 512,10}, { 1024,11}, { 2048,12}, \ - { 4096,13}, { 8192,14}, { 16384,15}, { 32768,16} } -#define MUL_FFT_TABLE3_SIZE 28 -#define MUL_FFT_THRESHOLD 5760 - -#define SQR_FFT_MODF_THRESHOLD 404 /* k = 5 */ -#define SQR_FFT_TABLE3 \ - { { 404, 5}, { 13, 4}, { 27, 5}, { 27, 6}, \ - { 28, 7}, { 15, 6}, { 32, 7}, { 17, 6}, \ - { 35, 7}, { 29, 8}, { 15, 7}, { 35, 8}, \ - { 19, 7}, { 41, 8}, { 23, 7}, { 47, 8}, \ - { 27, 9}, { 15, 8}, { 39, 9}, { 512,10}, \ - { 1024,11}, { 2048,12}, { 4096,13}, { 8192,14}, \ - { 16384,15}, { 32768,16} } -#define SQR_FFT_TABLE3_SIZE 26 -#define SQR_FFT_THRESHOLD 3776 - -#define MULLO_BASECASE_THRESHOLD 0 /* always */ -#define MULLO_DC_THRESHOLD 137 -#define MULLO_MUL_N_THRESHOLD 11479 - -#define DC_DIV_QR_THRESHOLD 150 -#define DC_DIVAPPR_Q_THRESHOLD 494 -#define DC_BDIV_QR_THRESHOLD 148 -#define DC_BDIV_Q_THRESHOLD 345 - -#define INV_MULMOD_BNM1_THRESHOLD 70 -#define INV_NEWTON_THRESHOLD 474 -#define INV_APPR_THRESHOLD 478 - -#define BINV_NEWTON_THRESHOLD 542 -#define REDC_1_TO_REDC_N_THRESHOLD 117 - -#define MU_DIV_QR_THRESHOLD 2089 -#define MU_DIVAPPR_Q_THRESHOLD 2172 -#define MUPI_DIV_QR_THRESHOLD 225 -#define MU_BDIV_QR_THRESHOLD 1528 -#define MU_BDIV_Q_THRESHOLD 2089 - -#define MATRIX22_STRASSEN_THRESHOLD 16 -#define HGCD_THRESHOLD 197 -#define GCD_DC_THRESHOLD 902 -#define GCDEXT_DC_THRESHOLD 650 -#define JACOBI_BASE_METHOD 2 - -#define GET_STR_DC_THRESHOLD 20 -#define GET_STR_PRECOMPUTE_THRESHOLD 39 -#define SET_STR_DC_THRESHOLD 1045 -#define SET_STR_PRECOMPUTE_THRESHOLD 2147 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/earmeb/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/earmeb/gmp.h deleted file mode 100644 index 28d6602d2..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/earmeb/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 32 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-marm -O2 -pedantic -fomit-frame-pointer" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/earmhf/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/earmhf/Makefile.inc deleted file mode 100644 index d29d43874..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/earmhf/Makefile.inc +++ /dev/null @@ -1,195 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.3 2013/12/04 00:49:17 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom44_mul.c \ - toom8h_mul.c \ - toom2_sqr.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom54_mul.c \ - toom_interpolate_6pts.c \ - dcpi1_divappr_q.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - toom_couple_handling.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - div_q.c \ - jacbase.c \ - hgcd_matrix.c \ - mullo_n.c \ - toom33_mul.c \ - toom_eval_dgr3_pm1.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - mul_basecase.c \ - toom8_sqr.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - toom_eval_pm2.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - toom_interpolate_8pts.c \ - remove.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - -ASM_SRCS_LIST= \ - nand_n.asm mpn/arm/logops_n.asm \ - rsh1sub_n.asm mpn/arm/rsh1aors_n.asm \ - add_n.asm mpn/arm/aors_n.asm \ - rsh1add_n.asm mpn/arm/rsh1aors_n.asm \ - sublsh1_n.asm mpn/arm/aorslsh1_n.asm \ - addcnd_n.asm mpn/arm/aorscnd_n.asm \ - xor_n.asm mpn/arm/logops_n.asm \ - submul_1.asm mpn/arm/aorsmul_1.asm \ - nior_n.asm mpn/arm/logops_n.asm \ - lshift.asm mpn/arm/lshift.asm \ - and_n.asm mpn/arm/logops_n.asm \ - mul_1.asm mpn/arm/mul_1.asm \ - copyd.asm mpn/arm/copyd.asm \ - bdiv_dbm1c.asm mpn/arm/bdiv_dbm1c.asm \ - udiv.asm mpn/arm/udiv.asm \ - andn_n.asm mpn/arm/logops_n.asm \ - com.asm mpn/arm/com.asm \ - copyi.asm mpn/arm/copyi.asm \ - subcnd_n.asm mpn/arm/aorscnd_n.asm \ - rshift.asm mpn/arm/rshift.asm \ - iorn_n.asm mpn/arm/logops_n.asm \ - ior_n.asm mpn/arm/logops_n.asm \ - mod_34lsub1.asm mpn/arm/mod_34lsub1.asm \ - xnor_n.asm mpn/arm/logops_n.asm \ - lshiftc.asm mpn/arm/lshiftc.asm \ - mode1o.asm mpn/arm/mode1o.asm \ - addlsh1_n.asm mpn/arm/aorslsh1_n.asm \ - invert_limb.asm mpn/arm/invert_limb.asm \ - addmul_1.asm mpn/arm/aorsmul_1.asm \ - sub_n.asm mpn/arm/aors_n.asm \ - -GMP_LIMB_BITS=32 - -M4FLAGS= -DPIC -COPTS+= -fPIC diff --git a/external/lgpl3/gmp/lib/libgmp/arch/earmhf/config.h b/external/lgpl3/gmp/lib/libgmp/arch/earmhf/config.h deleted file mode 100644 index bc651bca0..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/earmhf/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/arm/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -#define HAVE_CALLING_CONVENTIONS 1 - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -/* #undef HAVE_DOUBLE_IEEE_BIG_ENDIAN */ -#define HAVE_DOUBLE_IEEE_LITTLE_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -/* #undef HAVE_LIMB_BIG_ENDIAN */ -#define HAVE_LIMB_LITTLE_ENDIAN 1 - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#define HAVE_NATIVE_mpn_add_n 1 -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -#define HAVE_NATIVE_mpn_add_nc 1 -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -#define HAVE_NATIVE_mpn_addcnd_n 1 -#define HAVE_NATIVE_mpn_addlsh1_n 1 -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -#define HAVE_NATIVE_mpn_and_n 1 -#define HAVE_NATIVE_mpn_andn_n 1 -#define HAVE_NATIVE_mpn_bdiv_dbm1c 1 -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -#define HAVE_NATIVE_mpn_com 1 -#define HAVE_NATIVE_mpn_copyd 1 -#define HAVE_NATIVE_mpn_copyi 1 -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -#define HAVE_NATIVE_mpn_invert_limb 1 -#define HAVE_NATIVE_mpn_ior_n 1 -#define HAVE_NATIVE_mpn_iorn_n 1 -#define HAVE_NATIVE_mpn_lshift 1 -#define HAVE_NATIVE_mpn_lshiftc 1 -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -#define HAVE_NATIVE_mpn_mod_34lsub1 1 -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -#define HAVE_NATIVE_mpn_modexact_1c_odd 1 -#define HAVE_NATIVE_mpn_mul_1 1 -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -#define HAVE_NATIVE_mpn_nand_n 1 -#define HAVE_NATIVE_mpn_nior_n 1 -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -#define HAVE_NATIVE_mpn_rsh1add_n 1 -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -#define HAVE_NATIVE_mpn_rsh1sub_n 1 -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -#define HAVE_NATIVE_mpn_rshift 1 -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -#define HAVE_NATIVE_mpn_sub_n 1 -#define HAVE_NATIVE_mpn_sub_nc 1 -#define HAVE_NATIVE_mpn_subcnd_n 1 -#define HAVE_NATIVE_mpn_sublsh1_n 1 -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -#define HAVE_NATIVE_mpn_udiv_qrnnd 1 -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -#define HAVE_NATIVE_mpn_xor_n 1 -#define HAVE_NATIVE_mpn_xnor_n 1 - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #undef HAVE_SPEED_CYCLECOUNTER */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 4 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/earmhf/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/earmhf/config.m4 deleted file mode 100644 index 1e0ed7ff2..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/earmhf/config.m4 +++ /dev/null @@ -1,35 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .section .rodata>) -define(, <.type $1,#$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(,<78>) -define(,<41>) -define(,<4>) -define(,32) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`arm/arm-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_arm') -define_not_for_expansion(`HAVE_ABI_standard') -define_not_for_expansion(`HAVE_LIMB_LITTLE_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/earmhf/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/earmhf/gmp-mparam.h deleted file mode 100644 index e6321dde8..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/earmhf/gmp-mparam.h +++ /dev/null @@ -1,116 +0,0 @@ -/* gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2009, 2010 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#define GMP_LIMB_BITS 32 -#define BYTES_PER_MP_LIMB 4 - -/* 1193MHz ARM (gcc55.fsffrance.org) */ - -#define DIVREM_1_NORM_THRESHOLD 0 /* preinv always */ -#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1N_TO_MOD_1_1_THRESHOLD 56 -#define MOD_1U_TO_MOD_1_1_THRESHOLD 11 -#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 /* never mpn_mod_1_1p */ -#define MOD_1_2_TO_MOD_1_4_THRESHOLD MP_SIZE_T_MAX -#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 71 -#define USE_PREINV_DIVREM_1 1 /* preinv always */ -#define DIVREM_2_THRESHOLD 0 /* preinv always */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define BMOD_1_TO_MOD_1_THRESHOLD 41 - -#define MUL_TOOM22_THRESHOLD 36 -#define MUL_TOOM33_THRESHOLD 125 -#define MUL_TOOM44_THRESHOLD 193 -#define MUL_TOOM6H_THRESHOLD 303 -#define MUL_TOOM8H_THRESHOLD 418 - -#define MUL_TOOM32_TO_TOOM43_THRESHOLD 125 -#define MUL_TOOM32_TO_TOOM53_THRESHOLD 176 -#define MUL_TOOM42_TO_TOOM53_THRESHOLD 114 -#define MUL_TOOM42_TO_TOOM63_THRESHOLD 129 - -#define SQR_BASECASE_THRESHOLD 12 -#define SQR_TOOM2_THRESHOLD 78 -#define SQR_TOOM3_THRESHOLD 137 -#define SQR_TOOM4_THRESHOLD 212 -#define SQR_TOOM6_THRESHOLD 306 -#define SQR_TOOM8_THRESHOLD 422 - -#define MULMOD_BNM1_THRESHOLD 20 -#define SQRMOD_BNM1_THRESHOLD 26 - -#define MUL_FFT_MODF_THRESHOLD 436 /* k = 5 */ -#define MUL_FFT_TABLE3 \ - { { 436, 5}, { 27, 6}, { 28, 7}, { 15, 6}, \ - { 32, 7}, { 17, 6}, { 35, 7}, { 19, 6}, \ - { 39, 7}, { 29, 8}, { 15, 7}, { 35, 8}, \ - { 19, 7}, { 41, 8}, { 23, 7}, { 49, 8}, \ - { 27, 9}, { 15, 8}, { 31, 7}, { 63, 8}, \ - { 256, 9}, { 512,10}, { 1024,11}, { 2048,12}, \ - { 4096,13}, { 8192,14}, { 16384,15}, { 32768,16} } -#define MUL_FFT_TABLE3_SIZE 28 -#define MUL_FFT_THRESHOLD 5760 - -#define SQR_FFT_MODF_THRESHOLD 404 /* k = 5 */ -#define SQR_FFT_TABLE3 \ - { { 404, 5}, { 13, 4}, { 27, 5}, { 27, 6}, \ - { 28, 7}, { 15, 6}, { 32, 7}, { 17, 6}, \ - { 35, 7}, { 29, 8}, { 15, 7}, { 35, 8}, \ - { 19, 7}, { 41, 8}, { 23, 7}, { 47, 8}, \ - { 27, 9}, { 15, 8}, { 39, 9}, { 512,10}, \ - { 1024,11}, { 2048,12}, { 4096,13}, { 8192,14}, \ - { 16384,15}, { 32768,16} } -#define SQR_FFT_TABLE3_SIZE 26 -#define SQR_FFT_THRESHOLD 3776 - -#define MULLO_BASECASE_THRESHOLD 0 /* always */ -#define MULLO_DC_THRESHOLD 137 -#define MULLO_MUL_N_THRESHOLD 11479 - -#define DC_DIV_QR_THRESHOLD 150 -#define DC_DIVAPPR_Q_THRESHOLD 494 -#define DC_BDIV_QR_THRESHOLD 148 -#define DC_BDIV_Q_THRESHOLD 345 - -#define INV_MULMOD_BNM1_THRESHOLD 70 -#define INV_NEWTON_THRESHOLD 474 -#define INV_APPR_THRESHOLD 478 - -#define BINV_NEWTON_THRESHOLD 542 -#define REDC_1_TO_REDC_N_THRESHOLD 117 - -#define MU_DIV_QR_THRESHOLD 2089 -#define MU_DIVAPPR_Q_THRESHOLD 2172 -#define MUPI_DIV_QR_THRESHOLD 225 -#define MU_BDIV_QR_THRESHOLD 1528 -#define MU_BDIV_Q_THRESHOLD 2089 - -#define MATRIX22_STRASSEN_THRESHOLD 16 -#define HGCD_THRESHOLD 197 -#define GCD_DC_THRESHOLD 902 -#define GCDEXT_DC_THRESHOLD 650 -#define JACOBI_BASE_METHOD 2 - -#define GET_STR_DC_THRESHOLD 20 -#define GET_STR_PRECOMPUTE_THRESHOLD 39 -#define SET_STR_DC_THRESHOLD 1045 -#define SET_STR_PRECOMPUTE_THRESHOLD 2147 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/earmhf/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/earmhf/gmp.h deleted file mode 100644 index c05a4bcf5..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/earmhf/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 32 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || \ - (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-marm -O2 -pedantic -fomit-frame-pointer" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/earmhfeb/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/earmhfeb/Makefile.inc deleted file mode 100644 index d29d43874..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/earmhfeb/Makefile.inc +++ /dev/null @@ -1,195 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.3 2013/12/04 00:49:17 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom44_mul.c \ - toom8h_mul.c \ - toom2_sqr.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom54_mul.c \ - toom_interpolate_6pts.c \ - dcpi1_divappr_q.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - toom_couple_handling.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - div_q.c \ - jacbase.c \ - hgcd_matrix.c \ - mullo_n.c \ - toom33_mul.c \ - toom_eval_dgr3_pm1.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - mul_basecase.c \ - toom8_sqr.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - toom_eval_pm2.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - toom_interpolate_8pts.c \ - remove.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - -ASM_SRCS_LIST= \ - nand_n.asm mpn/arm/logops_n.asm \ - rsh1sub_n.asm mpn/arm/rsh1aors_n.asm \ - add_n.asm mpn/arm/aors_n.asm \ - rsh1add_n.asm mpn/arm/rsh1aors_n.asm \ - sublsh1_n.asm mpn/arm/aorslsh1_n.asm \ - addcnd_n.asm mpn/arm/aorscnd_n.asm \ - xor_n.asm mpn/arm/logops_n.asm \ - submul_1.asm mpn/arm/aorsmul_1.asm \ - nior_n.asm mpn/arm/logops_n.asm \ - lshift.asm mpn/arm/lshift.asm \ - and_n.asm mpn/arm/logops_n.asm \ - mul_1.asm mpn/arm/mul_1.asm \ - copyd.asm mpn/arm/copyd.asm \ - bdiv_dbm1c.asm mpn/arm/bdiv_dbm1c.asm \ - udiv.asm mpn/arm/udiv.asm \ - andn_n.asm mpn/arm/logops_n.asm \ - com.asm mpn/arm/com.asm \ - copyi.asm mpn/arm/copyi.asm \ - subcnd_n.asm mpn/arm/aorscnd_n.asm \ - rshift.asm mpn/arm/rshift.asm \ - iorn_n.asm mpn/arm/logops_n.asm \ - ior_n.asm mpn/arm/logops_n.asm \ - mod_34lsub1.asm mpn/arm/mod_34lsub1.asm \ - xnor_n.asm mpn/arm/logops_n.asm \ - lshiftc.asm mpn/arm/lshiftc.asm \ - mode1o.asm mpn/arm/mode1o.asm \ - addlsh1_n.asm mpn/arm/aorslsh1_n.asm \ - invert_limb.asm mpn/arm/invert_limb.asm \ - addmul_1.asm mpn/arm/aorsmul_1.asm \ - sub_n.asm mpn/arm/aors_n.asm \ - -GMP_LIMB_BITS=32 - -M4FLAGS= -DPIC -COPTS+= -fPIC diff --git a/external/lgpl3/gmp/lib/libgmp/arch/earmhfeb/config.h b/external/lgpl3/gmp/lib/libgmp/arch/earmhfeb/config.h deleted file mode 100644 index 48f795e40..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/earmhfeb/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/arm/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -#define HAVE_CALLING_CONVENTIONS 1 - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -#define HAVE_DOUBLE_IEEE_BIG_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN */ -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -#define HAVE_LIMB_BIG_ENDIAN 1 -/* #undef HAVE_LIMB_LITTLE_ENDIAN */ - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#define HAVE_NATIVE_mpn_add_n 1 -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -#define HAVE_NATIVE_mpn_add_nc 1 -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -#define HAVE_NATIVE_mpn_addcnd_n 1 -#define HAVE_NATIVE_mpn_addlsh1_n 1 -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -#define HAVE_NATIVE_mpn_and_n 1 -#define HAVE_NATIVE_mpn_andn_n 1 -#define HAVE_NATIVE_mpn_bdiv_dbm1c 1 -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -#define HAVE_NATIVE_mpn_com 1 -#define HAVE_NATIVE_mpn_copyd 1 -#define HAVE_NATIVE_mpn_copyi 1 -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -#define HAVE_NATIVE_mpn_invert_limb 1 -#define HAVE_NATIVE_mpn_ior_n 1 -#define HAVE_NATIVE_mpn_iorn_n 1 -#define HAVE_NATIVE_mpn_lshift 1 -#define HAVE_NATIVE_mpn_lshiftc 1 -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -#define HAVE_NATIVE_mpn_mod_34lsub1 1 -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -#define HAVE_NATIVE_mpn_modexact_1c_odd 1 -#define HAVE_NATIVE_mpn_mul_1 1 -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -#define HAVE_NATIVE_mpn_nand_n 1 -#define HAVE_NATIVE_mpn_nior_n 1 -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -#define HAVE_NATIVE_mpn_rsh1add_n 1 -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -#define HAVE_NATIVE_mpn_rsh1sub_n 1 -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -#define HAVE_NATIVE_mpn_rshift 1 -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -#define HAVE_NATIVE_mpn_sub_n 1 -#define HAVE_NATIVE_mpn_sub_nc 1 -#define HAVE_NATIVE_mpn_subcnd_n 1 -#define HAVE_NATIVE_mpn_sublsh1_n 1 -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -#define HAVE_NATIVE_mpn_udiv_qrnnd 1 -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -#define HAVE_NATIVE_mpn_xor_n 1 -#define HAVE_NATIVE_mpn_xnor_n 1 - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #undef HAVE_SPEED_CYCLECOUNTER */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 4 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/earmhfeb/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/earmhfeb/config.m4 deleted file mode 100644 index b92578730..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/earmhfeb/config.m4 +++ /dev/null @@ -1,35 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .section .rodata>) -define(, <.type $1,#$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(,<78>) -define(,<41>) -define(,<4>) -define(,32) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`arm/arm-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_armeb') -define_not_for_expansion(`HAVE_ABI_standard') -define_not_for_expansion(`HAVE_LIMB_BIG_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_BIG_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/earmhfeb/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/earmhfeb/gmp-mparam.h deleted file mode 100644 index e6321dde8..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/earmhfeb/gmp-mparam.h +++ /dev/null @@ -1,116 +0,0 @@ -/* gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2009, 2010 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#define GMP_LIMB_BITS 32 -#define BYTES_PER_MP_LIMB 4 - -/* 1193MHz ARM (gcc55.fsffrance.org) */ - -#define DIVREM_1_NORM_THRESHOLD 0 /* preinv always */ -#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1N_TO_MOD_1_1_THRESHOLD 56 -#define MOD_1U_TO_MOD_1_1_THRESHOLD 11 -#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 /* never mpn_mod_1_1p */ -#define MOD_1_2_TO_MOD_1_4_THRESHOLD MP_SIZE_T_MAX -#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 71 -#define USE_PREINV_DIVREM_1 1 /* preinv always */ -#define DIVREM_2_THRESHOLD 0 /* preinv always */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define BMOD_1_TO_MOD_1_THRESHOLD 41 - -#define MUL_TOOM22_THRESHOLD 36 -#define MUL_TOOM33_THRESHOLD 125 -#define MUL_TOOM44_THRESHOLD 193 -#define MUL_TOOM6H_THRESHOLD 303 -#define MUL_TOOM8H_THRESHOLD 418 - -#define MUL_TOOM32_TO_TOOM43_THRESHOLD 125 -#define MUL_TOOM32_TO_TOOM53_THRESHOLD 176 -#define MUL_TOOM42_TO_TOOM53_THRESHOLD 114 -#define MUL_TOOM42_TO_TOOM63_THRESHOLD 129 - -#define SQR_BASECASE_THRESHOLD 12 -#define SQR_TOOM2_THRESHOLD 78 -#define SQR_TOOM3_THRESHOLD 137 -#define SQR_TOOM4_THRESHOLD 212 -#define SQR_TOOM6_THRESHOLD 306 -#define SQR_TOOM8_THRESHOLD 422 - -#define MULMOD_BNM1_THRESHOLD 20 -#define SQRMOD_BNM1_THRESHOLD 26 - -#define MUL_FFT_MODF_THRESHOLD 436 /* k = 5 */ -#define MUL_FFT_TABLE3 \ - { { 436, 5}, { 27, 6}, { 28, 7}, { 15, 6}, \ - { 32, 7}, { 17, 6}, { 35, 7}, { 19, 6}, \ - { 39, 7}, { 29, 8}, { 15, 7}, { 35, 8}, \ - { 19, 7}, { 41, 8}, { 23, 7}, { 49, 8}, \ - { 27, 9}, { 15, 8}, { 31, 7}, { 63, 8}, \ - { 256, 9}, { 512,10}, { 1024,11}, { 2048,12}, \ - { 4096,13}, { 8192,14}, { 16384,15}, { 32768,16} } -#define MUL_FFT_TABLE3_SIZE 28 -#define MUL_FFT_THRESHOLD 5760 - -#define SQR_FFT_MODF_THRESHOLD 404 /* k = 5 */ -#define SQR_FFT_TABLE3 \ - { { 404, 5}, { 13, 4}, { 27, 5}, { 27, 6}, \ - { 28, 7}, { 15, 6}, { 32, 7}, { 17, 6}, \ - { 35, 7}, { 29, 8}, { 15, 7}, { 35, 8}, \ - { 19, 7}, { 41, 8}, { 23, 7}, { 47, 8}, \ - { 27, 9}, { 15, 8}, { 39, 9}, { 512,10}, \ - { 1024,11}, { 2048,12}, { 4096,13}, { 8192,14}, \ - { 16384,15}, { 32768,16} } -#define SQR_FFT_TABLE3_SIZE 26 -#define SQR_FFT_THRESHOLD 3776 - -#define MULLO_BASECASE_THRESHOLD 0 /* always */ -#define MULLO_DC_THRESHOLD 137 -#define MULLO_MUL_N_THRESHOLD 11479 - -#define DC_DIV_QR_THRESHOLD 150 -#define DC_DIVAPPR_Q_THRESHOLD 494 -#define DC_BDIV_QR_THRESHOLD 148 -#define DC_BDIV_Q_THRESHOLD 345 - -#define INV_MULMOD_BNM1_THRESHOLD 70 -#define INV_NEWTON_THRESHOLD 474 -#define INV_APPR_THRESHOLD 478 - -#define BINV_NEWTON_THRESHOLD 542 -#define REDC_1_TO_REDC_N_THRESHOLD 117 - -#define MU_DIV_QR_THRESHOLD 2089 -#define MU_DIVAPPR_Q_THRESHOLD 2172 -#define MUPI_DIV_QR_THRESHOLD 225 -#define MU_BDIV_QR_THRESHOLD 1528 -#define MU_BDIV_Q_THRESHOLD 2089 - -#define MATRIX22_STRASSEN_THRESHOLD 16 -#define HGCD_THRESHOLD 197 -#define GCD_DC_THRESHOLD 902 -#define GCDEXT_DC_THRESHOLD 650 -#define JACOBI_BASE_METHOD 2 - -#define GET_STR_DC_THRESHOLD 20 -#define GET_STR_PRECOMPUTE_THRESHOLD 39 -#define SET_STR_DC_THRESHOLD 1045 -#define SET_STR_PRECOMPUTE_THRESHOLD 2147 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/earmhfeb/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/earmhfeb/gmp.h deleted file mode 100644 index c05a4bcf5..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/earmhfeb/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 32 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || \ - (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-marm -O2 -pedantic -fomit-frame-pointer" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/hppa/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/hppa/Makefile.inc deleted file mode 100644 index e91d87ebc..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/hppa/Makefile.inc +++ /dev/null @@ -1,189 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.4 2013/12/04 00:49:18 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom44_mul.c \ - toom8h_mul.c \ - toom2_sqr.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom_interpolate_6pts.c \ - toom54_mul.c \ - dcpi1_divappr_q.c \ - copyd.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - com.c \ - copyi.c \ - toom_couple_handling.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - mod_34lsub1.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - div_q.c \ - jacbase.c \ - addcnd_n.c \ - hgcd_matrix.c \ - mullo_n.c \ - toom33_mul.c \ - toom_eval_dgr3_pm1.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - bdiv_dbm1c.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - mul_basecase.c \ - toom8_sqr.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - toom_eval_pm2.c \ - subcnd_n.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - mode1o.c \ - toom_interpolate_8pts.c \ - remove.c \ - lshiftc.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - -ASM_SRCS_LIST= \ - sqr_diagonal.asm mpn/pa32/hppa1_1/sqr_diagonal.asm \ - add_n.asm mpn/pa32/hppa1_1/pa7100/add_n.asm \ - submul_1.asm mpn/pa32/hppa1_1/pa7100/submul_1.asm \ - umul.asm mpn/pa32/hppa1_1/umul.asm \ - lshift.asm mpn/pa32/hppa1_1/pa7100/lshift.asm \ - mul_1.asm mpn/pa32/hppa1_1/mul_1.asm \ - udiv.asm mpn/pa32/hppa1_1/udiv.asm \ - rshift.asm mpn/pa32/hppa1_1/pa7100/rshift.asm \ - addmul_1.asm mpn/pa32/hppa1_1/pa7100/addmul_1.asm \ - sub_n.asm mpn/pa32/hppa1_1/pa7100/sub_n.asm \ - -GMP_LIMB_BITS=32 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/hppa/config.h b/external/lgpl3/gmp/lib/libgmp/arch/hppa/config.h deleted file mode 100644 index af402e50b..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/hppa/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/pa32/hppa1_1/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -/* #undef HAVE_CALLING_CONVENTIONS */ - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -#define HAVE_DOUBLE_IEEE_BIG_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN */ -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -#define HAVE_LIMB_BIG_ENDIAN 1 -/* #undef HAVE_LIMB_LITTLE_ENDIAN */ - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#define HAVE_NATIVE_mpn_add_n 1 -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -/* #undef HAVE_NATIVE_mpn_add_nc */ -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addcnd_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -/* #undef HAVE_NATIVE_mpn_and_n */ -/* #undef HAVE_NATIVE_mpn_andn_n */ -/* #undef HAVE_NATIVE_mpn_bdiv_dbm1c */ -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_com */ -/* #undef HAVE_NATIVE_mpn_copyd */ -/* #undef HAVE_NATIVE_mpn_copyi */ -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -/* #undef HAVE_NATIVE_mpn_invert_limb */ -/* #undef HAVE_NATIVE_mpn_ior_n */ -/* #undef HAVE_NATIVE_mpn_iorn_n */ -#define HAVE_NATIVE_mpn_lshift 1 -/* #undef HAVE_NATIVE_mpn_lshiftc */ -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -/* #undef HAVE_NATIVE_mpn_mod_34lsub1 */ -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -/* #undef HAVE_NATIVE_mpn_modexact_1c_odd */ -#define HAVE_NATIVE_mpn_mul_1 1 -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -/* #undef HAVE_NATIVE_mpn_nand_n */ -/* #undef HAVE_NATIVE_mpn_nior_n */ -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1add_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_n */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -#define HAVE_NATIVE_mpn_rshift 1 -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -#define HAVE_NATIVE_mpn_sqr_diagonal 1 -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -#define HAVE_NATIVE_mpn_sub_n 1 -/* #undef HAVE_NATIVE_mpn_sub_nc */ -/* #undef HAVE_NATIVE_mpn_subcnd_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -#define HAVE_NATIVE_mpn_udiv_qrnnd 1 -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -#define HAVE_NATIVE_mpn_umul_ppmm 1 -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -/* #undef HAVE_NATIVE_mpn_xor_n */ -/* #undef HAVE_NATIVE_mpn_xnor_n */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -#define HAVE_SPEED_CYCLECOUNTER 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 4 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/hppa/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/hppa/config.m4 deleted file mode 100644 index 4a6f53ac2..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/hppa/config.m4 +++ /dev/null @@ -1,34 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.export>) -define(, <,entry>) -define(, <>) -define(, < .section .rodata>) -define(, <.type $1,@$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(,<55>) -define(,<4>) -define(,32) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`pa32/pa-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_hppa') -define_not_for_expansion(`HAVE_ABI_standard') -define_not_for_expansion(`HAVE_LIMB_BIG_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_BIG_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/hppa/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/hppa/gmp-mparam.h deleted file mode 100644 index 32b3ae9d6..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/hppa/gmp-mparam.h +++ /dev/null @@ -1,62 +0,0 @@ -/* HP-PA 1.1 gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2004 Free Software -Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#define GMP_LIMB_BITS 32 -#define BYTES_PER_MP_LIMB 4 - -/* Generated by tuneup.c, 2004-02-07, gcc 2.8 (pa7100/100MHz) */ - -#define MUL_TOOM22_THRESHOLD 30 -#define MUL_TOOM33_THRESHOLD 89 - -#define SQR_BASECASE_THRESHOLD 4 -#define SQR_TOOM2_THRESHOLD 55 -#define SQR_TOOM3_THRESHOLD 101 - -#define DIV_SB_PREINV_THRESHOLD 0 /* always */ -#define DIV_DC_THRESHOLD 84 -#define POWM_THRESHOLD 166 - -#define HGCD_THRESHOLD 231 -#define GCD_ACCEL_THRESHOLD 3 -#define GCD_DC_THRESHOLD 823 -#define JACOBI_BASE_METHOD 2 - -#define DIVREM_1_NORM_THRESHOLD 5 -#define DIVREM_1_UNNORM_THRESHOLD 11 -#define MOD_1_NORM_THRESHOLD 5 -#define MOD_1_UNNORM_THRESHOLD 10 -#define USE_PREINV_DIVREM_1 1 -#define USE_PREINV_MOD_1 1 -#define DIVREM_2_THRESHOLD 0 /* always */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always */ - -#define GET_STR_DC_THRESHOLD 13 -#define GET_STR_PRECOMPUTE_THRESHOLD 23 -#define SET_STR_THRESHOLD 6589 - -#define MUL_FFT_TABLE { 464, 928, 1920, 4608, 14336, 40960, 0 } -#define MUL_FFT_MODF_THRESHOLD 480 -#define MUL_FFT_THRESHOLD 3328 - -#define SQR_FFT_TABLE { 528, 1184, 2176, 5632, 14336, 40960, 0 } -#define SQR_FFT_MODF_THRESHOLD 520 -#define SQR_FFT_THRESHOLD 3328 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/hppa/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/hppa/gmp.h deleted file mode 100644 index 936c4e430..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/hppa/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 32 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || \ - (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-O2 -pedantic -mpa-risc-1-1" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/i386/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/i386/Makefile.inc deleted file mode 100644 index 19f6a059e..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/i386/Makefile.inc +++ /dev/null @@ -1,218 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.8 2013/12/04 00:49:18 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom44_mul.c \ - toom8h_mul.c \ - toom2_sqr.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - toom6_sqr.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom54_mul.c \ - toom_interpolate_6pts.c \ - dcpi1_divappr_q.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - com.c \ - toom_couple_handling.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - div_q.c \ - jacbase.c \ - addcnd_n.c \ - hgcd_matrix.c \ - mullo_n.c \ - toom33_mul.c \ - toom_eval_dgr3_pm1.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - sqrtrem.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - toom8_sqr.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - subcnd_n.c \ - toom_eval_pm2.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - mode1o.c \ - toom_interpolate_8pts.c \ - remove.c \ - lshiftc.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - -ASM_SRCS_LIST= \ - add_n.asm mpn/x86/aors_n.asm \ - sqr_basecase.asm mpn/x86/sqr_basecase.asm \ - bdiv_q_1.asm mpn/x86/bdiv_q_1.asm \ - submul_1.asm mpn/x86/aorsmul_1.asm \ - umul.asm mpn/x86/umul.asm \ - mul_basecase.asm mpn/x86/mul_basecase.asm \ - tabselect.asm mpn/x86/tabselect.asm \ - lshift.asm mpn/x86/lshift.asm \ - mul_1.asm mpn/x86/mul_1.asm \ - divrem_1.asm mpn/x86/divrem_1.asm \ - copyd.asm mpn/x86/copyd.asm \ - bdiv_dbm1c.asm mpn/x86/bdiv_dbm1c.asm \ - udiv.asm mpn/x86/udiv.asm \ - dive_1.asm mpn/x86/dive_1.asm \ - copyi.asm mpn/x86/copyi.asm \ - rshift.asm mpn/x86/rshift.asm \ - mod_34lsub1.asm mpn/x86/mod_34lsub1.asm \ - addmul_1.asm mpn/x86/aorsmul_1.asm \ - divrem_2.asm mpn/x86/divrem_2.asm \ - sub_n.asm mpn/x86/aors_n.asm \ - -#ASM_SRCS_LIST= \ -# submul_1.asm mpn/x86/aorsmul_1.asm \ -# bdiv_dbm1c.asm mpn/x86/bdiv_dbm1c.asm \ -# addmul_1.asm mpn/x86/aorsmul_1.asm \ -# divrem_2.asm mpn/x86/divrem_2.asm \ - -# XXX using C versions -# add_n.asm mpn/x86/aors_n.asm \ -# bdiv_q_1.asm mpn/x86_64/bdiv_q_1.asm \ -# copyd.asm mpn/x86/copyd.asm \ -# copyi.asm mpn/x86/copyi.asm \ -# dive_1.asm mpn/x86/dive_1.asm \ -# divrem_1.asm mpn/x86/divrem_1.asm \ -# invert_limb.asm mpn/x86/invert_limb.asm \ -# lshift.asm mpn/x86/lshift.asm \ -# rshift.asm mpn/x86/rshift.asm \ -# mod_34lsub1.asm mpn/x86/mod_34lsub1.asm \ -# umul.asm mpn/x86/umul.asm \ -# mul_1.asm mpn/x86/mul_1.asm \ -# sqr_basecase.asm mpn/x86/sqr_basecase.asm \ -# mul_basecase.asm mpn/x86/mul_basecase.asm \ -# sub_n.asm mpn/x86/aors_n.asm \ - -# udiv.asm mpn/x86/udiv.asm \ - -#SRCS+= add_n.c bdiv_q_1.c copyd.c copyi.c dive_1.c lshift.c rshift.c mod_34lsub1.c -#SRCS+= mul_1.c sqr_basecase.c mul_basecase.c sub_n.c divrem_1.c -# XXX? put in C_SRCS_LIST? -# divrem.c - -GMP_LIMB_BITS=32 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/i386/config.h b/external/lgpl3/gmp/lib/libgmp/arch/i386/config.h deleted file mode 100644 index d42db8898..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/i386/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/x86/i486/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -#define HAVE_CALLING_CONVENTIONS 1 - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -/* #undef HAVE_DOUBLE_IEEE_BIG_ENDIAN */ -#define HAVE_DOUBLE_IEEE_LITTLE_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -#define HAVE_HOST_CPU_FAMILY_x86 1 -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -/* #undef HAVE_LIMB_BIG_ENDIAN */ -#define HAVE_LIMB_LITTLE_ENDIAN 1 - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#define HAVE_NATIVE_mpn_add_n 1 -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -#define HAVE_NATIVE_mpn_add_nc 1 -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addcnd_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -/* #undef HAVE_NATIVE_mpn_and_n */ -/* #undef HAVE_NATIVE_mpn_andn_n */ -#define HAVE_NATIVE_mpn_bdiv_dbm1c 1 -#define HAVE_NATIVE_mpn_bdiv_q_1 1 -#define HAVE_NATIVE_mpn_pi1_bdiv_q_1 1 -/* #undef HAVE_NATIVE_mpn_com */ -#define HAVE_NATIVE_mpn_copyd 1 -#define HAVE_NATIVE_mpn_copyi 1 -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -#define HAVE_NATIVE_mpn_divexact_1 1 -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -#define HAVE_NATIVE_mpn_divrem_1 1 -#define HAVE_NATIVE_mpn_divrem_1c 1 -#define HAVE_NATIVE_mpn_divrem_2 1 -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -/* #undef HAVE_NATIVE_mpn_invert_limb */ -/* #undef HAVE_NATIVE_mpn_ior_n */ -/* #undef HAVE_NATIVE_mpn_iorn_n */ -#define HAVE_NATIVE_mpn_lshift 1 -/* #undef HAVE_NATIVE_mpn_lshiftc */ -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -#define HAVE_NATIVE_mpn_mod_34lsub1 1 -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -/* #undef HAVE_NATIVE_mpn_modexact_1c_odd */ -#define HAVE_NATIVE_mpn_mul_1 1 -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -#define HAVE_NATIVE_mpn_mul_basecase 1 -/* #undef HAVE_NATIVE_mpn_nand_n */ -/* #undef HAVE_NATIVE_mpn_nior_n */ -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1add_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_n */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -#define HAVE_NATIVE_mpn_rshift 1 -#define HAVE_NATIVE_mpn_sqr_basecase 1 -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -#define HAVE_NATIVE_mpn_sub_n 1 -#define HAVE_NATIVE_mpn_sub_nc 1 -/* #undef HAVE_NATIVE_mpn_subcnd_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -#define HAVE_NATIVE_mpn_tabselect 1 -#define HAVE_NATIVE_mpn_udiv_qrnnd 1 -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -#define HAVE_NATIVE_mpn_umul_ppmm 1 -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -/* #undef HAVE_NATIVE_mpn_xor_n */ -/* #undef HAVE_NATIVE_mpn_xnor_n */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -/* #undef HAVE_PTRDIFF_T */ - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -#define HAVE_SPEED_CYCLECOUNTER 2 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 4 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -/* #undef STDC_HEADERS */ - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -/* #undef TUNE_SQR_TOOM2_MAX */ - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/i386/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/i386/config.m4 deleted file mode 100644 index 47b843310..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/i386/config.m4 +++ /dev/null @@ -1,38 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .section .rodata>) -define(, <.type $1,@$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(,) -define(, ) -define(, <>) -define(, <1>) -define(,<49>) -define(,<4>) -define(,32) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`x86/x86-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_i486') -define_not_for_expansion(`HAVE_ABI_32') -define_not_for_expansion(`HAVE_LIMB_LITTLE_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/i386/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/i386/gmp-mparam.h deleted file mode 100644 index 30084ed67..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/i386/gmp-mparam.h +++ /dev/null @@ -1,58 +0,0 @@ -/* 80486 gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 2001, 2002, 2003 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#define GMP_LIMB_BITS 32 -#define BYTES_PER_MP_LIMB 4 - - -/* 100MHz DX4 */ - -/* Generated by tuneup.c, 2003-02-13, gcc 2.95 */ - -#define MUL_TOOM22_THRESHOLD 18 -#define MUL_TOOM33_THRESHOLD 228 - -#define SQR_BASECASE_THRESHOLD 13 -#define SQR_TOOM2_THRESHOLD 49 -#define SQR_TOOM3_THRESHOLD 238 - -#define DIV_SB_PREINV_THRESHOLD MP_SIZE_T_MAX /* never */ -#define DIV_DC_THRESHOLD 72 -#define POWM_THRESHOLD 38 - -#define GCD_ACCEL_THRESHOLD 3 -#define JACOBI_BASE_METHOD 2 - -#define USE_PREINV_DIVREM_1 0 -#define USE_PREINV_MOD_1 0 -#define DIVREM_2_THRESHOLD MP_SIZE_T_MAX /* never */ -#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ -#define MODEXACT_1_ODD_THRESHOLD 17 - -#define GET_STR_DC_THRESHOLD 32 -#define GET_STR_PRECOMPUTE_THRESHOLD 82 -#define SET_STR_THRESHOLD 3524 - -#define MUL_FFT_TABLE { 464, 928, 1920, 4608, 10240, 40960, 0 } -#define MUL_FFT_MODF_THRESHOLD 392 -#define MUL_FFT_THRESHOLD 2816 - -#define SQR_FFT_TABLE { 432, 928, 1920, 4608, 14336, 40960, 0 } -#define SQR_FFT_MODF_THRESHOLD 392 -#define SQR_FFT_THRESHOLD 2816 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/i386/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/i386/gmp.h deleted file mode 100644 index 96a82f8ad..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/i386/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 32 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || \ - (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-m32 -O2 -pedantic -fomit-frame-pointer -mtune=i486 -march=i486" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/ia64/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/ia64/Makefile.inc deleted file mode 100644 index c2b7ac06b..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/ia64/Makefile.inc +++ /dev/null @@ -1,195 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.3 2014/03/09 20:54:01 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom44_mul.c \ - toom8h_mul.c \ - toom2_sqr.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - toom6_sqr.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom54_mul.c \ - toom_interpolate_6pts.c \ - dcpi1_divappr_q.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - com.c \ - toom_couple_handling.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - div_q.c \ - jacbase.c \ - addcnd_n.c \ - hgcd_matrix.c \ - mullo_n.c \ - toom33_mul.c \ - toom_eval_dgr3_pm1.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - mul_basecase.c \ - toom8_sqr.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - subcnd_n.c \ - toom_eval_pm2.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - toom_interpolate_8pts.c \ - remove.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - -ASM_SRCS_LIST= \ - sqr_diag_addlsh1.asm mpn/ia64/sqr_diag_addlsh1.asm \ - nand_n.asm mpn/ia64/logops_n.asm \ - rsh1sub_n.asm mpn/ia64/rsh1aors_n.asm \ - add_n.asm mpn/ia64/aors_n.asm \ - rsh1add_n.asm mpn/ia64/rsh1aors_n.asm \ - sublsh1_n.asm mpn/ia64/aorslsh1_n.asm \ - xor_n.asm mpn/ia64/logops_n.asm \ - addmul_2.asm mpn/ia64/addmul_2.asm \ - submul_1.asm mpn/ia64/submul_1.asm \ - nior_n.asm mpn/ia64/logops_n.asm \ - tabselect.asm mpn/ia64/tabselect.asm \ - lshift.asm mpn/ia64/lorrshift.asm \ - and_n.asm mpn/ia64/logops_n.asm \ - hamdist.asm mpn/ia64/hamdist.asm \ - mul_1.asm mpn/ia64/mul_1.asm \ - addlsh2_n.asm mpn/ia64/aorslsh2_n.asm \ - divrem_1.asm mpn/ia64/divrem_1.asm \ - copyd.asm mpn/ia64/copyd.asm \ - bdiv_dbm1c.asm mpn/ia64/bdiv_dbm1c.asm \ - dive_1.asm mpn/ia64/dive_1.asm \ - andn_n.asm mpn/ia64/logops_n.asm \ - add_n_sub_n.asm mpn/ia64/add_n_sub_n.asm \ - copyi.asm mpn/ia64/copyi.asm \ - rshift.asm mpn/ia64/lorrshift.asm \ - iorn_n.asm mpn/ia64/logops_n.asm \ - ior_n.asm mpn/ia64/logops_n.asm \ - mod_34lsub1.asm mpn/ia64/mod_34lsub1.asm \ - popcount.asm mpn/ia64/popcount.asm \ - sublsh2_n.asm mpn/ia64/aorslsh2_n.asm \ - xnor_n.asm mpn/ia64/logops_n.asm \ - lshiftc.asm mpn/ia64/lshiftc.asm \ - mode1o.asm mpn/ia64/mode1o.asm \ - addlsh1_n.asm mpn/ia64/aorslsh1_n.asm \ - mul_2.asm mpn/ia64/mul_2.asm \ - invert_limb.asm mpn/ia64/invert_limb.asm \ - addmul_1.asm mpn/ia64/addmul_1.asm \ - divrem_2.asm mpn/ia64/divrem_2.asm \ - sub_n.asm mpn/ia64/aors_n.asm \ - gcd_1.asm mpn/ia64/gcd_1.asm \ - -GMP_LIMB_BITS=64 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/ia64/config.h b/external/lgpl3/gmp/lib/libgmp/arch/ia64/config.h deleted file mode 100644 index f18b36d95..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/ia64/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/ia64/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -/* #undef HAVE_CALLING_CONVENTIONS */ - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -/* #undef HAVE_DOUBLE_IEEE_BIG_ENDIAN */ -#define HAVE_DOUBLE_IEEE_LITTLE_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -/* #undef HAVE_LIMB_BIG_ENDIAN */ -#define HAVE_LIMB_LITTLE_ENDIAN 1 - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#define HAVE_NATIVE_mpn_add_n 1 -#define HAVE_NATIVE_mpn_add_n_sub_n 1 -#define HAVE_NATIVE_mpn_add_nc 1 -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addcnd_n */ -#define HAVE_NATIVE_mpn_addlsh1_n 1 -#define HAVE_NATIVE_mpn_addlsh2_n 1 -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -#define HAVE_NATIVE_mpn_addmul_2 1 -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -#define HAVE_NATIVE_mpn_addmul_2s 1 -#define HAVE_NATIVE_mpn_and_n 1 -#define HAVE_NATIVE_mpn_andn_n 1 -#define HAVE_NATIVE_mpn_bdiv_dbm1c 1 -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_com */ -#define HAVE_NATIVE_mpn_copyd 1 -#define HAVE_NATIVE_mpn_copyi 1 -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -#define HAVE_NATIVE_mpn_divexact_1 1 -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -#define HAVE_NATIVE_mpn_divrem_1 1 -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -#define HAVE_NATIVE_mpn_divrem_2 1 -#define HAVE_NATIVE_mpn_gcd_1 1 -#define HAVE_NATIVE_mpn_hamdist 1 -#define HAVE_NATIVE_mpn_invert_limb 1 -#define HAVE_NATIVE_mpn_ior_n 1 -#define HAVE_NATIVE_mpn_iorn_n 1 -#define HAVE_NATIVE_mpn_lshift 1 -#define HAVE_NATIVE_mpn_lshiftc 1 -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -#define HAVE_NATIVE_mpn_mod_34lsub1 1 -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -#define HAVE_NATIVE_mpn_modexact_1c_odd 1 -#define HAVE_NATIVE_mpn_mul_1 1 -#define HAVE_NATIVE_mpn_mul_1c 1 -#define HAVE_NATIVE_mpn_mul_2 1 -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -#define HAVE_NATIVE_mpn_nand_n 1 -#define HAVE_NATIVE_mpn_nior_n 1 -#define HAVE_NATIVE_mpn_popcount 1 -#define HAVE_NATIVE_mpn_preinv_divrem_1 1 -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -#define HAVE_NATIVE_mpn_rsh1add_n 1 -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -#define HAVE_NATIVE_mpn_rsh1sub_n 1 -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -#define HAVE_NATIVE_mpn_rshift 1 -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -#define HAVE_NATIVE_mpn_sqr_diag_addlsh1 1 -#define HAVE_NATIVE_mpn_sub_n 1 -#define HAVE_NATIVE_mpn_sub_nc 1 -/* #undef HAVE_NATIVE_mpn_subcnd_n */ -#define HAVE_NATIVE_mpn_sublsh1_n 1 -#define HAVE_NATIVE_mpn_sublsh2_n 1 -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -#define HAVE_NATIVE_mpn_tabselect 1 -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -#define HAVE_NATIVE_mpn_xor_n 1 -#define HAVE_NATIVE_mpn_xnor_n 1 - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -/* #undef HAVE_SIGACTION */ - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -#define HAVE_SPEED_CYCLECOUNTER 2 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 8 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 8 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 8 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/ia64/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/ia64/config.m4 deleted file mode 100644 index 4edc42db7..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/ia64/config.m4 +++ /dev/null @@ -1,35 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.global>) -define(, <>) -define(, <>) -define(, < .section .rodata>) -define(, <.type $1,@$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(, <`yes'>) -define(,<84>) -define(,<4>) -define(,64) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`ia64/ia64-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_ia64') -define_not_for_expansion(`HAVE_ABI_64') -define_not_for_expansion(`HAVE_LIMB_LITTLE_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/ia64/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/ia64/gmp-mparam.h deleted file mode 100644 index 1e0ccb97c..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/ia64/gmp-mparam.h +++ /dev/null @@ -1,189 +0,0 @@ -/* gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2010, 2011 Free Software -Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#define GMP_LIMB_BITS 64 -#define BYTES_PER_MP_LIMB 8 - -/* 900MHz Itanium2 (titanic.gmplib.org) */ - -#define MOD_1_1P_METHOD 2 -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1N_TO_MOD_1_1_THRESHOLD 3 -#define MOD_1U_TO_MOD_1_1_THRESHOLD 5 -#define MOD_1_1_TO_MOD_1_2_THRESHOLD 26 -#define MOD_1_2_TO_MOD_1_4_THRESHOLD 0 /* never mpn_mod_1s_2p */ -#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 10 -#define USE_PREINV_DIVREM_1 1 /* native */ -#define DIV_QR_2_PI2_THRESHOLD 12 -#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ -#define BMOD_1_TO_MOD_1_THRESHOLD MP_SIZE_T_MAX /* never */ - -#define MUL_TOOM22_THRESHOLD 36 -#define MUL_TOOM33_THRESHOLD 129 -#define MUL_TOOM44_THRESHOLD 214 -#define MUL_TOOM6H_THRESHOLD 318 -#define MUL_TOOM8H_THRESHOLD 430 - -#define MUL_TOOM32_TO_TOOM43_THRESHOLD 121 -#define MUL_TOOM32_TO_TOOM53_THRESHOLD 138 -#define MUL_TOOM42_TO_TOOM53_THRESHOLD 121 -#define MUL_TOOM42_TO_TOOM63_THRESHOLD 145 -#define MUL_TOOM43_TO_TOOM54_THRESHOLD 203 - -#define SQR_BASECASE_THRESHOLD 11 -#define SQR_TOOM2_THRESHOLD 84 -#define SQR_TOOM3_THRESHOLD 131 -#define SQR_TOOM4_THRESHOLD 494 -#define SQR_TOOM6_THRESHOLD 0 /* always */ -#define SQR_TOOM8_THRESHOLD 0 /* always */ - -#define MULMID_TOOM42_THRESHOLD 98 - -#define MULMOD_BNM1_THRESHOLD 21 -#define SQRMOD_BNM1_THRESHOLD 25 - -#define MUL_FFT_MODF_THRESHOLD 468 /* k = 5 */ -#define MUL_FFT_TABLE3 \ - { { 476, 5}, { 27, 6}, { 14, 5}, { 29, 6}, \ - { 33, 7}, { 17, 6}, { 37, 7}, { 19, 6}, \ - { 39, 7}, { 21, 6}, { 43, 7}, { 33, 8}, \ - { 17, 7}, { 37, 8}, { 19, 7}, { 39, 8}, \ - { 21, 7}, { 43, 8}, { 37, 9}, { 19, 8}, \ - { 43, 9}, { 23, 8}, { 51, 9}, { 27, 8}, \ - { 57, 9}, { 31, 8}, { 63, 9}, { 43,10}, \ - { 23, 9}, { 59,10}, { 31, 9}, { 71,10}, \ - { 39, 9}, { 83,10}, { 47, 9}, { 99,10}, \ - { 55,11}, { 31,10}, { 87,11}, { 47,10}, \ - { 111,12}, { 31,11}, { 63,10}, { 143,11}, \ - { 79,10}, { 167,11}, { 95,10}, { 191,11}, \ - { 111,12}, { 63,11}, { 143,10}, { 287, 9}, \ - { 575,10}, { 303,11}, { 159,10}, { 319,12}, \ - { 95,11}, { 191,10}, { 399,11}, { 207,10}, \ - { 431,13}, { 63,12}, { 127,11}, { 271,10}, \ - { 543,11}, { 287,10}, { 575,11}, { 303,12}, \ - { 159,11}, { 335,10}, { 671,11}, { 367,12}, \ - { 191,11}, { 399,10}, { 799,11}, { 431,12}, \ - { 223,11}, { 447,13}, { 127,12}, { 255,11}, \ - { 543,12}, { 287,11}, { 607,12}, { 319,11}, \ - { 671,12}, { 351,11}, { 703,13}, { 191,12}, \ - { 415,11}, { 863,12}, { 447,14}, { 127,13}, \ - { 255,12}, { 607,13}, { 319,12}, { 735,13}, \ - { 383,12}, { 799,11}, { 1599,12}, { 863,13}, \ - { 447,12}, { 927,11}, { 1855,14}, { 255,13}, \ - { 511,12}, { 1055,13}, { 575,12}, { 1215,13}, \ - { 639,12}, { 1279,13}, { 703,14}, { 383,13}, \ - { 767,12}, { 1535,13}, { 831,12}, { 1663,13}, \ - { 895,12}, { 1791,15}, { 255,14}, { 511,13}, \ - { 1087,12}, { 2175,13}, { 1215,14}, { 639,13}, \ - { 1343,12}, { 2687,13}, { 1471,14}, { 767,13}, \ - { 1599,12}, { 3199,13}, { 1663,14}, { 895,13}, \ - { 1855,15}, { 511,14}, { 1023,13}, { 2175,14}, \ - { 1151,13}, { 2431,14}, { 1279,13}, { 2687,14}, \ - { 1407,15}, { 767,14}, { 1535,13}, { 3199,14}, \ - { 1663,13}, { 3455,14}, { 1791,16}, { 65536,17}, \ - { 131072,18}, { 262144,19}, { 524288,20}, {1048576,21}, \ - {2097152,22}, {4194304,23}, {8388608,24} } -#define MUL_FFT_TABLE3_SIZE 155 -#define MUL_FFT_THRESHOLD 6272 - -#define SQR_FFT_MODF_THRESHOLD 440 /* k = 5 */ -#define SQR_FFT_TABLE3 \ - { { 436, 5}, { 14, 4}, { 29, 5}, { 31, 6}, \ - { 35, 7}, { 18, 6}, { 37, 7}, { 37, 8}, \ - { 19, 7}, { 40, 8}, { 37, 9}, { 19, 8}, \ - { 43, 9}, { 23, 8}, { 49, 9}, { 27, 8}, \ - { 57, 9}, { 43,10}, { 23, 9}, { 55,10}, \ - { 31, 9}, { 71,10}, { 39, 9}, { 83,10}, \ - { 47, 9}, { 99,10}, { 55,11}, { 31,10}, \ - { 87,11}, { 47,10}, { 111,12}, { 31,11}, \ - { 63,10}, { 135,11}, { 79,10}, { 167,11}, \ - { 95,10}, { 191,11}, { 111,12}, { 63,11}, \ - { 127,10}, { 255,11}, { 143,10}, { 287, 9}, \ - { 575,10}, { 303,11}, { 159,10}, { 319,12}, \ - { 95,11}, { 191,10}, { 399,11}, { 207,10}, \ - { 431,13}, { 63,12}, { 127,11}, { 271,10}, \ - { 543,11}, { 303,12}, { 159,11}, { 335,10}, \ - { 671,11}, { 367,10}, { 735,12}, { 191,11}, \ - { 399,10}, { 799,11}, { 431,12}, { 223,11}, \ - { 463,13}, { 127,12}, { 255,11}, { 543,12}, \ - { 287,11}, { 607,12}, { 319,11}, { 671,12}, \ - { 351,11}, { 735,13}, { 191,12}, { 383,11}, \ - { 799,12}, { 415,11}, { 863,12}, { 447,11}, \ - { 895,14}, { 127,13}, { 255,12}, { 543,11}, \ - { 1087,12}, { 607,13}, { 319,12}, { 735,13}, \ - { 383,12}, { 863,13}, { 447,12}, { 959,14}, \ - { 255,13}, { 511,12}, { 1087,13}, { 575,12}, \ - { 1183,13}, { 639,12}, { 1279,13}, { 703,12}, \ - { 1407,14}, { 383,13}, { 767,12}, { 1535,13}, \ - { 831,12}, { 1663,13}, { 895,12}, { 1791,13}, \ - { 959,15}, { 255,14}, { 511,13}, { 1087,12}, \ - { 2175,13}, { 1215,14}, { 639,13}, { 1343,12}, \ - { 2687,13}, { 1471,14}, { 767,13}, { 1663,14}, \ - { 895,13}, { 1919,15}, { 511,14}, { 1023,13}, \ - { 2175,14}, { 1151,13}, { 2431,14}, { 1279,13}, \ - { 2687,14}, { 1407,15}, { 767,14}, { 1535,13}, \ - { 3199,14}, { 1663,13}, { 3455,14}, { 1791,13}, \ - { 8192,14}, { 16384,15}, { 32768,16}, { 65536,17}, \ - { 131072,18}, { 262144,19}, { 524288,20}, {1048576,21}, \ - {2097152,22}, {4194304,23}, {8388608,24} } -#define SQR_FFT_TABLE3_SIZE 151 -#define SQR_FFT_THRESHOLD 4032 - -#define MULLO_BASECASE_THRESHOLD 0 /* always */ -#define MULLO_DC_THRESHOLD 62 -#define MULLO_MUL_N_THRESHOLD 12322 - -#define DC_DIV_QR_THRESHOLD 55 -#define DC_DIVAPPR_Q_THRESHOLD 220 -#define DC_BDIV_QR_THRESHOLD 92 -#define DC_BDIV_Q_THRESHOLD 252 - -#define INV_MULMOD_BNM1_THRESHOLD 70 -#define INV_NEWTON_THRESHOLD 156 -#define INV_APPR_THRESHOLD 154 - -#define BINV_NEWTON_THRESHOLD 248 -#define REDC_1_TO_REDC_2_THRESHOLD 0 /* always */ -#define REDC_2_TO_REDC_N_THRESHOLD 149 - -#define MU_DIV_QR_THRESHOLD 1142 -#define MU_DIVAPPR_Q_THRESHOLD 1142 -#define MUPI_DIV_QR_THRESHOLD 0 /* always */ -#define MU_BDIV_QR_THRESHOLD 1142 -#define MU_BDIV_Q_THRESHOLD 1470 - -#define POWM_SEC_TABLE 2,29,298,1897 - -#define MATRIX22_STRASSEN_THRESHOLD 19 -#define HGCD_THRESHOLD 115 -#define HGCD_APPR_THRESHOLD 181 -#define HGCD_REDUCE_THRESHOLD 3014 -#define GCD_DC_THRESHOLD 555 -#define GCDEXT_DC_THRESHOLD 368 -#define JACOBI_BASE_METHOD 4 - -#define GET_STR_DC_THRESHOLD 13 -#define GET_STR_PRECOMPUTE_THRESHOLD 21 -#define SET_STR_DC_THRESHOLD 1216 -#define SET_STR_PRECOMPUTE_THRESHOLD 3170 - -#define FAC_DSC_THRESHOLD 746 -#define FAC_ODD_THRESHOLD 0 /* always */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/ia64/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/ia64/gmp.h deleted file mode 100644 index 001cabaa0..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/ia64/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 64 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-O2 -pedantic" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/m68000/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/m68000/Makefile.inc deleted file mode 100644 index 98f7fbf78..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/m68000/Makefile.inc +++ /dev/null @@ -1,186 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.4 2013/12/04 00:49:18 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom44_mul.c \ - toom8h_mul.c \ - toom2_sqr.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom_interpolate_6pts.c \ - toom54_mul.c \ - dcpi1_divappr_q.c \ - copyd.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - com.c \ - copyi.c \ - toom_couple_handling.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - mod_34lsub1.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - div_q.c \ - jacbase.c \ - addcnd_n.c \ - hgcd_matrix.c \ - toom_eval_dgr3_pm1.c \ - mullo_n.c \ - toom33_mul.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - bdiv_dbm1c.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - mul_basecase.c \ - toom8_sqr.c \ - addmul_1.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - mul_1.c \ - toom_eval_pm2.c \ - subcnd_n.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - submul_1.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - mode1o.c \ - toom_interpolate_8pts.c \ - remove.c \ - lshiftc.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - -ASM_SRCS_LIST= \ - add_n.asm mpn/m68k/aors_n.asm \ - lshift.asm mpn/m68k/lshift.asm \ - rshift.asm mpn/m68k/rshift.asm \ - sub_n.asm mpn/m68k/aors_n.asm \ - -GMP_LIMB_BITS=32 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/m68000/config.h b/external/lgpl3/gmp/lib/libgmp/arch/m68000/config.h deleted file mode 100644 index 8beb05748..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/m68000/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/m68k/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -/* #undef HAVE_CALLING_CONVENTIONS */ - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -#define HAVE_DOUBLE_IEEE_BIG_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN */ -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -#define HAVE_HOST_CPU_FAMILY_m68k 1 -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -#define HAVE_LIMB_BIG_ENDIAN 1 -/* #undef HAVE_LIMB_LITTLE_ENDIAN */ - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#define HAVE_NATIVE_mpn_add_n 1 -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -/* #undef HAVE_NATIVE_mpn_add_nc */ -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addcnd_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -/* #undef HAVE_NATIVE_mpn_and_n */ -/* #undef HAVE_NATIVE_mpn_andn_n */ -/* #undef HAVE_NATIVE_mpn_bdiv_dbm1c */ -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_com */ -/* #undef HAVE_NATIVE_mpn_copyd */ -/* #undef HAVE_NATIVE_mpn_copyi */ -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -/* #undef HAVE_NATIVE_mpn_invert_limb */ -/* #undef HAVE_NATIVE_mpn_ior_n */ -/* #undef HAVE_NATIVE_mpn_iorn_n */ -#define HAVE_NATIVE_mpn_lshift 1 -/* #undef HAVE_NATIVE_mpn_lshiftc */ -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -/* #undef HAVE_NATIVE_mpn_mod_34lsub1 */ -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -/* #undef HAVE_NATIVE_mpn_modexact_1c_odd */ -/* #undef HAVE_NATIVE_mpn_mul_1 */ -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -/* #undef HAVE_NATIVE_mpn_nand_n */ -/* #undef HAVE_NATIVE_mpn_nior_n */ -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1add_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_n */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -#define HAVE_NATIVE_mpn_rshift 1 -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -#define HAVE_NATIVE_mpn_sub_n 1 -/* #undef HAVE_NATIVE_mpn_sub_nc */ -/* #undef HAVE_NATIVE_mpn_subcnd_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -/* #undef HAVE_NATIVE_mpn_xor_n */ -/* #undef HAVE_NATIVE_mpn_xnor_n */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #undef HAVE_SPEED_CYCLECOUNTER */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 4 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/m68000/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/m68000/config.m4 deleted file mode 100644 index e6dbb1259..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/m68000/config.m4 +++ /dev/null @@ -1,38 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .section .rodata>) -define(, <.type $1,@$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(, <`yes'>) -define(, <`no'>) -define(, <`mit'>) -define(, <`jra'>) -define(,<28>) -define(,<4>) -define(,32) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`m68k/m68k-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_m68010') -define_not_for_expansion(`HAVE_ABI_standard') -define_not_for_expansion(`HAVE_LIMB_BIG_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_BIG_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/m68000/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/m68000/gmp-mparam.h deleted file mode 100644 index 21b817ed4..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/m68000/gmp-mparam.h +++ /dev/null @@ -1,65 +0,0 @@ -/* gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - - -#define GMP_LIMB_BITS 32 -#define BYTES_PER_MP_LIMB 4 - - -/* 25MHz 68040 */ - -/* Generated by tuneup.c, 2004-02-05, gcc 3.2 */ - -#define MUL_TOOM22_THRESHOLD 14 -#define MUL_TOOM33_THRESHOLD 90 - -#define SQR_BASECASE_THRESHOLD 5 -#define SQR_TOOM2_THRESHOLD 28 -#define SQR_TOOM3_THRESHOLD 98 - -#define DIV_SB_PREINV_THRESHOLD MP_SIZE_T_MAX /* never */ -#define DIV_DC_THRESHOLD 55 -#define POWM_THRESHOLD 65 - -#define HGCD_THRESHOLD 116 -#define GCD_ACCEL_THRESHOLD 3 -#define GCD_DC_THRESHOLD 590 -#define JACOBI_BASE_METHOD 2 - -#define DIVREM_1_NORM_THRESHOLD MP_SIZE_T_MAX /* never */ -#define DIVREM_1_UNNORM_THRESHOLD MP_SIZE_T_MAX /* never */ -#define MOD_1_NORM_THRESHOLD MP_SIZE_T_MAX /* never */ -#define MOD_1_UNNORM_THRESHOLD MP_SIZE_T_MAX /* never */ -#define USE_PREINV_DIVREM_1 0 -#define USE_PREINV_MOD_1 0 -#define DIVREM_2_THRESHOLD MP_SIZE_T_MAX /* never */ -#define DIVEXACT_1_THRESHOLD MP_SIZE_T_MAX /* never */ -#define MODEXACT_1_ODD_THRESHOLD MP_SIZE_T_MAX /* never */ - -#define GET_STR_DC_THRESHOLD 18 -#define GET_STR_PRECOMPUTE_THRESHOLD 43 -#define SET_STR_THRESHOLD 937 - -#define MUL_FFT_TABLE { 336, 672, 1408, 3584, 10240, 24576, 0 } -#define MUL_FFT_MODF_THRESHOLD 296 -#define MUL_FFT_THRESHOLD 1728 - -#define SQR_FFT_TABLE { 336, 736, 1408, 3584, 10240, 24576, 0 } -#define SQR_FFT_MODF_THRESHOLD 296 -#define SQR_FFT_THRESHOLD 2304 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/m68000/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/m68000/gmp.h deleted file mode 100644 index c127862b1..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/m68000/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 32 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || \ - (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-O2 -pedantic -fomit-frame-pointer -m68000" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/m68k/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/m68k/Makefile.inc deleted file mode 100644 index 286d2b648..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/m68k/Makefile.inc +++ /dev/null @@ -1,186 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.5 2013/12/04 00:49:18 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom44_mul.c \ - toom8h_mul.c \ - toom2_sqr.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom_interpolate_6pts.c \ - toom54_mul.c \ - dcpi1_divappr_q.c \ - copyd.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - com.c \ - copyi.c \ - toom_couple_handling.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - mod_34lsub1.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - div_q.c \ - jacbase.c \ - addcnd_n.c \ - hgcd_matrix.c \ - toom_eval_dgr3_pm1.c \ - mullo_n.c \ - toom33_mul.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - bdiv_dbm1c.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - mul_basecase.c \ - toom8_sqr.c \ - addmul_1.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - mul_1.c \ - toom_eval_pm2.c \ - subcnd_n.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - submul_1.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - mode1o.c \ - toom_interpolate_8pts.c \ - remove.c \ - lshiftc.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - -ASM_SRCS_LIST= \ - add_n.asm mpn/m68k/aors_n.asm \ - lshift.asm mpn/m68k/lshift.asm \ - rshift.asm mpn/m68k/rshift.asm \ - sub_n.asm mpn/m68k/aors_n.asm \ - -GMP_LIMB_BITS=32 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/m68k/config.h b/external/lgpl3/gmp/lib/libgmp/arch/m68k/config.h deleted file mode 100644 index 8beb05748..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/m68k/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/m68k/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -/* #undef HAVE_CALLING_CONVENTIONS */ - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -#define HAVE_DOUBLE_IEEE_BIG_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN */ -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -#define HAVE_HOST_CPU_FAMILY_m68k 1 -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -#define HAVE_LIMB_BIG_ENDIAN 1 -/* #undef HAVE_LIMB_LITTLE_ENDIAN */ - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#define HAVE_NATIVE_mpn_add_n 1 -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -/* #undef HAVE_NATIVE_mpn_add_nc */ -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addcnd_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -/* #undef HAVE_NATIVE_mpn_and_n */ -/* #undef HAVE_NATIVE_mpn_andn_n */ -/* #undef HAVE_NATIVE_mpn_bdiv_dbm1c */ -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_com */ -/* #undef HAVE_NATIVE_mpn_copyd */ -/* #undef HAVE_NATIVE_mpn_copyi */ -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -/* #undef HAVE_NATIVE_mpn_invert_limb */ -/* #undef HAVE_NATIVE_mpn_ior_n */ -/* #undef HAVE_NATIVE_mpn_iorn_n */ -#define HAVE_NATIVE_mpn_lshift 1 -/* #undef HAVE_NATIVE_mpn_lshiftc */ -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -/* #undef HAVE_NATIVE_mpn_mod_34lsub1 */ -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -/* #undef HAVE_NATIVE_mpn_modexact_1c_odd */ -/* #undef HAVE_NATIVE_mpn_mul_1 */ -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -/* #undef HAVE_NATIVE_mpn_nand_n */ -/* #undef HAVE_NATIVE_mpn_nior_n */ -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1add_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_n */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -#define HAVE_NATIVE_mpn_rshift 1 -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -#define HAVE_NATIVE_mpn_sub_n 1 -/* #undef HAVE_NATIVE_mpn_sub_nc */ -/* #undef HAVE_NATIVE_mpn_subcnd_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -/* #undef HAVE_NATIVE_mpn_xor_n */ -/* #undef HAVE_NATIVE_mpn_xnor_n */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #undef HAVE_SPEED_CYCLECOUNTER */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 4 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/m68k/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/m68k/config.m4 deleted file mode 100644 index e8af8f075..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/m68k/config.m4 +++ /dev/null @@ -1,38 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .section .rodata>) -define(, <.type $1,@$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(, <`yes'>) -define(, <`no'>) -define(, <`mit'>) -define(, <`jra'>) -define(,<28>) -define(,<4>) -define(,32) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`m68k/m68k-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_m68k') -define_not_for_expansion(`HAVE_ABI_standard') -define_not_for_expansion(`HAVE_LIMB_BIG_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_BIG_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/m68k/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/m68k/gmp-mparam.h deleted file mode 100644 index 21b817ed4..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/m68k/gmp-mparam.h +++ /dev/null @@ -1,65 +0,0 @@ -/* gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - - -#define GMP_LIMB_BITS 32 -#define BYTES_PER_MP_LIMB 4 - - -/* 25MHz 68040 */ - -/* Generated by tuneup.c, 2004-02-05, gcc 3.2 */ - -#define MUL_TOOM22_THRESHOLD 14 -#define MUL_TOOM33_THRESHOLD 90 - -#define SQR_BASECASE_THRESHOLD 5 -#define SQR_TOOM2_THRESHOLD 28 -#define SQR_TOOM3_THRESHOLD 98 - -#define DIV_SB_PREINV_THRESHOLD MP_SIZE_T_MAX /* never */ -#define DIV_DC_THRESHOLD 55 -#define POWM_THRESHOLD 65 - -#define HGCD_THRESHOLD 116 -#define GCD_ACCEL_THRESHOLD 3 -#define GCD_DC_THRESHOLD 590 -#define JACOBI_BASE_METHOD 2 - -#define DIVREM_1_NORM_THRESHOLD MP_SIZE_T_MAX /* never */ -#define DIVREM_1_UNNORM_THRESHOLD MP_SIZE_T_MAX /* never */ -#define MOD_1_NORM_THRESHOLD MP_SIZE_T_MAX /* never */ -#define MOD_1_UNNORM_THRESHOLD MP_SIZE_T_MAX /* never */ -#define USE_PREINV_DIVREM_1 0 -#define USE_PREINV_MOD_1 0 -#define DIVREM_2_THRESHOLD MP_SIZE_T_MAX /* never */ -#define DIVEXACT_1_THRESHOLD MP_SIZE_T_MAX /* never */ -#define MODEXACT_1_ODD_THRESHOLD MP_SIZE_T_MAX /* never */ - -#define GET_STR_DC_THRESHOLD 18 -#define GET_STR_PRECOMPUTE_THRESHOLD 43 -#define SET_STR_THRESHOLD 937 - -#define MUL_FFT_TABLE { 336, 672, 1408, 3584, 10240, 24576, 0 } -#define MUL_FFT_MODF_THRESHOLD 296 -#define MUL_FFT_THRESHOLD 1728 - -#define SQR_FFT_TABLE { 336, 736, 1408, 3584, 10240, 24576, 0 } -#define SQR_FFT_MODF_THRESHOLD 296 -#define SQR_FFT_THRESHOLD 2304 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/m68k/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/m68k/gmp.h deleted file mode 100644 index c127862b1..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/m68k/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 32 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || \ - (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-O2 -pedantic -fomit-frame-pointer -m68000" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/mips64eb/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/mips64eb/Makefile.inc deleted file mode 100644 index b4338033d..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/mips64eb/Makefile.inc +++ /dev/null @@ -1,237 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.6 2014/05/13 18:46:48 macallan Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom44_mul.c \ - toom8h_mul.c \ - toom2_sqr.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom_interpolate_6pts.c \ - toom54_mul.c \ - dcpi1_divappr_q.c \ - copyd.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - com.c \ - copyi.c \ - toom_couple_handling.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - mod_34lsub1.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - div_q.c \ - jacbase.c \ - addcnd_n.c \ - hgcd_matrix.c \ - mullo_n.c \ - toom33_mul.c \ - toom_eval_dgr3_pm1.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - bdiv_dbm1c.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - mul_basecase.c \ - toom8_sqr.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - toom_eval_pm2.c \ - subcnd_n.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - mode1o.c \ - toom_interpolate_8pts.c \ - remove.c \ - lshiftc.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - -.if (defined(CPUFLAGS) && !empty(CPUFLAGS:M-mabi=64)) -GMP_LIMB_BITS=64 -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - -ASM_SRCS_LIST= \ - sqr_diagonal.asm mpn/mips64/sqr_diagonal.asm \ - add_n.asm mpn/mips64/add_n.asm \ - submul_1.asm mpn/mips64/submul_1.asm \ - umul.asm mpn/mips64/umul.asm \ - lshift.asm mpn/mips64/lshift.asm \ - mul_1.asm mpn/mips64/mul_1.asm \ - rshift.asm mpn/mips64/rshift.asm \ - addmul_1.asm mpn/mips64/addmul_1.asm \ - sub_n.asm mpn/mips64/sub_n.asm \ - -.else -GMP_LIMB_BITS=32 -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - addn_n.c mpn/generic/add_n.c \ - submul_1.c mpn/generic/submul_1.c \ - lshift.c mpn/generic/lshift.c \ - mul_1.c mpn/generic/mul_1.c \ - rshift.c mpn/generic/rshift.c \ - sub_n.c mpn/generic/sub_n.c \ - addmul_1.c mpn/generic/addmul_1.c \ - -ASM_SRCS_LIST= - -.endif - -COPTS+= -Wno-error - -COPTS+= -Wno-error diff --git a/external/lgpl3/gmp/lib/libgmp/arch/mips64eb/config.h b/external/lgpl3/gmp/lib/libgmp/arch/mips64eb/config.h deleted file mode 100644 index 4dad38e3f..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/mips64eb/config.h +++ /dev/null @@ -1,646 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/mips64/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -/* #undef HAVE_CALLING_CONVENTIONS */ - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -#define HAVE_DOUBLE_IEEE_BIG_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN */ -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -#define HAVE_LIMB_BIG_ENDIAN 1 -/* #undef HAVE_LIMB_LITTLE_ENDIAN */ - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#ifdef _LP64 -#define HAVE_NATIVE_mpn_add_n 1 -#endif -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -#ifdef _LP64 -#define HAVE_NATIVE_mpn_add_nc 1 -#endif -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addcnd_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -/* #undef HAVE_NATIVE_mpn_and_n */ -/* #undef HAVE_NATIVE_mpn_andn_n */ -/* #undef HAVE_NATIVE_mpn_bdiv_dbm1c */ -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_com */ -/* #undef HAVE_NATIVE_mpn_copyd */ -/* #undef HAVE_NATIVE_mpn_copyi */ -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -/* #undef HAVE_NATIVE_mpn_invert_limb */ -/* #undef HAVE_NATIVE_mpn_ior_n */ -/* #undef HAVE_NATIVE_mpn_iorn_n */ -#ifdef _LP64 -#define HAVE_NATIVE_mpn_lshift 1 -#endif -/* #undef HAVE_NATIVE_mpn_lshiftc */ -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -/* #undef HAVE_NATIVE_mpn_mod_34lsub1 */ -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -/* #undef HAVE_NATIVE_mpn_modexact_1c_odd */ -#ifdef _LP64 -#define HAVE_NATIVE_mpn_mul_1 1 -#endif -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -/* #undef HAVE_NATIVE_mpn_nand_n */ -/* #undef HAVE_NATIVE_mpn_nior_n */ -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1add_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_n */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -#ifdef _LP64 -#define HAVE_NATIVE_mpn_rshift 1 -#endif -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -#ifdef _LP64 -#define HAVE_NATIVE_mpn_sqr_diagonal 1 -#endif -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -#ifdef _LP64 -#define HAVE_NATIVE_mpn_sub_n 1 -#define HAVE_NATIVE_mpn_sub_nc 1 -#endif -/* #undef HAVE_NATIVE_mpn_subcnd_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -#ifdef _LP64 -#define HAVE_NATIVE_mpn_umul_ppmm 1 -#endif -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -/* #undef HAVE_NATIVE_mpn_xor_n */ -/* #undef HAVE_NATIVE_mpn_xnor_n */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #undef HAVE_SPEED_CYCLECOUNTER */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 8 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/mips64eb/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/mips64eb/config.m4 deleted file mode 100644 index f8559c0dd..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/mips64eb/config.m4 +++ /dev/null @@ -1,34 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .rdata>) -define(, <.type $1,@$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(,<32>) -define(,<4>) -define(,64) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`mips32/mips-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_mips64') -define_not_for_expansion(`HAVE_ABI_n32') -define_not_for_expansion(`HAVE_LIMB_BIG_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_BIG_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/mips64eb/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/mips64eb/gmp-mparam.h deleted file mode 100644 index 56fea4ef0..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/mips64eb/gmp-mparam.h +++ /dev/null @@ -1,67 +0,0 @@ -/* gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2004 Free Software -Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License -for more details. - -You should have received a copy of the GNU Lesser General Public License along -with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - - -#ifdef _ABI64 -#define GMP_LIMB_BITS 64 -#define BYTES_PER_MP_LIMB 8 -#else -#define GMP_LIMB_BITS 32 -#define BYTES_PER_MP_LIMB 4 -#endif - - -/* Generated by tuneup.c, 2004-02-10, gcc 3.2 & MIPSpro C 7.2.1 (R1x000) */ - -#define MUL_TOOM22_THRESHOLD 16 -#define MUL_TOOM33_THRESHOLD 89 - -#define SQR_BASECASE_THRESHOLD 6 -#define SQR_TOOM2_THRESHOLD 32 -#define SQR_TOOM3_THRESHOLD 98 - -#define DIV_SB_PREINV_THRESHOLD 0 /* always */ -#define DIV_DC_THRESHOLD 53 -#define POWM_THRESHOLD 61 - -#define HGCD_THRESHOLD 116 -#define GCD_ACCEL_THRESHOLD 3 -#define GCD_DC_THRESHOLD 492 -#define JACOBI_BASE_METHOD 2 - -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define USE_PREINV_DIVREM_1 1 -#define USE_PREINV_MOD_1 1 -#define DIVREM_2_THRESHOLD 0 /* always */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always */ - -#define GET_STR_DC_THRESHOLD 21 -#define GET_STR_PRECOMPUTE_THRESHOLD 26 -#define SET_STR_THRESHOLD 3962 - -#define MUL_FFT_TABLE { 368, 736, 1600, 3328, 7168, 20480, 49152, 0 } -#define MUL_FFT_MODF_THRESHOLD 264 -#define MUL_FFT_THRESHOLD 1920 - -#define SQR_FFT_TABLE { 368, 736, 1856, 3328, 7168, 20480, 49152, 0 } -#define SQR_FFT_MODF_THRESHOLD 280 -#define SQR_FFT_THRESHOLD 1920 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/mips64eb/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/mips64eb/gmp.h deleted file mode 100644 index 3cf11524d..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/mips64eb/gmp.h +++ /dev/null @@ -1,2237 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#ifdef _ABI64 -#define GMP_LIMB_BITS 64 -#else -#define GMP_LIMB_BITS 32 -#endif -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#ifdef _LP64 -#define _LONG_LONG_LIMB 1 -#endif -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || \ - (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-O2 -pedantic -mabi=n32" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/mips64el/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/mips64el/Makefile.inc deleted file mode 100644 index 7e7f2ee97..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/mips64el/Makefile.inc +++ /dev/null @@ -1,219 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.6 2014/05/13 18:46:48 macallan Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom44_mul.c \ - toom8h_mul.c \ - toom2_sqr.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom_interpolate_6pts.c \ - toom54_mul.c \ - dcpi1_divappr_q.c \ - copyd.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - com.c \ - copyi.c \ - toom_couple_handling.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - mod_34lsub1.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - div_q.c \ - jacbase.c \ - addcnd_n.c \ - hgcd_matrix.c \ - mullo_n.c \ - toom33_mul.c \ - toom_eval_dgr3_pm1.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - bdiv_dbm1c.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - mul_basecase.c \ - toom8_sqr.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - toom_eval_pm2.c \ - subcnd_n.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - mode1o.c \ - toom_interpolate_8pts.c \ - remove.c \ - lshiftc.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -.if (defined(CPUFLAGS) && !empty(CPUFLAGS:M-mabi=64)) -GMP_LIMB_BITS=64 -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - -ASM_SRCS_LIST= \ - sqr_diagonal.asm mpn/mips64/sqr_diagonal.asm \ - add_n.asm mpn/mips64/add_n.asm \ - submul_1.asm mpn/mips64/submul_1.asm \ - umul.asm mpn/mips64/umul.asm \ - lshift.asm mpn/mips64/lshift.asm \ - mul_1.asm mpn/mips64/mul_1.asm \ - rshift.asm mpn/mips64/rshift.asm \ - addmul_1.asm mpn/mips64/addmul_1.asm \ - sub_n.asm mpn/mips64/sub_n.asm \ - -.else -GMP_LIMB_BITS=32 -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - addn_n.c mpn/generic/add_n.c \ - submul_1.c mpn/generic/submul_1.c \ - lshift.c mpn/generic/lshift.c \ - mul_1.c mpn/generic/mul_1.c \ - rshift.c mpn/generic/rshift.c \ - sub_n.c mpn/generic/sub_n.c \ - addmul_1.c mpn/generic/addmul_1.c \ - -ASM_SRCS_LIST= - -.endif - -COPTS+= -Wno-error diff --git a/external/lgpl3/gmp/lib/libgmp/arch/mips64el/config.h b/external/lgpl3/gmp/lib/libgmp/arch/mips64el/config.h deleted file mode 100644 index fe1cff261..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/mips64el/config.h +++ /dev/null @@ -1,648 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/mips64/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -/* #undef HAVE_CALLING_CONVENTIONS */ - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -/* #undef HAVE_DOUBLE_IEEE_BIG_ENDIAN */ -#define HAVE_DOUBLE_IEEE_LITTLE_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -/* #undef HAVE_LIMB_BIG_ENDIAN */ -#define HAVE_LIMB_LITTLE_ENDIAN 1 - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#ifdef _LP64 -#define HAVE_NATIVE_mpn_add_n 1 -#endif -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -#ifdef _LP64 -#define HAVE_NATIVE_mpn_add_nc 1 -#endif -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addcnd_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -/* #undef HAVE_NATIVE_mpn_and_n */ -/* #undef HAVE_NATIVE_mpn_andn_n */ -/* #undef HAVE_NATIVE_mpn_bdiv_dbm1c */ -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_com */ -/* #undef HAVE_NATIVE_mpn_copyd */ -/* #undef HAVE_NATIVE_mpn_copyi */ -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -/* #undef HAVE_NATIVE_mpn_invert_limb */ -/* #undef HAVE_NATIVE_mpn_ior_n */ -/* #undef HAVE_NATIVE_mpn_iorn_n */ -#ifdef _LP64 -#define HAVE_NATIVE_mpn_lshift 1 -#endif -/* #undef HAVE_NATIVE_mpn_lshiftc */ -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -/* #undef HAVE_NATIVE_mpn_mod_34lsub1 */ -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -/* #undef HAVE_NATIVE_mpn_modexact_1c_odd */ -#ifdef _LP64 -#define HAVE_NATIVE_mpn_mul_1 1 -#endif -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -/* #undef HAVE_NATIVE_mpn_nand_n */ -/* #undef HAVE_NATIVE_mpn_nior_n */ -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1add_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_n */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -#ifdef _LP64 -#define HAVE_NATIVE_mpn_rshift 1 -#endif -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -#ifdef _LP64 -#define HAVE_NATIVE_mpn_sqr_diagonal 1 -#endif -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -#ifdef _LP64 -#define HAVE_NATIVE_mpn_sub_n 1 -#endif -#ifdef _LP64 -#define HAVE_NATIVE_mpn_sub_nc 1 -#endif -/* #undef HAVE_NATIVE_mpn_subcnd_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -#ifdef _LP64 -#define HAVE_NATIVE_mpn_umul_ppmm 1 -#endif -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -/* #undef HAVE_NATIVE_mpn_xor_n */ -/* #undef HAVE_NATIVE_mpn_xnor_n */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #undef HAVE_SPEED_CYCLECOUNTER */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 8 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/mips64el/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/mips64el/config.m4 deleted file mode 100644 index fed731dc3..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/mips64el/config.m4 +++ /dev/null @@ -1,34 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .rdata>) -define(, <.type $1,@$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(,<32>) -define(,<4>) -define(,64) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`mips32/mips-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_mips64el') -define_not_for_expansion(`HAVE_ABI_n32') -define_not_for_expansion(`HAVE_LIMB_LITTLE_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/mips64el/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/mips64el/gmp-mparam.h deleted file mode 100644 index 56fea4ef0..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/mips64el/gmp-mparam.h +++ /dev/null @@ -1,67 +0,0 @@ -/* gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2004 Free Software -Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License -for more details. - -You should have received a copy of the GNU Lesser General Public License along -with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - - -#ifdef _ABI64 -#define GMP_LIMB_BITS 64 -#define BYTES_PER_MP_LIMB 8 -#else -#define GMP_LIMB_BITS 32 -#define BYTES_PER_MP_LIMB 4 -#endif - - -/* Generated by tuneup.c, 2004-02-10, gcc 3.2 & MIPSpro C 7.2.1 (R1x000) */ - -#define MUL_TOOM22_THRESHOLD 16 -#define MUL_TOOM33_THRESHOLD 89 - -#define SQR_BASECASE_THRESHOLD 6 -#define SQR_TOOM2_THRESHOLD 32 -#define SQR_TOOM3_THRESHOLD 98 - -#define DIV_SB_PREINV_THRESHOLD 0 /* always */ -#define DIV_DC_THRESHOLD 53 -#define POWM_THRESHOLD 61 - -#define HGCD_THRESHOLD 116 -#define GCD_ACCEL_THRESHOLD 3 -#define GCD_DC_THRESHOLD 492 -#define JACOBI_BASE_METHOD 2 - -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define USE_PREINV_DIVREM_1 1 -#define USE_PREINV_MOD_1 1 -#define DIVREM_2_THRESHOLD 0 /* always */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always */ - -#define GET_STR_DC_THRESHOLD 21 -#define GET_STR_PRECOMPUTE_THRESHOLD 26 -#define SET_STR_THRESHOLD 3962 - -#define MUL_FFT_TABLE { 368, 736, 1600, 3328, 7168, 20480, 49152, 0 } -#define MUL_FFT_MODF_THRESHOLD 264 -#define MUL_FFT_THRESHOLD 1920 - -#define SQR_FFT_TABLE { 368, 736, 1856, 3328, 7168, 20480, 49152, 0 } -#define SQR_FFT_MODF_THRESHOLD 280 -#define SQR_FFT_THRESHOLD 1920 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/mips64el/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/mips64el/gmp.h deleted file mode 100644 index 0da516c8c..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/mips64el/gmp.h +++ /dev/null @@ -1,2237 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#ifdef _ABI64 -#define GMP_LIMB_BITS 64 -#else -#define GMP_LIMB_BITS 32 -#endif -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#ifdef _LP64 -#define _LONG_LONG_LIMB 1 -#endif -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-O2 -pedantic -mabi=n32" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/mipseb/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/mipseb/Makefile.inc deleted file mode 100644 index 9edb19e15..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/mipseb/Makefile.inc +++ /dev/null @@ -1,187 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.4 2013/12/04 00:49:18 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom44_mul.c \ - toom8h_mul.c \ - toom2_sqr.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom_interpolate_6pts.c \ - toom54_mul.c \ - dcpi1_divappr_q.c \ - copyd.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - com.c \ - copyi.c \ - toom_couple_handling.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - mod_34lsub1.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - div_q.c \ - jacbase.c \ - addcnd_n.c \ - hgcd_matrix.c \ - mullo_n.c \ - toom33_mul.c \ - toom_eval_dgr3_pm1.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - bdiv_dbm1c.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - mul_basecase.c \ - toom8_sqr.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - toom_eval_pm2.c \ - subcnd_n.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - mode1o.c \ - toom_interpolate_8pts.c \ - remove.c \ - lshiftc.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - -ASM_SRCS_LIST= \ - add_n.asm mpn/mips32/add_n.asm \ - submul_1.asm mpn/mips32/submul_1.asm \ - umul.asm mpn/mips32/umul.asm \ - lshift.asm mpn/mips32/lshift.asm \ - mul_1.asm mpn/mips32/mul_1.asm \ - rshift.asm mpn/mips32/rshift.asm \ - addmul_1.asm mpn/mips32/addmul_1.asm \ - sub_n.asm mpn/mips32/sub_n.asm \ - -GMP_LIMB_BITS=32 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/mipseb/config.h b/external/lgpl3/gmp/lib/libgmp/arch/mipseb/config.h deleted file mode 100644 index 6ad3c3ce6..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/mipseb/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/mips32/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -/* #undef HAVE_CALLING_CONVENTIONS */ - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -#define HAVE_DOUBLE_IEEE_BIG_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN */ -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -#define HAVE_LIMB_BIG_ENDIAN 1 -/* #undef HAVE_LIMB_LITTLE_ENDIAN */ - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#define HAVE_NATIVE_mpn_add_n 1 -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -/* #undef HAVE_NATIVE_mpn_add_nc */ -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addcnd_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -/* #undef HAVE_NATIVE_mpn_and_n */ -/* #undef HAVE_NATIVE_mpn_andn_n */ -/* #undef HAVE_NATIVE_mpn_bdiv_dbm1c */ -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_com */ -/* #undef HAVE_NATIVE_mpn_copyd */ -/* #undef HAVE_NATIVE_mpn_copyi */ -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -/* #undef HAVE_NATIVE_mpn_invert_limb */ -/* #undef HAVE_NATIVE_mpn_ior_n */ -/* #undef HAVE_NATIVE_mpn_iorn_n */ -#define HAVE_NATIVE_mpn_lshift 1 -/* #undef HAVE_NATIVE_mpn_lshiftc */ -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -/* #undef HAVE_NATIVE_mpn_mod_34lsub1 */ -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -/* #undef HAVE_NATIVE_mpn_modexact_1c_odd */ -#define HAVE_NATIVE_mpn_mul_1 1 -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -/* #undef HAVE_NATIVE_mpn_nand_n */ -/* #undef HAVE_NATIVE_mpn_nior_n */ -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1add_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_n */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -#define HAVE_NATIVE_mpn_rshift 1 -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -#define HAVE_NATIVE_mpn_sub_n 1 -/* #undef HAVE_NATIVE_mpn_sub_nc */ -/* #undef HAVE_NATIVE_mpn_subcnd_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -#define HAVE_NATIVE_mpn_umul_ppmm 1 -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -/* #undef HAVE_NATIVE_mpn_xor_n */ -/* #undef HAVE_NATIVE_mpn_xnor_n */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #undef HAVE_SPEED_CYCLECOUNTER */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 4 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/mipseb/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/mipseb/config.m4 deleted file mode 100644 index 55cebc12c..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/mipseb/config.m4 +++ /dev/null @@ -1,34 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .rdata>) -define(, <.type $1,@$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(,<57>) -define(,<4>) -define(,32) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`mips32/mips-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_mipseb') -define_not_for_expansion(`HAVE_ABI_o32') -define_not_for_expansion(`HAVE_LIMB_BIG_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_BIG_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/mipseb/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/mipseb/gmp-mparam.h deleted file mode 100644 index a8f27326c..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/mipseb/gmp-mparam.h +++ /dev/null @@ -1,62 +0,0 @@ -/* gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002 Free Software Foundation, -Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License -for more details. - -You should have received a copy of the GNU Lesser General Public License along -with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - - -#define GMP_LIMB_BITS 32 -#define BYTES_PER_MP_LIMB 4 - - -/* Generated by tuneup.c, 2002-02-20, gcc 2.95 (R3000) */ - -#define MUL_TOOM22_THRESHOLD 20 -#define MUL_TOOM33_THRESHOLD 50 - -#define SQR_BASECASE_THRESHOLD 7 -#define SQR_TOOM2_THRESHOLD 57 -#define SQR_TOOM3_THRESHOLD 78 - -#define DIV_SB_PREINV_THRESHOLD 0 /* always */ -#define DIV_DC_THRESHOLD 57 -#define POWM_THRESHOLD 78 - -#define GCD_ACCEL_THRESHOLD 3 -#define JACOBI_BASE_METHOD 2 - -#define DIVREM_1_NORM_THRESHOLD 0 /* always */ -#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define USE_PREINV_DIVREM_1 1 -#define USE_PREINV_MOD_1 1 -#define DIVREM_2_THRESHOLD 0 /* always */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always */ - -#define GET_STR_DC_THRESHOLD 19 -#define GET_STR_PRECOMPUTE_THRESHOLD 25 -#define SET_STR_THRESHOLD 309 - -#define MUL_FFT_TABLE { 496, 1056, 2176, 5632, 14336, 40960, 0 } -#define MUL_FFT_MODF_THRESHOLD 624 -#define MUL_FFT_THRESHOLD 5888 - -#define SQR_FFT_TABLE { 496, 1184, 2176, 5632, 14336, 40960, 0 } -#define SQR_FFT_MODF_THRESHOLD 560 -#define SQR_FFT_THRESHOLD 5376 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/mipseb/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/mipseb/gmp.h deleted file mode 100644 index 53cc2a107..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/mipseb/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 32 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || \ - (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-O2 -pedantic -mabi=32" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/mipsel/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/mipsel/Makefile.inc deleted file mode 100644 index 9edb19e15..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/mipsel/Makefile.inc +++ /dev/null @@ -1,187 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.4 2013/12/04 00:49:18 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom44_mul.c \ - toom8h_mul.c \ - toom2_sqr.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom_interpolate_6pts.c \ - toom54_mul.c \ - dcpi1_divappr_q.c \ - copyd.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - com.c \ - copyi.c \ - toom_couple_handling.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - mod_34lsub1.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - div_q.c \ - jacbase.c \ - addcnd_n.c \ - hgcd_matrix.c \ - mullo_n.c \ - toom33_mul.c \ - toom_eval_dgr3_pm1.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - bdiv_dbm1c.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - mul_basecase.c \ - toom8_sqr.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - toom_eval_pm2.c \ - subcnd_n.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - mode1o.c \ - toom_interpolate_8pts.c \ - remove.c \ - lshiftc.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - -ASM_SRCS_LIST= \ - add_n.asm mpn/mips32/add_n.asm \ - submul_1.asm mpn/mips32/submul_1.asm \ - umul.asm mpn/mips32/umul.asm \ - lshift.asm mpn/mips32/lshift.asm \ - mul_1.asm mpn/mips32/mul_1.asm \ - rshift.asm mpn/mips32/rshift.asm \ - addmul_1.asm mpn/mips32/addmul_1.asm \ - sub_n.asm mpn/mips32/sub_n.asm \ - -GMP_LIMB_BITS=32 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/mipsel/config.h b/external/lgpl3/gmp/lib/libgmp/arch/mipsel/config.h deleted file mode 100644 index 7f1de660a..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/mipsel/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/mips32/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -/* #undef HAVE_CALLING_CONVENTIONS */ - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -/* #undef HAVE_DOUBLE_IEEE_BIG_ENDIAN */ -#define HAVE_DOUBLE_IEEE_LITTLE_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -/* #undef HAVE_LIMB_BIG_ENDIAN */ -#define HAVE_LIMB_LITTLE_ENDIAN 1 - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#define HAVE_NATIVE_mpn_add_n 1 -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -/* #undef HAVE_NATIVE_mpn_add_nc */ -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addcnd_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -/* #undef HAVE_NATIVE_mpn_and_n */ -/* #undef HAVE_NATIVE_mpn_andn_n */ -/* #undef HAVE_NATIVE_mpn_bdiv_dbm1c */ -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_com */ -/* #undef HAVE_NATIVE_mpn_copyd */ -/* #undef HAVE_NATIVE_mpn_copyi */ -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -/* #undef HAVE_NATIVE_mpn_invert_limb */ -/* #undef HAVE_NATIVE_mpn_ior_n */ -/* #undef HAVE_NATIVE_mpn_iorn_n */ -#define HAVE_NATIVE_mpn_lshift 1 -/* #undef HAVE_NATIVE_mpn_lshiftc */ -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -/* #undef HAVE_NATIVE_mpn_mod_34lsub1 */ -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -/* #undef HAVE_NATIVE_mpn_modexact_1c_odd */ -#define HAVE_NATIVE_mpn_mul_1 1 -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -/* #undef HAVE_NATIVE_mpn_nand_n */ -/* #undef HAVE_NATIVE_mpn_nior_n */ -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1add_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_n */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -#define HAVE_NATIVE_mpn_rshift 1 -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -#define HAVE_NATIVE_mpn_sub_n 1 -/* #undef HAVE_NATIVE_mpn_sub_nc */ -/* #undef HAVE_NATIVE_mpn_subcnd_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -#define HAVE_NATIVE_mpn_umul_ppmm 1 -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -/* #undef HAVE_NATIVE_mpn_xor_n */ -/* #undef HAVE_NATIVE_mpn_xnor_n */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #undef HAVE_SPEED_CYCLECOUNTER */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 4 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/mipsel/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/mipsel/config.m4 deleted file mode 100644 index 262b56e5a..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/mipsel/config.m4 +++ /dev/null @@ -1,34 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .rdata>) -define(, <.type $1,@$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(,<57>) -define(,<4>) -define(,32) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`mips32/mips-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_mipsel') -define_not_for_expansion(`HAVE_ABI_o32') -define_not_for_expansion(`HAVE_LIMB_LITTLE_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/mipsel/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/mipsel/gmp-mparam.h deleted file mode 100644 index a8f27326c..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/mipsel/gmp-mparam.h +++ /dev/null @@ -1,62 +0,0 @@ -/* gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002 Free Software Foundation, -Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License -for more details. - -You should have received a copy of the GNU Lesser General Public License along -with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - - -#define GMP_LIMB_BITS 32 -#define BYTES_PER_MP_LIMB 4 - - -/* Generated by tuneup.c, 2002-02-20, gcc 2.95 (R3000) */ - -#define MUL_TOOM22_THRESHOLD 20 -#define MUL_TOOM33_THRESHOLD 50 - -#define SQR_BASECASE_THRESHOLD 7 -#define SQR_TOOM2_THRESHOLD 57 -#define SQR_TOOM3_THRESHOLD 78 - -#define DIV_SB_PREINV_THRESHOLD 0 /* always */ -#define DIV_DC_THRESHOLD 57 -#define POWM_THRESHOLD 78 - -#define GCD_ACCEL_THRESHOLD 3 -#define JACOBI_BASE_METHOD 2 - -#define DIVREM_1_NORM_THRESHOLD 0 /* always */ -#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define USE_PREINV_DIVREM_1 1 -#define USE_PREINV_MOD_1 1 -#define DIVREM_2_THRESHOLD 0 /* always */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always */ - -#define GET_STR_DC_THRESHOLD 19 -#define GET_STR_PRECOMPUTE_THRESHOLD 25 -#define SET_STR_THRESHOLD 309 - -#define MUL_FFT_TABLE { 496, 1056, 2176, 5632, 14336, 40960, 0 } -#define MUL_FFT_MODF_THRESHOLD 624 -#define MUL_FFT_THRESHOLD 5888 - -#define SQR_FFT_TABLE { 496, 1184, 2176, 5632, 14336, 40960, 0 } -#define SQR_FFT_MODF_THRESHOLD 560 -#define SQR_FFT_THRESHOLD 5376 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/mipsel/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/mipsel/gmp.h deleted file mode 100644 index 53cc2a107..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/mipsel/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 32 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || \ - (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-O2 -pedantic -mabi=32" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/or1k/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/or1k/Makefile.inc deleted file mode 100644 index 28e1e5246..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/or1k/Makefile.inc +++ /dev/null @@ -1,184 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.1 2014/09/03 19:11:24 matt Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom2_sqr.c \ - toom44_mul.c \ - toom8h_mul.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom_interpolate_6pts.c \ - toom54_mul.c \ - dcpi1_divappr_q.c \ - copyd.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - com.c \ - copyi.c \ - toom_couple_handling.c \ - lshift.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - mod_34lsub1.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - rshift.c \ - div_q.c \ - jacbase.c \ - addcnd_n.c \ - hgcd_matrix.c \ - toom_eval_dgr3_pm1.c \ - mullo_n.c \ - toom33_mul.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - bdiv_dbm1c.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - toom8_sqr.c \ - mul_basecase.c \ - addmul_1.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - mul_1.c \ - sub_n.c \ - toom_eval_pm2.c \ - add_n.c \ - subcnd_n.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - submul_1.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - mode1o.c \ - toom_interpolate_8pts.c \ - remove.c \ - lshiftc.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - -GMP_LIMB_BITS=32 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/or1k/config.h b/external/lgpl3/gmp/lib/libgmp/arch/or1k/config.h deleted file mode 100644 index 6247543e1..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/or1k/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/generic/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -/* #undef HAVE_CALLING_CONVENTIONS */ - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -#define HAVE_DOUBLE_IEEE_BIG_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN */ -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -#define HAVE_LIMB_BIG_ENDIAN 1 -/* #undef HAVE_LIMB_LITTLE_ENDIAN */ - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -/* #undef HAVE_NATIVE_mpn_add_n */ -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -/* #undef HAVE_NATIVE_mpn_add_nc */ -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addcnd_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -/* #undef HAVE_NATIVE_mpn_and_n */ -/* #undef HAVE_NATIVE_mpn_andn_n */ -/* #undef HAVE_NATIVE_mpn_bdiv_dbm1c */ -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_com */ -/* #undef HAVE_NATIVE_mpn_copyd */ -/* #undef HAVE_NATIVE_mpn_copyi */ -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -/* #undef HAVE_NATIVE_mpn_invert_limb */ -/* #undef HAVE_NATIVE_mpn_ior_n */ -/* #undef HAVE_NATIVE_mpn_iorn_n */ -/* #undef HAVE_NATIVE_mpn_lshift */ -/* #undef HAVE_NATIVE_mpn_lshiftc */ -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -/* #undef HAVE_NATIVE_mpn_mod_34lsub1 */ -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -/* #undef HAVE_NATIVE_mpn_modexact_1c_odd */ -/* #undef HAVE_NATIVE_mpn_mul_1 */ -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -/* #undef HAVE_NATIVE_mpn_nand_n */ -/* #undef HAVE_NATIVE_mpn_nior_n */ -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1add_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_n */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -/* #undef HAVE_NATIVE_mpn_rshift */ -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -/* #undef HAVE_NATIVE_mpn_sub_n */ -/* #undef HAVE_NATIVE_mpn_sub_nc */ -/* #undef HAVE_NATIVE_mpn_subcnd_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -/* #undef HAVE_NATIVE_mpn_xor_n */ -/* #undef HAVE_NATIVE_mpn_xnor_n */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #undef HAVE_SPEED_CYCLECOUNTER */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -/* #undef LSYM_PREFIX */ - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 4 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/or1k/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/or1k/config.m4 deleted file mode 100644 index 61ae321f9..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/or1k/config.m4 +++ /dev/null @@ -1,19 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,<4>) -define(,32) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_or1k') -define_not_for_expansion(`HAVE_ABI_standard') -define_not_for_expansion(`HAVE_LIMB_BIG_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_BIG_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/or1k/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/or1k/gmp-mparam.h deleted file mode 100644 index aab5fa510..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/or1k/gmp-mparam.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Generic C gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 2000 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - - -/* Values for GMP_LIMB_BITS etc will be determined by ./configure and put - in config.h. */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/or1k/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/or1k/gmp.h deleted file mode 100644 index ae8d849d0..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/or1k/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 32 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || \ - (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-O2 -pedantic" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/powerpc/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/powerpc/Makefile.inc deleted file mode 100644 index 9452f37aa..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/powerpc/Makefile.inc +++ /dev/null @@ -1,193 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.6 2013/12/04 00:49:18 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom44_mul.c \ - toom8h_mul.c \ - toom2_sqr.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom_interpolate_6pts.c \ - toom54_mul.c \ - dcpi1_divappr_q.c \ - copyd.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - com.c \ - copyi.c \ - toom_couple_handling.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - div_q.c \ - jacbase.c \ - addcnd_n.c \ - hgcd_matrix.c \ - mullo_n.c \ - toom33_mul.c \ - toom_eval_dgr3_pm1.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - mul_basecase.c \ - toom8_sqr.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - subcnd_n.c \ - toom_eval_pm2.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - toom_interpolate_8pts.c \ - remove.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - -ASM_SRCS_LIST= \ - sqr_diagonal.asm mpn/powerpc32/sqr_diagonal.asm \ - add_n.asm mpn/powerpc32/aors_n.asm \ - sublsh1_n.asm mpn/powerpc32/sublsh1_n.asm \ - submul_1.asm mpn/powerpc32/submul_1.asm \ - umul.asm mpn/powerpc32/umul.asm \ - tabselect.asm mpn/powerpc32/tabselect.asm \ - lshift.asm mpn/powerpc32/lshift.asm \ - mul_1.asm mpn/powerpc32/mul_1.asm \ - bdiv_dbm1c.asm mpn/powerpc32/bdiv_dbm1c.asm \ - rshift.asm mpn/powerpc32/rshift.asm \ - mod_34lsub1.asm mpn/powerpc32/mod_34lsub1.asm \ - lshiftc.asm mpn/powerpc32/lshiftc.asm \ - mode1o.asm mpn/powerpc32/mode1o.asm \ - addlsh1_n.asm mpn/powerpc32/addlsh1_n.asm \ - diveby3.asm mpn/powerpc32/diveby3.asm \ - invert_limb.asm mpn/powerpc32/invert_limb.asm \ - addmul_1.asm mpn/powerpc32/addmul_1.asm \ - divrem_2.asm mpn/powerpc32/divrem_2.asm \ - sub_n.asm mpn/powerpc32/aors_n.asm \ - -GMP_LIMB_BITS=32 - -M4FLAGS= -DPIC diff --git a/external/lgpl3/gmp/lib/libgmp/arch/powerpc/config.h b/external/lgpl3/gmp/lib/libgmp/arch/powerpc/config.h deleted file mode 100644 index f2430051d..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/powerpc/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/powerpc32/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -/* #undef HAVE_CALLING_CONVENTIONS */ - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -#define HAVE_DOUBLE_IEEE_BIG_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN */ -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -#define HAVE_HOST_CPU_FAMILY_powerpc 1 -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -#define HAVE_LIMB_BIG_ENDIAN 1 -/* #undef HAVE_LIMB_LITTLE_ENDIAN */ - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#define HAVE_NATIVE_mpn_add_n 1 -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -#define HAVE_NATIVE_mpn_add_nc 1 -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addcnd_n */ -#define HAVE_NATIVE_mpn_addlsh1_n 1 -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -/* #undef HAVE_NATIVE_mpn_and_n */ -/* #undef HAVE_NATIVE_mpn_andn_n */ -#define HAVE_NATIVE_mpn_bdiv_dbm1c 1 -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_com */ -/* #undef HAVE_NATIVE_mpn_copyd */ -/* #undef HAVE_NATIVE_mpn_copyi */ -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -#define HAVE_NATIVE_mpn_divexact_by3c 1 -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -#define HAVE_NATIVE_mpn_divrem_2 1 -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -#define HAVE_NATIVE_mpn_invert_limb 1 -/* #undef HAVE_NATIVE_mpn_ior_n */ -/* #undef HAVE_NATIVE_mpn_iorn_n */ -#define HAVE_NATIVE_mpn_lshift 1 -#define HAVE_NATIVE_mpn_lshiftc 1 -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -#define HAVE_NATIVE_mpn_mod_34lsub1 1 -#define HAVE_NATIVE_mpn_modexact_1_odd 1 -#define HAVE_NATIVE_mpn_modexact_1c_odd 1 -#define HAVE_NATIVE_mpn_mul_1 1 -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -/* #undef HAVE_NATIVE_mpn_nand_n */ -/* #undef HAVE_NATIVE_mpn_nior_n */ -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1add_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_n */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -#define HAVE_NATIVE_mpn_rshift 1 -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -#define HAVE_NATIVE_mpn_sqr_diagonal 1 -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -#define HAVE_NATIVE_mpn_sub_n 1 -#define HAVE_NATIVE_mpn_sub_nc 1 -/* #undef HAVE_NATIVE_mpn_subcnd_n */ -#define HAVE_NATIVE_mpn_sublsh1_n 1 -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -#define HAVE_NATIVE_mpn_tabselect 1 -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -#define HAVE_NATIVE_mpn_umul_ppmm 1 -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -/* #undef HAVE_NATIVE_mpn_xor_n */ -/* #undef HAVE_NATIVE_mpn_xnor_n */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -#define HAVE_SPEED_CYCLECOUNTER 0 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 4 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/powerpc/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/powerpc/config.m4 deleted file mode 100644 index 3e5c2889c..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/powerpc/config.m4 +++ /dev/null @@ -1,38 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .section .rodata>) -define(, <.type $1,@$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(,) -define(,) -define(,<26>) -define(,<66>) -define(,<4>) -define(,32) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`powerpc32/powerpc-defs.m4') -include_mpn(`powerpc32/elf.m4') -define_not_for_expansion(`HAVE_HOST_CPU_powerpc') -define_not_for_expansion(`HAVE_ABI_32') -define_not_for_expansion(`HAVE_LIMB_BIG_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_BIG_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/powerpc/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/powerpc/gmp-mparam.h deleted file mode 100644 index b478a4712..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/powerpc/gmp-mparam.h +++ /dev/null @@ -1,203 +0,0 @@ -/* PowerPC-32 gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2004, 2008, 2009, -2010 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#define GMP_LIMB_BITS 32 -#define BYTES_PER_MP_LIMB 4 - - -/* This file is supposed to be used for 604, 604e, 744x/745x/747x (G4+), i.e., - 32-bit PowerPC processors with reasonably fast integer multiply insns. The - values below are chosen to be best for the latter processors, since 604 is - largely irrelevant today. - - In mpn/powerpc32/750/gmp-mparam.h there are values for 75x (G3) and for - 7400/7410 (G4), both which have much slower multiply instructions. */ - -/* 1417 MHz PPC 7447A */ - -#define DIVREM_1_NORM_THRESHOLD 0 /* always */ -#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_1P_METHOD 1 -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1N_TO_MOD_1_1_THRESHOLD 8 -#define MOD_1U_TO_MOD_1_1_THRESHOLD 6 -#define MOD_1_1_TO_MOD_1_2_THRESHOLD 8 -#define MOD_1_2_TO_MOD_1_4_THRESHOLD 49 -#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 18 -#define USE_PREINV_DIVREM_1 1 -#define DIV_QR_2_PI2_THRESHOLD MP_SIZE_T_MAX /* never */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define BMOD_1_TO_MOD_1_THRESHOLD 66 - -#define MUL_TOOM22_THRESHOLD 14 -#define MUL_TOOM33_THRESHOLD 73 -#define MUL_TOOM44_THRESHOLD 106 -#define MUL_TOOM6H_THRESHOLD 157 -#define MUL_TOOM8H_THRESHOLD 236 - -#define MUL_TOOM32_TO_TOOM43_THRESHOLD 73 -#define MUL_TOOM32_TO_TOOM53_THRESHOLD 72 -#define MUL_TOOM42_TO_TOOM53_THRESHOLD 73 -#define MUL_TOOM42_TO_TOOM63_THRESHOLD 72 -#define MUL_TOOM43_TO_TOOM54_THRESHOLD 82 - -#define SQR_BASECASE_THRESHOLD 4 -#define SQR_TOOM2_THRESHOLD 26 -#define SQR_TOOM3_THRESHOLD 77 -#define SQR_TOOM4_THRESHOLD 136 -#define SQR_TOOM6_THRESHOLD 189 -#define SQR_TOOM8_THRESHOLD 284 - -#define MULMID_TOOM42_THRESHOLD 32 - -#define MULMOD_BNM1_THRESHOLD 9 -#define SQRMOD_BNM1_THRESHOLD 14 - -#define MUL_FFT_MODF_THRESHOLD 284 /* k = 5 */ -#define MUL_FFT_TABLE3 \ - { { 284, 5}, { 17, 6}, { 9, 5}, { 19, 6}, \ - { 13, 7}, { 7, 6}, { 17, 7}, { 9, 6}, \ - { 20, 7}, { 11, 6}, { 23, 7}, { 13, 8}, \ - { 7, 7}, { 19, 8}, { 11, 7}, { 25, 9}, \ - { 7, 8}, { 15, 7}, { 33, 8}, { 19, 7}, \ - { 39, 8}, { 23, 7}, { 47, 9}, { 15, 8}, \ - { 39, 9}, { 23, 8}, { 47,10}, { 15, 9}, \ - { 31, 8}, { 67, 9}, { 39, 8}, { 79, 9}, \ - { 47, 8}, { 95,10}, { 31, 9}, { 71, 8}, \ - { 143, 9}, { 79,10}, { 47, 9}, { 95,11}, \ - { 31,10}, { 63, 9}, { 127, 8}, { 255, 9}, \ - { 135, 8}, { 271, 9}, { 143,10}, { 79, 9}, \ - { 159, 8}, { 319, 9}, { 175,10}, { 95, 9}, \ - { 191, 8}, { 383, 9}, { 207, 8}, { 415,11}, \ - { 63,10}, { 127, 9}, { 255, 8}, { 511, 9}, \ - { 271,10}, { 143, 9}, { 287, 8}, { 575,10}, \ - { 159, 9}, { 319,10}, { 175,11}, { 95,10}, \ - { 191, 9}, { 383,10}, { 207, 9}, { 415, 8}, \ - { 831,12}, { 63,11}, { 127,10}, { 255, 9}, \ - { 511,10}, { 271, 9}, { 543, 8}, { 1087,10}, \ - { 287, 9}, { 575,11}, { 159,10}, { 319, 9}, \ - { 639,10}, { 351, 9}, { 703,11}, { 191,10}, \ - { 415, 9}, { 831,11}, { 223,10}, { 447, 9}, \ - { 895,10}, { 479, 9}, { 959,12}, { 127,11}, \ - { 255,10}, { 543, 9}, { 1087,11}, { 287,10}, \ - { 607,11}, { 319,10}, { 639,11}, { 351,10}, \ - { 703, 9}, { 1407,12}, { 191,11}, { 383,10}, \ - { 767,11}, { 415,10}, { 831,11}, { 447,10}, \ - { 895,11}, { 479,10}, { 959,13}, { 127,12}, \ - { 255,11}, { 543,10}, { 1087,11}, { 607,12}, \ - { 319,11}, { 639,10}, { 1279,11}, { 703,10}, \ - { 1407,12}, { 383,11}, { 831,12}, { 447,11}, \ - { 959,10}, { 1919,13}, { 255,12}, { 511,11}, \ - { 1087,12}, { 575,11}, { 1215,10}, { 2431,12}, \ - { 639,11}, { 1279,12}, { 703,11}, { 1407,13}, \ - { 383,12}, { 959,11}, { 1919,14}, { 255,13}, \ - { 511,12}, { 1215,11}, { 2431,13}, { 639,12}, \ - { 1471,13}, { 767,12}, { 1599,13}, { 895,12}, \ - { 1919,14}, { 511,13}, { 1023,12}, { 2111,13}, \ - { 1151,12}, { 2431,13}, { 1407,14}, { 767,13}, \ - { 1535,12}, { 3071,13}, { 1919,12}, { 3839,15}, \ - { 32768,16} } -#define MUL_FFT_TABLE3_SIZE 165 -#define MUL_FFT_THRESHOLD 3392 - -#define SQR_FFT_MODF_THRESHOLD 236 /* k = 5 */ -#define SQR_FFT_TABLE3 \ - { { 248, 5}, { 17, 6}, { 9, 5}, { 19, 6}, \ - { 17, 7}, { 9, 6}, { 20, 7}, { 11, 6}, \ - { 23, 7}, { 13, 8}, { 7, 7}, { 19, 8}, \ - { 11, 7}, { 25, 9}, { 7, 8}, { 15, 7}, \ - { 33, 8}, { 19, 7}, { 39, 8}, { 23, 7}, \ - { 47, 8}, { 27, 9}, { 15, 8}, { 39, 9}, \ - { 23, 8}, { 47,10}, { 15, 9}, { 31, 8}, \ - { 63, 9}, { 39, 8}, { 79, 9}, { 47,10}, \ - { 31, 9}, { 63, 8}, { 127, 9}, { 71, 8}, \ - { 143, 9}, { 79,10}, { 47, 9}, { 95,11}, \ - { 31,10}, { 63, 9}, { 127, 8}, { 255, 7}, \ - { 511, 9}, { 143,10}, { 79, 9}, { 159, 8}, \ - { 319, 9}, { 175, 8}, { 351,10}, { 95, 9}, \ - { 191, 8}, { 383, 9}, { 207, 8}, { 415,11}, \ - { 63,10}, { 127, 9}, { 255, 8}, { 511,10}, \ - { 143, 9}, { 287, 8}, { 575,10}, { 159, 9}, \ - { 319,10}, { 175, 9}, { 351,11}, { 95,10}, \ - { 191, 9}, { 383,10}, { 207, 9}, { 415, 8}, \ - { 831,12}, { 63,11}, { 127,10}, { 255, 9}, \ - { 511,10}, { 271, 9}, { 543,10}, { 287, 9}, \ - { 575,11}, { 159,10}, { 319, 9}, { 639,10}, \ - { 351, 9}, { 703, 8}, { 1407, 9}, { 735,11}, \ - { 191,10}, { 415, 9}, { 831,11}, { 223,10}, \ - { 447, 9}, { 895,10}, { 479,12}, { 127,11}, \ - { 255,10}, { 543,11}, { 287,10}, { 607,11}, \ - { 319,10}, { 639,11}, { 351,10}, { 703, 9}, \ - { 1407,12}, { 191,11}, { 383,13}, { 127,12}, \ - { 255,11}, { 543,10}, { 1087,11}, { 575,10}, \ - { 1151,12}, { 319,11}, { 703,10}, { 1407,12}, \ - { 383,11}, { 831,12}, { 447,11}, { 959,13}, \ - { 255,12}, { 511,11}, { 1087,12}, { 575,11}, \ - { 1215,12}, { 639,11}, { 1279,12}, { 703,11}, \ - { 1407,13}, { 383,12}, { 959,14}, { 255,13}, \ - { 511,12}, { 1215,11}, { 2431,13}, { 639,12}, \ - { 1471,13}, { 767,12}, { 1599,13}, { 895,12}, \ - { 1919,14}, { 511,13}, { 1023,12}, { 2111,13}, \ - { 1151,12}, { 2431,13}, { 1407,12}, { 2815,14}, \ - { 767,13}, { 1535,12}, { 3199,13}, { 1919,15}, \ - { 32768,16} } -#define SQR_FFT_TABLE3_SIZE 153 -#define SQR_FFT_THRESHOLD 2368 - -#define MULLO_BASECASE_THRESHOLD 0 /* always */ -#define MULLO_DC_THRESHOLD 45 -#define MULLO_MUL_N_THRESHOLD 6633 - -#define DC_DIV_QR_THRESHOLD 43 -#define DC_DIVAPPR_Q_THRESHOLD 153 -#define DC_BDIV_QR_THRESHOLD 54 -#define DC_BDIV_Q_THRESHOLD 124 - -#define INV_MULMOD_BNM1_THRESHOLD 42 -#define INV_NEWTON_THRESHOLD 179 -#define INV_APPR_THRESHOLD 157 - -#define BINV_NEWTON_THRESHOLD 204 -#define REDC_1_TO_REDC_N_THRESHOLD 54 - -#define MU_DIV_QR_THRESHOLD 998 -#define MU_DIVAPPR_Q_THRESHOLD 1037 -#define MUPI_DIV_QR_THRESHOLD 84 -#define MU_BDIV_QR_THRESHOLD 748 -#define MU_BDIV_Q_THRESHOLD 942 - -#define POWM_SEC_TABLE 4,23,164,616,1812 - -#define MATRIX22_STRASSEN_THRESHOLD 11 -#define HGCD_THRESHOLD 118 -#define HGCD_APPR_THRESHOLD 167 -#define HGCD_REDUCE_THRESHOLD 1679 -#define GCD_DC_THRESHOLD 339 -#define GCDEXT_DC_THRESHOLD 273 -#define JACOBI_BASE_METHOD 4 - -#define GET_STR_DC_THRESHOLD 12 -#define GET_STR_PRECOMPUTE_THRESHOLD 27 -#define SET_STR_DC_THRESHOLD 781 -#define SET_STR_PRECOMPUTE_THRESHOLD 1505 - -#define FAC_DSC_THRESHOLD 141 -#define FAC_ODD_THRESHOLD 34 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/powerpc/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/powerpc/gmp.h deleted file mode 100644 index b676e06ec..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/powerpc/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 1 -#define GMP_LIMB_BITS 32 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || \ - (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-O2 -pedantic -mpowerpc" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/powerpc64/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/powerpc64/Makefile.inc deleted file mode 100644 index cc3fb261e..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/powerpc64/Makefile.inc +++ /dev/null @@ -1,161 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.4 2014/02/26 15:35:05 christos Exp $ - -SRCS+= \ - add.c \ - add_1.c \ - bdiv_dbm1c.c \ - bdiv_q.c \ - bdiv_q_1.c \ - bdiv_qr.c \ - binvert.c \ - cmp.c \ - dcpi1_bdiv_q.c \ - dcpi1_bdiv_qr.c \ - dcpi1_div_q.c \ - dcpi1_div_qr.c \ - dcpi1_divappr_q.c \ - div_q.c \ - div_qr_2n_pi1.c \ - dive_1.c \ - diveby3.c \ - divexact.c \ - divis.c \ - divrem.c \ - divrem_1.c \ - divrem_2.c \ - dump.c \ - fib2_ui.c \ - gcd.c \ - gcd_1.c \ - gcd_subdiv_step.c \ - gcdext.c \ - gcdext_1.c \ - gcdext_lehmer.c \ - get_d.c \ - get_str.c \ - hgcd.c \ - hgcd2.c \ - hgcd_appr.c \ - hgcd_matrix.c \ - hgcd_reduce.c \ - hgcd_step.c \ - invert.c \ - invertappr.c \ - jacbase.c \ - lshiftc.c \ - matrix22_mul.c \ - matrix22_mul1_inverse_vector.c \ - mod_1.c \ - mod_1_1.c \ - mod_1_2.c \ - mod_1_3.c \ - mod_1_4.c \ - mod_34lsub1.c \ - mode1o.c \ - mu_bdiv_q.c \ - mu_bdiv_qr.c \ - mu_div_q.c \ - mu_div_qr.c \ - mu_divappr_q.c \ - mul.c \ - mul_basecase.c \ - mul_fft.c \ - mul_n.c \ - mullo_basecase.c \ - mullo_n.c \ - mulmod_bnm1.c \ - neg.c \ - nussbaumer_mul.c \ - perfpow.c \ - perfsqr.c \ - pow_1.c \ - powlo.c \ - powm.c \ - powm_sec.c \ - pre_divrem_1.c \ - pre_mod_1.c \ - random.c \ - random2.c \ - redc_1.c \ - redc_2.c \ - redc_n.c \ - remove.c \ - rootrem.c \ - sbpi1_bdiv_q.c \ - sbpi1_bdiv_qr.c \ - sbpi1_div_q.c \ - sbpi1_div_qr.c \ - sbpi1_divappr_q.c \ - scan0.c \ - scan1.c \ - set_str.c \ - sqr.c \ - sqr_basecase.c \ - sqrmod_bnm1.c \ - sqrtrem.c \ - sub.c \ - sub_1.c \ - subcnd_n.c \ - tdiv_qr.c \ - toom22_mul.c \ - toom2_sqr.c \ - toom32_mul.c \ - toom33_mul.c \ - toom3_sqr.c \ - toom42_mul.c \ - toom43_mul.c \ - toom44_mul.c \ - toom4_sqr.c \ - toom52_mul.c \ - toom53_mul.c \ - toom62_mul.c \ - toom63_mul.c \ - toom6_sqr.c \ - toom6h_mul.c \ - toom8_sqr.c \ - toom8h_mul.c \ - toom_couple_handling.c \ - toom_eval_dgr3_pm1.c \ - toom_eval_dgr3_pm2.c \ - toom_eval_pm1.c \ - toom_eval_pm2.c \ - toom_eval_pm2exp.c \ - toom_eval_pm2rexp.c \ - toom_interpolate_12pts.c \ - toom_interpolate_16pts.c \ - toom_interpolate_5pts.c \ - toom_interpolate_6pts.c \ - toom_interpolate_7pts.c \ - toom_interpolate_8pts.c \ - trialdiv.c \ - zero.c \ - -C_SRCS_LIST= \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - -ASM_SRCS_LIST= \ - nand_n.asm mpn/powerpc64/logops_n.asm \ - sqr_diagonal.asm mpn/powerpc64/mode32/sqr_diagonal.asm \ - add_n.asm mpn/powerpc64/mode32/add_n.asm \ - xor_n.asm mpn/powerpc64/logops_n.asm \ - submul_1.asm mpn/powerpc64/mode32/submul_1.asm \ - umul.asm mpn/powerpc64/umul.asm \ - nior_n.asm mpn/powerpc64/logops_n.asm \ - lshift.asm mpn/powerpc64/lshift.asm \ - and_n.asm mpn/powerpc64/logops_n.asm \ - mul_1.asm mpn/powerpc64/mode32/mul_1.asm \ - copyd.asm mpn/powerpc64/copyd.asm \ - andn_n.asm mpn/powerpc64/logops_n.asm \ - com.asm mpn/powerpc64/com.asm \ - copyi.asm mpn/powerpc64/copyi.asm \ - rshift.asm mpn/powerpc64/rshift.asm \ - iorn_n.asm mpn/powerpc64/logops_n.asm \ - ior_n.asm mpn/powerpc64/logops_n.asm \ - xnor_n.asm mpn/powerpc64/logops_n.asm \ - addmul_1.asm mpn/powerpc64/mode32/addmul_1.asm \ - sub_n.asm mpn/powerpc64/mode32/sub_n.asm \ - -GMP_LIMB_BITS=64 - -M4FLAGS= -DPIC diff --git a/external/lgpl3/gmp/lib/libgmp/arch/powerpc64/config.h b/external/lgpl3/gmp/lib/libgmp/arch/powerpc64/config.h deleted file mode 100644 index 1b8802a9d..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/powerpc64/config.h +++ /dev/null @@ -1,587 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.in by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/generic/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -/* #undef HAVE_CALLING_CONVENTIONS */ - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function. */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -#define HAVE_DOUBLE_IEEE_BIG_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN */ -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -#define HAVE_HOST_CPU_FAMILY_powerpc 1 -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -#define HAVE_LIMB_BIG_ENDIAN 1 -/* #undef HAVE_LIMB_LITTLE_ENDIAN */ - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#define HAVE_NATIVE_mpn_add_n 1 -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -/* #undef HAVE_NATIVE_mpn_add_nc */ -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -#define HAVE_NATIVE_mpn_and_n 1 -#define HAVE_NATIVE_mpn_andn_n 1 -/* #undef HAVE_NATIVE_mpn_bdiv_dbm1c */ -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -#define HAVE_NATIVE_mpn_com 1 -#define HAVE_NATIVE_mpn_copyd 1 -#define HAVE_NATIVE_mpn_copyi 1 -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -/* #undef HAVE_NATIVE_mpn_invert_limb */ -#define HAVE_NATIVE_mpn_ior_n 1 -#define HAVE_NATIVE_mpn_iorn_n 1 -#define HAVE_NATIVE_mpn_lshift 1 -/* #undef HAVE_NATIVE_mpn_lshiftc */ -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -/* #undef HAVE_NATIVE_mpn_mod_34lsub1 */ -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -/* #undef HAVE_NATIVE_mpn_modexact_1c_odd */ -#define HAVE_NATIVE_mpn_mul_1 1 -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -#define HAVE_NATIVE_mpn_nand_n 1 -#define HAVE_NATIVE_mpn_nior_n 1 -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_n */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -#define HAVE_NATIVE_mpn_rshift 1 -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -#define HAVE_NATIVE_mpn_sqr_diagonal 1 -#define HAVE_NATIVE_mpn_sub_n 1 -/* #undef HAVE_NATIVE_mpn_sub_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -#define HAVE_NATIVE_mpn_umul_ppmm 1 -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -#define HAVE_NATIVE_mpn_xor_n 1 -#define HAVE_NATIVE_mpn_xnor_n 1 - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #undef HAVE_SPEED_CYCLECOUNTER */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.0.2" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.0.2" - -/* Define to 1 if the C compiler supports function prototypes. */ -#define PROTOTYPES 1 - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 8 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.0.2" - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define like PROTOTYPES; this can be used by system headers. */ -#define __PROTOTYPES 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/powerpc64/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/powerpc64/config.m4 deleted file mode 100644 index 17acc963e..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/powerpc64/config.m4 +++ /dev/null @@ -1,36 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .section .sdata,"aw",@progbits>) -define(, <.type $1,@$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(,) -define(,) -define(,<4>) -define(,64) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`powerpc32/powerpc-defs.m4') -include_mpn(`powerpc64/elf.m4') -define_not_for_expansion(`HAVE_HOST_CPU_powerpc64') -define_not_for_expansion(`HAVE_ABI_mode32') -define_not_for_expansion(`HAVE_LIMB_BIG_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_BIG_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/powerpc64/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/powerpc64/gmp-mparam.h deleted file mode 100644 index aab5fa510..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/powerpc64/gmp-mparam.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Generic C gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 2000 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - - -/* Values for GMP_LIMB_BITS etc will be determined by ./configure and put - in config.h. */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/powerpc64/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/powerpc64/gmp.h deleted file mode 100644 index 62e2ef068..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/powerpc64/gmp.h +++ /dev/null @@ -1,2284 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, -2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 1 -#define GMP_LIMB_BITS 64 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define _LONG_LONG_LIMB 1 -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __STDC__ - some ANSI compilers define this only to 0, hence the use of - "defined" and not "__STDC__-0". In particular Sun workshop C 5.0 - sets __STDC__ to 0, but requires "##" for token pasting. - - _AIX - gnu ansidecl.h asserts that all known AIX compilers are ANSI but - don't always define __STDC__. - - __DECC - current versions of DEC C (5.9 for instance) for alpha are ANSI, - but don't define __STDC__ in their default mode. Don't know if old - versions might have been K&R, but let's not worry about that unless - someone is still using one. - - _mips - gnu ansidecl.h says the RISC/OS MIPS compiler is ANSI in SVR4 - mode, but doesn't define __STDC__. - - _MSC_VER - Microsoft C is ANSI, but __STDC__ is undefined unless the /Za - option is given (in which case it's 1). - - _WIN32 - tested for by gnu ansidecl.h, no doubt on the assumption that - all w32 compilers are ansi. - - Note: This same set of tests is used by gen-psqr.c and - demos/expr/expr-impl.h, so if anything needs adding, then be sure to - update those too. */ - -#if defined (__STDC__) \ - || defined (__cplusplus) \ - || defined (_AIX) \ - || defined (__DECC) \ - || (defined (__mips) && defined (_SYSTYPE_SVR4)) \ - || defined (_MSC_VER) \ - || defined (_WIN32) -#define __GMP_HAVE_CONST 1 -#define __GMP_HAVE_PROTOTYPES 1 -#define __GMP_HAVE_TOKEN_PASTE 1 -#else -#define __GMP_HAVE_CONST 0 -#define __GMP_HAVE_PROTOTYPES 0 -#define __GMP_HAVE_TOKEN_PASTE 0 -#endif - - -#if __GMP_HAVE_CONST -#define __gmp_const const -#define __gmp_signed signed -#else -#define __gmp_const -#define __gmp_signed -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - libmp.la uses __GMP_DECLSPEC, just as if it were libgmp.la. libgmp and - libmp don't call each other, so there's no conflict or confusion. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#if __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef __gmp_const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef __gmp_const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef __gmp_const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef __gmp_const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#if __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#if __GMP_HAVE_PROTOTYPES -#define __GMP_PROTO(x) x -#else -#define __GMP_PROTO(x) () -#endif - -#ifndef __MPN -#if __GMP_HAVE_TOKEN_PASTE -#define __MPN(x) __gmpn_##x -#else -#define __MPN(x) __gmpn_/**/x -#endif -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || (__GNUC__ == 4 && __GNUC_MINOR__ == 2) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#else -#define __GMP_EXTERN_INLINE extern __inline__ -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions __GMP_PROTO ((void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t))) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions __GMP_PROTO ((void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t))) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern __gmp_const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern __gmp_const char * __gmp_const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit __GMP_PROTO ((gmp_randstate_t, gmp_randalg_t, ...)); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default __GMP_PROTO ((gmp_randstate_t)); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp __GMP_PROTO ((gmp_randstate_t, - mpz_srcptr, unsigned long int, - mp_bitcnt_t)); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size __GMP_PROTO ((gmp_randstate_t, mp_bitcnt_t)); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt __GMP_PROTO ((gmp_randstate_t)); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set __GMP_PROTO ((gmp_randstate_t, __gmp_const __gmp_randstate_struct *)); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed __GMP_PROTO ((gmp_randstate_t, mpz_srcptr)); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui __GMP_PROTO ((gmp_randstate_t, unsigned long int)); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear __GMP_PROTO ((gmp_randstate_t)); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui __GMP_PROTO ((gmp_randstate_t, unsigned long)); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui __GMP_PROTO ((gmp_randstate_t, unsigned long)); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf __GMP_PROTO ((char **, __gmp_const char *, ...)); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf __GMP_PROTO ((FILE *, __gmp_const char *, ...)); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf __GMP_PROTO ((struct obstack *, __gmp_const char *, ...)); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf __GMP_PROTO ((struct obstack *, __gmp_const char *, va_list)); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf __GMP_PROTO ((__gmp_const char *, ...)); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf __GMP_PROTO ((char *, size_t, __gmp_const char *, ...)); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf __GMP_PROTO ((char *, __gmp_const char *, ...)); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf __GMP_PROTO ((char **, __gmp_const char *, va_list)); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf __GMP_PROTO ((FILE *, __gmp_const char *, va_list)); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf __GMP_PROTO ((__gmp_const char *, va_list)); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf __GMP_PROTO ((char *, size_t, __gmp_const char *, va_list)); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf __GMP_PROTO ((char *, __gmp_const char *, va_list)); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf __GMP_PROTO ((FILE *, __gmp_const char *, ...)); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf __GMP_PROTO ((__gmp_const char *, ...)); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf __GMP_PROTO ((__gmp_const char *, __gmp_const char *, ...)); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf __GMP_PROTO ((FILE *, __gmp_const char *, va_list)); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf __GMP_PROTO ((__gmp_const char *, va_list)); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf __GMP_PROTO ((__gmp_const char *, __gmp_const char *, va_list)); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc __GMP_PROTO ((mpz_ptr, mp_size_t)); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs __GMP_PROTO ((mpz_ptr, mpz_srcptr)); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init __GMP_PROTO ((mpz_ptr, mp_size_t, mp_size_t)); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui __GMP_PROTO ((mpz_ptr, unsigned long int, unsigned long int)); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, mp_bitcnt_t)); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr __GMP_PROTO ((mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui __GMP_PROTO ((mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int)); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, mp_bitcnt_t)); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui __GMP_PROTO ((mpz_srcptr, unsigned long int)) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear __GMP_PROTO ((mpz_ptr)); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears __GMP_PROTO ((mpz_ptr, ...)); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit __GMP_PROTO ((mpz_ptr, mp_bitcnt_t)); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp __GMP_PROTO ((mpz_srcptr, mpz_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d __GMP_PROTO ((mpz_srcptr, double)) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si __GMP_PROTO ((mpz_srcptr, signed long int)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui __GMP_PROTO ((mpz_srcptr, unsigned long int)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs __GMP_PROTO ((mpz_srcptr, mpz_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d __GMP_PROTO ((mpz_srcptr, double)) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui __GMP_PROTO ((mpz_srcptr, unsigned long int)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com __GMP_PROTO ((mpz_ptr, mpz_srcptr)); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit __GMP_PROTO ((mpz_ptr, mp_bitcnt_t)); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p __GMP_PROTO ((mpz_srcptr, mpz_srcptr, mpz_srcptr)) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p __GMP_PROTO ((mpz_srcptr, mpz_srcptr, mp_bitcnt_t)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p __GMP_PROTO ((mpz_srcptr, unsigned long, unsigned long)) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long)); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p __GMP_PROTO ((mpz_srcptr, mpz_srcptr)) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p __GMP_PROTO ((mpz_srcptr, unsigned long)) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p __GMP_PROTO ((mpz_srcptr, mp_bitcnt_t)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump __GMP_PROTO ((mpz_srcptr)); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export __GMP_PROTO ((void *, size_t *, int, size_t, int, size_t, mpz_srcptr)); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui __GMP_PROTO ((mpz_ptr, unsigned long int)); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, mp_bitcnt_t)); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr __GMP_PROTO ((mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui __GMP_PROTO ((mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int)); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, mp_bitcnt_t)); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui __GMP_PROTO ((mpz_srcptr, unsigned long int)) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui __GMP_PROTO ((mpz_ptr, unsigned long int)); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui __GMP_PROTO ((mpz_ptr, mpz_ptr, unsigned long int)); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p __GMP_PROTO ((mpz_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p __GMP_PROTO ((mpz_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p __GMP_PROTO ((mpz_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p __GMP_PROTO ((mpz_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p __GMP_PROTO ((mpz_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p __GMP_PROTO ((mpz_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext __GMP_PROTO ((mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d __GMP_PROTO ((mpz_srcptr)) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp __GMP_PROTO ((signed long int *, mpz_srcptr)); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si __GMP_PROTO ((mpz_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str __GMP_PROTO ((char *, int, mpz_srcptr)); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui __GMP_PROTO ((mpz_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn __GMP_PROTO ((mpz_srcptr, mp_size_t)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist __GMP_PROTO ((mpz_srcptr, mpz_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import __GMP_PROTO ((mpz_ptr, size_t, int, size_t, int, size_t, __gmp_const void *)); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init __GMP_PROTO ((mpz_ptr)); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 __GMP_PROTO ((mpz_ptr, mp_bitcnt_t)); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits __GMP_PROTO ((mpz_ptr, ...)); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set __GMP_PROTO ((mpz_ptr, mpz_srcptr)); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d __GMP_PROTO ((mpz_ptr, double)); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si __GMP_PROTO ((mpz_ptr, signed long int)); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str __GMP_PROTO ((mpz_ptr, __gmp_const char *, int)); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui __GMP_PROTO ((mpz_ptr, unsigned long int)); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw __GMP_PROTO ((mpz_ptr, FILE *)); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str __GMP_PROTO ((mpz_ptr, FILE *, int)); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi __GMP_PROTO ((mpz_srcptr, mpz_srcptr)) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si __GMP_PROTO ((mpz_srcptr, long)) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui __GMP_PROTO ((mpz_srcptr, unsigned long)) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker __GMP_PROTO ((long, mpz_srcptr)) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker __GMP_PROTO ((unsigned long, mpz_srcptr)) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long)); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui __GMP_PROTO ((mpz_ptr, unsigned long int)); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui __GMP_PROTO ((mpz_ptr, mpz_ptr, unsigned long int)); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin __GMP_PROTO ((mpz_srcptr, int)) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, mp_bitcnt_t)); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si __GMP_PROTO ((mpz_ptr, mpz_srcptr, long int)); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg __GMP_PROTO ((mpz_ptr, mpz_srcptr)); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime __GMP_PROTO ((mpz_ptr, mpz_srcptr)); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw __GMP_PROTO ((FILE *, mpz_srcptr)); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str __GMP_PROTO ((FILE *, int, mpz_srcptr)); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p __GMP_PROTO ((mpz_srcptr)) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p __GMP_PROTO ((mpz_srcptr)) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount __GMP_PROTO ((mpz_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr)); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p __GMP_PROTO ((mpz_srcptr, int)) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random __GMP_PROTO ((mpz_ptr, mp_size_t)); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 __GMP_PROTO ((mpz_ptr, mp_size_t)); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 __GMP_PROTO ((mpz_ptr, mp_bitcnt_t)); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem __GMP_PROTO ((mpz_ptr,mpz_ptr, mpz_srcptr, unsigned long int)); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb __GMP_PROTO ((mpz_ptr, gmp_randstate_t, mp_bitcnt_t)); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 __GMP_PROTO ((mpz_srcptr, mp_bitcnt_t)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 __GMP_PROTO ((mpz_srcptr, mp_bitcnt_t)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set __GMP_PROTO ((mpz_ptr, mpz_srcptr)); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d __GMP_PROTO ((mpz_ptr, double)); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f __GMP_PROTO ((mpz_ptr, mpf_srcptr)); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q __GMP_PROTO ((mpz_ptr, mpq_srcptr)); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si __GMP_PROTO ((mpz_ptr, signed long int)); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str __GMP_PROTO ((mpz_ptr, __gmp_const char *, int)); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui __GMP_PROTO ((mpz_ptr, unsigned long int)); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit __GMP_PROTO ((mpz_ptr, mp_bitcnt_t)); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size __GMP_PROTO ((mpz_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase __GMP_PROTO ((mpz_srcptr, int)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt __GMP_PROTO ((mpz_ptr, mpz_srcptr)); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem __GMP_PROTO ((mpz_ptr, mpz_ptr, mpz_srcptr)); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub __GMP_PROTO ((mpz_ptr, unsigned long int, mpz_srcptr)); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap __GMP_PROTO ((mpz_ptr, mpz_ptr)) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui __GMP_PROTO ((mpz_srcptr, unsigned long int)) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, mp_bitcnt_t)); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr __GMP_PROTO ((mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui __GMP_PROTO ((mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int)); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, mp_bitcnt_t)); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit __GMP_PROTO ((mpz_srcptr, mp_bitcnt_t)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui __GMP_PROTO ((mpz_ptr, unsigned long int, unsigned long int)); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb __GMP_PROTO ((mpz_ptr, gmp_randstate_t, mp_bitcnt_t)); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm __GMP_PROTO ((mpz_ptr, gmp_randstate_t, mpz_srcptr)); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs __GMP_PROTO ((mpq_ptr, mpq_srcptr)); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add __GMP_PROTO ((mpq_ptr, mpq_srcptr, mpq_srcptr)); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize __GMP_PROTO ((mpq_ptr)); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear __GMP_PROTO ((mpq_ptr)); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears __GMP_PROTO ((mpq_ptr, ...)); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp __GMP_PROTO ((mpq_srcptr, mpq_srcptr)) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si __GMP_PROTO ((mpq_srcptr, long, unsigned long)) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui __GMP_PROTO ((mpq_srcptr, unsigned long int, unsigned long int)) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div __GMP_PROTO ((mpq_ptr, mpq_srcptr, mpq_srcptr)); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp __GMP_PROTO ((mpq_ptr, mpq_srcptr, mp_bitcnt_t)); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal __GMP_PROTO ((mpq_srcptr, mpq_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num __GMP_PROTO ((mpz_ptr, mpq_srcptr)); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den __GMP_PROTO ((mpz_ptr, mpq_srcptr)); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d __GMP_PROTO ((mpq_srcptr)) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str __GMP_PROTO ((char *, int, mpq_srcptr)); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init __GMP_PROTO ((mpq_ptr)); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits __GMP_PROTO ((mpq_ptr, ...)); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str __GMP_PROTO ((mpq_ptr, FILE *, int)); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv __GMP_PROTO ((mpq_ptr, mpq_srcptr)); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul __GMP_PROTO ((mpq_ptr, mpq_srcptr, mpq_srcptr)); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp __GMP_PROTO ((mpq_ptr, mpq_srcptr, mp_bitcnt_t)); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg __GMP_PROTO ((mpq_ptr, mpq_srcptr)); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str __GMP_PROTO ((FILE *, int, mpq_srcptr)); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set __GMP_PROTO ((mpq_ptr, mpq_srcptr)); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d __GMP_PROTO ((mpq_ptr, double)); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den __GMP_PROTO ((mpq_ptr, mpz_srcptr)); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f __GMP_PROTO ((mpq_ptr, mpf_srcptr)); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num __GMP_PROTO ((mpq_ptr, mpz_srcptr)); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si __GMP_PROTO ((mpq_ptr, signed long int, unsigned long int)); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str __GMP_PROTO ((mpq_ptr, __gmp_const char *, int)); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui __GMP_PROTO ((mpq_ptr, unsigned long int, unsigned long int)); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z __GMP_PROTO ((mpq_ptr, mpz_srcptr)); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub __GMP_PROTO ((mpq_ptr, mpq_srcptr, mpq_srcptr)); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap __GMP_PROTO ((mpq_ptr, mpq_ptr)) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs __GMP_PROTO ((mpf_ptr, mpf_srcptr)); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add __GMP_PROTO ((mpf_ptr, mpf_srcptr, mpf_srcptr)); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui __GMP_PROTO ((mpf_ptr, mpf_srcptr, unsigned long int)); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil __GMP_PROTO ((mpf_ptr, mpf_srcptr)); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear __GMP_PROTO ((mpf_ptr)); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears __GMP_PROTO ((mpf_ptr, ...)); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp __GMP_PROTO ((mpf_srcptr, mpf_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d __GMP_PROTO ((mpf_srcptr, double)) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si __GMP_PROTO ((mpf_srcptr, signed long int)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui __GMP_PROTO ((mpf_srcptr, unsigned long int)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div __GMP_PROTO ((mpf_ptr, mpf_srcptr, mpf_srcptr)); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp __GMP_PROTO ((mpf_ptr, mpf_srcptr, mp_bitcnt_t)); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui __GMP_PROTO ((mpf_ptr, mpf_srcptr, unsigned long int)); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump __GMP_PROTO ((mpf_srcptr)); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq __GMP_PROTO ((mpf_srcptr, mpf_srcptr, mp_bitcnt_t)) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p __GMP_PROTO ((mpf_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p __GMP_PROTO ((mpf_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p __GMP_PROTO ((mpf_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p __GMP_PROTO ((mpf_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p __GMP_PROTO ((mpf_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p __GMP_PROTO ((mpf_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor __GMP_PROTO ((mpf_ptr, mpf_srcptr)); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d __GMP_PROTO ((mpf_srcptr)) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp __GMP_PROTO ((signed long int *, mpf_srcptr)); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec __GMP_PROTO ((void)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec __GMP_PROTO ((mpf_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si __GMP_PROTO ((mpf_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str __GMP_PROTO ((char *, mp_exp_t *, int, size_t, mpf_srcptr)); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui __GMP_PROTO ((mpf_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init __GMP_PROTO ((mpf_ptr)); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 __GMP_PROTO ((mpf_ptr, mp_bitcnt_t)); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits __GMP_PROTO ((mpf_ptr, ...)); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set __GMP_PROTO ((mpf_ptr, mpf_srcptr)); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d __GMP_PROTO ((mpf_ptr, double)); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si __GMP_PROTO ((mpf_ptr, signed long int)); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str __GMP_PROTO ((mpf_ptr, __gmp_const char *, int)); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui __GMP_PROTO ((mpf_ptr, unsigned long int)); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str __GMP_PROTO ((mpf_ptr, FILE *, int)); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p __GMP_PROTO ((mpf_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul __GMP_PROTO ((mpf_ptr, mpf_srcptr, mpf_srcptr)); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp __GMP_PROTO ((mpf_ptr, mpf_srcptr, mp_bitcnt_t)); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui __GMP_PROTO ((mpf_ptr, mpf_srcptr, unsigned long int)); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg __GMP_PROTO ((mpf_ptr, mpf_srcptr)); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str __GMP_PROTO ((FILE *, int, size_t, mpf_srcptr)); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui __GMP_PROTO ((mpf_ptr, mpf_srcptr, unsigned long int)); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 __GMP_PROTO ((mpf_ptr, mp_size_t, mp_exp_t)); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff __GMP_PROTO ((mpf_ptr, mpf_srcptr, mpf_srcptr)); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set __GMP_PROTO ((mpf_ptr, mpf_srcptr)); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d __GMP_PROTO ((mpf_ptr, double)); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec __GMP_PROTO ((mp_bitcnt_t)) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec __GMP_PROTO ((mpf_ptr, mp_bitcnt_t)); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw __GMP_PROTO ((mpf_ptr, mp_bitcnt_t)) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q __GMP_PROTO ((mpf_ptr, mpq_srcptr)); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si __GMP_PROTO ((mpf_ptr, signed long int)); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str __GMP_PROTO ((mpf_ptr, __gmp_const char *, int)); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui __GMP_PROTO ((mpf_ptr, unsigned long int)); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z __GMP_PROTO ((mpf_ptr, mpz_srcptr)); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size __GMP_PROTO ((mpf_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt __GMP_PROTO ((mpf_ptr, mpf_srcptr)); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui __GMP_PROTO ((mpf_ptr, unsigned long int)); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub __GMP_PROTO ((mpf_ptr, mpf_srcptr, mpf_srcptr)); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui __GMP_PROTO ((mpf_ptr, mpf_srcptr, unsigned long int)); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap __GMP_PROTO ((mpf_ptr, mpf_ptr)) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc __GMP_PROTO ((mpf_ptr, mpf_srcptr)); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div __GMP_PROTO ((mpf_ptr, unsigned long int, mpf_srcptr)); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub __GMP_PROTO ((mpf_ptr, unsigned long int, mpf_srcptr)); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb __GMP_PROTO ((mpf_t, gmp_randstate_t, mp_bitcnt_t)); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr,mp_size_t)); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp __GMP_PROTO ((mp_srcptr, mp_srcptr, mp_size_t)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem __GMP_PROTO ((mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t)); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 __GMP_PROTO ((mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t)); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 __GMP_PROTO ((mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr)); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t)); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t)) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 __GMP_PROTO ((mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t)); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t)); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str __GMP_PROTO ((unsigned char *, int, mp_ptr, mp_size_t)); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist __GMP_PROTO ((mp_srcptr, mp_srcptr, mp_size_t)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, unsigned int)); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t)) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t)); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t)); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t)); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t)); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p __GMP_PROTO ((mp_srcptr, mp_size_t)) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p __GMP_PROTO ((mp_srcptr, mp_size_t)) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount __GMP_PROTO ((mp_srcptr, mp_size_t)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr)); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t)) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random __GMP_PROTO ((mp_ptr, mp_size_t)); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 __GMP_PROTO ((mp_ptr, mp_size_t)); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, unsigned int)); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 __GMP_PROTO ((mp_srcptr, mp_bitcnt_t)) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 __GMP_PROTO ((mp_srcptr, mp_bitcnt_t)) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str __GMP_PROTO ((mp_ptr, __gmp_const unsigned char *, size_t, int)); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t)); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr,mp_size_t)); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t)); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t)); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t)); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero __GMP_PROTO ((mp_ptr, mp_size_t)); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv __GMP_PROTO ((mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t)); - - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-mpowerpc64 -O3" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 0 -#define __GNU_MP_VERSION_PATCHLEVEL 2 -#define __GMP_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/powerpc64/mp.h b/external/lgpl3/gmp/lib/libgmp/arch/powerpc64/mp.h deleted file mode 100644 index d3f1e2840..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/powerpc64/mp.h +++ /dev/null @@ -1,164 +0,0 @@ -/* mp-h.in -- Definitions for the GNU multiple precision library -*-mode:c-*- - BSD mp compatible functions. - -Copyright 1991, 1993, 1994, 1995, 1996, 2000, 2001, 2002, 2004 Free Software -Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __MP_H__ - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. Use the t-gmp-mp-h.pl script to check. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* The following instantiated by configure, for internal use only */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define _LONG_LONG_LIMB 1 -#define __GMP_LIBGMP_DLL 0 -#endif - -#if defined (__STDC__) \ - || defined (__cplusplus) \ - || defined (_AIX) \ - || defined (__DECC) \ - || (defined (__mips) && defined (_SYSTYPE_SVR4)) \ - || defined (_MSC_VER) \ - || defined (_WIN32) -#define __GMP_HAVE_CONST 1 -#define __GMP_HAVE_PROTOTYPES 1 -#define __GMP_HAVE_TOKEN_PASTE 1 -#else -#define __GMP_HAVE_CONST 0 -#define __GMP_HAVE_PROTOTYPES 0 -#define __GMP_HAVE_TOKEN_PASTE 0 -#endif - - -#if __GMP_HAVE_CONST -#define __gmp_const const -#define __gmp_signed signed -#else -#define __gmp_const -#define __gmp_signed -#endif - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#if __GMP_WITHIN_GMP -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -#define __GMP_DECLSPEC -#endif - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - -/* User-visible types. */ -typedef __mpz_struct MINT; - - -#if __GMP_HAVE_PROTOTYPES -#define __GMP_PROTO(x) x -#else -#define __GMP_PROTO(x) () -#endif - -#if defined (__cplusplus) -extern "C" { -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions __GMP_PROTO ((void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t))); -__GMP_DECLSPEC MINT *itom __GMP_PROTO ((signed short int)); -__GMP_DECLSPEC MINT *xtom __GMP_PROTO ((const char *)); -__GMP_DECLSPEC void move __GMP_PROTO ((const MINT *, MINT *)); -__GMP_DECLSPEC void madd __GMP_PROTO ((const MINT *, const MINT *, MINT *)); -__GMP_DECLSPEC void msub __GMP_PROTO ((const MINT *, const MINT *, MINT *)); -__GMP_DECLSPEC void mult __GMP_PROTO ((const MINT *, const MINT *, MINT *)); -__GMP_DECLSPEC void mdiv __GMP_PROTO ((const MINT *, const MINT *, MINT *, MINT *)); -__GMP_DECLSPEC void sdiv __GMP_PROTO ((const MINT *, signed short int, MINT *, signed short int *)); -__GMP_DECLSPEC void msqrt __GMP_PROTO ((const MINT *, MINT *, MINT *)); -__GMP_DECLSPEC void pow __GMP_PROTO ((const MINT *, const MINT *, const MINT *, MINT *)); -__GMP_DECLSPEC void rpow __GMP_PROTO ((const MINT *, signed short int, MINT *)); -__GMP_DECLSPEC void gcd __GMP_PROTO ((const MINT *, const MINT *, MINT *)); -__GMP_DECLSPEC int mcmp __GMP_PROTO ((const MINT *, const MINT *)); -__GMP_DECLSPEC void min __GMP_PROTO ((MINT *)); -__GMP_DECLSPEC void mout __GMP_PROTO ((const MINT *)); -__GMP_DECLSPEC char *mtox __GMP_PROTO ((const MINT *)); -__GMP_DECLSPEC void mfree __GMP_PROTO ((MINT *)); - -#if defined (__cplusplus) -} -#endif - -#define __MP_H__ -#endif /* __MP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/riscv32/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/riscv32/Makefile.inc deleted file mode 100644 index e70a2c0b4..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/riscv32/Makefile.inc +++ /dev/null @@ -1,184 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.1 2014/09/19 17:23:57 matt Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom2_sqr.c \ - toom44_mul.c \ - toom8h_mul.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom_interpolate_6pts.c \ - toom54_mul.c \ - dcpi1_divappr_q.c \ - copyd.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - com.c \ - copyi.c \ - toom_couple_handling.c \ - lshift.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - mod_34lsub1.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - rshift.c \ - div_q.c \ - jacbase.c \ - addcnd_n.c \ - hgcd_matrix.c \ - toom_eval_dgr3_pm1.c \ - mullo_n.c \ - toom33_mul.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - bdiv_dbm1c.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - toom8_sqr.c \ - mul_basecase.c \ - addmul_1.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - mul_1.c \ - sub_n.c \ - toom_eval_pm2.c \ - add_n.c \ - subcnd_n.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - submul_1.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - mode1o.c \ - toom_interpolate_8pts.c \ - remove.c \ - lshiftc.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - -GMP_LIMB_BITS=32 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/riscv32/config.h b/external/lgpl3/gmp/lib/libgmp/arch/riscv32/config.h deleted file mode 100644 index 4a7a09c04..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/riscv32/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/generic/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -/* #undef HAVE_CALLING_CONVENTIONS */ - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -/* #undef HAVE_DOUBLE_IEEE_BIG_ENDIAN */ -#define HAVE_DOUBLE_IEEE_LITTLE_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -/* #undef HAVE_LIMB_BIG_ENDIAN */ -#define HAVE_LIMB_LITTLE_ENDIAN 1 - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -/* #undef HAVE_NATIVE_mpn_add_n */ -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -/* #undef HAVE_NATIVE_mpn_add_nc */ -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addcnd_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -/* #undef HAVE_NATIVE_mpn_and_n */ -/* #undef HAVE_NATIVE_mpn_andn_n */ -/* #undef HAVE_NATIVE_mpn_bdiv_dbm1c */ -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_com */ -/* #undef HAVE_NATIVE_mpn_copyd */ -/* #undef HAVE_NATIVE_mpn_copyi */ -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -/* #undef HAVE_NATIVE_mpn_invert_limb */ -/* #undef HAVE_NATIVE_mpn_ior_n */ -/* #undef HAVE_NATIVE_mpn_iorn_n */ -/* #undef HAVE_NATIVE_mpn_lshift */ -/* #undef HAVE_NATIVE_mpn_lshiftc */ -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -/* #undef HAVE_NATIVE_mpn_mod_34lsub1 */ -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -/* #undef HAVE_NATIVE_mpn_modexact_1c_odd */ -/* #undef HAVE_NATIVE_mpn_mul_1 */ -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -/* #undef HAVE_NATIVE_mpn_nand_n */ -/* #undef HAVE_NATIVE_mpn_nior_n */ -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1add_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_n */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -/* #undef HAVE_NATIVE_mpn_rshift */ -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -/* #undef HAVE_NATIVE_mpn_sub_n */ -/* #undef HAVE_NATIVE_mpn_sub_nc */ -/* #undef HAVE_NATIVE_mpn_subcnd_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -/* #undef HAVE_NATIVE_mpn_xor_n */ -/* #undef HAVE_NATIVE_mpn_xnor_n */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #define HAVE_SPEED_CYCLECOUNTER 1 */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 4 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -/* #define WANT_FFT 1 */ - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/riscv32/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/riscv32/config.m4 deleted file mode 100644 index aaeb45b8d..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/riscv32/config.m4 +++ /dev/null @@ -1,19 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,<4>) -define(,32) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_riscv32') -define_not_for_expansion(`HAVE_ABI_standard') -define_not_for_expansion(`HAVE_LIMB_LITTLE_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/riscv32/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/riscv32/gmp-mparam.h deleted file mode 100644 index aab5fa510..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/riscv32/gmp-mparam.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Generic C gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 2000 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - - -/* Values for GMP_LIMB_BITS etc will be determined by ./configure and put - in config.h. */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/riscv32/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/riscv32/gmp.h deleted file mode 100644 index e59c4323f..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/riscv32/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 32 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || \ - (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-O2 -pedantic -m32" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/riscv64/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/riscv64/Makefile.inc deleted file mode 100644 index fb4213597..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/riscv64/Makefile.inc +++ /dev/null @@ -1,184 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.1 2014/09/19 17:23:57 matt Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom2_sqr.c \ - toom44_mul.c \ - toom8h_mul.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom_interpolate_6pts.c \ - toom54_mul.c \ - dcpi1_divappr_q.c \ - copyd.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - com.c \ - copyi.c \ - toom_couple_handling.c \ - lshift.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - mod_34lsub1.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - rshift.c \ - div_q.c \ - jacbase.c \ - addcnd_n.c \ - hgcd_matrix.c \ - toom_eval_dgr3_pm1.c \ - mullo_n.c \ - toom33_mul.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - bdiv_dbm1c.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - toom8_sqr.c \ - mul_basecase.c \ - addmul_1.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - mul_1.c \ - sub_n.c \ - toom_eval_pm2.c \ - add_n.c \ - subcnd_n.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - submul_1.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - mode1o.c \ - toom_interpolate_8pts.c \ - remove.c \ - lshiftc.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - -GMP_LIMB_BITS=64 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/riscv64/config.h b/external/lgpl3/gmp/lib/libgmp/arch/riscv64/config.h deleted file mode 100644 index db01b066c..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/riscv64/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/generic/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -/* #undef HAVE_CALLING_CONVENTIONS */ - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -/* #undef HAVE_DOUBLE_IEEE_BIG_ENDIAN */ -#define HAVE_DOUBLE_IEEE_LITTLE_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -/* #undef HAVE_LIMB_BIG_ENDIAN */ -#define HAVE_LIMB_LITTLE_ENDIAN 1 - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -/* #undef HAVE_NATIVE_mpn_add_n */ -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -/* #undef HAVE_NATIVE_mpn_add_nc */ -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addcnd_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -/* #undef HAVE_NATIVE_mpn_and_n */ -/* #undef HAVE_NATIVE_mpn_andn_n */ -/* #undef HAVE_NATIVE_mpn_bdiv_dbm1c */ -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_com */ -/* #undef HAVE_NATIVE_mpn_copyd */ -/* #undef HAVE_NATIVE_mpn_copyi */ -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -/* #undef HAVE_NATIVE_mpn_invert_limb */ -/* #undef HAVE_NATIVE_mpn_ior_n */ -/* #undef HAVE_NATIVE_mpn_iorn_n */ -/* #undef HAVE_NATIVE_mpn_lshift */ -/* #undef HAVE_NATIVE_mpn_lshiftc */ -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -/* #undef HAVE_NATIVE_mpn_mod_34lsub1 */ -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -/* #undef HAVE_NATIVE_mpn_modexact_1c_odd */ -/* #undef HAVE_NATIVE_mpn_mul_1 */ -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -/* #undef HAVE_NATIVE_mpn_nand_n */ -/* #undef HAVE_NATIVE_mpn_nior_n */ -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1add_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_n */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -/* #undef HAVE_NATIVE_mpn_rshift */ -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -/* #undef HAVE_NATIVE_mpn_sub_n */ -/* #undef HAVE_NATIVE_mpn_sub_nc */ -/* #undef HAVE_NATIVE_mpn_subcnd_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -/* #undef HAVE_NATIVE_mpn_xor_n */ -/* #undef HAVE_NATIVE_mpn_xnor_n */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #define HAVE_SPEED_CYCLECOUNTER 1 */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 8 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 8 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 8 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -/* #define WANT_FFT 1 */ - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/riscv64/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/riscv64/config.m4 deleted file mode 100644 index 8b8e9e211..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/riscv64/config.m4 +++ /dev/null @@ -1,19 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,<4>) -define(,64) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_riscv64') -define_not_for_expansion(`HAVE_ABI_standard') -define_not_for_expansion(`HAVE_LIMB_LITTLE_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/riscv64/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/riscv64/gmp-mparam.h deleted file mode 100644 index aab5fa510..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/riscv64/gmp-mparam.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Generic C gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 2000 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - - -/* Values for GMP_LIMB_BITS etc will be determined by ./configure and put - in config.h. */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/riscv64/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/riscv64/gmp.h deleted file mode 100644 index c33d6dec5..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/riscv64/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 64 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || \ - (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-O2 -pedantic" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/sh3eb/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/sh3eb/Makefile.inc deleted file mode 100644 index 71e9f76eb..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/sh3eb/Makefile.inc +++ /dev/null @@ -1,186 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.4 2013/12/04 00:49:18 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom2_sqr.c \ - toom44_mul.c \ - toom8h_mul.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom_interpolate_6pts.c \ - toom54_mul.c \ - dcpi1_divappr_q.c \ - copyd.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - com.c \ - copyi.c \ - lshift.c \ - toom_couple_handling.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - mod_34lsub1.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - rshift.c \ - div_q.c \ - jacbase.c \ - addcnd_n.c \ - hgcd_matrix.c \ - toom_eval_dgr3_pm1.c \ - mullo_n.c \ - toom33_mul.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - bdiv_dbm1c.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - mul_basecase.c \ - toom8_sqr.c \ - addmul_1.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - mul_1.c \ - toom_eval_pm2.c \ - subcnd_n.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - submul_1.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - mode1o.c \ - toom_interpolate_8pts.c \ - remove.c \ - lshiftc.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - -ASM_SRCS_LIST= \ - add_n.asm mpn/sh/add_n.asm \ - sub_n.asm mpn/sh/sub_n.asm \ - -GMP_LIMB_BITS=32 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/sh3eb/config.h b/external/lgpl3/gmp/lib/libgmp/arch/sh3eb/config.h deleted file mode 100644 index 9629b2d98..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/sh3eb/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/generic/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -/* #undef HAVE_CALLING_CONVENTIONS */ - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -#define HAVE_DOUBLE_IEEE_BIG_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN */ -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -#define HAVE_LIMB_BIG_ENDIAN 1 -/* #undef HAVE_LIMB_LITTLE_ENDIAN */ - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#define HAVE_NATIVE_mpn_add_n 1 -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -/* #undef HAVE_NATIVE_mpn_add_nc */ -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addcnd_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -/* #undef HAVE_NATIVE_mpn_and_n */ -/* #undef HAVE_NATIVE_mpn_andn_n */ -/* #undef HAVE_NATIVE_mpn_bdiv_dbm1c */ -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_com */ -/* #undef HAVE_NATIVE_mpn_copyd */ -/* #undef HAVE_NATIVE_mpn_copyi */ -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -/* #undef HAVE_NATIVE_mpn_invert_limb */ -/* #undef HAVE_NATIVE_mpn_ior_n */ -/* #undef HAVE_NATIVE_mpn_iorn_n */ -/* #undef HAVE_NATIVE_mpn_lshift */ -/* #undef HAVE_NATIVE_mpn_lshiftc */ -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -/* #undef HAVE_NATIVE_mpn_mod_34lsub1 */ -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -/* #undef HAVE_NATIVE_mpn_modexact_1c_odd */ -/* #undef HAVE_NATIVE_mpn_mul_1 */ -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -/* #undef HAVE_NATIVE_mpn_nand_n */ -/* #undef HAVE_NATIVE_mpn_nior_n */ -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1add_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_n */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -/* #undef HAVE_NATIVE_mpn_rshift */ -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -#define HAVE_NATIVE_mpn_sub_n 1 -/* #undef HAVE_NATIVE_mpn_sub_nc */ -/* #undef HAVE_NATIVE_mpn_subcnd_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -/* #undef HAVE_NATIVE_mpn_xor_n */ -/* #undef HAVE_NATIVE_mpn_xnor_n */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #undef HAVE_SPEED_CYCLECOUNTER */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 4 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/sh3eb/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/sh3eb/config.m4 deleted file mode 100644 index 54d1847fc..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/sh3eb/config.m4 +++ /dev/null @@ -1,32 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .section .rodata>) -define(, <.type $1,@$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(,<4>) -define(,32) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_sh') -define_not_for_expansion(`HAVE_ABI_standard') -define_not_for_expansion(`HAVE_LIMB_BIG_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_BIG_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/sh3eb/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/sh3eb/gmp-mparam.h deleted file mode 100644 index aab5fa510..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/sh3eb/gmp-mparam.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Generic C gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 2000 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - - -/* Values for GMP_LIMB_BITS etc will be determined by ./configure and put - in config.h. */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/sh3eb/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/sh3eb/gmp.h deleted file mode 100644 index ae8d849d0..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/sh3eb/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 32 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || \ - (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-O2 -pedantic" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/sh3el/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/sh3el/Makefile.inc deleted file mode 100644 index b809ee08e..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/sh3el/Makefile.inc +++ /dev/null @@ -1,184 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.4 2013/12/04 00:49:18 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom2_sqr.c \ - toom44_mul.c \ - toom8h_mul.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom_interpolate_6pts.c \ - toom54_mul.c \ - dcpi1_divappr_q.c \ - copyd.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - com.c \ - copyi.c \ - toom_couple_handling.c \ - lshift.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - mod_34lsub1.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - rshift.c \ - div_q.c \ - jacbase.c \ - addcnd_n.c \ - hgcd_matrix.c \ - toom_eval_dgr3_pm1.c \ - mullo_n.c \ - toom33_mul.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - bdiv_dbm1c.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - toom8_sqr.c \ - mul_basecase.c \ - addmul_1.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - mul_1.c \ - sub_n.c \ - toom_eval_pm2.c \ - add_n.c \ - subcnd_n.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - submul_1.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - mode1o.c \ - toom_interpolate_8pts.c \ - remove.c \ - lshiftc.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - -GMP_LIMB_BITS=32 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/sh3el/config.h b/external/lgpl3/gmp/lib/libgmp/arch/sh3el/config.h deleted file mode 100644 index cb5ace670..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/sh3el/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/generic/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -/* #undef HAVE_CALLING_CONVENTIONS */ - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -/* #undef HAVE_DOUBLE_IEEE_BIG_ENDIAN */ -#define HAVE_DOUBLE_IEEE_LITTLE_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -/* #undef HAVE_LIMB_BIG_ENDIAN */ -#define HAVE_LIMB_LITTLE_ENDIAN 1 - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -/* #undef HAVE_NATIVE_mpn_add_n */ -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -/* #undef HAVE_NATIVE_mpn_add_nc */ -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addcnd_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -/* #undef HAVE_NATIVE_mpn_and_n */ -/* #undef HAVE_NATIVE_mpn_andn_n */ -/* #undef HAVE_NATIVE_mpn_bdiv_dbm1c */ -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_com */ -/* #undef HAVE_NATIVE_mpn_copyd */ -/* #undef HAVE_NATIVE_mpn_copyi */ -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -/* #undef HAVE_NATIVE_mpn_invert_limb */ -/* #undef HAVE_NATIVE_mpn_ior_n */ -/* #undef HAVE_NATIVE_mpn_iorn_n */ -/* #undef HAVE_NATIVE_mpn_lshift */ -/* #undef HAVE_NATIVE_mpn_lshiftc */ -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -/* #undef HAVE_NATIVE_mpn_mod_34lsub1 */ -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -/* #undef HAVE_NATIVE_mpn_modexact_1c_odd */ -/* #undef HAVE_NATIVE_mpn_mul_1 */ -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -/* #undef HAVE_NATIVE_mpn_nand_n */ -/* #undef HAVE_NATIVE_mpn_nior_n */ -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1add_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_n */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -/* #undef HAVE_NATIVE_mpn_rshift */ -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -/* #undef HAVE_NATIVE_mpn_sub_n */ -/* #undef HAVE_NATIVE_mpn_sub_nc */ -/* #undef HAVE_NATIVE_mpn_subcnd_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -/* #undef HAVE_NATIVE_mpn_xor_n */ -/* #undef HAVE_NATIVE_mpn_xnor_n */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #undef HAVE_SPEED_CYCLECOUNTER */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -/* #undef LSYM_PREFIX */ - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 4 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/sh3el/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/sh3el/config.m4 deleted file mode 100644 index 6b5b6a182..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/sh3el/config.m4 +++ /dev/null @@ -1,19 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,<4>) -define(,32) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_shle') -define_not_for_expansion(`HAVE_ABI_standard') -define_not_for_expansion(`HAVE_LIMB_LITTLE_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/sh3el/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/sh3el/gmp-mparam.h deleted file mode 100644 index aab5fa510..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/sh3el/gmp-mparam.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Generic C gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 2000 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - - -/* Values for GMP_LIMB_BITS etc will be determined by ./configure and put - in config.h. */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/sh3el/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/sh3el/gmp.h deleted file mode 100644 index ae8d849d0..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/sh3el/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 32 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || \ - (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-O2 -pedantic" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/sparc/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/sparc/Makefile.inc deleted file mode 100644 index 41f0fdab7..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/sparc/Makefile.inc +++ /dev/null @@ -1,190 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.6 2013/12/04 00:49:18 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom44_mul.c \ - toom8h_mul.c \ - toom2_sqr.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom_interpolate_6pts.c \ - toom54_mul.c \ - dcpi1_divappr_q.c \ - copyd.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - com.c \ - copyi.c \ - toom_couple_handling.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - mod_34lsub1.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - div_q.c \ - jacbase.c \ - addcnd_n.c \ - hgcd_matrix.c \ - mullo_n.c \ - toom33_mul.c \ - toom_eval_dgr3_pm1.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - bdiv_dbm1c.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - mul_basecase.c \ - toom8_sqr.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - toom_eval_pm2.c \ - subcnd_n.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - mode1o.c \ - toom_interpolate_8pts.c \ - remove.c \ - lshiftc.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - -ASM_SRCS_LIST= \ - add_n.asm mpn/sparc32/add_n.asm \ - submul_1.asm mpn/sparc32/submul_1.asm \ - umul.asm mpn/sparc32/umul.asm \ - lshift.asm mpn/sparc32/lshift.asm \ - mul_1.asm mpn/sparc32/mul_1.asm \ - udiv.asm mpn/sparc32/udiv.asm \ - rshift.asm mpn/sparc32/rshift.asm \ - addmul_1.asm mpn/sparc32/addmul_1.asm \ - sub_n.asm mpn/sparc32/sub_n.asm \ - -GMP_LIMB_BITS=32 - -M4FLAGS= -DPIC diff --git a/external/lgpl3/gmp/lib/libgmp/arch/sparc/config.h b/external/lgpl3/gmp/lib/libgmp/arch/sparc/config.h deleted file mode 100644 index 6e4d40135..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/sparc/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/sparc32/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -/* #undef HAVE_CALLING_CONVENTIONS */ - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -#define HAVE_DOUBLE_IEEE_BIG_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN */ -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -#define HAVE_LIMB_BIG_ENDIAN 1 -/* #undef HAVE_LIMB_LITTLE_ENDIAN */ - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#define HAVE_NATIVE_mpn_add_n 1 -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -/* #undef HAVE_NATIVE_mpn_add_nc */ -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addcnd_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -/* #undef HAVE_NATIVE_mpn_and_n */ -/* #undef HAVE_NATIVE_mpn_andn_n */ -/* #undef HAVE_NATIVE_mpn_bdiv_dbm1c */ -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_com */ -/* #undef HAVE_NATIVE_mpn_copyd */ -/* #undef HAVE_NATIVE_mpn_copyi */ -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -/* #undef HAVE_NATIVE_mpn_invert_limb */ -/* #undef HAVE_NATIVE_mpn_ior_n */ -/* #undef HAVE_NATIVE_mpn_iorn_n */ -#define HAVE_NATIVE_mpn_lshift 1 -/* #undef HAVE_NATIVE_mpn_lshiftc */ -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -/* #undef HAVE_NATIVE_mpn_mod_34lsub1 */ -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -/* #undef HAVE_NATIVE_mpn_modexact_1c_odd */ -#define HAVE_NATIVE_mpn_mul_1 1 -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -/* #undef HAVE_NATIVE_mpn_nand_n */ -/* #undef HAVE_NATIVE_mpn_nior_n */ -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1add_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_n */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -#define HAVE_NATIVE_mpn_rshift 1 -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -#define HAVE_NATIVE_mpn_sub_n 1 -/* #undef HAVE_NATIVE_mpn_sub_nc */ -/* #undef HAVE_NATIVE_mpn_subcnd_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -#define HAVE_NATIVE_mpn_udiv_qrnnd 1 -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -#define HAVE_NATIVE_mpn_umul_ppmm 1 -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -/* #undef HAVE_NATIVE_mpn_xor_n */ -/* #undef HAVE_NATIVE_mpn_xnor_n */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #undef HAVE_SPEED_CYCLECOUNTER */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 4 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/sparc/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/sparc/config.m4 deleted file mode 100644 index 500395222..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/sparc/config.m4 +++ /dev/null @@ -1,34 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .section ".rodata">) -define(, <.type $1,@$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(,<16>) -define(,<4>) -define(,32) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`sparc32/sparc-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_sparc') -define_not_for_expansion(`HAVE_ABI_32') -define_not_for_expansion(`HAVE_LIMB_BIG_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_BIG_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/sparc/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/sparc/gmp-mparam.h deleted file mode 100644 index 55432ea01..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/sparc/gmp-mparam.h +++ /dev/null @@ -1,57 +0,0 @@ -/* SPARC v7 gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002 Free Software Foundation, -Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -/* Generated by tuneup.c, 2002-03-13, gcc 2.95, Weitek 8701 */ - -#define MUL_TOOM22_THRESHOLD 8 -#define MUL_TOOM33_THRESHOLD 466 - -#define SQR_BASECASE_THRESHOLD 4 -#define SQR_TOOM2_THRESHOLD 16 -#define SQR_TOOM3_THRESHOLD 258 - -#define DIV_SB_PREINV_THRESHOLD 4 -#define DIV_DC_THRESHOLD 28 -#define POWM_THRESHOLD 28 - -#define GCD_ACCEL_THRESHOLD 3 -#define JACOBI_BASE_METHOD 2 - -#define DIVREM_1_NORM_THRESHOLD 3 -#define DIVREM_1_UNNORM_THRESHOLD 4 -#define MOD_1_NORM_THRESHOLD 3 -#define MOD_1_UNNORM_THRESHOLD 4 -#define USE_PREINV_DIVREM_1 1 -#define USE_PREINV_MOD_1 1 -#define DIVREM_2_THRESHOLD 0 /* always */ -#define DIVEXACT_1_THRESHOLD 120 -#define MODEXACT_1_ODD_THRESHOLD MP_SIZE_T_MAX /* never */ - -#define GET_STR_DC_THRESHOLD 21 -#define GET_STR_PRECOMPUTE_THRESHOLD 25 -#define SET_STR_THRESHOLD 1012 - -#define MUL_FFT_TABLE { 272, 672, 1152, 3584, 10240, 24576, 0 } -#define MUL_FFT_MODF_THRESHOLD 264 -#define MUL_FFT_THRESHOLD 2304 - -#define SQR_FFT_TABLE { 304, 736, 1152, 3584, 10240, 24576, 0 } -#define SQR_FFT_MODF_THRESHOLD 248 -#define SQR_FFT_THRESHOLD 2304 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/sparc/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/sparc/gmp.h deleted file mode 100644 index b1715d701..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/sparc/gmp.h +++ /dev/null @@ -1,2229 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 32 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || (__GNUC__ == 4 && __GNUC_MINOR__ == 2) \ - || (defined __GNUC_GNU_INLINE__ && defined __cplusplus) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#else -#define __GMP_EXTERN_INLINE extern __inline__ -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-m32 -O2 -pedantic -mcpu=v7" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/sparc64/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/sparc64/Makefile.inc deleted file mode 100644 index 3988b405b..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/sparc64/Makefile.inc +++ /dev/null @@ -1,186 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.5 2013/12/04 00:49:18 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom2_sqr.c \ - toom44_mul.c \ - toom8h_mul.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom_interpolate_6pts.c \ - toom54_mul.c \ - dcpi1_divappr_q.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - com.c \ - toom_couple_handling.c \ - lshift.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - mod_34lsub1.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - rshift.c \ - div_q.c \ - jacbase.c \ - addcnd_n.c \ - hgcd_matrix.c \ - toom_eval_dgr3_pm1.c \ - mullo_n.c \ - toom33_mul.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - bdiv_dbm1c.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - mul_basecase.c \ - toom8_sqr.c \ - addmul_1.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - mul_1.c \ - sub_n.c \ - toom_eval_pm2.c \ - add_n.c \ - subcnd_n.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - submul_1.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - mode1o.c \ - toom_interpolate_8pts.c \ - remove.c \ - lshiftc.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - -ASM_SRCS_LIST= \ - copyd.asm mpn/sparc64/copyd.asm \ - copyi.asm mpn/sparc64/copyi.asm \ - gcd_1.asm mpn/sparc64/gcd_1.asm \ - -GMP_LIMB_BITS=64 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/sparc64/config.h b/external/lgpl3/gmp/lib/libgmp/arch/sparc64/config.h deleted file mode 100644 index e0ba5514f..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/sparc64/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/sparc64/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -/* #undef HAVE_CALLING_CONVENTIONS */ - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -#define HAVE_DOUBLE_IEEE_BIG_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN */ -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -#define HAVE_LIMB_BIG_ENDIAN 1 -/* #undef HAVE_LIMB_LITTLE_ENDIAN */ - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -/* #undef HAVE_NATIVE_mpn_add_n */ -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -/* #undef HAVE_NATIVE_mpn_add_nc */ -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addcnd_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -/* #undef HAVE_NATIVE_mpn_and_n */ -/* #undef HAVE_NATIVE_mpn_andn_n */ -/* #undef HAVE_NATIVE_mpn_bdiv_dbm1c */ -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_com */ -#define HAVE_NATIVE_mpn_copyd 1 -#define HAVE_NATIVE_mpn_copyi 1 -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -#define HAVE_NATIVE_mpn_gcd_1 1 -/* #undef HAVE_NATIVE_mpn_hamdist */ -/* #undef HAVE_NATIVE_mpn_invert_limb */ -/* #undef HAVE_NATIVE_mpn_ior_n */ -/* #undef HAVE_NATIVE_mpn_iorn_n */ -/* #undef HAVE_NATIVE_mpn_lshift */ -/* #undef HAVE_NATIVE_mpn_lshiftc */ -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -/* #undef HAVE_NATIVE_mpn_mod_34lsub1 */ -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -/* #undef HAVE_NATIVE_mpn_modexact_1c_odd */ -/* #undef HAVE_NATIVE_mpn_mul_1 */ -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -/* #undef HAVE_NATIVE_mpn_nand_n */ -/* #undef HAVE_NATIVE_mpn_nior_n */ -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1add_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_n */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -/* #undef HAVE_NATIVE_mpn_rshift */ -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -/* #undef HAVE_NATIVE_mpn_sub_n */ -/* #undef HAVE_NATIVE_mpn_sub_nc */ -/* #undef HAVE_NATIVE_mpn_subcnd_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -/* #undef HAVE_NATIVE_mpn_xor_n */ -/* #undef HAVE_NATIVE_mpn_xnor_n */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -#define HAVE_SPEED_CYCLECOUNTER 2 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 8 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 8 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 8 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/sparc64/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/sparc64/config.m4 deleted file mode 100644 index d07d2b19a..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/sparc64/config.m4 +++ /dev/null @@ -1,35 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .section ".rodata">) -define(, <.type $1,@$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(,) -define(,<69>) -define(,<4>) -define(,64) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`sparc32/sparc-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_sparc64') -define_not_for_expansion(`HAVE_ABI_64') -define_not_for_expansion(`HAVE_LIMB_BIG_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_BIG_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/sparc64/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/sparc64/gmp-mparam.h deleted file mode 100644 index 8539d1b1f..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/sparc64/gmp-mparam.h +++ /dev/null @@ -1,128 +0,0 @@ -/* Sparc64 gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2006, 2008, 2009, -2010 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#define GMP_LIMB_BITS 64 -#define BYTES_PER_MP_LIMB 8 - -/* 500 MHz ultrasparc2 running GNU/Linux */ - -#define DIVREM_1_NORM_THRESHOLD 3 -#define DIVREM_1_UNNORM_THRESHOLD 4 -#define MOD_1_NORM_THRESHOLD 3 -#define MOD_1_UNNORM_THRESHOLD 3 -#define MOD_1N_TO_MOD_1_1_THRESHOLD MP_SIZE_T_MAX /* never */ -#define MOD_1U_TO_MOD_1_1_THRESHOLD 22 -#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 /* never mpn_mod_1_1p */ -#define MOD_1_2_TO_MOD_1_4_THRESHOLD 27 -#define PREINV_MOD_1_TO_MOD_1_THRESHOLD MP_SIZE_T_MAX /* never */ -#define USE_PREINV_DIVREM_1 1 -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define BMOD_1_TO_MOD_1_THRESHOLD MP_SIZE_T_MAX /* never */ - -#define MUL_TOOM22_THRESHOLD 30 -#define MUL_TOOM33_THRESHOLD 187 -#define MUL_TOOM44_THRESHOLD 278 -#define MUL_TOOM6H_THRESHOLD 278 -#define MUL_TOOM8H_THRESHOLD 357 - -#define MUL_TOOM32_TO_TOOM43_THRESHOLD 201 -#define MUL_TOOM32_TO_TOOM53_THRESHOLD 199 -#define MUL_TOOM42_TO_TOOM53_THRESHOLD 154 -#define MUL_TOOM42_TO_TOOM63_THRESHOLD 107 - -#define SQR_BASECASE_THRESHOLD 13 -#define SQR_TOOM2_THRESHOLD 69 -#define SQR_TOOM3_THRESHOLD 116 -#define SQR_TOOM4_THRESHOLD 336 -#define SQR_TOOM6_THRESHOLD 336 -#define SQR_TOOM8_THRESHOLD 454 - -#define MULMOD_BNM1_THRESHOLD 17 -#define SQRMOD_BNM1_THRESHOLD 23 - -#define MUL_FFT_MODF_THRESHOLD 248 /* k = 5 */ -#define MUL_FFT_TABLE3 \ - { { 248, 5}, { 9, 4}, { 19, 6}, { 5, 5}, \ - { 15, 6}, { 8, 5}, { 17, 6}, { 21, 7}, \ - { 19, 8}, { 11, 7}, { 25, 8}, { 15, 7}, \ - { 31, 8}, { 27, 9}, { 15, 8}, { 33, 9}, \ - { 19, 8}, { 39, 9}, { 27,10}, { 15, 9}, \ - { 39,10}, { 23, 9}, { 47,11}, { 15,10}, \ - { 31, 9}, { 67,10}, { 39, 9}, { 79,10}, \ - { 47,11}, { 31,10}, { 63, 9}, { 127, 8}, \ - { 255,10}, { 71, 9}, { 143, 8}, { 287,10}, \ - { 79,11}, { 47,12}, { 4096,13}, { 8192,14}, \ - { 16384,15}, { 32768,16}, { 65536,17}, { 131072,18}, \ - { 262144,19}, { 524288,20}, {1048576,21}, {2097152,22}, \ - {4194304,23}, {8388608,24} } -#define MUL_FFT_TABLE3_SIZE 50 -#define MUL_FFT_THRESHOLD 1984 - -#define SQR_FFT_MODF_THRESHOLD 236 /* k = 5 */ -#define SQR_FFT_TABLE3 \ - { { 236, 5}, { 8, 4}, { 17, 5}, { 19, 6}, \ - { 10, 5}, { 21, 6}, { 19, 7}, { 10, 6}, \ - { 21, 7}, { 21, 8}, { 21, 9}, { 11, 8}, \ - { 23, 9}, { 19, 8}, { 43, 9}, { 23,10}, \ - { 15, 9}, { 43,10}, { 23,11}, { 15,10}, \ - { 31, 9}, { 63,10}, { 47, 8}, { 191,11}, \ - { 31,10}, { 63, 8}, { 255, 7}, { 511, 9}, \ - { 135, 8}, { 271,10}, { 71, 9}, { 143, 8}, \ - { 287, 7}, { 575,11}, { 47, 9}, { 191, 8}, \ - { 383,12}, { 4096,13}, { 8192,14}, { 16384,15}, \ - { 32768,16}, { 65536,17}, { 131072,18}, { 262144,19}, \ - { 524288,20}, {1048576,21}, {2097152,22}, {4194304,23}, \ - {8388608,24} } -#define SQR_FFT_TABLE3_SIZE 49 -#define SQR_FFT_THRESHOLD 1120 - -#define MULLO_BASECASE_THRESHOLD 16 -#define MULLO_DC_THRESHOLD 41 -#define MULLO_MUL_N_THRESHOLD 3791 - -#define DC_DIV_QR_THRESHOLD 27 -#define DC_DIVAPPR_Q_THRESHOLD 100 -#define DC_BDIV_QR_THRESHOLD 47 -#define DC_BDIV_Q_THRESHOLD 174 - -#define INV_MULMOD_BNM1_THRESHOLD 58 -#define INV_NEWTON_THRESHOLD 13 -#define INV_APPR_THRESHOLD 9 - -#define BINV_NEWTON_THRESHOLD 187 -#define REDC_1_TO_REDC_2_THRESHOLD 10 -#define REDC_2_TO_REDC_N_THRESHOLD 115 - -#define MU_DIV_QR_THRESHOLD 680 -#define MU_DIVAPPR_Q_THRESHOLD 618 -#define MUPI_DIV_QR_THRESHOLD 0 /* always */ -#define MU_BDIV_QR_THRESHOLD 748 -#define MU_BDIV_Q_THRESHOLD 889 - -#define MATRIX22_STRASSEN_THRESHOLD 13 -#define HGCD_THRESHOLD 53 -#define GCD_DC_THRESHOLD 283 -#define GCDEXT_DC_THRESHOLD 186 -#define JACOBI_BASE_METHOD 2 - -#define GET_STR_DC_THRESHOLD 13 -#define GET_STR_PRECOMPUTE_THRESHOLD 16 -#define SET_STR_DC_THRESHOLD 390 -#define SET_STR_PRECOMPUTE_THRESHOLD 1665 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/sparc64/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/sparc64/gmp.h deleted file mode 100644 index 1d250772a..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/sparc64/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 64 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || \ - (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-O2 -pedantic -m64 -mptr64 -mcpu=v9" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/vax/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/vax/Makefile.inc deleted file mode 100644 index 4d680c732..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/vax/Makefile.inc +++ /dev/null @@ -1,199 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.6 2013/12/04 00:49:18 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - divrem_2.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - mulmid_basecase.c \ - jacobi_2.c \ - toom32_mul.c \ - toom44_mul.c \ - toom8h_mul.c \ - toom2_sqr.c \ - zero.c \ - mod_1_4.c \ - gcdext.c \ - add_err3_n.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - mu_divappr_q.c \ - dcpi1_div_qr.c \ - hgcd_reduce.c \ - matrix22_mul1_inverse_vector.c \ - tabselect.c \ - toom6_sqr.c \ - divrem_1.c \ - hgcd_step.c \ - sub_err3_n.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom_interpolate_6pts.c \ - toom54_mul.c \ - dcpi1_divappr_q.c \ - copyd.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - com.c \ - copyi.c \ - toom_couple_handling.c \ - add.c \ - div_qr_2.c \ - toom_interpolate_12pts.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - mu_div_qr.c \ - toom_interpolate_16pts.c \ - mod_34lsub1.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - div_q.c \ - jacbase.c \ - addcnd_n.c \ - hgcd_matrix.c \ - mullo_n.c \ - toom33_mul.c \ - toom_eval_dgr3_pm1.c \ - mod_1_2.c \ - sub_1.c \ - add_err2_n.c \ - trialdiv.c \ - add_1.c \ - sqr_basecase.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - bdiv_dbm1c.c \ - sqrtrem.c \ - bdiv_q_1.c \ - gcdext_1.c \ - toom63_mul.c \ - div_qr_2u_pi1.c \ - mul_basecase.c \ - toom8_sqr.c \ - neg.c \ - udiv_w_sdiv.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - toom_eval_pm2.c \ - subcnd_n.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - sub_err2_n.c \ - scan1.c \ - brootinv.c \ - pre_divrem_1.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - mullo_basecase.c \ - tdiv_qr.c \ - div_qr_2n_pi1.c \ - toom43_mul.c \ - mod_1_1.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - gcd_1.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - toom6h_mul.c \ - sqrmod_bnm1.c \ - mul_fft.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - mode1o.c \ - toom_interpolate_8pts.c \ - remove.c \ - lshiftc.c \ - dive_1.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - add_err1_n.c \ - mulmid_n.c \ - redc_1.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - sub_err1_n.c \ - -C_SRCS_LIST= \ - xor_n.c mpn/generic/logops_n.c \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - nand_n.c mpn/generic/logops_n.c \ - nior_n.c mpn/generic/logops_n.c \ - hamdist.c mpn/generic/popham.c \ - popcount.c mpn/generic/popham.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - and_n.c mpn/generic/logops_n.c \ - ior_n.c mpn/generic/logops_n.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - xnor_n.c mpn/generic/logops_n.c \ - iorn_n.c mpn/generic/logops_n.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - andn_n.c mpn/generic/logops_n.c \ - -ASM_SRCS_LIST= \ - add_n.asm mpn/vax/add_n.asm \ - submul_1.asm mpn/vax/submul_1.asm \ - lshift.asm mpn/vax/lshift.asm \ - mul_1.asm mpn/vax/mul_1.asm \ - rshift.asm mpn/vax/rshift.asm \ - addmul_1.asm mpn/vax/addmul_1.asm \ - sub_n.asm mpn/vax/sub_n.asm \ - -# XXX can't build these asm sources yet -#ASM_SRCS_LIST= -# -#C_SRCS_LIST+= \ -# add_n.c mpn/generic/add_n.c \ -# addmul_1.c mpn/generic/addmul_1.c \ -# lshift.c mpn/generic/lshift.c \ -# mul_1.c mpn/generic/mul_1.c \ -# rshift.c mpn/generic/rshift.c \ -# sub_n.c mpn/generic/sub_n.c \ -# submul_1.c mpn/generic/submul_1.c \ - -GMP_LIMB_BITS=32 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/vax/config.h b/external/lgpl3/gmp/lib/libgmp/arch/vax/config.h deleted file mode 100644 index bfd1a3f3a..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/vax/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/vax/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -/* #undef HAVE_CALLING_CONVENTIONS */ - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -/* #undef HAVE_DOUBLE_IEEE_BIG_ENDIAN */ -/* #undef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN */ -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -#define HAVE_DOUBLE_VAX_D 1 -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -/* #undef HAVE_HOST_CPU_FAMILY_x86_64 */ - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -/* #undef HAVE_LIMB_BIG_ENDIAN */ -#define HAVE_LIMB_LITTLE_ENDIAN 1 - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#define HAVE_NATIVE_mpn_add_n 1 -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -/* #undef HAVE_NATIVE_mpn_add_nc */ -/* #undef HAVE_NATIVE_mpn_addaddmul_1msb0 */ -/* #undef HAVE_NATIVE_mpn_addcnd_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n */ -/* #undef HAVE_NATIVE_mpn_addlsh_n */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -/* #undef HAVE_NATIVE_mpn_addmul_2 */ -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -/* #undef HAVE_NATIVE_mpn_and_n */ -/* #undef HAVE_NATIVE_mpn_andn_n */ -/* #undef HAVE_NATIVE_mpn_bdiv_dbm1c */ -/* #undef HAVE_NATIVE_mpn_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 */ -/* #undef HAVE_NATIVE_mpn_com */ -/* #undef HAVE_NATIVE_mpn_copyd */ -/* #undef HAVE_NATIVE_mpn_copyi */ -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -/* #undef HAVE_NATIVE_mpn_divexact_1 */ -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -/* #undef HAVE_NATIVE_mpn_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -/* #undef HAVE_NATIVE_mpn_divrem_2 */ -/* #undef HAVE_NATIVE_mpn_gcd_1 */ -/* #undef HAVE_NATIVE_mpn_hamdist */ -/* #undef HAVE_NATIVE_mpn_invert_limb */ -/* #undef HAVE_NATIVE_mpn_ior_n */ -/* #undef HAVE_NATIVE_mpn_iorn_n */ -#define HAVE_NATIVE_mpn_lshift 1 -/* #undef HAVE_NATIVE_mpn_lshiftc */ -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -/* #undef HAVE_NATIVE_mpn_mod_1_1p */ -/* #undef HAVE_NATIVE_mpn_mod_1c */ -/* #undef HAVE_NATIVE_mpn_mod_1s_2p */ -/* #undef HAVE_NATIVE_mpn_mod_1s_4p */ -/* #undef HAVE_NATIVE_mpn_mod_34lsub1 */ -/* #undef HAVE_NATIVE_mpn_modexact_1_odd */ -/* #undef HAVE_NATIVE_mpn_modexact_1c_odd */ -#define HAVE_NATIVE_mpn_mul_1 1 -/* #undef HAVE_NATIVE_mpn_mul_1c */ -/* #undef HAVE_NATIVE_mpn_mul_2 */ -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -/* #undef HAVE_NATIVE_mpn_mul_basecase */ -/* #undef HAVE_NATIVE_mpn_nand_n */ -/* #undef HAVE_NATIVE_mpn_nior_n */ -/* #undef HAVE_NATIVE_mpn_popcount */ -/* #undef HAVE_NATIVE_mpn_preinv_divrem_1 */ -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -/* #undef HAVE_NATIVE_mpn_redc_1 */ -/* #undef HAVE_NATIVE_mpn_redc_2 */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh_n */ -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1add_n */ -/* #undef HAVE_NATIVE_mpn_rsh1add_nc */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_n */ -/* #undef HAVE_NATIVE_mpn_rsh1sub_nc */ -#define HAVE_NATIVE_mpn_rshift 1 -/* #undef HAVE_NATIVE_mpn_sqr_basecase */ -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -#define HAVE_NATIVE_mpn_sub_n 1 -/* #undef HAVE_NATIVE_mpn_sub_nc */ -/* #undef HAVE_NATIVE_mpn_subcnd_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -/* #undef HAVE_NATIVE_mpn_tabselect */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -/* #undef HAVE_NATIVE_mpn_xor_n */ -/* #undef HAVE_NATIVE_mpn_xnor_n */ - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -/* #undef HAVE_SPEED_CYCLECOUNTER */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 4 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 4 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/vax/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/vax/config.m4 deleted file mode 100644 index b7640dad6..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/vax/config.m4 +++ /dev/null @@ -1,33 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .section .rodata>) -define(, <.type $1,@$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(,<42>) -define(,<4>) -define(,32) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`vax/elf.m4') -define_not_for_expansion(`HAVE_HOST_CPU_vax') -define_not_for_expansion(`HAVE_ABI_standard') -define_not_for_expansion(`HAVE_LIMB_LITTLE_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/vax/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/vax/gmp-mparam.h deleted file mode 100644 index f4362822c..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/vax/gmp-mparam.h +++ /dev/null @@ -1,49 +0,0 @@ -/* VAX gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 2000, 2001, 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -/* These numbers were measured manually using the tune/speed program. - The standard tune/tunup takes too long. (VAX 8800) */ - -#define MUL_TOOM22_THRESHOLD 14 -#define MUL_TOOM33_THRESHOLD 110 - -#define SQR_BASECASE_THRESHOLD 6 -#define SQR_TOOM2_THRESHOLD 42 -#define SQR_TOOM3_THRESHOLD 250 - -/* #define DIV_SB_PREINV_THRESHOLD */ -/* #define DIV_DC_THRESHOLD */ -/* #define POWM_THRESHOLD */ - -/* #define GCD_ACCEL_THRESHOLD */ -/* #define JACOBI_BASE_METHOD */ - -/* #define DIVREM_1_NORM_THRESHOLD */ -/* #define DIVREM_1_UNNORM_THRESHOLD */ -/* #define MOD_1_NORM_THRESHOLD */ -/* #define MOD_1_UNNORM_THRESHOLD */ -/* #define USE_PREINV_DIVREM_1 */ -/* #define USE_PREINV_MOD_1 */ -/* #define DIVREM_2_THRESHOLD */ -/* #define DIVEXACT_1_THRESHOLD */ -/* #define MODEXACT_1_ODD_THRESHOLD */ - -/* #define GET_STR_DC_THRESHOLD */ -/* #define GET_STR_PRECOMPUTE_THRESHOLD */ -#define SET_STR_THRESHOLD 3400 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/vax/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/vax/gmp.h deleted file mode 100644 index 11514d729..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/vax/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 32 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || \ - (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-O2 -pedantic -fomit-frame-pointer" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/x86_64/Makefile.inc b/external/lgpl3/gmp/lib/libgmp/arch/x86_64/Makefile.inc deleted file mode 100644 index baebfe70f..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/x86_64/Makefile.inc +++ /dev/null @@ -1,205 +0,0 @@ -# $NetBSD: Makefile.inc,v 1.6 2013/12/04 00:49:19 mrg Exp $ - -SRCS+= \ - random.c \ - toom_interpolate_7pts.c \ - sbpi1_divappr_q.c \ - random2.c \ - mu_bdiv_q.c \ - jacobi_2.c \ - toom32_mul.c \ - toom44_mul.c \ - toom8h_mul.c \ - toom2_sqr.c \ - zero.c \ - gcdext.c \ - binvert.c \ - mu_div_q.c \ - invertappr.c \ - add_n_sub_n.c \ - dump.c \ - hgcd_reduce.c \ - dcpi1_div_qr.c \ - mu_divappr_q.c \ - matrix22_mul1_inverse_vector.c \ - toom6_sqr.c \ - hgcd_step.c \ - mod_1.c \ - toom42_mulmid.c \ - divexact.c \ - jacobi.c \ - powlo.c \ - mul.c \ - set_str.c \ - toom42_mul.c \ - toom54_mul.c \ - toom_interpolate_6pts.c \ - dcpi1_divappr_q.c \ - toom_eval_dgr3_pm2.c \ - mod_1_3.c \ - toom_couple_handling.c \ - add.c \ - toom_interpolate_12pts.c \ - div_qr_2.c \ - perfsqr.c \ - toom53_mul.c \ - toom_eval_pm2exp.c \ - toom_interpolate_16pts.c \ - mu_div_qr.c \ - bdiv_q.c \ - toom22_mul.c \ - bsqrtinv.c \ - toom4_sqr.c \ - div_q.c \ - jacbase.c \ - hgcd_matrix.c \ - mullo_n.c \ - toom33_mul.c \ - toom_eval_dgr3_pm1.c \ - sub_1.c \ - trialdiv.c \ - add_1.c \ - toom_interpolate_5pts.c \ - sbpi1_bdiv_q.c \ - pre_mod_1.c \ - hgcd.c \ - sqrtrem.c \ - gcdext_1.c \ - toom63_mul.c \ - toom8_sqr.c \ - neg.c \ - gcdext_lehmer.c \ - divis.c \ - dcpi1_div_q.c \ - toom_eval_pm2.c \ - hgcd2.c \ - toom62_mul.c \ - comb_tables.c \ - sbpi1_bdiv_qr.c \ - scan1.c \ - brootinv.c \ - perfpow.c \ - get_str.c \ - mulmod_bnm1.c \ - tdiv_qr.c \ - toom43_mul.c \ - matrix22_mul.c \ - powm_sec.c \ - divrem.c \ - bsqrt.c \ - dcpi1_bdiv_qr.c \ - mul_n.c \ - redc_2.c \ - toom6h_mul.c \ - mul_fft.c \ - sqrmod_bnm1.c \ - mulmid.c \ - powm.c \ - rootrem.c \ - toom_interpolate_8pts.c \ - remove.c \ - cmp.c \ - toom_eval_pm1.c \ - hgcd_appr.c \ - scan0.c \ - gcd_subdiv_step.c \ - sbpi1_div_qr.c \ - invert.c \ - sub.c \ - toom_eval_pm2rexp.c \ - broot.c \ - dcpi1_bdiv_q.c \ - hgcd2_jacobi.c \ - mulmid_n.c \ - sqr.c \ - nussbaumer_mul.c \ - mu_bdiv_qr.c \ - pow_1.c \ - get_d.c \ - toom52_mul.c \ - sbpi1_div_q.c \ - diveby3.c \ - fib2_ui.c \ - bdiv_qr.c \ - hgcd_jacobi.c \ - toom3_sqr.c \ - gcd.c \ - redc_n.c \ - -C_SRCS_LIST= \ - sb_div_r_sec.c mpn/generic/sb_div_sec.c \ - sbpi1_div_qr_sec.c mpn/generic/sbpi1_div_sec.c \ - sb_div_qr_sec.c mpn/generic/sb_div_sec.c \ - sbpi1_div_r_sec.c mpn/generic/sbpi1_div_sec.c \ - -ASM_SRCS_LIST= \ - nand_n.asm mpn/x86_64/logops_n.asm \ - sub_err1_n.asm mpn/x86_64/aors_err1_n.asm \ - add_err2_n.asm mpn/x86_64/aors_err2_n.asm \ - rsh1sub_n.asm mpn/x86_64/rsh1aors_n.asm \ - mod_1_2.asm mpn/x86_64/mod_1_2.asm \ - add_n.asm mpn/x86_64/aors_n.asm \ - rsh1add_n.asm mpn/x86_64/rsh1aors_n.asm \ - sqr_basecase.asm mpn/x86_64/sqr_basecase.asm \ - rsblsh2_n.asm mpn/x86_64/aorrlsh2_n.asm \ - sublsh1_n.asm mpn/x86_64/sublsh1_n.asm \ - bdiv_q_1.asm mpn/x86_64/bdiv_q_1.asm \ - addcnd_n.asm mpn/x86_64/aorscnd_n.asm \ - addaddmul_1msb0.asm mpn/x86_64/addaddmul_1msb0.asm \ - xor_n.asm mpn/x86_64/logops_n.asm \ - sub_err3_n.asm mpn/x86_64/aors_err3_n.asm \ - rsblsh_n.asm mpn/x86_64/k8/aorrlsh_n.asm \ - addmul_2.asm mpn/x86_64/addmul_2.asm \ - submul_1.asm mpn/x86_64/aorsmul_1.asm \ - nior_n.asm mpn/x86_64/logops_n.asm \ - mul_basecase.asm mpn/x86_64/mul_basecase.asm \ - tabselect.asm mpn/x86_64/tabselect.asm \ - lshift.asm mpn/x86_64/lshift.asm \ - add_err1_n.asm mpn/x86_64/aors_err1_n.asm \ - and_n.asm mpn/x86_64/logops_n.asm \ - hamdist.asm mpn/x86_64/popham.asm \ - div_qr_2u_pi1.asm mpn/x86_64/div_qr_2u_pi1.asm \ - mulmid_basecase.asm mpn/x86_64/mulmid_basecase.asm \ - mul_1.asm mpn/x86_64/mul_1.asm \ - addlsh2_n.asm mpn/x86_64/aorrlsh2_n.asm \ - divrem_1.asm mpn/x86_64/divrem_1.asm \ - copyd.asm mpn/x86_64/copyd.asm \ - bdiv_dbm1c.asm mpn/x86_64/bdiv_dbm1c.asm \ - div_qr_2n_pi1.asm mpn/x86_64/div_qr_2n_pi1.asm \ - rsblsh1_n.asm mpn/x86_64/aorrlsh1_n.asm \ - dive_1.asm mpn/x86_64/dive_1.asm \ - andn_n.asm mpn/x86_64/logops_n.asm \ - com.asm mpn/x86_64/com.asm \ - copyi.asm mpn/x86_64/copyi.asm \ - sub_err2_n.asm mpn/x86_64/aors_err2_n.asm \ - add_err3_n.asm mpn/x86_64/aors_err3_n.asm \ - mod_1_1.asm mpn/x86_64/mod_1_1.asm \ - subcnd_n.asm mpn/x86_64/aorscnd_n.asm \ - rshift.asm mpn/x86_64/rshift.asm \ - addlsh_n.asm mpn/x86_64/k8/aorrlsh_n.asm \ - iorn_n.asm mpn/x86_64/logops_n.asm \ - ior_n.asm mpn/x86_64/logops_n.asm \ - mod_34lsub1.asm mpn/x86_64/mod_34lsub1.asm \ - popcount.asm mpn/x86_64/popham.asm \ - invert_limb_table.asm mpn/x86_64/invert_limb_table.asm \ - xnor_n.asm mpn/x86_64/logops_n.asm \ - redc_1.asm mpn/x86_64/redc_1.asm \ - lshiftc.asm mpn/x86_64/lshiftc.asm \ - mode1o.asm mpn/x86_64/mode1o.asm \ - mullo_basecase.asm mpn/x86_64/mullo_basecase.asm \ - addlsh1_n.asm mpn/x86_64/aorrlsh1_n.asm \ - mul_2.asm mpn/x86_64/mul_2.asm \ - invert_limb.asm mpn/x86_64/invert_limb.asm \ - addmul_1.asm mpn/x86_64/aorsmul_1.asm \ - divrem_2.asm mpn/x86_64/divrem_2.asm \ - mod_1_4.asm mpn/x86_64/mod_1_4.asm \ - sub_n.asm mpn/x86_64/aors_n.asm \ - gcd_1.asm mpn/x86_64/gcd_1.asm \ - -# XXX using C versions -# redc_1.asm mpn/x86_64/redc_1.asm -# gcd_1.asm mpn/x86_64/gcd_1.asm -# mod_1_4.asm mpn/x86_64/mod_1_4.asm -#SRCS+= redc_1.c gcd_1.c mod_1_4.c - -GMP_LIMB_BITS=64 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/x86_64/config.h b/external/lgpl3/gmp/lib/libgmp/arch/x86_64/config.h deleted file mode 100644 index b6ae264a3..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/x86_64/config.h +++ /dev/null @@ -1,630 +0,0 @@ -/* config.h. Generated from config.in by configure. */ -/* config.in. Generated from configure.ac by autoheader. */ - -/* - -Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published -by the Free Software Foundation; either version 3 of the License, or (at -your option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -*/ - -/* Define if building universal (internal helper macro) */ -/* #undef AC_APPLE_UNIVERSAL_BUILD */ - -/* The gmp-mparam.h file (a string) the tune program should suggest updating. - */ -#define GMP_MPARAM_H_SUGGEST "./mpn/x86_64/k8/gmp-mparam.h" - -/* Define to 1 if you have the `alarm' function. */ -#define HAVE_ALARM 1 - -/* Define to 1 if alloca() works (via gmp-impl.h). */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -/* #undef HAVE_ALLOCA_H */ - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ -#define HAVE_ATTRIBUTE_CONST 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ -#define HAVE_ATTRIBUTE_MALLOC 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) - */ -#define HAVE_ATTRIBUTE_MODE 1 - -/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ -#define HAVE_ATTRIBUTE_NORETURN 1 - -/* Define to 1 if you have the `attr_get' function. */ -/* #undef HAVE_ATTR_GET */ - -/* Define to 1 if tests/libtests has calling conventions checking for the CPU - */ -#define HAVE_CALLING_CONVENTIONS 1 - -/* Define to 1 if you have the `clock' function. */ -#define HAVE_CLOCK 1 - -/* Define to 1 if you have the `clock_gettime' function */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the `cputime' function. */ -/* #undef HAVE_CPUTIME */ - -/* Define to 1 if you have the declaration of `fgetc', and to 0 if you don't. - */ -#define HAVE_DECL_FGETC 1 - -/* Define to 1 if you have the declaration of `fscanf', and to 0 if you don't. - */ -#define HAVE_DECL_FSCANF 1 - -/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. - */ -#define HAVE_DECL_OPTARG 1 - -/* Define to 1 if you have the declaration of `sys_errlist', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_ERRLIST 1 - -/* Define to 1 if you have the declaration of `sys_nerr', and to 0 if you - don't. */ -#define HAVE_DECL_SYS_NERR 1 - -/* Define to 1 if you have the declaration of `ungetc', and to 0 if you don't. - */ -#define HAVE_DECL_UNGETC 1 - -/* Define to 1 if you have the declaration of `vfprintf', and to 0 if you - don't. */ -#define HAVE_DECL_VFPRINTF 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define one of the following to 1 for the format of a `double'. - If your format is not among these choices, or you don't know what it is, - then leave all undefined. - IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves - swapped, as used by ARM CPUs in little endian mode. */ -/* #undef HAVE_DOUBLE_IEEE_BIG_ENDIAN */ -#define HAVE_DOUBLE_IEEE_LITTLE_ENDIAN 1 -/* #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED */ -/* #undef HAVE_DOUBLE_VAX_D */ -/* #undef HAVE_DOUBLE_VAX_G */ -/* #undef HAVE_DOUBLE_CRAY_CFP */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FLOAT_H 1 - -/* Define to 1 if you have the `getpagesize' function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define to 1 if you have the `getrusage' function. */ -#define HAVE_GETRUSAGE 1 - -/* Define to 1 if you have the `getsysinfo' function. */ -/* #undef HAVE_GETSYSINFO */ - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define one of these to 1 for the host CPU family. - If your CPU is not in any of these families, leave all undefined. - For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ -/* #undef HAVE_HOST_CPU_FAMILY_alpha */ -/* #undef HAVE_HOST_CPU_FAMILY_m68k */ -/* #undef HAVE_HOST_CPU_FAMILY_power */ -/* #undef HAVE_HOST_CPU_FAMILY_powerpc */ -/* #undef HAVE_HOST_CPU_FAMILY_x86 */ -#define HAVE_HOST_CPU_FAMILY_x86_64 1 - -/* Define one of the following to 1 for the host CPU, as per the output of - ./config.guess. If your CPU is not listed here, leave all undefined. */ -/* #undef HAVE_HOST_CPU_alphaev67 */ -/* #undef HAVE_HOST_CPU_alphaev68 */ -/* #undef HAVE_HOST_CPU_alphaev7 */ -/* #undef HAVE_HOST_CPU_m68020 */ -/* #undef HAVE_HOST_CPU_m68030 */ -/* #undef HAVE_HOST_CPU_m68040 */ -/* #undef HAVE_HOST_CPU_m68060 */ -/* #undef HAVE_HOST_CPU_m68360 */ -/* #undef HAVE_HOST_CPU_powerpc604 */ -/* #undef HAVE_HOST_CPU_powerpc604e */ -/* #undef HAVE_HOST_CPU_powerpc750 */ -/* #undef HAVE_HOST_CPU_powerpc7400 */ -/* #undef HAVE_HOST_CPU_supersparc */ -/* #undef HAVE_HOST_CPU_i386 */ -/* #undef HAVE_HOST_CPU_i586 */ -/* #undef HAVE_HOST_CPU_i686 */ -/* #undef HAVE_HOST_CPU_pentium */ -/* #undef HAVE_HOST_CPU_pentiummmx */ -/* #undef HAVE_HOST_CPU_pentiumpro */ -/* #undef HAVE_HOST_CPU_pentium2 */ -/* #undef HAVE_HOST_CPU_pentium3 */ -/* #undef HAVE_HOST_CPU_s390_z900 */ -/* #undef HAVE_HOST_CPU_s390_z990 */ -/* #undef HAVE_HOST_CPU_s390_z9 */ -/* #undef HAVE_HOST_CPU_s390_z10 */ -/* #undef HAVE_HOST_CPU_s390_z196 */ - -/* Define to 1 iff we have a s390 with 64-bit registers. */ -/* #undef HAVE_HOST_CPU_s390_zarch */ - -/* Define to 1 if the system has the type `intmax_t'. */ -#define HAVE_INTMAX_T 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -#define HAVE_INTPTR_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INVENT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define one of these to 1 for the endianness of `mp_limb_t'. - If the endianness is not a simple big or little, or you don't know what - it is, then leave both undefined. */ -/* #undef HAVE_LIMB_BIG_ENDIAN */ -#define HAVE_LIMB_LITTLE_ENDIAN 1 - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if the system has the type `long double'. */ -#define HAVE_LONG_DOUBLE 1 - -/* Define to 1 if the system has the type `long long'. */ -#define HAVE_LONG_LONG 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_MACHINE_HAL_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mmap' function. */ -#define HAVE_MMAP 1 - -/* Define to 1 if you have the `mprotect' function. */ -#define HAVE_MPROTECT 1 - -/* Define to 1 each of the following for which a native (ie. CPU specific) - implementation of the corresponding routine exists. */ -#define HAVE_NATIVE_mpn_add_n 1 -/* #undef HAVE_NATIVE_mpn_add_n_sub_n */ -#define HAVE_NATIVE_mpn_add_nc 1 -#define HAVE_NATIVE_mpn_addaddmul_1msb0 1 -#define HAVE_NATIVE_mpn_addcnd_n 1 -#define HAVE_NATIVE_mpn_addlsh1_n 1 -#define HAVE_NATIVE_mpn_addlsh2_n 1 -#define HAVE_NATIVE_mpn_addlsh_n 1 -/* #undef HAVE_NATIVE_mpn_addlsh1_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_n_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh1_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh2_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addlsh_nc_ip2 */ -/* #undef HAVE_NATIVE_mpn_addmul_1c */ -#define HAVE_NATIVE_mpn_addmul_2 1 -/* #undef HAVE_NATIVE_mpn_addmul_3 */ -/* #undef HAVE_NATIVE_mpn_addmul_4 */ -/* #undef HAVE_NATIVE_mpn_addmul_5 */ -/* #undef HAVE_NATIVE_mpn_addmul_6 */ -/* #undef HAVE_NATIVE_mpn_addmul_7 */ -/* #undef HAVE_NATIVE_mpn_addmul_8 */ -/* #undef HAVE_NATIVE_mpn_addmul_2s */ -#define HAVE_NATIVE_mpn_and_n 1 -#define HAVE_NATIVE_mpn_andn_n 1 -#define HAVE_NATIVE_mpn_bdiv_dbm1c 1 -#define HAVE_NATIVE_mpn_bdiv_q_1 1 -#define HAVE_NATIVE_mpn_pi1_bdiv_q_1 1 -#define HAVE_NATIVE_mpn_com 1 -#define HAVE_NATIVE_mpn_copyd 1 -#define HAVE_NATIVE_mpn_copyi 1 -/* #undef HAVE_NATIVE_mpn_div_qr_2 */ -#define HAVE_NATIVE_mpn_divexact_1 1 -/* #undef HAVE_NATIVE_mpn_divexact_by3c */ -#define HAVE_NATIVE_mpn_divrem_1 1 -/* #undef HAVE_NATIVE_mpn_divrem_1c */ -#define HAVE_NATIVE_mpn_divrem_2 1 -#define HAVE_NATIVE_mpn_gcd_1 1 -#define HAVE_NATIVE_mpn_hamdist 1 -#define HAVE_NATIVE_mpn_invert_limb 1 -#define HAVE_NATIVE_mpn_ior_n 1 -#define HAVE_NATIVE_mpn_iorn_n 1 -#define HAVE_NATIVE_mpn_lshift 1 -#define HAVE_NATIVE_mpn_lshiftc 1 -/* #undef HAVE_NATIVE_mpn_lshsub_n */ -/* #undef HAVE_NATIVE_mpn_mod_1 */ -#define HAVE_NATIVE_mpn_mod_1_1p 1 -/* #undef HAVE_NATIVE_mpn_mod_1c */ -#define HAVE_NATIVE_mpn_mod_1s_2p 1 -#define HAVE_NATIVE_mpn_mod_1s_4p 1 -#define HAVE_NATIVE_mpn_mod_34lsub1 1 -#define HAVE_NATIVE_mpn_modexact_1_odd 1 -#define HAVE_NATIVE_mpn_modexact_1c_odd 1 -#define HAVE_NATIVE_mpn_mul_1 1 -#define HAVE_NATIVE_mpn_mul_1c 1 -#define HAVE_NATIVE_mpn_mul_2 1 -/* #undef HAVE_NATIVE_mpn_mul_3 */ -/* #undef HAVE_NATIVE_mpn_mul_4 */ -/* #undef HAVE_NATIVE_mpn_mul_5 */ -/* #undef HAVE_NATIVE_mpn_mul_6 */ -#define HAVE_NATIVE_mpn_mul_basecase 1 -#define HAVE_NATIVE_mpn_nand_n 1 -#define HAVE_NATIVE_mpn_nior_n 1 -#define HAVE_NATIVE_mpn_popcount 1 -#define HAVE_NATIVE_mpn_preinv_divrem_1 1 -/* #undef HAVE_NATIVE_mpn_preinv_mod_1 */ -#define HAVE_NATIVE_mpn_redc_1 1 -/* #undef HAVE_NATIVE_mpn_redc_2 */ -#define HAVE_NATIVE_mpn_rsblsh1_n 1 -#define HAVE_NATIVE_mpn_rsblsh2_n 1 -#define HAVE_NATIVE_mpn_rsblsh_n 1 -/* #undef HAVE_NATIVE_mpn_rsblsh1_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh2_nc */ -/* #undef HAVE_NATIVE_mpn_rsblsh_nc */ -#define HAVE_NATIVE_mpn_rsh1add_n 1 -#define HAVE_NATIVE_mpn_rsh1add_nc 1 -#define HAVE_NATIVE_mpn_rsh1sub_n 1 -#define HAVE_NATIVE_mpn_rsh1sub_nc 1 -#define HAVE_NATIVE_mpn_rshift 1 -#define HAVE_NATIVE_mpn_sqr_basecase 1 -/* #undef HAVE_NATIVE_mpn_sqr_diagonal */ -/* #undef HAVE_NATIVE_mpn_sqr_diag_addlsh1 */ -#define HAVE_NATIVE_mpn_sub_n 1 -#define HAVE_NATIVE_mpn_sub_nc 1 -#define HAVE_NATIVE_mpn_subcnd_n 1 -#define HAVE_NATIVE_mpn_sublsh1_n 1 -/* #undef HAVE_NATIVE_mpn_sublsh2_n */ -/* #undef HAVE_NATIVE_mpn_sublsh_n */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc */ -/* #undef HAVE_NATIVE_mpn_sublsh1_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_n_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh1_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh2_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_sublsh_nc_ip1 */ -/* #undef HAVE_NATIVE_mpn_submul_1c */ -#define HAVE_NATIVE_mpn_tabselect 1 -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd */ -/* #undef HAVE_NATIVE_mpn_udiv_qrnnd_r */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm */ -/* #undef HAVE_NATIVE_mpn_umul_ppmm_r */ -#define HAVE_NATIVE_mpn_xor_n 1 -#define HAVE_NATIVE_mpn_xnor_n 1 - -/* Define to 1 if you have the `nl_langinfo' function. */ -#define HAVE_NL_LANGINFO 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NL_TYPES_H 1 - -/* Define to 1 if you have the `obstack_vprintf' function. */ -/* #undef HAVE_OBSTACK_VPRINTF */ - -/* Define to 1 if you have the `popen' function. */ -#define HAVE_POPEN 1 - -/* Define to 1 if you have the `processor_info' function. */ -/* #undef HAVE_PROCESSOR_INFO */ - -/* Define to 1 if `struct pst_processor' exists and contains - `psp_iticksperclktick'. */ -/* #undef HAVE_PSP_ITICKSPERCLKTICK */ - -/* Define to 1 if you have the `pstat_getprocessor' function. */ -/* #undef HAVE_PSTAT_GETPROCESSOR */ - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -/* #undef HAVE_PTRDIFF_T */ - -/* Define to 1 if the system has the type `quad_t'. */ -#define HAVE_QUAD_T 1 - -/* Define to 1 if you have the `raise' function. */ -#define HAVE_RAISE 1 - -/* Define to 1 if you have the `read_real_time' function. */ -/* #undef HAVE_READ_REAL_TIME */ - -/* Define to 1 if you have the `sigaction' function. */ -#define HAVE_SIGACTION 1 - -/* Define to 1 if you have the `sigaltstack' function. */ -#define HAVE_SIGALTSTACK 1 - -/* Define to 1 if you have the `sigstack' function. */ -/* #undef HAVE_SIGSTACK */ - -/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ -#define HAVE_SPEED_CYCLECOUNTER 2 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SSTREAM */ - -/* Define to 1 if the system has the type `stack_t'. */ -#define HAVE_STACK_T 1 - -/* Define to 1 if exists and works */ -#define HAVE_STDARG 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if the system has the type `std::locale'. */ -/* #undef HAVE_STD__LOCALE */ - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if cpp supports the ANSI # stringizing operator. */ -#define HAVE_STRINGIZE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strnlen' function. */ -#define HAVE_STRNLEN 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the `sysconf' function. */ -#define HAVE_SYSCONF 1 - -/* Define to 1 if you have the `sysctl' function. */ -#define HAVE_SYSCTL 1 - -/* Define to 1 if you have the `sysctlbyname' function. */ -#define HAVE_SYSCTLBYNAME 1 - -/* Define to 1 if you have the `syssgi' function. */ -/* #undef HAVE_SYSSGI */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_ATTRIBUTES_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_IOGRAPH_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PROCESSOR_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PSTAT_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SYSCTL_H 1 - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSINFO_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSSGI_H */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_SYSTEMCFG_H */ - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIMES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `times' function. */ -#define HAVE_TIMES 1 - -/* Define to 1 if the system has the type `uint_least32_t'. */ -#define HAVE_UINT_LEAST32_T 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vsnprintf' function and it works properly. */ -#define HAVE_VSNPRINTF 1 - -/* Define to 1 for Windos/64 */ -/* #undef HOST_DOS64 */ - -/* Assembler local label prefix */ -#define LSYM_PREFIX ".L" - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "gmp" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "GNU MP" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU MP 5.1.3" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "gmp" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "http://www.gnu.org/software/gmp/" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "5.1.3" - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of `mp_limb_t', as computed by sizeof. */ -#define SIZEOF_MP_LIMB_T 8 - -/* The size of `unsigned', as computed by sizeof. */ -#define SIZEOF_UNSIGNED 4 - -/* The size of `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 8 - -/* The size of `unsigned short', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_SHORT 2 - -/* The size of `void *', as computed by sizeof. */ -#define SIZEOF_VOID_P 8 - -/* Define to 1 if sscanf requires writable inputs */ -/* #undef SSCANF_WRITABLE_INPUT */ - -/* Define to 1 if you have the ANSI C header files. */ -/* #undef STDC_HEADERS */ - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ -/* #undef TUNE_SQR_TOOM2_MAX */ - -/* Version number of package */ -#define VERSION "5.1.3" - -/* Defined to 1 as per --enable-assembly */ -#define WANT_ASSEMBLY 1 - -/* Define to 1 to enable ASSERT checking, per --enable-assert */ -/* #undef WANT_ASSERT */ - -/* Define to 1 when building a fat binary. */ -/* #undef WANT_FAT_BINARY */ - -/* Define to 1 to enable FFTs for multiplication, per --enable-fft */ -#define WANT_FFT 1 - -/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per - --enable-old-fft-full */ -/* #undef WANT_OLD_FFT_FULL */ - -/* Define to 1 if --enable-profiling=gprof */ -/* #undef WANT_PROFILING_GPROF */ - -/* Define to 1 if --enable-profiling=instrument */ -/* #undef WANT_PROFILING_INSTRUMENT */ - -/* Define to 1 if --enable-profiling=prof */ -/* #undef WANT_PROFILING_PROF */ - -/* Define one of these to 1 for the desired temporary memory allocation - method, per --enable-alloca. */ -#define WANT_TMP_ALLOCA 1 -/* #undef WANT_TMP_REENTRANT */ -/* #undef WANT_TMP_NOTREENTRANT */ -/* #undef WANT_TMP_DEBUG */ - -/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most - significant byte first (like Motorola and SPARC, unlike Intel). */ -#if defined AC_APPLE_UNIVERSAL_BUILD -# if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -# endif -#else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ -# endif -#endif - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#define restrict __restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git a/external/lgpl3/gmp/lib/libgmp/arch/x86_64/config.m4 b/external/lgpl3/gmp/lib/libgmp/arch/x86_64/config.m4 deleted file mode 100644 index a21e73b43..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/x86_64/config.m4 +++ /dev/null @@ -1,36 +0,0 @@ -dnl config.m4. Generated automatically by configure. -changequote(<,>) -ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(,0) -define(,<`no'>) -define(,) -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <>) -define(, < .section .rodata>) -define(, <.type $1,@$2>) -define(, <.size $1,$2>) -define(, <.L>) -define(, <.long>) -define(,) -define(,) -define(,<34>) -define(,<17>) -define(,<4>) -define(,64) -define(,0) -define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS)) ->) -changequote(`,') -ifdef(`__CONFIG_M4_INCLUDED__',,` -include(CONFIG_TOP_SRCDIR`/mpn/asm-defs.m4') -include_mpn(`x86_64/x86_64-defs.m4') -define_not_for_expansion(`HAVE_HOST_CPU_x86_64') -define_not_for_expansion(`HAVE_ABI_64') -define_not_for_expansion(`HAVE_LIMB_LITTLE_ENDIAN') -define_not_for_expansion(`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN') -') -define(`__CONFIG_M4_INCLUDED__') diff --git a/external/lgpl3/gmp/lib/libgmp/arch/x86_64/gmp-mparam.h b/external/lgpl3/gmp/lib/libgmp/arch/x86_64/gmp-mparam.h deleted file mode 100644 index fb157059d..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/x86_64/gmp-mparam.h +++ /dev/null @@ -1,212 +0,0 @@ -/* AMD K8 gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#define GMP_LIMB_BITS 64 -#define BYTES_PER_MP_LIMB 8 - -// #undef mpn_sublsh_n -// #define mpn_sublsh_n(rp,up,vp,n,c) \ -// (((rp) == (up)) ? mpn_submul_1 (rp, vp, n, CNST_LIMB(1) << (c)) \ -// : MPN(mpn_sublsh_n)(rp,up,vp,n,c)) - -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1N_TO_MOD_1_1_THRESHOLD 4 -#define MOD_1U_TO_MOD_1_1_THRESHOLD 2 -#define MOD_1_1_TO_MOD_1_2_THRESHOLD 13 -#define MOD_1_2_TO_MOD_1_4_THRESHOLD 35 -#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 7 -#define USE_PREINV_DIVREM_1 1 /* native */ -#define DIV_QR_2_PI2_THRESHOLD MP_SIZE_T_MAX /* never */ -#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ -#define BMOD_1_TO_MOD_1_THRESHOLD 17 - -#define MUL_TOOM22_THRESHOLD 27 -#define MUL_TOOM33_THRESHOLD 81 -#define MUL_TOOM44_THRESHOLD 242 -#define MUL_TOOM6H_THRESHOLD 369 -#define MUL_TOOM8H_THRESHOLD 482 - -#define MUL_TOOM32_TO_TOOM43_THRESHOLD 97 -#define MUL_TOOM32_TO_TOOM53_THRESHOLD 153 -#define MUL_TOOM42_TO_TOOM53_THRESHOLD 113 -#define MUL_TOOM42_TO_TOOM63_THRESHOLD 187 -#define MUL_TOOM43_TO_TOOM54_THRESHOLD 166 - -#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ -#define SQR_TOOM2_THRESHOLD 34 -#define SQR_TOOM3_THRESHOLD 115 -#define SQR_TOOM4_THRESHOLD 527 -#define SQR_TOOM6_THRESHOLD 587 -#define SQR_TOOM8_THRESHOLD 0 /* always */ - -#define MULMID_TOOM42_THRESHOLD 36 - -#define MULMOD_BNM1_THRESHOLD 18 -#define SQRMOD_BNM1_THRESHOLD 19 - -#define MUL_FFT_MODF_THRESHOLD 642 /* k = 5 */ -#define MUL_FFT_TABLE3 \ - { { 570, 5}, { 21, 6}, { 11, 5}, { 23, 6}, \ - { 25, 7}, { 13, 6}, { 27, 7}, { 15, 6}, \ - { 31, 7}, { 25, 8}, { 13, 7}, { 29, 8}, \ - { 15, 7}, { 31, 8}, { 17, 7}, { 35, 8}, \ - { 19, 7}, { 39, 8}, { 21, 7}, { 43, 8}, \ - { 23, 7}, { 47, 8}, { 25, 7}, { 51, 8}, \ - { 29, 9}, { 15, 8}, { 37, 9}, { 19, 8}, \ - { 43, 9}, { 23, 8}, { 51, 9}, { 27, 8}, \ - { 55,10}, { 15, 9}, { 43,10}, { 23, 9}, \ - { 55,10}, { 31, 9}, { 63, 5}, { 1023, 4}, \ - { 2431, 5}, { 1279, 6}, { 671, 7}, { 367, 8}, \ - { 189, 9}, { 95, 8}, { 195, 9}, { 111,11}, \ - { 31, 9}, { 131,10}, { 71, 9}, { 155,10}, \ - { 79, 9}, { 159,10}, { 87,11}, { 47,10}, \ - { 111,11}, { 63,10}, { 135,11}, { 79,10}, \ - { 167,11}, { 95,10}, { 191,11}, { 111,12}, \ - { 63,11}, { 143,10}, { 287,11}, { 159,10}, \ - { 319,11}, { 175,12}, { 95,11}, { 207,13}, \ - { 63,12}, { 127,11}, { 255,10}, { 543,11}, \ - { 287,12}, { 159,11}, { 319,10}, { 639,11}, \ - { 335,10}, { 671,11}, { 351,10}, { 703,12}, \ - { 191,11}, { 383,10}, { 767,11}, { 415,12}, \ - { 223,13}, { 127,12}, { 255,11}, { 543,12}, \ - { 287,11}, { 575,10}, { 1151,11}, { 607,12}, \ - { 319,11}, { 639,10}, { 1279,11}, { 671,12}, \ - { 351,11}, { 703,13}, { 191,12}, { 383,11}, \ - { 767,12}, { 415,11}, { 831,12}, { 447,14}, \ - { 127,13}, { 255,12}, { 543,11}, { 1087,12}, \ - { 607,11}, { 1215,13}, { 319,12}, { 671,11}, \ - { 1343,12}, { 735,13}, { 383,12}, { 767,11}, \ - { 1535,12}, { 799,11}, { 1599,12}, { 831,13}, \ - { 447,12}, { 895,11}, { 1791,12}, { 959,14}, \ - { 255,13}, { 511,12}, { 1087,13}, { 575,12}, \ - { 1215,13}, { 639,12}, { 1343,13}, { 703,12}, \ - { 1407,14}, { 383,13}, { 767,12}, { 1599,13}, \ - { 831,12}, { 1663,13}, { 895,12}, { 1791,13}, \ - { 959,15}, { 255,14}, { 511,13}, { 1087,12}, \ - { 2175,13}, { 1215,14}, { 639,13}, { 1471,14}, \ - { 767,13}, { 1663,14}, { 895,13}, { 1855,15}, \ - { 511,14}, { 1023,13}, { 2175,14}, { 1151,13}, \ - { 2431,14}, { 1279,13}, { 2687,14}, { 1407,15}, \ - { 767,14}, { 1535,13}, { 3071,14}, { 1791,16}, \ - { 511,15}, { 1023,14}, { 2431,15}, { 1279,14}, \ - { 2815,15}, { 1535,14}, { 3199,15}, { 1791,14}, \ - { 3583,16}, { 65536,17}, { 131072,18}, { 262144,19}, \ - { 524288,20}, {1048576,21}, {2097152,22}, {4194304,23}, \ - {8388608,24} } -#define MUL_FFT_TABLE3_SIZE 185 -#define MUL_FFT_THRESHOLD 11520 - -#define SQR_FFT_MODF_THRESHOLD 565 /* k = 5 */ -#define SQR_FFT_TABLE3 \ - { { 460, 5}, { 21, 6}, { 11, 5}, { 23, 6}, \ - { 12, 5}, { 25, 6}, { 27, 7}, { 14, 6}, \ - { 29, 7}, { 15, 6}, { 31, 7}, { 29, 8}, \ - { 15, 7}, { 32, 8}, { 17, 7}, { 35, 8}, \ - { 19, 7}, { 39, 8}, { 21, 7}, { 43, 8}, \ - { 25, 7}, { 51, 8}, { 29, 9}, { 15, 8}, \ - { 35, 9}, { 19, 8}, { 43, 9}, { 23, 8}, \ - { 51, 9}, { 27, 8}, { 55,10}, { 15, 9}, \ - { 31, 8}, { 63, 9}, { 43,10}, { 23, 9}, \ - { 55,11}, { 15,10}, { 31, 9}, { 71,10}, \ - { 39, 9}, { 83,10}, { 47, 6}, { 767, 4}, \ - { 3263, 5}, { 1727, 4}, { 3455, 5}, { 1791, 6}, \ - { 927, 7}, { 479, 6}, { 959, 7}, { 511, 8}, \ - { 271, 9}, { 147,10}, { 87,11}, { 47,10}, \ - { 95,12}, { 31,11}, { 63,10}, { 135,11}, \ - { 79,10}, { 167,11}, { 95,10}, { 191,11}, \ - { 111,12}, { 63,11}, { 127,10}, { 255,11}, \ - { 143,10}, { 287, 9}, { 575,10}, { 303,11}, \ - { 159,12}, { 95,11}, { 191,10}, { 383, 9}, \ - { 767,10}, { 399,11}, { 207,13}, { 63,12}, \ - { 127,11}, { 255,10}, { 511,11}, { 271,10}, \ - { 543,11}, { 287,10}, { 575,12}, { 159,11}, \ - { 319,10}, { 639,11}, { 335,10}, { 671,11}, \ - { 351,10}, { 703,12}, { 191,11}, { 383,10}, \ - { 767,11}, { 415,10}, { 831,11}, { 447,13}, \ - { 127,12}, { 255,11}, { 511,10}, { 1023,11}, \ - { 543,12}, { 287,11}, { 575,10}, { 1151,11}, \ - { 607,10}, { 1215,12}, { 319,11}, { 639,10}, \ - { 1279,11}, { 671,12}, { 351,11}, { 703,13}, \ - { 191,12}, { 383,11}, { 767,12}, { 415,11}, \ - { 831,12}, { 447,14}, { 127,13}, { 255,12}, \ - { 511,11}, { 1023,12}, { 543,11}, { 1087,12}, \ - { 575,11}, { 1151,12}, { 607,13}, { 319,12}, \ - { 639,11}, { 1279,12}, { 671,11}, { 1343,12}, \ - { 703,11}, { 1407,12}, { 735,13}, { 383,12}, \ - { 767,11}, { 1535,12}, { 799,11}, { 1599,12}, \ - { 831,13}, { 447,12}, { 959,14}, { 255,13}, \ - { 511,12}, { 1087,13}, { 575,12}, { 1215,13}, \ - { 639,12}, { 1343,13}, { 703,12}, { 1407,14}, \ - { 383,13}, { 767,12}, { 1599,13}, { 831,12}, \ - { 1663,13}, { 895,12}, { 1791,13}, { 959,15}, \ - { 255,14}, { 511,13}, { 1087,12}, { 2175,13}, \ - { 1215,14}, { 639,13}, { 1471,14}, { 767,13}, \ - { 1663,14}, { 895,13}, { 1855,15}, { 511,14}, \ - { 1023,13}, { 2175,14}, { 1151,13}, { 2303,14}, \ - { 1279,13}, { 2559,14}, { 1407,15}, { 767,14}, \ - { 1535,13}, { 3071,14}, { 1791,16}, { 511,15}, \ - { 1023,14}, { 2303,15}, { 1279,14}, { 2687,15}, \ - { 1535,14}, { 3199,15}, { 1791,16}, { 65536,17}, \ - { 131072,18}, { 262144,19}, { 524288,20}, {1048576,21}, \ - {2097152,22}, {4194304,23}, {8388608,24} } -#define SQR_FFT_TABLE3_SIZE 203 -#define SQR_FFT_THRESHOLD 5568 - -#define MULLO_BASECASE_THRESHOLD 0 /* always */ -#define MULLO_DC_THRESHOLD 63 -#define MULLO_MUL_N_THRESHOLD 22239 - -#define DC_DIV_QR_THRESHOLD 40 -#define DC_DIVAPPR_Q_THRESHOLD 252 -#define DC_BDIV_QR_THRESHOLD 38 -#define DC_BDIV_Q_THRESHOLD 168 - -#define INV_MULMOD_BNM1_THRESHOLD 67 -#define INV_NEWTON_THRESHOLD 246 -#define INV_APPR_THRESHOLD 236 - -#define BINV_NEWTON_THRESHOLD 252 -#define REDC_1_TO_REDC_2_THRESHOLD 11 -#define REDC_2_TO_REDC_N_THRESHOLD 84 - -#define MU_DIV_QR_THRESHOLD 1932 -#define MU_DIVAPPR_Q_THRESHOLD 1895 -#define MUPI_DIV_QR_THRESHOLD 99 -#define MU_BDIV_QR_THRESHOLD 1528 -#define MU_BDIV_Q_THRESHOLD 1787 - -#define POWM_SEC_TABLE 3,35,322,1926 - -#define MATRIX22_STRASSEN_THRESHOLD 21 -#define HGCD_THRESHOLD 140 -#define HGCD_APPR_THRESHOLD 190 -#define HGCD_REDUCE_THRESHOLD 4120 -#define GCD_DC_THRESHOLD 606 -#define GCDEXT_DC_THRESHOLD 492 -#define JACOBI_BASE_METHOD 4 - -#define GET_STR_DC_THRESHOLD 18 -#define GET_STR_PRECOMPUTE_THRESHOLD 32 -#define SET_STR_DC_THRESHOLD 266 -#define SET_STR_PRECOMPUTE_THRESHOLD 2105 - -#define FAC_DSC_THRESHOLD 1474 -#define FAC_ODD_THRESHOLD 24 diff --git a/external/lgpl3/gmp/lib/libgmp/arch/x86_64/gmp.h b/external/lgpl3/gmp/lib/libgmp/arch/x86_64/gmp.h deleted file mode 100644 index b35f66108..000000000 --- a/external/lgpl3/gmp/lib/libgmp/arch/x86_64/gmp.h +++ /dev/null @@ -1,2231 +0,0 @@ -/* Definitions for GNU multiple precision functions. -*- mode: c -*- - -Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, -2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free -Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#ifndef __GMP_H__ - -#if defined (__cplusplus) -#include /* for std::istream, std::ostream, std::string */ -#include -#endif - - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_HAVE_HOST_CPU_FAMILY_power 0 -#define __GMP_HAVE_HOST_CPU_FAMILY_powerpc 0 -#define GMP_LIMB_BITS 64 -#define GMP_NAIL_BITS 0 -#endif -#define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) -#define GMP_NUMB_MASK ((~ __GMP_CAST (mp_limb_t, 0)) >> GMP_NAIL_BITS) -#define GMP_NUMB_MAX GMP_NUMB_MASK -#define GMP_NAIL_MASK (~ GMP_NUMB_MASK) - - -/* The following (everything under ifndef __GNU_MP__) must be identical in - gmp.h and mp.h to allow both to be included in an application or during - the library build. */ -#ifndef __GNU_MP__ -#define __GNU_MP__ 5 - -#define __need_size_t /* tell gcc stddef.h we only want size_t */ -#if defined (__cplusplus) -#include /* for size_t */ -#else -#include /* for size_t */ -#endif -#undef __need_size_t - -/* Instantiated by configure. */ -#if ! defined (__GMP_WITHIN_CONFIGURE) -/* #undef _LONG_LONG_LIMB */ -#define __GMP_LIBGMP_DLL 0 -#endif - - -/* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in - all other circumstances. - - When compiling objects for libgmp, __GMP_DECLSPEC is an export directive, - or when compiling for an application it's an import directive. The two - cases are differentiated by __GMP_WITHIN_GMP defined by the GMP Makefiles - (and not defined from an application). - - __GMP_DECLSPEC_XX is similarly used for libgmpxx. __GMP_WITHIN_GMPXX - indicates when building libgmpxx, and in that case libgmpxx functions are - exports, but libgmp functions which might get called are imports. - - Libtool DLL_EXPORT define is not used. - - There's no attempt to support GMP built both static and DLL. Doing so - would mean applications would have to tell us which of the two is going - to be used when linking, and that seems very tedious and error prone if - using GMP by hand, and equally tedious from a package since autoconf and - automake don't give much help. - - __GMP_DECLSPEC is required on all documented global functions and - variables, the various internals in gmp-impl.h etc can be left unadorned. - But internals used by the test programs or speed measuring programs - should have __GMP_DECLSPEC, and certainly constants or variables must - have it or the wrong address will be resolved. - - In gcc __declspec can go at either the start or end of a prototype. - - In Microsoft C __declspec must go at the start, or after the type like - void __declspec(...) *foo()". There's no __dllexport or anything to - guard against someone foolish #defining dllexport. _export used to be - available, but no longer. - - In Borland C _export still exists, but needs to go after the type, like - "void _export foo();". Would have to change the __GMP_DECLSPEC syntax to - make use of that. Probably more trouble than it's worth. */ - -#if defined (__GNUC__) -#define __GMP_DECLSPEC_EXPORT __declspec(__dllexport__) -#define __GMP_DECLSPEC_IMPORT __declspec(__dllimport__) -#endif -#if defined (_MSC_VER) || defined (__BORLANDC__) -#define __GMP_DECLSPEC_EXPORT __declspec(dllexport) -#define __GMP_DECLSPEC_IMPORT __declspec(dllimport) -#endif -#ifdef __WATCOMC__ -#define __GMP_DECLSPEC_EXPORT __export -#define __GMP_DECLSPEC_IMPORT __import -#endif -#ifdef __IBMC__ -#define __GMP_DECLSPEC_EXPORT _Export -#define __GMP_DECLSPEC_IMPORT _Import -#endif - -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMP -/* compiling to go into a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into an application which will link to a DLL libgmp */ -#define __GMP_DECLSPEC __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC -#endif - - -#ifdef __GMP_SHORT_LIMB -typedef unsigned int mp_limb_t; -typedef int mp_limb_signed_t; -#else -#ifdef _LONG_LONG_LIMB -typedef unsigned long long int mp_limb_t; -typedef long long int mp_limb_signed_t; -#else -typedef unsigned long int mp_limb_t; -typedef long int mp_limb_signed_t; -#endif -#endif -typedef unsigned long int mp_bitcnt_t; - -/* For reference, note that the name __mpz_struct gets into C++ mangled - function names, which means although the "__" suggests an internal, we - must leave this name for binary compatibility. */ -typedef struct -{ - int _mp_alloc; /* Number of *limbs* allocated and pointed - to by the _mp_d field. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpz_struct; - -#endif /* __GNU_MP__ */ - - -typedef __mpz_struct MP_INT; /* gmp 1 source compatibility */ -typedef __mpz_struct mpz_t[1]; - -typedef mp_limb_t * mp_ptr; -typedef const mp_limb_t * mp_srcptr; -#if defined (_CRAY) && ! defined (_CRAYMPP) -/* plain `int' is much faster (48 bits) */ -#define __GMP_MP_SIZE_T_INT 1 -typedef int mp_size_t; -typedef int mp_exp_t; -#else -#define __GMP_MP_SIZE_T_INT 0 -typedef long int mp_size_t; -typedef long int mp_exp_t; -#endif - -typedef struct -{ - __mpz_struct _mp_num; - __mpz_struct _mp_den; -} __mpq_struct; - -typedef __mpq_struct MP_RAT; /* gmp 1 source compatibility */ -typedef __mpq_struct mpq_t[1]; - -typedef struct -{ - int _mp_prec; /* Max precision, in number of `mp_limb_t's. - Set by mpf_init and modified by - mpf_set_prec. The area pointed to by the - _mp_d field contains `prec' + 1 limbs. */ - int _mp_size; /* abs(_mp_size) is the number of limbs the - last field points to. If _mp_size is - negative this is a negative number. */ - mp_exp_t _mp_exp; /* Exponent, in the base of `mp_limb_t'. */ - mp_limb_t *_mp_d; /* Pointer to the limbs. */ -} __mpf_struct; - -/* typedef __mpf_struct MP_FLOAT; */ -typedef __mpf_struct mpf_t[1]; - -/* Available random number generation algorithms. */ -typedef enum -{ - GMP_RAND_ALG_DEFAULT = 0, - GMP_RAND_ALG_LC = GMP_RAND_ALG_DEFAULT /* Linear congruential. */ -} gmp_randalg_t; - -/* Random state struct. */ -typedef struct -{ - mpz_t _mp_seed; /* _mp_d member points to state of the generator. */ - gmp_randalg_t _mp_alg; /* Currently unused. */ - union { - void *_mp_lc; /* Pointer to function pointers structure. */ - } _mp_algdata; -} __gmp_randstate_struct; -typedef __gmp_randstate_struct gmp_randstate_t[1]; - -/* Types for function declarations in gmp files. */ -/* ??? Should not pollute user name space with these ??? */ -typedef const __mpz_struct *mpz_srcptr; -typedef __mpz_struct *mpz_ptr; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -typedef const __mpq_struct *mpq_srcptr; -typedef __mpq_struct *mpq_ptr; - - -/* This is not wanted in mp.h, so put it outside the __GNU_MP__ common - section. */ -#if __GMP_LIBGMP_DLL -#ifdef __GMP_WITHIN_GMPXX -/* compiling to go into a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_EXPORT -#else -/* compiling to go into a application which will link to a DLL libgmpxx */ -#define __GMP_DECLSPEC_XX __GMP_DECLSPEC_IMPORT -#endif -#else -/* all other cases */ -#define __GMP_DECLSPEC_XX -#endif - - -#ifndef __MPN -#define __MPN(x) __gmpn_##x -#endif - -/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4, - defines EOF but not FILE. */ -#if defined (FILE) \ - || defined (H_STDIO) \ - || defined (_H_STDIO) /* AIX */ \ - || defined (_STDIO_H) /* glibc, Sun, SCO */ \ - || defined (_STDIO_H_) /* BSD, OSF */ \ - || defined (__STDIO_H) /* Borland */ \ - || defined (__STDIO_H__) /* IRIX */ \ - || defined (_STDIO_INCLUDED) /* HPUX */ \ - || defined (__dj_include_stdio_h_) /* DJGPP */ \ - || defined (_FILE_DEFINED) /* Microsoft */ \ - || defined (__STDIO__) /* Apple MPW MrC */ \ - || defined (_MSL_STDIO_H) /* Metrowerks */ \ - || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ - || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ - || defined (__STDIO_LOADED) /* VMS */ -#define _GMP_H_HAVE_FILE 1 -#endif - -/* In ISO C, if a prototype involving "struct obstack *" is given without - that structure defined, then the struct is scoped down to just the - prototype, causing a conflict if it's subsequently defined for real. So - only give prototypes if we've got obstack.h. */ -#if defined (_OBSTACK_H) /* glibc */ -#define _GMP_H_HAVE_OBSTACK 1 -#endif - -/* The prototypes for gmp_vprintf etc are provided only if va_list is - available, via an application having included or . - Usually va_list is a typedef so can't be tested directly, but C99 - specifies that va_start is a macro (and it was normally a macro on past - systems too), so look for that. - - will define some sort of va_list for vprintf and vfprintf, but - let's not bother trying to use that since it's not standard and since - application uses for gmp_vprintf etc will almost certainly require the - whole or anyway. */ - -#ifdef va_start -#define _GMP_H_HAVE_VA_LIST 1 -#endif - -/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ -#if defined (__GNUC__) && defined (__GNUC_MINOR__) -#define __GMP_GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -#else -#define __GMP_GNUC_PREREQ(maj, min) 0 -#endif - -/* "pure" is in gcc 2.96 and up, see "(gcc)Function Attributes". Basically - it means a function does nothing but examine its arguments and memory - (global or via arguments) to generate a return value, but changes nothing - and has no side-effects. __GMP_NO_ATTRIBUTE_CONST_PURE lets - tune/common.c etc turn this off when trying to write timing loops. */ -#if __GMP_GNUC_PREREQ (2,96) && ! defined (__GMP_NO_ATTRIBUTE_CONST_PURE) -#define __GMP_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -#define __GMP_ATTRIBUTE_PURE -#endif - - -/* __GMP_CAST allows us to use static_cast in C++, so our macros are clean - to "g++ -Wold-style-cast". - - Casts in "extern inline" code within an extern "C" block don't induce - these warnings, so __GMP_CAST only needs to be used on documented - macros. */ - -#ifdef __cplusplus -#define __GMP_CAST(type, expr) (static_cast (expr)) -#else -#define __GMP_CAST(type, expr) ((type) (expr)) -#endif - - -/* An empty "throw ()" means the function doesn't throw any C++ exceptions, - this can save some stack frame info in applications. - - Currently it's given only on functions which never divide-by-zero etc, - don't allocate memory, and are expected to never need to allocate memory. - This leaves open the possibility of a C++ throw from a future GMP - exceptions scheme. - - mpz_set_ui etc are omitted to leave open the lazy allocation scheme - described in doc/tasks.html. mpz_get_d etc are omitted to leave open - exceptions for float overflows. - - Note that __GMP_NOTHROW must be given on any inlines the same as on their - prototypes (for g++ at least, where they're used together). Note also - that g++ 3.0 demands that __GMP_NOTHROW is before other attributes like - __GMP_ATTRIBUTE_PURE. */ - -#if defined (__cplusplus) -#define __GMP_NOTHROW throw () -#else -#define __GMP_NOTHROW -#endif - - -/* PORTME: What other compilers have a useful "extern inline"? "static - inline" would be an acceptable substitute if the compiler (or linker) - discards unused statics. */ - - /* gcc has __inline__ in all modes, including strict ansi. Give a prototype - for an inline too, so as to correctly specify "dllimport" on windows, in - case the function is called rather than inlined. - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ -#ifdef __GNUC__ -#if (defined __GNUC_STDC_INLINE__) || \ - (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || \ - (__GNUC__ > 4) -#define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) -#endif -#define __GMP_INLINE_PROTOTYPES 1 -#endif - -/* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 - strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 - mode, which is the default), but an unnecessary local copy of foo is - emitted unless -O is used. "extern __inline" is accepted, but the - "extern" appears to be ignored, ie. it becomes a plain global function - but which is inlined within its file. Don't know if all old versions of - DEC C supported __inline, but as a start let's do the right thing for - current versions. */ -#ifdef __DECC -#define __GMP_EXTERN_INLINE static __inline -#endif - -/* SCO OpenUNIX 8 cc supports "static inline foo()" but not in -Xc strict - ANSI mode (__STDC__ is 1 in that mode). Inlining only actually takes - place under -O. Without -O "foo" seems to be emitted whether it's used - or not, which is wasteful. "extern inline foo()" isn't useful, the - "extern" is apparently ignored, so foo is inlined if possible but also - emitted as a global, which causes multiple definition errors when - building a shared libgmp. */ -#ifdef __SCO_VERSION__ -#if __SCO_VERSION__ > 400000000 && __STDC__ != 1 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif -#endif - -/* Microsoft's C compiler accepts __inline */ -#ifdef _MSC_VER -#define __GMP_EXTERN_INLINE __inline -#endif - -/* Recent enough Sun C compilers want "inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Somewhat older Sun C compilers want "static inline" */ -#if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ - && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE static inline -#endif - - -/* C++ always has "inline" and since it's a normal feature the linker should - discard duplicate non-inlined copies, or if it doesn't then that's a - problem for everyone, not just GMP. */ -#if defined (__cplusplus) && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE inline -#endif - -/* Don't do any inlining within a configure run, since if the compiler ends - up emitting copies of the code into the object file it can end up - demanding the various support routines (like mpn_popcount) for linking, - making the "alloca" test and perhaps others fail. And on hppa ia64 a - pre-release gcc 3.2 was seen not respecting the "extern" in "extern - __inline__", triggering this problem too. */ -#if defined (__GMP_WITHIN_CONFIGURE) && ! __GMP_WITHIN_CONFIGURE_INLINE -#undef __GMP_EXTERN_INLINE -#endif - -/* By default, don't give a prototype when there's going to be an inline - version. Note in particular that Cray C++ objects to the combination of - prototype and inline. */ -#ifdef __GMP_EXTERN_INLINE -#ifndef __GMP_INLINE_PROTOTYPES -#define __GMP_INLINE_PROTOTYPES 0 -#endif -#else -#define __GMP_INLINE_PROTOTYPES 1 -#endif - - -#define __GMP_ABS(x) ((x) >= 0 ? (x) : -(x)) -#define __GMP_MAX(h,i) ((h) > (i) ? (h) : (i)) - -/* __GMP_USHRT_MAX is not "~ (unsigned short) 0" because short is promoted - to int by "~". */ -#define __GMP_UINT_MAX (~ (unsigned) 0) -#define __GMP_ULONG_MAX (~ (unsigned long) 0) -#define __GMP_USHRT_MAX ((unsigned short) ~0) - - -/* __builtin_expect is in gcc 3.0, and not in 2.95. */ -#if __GMP_GNUC_PREREQ (3,0) -#define __GMP_LIKELY(cond) __builtin_expect ((cond) != 0, 1) -#define __GMP_UNLIKELY(cond) __builtin_expect ((cond) != 0, 0) -#else -#define __GMP_LIKELY(cond) (cond) -#define __GMP_UNLIKELY(cond) (cond) -#endif - -#ifdef _CRAY -#define __GMP_CRAY_Pragma(str) _Pragma (str) -#else -#define __GMP_CRAY_Pragma(str) -#endif - - -/* Allow direct user access to numerator and denominator of a mpq_t object. */ -#define mpq_numref(Q) (&((Q)->_mp_num)) -#define mpq_denref(Q) (&((Q)->_mp_den)) - - -#if defined (__cplusplus) -extern "C" { -using std::FILE; -#endif - -#define mp_set_memory_functions __gmp_set_memory_functions -__GMP_DECLSPEC void mp_set_memory_functions (void *(*) (size_t), - void *(*) (void *, size_t, size_t), - void (*) (void *, size_t)) __GMP_NOTHROW; - -#define mp_get_memory_functions __gmp_get_memory_functions -__GMP_DECLSPEC void mp_get_memory_functions (void *(**) (size_t), - void *(**) (void *, size_t, size_t), - void (**) (void *, size_t)) __GMP_NOTHROW; - -#define mp_bits_per_limb __gmp_bits_per_limb -__GMP_DECLSPEC extern const int mp_bits_per_limb; - -#define gmp_errno __gmp_errno -__GMP_DECLSPEC extern int gmp_errno; - -#define gmp_version __gmp_version -__GMP_DECLSPEC extern const char * const gmp_version; - - -/**************** Random number routines. ****************/ - -/* obsolete */ -#define gmp_randinit __gmp_randinit -__GMP_DECLSPEC void gmp_randinit (gmp_randstate_t, gmp_randalg_t, ...); - -#define gmp_randinit_default __gmp_randinit_default -__GMP_DECLSPEC void gmp_randinit_default (gmp_randstate_t); - -#define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp -__GMP_DECLSPEC void gmp_randinit_lc_2exp (gmp_randstate_t, mpz_srcptr, unsigned long int, mp_bitcnt_t); - -#define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size (gmp_randstate_t, mp_bitcnt_t); - -#define gmp_randinit_mt __gmp_randinit_mt -__GMP_DECLSPEC void gmp_randinit_mt (gmp_randstate_t); - -#define gmp_randinit_set __gmp_randinit_set -__GMP_DECLSPEC void gmp_randinit_set (gmp_randstate_t, const __gmp_randstate_struct *); - -#define gmp_randseed __gmp_randseed -__GMP_DECLSPEC void gmp_randseed (gmp_randstate_t, mpz_srcptr); - -#define gmp_randseed_ui __gmp_randseed_ui -__GMP_DECLSPEC void gmp_randseed_ui (gmp_randstate_t, unsigned long int); - -#define gmp_randclear __gmp_randclear -__GMP_DECLSPEC void gmp_randclear (gmp_randstate_t); - -#define gmp_urandomb_ui __gmp_urandomb_ui -__GMP_DECLSPEC unsigned long gmp_urandomb_ui (gmp_randstate_t, unsigned long); - -#define gmp_urandomm_ui __gmp_urandomm_ui -__GMP_DECLSPEC unsigned long gmp_urandomm_ui (gmp_randstate_t, unsigned long); - - -/**************** Formatted output routines. ****************/ - -#define gmp_asprintf __gmp_asprintf -__GMP_DECLSPEC int gmp_asprintf (char **, const char *, ...); - -#define gmp_fprintf __gmp_fprintf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fprintf (FILE *, const char *, ...); -#endif - -#define gmp_obstack_printf __gmp_obstack_printf -#if defined (_GMP_H_HAVE_OBSTACK) -__GMP_DECLSPEC int gmp_obstack_printf (struct obstack *, const char *, ...); -#endif - -#define gmp_obstack_vprintf __gmp_obstack_vprintf -#if defined (_GMP_H_HAVE_OBSTACK) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_obstack_vprintf (struct obstack *, const char *, va_list); -#endif - -#define gmp_printf __gmp_printf -__GMP_DECLSPEC int gmp_printf (const char *, ...); - -#define gmp_snprintf __gmp_snprintf -__GMP_DECLSPEC int gmp_snprintf (char *, size_t, const char *, ...); - -#define gmp_sprintf __gmp_sprintf -__GMP_DECLSPEC int gmp_sprintf (char *, const char *, ...); - -#define gmp_vasprintf __gmp_vasprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vasprintf (char **, const char *, va_list); -#endif - -#define gmp_vfprintf __gmp_vfprintf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfprintf (FILE *, const char *, va_list); -#endif - -#define gmp_vprintf __gmp_vprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vprintf (const char *, va_list); -#endif - -#define gmp_vsnprintf __gmp_vsnprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsnprintf (char *, size_t, const char *, va_list); -#endif - -#define gmp_vsprintf __gmp_vsprintf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsprintf (char *, const char *, va_list); -#endif - - -/**************** Formatted input routines. ****************/ - -#define gmp_fscanf __gmp_fscanf -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC int gmp_fscanf (FILE *, const char *, ...); -#endif - -#define gmp_scanf __gmp_scanf -__GMP_DECLSPEC int gmp_scanf (const char *, ...); - -#define gmp_sscanf __gmp_sscanf -__GMP_DECLSPEC int gmp_sscanf (const char *, const char *, ...); - -#define gmp_vfscanf __gmp_vfscanf -#if defined (_GMP_H_HAVE_FILE) && defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vfscanf (FILE *, const char *, va_list); -#endif - -#define gmp_vscanf __gmp_vscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vscanf (const char *, va_list); -#endif - -#define gmp_vsscanf __gmp_vsscanf -#if defined (_GMP_H_HAVE_VA_LIST) -__GMP_DECLSPEC int gmp_vsscanf (const char *, const char *, va_list); -#endif - - -/**************** Integer (i.e. Z) routines. ****************/ - -#define _mpz_realloc __gmpz_realloc -#define mpz_realloc __gmpz_realloc -__GMP_DECLSPEC void *_mpz_realloc (mpz_ptr, mp_size_t); - -#define mpz_abs __gmpz_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_abs) -__GMP_DECLSPEC void mpz_abs (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_add __gmpz_add -__GMP_DECLSPEC void mpz_add (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_add_ui __gmpz_add_ui -__GMP_DECLSPEC void mpz_add_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_addmul __gmpz_addmul -__GMP_DECLSPEC void mpz_addmul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_addmul_ui __gmpz_addmul_ui -__GMP_DECLSPEC void mpz_addmul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_and __gmpz_and -__GMP_DECLSPEC void mpz_and (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_array_init __gmpz_array_init -__GMP_DECLSPEC void mpz_array_init (mpz_ptr, mp_size_t, mp_size_t); - -#define mpz_bin_ui __gmpz_bin_ui -__GMP_DECLSPEC void mpz_bin_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_bin_uiui __gmpz_bin_uiui -__GMP_DECLSPEC void mpz_bin_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_cdiv_q __gmpz_cdiv_q -__GMP_DECLSPEC void mpz_cdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_q_ui __gmpz_cdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_qr __gmpz_cdiv_qr -__GMP_DECLSPEC void mpz_cdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_qr_ui __gmpz_cdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_r __gmpz_cdiv_r -__GMP_DECLSPEC void mpz_cdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_cdiv_r_ui __gmpz_cdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_cdiv_ui __gmpz_cdiv_ui -__GMP_DECLSPEC unsigned long int mpz_cdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_clear __gmpz_clear -__GMP_DECLSPEC void mpz_clear (mpz_ptr); - -#define mpz_clears __gmpz_clears -__GMP_DECLSPEC void mpz_clears (mpz_ptr, ...); - -#define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_cmp __gmpz_cmp -__GMP_DECLSPEC int mpz_cmp (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmp_d __gmpz_cmp_d -__GMP_DECLSPEC int mpz_cmp_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_si __gmpz_cmp_si -__GMP_DECLSPEC int _mpz_cmp_si (mpz_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define _mpz_cmp_ui __gmpz_cmp_ui -__GMP_DECLSPEC int _mpz_cmp_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs __gmpz_cmpabs -__GMP_DECLSPEC int mpz_cmpabs (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_d __gmpz_cmpabs_d -__GMP_DECLSPEC int mpz_cmpabs_d (mpz_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpz_cmpabs_ui __gmpz_cmpabs_ui -__GMP_DECLSPEC int mpz_cmpabs_ui (mpz_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_com __gmpz_com -__GMP_DECLSPEC void mpz_com (mpz_ptr, mpz_srcptr); - -#define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit (mpz_ptr, mp_bitcnt_t); - -#define mpz_congruent_p __gmpz_congruent_p -__GMP_DECLSPEC int mpz_congruent_p (mpz_srcptr, mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p (mpz_srcptr, mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_congruent_ui_p __gmpz_congruent_ui_p -__GMP_DECLSPEC int mpz_congruent_ui_p (mpz_srcptr, unsigned long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divexact __gmpz_divexact -__GMP_DECLSPEC void mpz_divexact (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_divexact_ui __gmpz_divexact_ui -__GMP_DECLSPEC void mpz_divexact_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_divisible_p __gmpz_divisible_p -__GMP_DECLSPEC int mpz_divisible_p (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_ui_p __gmpz_divisible_ui_p -__GMP_DECLSPEC int mpz_divisible_ui_p (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_dump __gmpz_dump -__GMP_DECLSPEC void mpz_dump (mpz_srcptr); - -#define mpz_export __gmpz_export -__GMP_DECLSPEC void *mpz_export (void *, size_t *, int, size_t, int, size_t, mpz_srcptr); - -#define mpz_fac_ui __gmpz_fac_ui -__GMP_DECLSPEC void mpz_fac_ui (mpz_ptr, unsigned long int); - -#define mpz_2fac_ui __gmpz_2fac_ui -__GMP_DECLSPEC void mpz_2fac_ui (mpz_ptr, unsigned long int); - -#define mpz_mfac_uiui __gmpz_mfac_uiui -__GMP_DECLSPEC void mpz_mfac_uiui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_primorial_ui __gmpz_primorial_ui -__GMP_DECLSPEC void mpz_primorial_ui (mpz_ptr, unsigned long int); - -#define mpz_fdiv_q __gmpz_fdiv_q -__GMP_DECLSPEC void mpz_fdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_q_ui __gmpz_fdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_qr __gmpz_fdiv_qr -__GMP_DECLSPEC void mpz_fdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_qr_ui __gmpz_fdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_r __gmpz_fdiv_r -__GMP_DECLSPEC void mpz_fdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_fdiv_r_ui __gmpz_fdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_fdiv_ui __gmpz_fdiv_ui -__GMP_DECLSPEC unsigned long int mpz_fdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_fib_ui __gmpz_fib_ui -__GMP_DECLSPEC void mpz_fib_ui (mpz_ptr, unsigned long int); - -#define mpz_fib2_ui __gmpz_fib2_ui -__GMP_DECLSPEC void mpz_fib2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_fits_sint_p __gmpz_fits_sint_p -__GMP_DECLSPEC int mpz_fits_sint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_slong_p __gmpz_fits_slong_p -__GMP_DECLSPEC int mpz_fits_slong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_sshort_p __gmpz_fits_sshort_p -__GMP_DECLSPEC int mpz_fits_sshort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_fits_uint_p __gmpz_fits_uint_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_DECLSPEC int mpz_fits_uint_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ulong_p __gmpz_fits_ulong_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_DECLSPEC int mpz_fits_ulong_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_fits_ushort_p __gmpz_fits_ushort_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_DECLSPEC int mpz_fits_ushort_p (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_gcd __gmpz_gcd -__GMP_DECLSPEC void mpz_gcd (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_gcd_ui __gmpz_gcd_ui -__GMP_DECLSPEC unsigned long int mpz_gcd_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_gcdext __gmpz_gcdext -__GMP_DECLSPEC void mpz_gcdext (mpz_ptr, mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_get_d __gmpz_get_d -__GMP_DECLSPEC double mpz_get_d (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_get_d_2exp __gmpz_get_d_2exp -__GMP_DECLSPEC double mpz_get_d_2exp (signed long int *, mpz_srcptr); - -#define mpz_get_si __gmpz_get_si -__GMP_DECLSPEC /* signed */ long int mpz_get_si (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_get_str __gmpz_get_str -__GMP_DECLSPEC char *mpz_get_str (char *, int, mpz_srcptr); - -#define mpz_get_ui __gmpz_get_ui -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_get_ui) -__GMP_DECLSPEC unsigned long int mpz_get_ui (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_getlimbn __gmpz_getlimbn -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_getlimbn) -__GMP_DECLSPEC mp_limb_t mpz_getlimbn (mpz_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist (mpz_srcptr, mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_import __gmpz_import -__GMP_DECLSPEC void mpz_import (mpz_ptr, size_t, int, size_t, int, size_t, const void *); - -#define mpz_init __gmpz_init -__GMP_DECLSPEC void mpz_init (mpz_ptr); - -#define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_inits __gmpz_inits -__GMP_DECLSPEC void mpz_inits (mpz_ptr, ...); - -#define mpz_init_set __gmpz_init_set -__GMP_DECLSPEC void mpz_init_set (mpz_ptr, mpz_srcptr); - -#define mpz_init_set_d __gmpz_init_set_d -__GMP_DECLSPEC void mpz_init_set_d (mpz_ptr, double); - -#define mpz_init_set_si __gmpz_init_set_si -__GMP_DECLSPEC void mpz_init_set_si (mpz_ptr, signed long int); - -#define mpz_init_set_str __gmpz_init_set_str -__GMP_DECLSPEC int mpz_init_set_str (mpz_ptr, const char *, int); - -#define mpz_init_set_ui __gmpz_init_set_ui -__GMP_DECLSPEC void mpz_init_set_ui (mpz_ptr, unsigned long int); - -#define mpz_inp_raw __gmpz_inp_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_raw (mpz_ptr, FILE *); -#endif - -#define mpz_inp_str __gmpz_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_inp_str (mpz_ptr, FILE *, int); -#endif - -#define mpz_invert __gmpz_invert -__GMP_DECLSPEC int mpz_invert (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_ior __gmpz_ior -__GMP_DECLSPEC void mpz_ior (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_jacobi __gmpz_jacobi -__GMP_DECLSPEC int mpz_jacobi (mpz_srcptr, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker mpz_jacobi /* alias */ - -#define mpz_kronecker_si __gmpz_kronecker_si -__GMP_DECLSPEC int mpz_kronecker_si (mpz_srcptr, long) __GMP_ATTRIBUTE_PURE; - -#define mpz_kronecker_ui __gmpz_kronecker_ui -__GMP_DECLSPEC int mpz_kronecker_ui (mpz_srcptr, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define mpz_si_kronecker __gmpz_si_kronecker -__GMP_DECLSPEC int mpz_si_kronecker (long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_kronecker __gmpz_ui_kronecker -__GMP_DECLSPEC int mpz_ui_kronecker (unsigned long, mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_lcm __gmpz_lcm -__GMP_DECLSPEC void mpz_lcm (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_lcm_ui __gmpz_lcm_ui -__GMP_DECLSPEC void mpz_lcm_ui (mpz_ptr, mpz_srcptr, unsigned long); - -#define mpz_legendre mpz_jacobi /* alias */ - -#define mpz_lucnum_ui __gmpz_lucnum_ui -__GMP_DECLSPEC void mpz_lucnum_ui (mpz_ptr, unsigned long int); - -#define mpz_lucnum2_ui __gmpz_lucnum2_ui -__GMP_DECLSPEC void mpz_lucnum2_ui (mpz_ptr, mpz_ptr, unsigned long int); - -#define mpz_millerrabin __gmpz_millerrabin -__GMP_DECLSPEC int mpz_millerrabin (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_mod __gmpz_mod -__GMP_DECLSPEC void mpz_mod (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mod_ui mpz_fdiv_r_ui /* same as fdiv_r because divisor unsigned */ - -#define mpz_mul __gmpz_mul -__GMP_DECLSPEC void mpz_mul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_mul_si __gmpz_mul_si -__GMP_DECLSPEC void mpz_mul_si (mpz_ptr, mpz_srcptr, long int); - -#define mpz_mul_ui __gmpz_mul_ui -__GMP_DECLSPEC void mpz_mul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_neg __gmpz_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_neg) -__GMP_DECLSPEC void mpz_neg (mpz_ptr, mpz_srcptr); -#endif - -#define mpz_nextprime __gmpz_nextprime -__GMP_DECLSPEC void mpz_nextprime (mpz_ptr, mpz_srcptr); - -#define mpz_out_raw __gmpz_out_raw -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_raw (FILE *, mpz_srcptr); -#endif - -#define mpz_out_str __gmpz_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpz_out_str (FILE *, int, mpz_srcptr); -#endif - -#define mpz_perfect_power_p __gmpz_perfect_power_p -__GMP_DECLSPEC int mpz_perfect_power_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpz_perfect_square_p __gmpz_perfect_square_p -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_DECLSPEC int mpz_perfect_square_p (mpz_srcptr) __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_popcount __gmpz_popcount -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC mp_bitcnt_t mpz_popcount (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_pow_ui __gmpz_pow_ui -__GMP_DECLSPEC void mpz_pow_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_powm __gmpz_powm -__GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_sec __gmpz_powm_sec -__GMP_DECLSPEC void mpz_powm_sec (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr); - -#define mpz_powm_ui __gmpz_powm_ui -__GMP_DECLSPEC void mpz_powm_ui (mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr); - -#define mpz_probab_prime_p __gmpz_probab_prime_p -__GMP_DECLSPEC int mpz_probab_prime_p (mpz_srcptr, int) __GMP_ATTRIBUTE_PURE; - -#define mpz_random __gmpz_random -__GMP_DECLSPEC void mpz_random (mpz_ptr, mp_size_t); - -#define mpz_random2 __gmpz_random2 -__GMP_DECLSPEC void mpz_random2 (mpz_ptr, mp_size_t); - -#define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 (mpz_ptr, mp_bitcnt_t); - -#define mpz_remove __gmpz_remove -__GMP_DECLSPEC mp_bitcnt_t mpz_remove (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_root __gmpz_root -__GMP_DECLSPEC int mpz_root (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rootrem __gmpz_rootrem -__GMP_DECLSPEC void mpz_rootrem (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_set __gmpz_set -__GMP_DECLSPEC void mpz_set (mpz_ptr, mpz_srcptr); - -#define mpz_set_d __gmpz_set_d -__GMP_DECLSPEC void mpz_set_d (mpz_ptr, double); - -#define mpz_set_f __gmpz_set_f -__GMP_DECLSPEC void mpz_set_f (mpz_ptr, mpf_srcptr); - -#define mpz_set_q __gmpz_set_q -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_set_q) -__GMP_DECLSPEC void mpz_set_q (mpz_ptr, mpq_srcptr); -#endif - -#define mpz_set_si __gmpz_set_si -__GMP_DECLSPEC void mpz_set_si (mpz_ptr, signed long int); - -#define mpz_set_str __gmpz_set_str -__GMP_DECLSPEC int mpz_set_str (mpz_ptr, const char *, int); - -#define mpz_set_ui __gmpz_set_ui -__GMP_DECLSPEC void mpz_set_ui (mpz_ptr, unsigned long int); - -#define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit (mpz_ptr, mp_bitcnt_t); - -#define mpz_size __gmpz_size -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) -__GMP_DECLSPEC size_t mpz_size (mpz_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpz_sizeinbase __gmpz_sizeinbase -__GMP_DECLSPEC size_t mpz_sizeinbase (mpz_srcptr, int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_sqrt __gmpz_sqrt -__GMP_DECLSPEC void mpz_sqrt (mpz_ptr, mpz_srcptr); - -#define mpz_sqrtrem __gmpz_sqrtrem -__GMP_DECLSPEC void mpz_sqrtrem (mpz_ptr, mpz_ptr, mpz_srcptr); - -#define mpz_sub __gmpz_sub -__GMP_DECLSPEC void mpz_sub (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_sub_ui __gmpz_sub_ui -__GMP_DECLSPEC void mpz_sub_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_ui_sub __gmpz_ui_sub -__GMP_DECLSPEC void mpz_ui_sub (mpz_ptr, unsigned long int, mpz_srcptr); - -#define mpz_submul __gmpz_submul -__GMP_DECLSPEC void mpz_submul (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_submul_ui __gmpz_submul_ui -__GMP_DECLSPEC void mpz_submul_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_swap __gmpz_swap -__GMP_DECLSPEC void mpz_swap (mpz_ptr, mpz_ptr) __GMP_NOTHROW; - -#define mpz_tdiv_ui __gmpz_tdiv_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_ui (mpz_srcptr, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpz_tdiv_q __gmpz_tdiv_q -__GMP_DECLSPEC void mpz_tdiv_q (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_q_ui __gmpz_tdiv_q_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_qr __gmpz_tdiv_qr -__GMP_DECLSPEC void mpz_tdiv_qr (mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_qr_ui __gmpz_tdiv_qr_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_qr_ui (mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tdiv_r __gmpz_tdiv_r -__GMP_DECLSPEC void mpz_tdiv_r (mpz_ptr, mpz_srcptr, mpz_srcptr); - -#define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp (mpz_ptr, mpz_srcptr, mp_bitcnt_t); - -#define mpz_tdiv_r_ui __gmpz_tdiv_r_ui -__GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui (mpz_ptr, mpz_srcptr, unsigned long int); - -#define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit (mpz_srcptr, mp_bitcnt_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpz_ui_pow_ui __gmpz_ui_pow_ui -__GMP_DECLSPEC void mpz_ui_pow_ui (mpz_ptr, unsigned long int, unsigned long int); - -#define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb (mpz_ptr, gmp_randstate_t, mp_bitcnt_t); - -#define mpz_urandomm __gmpz_urandomm -__GMP_DECLSPEC void mpz_urandomm (mpz_ptr, gmp_randstate_t, mpz_srcptr); - -#define mpz_xor __gmpz_xor -#define mpz_eor __gmpz_xor -__GMP_DECLSPEC void mpz_xor (mpz_ptr, mpz_srcptr, mpz_srcptr); - - -/**************** Rational (i.e. Q) routines. ****************/ - -#define mpq_abs __gmpq_abs -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_abs) -__GMP_DECLSPEC void mpq_abs (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_add __gmpq_add -__GMP_DECLSPEC void mpq_add (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_canonicalize __gmpq_canonicalize -__GMP_DECLSPEC void mpq_canonicalize (mpq_ptr); - -#define mpq_clear __gmpq_clear -__GMP_DECLSPEC void mpq_clear (mpq_ptr); - -#define mpq_clears __gmpq_clears -__GMP_DECLSPEC void mpq_clears (mpq_ptr, ...); - -#define mpq_cmp __gmpq_cmp -__GMP_DECLSPEC int mpq_cmp (mpq_srcptr, mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_si __gmpq_cmp_si -__GMP_DECLSPEC int _mpq_cmp_si (mpq_srcptr, long, unsigned long) __GMP_ATTRIBUTE_PURE; - -#define _mpq_cmp_ui __gmpq_cmp_ui -__GMP_DECLSPEC int _mpq_cmp_ui (mpq_srcptr, unsigned long int, unsigned long int) __GMP_ATTRIBUTE_PURE; - -#define mpq_div __gmpq_div -__GMP_DECLSPEC void mpq_div (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_equal __gmpq_equal -__GMP_DECLSPEC int mpq_equal (mpq_srcptr, mpq_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpq_get_num __gmpq_get_num -__GMP_DECLSPEC void mpq_get_num (mpz_ptr, mpq_srcptr); - -#define mpq_get_den __gmpq_get_den -__GMP_DECLSPEC void mpq_get_den (mpz_ptr, mpq_srcptr); - -#define mpq_get_d __gmpq_get_d -__GMP_DECLSPEC double mpq_get_d (mpq_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpq_get_str __gmpq_get_str -__GMP_DECLSPEC char *mpq_get_str (char *, int, mpq_srcptr); - -#define mpq_init __gmpq_init -__GMP_DECLSPEC void mpq_init (mpq_ptr); - -#define mpq_inits __gmpq_inits -__GMP_DECLSPEC void mpq_inits (mpq_ptr, ...); - -#define mpq_inp_str __gmpq_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_inp_str (mpq_ptr, FILE *, int); -#endif - -#define mpq_inv __gmpq_inv -__GMP_DECLSPEC void mpq_inv (mpq_ptr, mpq_srcptr); - -#define mpq_mul __gmpq_mul -__GMP_DECLSPEC void mpq_mul (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp (mpq_ptr, mpq_srcptr, mp_bitcnt_t); - -#define mpq_neg __gmpq_neg -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) -__GMP_DECLSPEC void mpq_neg (mpq_ptr, mpq_srcptr); -#endif - -#define mpq_out_str __gmpq_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpq_out_str (FILE *, int, mpq_srcptr); -#endif - -#define mpq_set __gmpq_set -__GMP_DECLSPEC void mpq_set (mpq_ptr, mpq_srcptr); - -#define mpq_set_d __gmpq_set_d -__GMP_DECLSPEC void mpq_set_d (mpq_ptr, double); - -#define mpq_set_den __gmpq_set_den -__GMP_DECLSPEC void mpq_set_den (mpq_ptr, mpz_srcptr); - -#define mpq_set_f __gmpq_set_f -__GMP_DECLSPEC void mpq_set_f (mpq_ptr, mpf_srcptr); - -#define mpq_set_num __gmpq_set_num -__GMP_DECLSPEC void mpq_set_num (mpq_ptr, mpz_srcptr); - -#define mpq_set_si __gmpq_set_si -__GMP_DECLSPEC void mpq_set_si (mpq_ptr, signed long int, unsigned long int); - -#define mpq_set_str __gmpq_set_str -__GMP_DECLSPEC int mpq_set_str (mpq_ptr, const char *, int); - -#define mpq_set_ui __gmpq_set_ui -__GMP_DECLSPEC void mpq_set_ui (mpq_ptr, unsigned long int, unsigned long int); - -#define mpq_set_z __gmpq_set_z -__GMP_DECLSPEC void mpq_set_z (mpq_ptr, mpz_srcptr); - -#define mpq_sub __gmpq_sub -__GMP_DECLSPEC void mpq_sub (mpq_ptr, mpq_srcptr, mpq_srcptr); - -#define mpq_swap __gmpq_swap -__GMP_DECLSPEC void mpq_swap (mpq_ptr, mpq_ptr) __GMP_NOTHROW; - - -/**************** Float (i.e. F) routines. ****************/ - -#define mpf_abs __gmpf_abs -__GMP_DECLSPEC void mpf_abs (mpf_ptr, mpf_srcptr); - -#define mpf_add __gmpf_add -__GMP_DECLSPEC void mpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_add_ui __gmpf_add_ui -__GMP_DECLSPEC void mpf_add_ui (mpf_ptr, mpf_srcptr, unsigned long int); -#define mpf_ceil __gmpf_ceil -__GMP_DECLSPEC void mpf_ceil (mpf_ptr, mpf_srcptr); - -#define mpf_clear __gmpf_clear -__GMP_DECLSPEC void mpf_clear (mpf_ptr); - -#define mpf_clears __gmpf_clears -__GMP_DECLSPEC void mpf_clears (mpf_ptr, ...); - -#define mpf_cmp __gmpf_cmp -__GMP_DECLSPEC int mpf_cmp (mpf_srcptr, mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_d __gmpf_cmp_d -__GMP_DECLSPEC int mpf_cmp_d (mpf_srcptr, double) __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_si __gmpf_cmp_si -__GMP_DECLSPEC int mpf_cmp_si (mpf_srcptr, signed long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_cmp_ui __gmpf_cmp_ui -__GMP_DECLSPEC int mpf_cmp_ui (mpf_srcptr, unsigned long int) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_div __gmpf_div -__GMP_DECLSPEC void mpf_div (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_div_ui __gmpf_div_ui -__GMP_DECLSPEC void mpf_div_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_dump __gmpf_dump -__GMP_DECLSPEC void mpf_dump (mpf_srcptr); - -#define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq (mpf_srcptr, mpf_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sint_p __gmpf_fits_sint_p -__GMP_DECLSPEC int mpf_fits_sint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_slong_p __gmpf_fits_slong_p -__GMP_DECLSPEC int mpf_fits_slong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_sshort_p __gmpf_fits_sshort_p -__GMP_DECLSPEC int mpf_fits_sshort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_uint_p __gmpf_fits_uint_p -__GMP_DECLSPEC int mpf_fits_uint_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ulong_p __gmpf_fits_ulong_p -__GMP_DECLSPEC int mpf_fits_ulong_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_fits_ushort_p __gmpf_fits_ushort_p -__GMP_DECLSPEC int mpf_fits_ushort_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_floor __gmpf_floor -__GMP_DECLSPEC void mpf_floor (mpf_ptr, mpf_srcptr); - -#define mpf_get_d __gmpf_get_d -__GMP_DECLSPEC double mpf_get_d (mpf_srcptr) __GMP_ATTRIBUTE_PURE; - -#define mpf_get_d_2exp __gmpf_get_d_2exp -__GMP_DECLSPEC double mpf_get_d_2exp (signed long int *, mpf_srcptr); - -#define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec (void) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_si __gmpf_get_si -__GMP_DECLSPEC long mpf_get_si (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_get_str __gmpf_get_str -__GMP_DECLSPEC char *mpf_get_str (char *, mp_exp_t *, int, size_t, mpf_srcptr); - -#define mpf_get_ui __gmpf_get_ui -__GMP_DECLSPEC unsigned long mpf_get_ui (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_init __gmpf_init -__GMP_DECLSPEC void mpf_init (mpf_ptr); - -#define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 (mpf_ptr, mp_bitcnt_t); - -#define mpf_inits __gmpf_inits -__GMP_DECLSPEC void mpf_inits (mpf_ptr, ...); - -#define mpf_init_set __gmpf_init_set -__GMP_DECLSPEC void mpf_init_set (mpf_ptr, mpf_srcptr); - -#define mpf_init_set_d __gmpf_init_set_d -__GMP_DECLSPEC void mpf_init_set_d (mpf_ptr, double); - -#define mpf_init_set_si __gmpf_init_set_si -__GMP_DECLSPEC void mpf_init_set_si (mpf_ptr, signed long int); - -#define mpf_init_set_str __gmpf_init_set_str -__GMP_DECLSPEC int mpf_init_set_str (mpf_ptr, const char *, int); - -#define mpf_init_set_ui __gmpf_init_set_ui -__GMP_DECLSPEC void mpf_init_set_ui (mpf_ptr, unsigned long int); - -#define mpf_inp_str __gmpf_inp_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_inp_str (mpf_ptr, FILE *, int); -#endif - -#define mpf_integer_p __gmpf_integer_p -__GMP_DECLSPEC int mpf_integer_p (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_mul __gmpf_mul -__GMP_DECLSPEC void mpf_mul (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp (mpf_ptr, mpf_srcptr, mp_bitcnt_t); - -#define mpf_mul_ui __gmpf_mul_ui -__GMP_DECLSPEC void mpf_mul_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_neg __gmpf_neg -__GMP_DECLSPEC void mpf_neg (mpf_ptr, mpf_srcptr); - -#define mpf_out_str __gmpf_out_str -#ifdef _GMP_H_HAVE_FILE -__GMP_DECLSPEC size_t mpf_out_str (FILE *, int, size_t, mpf_srcptr); -#endif - -#define mpf_pow_ui __gmpf_pow_ui -__GMP_DECLSPEC void mpf_pow_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_random2 __gmpf_random2 -__GMP_DECLSPEC void mpf_random2 (mpf_ptr, mp_size_t, mp_exp_t); - -#define mpf_reldiff __gmpf_reldiff -__GMP_DECLSPEC void mpf_reldiff (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_set __gmpf_set -__GMP_DECLSPEC void mpf_set (mpf_ptr, mpf_srcptr); - -#define mpf_set_d __gmpf_set_d -__GMP_DECLSPEC void mpf_set_d (mpf_ptr, double); - -#define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec (mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec (mpf_ptr, mp_bitcnt_t); - -#define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw (mpf_ptr, mp_bitcnt_t) __GMP_NOTHROW; - -#define mpf_set_q __gmpf_set_q -__GMP_DECLSPEC void mpf_set_q (mpf_ptr, mpq_srcptr); - -#define mpf_set_si __gmpf_set_si -__GMP_DECLSPEC void mpf_set_si (mpf_ptr, signed long int); - -#define mpf_set_str __gmpf_set_str -__GMP_DECLSPEC int mpf_set_str (mpf_ptr, const char *, int); - -#define mpf_set_ui __gmpf_set_ui -__GMP_DECLSPEC void mpf_set_ui (mpf_ptr, unsigned long int); - -#define mpf_set_z __gmpf_set_z -__GMP_DECLSPEC void mpf_set_z (mpf_ptr, mpz_srcptr); - -#define mpf_size __gmpf_size -__GMP_DECLSPEC size_t mpf_size (mpf_srcptr) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpf_sqrt __gmpf_sqrt -__GMP_DECLSPEC void mpf_sqrt (mpf_ptr, mpf_srcptr); - -#define mpf_sqrt_ui __gmpf_sqrt_ui -__GMP_DECLSPEC void mpf_sqrt_ui (mpf_ptr, unsigned long int); - -#define mpf_sub __gmpf_sub -__GMP_DECLSPEC void mpf_sub (mpf_ptr, mpf_srcptr, mpf_srcptr); - -#define mpf_sub_ui __gmpf_sub_ui -__GMP_DECLSPEC void mpf_sub_ui (mpf_ptr, mpf_srcptr, unsigned long int); - -#define mpf_swap __gmpf_swap -__GMP_DECLSPEC void mpf_swap (mpf_ptr, mpf_ptr) __GMP_NOTHROW; - -#define mpf_trunc __gmpf_trunc -__GMP_DECLSPEC void mpf_trunc (mpf_ptr, mpf_srcptr); - -#define mpf_ui_div __gmpf_ui_div -__GMP_DECLSPEC void mpf_ui_div (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_ui_sub __gmpf_ui_sub -__GMP_DECLSPEC void mpf_ui_sub (mpf_ptr, unsigned long int, mpf_srcptr); - -#define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb (mpf_t, gmp_randstate_t, mp_bitcnt_t); - - -/************ Low level positive-integer (i.e. N) routines. ************/ - -/* This is ugly, but we need to make user calls reach the prefixed function. */ - -#define mpn_add __MPN(add) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add) -__GMP_DECLSPEC mp_limb_t mpn_add (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_add_1 __MPN(add_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_add_1) -__GMP_DECLSPEC mp_limb_t mpn_add_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_add_n __MPN(add_n) -__GMP_DECLSPEC mp_limb_t mpn_add_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_addmul_1 __MPN(addmul_1) -__GMP_DECLSPEC mp_limb_t mpn_addmul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_cmp __MPN(cmp) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) -__GMP_DECLSPEC int mpn_cmp (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; -#endif - -#define mpn_divexact_by3(dst,src,size) \ - mpn_divexact_by3c (dst, src, size, __GMP_CAST (mp_limb_t, 0)) - -#define mpn_divexact_by3c __MPN(divexact_by3c) -__GMP_DECLSPEC mp_limb_t mpn_divexact_by3c (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divmod_1(qp,np,nsize,dlimb) \ - mpn_divrem_1 (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dlimb) - -#define mpn_divrem __MPN(divrem) -__GMP_DECLSPEC mp_limb_t mpn_divrem (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_divrem_1 __MPN(divrem_1) -__GMP_DECLSPEC mp_limb_t mpn_divrem_1 (mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_divrem_2 __MPN(divrem_2) -__GMP_DECLSPEC mp_limb_t mpn_divrem_2 (mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_srcptr); - -#define mpn_div_qr_2 __MPN(div_qr_2) -__GMP_DECLSPEC mp_limb_t mpn_div_qr_2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr); - -#define mpn_gcd __MPN(gcd) -__GMP_DECLSPEC mp_size_t mpn_gcd (mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_gcd_1 __MPN(gcd_1) -__GMP_DECLSPEC mp_limb_t mpn_gcd_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_gcdext_1 __MPN(gcdext_1) -__GMP_DECLSPEC mp_limb_t mpn_gcdext_1 (mp_limb_signed_t *, mp_limb_signed_t *, mp_limb_t, mp_limb_t); - -#define mpn_gcdext __MPN(gcdext) -__GMP_DECLSPEC mp_size_t mpn_gcdext (mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t); - -#define mpn_get_str __MPN(get_str) -__GMP_DECLSPEC size_t mpn_get_str (unsigned char *, int, mp_ptr, mp_size_t); - -#define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist (mp_srcptr, mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_lshift __MPN(lshift) -__GMP_DECLSPEC mp_limb_t mpn_lshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_mod_1 __MPN(mod_1) -__GMP_DECLSPEC mp_limb_t mpn_mod_1 (mp_srcptr, mp_size_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_mul __MPN(mul) -__GMP_DECLSPEC mp_limb_t mpn_mul (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_mul_1 __MPN(mul_1) -__GMP_DECLSPEC mp_limb_t mpn_mul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_mul_n __MPN(mul_n) -__GMP_DECLSPEC void mpn_mul_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_sqr __MPN(sqr) -__GMP_DECLSPEC void mpn_sqr (mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_neg __MPN(neg) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) -__GMP_DECLSPEC mp_limb_t mpn_neg (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_com __MPN(com) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) -__GMP_DECLSPEC void mpn_com (mp_ptr, mp_srcptr, mp_size_t); -#endif - -#define mpn_perfect_square_p __MPN(perfect_square_p) -__GMP_DECLSPEC int mpn_perfect_square_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_perfect_power_p __MPN(perfect_power_p) -__GMP_DECLSPEC int mpn_perfect_power_p (mp_srcptr, mp_size_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC mp_bitcnt_t mpn_popcount (mp_srcptr, mp_size_t) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; - -#define mpn_pow_1 __MPN(pow_1) -__GMP_DECLSPEC mp_size_t mpn_pow_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr); - -/* undocumented now, but retained here for upward compatibility */ -#define mpn_preinv_mod_1 __MPN(preinv_mod_1) -__GMP_DECLSPEC mp_limb_t mpn_preinv_mod_1 (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_random __MPN(random) -__GMP_DECLSPEC void mpn_random (mp_ptr, mp_size_t); - -#define mpn_random2 __MPN(random2) -__GMP_DECLSPEC void mpn_random2 (mp_ptr, mp_size_t); - -#define mpn_rshift __MPN(rshift) -__GMP_DECLSPEC mp_limb_t mpn_rshift (mp_ptr, mp_srcptr, mp_size_t, unsigned int); - -#define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 (mp_srcptr, mp_bitcnt_t) __GMP_ATTRIBUTE_PURE; - -#define mpn_set_str __MPN(set_str) -__GMP_DECLSPEC mp_size_t mpn_set_str (mp_ptr, const unsigned char *, size_t, int); - -#define mpn_sqrtrem __MPN(sqrtrem) -__GMP_DECLSPEC mp_size_t mpn_sqrtrem (mp_ptr, mp_ptr, mp_srcptr, mp_size_t); - -#define mpn_sub __MPN(sub) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub) -__GMP_DECLSPEC mp_limb_t mpn_sub (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); -#endif - -#define mpn_sub_1 __MPN(sub_1) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_sub_1) -__GMP_DECLSPEC mp_limb_t mpn_sub_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t) __GMP_NOTHROW; -#endif - -#define mpn_sub_n __MPN(sub_n) -__GMP_DECLSPEC mp_limb_t mpn_sub_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_submul_1 __MPN(submul_1) -__GMP_DECLSPEC mp_limb_t mpn_submul_1 (mp_ptr, mp_srcptr, mp_size_t, mp_limb_t); - -#define mpn_tdiv_qr __MPN(tdiv_qr) -__GMP_DECLSPEC void mpn_tdiv_qr (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t); - -#define mpn_and_n __MPN(and_n) -__GMP_DECLSPEC void mpn_and_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_andn_n __MPN(andn_n) -__GMP_DECLSPEC void mpn_andn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nand_n __MPN(nand_n) -__GMP_DECLSPEC void mpn_nand_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_ior_n __MPN(ior_n) -__GMP_DECLSPEC void mpn_ior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_iorn_n __MPN(iorn_n) -__GMP_DECLSPEC void mpn_iorn_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_nior_n __MPN(nior_n) -__GMP_DECLSPEC void mpn_nior_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xor_n __MPN(xor_n) -__GMP_DECLSPEC void mpn_xor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); -#define mpn_xnor_n __MPN(xnor_n) -__GMP_DECLSPEC void mpn_xnor_n (mp_ptr, mp_srcptr, mp_srcptr, mp_size_t); - -#define mpn_copyi __MPN(copyi) -__GMP_DECLSPEC void mpn_copyi (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_copyd __MPN(copyd) -__GMP_DECLSPEC void mpn_copyd (mp_ptr, mp_srcptr, mp_size_t); -#define mpn_zero __MPN(zero) -__GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); - -/**************** mpz inlines ****************/ - -/* The following are provided as inlines where possible, but always exist as - library functions too, for binary compatibility. - - Within gmp itself this inlining generally isn't relied on, since it - doesn't get done for all compilers, whereas if something is worth - inlining then it's worth arranging always. - - There are two styles of inlining here. When the same bit of code is - wanted for the inline as for the library version, then __GMP_FORCE_foo - arranges for that code to be emitted and the __GMP_EXTERN_INLINE - directive suppressed, eg. mpz_fits_uint_p. When a different bit of code - is wanted for the inline than for the library version, then - __GMP_FORCE_foo arranges the inline to be suppressed, eg. mpz_abs. */ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_abs) -__GMP_EXTERN_INLINE void -mpz_abs (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = __GMP_ABS (__gmp_w->_mp_size); -} -#endif - -#if GMP_NAIL_BITS == 0 -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval)); -#else -#define __GMPZ_FITS_UTYPE_P(z,maxval) \ - mp_size_t __gmp_n = z->_mp_size; \ - mp_ptr __gmp_p = z->_mp_d; \ - return (__gmp_n == 0 || (__gmp_n == 1 && __gmp_p[0] <= maxval) \ - || (__gmp_n == 2 && __gmp_p[1] <= ((mp_limb_t) maxval >> GMP_NUMB_BITS))); -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_uint_p) -#if ! defined (__GMP_FORCE_mpz_fits_uint_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_uint_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_UINT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ulong_p) -#if ! defined (__GMP_FORCE_mpz_fits_ulong_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ulong_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_ULONG_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_fits_ushort_p) -#if ! defined (__GMP_FORCE_mpz_fits_ushort_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_fits_ushort_p (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - __GMPZ_FITS_UTYPE_P (__gmp_z, __GMP_USHRT_MAX); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_get_ui) -#if ! defined (__GMP_FORCE_mpz_get_ui) -__GMP_EXTERN_INLINE -#endif -unsigned long -mpz_get_ui (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - mp_ptr __gmp_p = __gmp_z->_mp_d; - mp_size_t __gmp_n = __gmp_z->_mp_size; - mp_limb_t __gmp_l = __gmp_p[0]; - /* This is a "#if" rather than a plain "if" so as to avoid gcc warnings - about "<< GMP_NUMB_BITS" exceeding the type size, and to avoid Borland - C++ 6.0 warnings about condition always true for something like - "__GMP_ULONG_MAX < GMP_NUMB_MASK". */ -#if GMP_NAIL_BITS == 0 || defined (_LONG_LONG_LIMB) - /* limb==long and no nails, or limb==longlong, one limb is enough */ - return (__gmp_n != 0 ? __gmp_l : 0); -#else - /* limb==long and nails, need two limbs when available */ - __gmp_n = __GMP_ABS (__gmp_n); - if (__gmp_n <= 1) - return (__gmp_n != 0 ? __gmp_l : 0); - else - return __gmp_l + (__gmp_p[1] << GMP_NUMB_BITS); -#endif -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_getlimbn) -#if ! defined (__GMP_FORCE_mpz_getlimbn) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpz_getlimbn (mpz_srcptr __gmp_z, mp_size_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_result = 0; - if (__GMP_LIKELY (__gmp_n >= 0 && __gmp_n < __GMP_ABS (__gmp_z->_mp_size))) - __gmp_result = __gmp_z->_mp_d[__gmp_n]; - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpz_neg) -__GMP_EXTERN_INLINE void -mpz_neg (mpz_ptr __gmp_w, mpz_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpz_set (__gmp_w, __gmp_u); - __gmp_w->_mp_size = - __gmp_w->_mp_size; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_perfect_square_p) -#if ! defined (__GMP_FORCE_mpz_perfect_square_p) -__GMP_EXTERN_INLINE -#endif -int -mpz_perfect_square_p (mpz_srcptr __gmp_a) -{ - mp_size_t __gmp_asize; - int __gmp_result; - - __gmp_asize = __gmp_a->_mp_size; - __gmp_result = (__gmp_asize >= 0); /* zero is a square, negatives are not */ - if (__GMP_LIKELY (__gmp_asize > 0)) - __gmp_result = mpn_perfect_square_p (__gmp_a->_mp_d, __gmp_asize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_popcount) -#if ! defined (__GMP_FORCE_mpz_popcount) -__GMP_EXTERN_INLINE -#endif -mp_bitcnt_t -mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW -{ - mp_size_t __gmp_usize; - mp_bitcnt_t __gmp_result; - - __gmp_usize = __gmp_u->_mp_size; - __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); - if (__GMP_LIKELY (__gmp_usize > 0)) - __gmp_result = mpn_popcount (__gmp_u->_mp_d, __gmp_usize); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_set_q) -#if ! defined (__GMP_FORCE_mpz_set_q) -__GMP_EXTERN_INLINE -#endif -void -mpz_set_q (mpz_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - mpz_tdiv_q (__gmp_w, mpq_numref (__gmp_u), mpq_denref (__gmp_u)); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpz_size) -#if ! defined (__GMP_FORCE_mpz_size) -__GMP_EXTERN_INLINE -#endif -size_t -mpz_size (mpz_srcptr __gmp_z) __GMP_NOTHROW -{ - return __GMP_ABS (__gmp_z->_mp_size); -} -#endif - - -/**************** mpq inlines ****************/ - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_abs) -__GMP_EXTERN_INLINE void -mpq_abs (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = __GMP_ABS (__gmp_w->_mp_num._mp_size); -} -#endif - -#if defined (__GMP_EXTERN_INLINE) && ! defined (__GMP_FORCE_mpq_neg) -__GMP_EXTERN_INLINE void -mpq_neg (mpq_ptr __gmp_w, mpq_srcptr __gmp_u) -{ - if (__gmp_w != __gmp_u) - mpq_set (__gmp_w, __gmp_u); - __gmp_w->_mp_num._mp_size = - __gmp_w->_mp_num._mp_size; -} -#endif - - -/**************** mpn inlines ****************/ - -/* The comments with __GMPN_ADD_1 below apply here too. - - The test for FUNCTION returning 0 should predict well. If it's assumed - {yp,ysize} will usually have a random number of bits then the high limb - won't be full and a carry out will occur a good deal less than 50% of the - time. - - ysize==0 isn't a documented feature, but is used internally in a few - places. - - Producing cout last stops it using up a register during the main part of - the calculation, though gcc (as of 3.0) on an "if (mpn_add (...))" - doesn't seem able to move the true and false legs of the conditional up - to the two places cout is generated. */ - -#define __GMPN_AORS(cout, wp, xp, xsize, yp, ysize, FUNCTION, TEST) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x; \ - \ - /* ASSERT ((ysize) >= 0); */ \ - /* ASSERT ((xsize) >= (ysize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, xp, xsize)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE2_P (wp, xsize, yp, ysize)); */ \ - \ - __gmp_i = (ysize); \ - if (__gmp_i != 0) \ - { \ - if (FUNCTION (wp, xp, yp, __gmp_i)) \ - { \ - do \ - { \ - if (__gmp_i >= (xsize)) \ - { \ - (cout) = 1; \ - goto __gmp_done; \ - } \ - __gmp_x = (xp)[__gmp_i]; \ - } \ - while (TEST); \ - } \ - } \ - if ((wp) != (xp)) \ - __GMPN_COPY_REST (wp, xp, xsize, __gmp_i); \ - (cout) = 0; \ - __gmp_done: \ - ; \ - } while (0) - -#define __GMPN_ADD(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_add_n, \ - (((wp)[__gmp_i++] = (__gmp_x + 1) & GMP_NUMB_MASK) == 0)) -#define __GMPN_SUB(cout, wp, xp, xsize, yp, ysize) \ - __GMPN_AORS (cout, wp, xp, xsize, yp, ysize, mpn_sub_n, \ - (((wp)[__gmp_i++] = (__gmp_x - 1) & GMP_NUMB_MASK), __gmp_x == 0)) - - -/* The use of __gmp_i indexing is designed to ensure a compile time src==dst - remains nice and clear to the compiler, so that __GMPN_COPY_REST can - disappear, and the load/add/store gets a chance to become a - read-modify-write on CISC CPUs. - - Alternatives: - - Using a pair of pointers instead of indexing would be possible, but gcc - isn't able to recognise compile-time src==dst in that case, even when the - pointers are incremented more or less together. Other compilers would - very likely have similar difficulty. - - gcc could use "if (__builtin_constant_p(src==dst) && src==dst)" or - similar to detect a compile-time src==dst. This works nicely on gcc - 2.95.x, it's not good on gcc 3.0 where __builtin_constant_p(p==p) seems - to be always false, for a pointer p. But the current code form seems - good enough for src==dst anyway. - - gcc on x86 as usual doesn't give particularly good flags handling for the - carry/borrow detection. It's tempting to want some multi instruction asm - blocks to help it, and this was tried, but in truth there's only a few - instructions to save and any gain is all too easily lost by register - juggling setting up for the asm. */ - -#if GMP_NAIL_BITS == 0 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r; \ - if (CB (__gmp_r, __gmp_x, (v))) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r; \ - ++__gmp_i; \ - if (!CB (__gmp_r, __gmp_x, 1)) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#if GMP_NAIL_BITS >= 1 -#define __GMPN_AORS_1(cout, dst, src, n, v, OP, CB) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_r; \ - \ - /* ASSERT ((n) >= 1); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, n)); */ \ - \ - __gmp_x = (src)[0]; \ - __gmp_r = __gmp_x OP (v); \ - (dst)[0] = __gmp_r & GMP_NUMB_MASK; \ - if (__gmp_r >> GMP_NUMB_BITS != 0) \ - { \ - (cout) = 1; \ - for (__gmp_i = 1; __gmp_i < (n);) \ - { \ - __gmp_x = (src)[__gmp_i]; \ - __gmp_r = __gmp_x OP 1; \ - (dst)[__gmp_i] = __gmp_r & GMP_NUMB_MASK; \ - ++__gmp_i; \ - if (__gmp_r >> GMP_NUMB_BITS == 0) \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, __gmp_i); \ - (cout) = 0; \ - break; \ - } \ - } \ - } \ - else \ - { \ - if ((src) != (dst)) \ - __GMPN_COPY_REST (dst, src, n, 1); \ - (cout) = 0; \ - } \ - } while (0) -#endif - -#define __GMPN_ADDCB(r,x,y) ((r) < (y)) -#define __GMPN_SUBCB(r,x,y) ((x) < (y)) - -#define __GMPN_ADD_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, +, __GMPN_ADDCB) -#define __GMPN_SUB_1(cout, dst, src, n, v) \ - __GMPN_AORS_1(cout, dst, src, n, v, -, __GMPN_SUBCB) - - -/* Compare {xp,size} and {yp,size}, setting "result" to positive, zero or - negative. size==0 is allowed. On random data usually only one limb will - need to be examined to get a result, so it's worth having it inline. */ -#define __GMPN_CMP(result, xp, yp, size) \ - do { \ - mp_size_t __gmp_i; \ - mp_limb_t __gmp_x, __gmp_y; \ - \ - /* ASSERT ((size) >= 0); */ \ - \ - (result) = 0; \ - __gmp_i = (size); \ - while (--__gmp_i >= 0) \ - { \ - __gmp_x = (xp)[__gmp_i]; \ - __gmp_y = (yp)[__gmp_i]; \ - if (__gmp_x != __gmp_y) \ - { \ - /* Cannot use __gmp_x - __gmp_y, may overflow an "int" */ \ - (result) = (__gmp_x > __gmp_y ? 1 : -1); \ - break; \ - } \ - } \ - } while (0) - - -#if defined (__GMPN_COPY) && ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - __GMPN_COPY ((dst)+(start), (src)+(start), (size)-(start)); \ - } while (0) -#endif - -/* Copy {src,size} to {dst,size}, starting at "start". This is designed to - keep the indexing dst[j] and src[j] nice and simple for __GMPN_ADD_1, - __GMPN_ADD, etc. */ -#if ! defined (__GMPN_COPY_REST) -#define __GMPN_COPY_REST(dst, src, size, start) \ - do { \ - mp_size_t __gmp_j; \ - /* ASSERT ((size) >= 0); */ \ - /* ASSERT ((start) >= 0); */ \ - /* ASSERT ((start) <= (size)); */ \ - /* ASSERT (MPN_SAME_OR_SEPARATE_P (dst, src, size)); */ \ - __GMP_CRAY_Pragma ("_CRI ivdep"); \ - for (__gmp_j = (start); __gmp_j < (size); __gmp_j++) \ - (dst)[__gmp_j] = (src)[__gmp_j]; \ - } while (0) -#endif - -/* Enhancement: Use some of the smarter code from gmp-impl.h. Maybe use - mpn_copyi if there's a native version, and if we don't mind demanding - binary compatibility for it (on targets which use it). */ - -#if ! defined (__GMPN_COPY) -#define __GMPN_COPY(dst, src, size) __GMPN_COPY_REST (dst, src, size, 0) -#endif - - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add) -#if ! defined (__GMP_FORCE_mpn_add) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_ADD (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_add_1) -#if ! defined (__GMP_FORCE_mpn_add_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_add_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_ADD_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_cmp) -#if ! defined (__GMP_FORCE_mpn_cmp) -__GMP_EXTERN_INLINE -#endif -int -mpn_cmp (mp_srcptr __gmp_xp, mp_srcptr __gmp_yp, mp_size_t __gmp_size) __GMP_NOTHROW -{ - int __gmp_result; - __GMPN_CMP (__gmp_result, __gmp_xp, __gmp_yp, __gmp_size); - return __gmp_result; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub) -#if ! defined (__GMP_FORCE_mpn_sub) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub (mp_ptr __gmp_wp, mp_srcptr __gmp_xp, mp_size_t __gmp_xsize, mp_srcptr __gmp_yp, mp_size_t __gmp_ysize) -{ - mp_limb_t __gmp_c; - __GMPN_SUB (__gmp_c, __gmp_wp, __gmp_xp, __gmp_xsize, __gmp_yp, __gmp_ysize); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_sub_1) -#if ! defined (__GMP_FORCE_mpn_sub_1) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_sub_1 (mp_ptr __gmp_dst, mp_srcptr __gmp_src, mp_size_t __gmp_size, mp_limb_t __gmp_n) __GMP_NOTHROW -{ - mp_limb_t __gmp_c; - __GMPN_SUB_1 (__gmp_c, __gmp_dst, __gmp_src, __gmp_size, __gmp_n); - return __gmp_c; -} -#endif - -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) -#if ! defined (__GMP_FORCE_mpn_neg) -__GMP_EXTERN_INLINE -#endif -mp_limb_t -mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) -{ - mp_limb_t __gmp_ul, __gmp_cy; - __gmp_cy = 0; - do { - __gmp_ul = *__gmp_up++; - *__gmp_rp++ = -__gmp_ul - __gmp_cy; - __gmp_cy |= __gmp_ul != 0; - } while (--__gmp_n != 0); - return __gmp_cy; -} -#endif - -#if defined (__cplusplus) -} -#endif - - -/* Allow faster testing for negative, zero, and positive. */ -#define mpz_sgn(Z) ((Z)->_mp_size < 0 ? -1 : (Z)->_mp_size > 0) -#define mpf_sgn(F) ((F)->_mp_size < 0 ? -1 : (F)->_mp_size > 0) -#define mpq_sgn(Q) ((Q)->_mp_num._mp_size < 0 ? -1 : (Q)->_mp_num._mp_size > 0) - -/* When using GCC, optimize certain common comparisons. */ -#if defined (__GNUC__) && __GNUC__ >= 2 -#define mpz_cmp_ui(Z,UI) \ - (__builtin_constant_p (UI) && (UI) == 0 \ - ? mpz_sgn (Z) : _mpz_cmp_ui (Z,UI)) -#define mpz_cmp_si(Z,SI) \ - (__builtin_constant_p (SI) && (SI) == 0 ? mpz_sgn (Z) \ - : __builtin_constant_p (SI) && (SI) > 0 \ - ? _mpz_cmp_ui (Z, __GMP_CAST (unsigned long int, SI)) \ - : _mpz_cmp_si (Z,SI)) -#define mpq_cmp_ui(Q,NUI,DUI) \ - (__builtin_constant_p (NUI) && (NUI) == 0 \ - ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI)) -#define mpq_cmp_si(q,n,d) \ - (__builtin_constant_p ((n) >= 0) && (n) >= 0 \ - ? mpq_cmp_ui (q, __GMP_CAST (unsigned long, n), d) \ - : _mpq_cmp_si (q, n, d)) -#else -#define mpz_cmp_ui(Z,UI) _mpz_cmp_ui (Z,UI) -#define mpz_cmp_si(Z,UI) _mpz_cmp_si (Z,UI) -#define mpq_cmp_ui(Q,NUI,DUI) _mpq_cmp_ui (Q,NUI,DUI) -#define mpq_cmp_si(q,n,d) _mpq_cmp_si(q,n,d) -#endif - - -/* Using "&" rather than "&&" means these can come out branch-free. Every - mpz_t has at least one limb allocated, so fetching the low limb is always - allowed. */ -#define mpz_odd_p(z) (((z)->_mp_size != 0) & __GMP_CAST (int, (z)->_mp_d[0])) -#define mpz_even_p(z) (! mpz_odd_p (z)) - - -/**************** C++ routines ****************/ - -#ifdef __cplusplus -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpz_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpq_srcptr); -__GMP_DECLSPEC_XX std::ostream& operator<< (std::ostream &, mpf_srcptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpz_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpq_ptr); -__GMP_DECLSPEC_XX std::istream& operator>> (std::istream &, mpf_ptr); -#endif - - -/* Source-level compatibility with GMP 2 and earlier. */ -#define mpn_divmod(qp,np,nsize,dp,dsize) \ - mpn_divrem (qp, __GMP_CAST (mp_size_t, 0), np, nsize, dp, dsize) - -/* Source-level compatibility with GMP 1. */ -#define mpz_mdiv mpz_fdiv_q -#define mpz_mdivmod mpz_fdiv_qr -#define mpz_mmod mpz_fdiv_r -#define mpz_mdiv_ui mpz_fdiv_q_ui -#define mpz_mdivmod_ui(q,r,n,d) \ - (((r) == 0) ? mpz_fdiv_q_ui (q,n,d) : mpz_fdiv_qr_ui (q,r,n,d)) -#define mpz_mmod_ui(r,n,d) \ - (((r) == 0) ? mpz_fdiv_ui (n,d) : mpz_fdiv_r_ui (r,n,d)) - -/* Useful synonyms, but not quite compatible with GMP 1. */ -#define mpz_div mpz_fdiv_q -#define mpz_divmod mpz_fdiv_qr -#define mpz_div_ui mpz_fdiv_q_ui -#define mpz_divmod_ui mpz_fdiv_qr_ui -#define mpz_div_2exp mpz_fdiv_q_2exp -#define mpz_mod_2exp mpz_fdiv_r_2exp - -enum -{ - GMP_ERROR_NONE = 0, - GMP_ERROR_UNSUPPORTED_ARGUMENT = 1, - GMP_ERROR_DIVISION_BY_ZERO = 2, - GMP_ERROR_SQRT_OF_NEGATIVE = 4, - GMP_ERROR_INVALID_ARGUMENT = 8 -}; - -/* Define CC and CFLAGS which were used to build this version of GMP */ -#define __GMP_CC "gcc -std=gnu99" -#define __GMP_CFLAGS "-O2 -pedantic -fomit-frame-pointer -m64 -mtune=k8 -march=k8" - -/* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 5 -#define __GNU_MP_VERSION_MINOR 1 -#define __GNU_MP_VERSION_PATCHLEVEL 3 -#define __GNU_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) - -#define __GMP_H__ -#endif /* __GMP_H__ */ diff --git a/external/lgpl3/gmp/lib/libgmp/shlib_version b/external/lgpl3/gmp/lib/libgmp/shlib_version deleted file mode 100644 index d4737ace5..000000000 --- a/external/lgpl3/gmp/lib/libgmp/shlib_version +++ /dev/null @@ -1,6 +0,0 @@ -# $NetBSD: shlib_version,v 1.1 2011/06/21 04:23:56 mrg Exp $ -# Remember to update distrib/sets/lists/base/shl.* when changing -# - -major=10 -minor=2 diff --git a/external/lgpl3/gmp/patches/0000-gmp.patch b/external/lgpl3/gmp/patches/0000-gmp.patch deleted file mode 100644 index 64979a5a2..000000000 --- a/external/lgpl3/gmp/patches/0000-gmp.patch +++ /dev/null @@ -1,613 +0,0 @@ -diff -rNU3 dist.orig/Makefile.in dist.nbsd/Makefile.in ---- dist.orig/Makefile.in 2013-09-30 12:18:35.000000000 +0200 -+++ dist.nbsd/Makefile.in 2013-11-29 08:57:10.000000000 +0100 -@@ -1166,7 +1166,8 @@ - uninstall: uninstall-recursive - - install-am: all-am -- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am -+ @$(MAKE) $(AM_MAKEFLAGS) install-data-am - - installcheck: installcheck-recursive - install-strip: -diff -rNU3 dist.orig/acinclude.m4 dist.nbsd/acinclude.m4 ---- dist.orig/acinclude.m4 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/acinclude.m4 2013-11-29 08:57:10.000000000 +0100 -@@ -33,6 +33,9 @@ - define(IA64_PATTERN, - [[ia64*-*-* | itanium-*-* | itanium2-*-*]]) - -+define(M5407_PATTERN, -+[[m5407-*-*]]) -+ - dnl Need to be careful not to match m6811, m6812, m68hc11 and m68hc12, all - dnl of which config.sub accepts. (Though none of which are likely to work - dnl with GMP.) -diff -rNU3 dist.orig/config.guess dist.nbsd/config.guess ---- dist.orig/config.guess 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/config.guess 2013-11-29 08:57:10.000000000 +0100 -@@ -945,8 +945,8 @@ - - # ------------------------------------------------------------------------- - # Use an exact cpu, if possible -- --if test -n "$exact_cpu"; then -+# Disabled for NetBSD cross builds -+if false && test -n "$exact_cpu"; then - echo "$exact_cpu$guess_rest" - else - echo "$guess_full" -diff -rNU3 dist.orig/configfsf.guess dist.nbsd/configfsf.guess ---- dist.orig/configfsf.guess 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/configfsf.guess 2014-06-23 19:18:43.000000000 +0200 -@@ -158,14 +158,28 @@ - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; -+ coldfire) machine=m5407-unknown ;; -+ earm*eb*) machine=armeb-unknown ;; -+ earm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched -- # to ELF recently, or will in the future. -+ # to ELF recently, or will in the future and ABI. - case "${UNAME_MACHINE_ARCH}" in -+ coldfire) os=netbsdelf ;; -+ earm*) -+ eval $set_cc_for_build -+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_PCS_VFP -+ then -+ os=netbsdelf-eabi -+ else -+ os=netbsdelf-eabihf -+ fi -+ ;; - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ -diff -rNU3 dist.orig/configfsf.sub dist.nbsd/configfsf.sub ---- dist.orig/configfsf.sub 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/configfsf.sub 2013-11-29 08:57:10.000000000 +0100 -@@ -124,7 +124,7 @@ - case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ -- knetbsd*-gnu* | netbsd*-gnu* | \ -+ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-*eabi* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os -@@ -334,7 +334,8 @@ - basic_machine=$basic_machine-unknown - os=-none - ;; -- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) -+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | m5407 \ -+ | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown -@@ -390,6 +391,7 @@ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ -+ | m5200-* | m5407-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ -diff -rNU3 dist.orig/configure dist.nbsd/configure ---- dist.orig/configure 2013-09-30 12:18:33.000000000 +0200 -+++ dist.nbsd/configure 2014-06-24 14:54:56.000000000 +0200 -@@ -4377,6 +4377,16 @@ - ;; - - -+ # Motorola Coldfire -+ # -+ m5407-*-*) -+ -+ gcc_cflags="$gcc_cflags $fomit_frame_pointer" -+ gcc_cflags_optlist="arch" -+ gcc_cflags_arch="-m5407" -+ ;; -+ -+ - # Motorola 68k - # - m68k-*-* | m68[0-9][0-9][0-9]-*-*) -diff -rNU3 dist.orig/configure.ac dist.nbsd/configure.ac ---- dist.orig/configure.ac 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/configure.ac 2013-11-29 08:49:47.000000000 +0100 -@@ -25,7 +25,7 @@ - AC_COPYRIGHT(GMP_COPYRIGHT) - AH_TOP(/*GMP_COPYRIGHT*/) - --AC_REVISION($Revision$) -+AC_REVISION($Revision: 1.1.1.1 $) - AC_PREREQ(2.59) - AC_INIT(GNU MP, GMP_VERSION, [gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html], gmp) - AC_CONFIG_SRCDIR(gmp-impl.h) -diff -rNU3 dist.orig/gmp-h.in dist.nbsd/gmp-h.in ---- dist.orig/gmp-h.in 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/gmp-h.in 2013-11-29 08:57:10.000000000 +0100 -@@ -359,11 +359,9 @@ - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. */ - #ifdef __GNUC__ --#if (defined __GNUC_STDC_INLINE__) || (__GNUC__ == 4 && __GNUC_MINOR__ == 2) \ -- || (defined __GNUC_GNU_INLINE__ && defined __cplusplus) -+#if (defined __GNUC_STDC_INLINE__) || \ -+ (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || (__GNUC__ > 4) - #define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) --#else --#define __GMP_EXTERN_INLINE extern __inline__ - #endif - #define __GMP_INLINE_PROTOTYPES 1 - #endif -@@ -1610,6 +1608,10 @@ - #define mpn_zero __MPN(zero) - __GMP_DECLSPEC void mpn_zero (mp_ptr, mp_size_t); - -+#define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) -+__GMP_DECLSPEC mp_limb_t mpn_udiv_w_sdiv (mp_limb_t *, mp_limb_t, mp_limb_t, mp_limb_t); -+ -+ - /**************** mpz inlines ****************/ - - /* The following are provided as inlines where possible, but always exist as -diff -rNU3 dist.orig/gmp-impl.h dist.nbsd/gmp-impl.h ---- dist.orig/gmp-impl.h 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/gmp-impl.h 2013-11-29 08:57:10.000000000 +0100 -@@ -196,7 +196,9 @@ - # if defined (_AIX) || defined (_IBMR2) - #pragma alloca - # else -- char *alloca (); -+# if !defined (__NetBSD__) -+ char *alloca (); -+# endif - # endif - # endif - # endif -diff -rNU3 dist.orig/longlong.h dist.nbsd/longlong.h ---- dist.orig/longlong.h 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/longlong.h 2014-03-25 16:28:15.000000000 +0100 -@@ -1209,7 +1209,7 @@ - #endif /* __m88000__ */ - - #if defined (__mips) && W_TYPE_SIZE == 32 --#if __GMP_GNUC_PREREQ (4,4) -+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__) - #define umul_ppmm(w1, w0, u, v) \ - do { \ - UDItype __ll = (UDItype)(u) * (v); \ -@@ -1231,7 +1231,7 @@ - #endif /* __mips */ - - #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64 --#if __GMP_GNUC_PREREQ (4,4) -+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__) - #define umul_ppmm(w1, w0, u, v) \ - do { \ - typedef unsigned int __ll_UTItype __attribute__((mode(TI))); \ -@@ -1347,7 +1347,7 @@ - __asm__ ("cntlzw %0,%1" : "=r" (count) : "r" (x)) - #define COUNT_LEADING_ZEROS_0 32 - #if HAVE_HOST_CPU_FAMILY_powerpc --#if __GMP_GNUC_PREREQ (4,4) -+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__) - #define umul_ppmm(w1, w0, u, v) \ - do { \ - UDItype __ll = (UDItype)(u) * (v); \ -diff -rNU3 dist.orig/mpn/Makefile.in dist.nbsd/mpn/Makefile.in ---- dist.orig/mpn/Makefile.in 2013-09-30 12:18:34.000000000 +0200 -+++ dist.nbsd/mpn/Makefile.in 2013-11-29 08:57:10.000000000 +0100 -@@ -631,7 +631,7 @@ - $(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@ - $(RM_TMP) tmp-$*.s - .S.lo: -- $(LIBTOOL) --mode=compile --tag=CC $(top_srcdir)/mpn/cpp-ccas --cpp="$(CPP) $(PREPROCESS_FLAGS)" $(CCAS) $(COMPILE_FLAGS) `test -f '$<' || echo '$(srcdir)/'`$< -+ $(LIBTOOL) --mode=compile --tag=CC $(SHELL) $(top_srcdir)/mpn/cpp-ccas --cpp="$(CPP) $(PREPROCESS_FLAGS)" $(CCAS) $(COMPILE_FLAGS) `test -f '$<' || echo '$(srcdir)/'`$< - - # .asm assembler, preprocessed with m4. - # -@@ -659,7 +659,7 @@ - $(CCAS) $(COMPILE_FLAGS) tmp-$*.s -o $@ - $(RM_TMP) tmp-$*.s - .asm.lo: -- $(LIBTOOL) --mode=compile --tag=CC $(top_srcdir)/mpn/m4-ccas --m4="$(M4)" $(CCAS) $(COMPILE_FLAGS) `test -f '$<' || echo '$(srcdir)/'`$< -+ $(LIBTOOL) --mode=compile --tag=CC $(SHELL) $(top_srcdir)/mpn/m4-ccas --m4="$(M4)" $(CCAS) $(COMPILE_FLAGS) `test -f '$<' || echo '$(srcdir)/'`$< - - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. -diff -rNU3 dist.orig/mpn/arm/aorscnd_n.asm dist.nbsd/mpn/arm/aorscnd_n.asm ---- dist.orig/mpn/arm/aorscnd_n.asm 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/mpn/arm/aorscnd_n.asm 2013-11-29 09:02:28.000000000 +0100 -@@ -117,5 +117,8 @@ - - L(end): RETVAL - pop {r4-r11} -- bx r14 -+ifdef(`ARM_THUMB_MODE', -+` bx r14 -+',` mov pc, r14 -+') - EPILOGUE() -diff -rNU3 dist.orig/mpn/arm/aorslsh1_n.asm dist.nbsd/mpn/arm/aorslsh1_n.asm ---- dist.orig/mpn/arm/aorslsh1_n.asm 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/mpn/arm/aorslsh1_n.asm 2013-11-29 09:02:28.000000000 +0100 -@@ -151,5 +151,8 @@ - REVCY(r12) - L(rt0): RETVAL( r14) - pop {r4-r10r11, r14} -- bx r14 -+ifdef(`ARM_THUMB_MODE', -+` bx r14 -+',` mov pc, r14 -+') - EPILOGUE() -diff -rNU3 dist.orig/mpn/arm/bdiv_dbm1c.asm dist.nbsd/mpn/arm/bdiv_dbm1c.asm ---- dist.orig/mpn/arm/bdiv_dbm1c.asm 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/mpn/arm/bdiv_dbm1c.asm 2013-11-29 09:02:28.000000000 +0100 -@@ -97,5 +97,8 @@ - str r5, [qp] - sbc r0, r5, r12 - pop {r4, r5, r6, r7, r8} -- bx lr -+ifdef(`ARM_THUMB_MODE', -+` bx lr -+',` mov pc, lr -+') - EPILOGUE() -diff -rNU3 dist.orig/mpn/arm/com.asm dist.nbsd/mpn/arm/com.asm ---- dist.orig/mpn/arm/com.asm 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/mpn/arm/com.asm 2013-11-29 09:02:28.000000000 +0100 -@@ -59,5 +59,9 @@ - bne L(top) - - ldmfd sp!, { r7, r8, r9 } C restore regs from stack --L(rtn): bx lr -+L(rtn): -+ifdef(`ARM_THUMB_MODE', -+` bx lr -+',` mov pc, lr -+') - EPILOGUE() -diff -rNU3 dist.orig/mpn/arm/copyd.asm dist.nbsd/mpn/arm/copyd.asm ---- dist.orig/mpn/arm/copyd.asm 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/mpn/arm/copyd.asm 2013-11-29 09:02:28.000000000 +0100 -@@ -57,5 +57,9 @@ - bne L(top) - - ldmfd sp!, { r7, r8, r9 } C restore regs from stack --L(rtn): bx lr -+L(rtn): -+ifdef(`ARM_THUMB_MODE', -+` bx lr -+',` mov pc, lr -+') - EPILOGUE() -diff -rNU3 dist.orig/mpn/arm/copyi.asm dist.nbsd/mpn/arm/copyi.asm ---- dist.orig/mpn/arm/copyi.asm 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/mpn/arm/copyi.asm 2013-11-29 09:02:28.000000000 +0100 -@@ -52,5 +52,9 @@ - bne L(top) - - ldmfd sp!, { r7, r8, r9 } C restore regs from stack --L(rtn): bx lr -+L(rtn): -+ifdef(`ARM_THUMB_MODE', -+` bx lr -+',` mov pc, lr -+') - EPILOGUE() -diff -rNU3 dist.orig/mpn/arm/invert_limb.asm dist.nbsd/mpn/arm/invert_limb.asm ---- dist.orig/mpn/arm/invert_limb.asm 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/mpn/arm/invert_limb.asm 2013-11-29 08:57:11.000000000 +0100 -@@ -41,7 +41,10 @@ - adds r1, r12, r0 - adc r3, r3, r0 - rsb r0, r3, r2 -- bx lr -+ifdef(`ARM_THUMB_MODE', -+` bx lr -+',` mov pc, lr -+') - EPILOGUE() - - .section .rodata -diff -rNU3 dist.orig/mpn/arm/logops_n.asm dist.nbsd/mpn/arm/logops_n.asm ---- dist.orig/mpn/arm/logops_n.asm 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/mpn/arm/logops_n.asm 2013-11-29 09:02:28.000000000 +0100 -@@ -123,5 +123,8 @@ - pop { r4, r5, r6, r7 } C popping r8-r10 here strangely fails - - L(rtn): pop { r8, r9, r10 } -- bx r14 -+ifdef(`ARM_THUMB_MODE', -+` bx r14 -+',` mov pc, r14 -+') - EPILOGUE() -diff -rNU3 dist.orig/mpn/arm/lshift.asm dist.nbsd/mpn/arm/lshift.asm ---- dist.orig/mpn/arm/lshift.asm 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/mpn/arm/lshift.asm 2013-11-29 09:02:28.000000000 +0100 -@@ -72,5 +72,8 @@ - L(1): str r7, [rp, #-4] - lsr r0, r4, tnc - pop {r4, r6, r7, r8} -- bx r14 -+ifdef(`ARM_THUMB_MODE', -+` bx r14 -+',` mov pc, r14 -+') - EPILOGUE() -diff -rNU3 dist.orig/mpn/arm/lshiftc.asm dist.nbsd/mpn/arm/lshiftc.asm ---- dist.orig/mpn/arm/lshiftc.asm 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/mpn/arm/lshiftc.asm 2013-11-29 09:02:28.000000000 +0100 -@@ -79,5 +79,8 @@ - str r7, [rp, #-4] - lsr r0, r4, tnc - pop {r4, r6, r7, r8} -- bx r14 -+ifdef(`ARM_THUMB_MODE', -+` bx r14 -+',` mov pc, r14 -+') - EPILOGUE() -diff -rNU3 dist.orig/mpn/arm/mod_34lsub1.asm dist.nbsd/mpn/arm/mod_34lsub1.asm ---- dist.orig/mpn/arm/mod_34lsub1.asm 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/mpn/arm/mod_34lsub1.asm 2013-11-29 09:02:28.000000000 +0100 -@@ -94,7 +94,10 @@ - add r0, r0, r12, lsr #8 - - pop { r4, r5, r6, r7 } -- bx lr -+ifdef(`ARM_THUMB_MODE', -+` bx lr -+',` mov pc, lr -+') - - L(le2): cmn n, #1 - bne L(1) -@@ -105,5 +108,8 @@ - bic r0, r2, #0xff000000 - add r0, r0, r2, lsr #24 - pop { r4, r5, r6, r7 } -- bx lr -+ifdef(`ARM_THUMB_MODE', -+` bx lr -+',` mov pc, lr -+') - EPILOGUE() -diff -rNU3 dist.orig/mpn/arm/mode1o.asm dist.nbsd/mpn/arm/mode1o.asm ---- dist.orig/mpn/arm/mode1o.asm 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/mpn/arm/mode1o.asm 2013-11-29 09:02:28.000000000 +0100 -@@ -68,5 +68,8 @@ - addcc r0, r0, #1 - - ldmfd sp!, {r4, r5} -- bx r14 -+ifdef(`ARM_THUMB_MODE', -+` bx r14 -+',` mov pc, r14 -+') - EPILOGUE() -diff -rNU3 dist.orig/mpn/arm/rsh1aors_n.asm dist.nbsd/mpn/arm/rsh1aors_n.asm ---- dist.orig/mpn/arm/rsh1aors_n.asm 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/mpn/arm/rsh1aors_n.asm 2013-11-29 09:02:28.000000000 +0100 -@@ -108,5 +108,8 @@ - str r4, [rp, #0] - mov r0, r11 - pop {r4-r11} -- bx r14 -+ifdef(`ARM_THUMB_MODE', -+` bx r14 -+',` mov pc, r14 -+') - EPILOGUE() -diff -rNU3 dist.orig/mpn/arm/rshift.asm dist.nbsd/mpn/arm/rshift.asm ---- dist.orig/mpn/arm/rshift.asm 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/mpn/arm/rshift.asm 2013-11-29 09:02:28.000000000 +0100 -@@ -70,5 +70,8 @@ - L(1): str r7, [rp], #4 - lsl r0, r4, tnc - pop {r4, r6, r7, r8} -- bx r14 -+ifdef(`ARM_THUMB_MODE', -+` bx r14 -+',` mov pc, r14 -+') - EPILOGUE() -diff -rNU3 dist.orig/mpn/arm/udiv.asm dist.nbsd/mpn/arm/udiv.asm ---- dist.orig/mpn/arm/udiv.asm 2013-09-30 12:18:28.000000000 +0200 -+++ dist.nbsd/mpn/arm/udiv.asm 2013-11-29 09:02:28.000000000 +0100 -@@ -50,7 +50,10 @@ - - str n1, [rem_ptr] C store remainder - adc r0, n0, n0 C quotient: add last carry from divstep -- bx lr -+ifdef(`ARM_THUMB_MODE', -+` bx lr -+',` mov pc, lr -+') - - L(_large_divisor): - stmfd sp!, { r8, lr } -diff -rNU3 dist.orig/mpn/generic/div_qr_2.c dist.nbsd/mpn/generic/div_qr_2.c ---- dist.orig/mpn/generic/div_qr_2.c 2013-09-30 12:18:29.000000000 +0200 -+++ dist.nbsd/mpn/generic/div_qr_2.c 2013-12-01 10:29:06.000000000 +0100 -@@ -130,10 +130,11 @@ - umul_ppmm (_q1d,_q0, n2, di0); \ - add_sssaaaa (_q3,_q2,_q1, _q2,_q1, _q2a,_q1d); \ - \ -- add_ssaaaa (r1, r0, n3, n2, 0, 1); /* FIXME: combine as in x86_64 asm */ \ -+ add_ssaaaa (r1, r0, n3, n2, CNST_LIMB(0), CNST_LIMB(1)); \ -+ /* FIXME: combine as in x86_64 asm */ \ - \ - /* [q3,q2,q1,q0] += [n3,n3,n1,n0] */ \ -- add_csaac (_c, _q0, _q0, n0, 0); \ -+ add_csaac (_c, _q0, _q0, n0, CNST_LIMB(0)); \ - add_csaac (_c, _q1, _q1, n1, _c); \ - add_csaac (_c, _q2, _q2, r0, _c); \ - _q3 = _q3 + r1 + _c; \ -@@ -145,14 +146,14 @@ - \ - _mask = -(mp_limb_t) (r1 >= _q1 & (r1 > _q1 | r0 >= _q0)); /* (r1,r0) >= (q1,q0) */ \ - add_ssaaaa (r1, r0, r1, r0, d1 & _mask, d0 & _mask); \ -- sub_ddmmss (_q3, _q2, _q3, _q2, 0, -_mask); \ -+ sub_ddmmss (_q3, _q2, _q3, _q2, CNST_LIMB(0), -_mask); \ - \ - if (UNLIKELY (r1 >= d1)) \ - { \ - if (r1 > d1 || r0 >= d0) \ - { \ - sub_ddmmss (r1, r0, r1, r0, d1, d0); \ -- add_ssaaaa (_q3, _q2, _q3, _q2, 0, 1); \ -+ add_ssaaaa (_q3, _q2, _q3, _q2, CNST_LIMB(0), CNST_LIMB(1));\ - } \ - } \ - (q1) = _q3; \ -diff -rNU3 dist.orig/mpn/generic/divrem_2.c dist.nbsd/mpn/generic/divrem_2.c ---- dist.orig/mpn/generic/divrem_2.c 2013-09-30 12:18:29.000000000 +0200 -+++ dist.nbsd/mpn/generic/divrem_2.c 2013-12-01 10:29:06.000000000 +0100 -@@ -98,7 +98,7 @@ - for (i = qxn - 1; i >= 0; i--) - { - mp_limb_t q; -- udiv_qr_3by2 (q, r1, r0, r1, r0, 0, d1, d0, di.inv32); -+ udiv_qr_3by2 (q, r1, r0, r1, r0, CNST_LIMB(0), d1, d0, di.inv32); - qp[i] = q; - } - } -diff -rNU3 dist.orig/mpn/generic/get_d.c dist.nbsd/mpn/generic/get_d.c ---- dist.orig/mpn/generic/get_d.c 2013-09-30 12:18:29.000000000 +0200 -+++ dist.nbsd/mpn/generic/get_d.c 2013-11-29 09:02:28.000000000 +0100 -@@ -209,7 +209,7 @@ - x <<= GMP_NAIL_BITS; - mhi |= x >> nbits >> 11; - -- mlo = x << GMP_LIMB_BITS - nbits - 11; -+ mlo = x << (GMP_LIMB_BITS - nbits - 11); - nbits = nbits + 11 - GMP_NAIL_BITS; - } - else -diff -rNU3 dist.orig/mpn/generic/mod_1_1.c dist.nbsd/mpn/generic/mod_1_1.c ---- dist.orig/mpn/generic/mod_1_1.c 2013-09-30 12:18:29.000000000 +0200 -+++ dist.nbsd/mpn/generic/mod_1_1.c 2013-12-01 10:29:06.000000000 +0100 -@@ -160,7 +160,7 @@ - * B2modb = - b * bi; - * ASSERT (B2modb <= b); // NB: equality iff b = B/2 - */ -- udiv_rnnd_preinv (B2modb, B1modb, 0, b, bi); -+ udiv_rnnd_preinv (B2modb, B1modb, CNST_LIMB(0), b, bi); - cps[3] = B2modb >> cnt; - } - -diff -rNU3 dist.orig/mpn/generic/mod_1_2.c dist.nbsd/mpn/generic/mod_1_2.c ---- dist.orig/mpn/generic/mod_1_2.c 2013-09-30 12:18:29.000000000 +0200 -+++ dist.nbsd/mpn/generic/mod_1_2.c 2013-12-01 10:29:06.000000000 +0100 -@@ -51,10 +51,10 @@ - ASSERT (B1modb <= b); /* NB: not fully reduced mod b */ - cps[2] = B1modb >> cnt; - -- udiv_rnnd_preinv (B2modb, B1modb, 0, b, bi); -+ udiv_rnnd_preinv (B2modb, B1modb, CNST_LIMB(0), b, bi); - cps[3] = B2modb >> cnt; - -- udiv_rnnd_preinv (B3modb, B2modb, 0, b, bi); -+ udiv_rnnd_preinv (B3modb, B2modb, CNST_LIMB(0), b, bi); - cps[4] = B3modb >> cnt; - - #if WANT_ASSERT -diff -rNU3 dist.orig/mpn/generic/mod_1_3.c dist.nbsd/mpn/generic/mod_1_3.c ---- dist.orig/mpn/generic/mod_1_3.c 2013-09-30 12:18:29.000000000 +0200 -+++ dist.nbsd/mpn/generic/mod_1_3.c 2013-12-01 10:29:06.000000000 +0100 -@@ -51,13 +51,13 @@ - ASSERT (B1modb <= b); /* NB: not fully reduced mod b */ - cps[2] = B1modb >> cnt; - -- udiv_rnnd_preinv (B2modb, B1modb, 0, b, bi); -+ udiv_rnnd_preinv (B2modb, B1modb, CNST_LIMB(0), b, bi); - cps[3] = B2modb >> cnt; - -- udiv_rnnd_preinv (B3modb, B2modb, 0, b, bi); -+ udiv_rnnd_preinv (B3modb, B2modb, CNST_LIMB(0), b, bi); - cps[4] = B3modb >> cnt; - -- udiv_rnnd_preinv (B4modb, B3modb, 0, b, bi); -+ udiv_rnnd_preinv (B4modb, B3modb, CNST_LIMB(0), b, bi); - cps[5] = B4modb >> cnt; - - #if WANT_ASSERT -diff -rNU3 dist.orig/mpn/generic/mod_1_4.c dist.nbsd/mpn/generic/mod_1_4.c ---- dist.orig/mpn/generic/mod_1_4.c 2013-09-30 12:18:29.000000000 +0200 -+++ dist.nbsd/mpn/generic/mod_1_4.c 2013-12-01 10:29:06.000000000 +0100 -@@ -51,16 +51,16 @@ - ASSERT (B1modb <= b); /* NB: not fully reduced mod b */ - cps[2] = B1modb >> cnt; - -- udiv_rnnd_preinv (B2modb, B1modb, 0, b, bi); -+ udiv_rnnd_preinv (B2modb, B1modb, CNST_LIMB(0), b, bi); - cps[3] = B2modb >> cnt; - -- udiv_rnnd_preinv (B3modb, B2modb, 0, b, bi); -+ udiv_rnnd_preinv (B3modb, B2modb, CNST_LIMB(0), b, bi); - cps[4] = B3modb >> cnt; - -- udiv_rnnd_preinv (B4modb, B3modb, 0, b, bi); -+ udiv_rnnd_preinv (B4modb, B3modb, CNST_LIMB(0), b, bi); - cps[5] = B4modb >> cnt; - -- udiv_rnnd_preinv (B5modb, B4modb, 0, b, bi); -+ udiv_rnnd_preinv (B5modb, B4modb, CNST_LIMB(0), b, bi); - cps[6] = B5modb >> cnt; - - #if WANT_ASSERT -diff -rNU3 dist.orig/mpn/generic/toom_interpolate_7pts.c dist.nbsd/mpn/generic/toom_interpolate_7pts.c ---- dist.orig/mpn/generic/toom_interpolate_7pts.c 2013-09-30 12:18:29.000000000 +0200 -+++ dist.nbsd/mpn/generic/toom_interpolate_7pts.c 2013-11-30 20:05:25.000000000 +0100 -@@ -33,7 +33,7 @@ - ((((GMP_NUMB_MAX / 9) << (6 - GMP_NUMB_BITS % 6)) * 8 & GMP_NUMB_MAX) | 0x39) - - #define BINVERT_15 \ -- ((((GMP_NUMB_MAX >> (GMP_NUMB_BITS % 4)) / 15) * 14 * 16 & GMP_NUMB_MAX) + 15)) -+ ((((GMP_NUMB_MAX >> (GMP_NUMB_BITS % 4)) / 15) * 14 * 16 & GMP_NUMB_MAX) + 15) - - /* For the various mpn_divexact_byN here, fall back to using either - mpn_pi1_bdiv_q_1 or mpn_divexact_1. The former has less overhead and is -diff -rNU3 dist.orig/mpn/powerpc32/elf.m4 dist.nbsd/mpn/powerpc32/elf.m4 ---- dist.orig/mpn/powerpc32/elf.m4 2013-09-30 12:18:29.000000000 +0200 -+++ dist.nbsd/mpn/powerpc32/elf.m4 2013-12-02 14:16:49.000000000 +0100 -@@ -41,9 +41,11 @@ - m4_assert_numargs(2) - `ifdef(`PIC',` - mflr r0 -- bl _GLOBAL_OFFSET_TABLE_@local-4 -- mflr $1 -+ bcl 20,31,1f -+1: mflr $1 - mtlr r0 -+ addis $1,$1,_GLOBAL_OFFSET_TABLE_-1b@ha -+ addi $1,$1,_GLOBAL_OFFSET_TABLE_-1b@l - lwz $1, $2@got($1) - ',` - lis $1, $2@ha -diff -rNU3 dist.orig/tests/rand/findlc.c dist.nbsd/tests/rand/findlc.c ---- dist.orig/tests/rand/findlc.c 2013-09-30 12:18:29.000000000 +0200 -+++ dist.nbsd/tests/rand/findlc.c 2013-11-29 08:49:48.000000000 +0100 -@@ -27,7 +27,7 @@ - #define RCSID(msg) \ - static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg } - --RCSID("$Id$"); -+RCSID("$Id: findlc.c,v 1.1.1.2 2013/11/29 07:49:48 mrg Exp $"); - - int g_debug = 0; - diff --git a/external/lgpl3/mpc/fetch.sh b/external/lgpl3/mpc/fetch.sh deleted file mode 100755 index a8a48f106..000000000 --- a/external/lgpl3/mpc/fetch.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -# Make sure we're in our directory (i.e., where this shell script is) -echo $0 -cd `dirname $0` - -# Configure fetch method -URL="http://www.minix3.org/pkgsrc/distfiles/minix/3.4.0/mpc-1.0.1.tar.gz" -BACKUP_URL="http://www.multiprecision.org/mpc/download/mpc-1.0.1.tar.gz" -FETCH=ftp -which curl >/dev/null -if [ $? -eq 0 ]; then - FETCH="curl -O -f" -fi - -# Fetch sources if not available -if [ ! -d dist ]; -then - if [ ! -f mpc-1.0.1.tar.gz ]; then - $FETCH $URL - if [ $? -ne 0 ]; then - $FETCH $BACKUP_URL - fi - fi - - tar -oxzf mpc-1.0.1.tar.gz - mv mpc-1.0.1 dist -fi - diff --git a/external/lgpl3/mpc/lib/libmpc/Makefile b/external/lgpl3/mpc/lib/libmpc/Makefile deleted file mode 100644 index 62d4853fb..000000000 --- a/external/lgpl3/mpc/lib/libmpc/Makefile +++ /dev/null @@ -1,107 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2013/11/28 14:21:31 mrg Exp $ - -.include - -# We don't install mpc, just provide it for GCC. -LIBISPRIVATE?= yes - -.if ${LIBISPRIVATE} != "yes" -INCS= mpc.h mpc-log.h -INCSDIR= /usr/include -.endif - -LIB= mpc - -LIBDPLIBS+= gmp ${.CURDIR}/../../../../lgpl3/gmp/lib/libgmp -LIBDPLIBS+= mpfr ${.CURDIR}/../../../../lgpl3/mpfr/lib/libmpfr - -SRCS= \ - abs.c \ - acos.c \ - acosh.c \ - add.c \ - add_fr.c \ - add_si.c \ - add_ui.c \ - arg.c \ - asin.c \ - asinh.c \ - atan.c \ - atanh.c \ - clear.c \ - cmp.c \ - cmp_si_si.c \ - conj.c \ - cos.c \ - cosh.c \ - div_2si.c \ - div_2ui.c \ - div.c \ - div_fr.c \ - div_ui.c \ - exp.c \ - fma.c \ - fr_div.c \ - fr_sub.c \ - get_prec2.c \ - get_prec.c \ - get_version.c \ - get_x.c \ - imag.c \ - init2.c \ - init3.c \ - inp_str.c \ - log.c \ - log10.c \ - mem.c \ - mul_2si.c \ - mul_2ui.c \ - mul.c \ - mul_fr.c \ - mul_i.c \ - mul_si.c \ - mul_ui.c \ - neg.c \ - norm.c \ - out_str.c \ - pow.c \ - pow_fr.c \ - pow_ld.c \ - pow_d.c \ - pow_si.c \ - pow_ui.c \ - pow_z.c \ - proj.c \ - real.c \ - urandom.c \ - set.c \ - set_prec.c \ - set_str.c \ - set_x.c \ - set_x_x.c \ - sin.c \ - sin_cos.c \ - sinh.c \ - sqr.c \ - sqrt.c \ - strtoc.c \ - sub.c \ - sub_fr.c \ - sub_ui.c \ - swap.c \ - tan.c \ - tanh.c \ - uceil_log2.c \ - ui_div.c \ - ui_ui_sub.c - -CPPFLAGS+= -I${.CURDIR} - -# Find and -GMP_MACHINE_ARCH=${MACHINE_ARCH:C/armv[4-7]/arm/} -CPPFLAGS+= -I${NETBSDSRCDIR}/external/lgpl3/gmp/lib/libgmp/arch/${GMP_MACHINE_ARCH} -CPPFLAGS+= -I${NETBSDSRCDIR}/external/lgpl3/mpfr/dist/src - -.include - -.PATH: ${.CURDIR}/../../dist/src diff --git a/external/lgpl3/mpc/lib/libmpc/config.h b/external/lgpl3/mpc/lib/libmpc/config.h deleted file mode 100644 index dce8cac01..000000000 --- a/external/lgpl3/mpc/lib/libmpc/config.h +++ /dev/null @@ -1,124 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* complex.h present and usable */ -#define HAVE_COMPLEX_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the `dup' function. */ -#define HAVE_DUP 1 - -/* Define to 1 if you have the `dup2' function. */ -#define HAVE_DUP2 1 - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if the system has the type `intptr_t'. */ -/* #undef HAVE_INTPTR_T */ - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Library dl present */ -/* #undef HAVE_LIBDL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `setlocale' function. */ -#define HAVE_SETLOCALE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* C compiler */ -#define MPC_CC "gcc" - -/* Gcc yes or no */ -#define MPC_GCC "yes" - -/* Version of gcc */ -#define MPC_GCC_VERSION "4.5.3" - -/* Do not check mpc_out_str on stdout */ -/* #undef MPC_NO_STREAM_REDIRECTION */ - -/* Use valgrind for make check */ -/* #undef MPC_USE_VALGRIND */ - -/* Name of package */ -#define PACKAGE "mpc" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "mpc-discuss@lists.gforge.inria.fr" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "mpc" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "mpc 1.0.1" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "mpc" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "1.0.1" - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Version number of package */ -#define VERSION "1.0.1" - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to the type of a signed integer type wide enough to hold a pointer, - if such a type exists, and if the system does not define it. */ -/* #undef intptr_t */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ diff --git a/external/lgpl3/mpfr/fetch.sh b/external/lgpl3/mpfr/fetch.sh deleted file mode 100755 index 90cf02810..000000000 --- a/external/lgpl3/mpfr/fetch.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -# Make sure we're in our directory (i.e., where this shell script is) -echo $0 -cd `dirname $0` - -# Configure fetch method -URL="http://www.minix3.org/pkgsrc/distfiles/minix/3.4.0/mpfr-3.1.2.tar.bz2" -BACKUP_URL="http://www.mpfr.org/mpfr-3.1.2/mpfr-3.1.2.tar.bz2" -FETCH=ftp -which curl >/dev/null -if [ $? -eq 0 ]; then - FETCH="curl -O -f" -fi - -# Fetch sources if not available -if [ ! -d dist ]; -then - if [ ! -f mpfr-3.1.2.tar.bz2 ]; then - $FETCH $URL - if [ $? -ne 0 ]; then - $FETCH $BACKUP_URL - fi - fi - - tar -oxjf mpfr-3.1.2.tar.bz2 - mv mpfr-3.1.2 dist && \ - cd dist && \ - cat ../patches/* |patch -p1 -fi - diff --git a/external/lgpl3/mpfr/lib/libmpfr/Makefile b/external/lgpl3/mpfr/lib/libmpfr/Makefile deleted file mode 100644 index db9f34fac..000000000 --- a/external/lgpl3/mpfr/lib/libmpfr/Makefile +++ /dev/null @@ -1,530 +0,0 @@ -# $NetBSD: Makefile,v 1.16 2013/12/19 01:10:19 gdt Exp $ - -.include - -# We don't install mpfr, just provide it for GCC. -LIBISPRIVATE?= yes - -.if ${LIBISPRIVATE} != "yes" -INCS= mpf2mpfr.h mpfr.h -INCSDIR= /usr/include -.endif - -# XXX get_d.c triggers lint div zero errors (which is valid?) -MKLINT=no - -LIB= mpfr - -LIBDPLIBS+= gmp ${.CURDIR}/../../../gmp/lib/libgmp - -SRCS= \ - abort_prec_max.c \ - acos.c \ - acosh.c \ - add.c \ - add1.c \ - add1sp.c \ - add_d.c \ - add_ui.c \ - agm.c \ - ai.c \ - asin.c \ - asinh.c \ - atan.c \ - atan2.c \ - atanh.c \ - bernoulli.c \ - buildopt.c \ - cache.c \ - cbrt.c \ - check.c \ - clear.c \ - clears.c \ - cmp.c \ - cmp2.c \ - cmp_abs.c \ - cmp_d.c \ - cmp_ld.c \ - cmp_si.c \ - cmp_ui.c \ - comparisons.c \ - const_catalan.c \ - const_euler.c \ - const_log2.c \ - const_pi.c \ - constant.c \ - copysign.c \ - cos.c \ - cosh.c \ - cot.c \ - coth.c \ - csc.c \ - csch.c \ - d_div.c \ - d_sub.c \ - digamma.c \ - dim.c \ - div.c \ - div_2exp.c \ - div_2si.c \ - div_2ui.c \ - div_d.c \ - div_ui.c \ - dump.c \ - eint.c \ - eq.c \ - erf.c \ - erfc.c \ - exp.c \ - exp10.c \ - exp2.c \ - exp3.c \ - exp_2.c \ - expm1.c \ - factorial.c \ - fits_intmax.c \ - fits_sint.c \ - fits_slong.c \ - fits_sshort.c \ - fits_uint.c \ - fits_uintmax.c \ - fits_ulong.c \ - fits_ushort.c \ - fma.c \ - fms.c \ - frac.c \ - free_cache.c \ - frexp.c \ - gamma.c \ - gammaonethird.c \ - get_d.c \ - get_d64.c \ - get_exp.c \ - get_f.c \ - get_flt.c \ - get_ld.c \ - get_patches.c \ - get_si.c \ - get_sj.c \ - get_str.c \ - get_ui.c \ - get_uj.c \ - get_z.c \ - get_z_exp.c \ - gmp_op.c \ - grandom.c \ - hypot.c \ - init.c \ - init2.c \ - inits.c \ - inits2.c \ - inp_str.c \ - int_ceil_log2.c \ - isinf.c \ - isinteger.c \ - isnan.c \ - isnum.c \ - isqrt.c \ - isregular.c \ - iszero.c \ - jn.c \ - li2.c \ - lngamma.c \ - log.c \ - log10.c \ - log1p.c \ - log2.c \ - logging.c \ - min_prec.c \ - minmax.c \ - modf.c \ - mp_clz_tab.c \ - mpfr-gmp.c \ - mpn_exp.c \ - mul.c \ - mul_2exp.c \ - mul_2si.c \ - mul_2ui.c \ - mul_d.c \ - mul_ui.c \ - mulders.c \ - neg.c \ - next.c \ - out_str.c \ - pow.c \ - pow_si.c \ - pow_ui.c \ - pow_z.c \ - powerof2.c \ - print_raw.c \ - print_rnd_mode.c \ - printf.c \ - rec_sqrt.c \ - reldiff.c \ - rem1.c \ - rint.c \ - root.c \ - round_near_x.c \ - round_p.c \ - round_prec.c \ - scale2.c \ - sec.c \ - sech.c \ - set.c \ - set_d.c \ - set_d64.c \ - set_dfl_prec.c \ - set_exp.c \ - set_f.c \ - set_flt.c \ - set_inf.c \ - set_ld.c \ - set_nan.c \ - set_prc_raw.c \ - set_prec.c \ - set_q.c \ - set_rnd.c \ - set_si.c \ - set_si_2exp.c \ - set_sj.c \ - set_str.c \ - set_str_raw.c \ - set_ui.c \ - set_ui_2exp.c \ - set_uj.c \ - set_z.c \ - set_z_exp.c \ - set_zero.c \ - setmax.c \ - setmin.c \ - setsign.c \ - sgn.c \ - si_op.c \ - signbit.c \ - sin.c \ - sin_cos.c \ - sinh.c \ - sinh_cosh.c \ - sqr.c \ - sqrt.c \ - sqrt_ui.c \ - stack_interface.c \ - strtofr.c \ - sub.c \ - sub1.c \ - sub1sp.c \ - sub_d.c \ - sub_ui.c \ - subnormal.c \ - sum.c \ - swap.c \ - tan.c \ - tanh.c \ - uceil_log2.c \ - ufloor_log2.c \ - ui_div.c \ - ui_pow.c \ - ui_pow_ui.c \ - ui_sub.c \ - urandom.c \ - urandomb.c \ - vasprintf.c \ - version.c \ - volatile.c \ - yn.c \ - zeta.c \ - zeta_ui.c - -SRCS+= \ - exceptions.c \ - extract.c \ - uceil_exp2.c \ - uceil_log2.c \ - ufloor_log2.c \ - add.c \ - add1.c \ - add_ui.c \ - agm.c \ - clear.c \ - cmp.c \ - cmp_abs.c \ - cmp_si.c \ - cmp_ui.c \ - comparisons.c \ - div_2exp.c \ - div_2si.c \ - div_2ui.c \ - div.c \ - div_ui.c \ - dump.c \ - eq.c \ - exp10.c \ - exp2.c \ - exp3.c \ - exp.c \ - frac.c \ - get_d.c \ - get_exp.c \ - get_str.c \ - init.c \ - inp_str.c \ - isinteger.c \ - isinf.c \ - isnan.c \ - isnum.c \ - const_log2.c \ - log.c \ - modf.c \ - mul_2exp.c \ - mul_2si.c \ - mul_2ui.c \ - mul.c \ - mul_ui.c \ - neg.c \ - next.c \ - out_str.c \ - printf.c \ - vasprintf.c \ - const_pi.c \ - pow.c \ - pow_si.c \ - pow_ui.c \ - print_raw.c \ - print_rnd_mode.c \ - reldiff.c \ - round_prec.c \ - set.c \ - setmax.c \ - setmin.c \ - set_d.c \ - set_dfl_prec.c \ - set_exp.c \ - set_rnd.c \ - set_f.c \ - set_prc_raw.c \ - set_prec.c \ - set_q.c \ - set_si.c \ - set_str.c \ - set_str_raw.c \ - set_ui.c \ - set_z.c \ - sqrt.c \ - sqrt_ui.c \ - sub.c \ - sub1.c \ - sub_ui.c \ - rint.c \ - ui_div.c \ - ui_sub.c \ - urandom.c \ - urandomb.c \ - get_z_exp.c \ - swap.c \ - factorial.c \ - cosh.c \ - sinh.c \ - tanh.c \ - sinh_cosh.c \ - acosh.c \ - asinh.c \ - atanh.c \ - atan.c \ - cmp2.c \ - exp_2.c \ - asin.c \ - const_euler.c \ - cos.c \ - sin.c \ - tan.c \ - fma.c \ - fms.c \ - hypot.c \ - log1p.c \ - expm1.c \ - log2.c \ - log10.c \ - ui_pow.c \ - ui_pow_ui.c \ - minmax.c \ - dim.c \ - signbit.c \ - copysign.c \ - setsign.c \ - gmp_op.c \ - init2.c \ - acos.c \ - sin_cos.c \ - set_nan.c \ - set_inf.c \ - set_zero.c \ - powerof2.c \ - gamma.c \ - set_ld.c \ - get_ld.c \ - cbrt.c \ - volatile.c \ - fits_sshort.c \ - fits_sint.c \ - fits_slong.c \ - fits_ushort.c \ - fits_uint.c \ - fits_ulong.c \ - fits_uintmax.c \ - fits_intmax.c \ - get_si.c \ - get_ui.c \ - zeta.c \ - cmp_d.c \ - erf.c \ - inits.c \ - inits2.c \ - clears.c \ - sgn.c \ - check.c \ - sub1sp.c \ - version.c \ - mpn_exp.c \ - mpfr-gmp.c \ - mp_clz_tab.c \ - sum.c \ - add1sp.c \ - free_cache.c \ - si_op.c \ - cmp_ld.c \ - set_ui_2exp.c \ - set_si_2exp.c \ - set_uj.c \ - set_sj.c \ - get_sj.c \ - get_uj.c \ - get_z.c \ - iszero.c \ - cache.c \ - sqr.c \ - int_ceil_log2.c \ - isqrt.c \ - strtofr.c \ - pow_z.c \ - logging.c \ - mulders.c \ - get_f.c \ - round_p.c \ - erfc.c \ - atan2.c \ - subnormal.c \ - const_catalan.c \ - root.c \ - sec.c \ - csc.c \ - cot.c \ - eint.c \ - sech.c \ - csch.c \ - coth.c \ - round_near_x.c \ - constant.c \ - abort_prec_max.c \ - stack_interface.c \ - lngamma.c \ - zeta_ui.c \ - set_d64.c \ - get_d64.c \ - jn.c \ - yn.c \ - rem1.c \ - get_patches.c \ - add_d.c \ - sub_d.c \ - d_sub.c \ - mul_d.c \ - div_d.c \ - d_div.c \ - li2.c \ - rec_sqrt.c \ - min_prec.c \ - buildopt.c \ - digamma.c \ - bernoulli.c \ - isregular.c \ - set_flt.c \ - get_flt.c \ - scale2.c \ - set_z_exp.c \ - ai.c \ - gammaonethird.c - -CPPFLAGS+= -I. \ - -DHAVE_INTTYPES_H=1 \ - -DHAVE_STDINT_H=1 \ - -DTIME_WITH_SYS_TIME=1 \ - -DHAVE_LOCALE_H=1 \ - -DHAVE_WCHAR_H=1 \ - -DHAVE_STDARG=1 \ - -DHAVE_SYS_TIME_H=1 \ - -DHAVE_STDINT_H=1 \ - -DHAVE_VA_COPY=1 \ - -DHAVE_SETLOCALE=1 \ - -DHAVE_GETTIMEOFDAY=1 \ - -DHAVE_LONG_LONG=1 \ - -DHAVE_INTMAX_T=1 \ - -DMPFR_HAVE_INTMAX_MAX=1 \ - -DMPFR_HAVE_FESETROUND=1 \ - -DHAVE_DENORMS=1 \ - -DHAVE_ROUND=1 \ - -DHAVE_TRUNC=1 \ - -DHAVE_FLOOR=1 \ - -DHAVE_CEIL=1 \ - -DHAVE_ATTRIBUTE_MODE=1 - -# Find -GMP_MACHINE_ARCH=${MACHINE_ARCH:S/earmv4/arm/:C/armv[5-7]/arm/} -CPPFLAGS+= -I${NETBSDSRCDIR}/external/lgpl3/gmp/lib/libgmp/arch/${GMP_MACHINE_ARCH} -CPPFLAGS+= -I${.CURDIR}/../../dist/src - -# XXX -# XXX XXX check mips* -# XXX XXX do something more, more ports!! -# XXX -# XXX missing: arm* sparc sh3* m68k/m68000 (powerpc64/ia64) - -# IEEE FP support. No VAX here. -.if ${MACHINE_ARCH} == "x86_64" || \ - ${MACHINE_ARCH} == "i386" - ${MACHINE_ARCH} == "mipsel" -CPPFLAGS+= -DHAVE_LDOUBLE_IEEE_EXT_LITTLE=1 -.endif - -.if ${MACHINE_ARCH} == "mips64el" -CPPFLAGS+= -DHAVE_LDOUBLE_IEEE_QUAD_LITTLE=1 -.endif - -.if ${MACHINE_ARCH} == "sparc64" || \ - ${MACHINE_ARCH} == "powerpc" || \ - ${MACHINE_ARCH} == "powerpc64" || \ - ${MACHINE_ARCH} == "mips64eb" -CPPFLAGS+= -DHAVE_LDOUBLE_IEEE_QUAD_BIG=1 -.endif - -WITHOUT_MAN= yes - -.include - -mparam.h: mparam_h.in - rm -f ${.TARGET} && cp ${.ALLSRC} ${.TARGET} - -${SRCS}: mparam.h -CLEANFILES+= mparam.h - -.PATH: ${.CURDIR}/../../dist/src - -.if !empty(MACHINE_ARCH:M*arm*) -COPTS += -marm -.endif -.if ${MACHINE_ARCH} == "vax" -COPTS.set_ld.c+= -Wno-error -.endif - -# Don't warn about functions which cannot be stack smash protected as -# there are a lot of them. -COPTS += -Wno-stack-protector diff --git a/external/lgpl3/mpfr/patches/0000-mpfr.patch b/external/lgpl3/mpfr/patches/0000-mpfr.patch deleted file mode 100644 index 7eb1e04ef..000000000 --- a/external/lgpl3/mpfr/patches/0000-mpfr.patch +++ /dev/null @@ -1,75 +0,0 @@ -diff -rNU3 dist.orig/Makefile.in dist.nbsd/Makefile.in ---- dist.orig/Makefile.in 2013-03-13 16:38:22.000000000 +0100 -+++ dist.nbsd/Makefile.in 2015-10-16 08:31:48.000000000 +0200 -@@ -337,8 +337,12 @@ - $(SHELL) ./config.status --recheck - - $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_configure: - $(am__cd) $(srcdir) && $(AUTOCONF) - $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_aclocal: - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) - $(am__aclocal_m4_deps): - -diff -rNU3 dist.orig/PATCHES dist.nbsd/PATCHES ---- dist.orig/PATCHES 2013-03-13 16:37:38.000000000 +0100 -+++ dist.nbsd/PATCHES 2015-10-16 08:31:48.000000000 +0200 -@@ -0,0 +1,4 @@ -+texp-zero -+atan-expo-range -+rec_sqrt-carry -+asin_exprange -diff -rNU3 dist.orig/src/Makefile.in dist.nbsd/src/Makefile.in ---- dist.orig/src/Makefile.in 2013-03-13 16:38:21.000000000 +0100 -+++ dist.nbsd/src/Makefile.in 2015-10-16 08:31:48.000000000 +0200 -@@ -921,6 +921,8 @@ - # should not be a problem in practice, in particular because "make dist" - # automatically rebuilds get_patches.c before generating the archives. - $(srcdir)/get_patches.c: $(top_srcdir)/PATCHES $(top_srcdir)/tools/get_patches.sh -+ @echo "NOT REBUILDING $@" -+NetBSD_DISABLED_get_patches.c: - (cd $(top_srcdir) && ./tools/get_patches.sh) > $@ || rm -f $@ - - # Do not add get_patches.c to CLEANFILES so that this file doesn't -diff -rNU3 dist.orig/src/mpfr-longlong.h dist.nbsd/src/mpfr-longlong.h ---- dist.orig/src/mpfr-longlong.h 2013-03-13 16:37:32.000000000 +0100 -+++ dist.nbsd/src/mpfr-longlong.h 2014-03-25 16:28:15.000000000 +0100 -@@ -1022,7 +1022,7 @@ - #endif /* __m88000__ */ - - #if defined (__mips) && W_TYPE_SIZE == 32 --#if __GMP_GNUC_PREREQ (4,4) -+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__) - #define umul_ppmm(w1, w0, u, v) \ - do { \ - UDItype __ll = (UDItype)(u) * (v); \ -@@ -1044,7 +1044,7 @@ - #endif /* __mips */ - - #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64 --#if __GMP_GNUC_PREREQ (4,4) -+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__) - #define umul_ppmm(w1, w0, u, v) \ - do { \ - typedef unsigned int __ll_UTItype __attribute__((mode(TI))); \ -@@ -1160,7 +1160,7 @@ - __asm__ ("{cntlz|cntlzw} %0,%1" : "=r" (count) : "r" (x)) - #define COUNT_LEADING_ZEROS_0 32 - #if HAVE_HOST_CPU_FAMILY_powerpc --#if __GMP_GNUC_PREREQ (4,4) -+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__) - #define umul_ppmm(w1, w0, u, v) \ - do { \ - UDItype __ll = (UDItype)(u) * (v); \ -@@ -1259,7 +1259,7 @@ - #define count_leading_zeros(count, x) \ - __asm__ ("cntlzd %0,%1" : "=r" (count) : "r" (x)) - #define COUNT_LEADING_ZEROS_0 64 --#if __GMP_GNUC_PREREQ (4,4) -+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__) - #define umul_ppmm(w1, w0, u, v) \ - do { \ - typedef unsigned int __ll_UTItype __attribute__((mode(TI))); \ diff --git a/lib/Makefile b/lib/Makefile index d40edd1da..6802e84ac 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -135,13 +135,10 @@ SUBDIR+= ../external/public-domain/sqlite/lib #SUBDIR+= ../gnu/lib/libmalloc .if (${MKGCC} != "no") -. if !defined(__MINIX) || ${MKLIBSTDCXX} == "yes" SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libobjc SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgomp -#SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libmudflap -#SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libmudflapth -. endif # !defined(__MINIX) || ${MKLIBSTDCXX} == "yes" -. if !defined(__MINIX) || ${MKLIBSTDCXX} == "yes" +SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libmudflap +SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libmudflapth # Should probably move GMP, MPFR and MPC builds into the GCC >= 4.5 # specific build area, but we get better parallelism this way. # We don't build compat versions of these. @@ -149,7 +146,6 @@ SUBDIR+= ../external/gpl3/${EXTERNAL_GCC_SUBDIR}/lib/libgomp SUBDIR+= ../external/lgpl3/gmp/lib/libgmp SUBDIR+= ../external/lgpl3/mpfr/lib/libmpfr SUBDIR+= ../external/lgpl3/mpc/lib/libmpc -. endif # !defined(__MINIX) || ${MKLIBSTDCXX} == "yes" . endif .endif diff --git a/tools/gmp/Makefile b/tools/gmp/Makefile deleted file mode 100644 index b8c9b5d86..000000000 --- a/tools/gmp/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2012/04/12 01:05:31 mrg Exp $ -# - -GNUHOSTDIST= ${.CURDIR}/../../external/lgpl3/gmp/dist - -CONFIGURE_ARGS+=--disable-shared - -.include "${.CURDIR}/../Makefile.gnuhost" - -# Don't override CFLAGS and CXXFLAGS, it breaks ABI detection. -# PATH needs special treating since "make" tries to expand $PATH -# when variable is used. -CONFIGURE_ENV:= ${CONFIGURE_ENV:NPATH=*:NCFLAGS=*:NCXXFLAGS=*} \ - PATH="${TOOLDIR:Q}/bin:$$$$PATH" - -.if ${HOST_OSTYPE:C/\-.*//} != "Minix" -# Force avoiding possibly non-executable install-sh. -CONFIGURE_ENV+= ac_cv_path_mkdir="${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install -d" -.endif diff --git a/tools/mpc/Makefile b/tools/mpc/Makefile deleted file mode 100644 index 5bad5521f..000000000 --- a/tools/mpc/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -# $NetBSD: Makefile,v 1.3 2013/11/28 12:08:57 mrg Exp $ -# - -GNUHOSTDIST= ${.CURDIR}/../../external/lgpl3/mpc/dist - -CONFIGURE_ARGS+= --with-gmp=${TOOLDIR:Q} \ - --with-mpfr=${TOOLDIR:Q} - -CONFIGURE_ARGS+=--disable-shared - -.include "${.CURDIR}/../Makefile.gnuhost" - -.if ${HOST_OSTYPE:C/\-.*//} != "Minix" -# Force avoiding possibly non-executable install-sh. -CONFIGURE_ENV+= ac_cv_path_mkdir="${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install -d" -.endif diff --git a/tools/mpfr/Makefile b/tools/mpfr/Makefile deleted file mode 100644 index fa34a1356..000000000 --- a/tools/mpfr/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -# $NetBSD: Makefile,v 1.2 2012/04/15 08:37:32 mrg Exp $ -# - -GNUHOSTDIST= ${.CURDIR}/../../external/lgpl3/mpfr/dist - -CONFIGURE_ARGS+= --with-gmp=${TOOLDIR:Q} - -CONFIGURE_ARGS+=--disable-shared - -.include "${.CURDIR}/../Makefile.gnuhost" - -.if ${HOST_OSTYPE:C/\-.*//} != "Minix" -# Force avoiding possibly non-executable install-sh. -CONFIGURE_ENV+= ac_cv_path_mkdir="${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install -d" -.endif