mpc-1.1.0/ 0000755 0001751 0001751 00000000000 13225640275 007301 5 0000000 0000000 mpc-1.1.0/AUTHORS 0000644 0001751 0001751 00000000200 12426164730 010260 0000000 0000000 Main authors:
Andreas Enge
Philippe Théveny
Paul Zimmermann
Mickaël Gastineau has contributed the file Makefile.vc.
mpc-1.1.0/Makefile.am 0000644 0001751 0001751 00000002250 13213755700 011251 0000000 0000000 ## Makefile.am -- Process this file with automake to produce Makefile.in
##
## Copyright (C) 2008, 2010, 2011, 2012, 2013, 2014 INRIA
##
## This file is part of GNU MPC.
##
## GNU MPC 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.
##
## GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
ACLOCAL_AMFLAGS = -I m4
# version number for distribution tarball
# VERSION = @VERSION@@GITVERSION@ # for development version
VERSION = @VERSION@
SUBDIRS = src tests doc tools
EXTRA_HEADERS = src/mpc-log.h
include_HEADERS = src/mpc.h @MPC_LOG_H@
EXTRA_DIST = doc/fdl-1.3.texi src/mpc-log.h Makefile.vc
bench :
cd tools/bench && $(MAKE) $(AM_MAKEFLAGS) bench
mpc-1.1.0/config.guess 0000555 0001751 0001751 00000123671 12645234050 011544 0000000 0000000 #!/bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2014 Free Software Foundation, Inc.
timestamp='2014-11-04'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program 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
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see .
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
#
# Please send patches to .
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION]
Output the configuration name of the system \`$me' is run on.
Operation modes:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
Report bugs and patches to ."
version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright 1992-2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit ;;
--version | -v )
echo "$version" ; exit ;;
--help | --h* | -h )
echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
echo "$me: invalid option $1$help" >&2
exit 1 ;;
* )
break ;;
esac
done
if test $# != 0; then
echo "$me: too many arguments$help" >&2
exit 1
fi
trap 'exit 1' 1 2 15
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a
# headache to deal with in a portable fashion.
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.
# Portable tmp directory creation inspired by the Autoconf team.
set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int x;" > $dummy.c ;
for c in cc gcc c89 c99 ; do
if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
esac ; set_cc_for_build= ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
PATH=$PATH:/.attbin ; export PATH
fi
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_SYSTEM}" in
Linux|GNU|GNU/*)
# If the system lacks a compiler, then just pick glibc.
# We could probably try harder.
LIBC=gnu
eval $set_cc_for_build
cat <<-EOF > $dummy.c
#include
#if defined(__UCLIBC__)
LIBC=uclibc
#elif defined(__dietlibc__)
LIBC=dietlibc
#else
LIBC=gnu
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
;;
esac
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
# compatibility and a consistent mechanism for selecting the
# object file format.
#
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
case "${UNAME_MACHINE_ARCH}" in
armeb) machine=armeb-unknown ;;
arm*) 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.
case "${UNAME_MACHINE_ARCH}" in
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
os=netbsd
else
os=netbsdelf
fi
;;
*)
os=netbsd
;;
esac
# The OS release
# Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
# kernel version information, so it can be replaced with a
# suitable tag, in the style of linux-gnu.
case "${UNAME_VERSION}" in
Debian*)
release='-gnu'
;;
*)
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
*:SolidBSD:*:*)
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*)
echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
*5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
# OSF/1 and Tru64 systems produced since 1995. I hope that
# covers most systems running today. This code pipes the CPU
# types through head -n 1, so we only detect the type of CPU 0.
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
UNAME_MACHINE="alpha" ;;
"EV4.5 (21064)")
UNAME_MACHINE="alpha" ;;
"LCA4 (21066/21068)")
UNAME_MACHINE="alpha" ;;
"EV5 (21164)")
UNAME_MACHINE="alphaev5" ;;
"EV5.6 (21164A)")
UNAME_MACHINE="alphaev56" ;;
"EV5.6 (21164PC)")
UNAME_MACHINE="alphapca56" ;;
"EV5.7 (21164PC)")
UNAME_MACHINE="alphapca57" ;;
"EV6 (21264)")
UNAME_MACHINE="alphaev6" ;;
"EV6.7 (21264A)")
UNAME_MACHINE="alphaev67" ;;
"EV6.8CB (21264C)")
UNAME_MACHINE="alphaev68" ;;
"EV6.8AL (21264B)")
UNAME_MACHINE="alphaev68" ;;
"EV6.8CX (21264D)")
UNAME_MACHINE="alphaev68" ;;
"EV6.9A (21264/EV69A)")
UNAME_MACHINE="alphaev69" ;;
"EV7 (21364)")
UNAME_MACHINE="alphaev7" ;;
"EV7.9 (21364A)")
UNAME_MACHINE="alphaev79" ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit $exitcode ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
# of the specific Alpha model?
echo alpha-pc-interix
exit ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
exit ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
exit ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
exit ;;
*:[Mm]orph[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-morphos
exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
exit ;;
*:z/VM:*:*)
echo s390-ibm-zvmoe
exit ;;
*:OS400:*:*)
echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
exit ;;
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
echo pyramid-pyramid-sysv3
else
echo pyramid-pyramid-bsd
fi
exit ;;
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
exit ;;
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
s390x:SunOS:*:*)
echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
echo i386-pc-auroraux${UNAME_RELEASE}
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build
SUN_ARCH="i386"
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH="x86_64"
fi
fi
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
UNAME_RELEASE=`uname -v`
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
exit ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos${UNAME_RELEASE}
exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
echo m68k-sun-sunos${UNAME_RELEASE}
;;
sun4)
echo sparc-sun-sunos${UNAME_RELEASE}
;;
esac
exit ;;
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
exit ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
# > m68000). The system name ranges from "MiNT" over "FreeMiNT"
# to the lowercase version "mint" (or "freemint"). Finally
# the system name "TOS" denotes a system which is actually not
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE}
exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE}
exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix${UNAME_RELEASE}
exit ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
exit ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#ifdef __cplusplus
#include /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
$CC_FOR_BUILD -o $dummy $dummy.c &&
dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
SYSTEM_NAME=`$dummy $dummyarg` &&
{ echo "$SYSTEM_NAME"; exit; }
echo mips-mips-riscos${UNAME_RELEASE}
exit ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
exit ;;
Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
exit ;;
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
exit ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
exit ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
exit ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
exit ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
exit ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
[ ${TARGET_BINARY_INTERFACE}x = x ]
then
echo m88k-dg-dgux${UNAME_RELEASE}
else
echo m88k-dg-dguxbcs${UNAME_RELEASE}
fi
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
exit ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
exit ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
exit ;;
*:IRIX*:*:*)
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
exit ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i*86:AIX:*:*)
echo i386-ibm-aix
exit ;;
ia64:AIX:*:*)
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include
main()
{
if (!__power_pc())
exit(1);
puts("powerpc-ibm-aix3.2.5");
exit(0);
}
EOF
if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
then
echo "$SYSTEM_NAME"
else
echo rs6000-ibm-aix3.2.5
fi
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
else
echo rs6000-ibm-aix3.2
fi
exit ;;
*:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
fi
if [ -x /usr/bin/lslpp ] ; then
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
exit ;;
*:AIX:*:*)
echo rs6000-ibm-aix
exit ;;
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
exit ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
exit ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
exit ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
exit ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
exit ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
exit ;;
9000/[34678]??:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;;
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
esac ;;
esac
fi
if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE
#include
#include
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
#endif
long cpu = sysconf (_SC_CPU_VERSION);
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
default: puts ("hppa2.0"); break;
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
#endif
default: puts ("hppa1.0"); break;
}
exit (0);
}
EOF
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
if [ ${HP_ARCH} = "hppa2.0w" ]
then
eval $set_cc_for_build
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
# generating 64-bit code. GNU and HP use different nomenclature:
#
# $ CC_FOR_BUILD=cc ./config.guess
# => hppa2.0w-hp-hpux11.23
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
HP_ARCH="hppa2.0w"
else
HP_ARCH="hppa64"
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit ;;
ia64:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ia64-hp-hpux${HPUX_REV}
exit ;;
3050*:HI-UX:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include
int
main ()
{
long cpu = sysconf (_SC_CPU_VERSION);
/* The order matters, because CPU_IS_HP_MC68K erroneously returns
true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
results, however. */
if (CPU_IS_PA_RISC (cpu))
{
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
default: puts ("hppa-hitachi-hiuxwe2"); break;
}
}
else if (CPU_IS_HP_MC68K (cpu))
puts ("m68k-hitachi-hiuxwe2");
else puts ("unknown-hitachi-hiuxwe2");
exit (0);
}
EOF
$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
{ echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
exit ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
echo hppa1.1-hp-bsd
exit ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit ;;
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
exit ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
else
echo ${UNAME_MACHINE}-unknown-osf1
fi
exit ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
exit ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
*:UNICOS/mp:*:*)
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit ;;
sparc*:BSD/OS:*:*)
echo sparc-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
case ${UNAME_PROCESSOR} in
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
*:MINGW64*:*)
echo ${UNAME_MACHINE}-pc-mingw64
exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
*:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
*:Interix*:*)
case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
authenticamd | genuineintel | EM64T)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
echo ia64-unknown-interix${UNAME_RELEASE}
exit ;;
esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
8664:Windows_NT:*)
echo x86_64-pc-mks
exit ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
echo i586-pc-interix
exit ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
exit ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
exit ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
*:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
aarch64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;;
PCA57) UNAME_MACHINE=alphapca56 ;;
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
else
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
hexagon:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef ${UNAME_MACHINE}
#undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=${UNAME_MACHINE}
#else
CPU=
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
openrisc*:Linux:*:*)
echo or1k-unknown-linux-${LIBC}
exit ;;
or32:Linux:*:* | or1k*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
*) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-${LIBC}
exit ;;
ppc64le:Linux:*:*)
echo powerpc64le-unknown-linux-${LIBC}
exit ;;
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
# sysname and nodename.
echo i386-sequent-sysv4
exit ;;
i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo ${UNAME_MACHINE}-pc-os2-emx
exit ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
exit ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
exit ;;
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
exit ;;
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
fi
exit ;;
i*86:*:5:[678]*)
# UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
&& UNAME_MACHINE=i686
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
# prints for the "djgpp" host, or else GDB configury will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit ;;
paragon:*:*:*)
echo i860-intel-osf1
exit ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
fi
exit ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
exit ;;
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
exit ;;
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
exit ;;
M68*:*:R3V[5678]*:*)
test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
OS_REL='.3'
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
exit ;;
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
exit ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
exit ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
exit ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
echo ${UNAME_MACHINE}-sni-sysv4
else
echo ns32k-sni-sysv
fi
exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says
echo i586-unisys-sysv4
exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes .
# How about differentiating between stratus architectures? -djm
echo hppa1.1-stratus-sysv4
exit ;;
*:*:*:FTX*)
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
exit ;;
i*86:VOS:*:*)
# From Paul.Green@stratus.com.
echo ${UNAME_MACHINE}-stratus-vos
exit ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
echo hppa1.1-stratus-vos
exit ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
exit ;;
news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
fi
exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
exit ;;
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
echo powerpc-apple-beos
exit ;;
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit ;;
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
x86_64:Haiku:*:*)
echo x86_64-unknown-haiku
exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE}
exit ;;
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit ;;
SX-7:SUPER-UX:*:*)
echo sx7-nec-superux${UNAME_RELEASE}
exit ;;
SX-8:SUPER-UX:*:*)
echo sx8-nec-superux${UNAME_RELEASE}
exit ;;
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
*:Rhapsody:*:*)
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
eval $set_cc_for_build
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
i386) UNAME_PROCESSOR=x86_64 ;;
powerpc) UNAME_PROCESSOR=powerpc64 ;;
esac
fi
fi
elif test "$UNAME_PROCESSOR" = i386 ; then
# Avoid executing cc on OS X 10.9, as it ships with a stub
# that puts up a graphical alert prompting to install
# developer tools. Any system running Mac OS X 10.7 or
# later (Darwin 11 and later) is required to have a 64-bit
# processor. This is not true of the ARM version of Darwin
# that Apple uses in portable devices.
UNAME_PROCESSOR=x86_64
fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
if test "$UNAME_PROCESSOR" = "x86"; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
exit ;;
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
exit ;;
BS2000:POSIX*:*:*)
echo bs2000-siemens-sysv
exit ;;
DS/*:UNIX_System_V:*:*)
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
exit ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
if test "$cputype" = "386"; then
UNAME_MACHINE=i386
else
UNAME_MACHINE="$cputype"
fi
echo ${UNAME_MACHINE}-unknown-plan9
exit ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
exit ;;
*:TENEX:*:*)
echo pdp10-unknown-tenex
exit ;;
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
echo pdp10-dec-tops20
exit ;;
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
echo pdp10-xkl-tops20
exit ;;
*:TOPS-20:*:*)
echo pdp10-unknown-tops20
exit ;;
*:ITS:*:*)
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
exit ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
V*) echo vax-dec-vms ; exit ;;
esac ;;
*:XENIX:*:SysV)
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
x86_64:VMkernel:*:*)
echo ${UNAME_MACHINE}-unknown-esx
exit ;;
esac
cat >&2 < in order to provide the needed
information to handle your system.
config.guess timestamp = $timestamp
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
hostinfo = `(hostinfo) 2>/dev/null`
/bin/universe = `(/bin/universe) 2>/dev/null`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
/bin/arch = `(/bin/arch) 2>/dev/null`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
UNAME_MACHINE = ${UNAME_MACHINE}
UNAME_RELEASE = ${UNAME_RELEASE}
UNAME_SYSTEM = ${UNAME_SYSTEM}
UNAME_VERSION = ${UNAME_VERSION}
EOF
exit 1
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
mpc-1.1.0/tests/ 0000755 0001751 0001751 00000000000 13225640274 010442 5 0000000 0000000 mpc-1.1.0/tests/add.dat 0000644 0001751 0001751 00000013103 12426164730 011602 0000000 0000000 # Data file for mpc_add.
#
# Copyright (C) 2008 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP1_RE OP1_RE PREC_OP1_IM OP1_IM PREC_OP2_RE OP2_RE PREC_OP2_IM OP2_IM RND_RE RND_IM
#
# where op1 = op1_re + i * op1_im, op2 = op2_re + i * op2_im, rop = rop_re + i * rop_im,
# The data are read from the file and stored in variables op1, op2, rop using
# rounding to nearest when needed, for instance: rop_re is ROP_RE rounded to
# nearest to the precision of PREC_ROP_RE.
# ROP_RE is checked against Re(op1 + op2) rounded to the precision PREC_ROP_RE
# in the direction RND_RE
# ROP_IM is checked against Im(op1 + op2) rounded to the precision PREC_ROP_IM
# in the direction RND_IM
# INEX_RE is the ternary value for the real part with the following notation:
# "?" ternary value not checked
# "+" if ROP_RE is greater than the exact mathematical result
# "0" if ROP_RE is exactly the mathematical result
# "-" if ROP_RE is less than the exact mathematical result
# (m.m. INEX_IM)
# rounding modes notation:
# "N" is rounding to nearest
# "Z" is rounding towards zero
# "U" is rounding towards plus infinity
# "D" is rounding towards minus infinity
# Use prefixes "0b" for values in base two, "0x" for values in base sixteen,
# no prefix for value in base ten.
# In all bases, "nan" is NaN, "inf" is infinity;
# The sign of the result is checked with "+inf", "-inf", "-0", or "+0".
# special values (following ISO C99 standard)
0 0 53 -inf 53 -inf 53 -inf 53 -inf 53 -inf 53 -inf N Z
0 0 53 -inf 53 nan 53 -inf 53 +inf 53 +1 53 -inf Z U
0 0 53 +inf 53 -inf 53 +inf 53 -inf 53 +inf 53 +0 U D
0 0 53 +inf 53 +inf 53 +inf 53 +inf 53 -0 53 -1 D N
0 0 53 -inf 53 -inf 53 -inf 53 -inf 53 -0 53 -1 N U
0 0 53 nan 53 nan 53 -inf 53 +inf 53 +inf 53 nan Z D # check this is true in ISO C99
0 0 53 nan 53 -inf 53 +inf 53 -inf 53 nan 53 -1 U N
0 0 53 +inf 53 nan 53 +inf 53 +inf 53 -0 53 nan D Z
0 0 53 nan 53 nan 53 -inf 53 -inf 53 nan 53 nan N D
0 0 53 +inf 53 -inf 53 -1 53 -inf 53 +inf 53 -1 N D
0 0 53 nan 53 +1 53 -inf 53 +1 53 +inf 53 -0 Z N
0 0 53 +1 53 -inf 53 +1 53 -inf 53 -0 53 +1 U Z
0 0 53 +inf 53 +1 53 +inf 53 +1 53 -0 53 -0 D U
0 0 53 +inf 53 nan 53 -1 53 -inf 53 +inf 53 nan N N
0 0 53 nan 53 +2 53 -inf 53 +1 53 nan 53 +1 Z Z
0 0 53 +1 53 nan 53 +1 53 -inf 53 -0 53 nan U U # check this
0 0 53 nan 53 nan 53 +inf 53 +1 53 nan 53 nan D D
0 0 53 -0 53 nan 53 -0 53 -inf 53 +0 53 +inf D D
0 0 53 -inf 53 +0 53 -inf 53 +0 53 +1 53 -0 N Z
0 0 53 +0 53 -inf 53 +0 53 -inf 53 -0 53 -0 Z U
0 0 53 nan 53 nan 53 +inf 53 +0 53 -inf 53 nan U D # check
0 0 53 nan 53 -inf 53 -0 53 -inf 53 nan 53 -1 D N
0 0 53 -inf 53 nan 53 -inf 53 +0 53 +0 53 nan N U
0 0 53 nan 53 nan 53 +0 53 -inf 53 nan 53 nan Z D
0 0 53 +0 53 -0 53 +0 53 +1 53 -0 53 -1 Z D
0 0 53 -1 53 -0 53 -1 53 -0 53 +0 53 -0 U N
0 0 53 nan 53 +inf 53 -0 53 +1 53 nan 53 +inf D Z
0 0 53 +0 53 nan 53 +1 53 -0 53 -1 53 nan N D
0 0 53 nan 53 +1 53 +0 53 +1 53 nan 53 -0 Z N
0 0 53 nan 53 nan 53 -1 53 -0 53 nan 53 nan U Z
0 0 53 +0 53 +0 53 -0 53 +0 53 +0 53 -0 U Z
0 0 53 nan 53 -inf 53 +0 53 -0 53 nan 53 -inf D U
0 0 53 -1 53 nan 53 +0 53 +0 53 -1 53 nan N N
0 0 53 nan 53 -0 53 -0 53 -0 53 nan 53 -0 Z Z
0 0 53 nan 53 nan 53 -0 53 +0 53 nan 53 nan U U
0 0 53 nan 53 nan 53 nan 53 -inf 53 nan 53 +inf U U # check
0 0 53 +inf 53 nan 53 +inf 53 nan 53 -1 53 nan D D
0 0 53 nan 53 -inf 53 nan 53 -inf 53 nan 53 -0 N Z
0 0 53 nan 53 nan 53 -inf 53 nan 53 nan 53 nan Z U # check
0 0 53 nan 53 nan 53 +1 53 nan 53 nan 53 -1 Z U
0 0 53 nan 53 nan 53 nan 53 +1 53 -0 53 nan U D
0 0 53 nan 53 nan 53 -1 53 nan 53 nan 53 nan D N
0 0 53 nan 53 nan 53 nan 53 +0 53 +0 53 nan D N
0 0 53 nan 53 nan 53 +0 53 nan 53 nan 53 nan N U
0 0 53 nan 53 nan 53 nan 53 nan 53 nan 53 nan N U
# pure real argument
+ 0 53 0x10000000000001p-52 53 -0 53 +1 53 -0 53 0x10000000000001p-105 53 -0 N N
- 0 53 0x10000000000000p-52 53 -0 53 +1 53 -0 53 0x10000000000001p-105 53 -0 Z Z
+ 0 53 0x10000000000001p-52 53 -0 53 +1 53 -0 53 0x10000000000001p-105 53 -0 U U
- 0 53 0x10000000000000p-52 53 -0 53 +1 53 -0 53 0x10000000000001p-105 53 -0 D D
# pure imaginary argument
0 + 53 -0 53 0x10000000000001p-52 53 -0 53 0x10000000000001p-105 53 -0 53 +1 N N
0 - 53 +0 53 0x10000000000000p-52 53 +0 53 0x10000000000001p-105 53 -0 53 +1 Z Z
0 + 53 +0 53 0x10000000000001p-52 53 +0 53 0x10000000000001p-105 53 -0 53 +1 U U
0 - 53 -0 53 0x10000000000000p-52 53 -0 53 0x10000000000001p-105 53 -0 53 +1 D D
mpc-1.1.0/tests/exceptions.c 0000644 0001751 0001751 00000011325 12523065774 012717 0000000 0000000 /* exceptions -- test file for exceptions
Copyright (C) 2015 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
/* Return non-zero if 'rnd' rounds towards zero, for a number of sign 'sgn' */
#define MPC_IS_LIKE_RNDZ(rnd, sgn) \
((rnd==MPFR_RNDZ) || (sgn<0 && rnd==MPFR_RNDU) || (sgn>0 && rnd==MPFR_RNDD))
#define MPFR_SGN(x) (mpfr_signbit (x) ? -1 : 1)
static void
foo (int f(mpc_ptr, mpc_srcptr, mpc_rnd_t), char *s)
{
mpc_t z, t;
int rnd_re, rnd_im, rnd;
#define N 5
mpfr_exp_t exy[N][2] = {{200, 800}, {800, 200}, {-50, 50}, {-10, 1000},
{0, 1000}};
int n, inex, inex_re, inex_im, sgn;
mpc_init2 (z, MPFR_PREC_MIN);
mpc_init2 (t, MPFR_PREC_MIN);
for (n = 0; n < N; n++)
for (sgn = 0; sgn < 4; sgn++)
{
if (exy[n][0])
mpfr_set_ui_2exp (mpc_realref (z), 1, exy[n][0], MPFR_RNDN);
else
mpfr_set_ui (mpc_realref (z), 0, MPFR_RNDN);
if (sgn & 1)
mpfr_neg (mpc_realref (z), mpc_realref (z), MPFR_RNDN);
if (exy[n][1])
mpfr_set_ui_2exp (mpc_imagref (z), 1, exy[n][1], MPFR_RNDN);
else
mpfr_set_ui (mpc_imagref (z), 0, MPFR_RNDN);
if (sgn & 2)
mpfr_neg (mpc_imagref (z), mpc_imagref (z), MPFR_RNDN);
inex = f (t, z, MPC_RNDZZ);
inex_re = MPC_INEX_RE(inex);
inex_im = MPC_INEX_IM(inex);
if (inex_re != 0 && mpfr_inf_p (mpc_realref (t)))
{
fprintf (stderr, "Error, wrong real part with rounding towards zero\n");
fprintf (stderr, "f = %s\n", s);
fprintf (stderr, "z=");
mpc_out_str (stderr, 2, 0, z, MPC_RNDNN);
fprintf (stderr, "\nt=");
mpc_out_str (stderr, 2, 0, t, MPC_RNDNN);
fprintf (stderr, "\n");
exit (1);
}
if (inex_im != 0 && mpfr_inf_p (mpc_imagref (t)))
{
fprintf (stderr, "Error, wrong imag part with rounding towards zero\n");
fprintf (stderr, "f = %s\n", s);
fprintf (stderr, "z=");
mpc_out_str (stderr, 2, 0, z, MPC_RNDNN);
fprintf (stderr, "\nt=");
mpc_out_str (stderr, 2, 0, t, MPC_RNDNN);
fprintf (stderr, "\n");
exit (1);
}
rnd_re = mpfr_signbit (mpc_realref (t)) == 0 ? MPFR_RNDU : MPFR_RNDD;
rnd_im = mpfr_signbit (mpc_imagref (t)) == 0 ? MPFR_RNDU : MPFR_RNDD;
rnd = MPC_RND(rnd_re,rnd_im); /* round away */
inex = f (t, z, rnd);
inex_re = MPC_INEX_RE(inex);
inex_im = MPC_INEX_IM(inex);
if (inex_re != 0 && mpfr_zero_p (mpc_realref (t)))
{
fprintf (stderr, "Error, wrong real part with rounding away from zero\n");
fprintf (stderr, "f = %s\n", s);
fprintf (stderr, "z=");
mpc_out_str (stderr, 2, 0, z, MPC_RNDNN);
fprintf (stderr, "\nt=");
mpc_out_str (stderr, 2, 0, t, MPC_RNDNN);
fprintf (stderr, "\n");
fprintf (stderr, "rnd=%s\n", mpfr_print_rnd_mode (rnd_re));
exit (1);
}
if (inex_im != 0 && mpfr_zero_p (mpc_imagref (t)))
{
fprintf (stderr, "Error, wrong imag part with rounding away from zero\n");
fprintf (stderr, "f = %s\n", s);
fprintf (stderr, "z=");
mpc_out_str (stderr, 2, 0, z, MPC_RNDNN);
fprintf (stderr, "\nt=");
mpc_out_str (stderr, 2, 0, t, MPC_RNDNN);
fprintf (stderr, "\n");
fprintf (stderr, "rnd=%s\n", mpfr_print_rnd_mode (rnd_im));
exit (1);
}
}
mpc_clear (z);
mpc_clear (t);
}
int
main (void)
{
test_start ();
foo (mpc_sqr, "sqr");
foo (mpc_conj, "conj");
foo (mpc_neg, "neg");
foo (mpc_sqrt, "sqrt");
foo (mpc_set, "set");
foo (mpc_proj, "proj");
foo (mpc_exp, "exp");
foo (mpc_exp, "exp");
foo (mpc_log, "log");
foo (mpc_log10, "log10");
foo (mpc_sin, "sin");
foo (mpc_cos, "cos");
foo (mpc_tan, "tan");
foo (mpc_sinh, "sinh");
foo (mpc_cosh, "cosh");
foo (mpc_tanh, "tanh");
foo (mpc_asin, "asin");
foo (mpc_acos, "acos");
foo (mpc_atan, "atan");
foo (mpc_asinh, "asinh");
foo (mpc_acosh, "acosh");
foo (mpc_atanh, "atanh");
test_end ();
return 0;
}
mpc-1.1.0/tests/pow_si.dsc 0000644 0001751 0001751 00000001614 12471661720 012360 0000000 0000000 # Description file for mpc_pow_si
#
# Copyright (C) 2008, 2010, 2011, 2012 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_pow_si
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
long int
mpc_rnd_t
mpc-1.1.0/tests/arg.dsc 0000644 0001751 0001751 00000001506 12471661720 011631 0000000 0000000 # Description file for mpc_arg
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_arg
RETURN:
mpfr_inex
OUTPUT:
mpfr_ptr
INPUT:
mpc_srcptr
mpfr_rnd_t
mpc-1.1.0/tests/sinh.dat 0000644 0001751 0001751 00000006312 12426164730 012017 0000000 0000000 # Data file for mpc_sinh.
#
# Copyright (C) 2008, 2010 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# For explanations on the file format, see sin.dat.
# special values (following ISO C99 standard)
0 0 7 inf 7 NaN 7 -inf 7 -inf N N
0 0 7 -inf 7 -inf 7 -inf 7 -1 N N
0 0 7 -inf 7 -0 7 -inf 7 -0 N N
0 0 7 -inf 7 +0 7 -inf 7 +0 N N
0 0 7 -inf 7 +inf 7 -inf 7 1 N N
0 0 7 inf 7 NaN 7 -inf 7 +inf N N
0 0 7 inf 7 NaN 7 -inf 7 NaN N N
0 0 7 NaN 7 NaN 7 -1 7 -inf N N
0 0 7 NaN 7 NaN 7 -1 7 +inf N N
0 0 7 NaN 7 NaN 7 -1 7 NaN N N
0 0 7 0 7 NaN 7 -0 7 -inf N N
0 0 7 -0 7 -0 7 -0 7 -0 N N
0 0 7 -0 7 +0 7 -0 7 +0 N N
0 0 7 0 7 NaN 7 -0 7 +inf N N
0 0 7 0 7 NaN 7 -0 7 NaN N N
0 0 7 0 7 NaN 7 +0 7 -inf N N
0 0 7 +0 7 -0 7 +0 7 -0 N N
0 0 7 +0 7 +0 7 +0 7 +0 N N
0 0 7 0 7 NaN 7 +0 7 +inf N N
0 0 7 0 7 NaN 7 +0 7 NaN N N
0 0 7 NaN 7 NaN 7 1 7 -inf N N
0 0 7 NaN 7 NaN 7 1 7 +inf N N
0 0 7 NaN 7 NaN 7 1 7 NaN N N
0 0 7 inf 7 NaN 7 +inf 7 -inf N N
0 0 7 +inf 7 -inf 7 +inf 7 -1 N N
0 0 7 +inf 7 -0 7 +inf 7 -0 N N
0 0 7 +inf 7 +0 7 +inf 7 +0 N N
0 0 7 +inf 7 +inf 7 +inf 7 1 N N
0 0 7 inf 7 NaN 7 +inf 7 +inf N N
0 0 7 inf 7 NaN 7 +inf 7 NaN N N
0 0 7 NaN 7 NaN 7 NaN 7 -inf N N
0 0 7 NaN 7 NaN 7 NaN 7 -1 N N
0 0 7 NaN 7 -0 7 NaN 7 -0 N N
0 0 7 NaN 7 +0 7 NaN 7 +0 N N
0 0 7 NaN 7 NaN 7 NaN 7 1 N N
0 0 7 NaN 7 NaN 7 NaN 7 +inf N N
0 0 7 NaN 7 NaN 7 NaN 7 NaN N N
# purely real argument
+ 0 50 -0x12cd9fc44eb98p-48 50 -0 7 -1 7 -0 N N
+ 0 50 -0x12cd9fc44eb98p-48 50 +0 7 -1 7 +0 N N
- 0 50 0x12cd9fc44eb98p-48 50 -0 7 1 7 -0 N N
- 0 50 0x12cd9fc44eb98p-48 50 +0 7 1 7 +0 N N
# purely imaginary argument
0 - 50 -0 50 -0xd76aa47848678p-52 7 -0 7 -1 N N
0 + 50 -0 50 0xd76aa47848678p-52 7 -0 7 1 N N
0 - 50 +0 50 -0xd76aa47848678p-52 7 +0 7 -1 N N
0 + 50 +0 50 0xd76aa47848678p-52 7 +0 7 1 N N
# values with +1 and -1
+ - 50 -0xa28cfec023fc8p-52 50 -0x14c67b74f6cc5p-48 7 -1 7 -1 N N
+ + 50 -0xa28cfec023fc8p-52 50 0x14c67b74f6cc5p-48 7 -1 7 1 N N
- - 50 0xa28cfec023fc8p-52 50 -0x14c67b74f6cc5p-48 7 1 7 -1 N N
- + 50 0xa28cfec023fc8p-52 50 0x14c67b74f6cc5p-48 7 1 7 1 N N
# IEEE-754 double precision
- - 53 0xF48D4FDF29C53p-105 53 2 53 0x15124271980435p-52 53 0x3243F6A8885A3p-49 N N
# huge values
+ - 53 +inf 53 -inf 53 0x4580CBF242683p-3 53 -0x1B3E8A3660D279p-3 N N
+ + 53 +inf 53 +inf 53 -0x1B3E8A3660D279p-3 53 0x4580CBF242683p-3 N N
mpc-1.1.0/tests/tmul_i.c 0000644 0001751 0001751 00000005421 12471661720 012022 0000000 0000000 /* tmul_i -- test file for mpc_mul_i.
Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
static void
check_different_precisions(void)
{
/* check reuse when real and imaginary part have different precisions. */
mpc_t z, expected, got;
int res;
mpc_init2(z, 128);
mpc_init2(expected, 128);
mpc_init2(got, 128);
/* change precision of one part */
mpfr_set_prec (mpc_imagref (z), 32);
mpfr_set_prec (mpc_imagref (expected), 32);
mpfr_set_prec (mpc_imagref (got), 32);
mpfr_set_str (mpc_realref (z), "0x100000000fp-32", 16, MPFR_RNDN);
mpfr_set_str (mpc_imagref (z), "-1", 2, MPFR_RNDN);
mpfr_set_str (mpc_realref (expected), "+1", 2, MPFR_RNDN);
mpfr_set_str (mpc_imagref (expected), "0x100000000fp-32", 16, MPFR_RNDN);
mpc_set (got, z, MPC_RNDNN);
res = mpc_mul_i (got, got, +1, MPC_RNDNN);
if (MPC_INEX_RE(res) != 0 || MPC_INEX_IM(res) >=0)
{
printf("Wrong inexact flag for mpc_mul_i(z, z, n)\n"
" got (re=%2d, im=%2d)\nexpected (re= 0, im=-1)\n",
MPC_INEX_RE(res), MPC_INEX_IM(res));
exit(1);
}
if (mpc_cmp(got, expected) != 0)
{
printf ("Error for mpc_mul_i(z, z, n) for\n");
MPC_OUT (z);
printf ("n=+1\n");
MPC_OUT (expected);
MPC_OUT (got);
exit (1);
}
mpc_neg (expected, expected, MPC_RNDNN);
mpc_set (got, z, MPC_RNDNN);
mpc_mul_i (got, got, -1, MPC_RNDNN);
if (mpc_cmp(got, expected) != 0)
{
printf ("Error for mpc_mul_i(z, z, n) for\n");
MPC_OUT (z);
printf ("n=-1\n");
MPC_OUT (expected);
MPC_OUT (got);
exit (1);
}
mpc_clear (z);
mpc_clear (expected);
mpc_clear (got);
}
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_mul_i (P[1].mpc, P[2].mpc, P[3].i, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_mul_i (P[1].mpc, P[1].mpc, P[3].i, P[4].mpc_rnd)
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
check_different_precisions ();
tgeneric_template ("mul_i.dsc", 2, 1024, 7, 1024);
test_end ();
return 0;
}
mpc-1.1.0/tests/Makefile.am 0000644 0001751 0001751 00000007374 12744456667 012451 0000000 0000000 ## tests/Makefile.am -- Process this file with automake to produce Makefile.in
##
## Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2016 INRIA
##
## This file is part of GNU MPC.
##
## GNU MPC 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.
##
## GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
AM_CPPFLAGS = -I$(top_srcdir)/src
LDADD = libmpc-tests.la $(top_builddir)/src/libmpc.la
# let libtool create an executable instead of a shell script
# useful for tests with valgrind
AM_LDFLAGS = -no-install
# LOADLIBES (documented in the "GNU make" manual and equivalent to LDLIBS)
# enables to compile a program foo.c in the test directory by simply doing
# "make foo".
LOADLIBES=$(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) \
$(top_builddir)/tests/.libs/libmpc-tests.a \
$(top_builddir)/src/.libs/libmpc.a $(LIBS)
check_PROGRAMS = tabs tacos tacosh tadd tadd_fr tadd_si tadd_ui targ \
tasin tasinh tatan tatanh tcmp_abs tconj tcos tcosh \
tdiv tdiv_2si tdiv_2ui \
tdiv_fr tdiv_ui texp tfma tfr_div tfr_sub timag tio_str tlog tlog10 \
tmul tmul_2si tmul_2ui tmul_fr tmul_i tmul_si tmul_ui tneg tnorm tpow \
tpow_d tpow_fr tpow_ld tpow_si tpow_ui tpow_z tprec tproj treal \
treimref trootofunity \
tset tsin tsin_cos tsinh tsqr tsqrt tstrtoc tsub tsub_fr \
tsub_ui tswap ttan ttanh tui_div tui_ui_sub tget_version exceptions
check_LTLIBRARIES=libmpc-tests.la
libmpc_tests_la_SOURCES = mpc-tests.h check_data.c clear_parameters.c \
close_datafile.c comparisons.c copy_parameter.c double_rounding.c \
init_parameters.c mpfr_flags.c open_datafile.c print_parameter.c \
random.c read_data.c read_description.c read_line.c rounding.c \
setprec_parameters.c tpl_gmp.c tpl_mpc.c tpl_mpfr.c tpl_native.c
DESCRIPTIONS = abs.dsc acos.dsc acosh.dsc add.dsc add_fr.dsc add_si.dsc \
add_ui.dsc arg.dsc asin.dsc asinh.dsc atan.dsc atanh.dsc \
cmp_abs.dsc conj.dsc \
cos.dsc cosh.dsc div.dsc div_2si.dsc div_2ui.dsc div_fr.dsc \
div_ui.dsc exp.dsc fma.dsc fr_div.dsc fr_sub.dsc imag.dsc log.dsc \
log10.dsc mul.dsc mul_2si.dsc mul_2ui.dsc mul_fr.dsc mul_i.dsc \
mul_si.dsc mul_ui.dsc neg.dsc norm.dsc pow.dsc pow_d.dsc pow_fr.dsc \
pow_si.dsc pow_ui.dsc pow_z.dsc proj.dsc real.dsc rootofunity.dsc \
sin.dsc sin_cos.dsc \
sinh.dsc sqr.dsc sqrt.dsc sub.dsc sub_fr.dsc sub_ui.dsc tan.dsc \
tanh.dsc ui_div.dsc ui_ui_sub.dsc
DATA_SETS = abs.dat acos.dat acosh.dat add.dat add_fr.dat arg.dat \
asin.dat asinh.dat atan.dat atanh.dat \
cmp_abs.dat conj.dat cos.dat cosh.dat \
div.dat div_fr.dat exp.dat fma.dat fr_div.dat fr_sub.dat inp_str.dat \
log.dat log10.dat mul.dat mul_fr.dat neg.dat norm.dat pow.dat \
pow_fr.dat pow_si.dat pow_ui.dat pow_z.dat proj.dat rootofunity.dat \
sin.dat sinh.dat \
sqr.dat sqrt.dat strtoc.dat sub.dat sub_fr.dat tan.dat tanh.dat
EXTRA_DIST = data_check.tpl tgeneric.tpl $(DATA_SETS) $(DESCRIPTIONS)
LOG_COMPILER = $(VALGRIND)
AM_LOG_FLAGS = $(VALGRIND_OPTS)
TESTS = $(check_PROGRAMS)
CLEANFILES = mpc_test
mpc-1.1.0/tests/tan.dat 0000644 0001751 0001751 00000017570 12523065774 011656 0000000 0000000 # Data test file for mpc_tan.
#
# Copyright (C) 2008, 2010, 2011 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
# See file sin.dat for the format description.
# Special values, following ISO C99 standard, Annex G,
# more precisely Section G.6.2.6 "The ctanh functions"
# since G.6 defines ctan(z) as -i * ctanh(i*z)
# Rule [conj]: tan(conj(z)) = conj(tan(z))
# Rule [odd]: tan(-z) = -tan(z)
# Note: for each rule, we cite the rule for tanh from C99,
# and below the translated rule for tan, using tanh(z) = i tan(-iz),
# thus tanh(a+i*b) = c+i*d translates to tan(b-i*a) = d-i*c
# tanh(+0 + i*0) = +0 + i*0
# tan (+0 - i*0) = +0 - i*0
0 0 2 +0 2 -0 2 +0 2 -0 N N
# [conj]: tan(+0 + i*0) = +0 + i*0
0 0 2 +0 2 +0 2 +0 2 +0 N N
# [odd]: tan(-0 + i*0) = -0 + i*0
0 0 2 -0 2 +0 2 -0 2 +0 N N
# [odd+conj]: tan(-0 - i*0) = -0 - i*0
0 0 2 -0 2 -0 2 -0 2 -0 N N
# tanh(x + i*inf) = nan + i*nan for finite x
# tan (inf - i*x) = nan + i*nan for finite x
0 0 2 nan 2 nan 2 +inf 2 +1 N N
0 0 2 nan 2 nan 2 +inf 2 +0 N N
0 0 2 nan 2 nan 2 +inf 2 -0 N N
0 0 2 nan 2 nan 2 +inf 2 -1 N N
# [conj] does not make sense since we already considered x < 0
# [odd]: tan(-inf + i*x) = nan + i*nan for finite x
0 0 2 nan 2 nan 2 -inf 2 +1 N N
0 0 2 nan 2 nan 2 -inf 2 +0 N N
0 0 2 nan 2 nan 2 -inf 2 -0 N N
0 0 2 nan 2 nan 2 -inf 2 -1 N N
# tanh(x + i*nan) = nan + i*nan for finite x
# tan (nan + i*x) = nan + i*nan for finite x
0 0 2 nan 2 nan 2 nan 2 1 N N
0 0 2 nan 2 nan 2 nan 2 +0 N N
0 0 2 nan 2 nan 2 nan 2 -0 N N
0 0 2 nan 2 nan 2 nan 2 -1 N N
# [conj] makes no sense since we already considered x < 0
# idem for [odd] since nan has no sign
# tanh(+inf + i*y) = 1 + i*0*sin(2y) for positive-signed finite y
# tan (y - i*inf) = 0*sin(2*y) - i*1 for positive-signed finite y
0 0 2 +0 2 -1 2 1 2 -inf N N
0 0 2 -0 2 -1 2 2 2 -inf N N
# [conj]: tan (y + i*inf) = 0*sin(2*y) + i*1
0 0 2 +0 2 +1 2 1 2 +inf N N
0 0 2 -0 2 +1 2 2 2 +inf N N
# [odd]: tan (-y + i*inf) = -0*sin(2*y) + i*1
0 0 2 -0 2 +1 2 -1 2 +inf N N
0 0 2 +0 2 +1 2 -2 2 +inf N N
# [odd+conj]: tan (-y - i*inf) = -0*sin(2*y) - i*1
0 0 2 -0 2 -1 2 -1 2 -inf N N
0 0 2 +0 2 -1 2 -2 2 -inf N N
# tanh(+inf + i*inf) = 1 +/- i*0 (unspecified sign of zero for C99)
# tan (+inf - i*inf) = +/-0 - i*1
0 0 2 0 2 -1 2 +inf 2 -inf N N
# [conj]: tan (+inf + i*inf) = +/-0 + i*1
0 0 2 0 2 +1 2 +inf 2 +inf N N
# [odd]: tan (-inf + i*inf) = +/-0 + i*1
0 0 2 0 2 +1 2 -inf 2 +inf N N
# [odd+conj]: tan (-inf - i*inf) = +/-0 - i*1
0 0 2 0 2 -1 2 -inf 2 -inf N N
# tanh(+inf + i*nan) = 1 +/- i*0 (unspecified sign of zero for C99)
# tan (nan - i*inf) = +/-0 - i*1
0 0 2 0 2 -1 2 nan 2 -inf N N
# [conj]: tan (nan + i*inf) = +/-0 + i*1
0 0 2 0 2 +1 2 nan 2 +inf N N
# [odd] = [conj] since nan has no sign, and -(+/-0) = +/-0
# tanh(nan + i*0) = nan + i*0
# tan(+0 + i*nan) = +0 + i*nan
0 0 2 +0 2 nan 2 +0 2 nan N N
# [conj] gives the same identity since nan has no sign
# [odd]: tan(-0 + i*nan) = -0 + i*nan
0 0 2 -0 2 nan 2 -0 2 nan N N
# tanh(nan + i*y) = nan + i*nan for all nonzero y
# tan (y + i*nan) = nan + i*nan
0 0 2 nan 2 nan 2 +inf 2 nan N N
0 0 2 nan 2 nan 2 +1 2 nan N N
0 0 2 nan 2 nan 2 -1 2 nan N N
0 0 2 nan 2 nan 2 -inf 2 nan N N
# [conj] gives no new relation since nan has no sign
# [odd] gives no new relation since we already considered y < 0
# tanh(nan + i*nan) = nan + i*nan
0 0 2 nan 2 nan 2 nan 2 nan N N
# corner case: op = atan (2^(-k) + i*2^k) for k=200 and k=1000
+ + 100 0x1@-50 100 0x1@50 1000 0x1.921fb54442d18469898cc51701b839a252049c1114cf98e804177d4c76273644a29410f31c6809bbdf2a33679a748636605614dbe4be286e9fc26adadaa3848bc90b6aecc4bcfd8de89884d34c6fdad617feb96de80d6fdbdc70d7f6b5133f4b5d3e4822f8963fcc9250cca3d9c8b67b8400f97142c77e0b31b4906c38 1000 0x1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555548888888888888888888888888888888888888888888888888a@-50 N N
+ + 100 0x1@-250 100 0x1@250 4000 0x1.921fb54442d18469898cc51701b839a252049c1114cf98e804177d4c76273644a29410f31c6809bbdf2a33679a748636605614dbe4be286e9fc26adadaa3848bc90b6aecc4bcfd8de89885d34c6fdad617feb96de80d6fdbdc70d7f6b5133f4b5d3e4822f8963fcc9250cca3d9c8b67b8400f97142c77e0b31b4906c38aba734d22c7f51fa499ebf06caba47b9475b2c38c5e6ac410aa5773daa520ee12d2cdace186a9c95793009e2e8d811943042f86520bc8c5c6d9c77c73cee58301d0c07364f0745d80f451f6b8abbe0de98a593bc5797ed2ab02e30732a92f9d52ad5ca2ba44c3131f40a202ae51cb51555885b5a662e1a08a0f46750aa4357be3974c9d9f70a08b1b7de1515d4e2aeba0c18fb672e1f0b4dc3c98f57eb5d19b61267ae3d1929c0944ac33b9dc7a44c35a5dcd7e25ff40db31410c9b0ec04e67d90d4c8a43e56302ef6401977c22eaef4c2bad8ee13118175b28dc411c49f40e9cb566287b6b7f9c1fa211c9705a2415242100234e478254f0fccaf10e334217b74b64d33864e30d5e9c4783528d0696c2a17b44b07d39455a899d1b77785b609bd1df25d1df8283f7d954c50f8b28e9cd780bb33652c9f412187444677430ca2b7cfda3ec252e19dc5af5f7037baec42e09039a00d224fab60b5532769d5311b1fbb830dff6fb9214d811e9be86b92680509246d87f56a 4000 0x1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000055555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555556@-250 N N
# yet another absurd case: op = atan (2^200) + 2^(-200000)*I;
# expensive to compute
#- - 50 0x1@50 50 0x1@-49900 1000 0x1.921fb54442d18469898cc51701b839a252049c1114cf98e803177d4c76273644a29410f31c6809bbdf2a33679a748636605614dbe4be286e9fc26adadaa3848bc90b6aecc4bcfd8de8988628a1c5302b6d540ec33d62c53131c62d4c0a6894a0b2939d784deb9521e7a621f92f1e0bd0d9564ec6981cd3608709e5c18e 1000 0x1@-50000 N N
# corner case
- + 9 -0x9bp-51 9 -1 9 -0x16dp-8 9 -0x77p-3 N N
# huge values
+ - 53 -0 53 -1 53 0x4580CBF242683p-3 53 -0x1B3E8A3660D279p-3 N N
- - 53 +0 53 -1 53 -0x4580CBF242683p-3 53 -0x1B3E8A3660D279p-3 N N
+ + 53 -0 53 +1 53 -0x1B3E8A3660D279p-3 53 0x4580CBF242683p-3 N N
# some values taken from ttan.c
+ + 53 0x1D02967C31CDB5 53 0x1D02967C31CDB5 53 0x3243F6A8885A30p-53 53 0x11A62633145C07p-106 N N
- + 53 0x1D02967C31CDB4 53 0x1D02967C31CDB5 53 0x3243F6A8885A30p-53 53 0x11A62633145C07p-106 D U
- - 53 0x1D02967C31CDB4 53 0x1D02967C31CDB4 53 0x3243F6A8885A30p-53 53 0x11A62633145C07p-106 Z D
- + 53 -0xB0BD0AA4A3B3D 53 -0xB0BD0AA4A3B3D 53 0x1921FB54442D19p-52 53 -0x172CECE675D1FDp-105 N N
# bug reported by Joseph Myers (07 Apr 2015)
- - 2 0 2 0.75 2 0x1p-10 2 0x1p1000 Z Z
mpc-1.1.0/tests/pow.dat 0000644 0001751 0001751 00000064201 12720536532 011664 0000000 0000000 # Data file for mpc_pow.
#
# Copyright (C) 2009, 2011, 2012 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# For explanations on the file format, see add.dat.
0 0 53 +1 53 0 53 nan 53 +0 53 +0 53 +0 N N
0 0 53 nan 53 nan 53 nan 53 +0 53 +0 53 +1 N N
0 0 53 nan 53 nan 53 nan 53 +0 53 +0 53 -1 N N
0 0 53 nan 53 nan 53 nan 53 +0 53 +1 53 +0 N N
0 0 53 nan 53 nan 53 nan 53 +0 53 +1 53 +1 N N
0 0 53 nan 53 nan 53 nan 53 +0 53 -1 53 +0 N N
0 0 53 nan 53 nan 53 nan 53 +0 53 nan 53 +0 N N
0 0 53 nan 53 nan 53 nan 53 +0 53 +inf 53 +0 N N
0 0 53 nan 53 nan 53 nan 53 +0 53 +inf 53 +1 N N
0 0 53 nan 53 nan 53 nan 53 +0 53 +inf 53 -1 N N
0 0 53 nan 53 nan 53 nan 53 +0 53 -inf 53 +0 N N
0 0 53 nan 53 nan 53 +inf 53 +0 53 +0 53 +1 N N
0 0 53 nan 53 nan 53 +inf 53 +0 53 +0 53 -1 N N
0 0 53 inf 53 nan 53 +inf 53 +0 53 +1 53 +0 N N
0 0 53 +inf 53 nan 53 +inf 53 +0 53 +1 53 +1 N N
0 0 53 +inf 53 nan 53 +inf 53 +0 53 +1 53 -1 N N
0 0 53 0 53 0 53 +inf 53 +0 53 -1 53 +0 N N
0 0 53 0 53 0 53 +inf 53 +0 53 -1 53 +1 N N
0 0 53 0 53 0 53 +inf 53 +0 53 -1 53 -1 N N
0 0 53 nan 53 nan 53 +inf 53 +0 53 nan 53 +0 N N
0 0 53 nan 53 nan 53 +inf 53 +0 53 nan 53 +1 N N
0 0 53 nan 53 nan 53 +inf 53 +0 53 nan 53 -1 N N
0 0 53 +inf 53 nan 53 +inf 53 +0 53 +inf 53 +0 N N
0 0 53 +inf 53 nan 53 +inf 53 +0 53 +inf 53 +1 N N
0 0 53 +inf 53 nan 53 +inf 53 +0 53 +inf 53 -1 N N
0 0 53 0 53 0 53 +inf 53 +0 53 -inf 53 +0 N N
0 0 53 0 53 0 53 +inf 53 +0 53 -inf 53 +1 N N
0 0 53 0 53 0 53 +inf 53 +0 53 -inf 53 -1 N N
0 0 53 nan 53 nan 53 +inf 53 +1 53 +0 53 +1 N N
0 0 53 nan 53 nan 53 +inf 53 +1 53 +0 53 -1 N N
0 0 53 +inf 53 nan 53 +inf 53 +1 53 +1 53 +0 N N
0 0 53 +inf 53 nan 53 +inf 53 +1 53 +1 53 +1 N N
0 0 53 +inf 53 nan 53 +inf 53 +1 53 +1 53 -1 N N
0 0 53 0 53 0 53 +inf 53 +1 53 -1 53 +0 N N
0 0 53 0 53 0 53 +inf 53 +1 53 -1 53 +1 N N
0 0 53 0 53 0 53 +inf 53 +1 53 -1 53 -1 N N
0 0 53 nan 53 nan 53 +inf 53 +1 53 nan 53 +0 N N
0 0 53 nan 53 nan 53 +inf 53 +1 53 nan 53 +1 N N
0 0 53 nan 53 nan 53 +inf 53 +1 53 nan 53 -1 N N
0 0 53 +inf 53 nan 53 +inf 53 +1 53 +inf 53 +0 N N
0 0 53 +inf 53 nan 53 +inf 53 +1 53 +inf 53 +1 N N
0 0 53 +inf 53 nan 53 +inf 53 +1 53 +inf 53 -1 N N
0 0 53 0 53 0 53 +inf 53 +1 53 -inf 53 +0 N N
0 0 53 0 53 0 53 +inf 53 +1 53 -inf 53 +1 N N
0 0 53 0 53 0 53 +inf 53 +1 53 -inf 53 -1 N N
0 0 53 nan 53 nan 53 +inf 53 -1 53 +0 53 +1 N N
0 0 53 nan 53 nan 53 +inf 53 -1 53 +0 53 -1 N N
0 0 53 +inf 53 nan 53 +inf 53 -1 53 +1 53 +0 N N
0 0 53 +inf 53 nan 53 +inf 53 -1 53 +1 53 +1 N N
0 0 53 +inf 53 nan 53 +inf 53 -1 53 +1 53 -1 N N
0 0 53 0 53 0 53 +inf 53 -1 53 -1 53 +0 N N
0 0 53 0 53 0 53 +inf 53 -1 53 -1 53 +1 N N
0 0 53 0 53 0 53 +inf 53 -1 53 -1 53 -1 N N
0 0 53 nan 53 nan 53 +inf 53 -1 53 nan 53 +0 N N
0 0 53 nan 53 nan 53 +inf 53 -1 53 nan 53 +1 N N
0 0 53 nan 53 nan 53 +inf 53 -1 53 nan 53 -1 N N
0 0 53 +inf 53 nan 53 +inf 53 -1 53 +inf 53 +0 N N
0 0 53 +inf 53 nan 53 +inf 53 -1 53 +inf 53 +1 N N
0 0 53 +inf 53 nan 53 +inf 53 -1 53 +inf 53 -1 N N
0 0 53 0 53 0 53 +inf 53 -1 53 -inf 53 +0 N N
0 0 53 0 53 0 53 +inf 53 -1 53 -inf 53 +1 N N
0 0 53 0 53 0 53 +inf 53 -1 53 -inf 53 -1 N N
0 0 53 nan 53 nan 53 -inf 53 +0 53 +0 53 +1 N N
0 0 53 nan 53 nan 53 -inf 53 +0 53 +0 53 -1 N N
0 0 53 +inf 53 nan 53 -inf 53 +0 53 +1 53 +0 N N
0 0 53 +inf 53 nan 53 -inf 53 +0 53 +1 53 +1 N N
0 0 53 +inf 53 nan 53 -inf 53 +0 53 +1 53 -1 N N
0 0 53 0 53 0 53 -inf 53 +0 53 -1 53 +0 N N
0 0 53 0 53 0 53 -inf 53 +0 53 -1 53 +1 N N
0 0 53 0 53 0 53 -inf 53 +0 53 -1 53 -1 N N
0 0 53 nan 53 nan 53 -inf 53 +0 53 nan 53 +0 N N
0 0 53 nan 53 nan 53 -inf 53 +0 53 nan 53 +1 N N
0 0 53 nan 53 nan 53 -inf 53 +0 53 nan 53 -1 N N
0 0 53 +inf 53 nan 53 -inf 53 +0 53 +inf 53 +0 N N
0 0 53 +inf 53 nan 53 -inf 53 +0 53 +inf 53 +1 N N
0 0 53 +inf 53 nan 53 -inf 53 +0 53 +inf 53 -1 N N
0 0 53 0 53 0 53 -inf 53 +0 53 -inf 53 +0 N N
0 0 53 0 53 0 53 -inf 53 +0 53 -inf 53 +1 N N
0 0 53 0 53 0 53 -inf 53 +0 53 -inf 53 -1 N N
0 0 53 nan 53 nan 53 -inf 53 +1 53 +0 53 +1 N N
0 0 53 nan 53 nan 53 -inf 53 +1 53 +0 53 -1 N N
0 0 53 +inf 53 nan 53 -inf 53 +1 53 +1 53 +0 N N
0 0 53 +inf 53 nan 53 -inf 53 +1 53 +1 53 +1 N N
0 0 53 +inf 53 nan 53 -inf 53 +1 53 +1 53 -1 N N
0 0 53 0 53 0 53 -inf 53 +1 53 -1 53 +0 N N
0 0 53 0 53 0 53 -inf 53 +1 53 -1 53 +1 N N
0 0 53 0 53 0 53 -inf 53 +1 53 -1 53 -1 N N
0 0 53 nan 53 nan 53 -inf 53 +1 53 nan 53 +0 N N
0 0 53 nan 53 nan 53 -inf 53 +1 53 nan 53 +1 N N
0 0 53 nan 53 nan 53 -inf 53 +1 53 nan 53 -1 N N
0 0 53 +inf 53 nan 53 -inf 53 +1 53 +inf 53 +0 N N
0 0 53 +inf 53 nan 53 -inf 53 +1 53 +inf 53 +1 N N
0 0 53 +inf 53 nan 53 -inf 53 +1 53 +inf 53 -1 N N
0 0 53 0 53 0 53 -inf 53 +1 53 -inf 53 +0 N N
0 0 53 0 53 0 53 -inf 53 +1 53 -inf 53 +1 N N
0 0 53 0 53 0 53 -inf 53 +1 53 -inf 53 -1 N N
0 0 53 nan 53 nan 53 -inf 53 -1 53 +0 53 +1 N N
0 0 53 nan 53 nan 53 -inf 53 -1 53 +0 53 -1 N N
0 0 53 +inf 53 nan 53 -inf 53 -1 53 +1 53 +0 N N
0 0 53 +inf 53 nan 53 -inf 53 -1 53 +1 53 +1 N N
0 0 53 +inf 53 nan 53 -inf 53 -1 53 +1 53 -1 N N
0 0 53 0 53 0 53 -inf 53 -1 53 -1 53 +0 N N
0 0 53 0 53 0 53 -inf 53 -1 53 -1 53 +1 N N
0 0 53 0 53 0 53 -inf 53 -1 53 -1 53 -1 N N
0 0 53 nan 53 nan 53 -inf 53 -1 53 nan 53 +0 N N
0 0 53 nan 53 nan 53 -inf 53 -1 53 nan 53 +1 N N
0 0 53 nan 53 nan 53 -inf 53 -1 53 nan 53 -1 N N
0 0 53 +inf 53 nan 53 -inf 53 -1 53 +inf 53 +0 N N
0 0 53 +inf 53 nan 53 -inf 53 -1 53 +inf 53 +1 N N
0 0 53 +inf 53 nan 53 -inf 53 -1 53 +inf 53 -1 N N
0 0 53 0 53 0 53 -inf 53 -1 53 -inf 53 +0 N N
0 0 53 0 53 0 53 -inf 53 -1 53 -inf 53 +1 N N
0 0 53 0 53 0 53 -inf 53 -1 53 -inf 53 -1 N N
0 0 53 1 53 +0 53 +0 53 +0 53 +0 53 +0 N N
0 0 53 1 53 +0 53 +0 53 +0 53 -0 53 +0 N N
0 0 53 1 53 +0 53 +0 53 -0 53 +0 53 +0 N N
0 0 53 1 53 +0 53 +0 53 -0 53 -0 53 +0 N N
0 0 53 1 53 +0 53 -0 53 +0 53 +0 53 +0 N N
0 0 53 1 53 +0 53 -0 53 +0 53 -0 53 +0 N N
0 0 53 1 53 +0 53 -0 53 -0 53 +0 53 +0 N N
0 0 53 1 53 +0 53 -0 53 -0 53 -0 53 +0 N N
0 0 53 1 53 +0 53 +0 53 +0 53 +0 53 -0 N N
0 0 53 1 53 +0 53 +0 53 +0 53 -0 53 -0 N N
0 0 53 1 53 +0 53 +0 53 -0 53 +0 53 -0 N N
0 0 53 1 53 +0 53 +0 53 -0 53 -0 53 -0 N N
0 0 53 1 53 +0 53 -0 53 +0 53 +0 53 -0 N N
0 0 53 1 53 +0 53 -0 53 +0 53 -0 53 -0 N N
0 0 53 1 53 +0 53 -0 53 -0 53 +0 53 -0 N N
0 0 53 1 53 +0 53 -0 53 -0 53 -0 53 -0 N N
0 0 53 nan 53 nan 53 +0 53 +0 53 +0 53 +1 N N
0 0 53 nan 53 nan 53 +0 53 +0 53 +0 53 -1 N N
0 0 53 0 53 0 53 +0 53 +0 53 +1 53 +0 N N
0 0 53 0 53 0 53 +0 53 +0 53 +1 53 +1 N N
0 0 53 0 53 0 53 +0 53 +0 53 +1 53 -1 N N
0 0 53 +inf 53 nan 53 +0 53 +0 53 -1 53 +0 N N
0 0 53 +inf 53 nan 53 +0 53 +0 53 -1 53 +1 N N
0 0 53 +inf 53 nan 53 +0 53 +0 53 -1 53 -1 N N
0 0 53 nan 53 nan 53 +0 53 +0 53 nan 53 +0 N N
0 0 53 nan 53 nan 53 +0 53 +0 53 nan 53 +1 N N
0 0 53 nan 53 nan 53 +0 53 +0 53 nan 53 -1 N N
0 0 53 0 53 0 53 +0 53 +0 53 +inf 53 +0 N N
0 0 53 0 53 0 53 +0 53 +0 53 +inf 53 +1 N N
0 0 53 0 53 0 53 +0 53 +0 53 +inf 53 -1 N N
0 0 53 +inf 53 nan 53 +0 53 +0 53 -inf 53 +0 N N
0 0 53 +inf 53 nan 53 +0 53 +0 53 -inf 53 +1 N N
0 0 53 +inf 53 nan 53 +0 53 +0 53 -inf 53 -1 N N
# zeros with determined sign, see algorithms.tex
# x^0 = +1 +sign(Im(x))*sign(Re(y))*0i when |x|=1
0 0 53 +1 53 +0 53 +0 53 +1 53 +0 53 +0 N N
0 0 53 +1 53 -0 53 +0 53 +1 53 +0 53 +0 N D #round toward -oo
0 0 53 +1 53 +0 53 -0 53 +1 53 +0 53 +0 N N
0 0 53 +1 53 +0 53 -1 53 +0 53 +0 53 +0 N N
0 0 53 +1 53 -0 53 -1 53 -0 53 +0 53 +0 N N
0 0 53 +1 53 -0 53 -0 53 -1 53 +0 53 +0 N N
0 0 53 +1 53 -0 53 +0 53 -1 53 +0 53 +0 N N
0 0 53 +1 53 +0 53 +0 53 +1 53 +0 53 -0 N N
0 0 53 +1 53 +0 53 -0 53 +1 53 +0 53 -0 N N
0 0 53 +1 53 +0 53 -1 53 +0 53 +0 53 -0 N N
0 0 53 +1 53 -0 53 -1 53 -0 53 +0 53 -0 N N
0 0 53 +1 53 -0 53 -0 53 -1 53 +0 53 -0 N N
0 0 53 +1 53 -0 53 +0 53 -1 53 +0 53 -0 N N
0 0 53 +1 53 -0 53 +0 53 +1 53 -0 53 +0 N N
0 0 53 +1 53 -0 53 -0 53 +1 53 -0 53 +0 N N
0 0 53 +1 53 -0 53 -1 53 +0 53 -0 53 +0 N N
0 0 53 +1 53 +0 53 -1 53 -0 53 -0 53 +0 N N
0 0 53 +1 53 +0 53 -0 53 -1 53 -0 53 +0 N N
0 0 53 +1 53 +0 53 +0 53 -1 53 -0 53 +0 N N
0 0 53 +1 53 -0 53 +0 53 +1 53 -0 53 -0 N N
0 0 53 +1 53 -0 53 -0 53 +1 53 -0 53 -0 N N
0 0 53 +1 53 -0 53 -1 53 +0 53 -0 53 -0 N N
0 0 53 +1 53 +0 53 -1 53 -0 53 -0 53 -0 N N
0 0 53 +1 53 +0 53 -0 53 -1 53 -0 53 -0 N N
0 0 53 +1 53 +0 53 +0 53 -1 53 -0 53 -0 N N
# x^0 = +1 +sign(Im(y))*0i when |x| > 1
0 0 53 +1 53 +0 53 +inf 53 +2 53 +0 53 +0 N N
0 0 53 +1 53 +0 53 +inf 53 -0 53 +0 53 +0 N N
0 0 53 +1 53 +0 53 +2 53 +inf 53 +0 53 +0 N N
0 0 53 +1 53 +0 53 +2 53 +0 53 +0 53 +0 N N
0 0 53 +1 53 +0 53 +0 53 +2 53 +0 53 +0 N N
0 0 53 +1 53 +0 53 +0 53 +inf 53 +0 53 +0 N N
0 0 53 +1 53 +0 53 -0 53 +2 53 +0 53 +0 N N
0 0 53 +1 53 +0 53 -0 53 +inf 53 +0 53 +0 N N
0 0 53 +1 53 +0 53 -5 53 +inf 53 +0 53 +0 N N
0 0 53 +1 53 +0 53 -2 53 +0 53 +0 53 +0 N N
0 0 53 +1 53 +0 53 -inf 53 +0 53 +0 53 +0 N N
0 0 53 +1 53 +0 53 -inf 53 +3 53 +0 53 +0 N N
0 0 53 +1 53 -0 53 +inf 53 -inf 53 +0 53 -0 N N
0 0 53 +1 53 -0 53 +inf 53 +0 53 +0 53 -0 N N
0 0 53 +1 53 -0 53 +inf 53 -2 53 +0 53 -0 N N
0 0 53 +1 53 -0 53 +2 53 -5 53 +0 53 -0 N N
0 0 53 +1 53 -0 53 +5 53 +0 53 +0 53 -0 N N
0 0 53 +1 53 -0 53 +0 53 -inf 53 +0 53 -0 N N
0 0 53 +1 53 -0 53 -0 53 -inf 53 +0 53 -0 N N
0 0 53 +1 53 -0 53 -5 53 -0 53 +0 53 -0 N N
0 0 53 +1 53 -0 53 +inf 53 -0 53 +0 53 -0 N N
0 0 53 +1 53 -0 53 +inf 53 -2 53 +0 53 -0 N N
0 0 53 +1 53 +0 53 -inf 53 -inf 53 -0 53 +0 N N
0 0 53 +1 53 +0 53 +inf 53 +0 53 -0 53 +0 N N
0 0 53 +1 53 +0 53 +2 53 -5 53 -0 53 +0 N N
0 0 53 +1 53 +0 53 +5 53 +0 53 -0 53 +0 N N
0 0 53 +1 53 +0 53 +5 53 -0 53 -0 53 +0 N N
0 0 53 +1 53 +0 53 +0 53 -2 53 -0 53 +0 N N
0 0 53 +1 53 +0 53 -0 53 -2 53 -0 53 +0 N N
0 0 53 +1 53 +0 53 -5 53 -0 53 -0 53 +0 N N
0 0 53 +1 53 +0 53 -inf 53 -0 53 -0 53 +0 N N
0 0 53 +1 53 -0 53 +inf 53 +inf 53 -0 53 -0 N N
0 0 53 +1 53 -0 53 +2 53 +5 53 -0 53 -0 N N
0 0 53 +1 53 -0 53 +2 53 +0 53 -0 53 -0 N N
0 0 53 +1 53 -0 53 +2 53 -0 53 -0 53 -0 N N
0 0 53 +1 53 -0 53 +0 53 +2 53 -0 53 -0 N N
0 0 53 +1 53 -0 53 -0 53 +2 53 -0 53 -0 N N
0 0 53 +1 53 -0 53 -5 53 +2 53 -0 53 -0 N N
0 0 53 +1 53 -0 53 -5 53 +0 53 -0 53 -0 N N
0 0 53 +1 53 -0 53 -inf 53 +inf 53 -0 53 -0 N N
0 0 53 +1 53 -0 53 -inf 53 +inf 53 -0 53 -0 N N
# x^0 = +1 -sign(Im(y))*0i when 1 > |x| > 0
0 0 53 +1 53 -0 53 +0.5 53 -0.5 53 +0 53 +0 N N
0 0 53 +1 53 -0 53 +0.5 53 +0 53 +0 53 +0 N N
0 0 53 +1 53 -0 53 +0.5 53 -0 53 +0 53 +0 N N
0 0 53 +1 53 -0 53 -0.5 53 -0 53 +0 53 +0 N N
0 0 53 +1 53 -0 53 +0 53 -0.5 53 +0 53 +0 N N
0 0 53 +1 53 -0 53 -0 53 -0.5 53 +0 53 +0 N N
0 0 53 +1 53 +0 53 +0.5 53 +0.5 53 +0 53 -0 N N
0 0 53 +1 53 +0 53 +0.5 53 +0 53 +0 53 -0 N N
0 0 53 +1 53 +0 53 +0.5 53 -0 53 +0 53 -0 N N
0 0 53 +1 53 +0 53 -0.5 53 +0 53 +0 53 -0 N N
0 0 53 +1 53 +0 53 +0 53 +0.5 53 +0 53 -0 N N
0 0 53 +1 53 +0 53 -0 53 +0.5 53 +0 53 -0 N N
0 0 53 +1 53 -0 53 +0.5 53 +0.5 53 -0 53 +0 N N
0 0 53 +1 53 -0 53 +0.5 53 +0 53 -0 53 +0 N N
0 0 53 +1 53 -0 53 +0.5 53 -0 53 -0 53 +0 N N
0 0 53 +1 53 -0 53 -0.5 53 -0 53 -0 53 +0 N N
0 0 53 +1 53 -0 53 +0 53 +0.5 53 -0 53 +0 N N
0 0 53 +1 53 -0 53 -0 53 +0.5 53 -0 53 +0 N N
0 0 53 +1 53 +0 53 +0.5 53 -0.5 53 -0 53 -0 N N
0 0 53 +1 53 +0 53 +0.5 53 +0 53 -0 53 -0 N N
0 0 53 +1 53 +0 53 +0.5 53 -0 53 -0 53 -0 N N
0 0 53 +1 53 +0 53 -0.5 53 -0 53 -0 53 -0 N N
0 0 53 +1 53 +0 53 +0 53 -0.5 53 -0 53 -0 N N
0 0 53 +1 53 +0 53 -0 53 -0.5 53 -0 53 -0 N N
# determined sign of imaginary part in pure real powers
0 0 53 +9 53 +0 53 +3 53 +0 53 +2 53 +0 N N
0 0 53 +9 53 -0 53 +3 53 -0 53 +2 53 -0 N N
0 0 53 0.25 53 +0 53 +2 53 -0 53 -2 53 +0 N N
0 0 53 0.25 53 -0 53 +2 53 +0 53 -2 53 -0 N N
0 0 53 +1 53 +0 53 +1 53 +0 53 +4 53 +0 N N
0 0 53 +1 53 +0 53 +1 53 +0 53 +4 53 -0 N N
0 0 53 +1 53 -0 53 +1 53 -0 53 +4 53 +0 N N
0 0 53 +1 53 -0 53 +1 53 -0 53 +4 53 -0 N N
0 0 53 +1 53 +0 53 +1 53 -0 53 -4 53 +0 N N
0 0 53 +1 53 +0 53 +1 53 -0 53 -4 53 -0 N N
0 0 53 +1 53 -0 53 +1 53 +0 53 -4 53 +0 N N
0 0 53 +1 53 -0 53 +1 53 +0 53 -4 53 -0 N N
0 0 53 0.25 53 +0 53 +0.5 53 +0 53 +2 53 -0 N N
0 0 53 0.25 53 -0 53 +0.5 53 -0 53 +2 53 +0 N N
0 0 53 +4 53 +0 53 +0.5 53 -0 53 -2 53 -0 N N
0 0 53 +4 53 -0 53 +0.5 53 +0 53 -2 53 +0 N N
# pure real power with nondetermined sign in imaginary part
0 0 53 1 53 0 53 +2 53 -1 53 +0 53 +0 N N
0 0 53 1 53 0 53 -2 53 -1 53 +0 53 +0 N N
0 0 53 1 53 0 53 -2 53 -0 53 +0 53 +0 N N
0 0 53 1 53 0 53 +0.5 53 +0.5 53 +0 53 +0 N N
0 0 53 1 53 0 53 -0.5 53 +0.5 53 +0 53 +0 N N
0 0 53 1 53 0 53 -0.5 53 +0 53 +0 53 +0 N N
0 0 53 1 53 0 53 +0 53 +0.5 53 +0 53 +0 N N
0 0 53 1 53 0 53 -0 53 +0.5 53 +0 53 +0 N N
0 0 53 1 53 0 53 -0 53 -4 53 +0 53 +0 N N
0 0 53 1 53 0 53 +0 53 -4 53 +0 53 +0 N N
0 0 53 1 53 0 53 -1 53 -0 53 +0 53 +0 N N
0 0 53 1 53 0 53 -1 53 +0 53 +0 53 +0 N N
0 0 53 1 53 0 53 +2 53 -1 53 -0 53 -0 N N
0 0 53 1 53 0 53 -2 53 -1 53 -0 53 -0 N N
0 0 53 1 53 0 53 -2 53 -0 53 -0 53 -0 N N
0 0 53 1 53 0 53 +0.5 53 +0.5 53 -0 53 -0 N N
0 0 53 1 53 0 53 -0.5 53 +0.5 53 -0 53 -0 N N
0 0 53 1 53 0 53 -0.5 53 +0 53 -0 53 -0 N N
0 0 53 1 53 0 53 +0 53 +0.5 53 -0 53 -0 N N
0 0 53 1 53 0 53 -0 53 +0.5 53 -0 53 -0 N N
0 0 53 1 53 0 53 -0 53 -4 53 -0 53 -0 N N
0 0 53 1 53 0 53 +0 53 -4 53 -0 53 -0 N N
0 0 53 1 53 0 53 -1 53 -0 53 -0 53 -0 N N
0 0 53 1 53 0 53 -1 53 +0 53 -0 53 -0 N N
0 0 53 1 53 0 53 +2 53 +1 53 -0 53 +0 N N
0 0 53 1 53 0 53 -2 53 +1 53 -0 53 +0 N N
0 0 53 1 53 0 53 -2 53 +0 53 -0 53 +0 N N
0 0 53 1 53 0 53 +0.5 53 -0.5 53 -0 53 +0 N N
0 0 53 1 53 0 53 -0.5 53 -0.5 53 -0 53 +0 N N
0 0 53 1 53 0 53 -0.5 53 -0 53 -0 53 +0 N N
0 0 53 1 53 0 53 +0 53 +5 53 -0 53 +0 N N
0 0 53 1 53 0 53 -0 53 +5 53 -0 53 +0 N N
0 0 53 1 53 0 53 -0 53 -0.5 53 -0 53 +0 N N
0 0 53 1 53 0 53 +0 53 -0.5 53 -0 53 +0 N N
0 0 53 1 53 0 53 -1 53 -0 53 -0 53 +0 N N
0 0 53 1 53 0 53 -1 53 +0 53 -0 53 +0 N N
0 0 53 1 53 0 53 +2 53 +1 53 +0 53 -0 N N
0 0 53 1 53 0 53 -2 53 +1 53 +0 53 -0 N N
0 0 53 1 53 0 53 -2 53 +0 53 +0 53 -0 N N
0 0 53 1 53 0 53 +0.5 53 -0.5 53 +0 53 -0 N N
0 0 53 1 53 0 53 -0.5 53 -0.5 53 +0 53 -0 N N
0 0 53 1 53 0 53 -0.5 53 -0 53 +0 53 -0 N N
0 0 53 1 53 0 53 +0 53 +5 53 +0 53 -0 N N
0 0 53 1 53 0 53 -0 53 +5 53 +0 53 -0 N N
0 0 53 1 53 0 53 -0 53 -0.5 53 +0 53 -0 N N
0 0 53 1 53 0 53 +0 53 -0.5 53 +0 53 -0 N N
0 0 53 1 53 0 53 -1 53 -0 53 +0 53 -0 N N
0 0 53 1 53 0 53 -1 53 +0 53 +0 53 -0 N N
0 0 53 4 53 0 53 +2 53 -0 53 +2 53 +0 N N
0 0 53 1 53 0 53 +1 53 +0 53 +2 53 +0 N N
0 0 53 1 53 0 53 +1 53 +0 53 +2 53 -0 N N
0 0 53 4 53 0 53 +2 53 +0 53 +2 53 -0 N N
0 0 53 1 53 0 53 +1 53 -0 53 +2 53 +0 N N
0 0 53 1 53 0 53 +1 53 -0 53 +2 53 -0 N N
0 0 53 +.25 53 0 53 +2 53 +0 53 -2 53 +0 N N
0 0 53 1 53 0 53 +1 53 +0 53 -2 53 +0 N N
0 0 53 1 53 0 53 +1 53 +0 53 -2 53 -0 N N
0 0 53 +.25 53 0 53 +2 53 -0 53 -2 53 -0 N N
0 0 53 1 53 0 53 +1 53 -0 53 -2 53 +0 N N
0 0 53 1 53 0 53 +1 53 -0 53 -2 53 -0 N N
# when (+/-1 +/-0i)^y is pure real
0 0 53 1 53 0 53 +1 53 -0 53 -2 53 +1 N N
0 0 53 1 53 0 53 +1 53 -0 53 -1 53 +2 N N
0 0 53 1 53 0 53 +1 53 -0 53 -0 53 +1 N N
- 0 53 +0x10BBEEE9177E19p-43 53 0 53 -1 53 -0 53 -0 53 +2 N N
+ 0 53 +0x1E989F5D6DFF5Cp-62 53 0 53 -1 53 +0 53 +0 53 +2 N N
0 0 53 1 53 0 53 +1 53 +0 53 +0 53 +2 N N
0 0 53 1 53 0 53 +1 53 +0 53 +2 53 +2 N N
0 0 53 1 53 0 53 +1 53 +0 53 +0 53 +2 N N
0 0 53 1 53 0 53 +1 53 +0 53 -1 53 -1 N N
0 0 53 1 53 0 53 +1 53 +0 53 -0 53 -1 N N
+ 0 53 +0x1724046EB0933Ap-48 53 0 53 -1 53 +0 53 -0 53 -1 N N
0 0 53 1 53 0 53 +1 53 -0 53 +0 53 -1 N N
+ 0 53 +0x1620227B598EF9p-57 53 0 53 -1 53 -0 53 +0 53 -1 N N
0 0 53 1 53 0 53 +1 53 -0 53 +2 53 -3 N N
+ 0 53 +0x1D4102BC3F7D4Cp-71 53 0 53 -1 53 +0 53 +0 53 +4 N N
+ 0 53 +0x1724046EB0933Ap-48 53 0 53 -1 53 -0 53 -0 53 +1 N N
# when (0 +/-i)^y is pure real
+ 0 53 +0x1724046EB0933Ap-48 53 0 53 -0 53 -1 53 -0 53 +2 N N
- 0 53 +0x1BD4567B975381p-46 53 0 53 +0 53 -1 53 -0 53 +3 N N
+ 0 53 +0x1620227B598EF9p-57 53 0 53 +0 53 +1 53 +0 53 +2 N N
- 0 53 +0x1265D4E92B6B9Bp-59 53 0 53 -0 53 +1 53 +0 53 +3 N N
+ 0 53 +0x1724046EB0933Ap-48 53 0 53 +0 53 +1 53 -0 53 -2 N N
- 0 53 +0x1BD4567B975381p-46 53 0 53 -0 53 +1 53 -0 53 -3 N N
- 0 53 +0x1A9BCC46F767DFp-55 53 0 53 +0 53 -1 53 +0 53 -1 N N
+ 0 53 +0x1620227B598EF9p-57 53 0 53 -0 53 -1 53 +0 53 -2 N N
# exact cases
# (-1)^(1/2) = i
0 0 2 0 2 1 2 -1 2 0 2 0x1p-1 2 0 N N
# (-4)^(1/4) = 1+i
0 0 2 1 2 1 2 -4 2 0 2 0x1p-2 2 0 N N
# for an odd positive integer n, a positive integer m and an integer e:
# (-4 m^4 16^e)^(n/4) = (1+i)^n m^n 2^(e n)
# m=3 e=5 n=7
0 0 12 0x88Bp38 12 -0x88Bp38 7 -0x51p22 7 0 3 0x7p-2 3 0 N N
# (-4 16^e)^(-n/4) = (1-i)^n 2^(- (e+1) n)
# e=3 n=5
0 0 2 -0x1p-18 2 0x1p-18 2 -0x1p14 2 0 3 -0x5p-2 3 0 N N
# e=2 n=5
0 0 2 -0x1p-13 2 0x1p-13 2 -0x1p10 2 0 3 -0x5p-2 3 0 N N
# (+2 +0)^(-3 -0) -> (-1/8 -0)
# x = 2 + epsilon*i, y = -3 - delta*i
# log(x) = log(2) + epsilon/2*i + O(epsilon^2)
# y*log(x) = [-3*log(2) + o(1)] + [-3*epsilon/2-delta*log(2)]*i
0 0 2 0x1p-3 2 -0 2 2 2 +0 2 -3 2 -0 N N
# (-2 -0)^(3 +0) -> (-8 -0)
# x = -2 - epsilon*i, y = 3 + delta*i
# log(x) = log(2) - [Pi-epsilon/2]*i + O(epsilon^2)
# y*log(x) ~ 3*log(2) + [-3*Pi+3*epsilon/2+delta*log(2)]*i
0 0 2 -8 2 -0 2 -2 2 -0 2 3 2 +0 N N
# (-2 -0)^(-3 -0) -> (-1/8 +0)
# x = -2 - epsilon*i, y = -3 - delta*i
# log(x) = log(2) - [Pi-epsilon/2]*i + O(epsilon^2)
# y*log(x) ~ -3*log(2) + [3*Pi-3*epsilon/2-delta*log(2)]*i
0 0 2 -0x1p-3 2 +0 2 -2 2 -0 2 -3 2 -0 N N
0 0 2 +0 2 -2 2 +0 2 0x1p-1 2 -1 2 -0 N N
0 0 2 +0 2 -2 2 +0 2 0x1p-1 65 -1 2 -0 N N
+ + 2 -0x3p-64 2 -2 2 +0 2 0x1p-1 65 -0x10000000000000001p-64 2 -0 N N
0 - 2 +0 3 -5 2 +0 53 0xCCCCCCCCCCCCDp-54 2 -1 2 -0 N N
# undefined zero sign in result
- 0 5 -25 2 0 2 +0 53 0xCCCCCCCCCCCCDp-54 2 -2 2 -0 N N
- - 53 -0x85649E3220691p-63 53 -0x14A25D455A9D0Dp-60 3 5 2 3 2 -3 2 +0 N N
+ 0 53 0xABCC77118461Dp-74 2 +0 3 5 3 5 2 -8 2 +0 N N
+ 0 53 -0x127DB86014739Dp-93 2 -0 2 -1 2 -0 2 1 4 -9 N N
+ + 24 0xC1F98Dp-21 24 0x12FF89p-2 24 -7 24 +0 24 0xCFFFF3p-21 24 +0 N N
# underflow case
- - 24 +0 24 +0 24 2 24 0x44CCCDp-20 24 -0x7FFFF200 24 -0x7FFFF200 N N
- 0 53 0x14D55AFA6E0BB0p210433620 53 0 53 +0 53 0x44CCCCFFFFFFFp-48 53 0x5F5E100 53 +0 N N
- 0 53 0x14D55B174EE67Ep210433620 53 0 53 +0 53 0x44CCCDp-20 53 0x5F5E100 53 +0 N N
0 0 24 -10 24 198 24 5 24 3 24 3 24 +0 N N
+ - 113 0x1731C86FF8E8C7D80C8F1C83460B7p-38951 113 0x1CE5ECB8E88C769AF45FA662568CFp-38950 113 2 113 0x11333333333333333333333333333p-110 113 -10000 113 10000 N N
- - 652 0x8E0380781E0124C92903E153123260CEF2C8821EDEC1D518A270FD55720DB5114D3D72CEE0E51CCEAA532FC6DA983707E66AE0E1A5E116D72AF5F2420D8402BE3E7FF03658E7ADFE2667C67291D74877383p-651 652 -0xB5FECD07C42E7AEE5A3489729B566DB4C6284C575E281585B0BFA711859D178BD8B07352B58BF615DD2DEC68798F0D2A644D5D18149D12BC53F851C5908F1EDE1C71F2B8D4934B1CE932AB94C0B8AE54C73p-665 163 0x5E9BDCC756D1E864413EA56F2A35C6D7D58DD117Bp-158 163 -0xE6BCC7A0E6EC5F2B1CBCF2707D829C2CB1A56FCFp-164 163 0x21A13BA8E157F23649FC27B031EAA12B826FB7E9Dp-166 163 0 N N
0 0 2 0 2 1 2 -1 2 0 2 0x1p-1 2 0 N N
+ + 2 -0x3p-65 2 1 2 -1 2 0 65 0x10000000000000001p-65 2 0 N N
0 0 2 1 2 +0 65 0x10000000000000001p-64 2 +0 2 +0 2 +0 N N
0 0 2 1 2 -0 65 0xFFFFFFFFFFFFFFFFp-64 2 +0 2 +0 2 +0 N N
0 + 2 +0 2 0.75 2 -0.5 2 0 2 0.5 2 0 N N
0 0 2 0 2 2 2 1 2 1 2 2 2 +0 N N
# I^2 = -1
0 0 2 -1 2 +0 2 +0 2 1 2 2 2 +0 N N
+ 0 2 -1 2 +0 2 +0 65 0x10000000000000001p-64 2 2 2 +0 N N
# overflow cases
- - 2 -inf 2 -inf 2 3 2 1 28 744261116 2 +0 N N
- + 2 -inf 2 +inf 2 3 2 -1 28 744261116 2 +0 N N
+ + 2 +inf 2 +inf 2 4 2 3 28 744261116 2 +0 N N
+ - 2 +inf 2 -inf 2 4 2 -3 28 744261116 2 +0 N N
# underflow cases
+ - 2 -0 2 +0 2 3 2 1 28 -744261116 2 +0 N N
+ + 2 -0 2 -0 2 3 2 -1 28 -744261116 2 +0 N N
- + 2 +0 2 -0 2 4 2 3 28 -744261116 2 +0 N N
- - 2 +0 2 +0 2 4 2 -3 28 -744261116 2 +0 N N
# exact powers with non-integer exponent
0 0 2 1 2 1 2 0 2 2 2 0.5 2 0 N N
0 0 2 -2 2 2 2 0 2 2 2 1.5 2 0 N N
0 0 2 1 2 64 12 -4095 2 128 2 0.5 2 0 N N
0 0 3 5 2 3 2 16 4 30 2 0.5 2 0 N N
0 0 7 97 7 99 6 -392 14 19206 2 0.5 2 0 N N
0 0 6 63 6 61 5 248 18 7686 2 0.5 2 0 N N
0 0 6 63 6 61 24 -59013092 17 3812256 2 0.25 2 0 N N
0 + 2 0 2 0x3p-6 2 -1 2 0 2 0.5 2 1 N N
+ + 2 6 2 1 41 -0x2ce019e6f1e 36 0x1878418ba20 2 0.0625 2 0 N N
+ + 4 11 2 1 111 -0x73558286726957f922819cbeffff 109 0x1c484a8b32dbf409e966a8c00000 2 0x1p-5 2 0 N N
+ + 5 21 2 1 282 -0x24ea91ddba938e750d999f1075444e15d6ca0fff6a19c8cbefe6260261fd57effffffff 278 0x390aa828a3d933391ab999b0b0aa71aafbfc7b127fe30c84d107634940ba8000000000 2 0x1p-6 2 0 N N
+ - 53 0x7f661e2bd0db5p-51 53 0xc63ee1a1c4d19p-55 2 0x1p1000 2 0 2 0 2 0x1p1000 N N
# bug reported by Joseph Myers (07 Apr 2015)
+ - 2 -0x3p1073741819 2 0x3p1073741819 2 1 2 2 2 0x1p1000 2 0 Z Z
mpc-1.1.0/tests/texp.c 0000644 0001751 0001751 00000002325 12721027700 011501 0000000 0000000 /* texp -- test file for mpc_exp.
Copyright (C) 2002, 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_exp (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_exp (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("exp.dsc", "exp.dat");
tgeneric_template ("exp.dsc", 2, 512, 7, 256);
test_end ();
return 0;
}
mpc-1.1.0/tests/tstrtoc.c 0000644 0001751 0001751 00000010522 12471661720 012231 0000000 0000000 /* tstrtoc -- test file for mpc_strtoc.
Copyright (C) 2009, 2011 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include
#include
#include "mpc-tests.h"
extern unsigned long line_number;
extern int nextchar;
extern char *pathname;
/* names of rounding modes */
extern const char *mpc_rnd_mode[];
static void
check_file (const char* file_name)
{
FILE *fp;
unsigned long test_line_number;
size_t str_len = 255;
char *str = NULL;
size_t rstr_len = 255;
char *rstr = NULL;
char *end = NULL;
int base;
int inex_re;
int inex_im;
mpc_t expected, got;
mpc_rnd_t rnd = MPC_RNDNN;
int inex = 0, inex_expected;
known_signs_t ks = {1, 1};
fp = open_data_file (file_name);
/* initializations */
str = (char *) malloc (str_len);
if (str == NULL)
{
printf ("Cannot allocate memory\n");
exit (1);
}
rstr = (char *) malloc (rstr_len);
if (rstr == NULL)
{
printf ("Cannot allocate memory\n");
exit (1);
}
mpc_init2 (expected, 53);
mpc_init2 (got, 53);
/* read data file */
line_number = 1;
nextchar = getc (fp);
while (nextchar != EOF)
{
skip_whitespace_comments (fp);
/* 1. read a line of data: expected result, base, rounding mode */
test_line_number = line_number;
read_ternary (fp, &inex_re);
read_ternary (fp, &inex_im);
read_mpc (fp, expected, NULL);
if (inex_re == TERNARY_ERROR || inex_im == TERNARY_ERROR)
inex_expected = -1;
else
inex_expected = MPC_INEX (inex_re, inex_im);
str_len = read_string (fp, &str, str_len, "number string");
rstr_len = read_string (fp, &rstr, rstr_len, "string remainder");
read_int (fp, &base, "base");
read_mpc_rounding_mode (fp, &rnd);
/* 2. convert string at the same precision as the expected result */
mpfr_set_prec (mpc_realref (got), MPC_PREC_RE (expected));
mpfr_set_prec (mpc_imagref (got), MPC_PREC_IM (expected));
inex = mpc_strtoc (got, str, &end, base, rnd);
/* 3. compare this result with the expected one */
if (inex != inex_expected
|| !same_mpc_value (got, expected, ks)
|| strcmp (end, rstr) != 0)
{
printf ("mpc_strtoc(str) failed (line %lu)\nwith base=%d and "
"rounding mode %s\n", test_line_number, base,
mpc_rnd_mode[rnd]);
if (inex != MPC_INEX (inex_re, inex_im))
printf ("ternary value: got %s, expected (%s, %s)\n",
MPC_INEX_STR (inex),
(inex_re == +1 ? "+1" : (inex_re == -1 ? "-1" : "0")),
(inex_im == +1 ? "+1" : (inex_im == -1 ? "-1" : "0")));
printf ("str = \"%s\"\n", str);
if (strcmp (end, rstr) != 0)
printf ("string remainder expected \"%s\"\n"
" got \"%s\"\n",
rstr, end);
else
{
printf (" ");
MPC_OUT (got);
MPC_OUT (expected);
}
exit (1);
}
end = NULL;
}
mpc_clear (expected);
mpc_clear (got);
if (str != NULL)
free (str);
if (rstr != NULL)
free (rstr);
close_data_file (fp);
}
static void
check_null (void)
{
int inex;
char *end;
mpc_t z;
mpc_init2 (z, 53);
inex = mpc_strtoc (z, NULL, &end, 10, MPC_RNDNN);
if (end != NULL || inex != -1 || mpfr_nan_p (mpc_realref (z)) == 0
|| mpfr_nan_p (mpc_imagref (z)) == 0)
{
printf ("Error: mpc_strtoc(z, NULL) with a NULL pointer should fail"
" and the z value should be set to NaN +I*NaN\ngot ");
MPC_OUT (z);
exit (1);
}
mpc_clear (z);
}
int
main (void)
{
check_null ();
check_file ("strtoc.dat");
return 0;
}
mpc-1.1.0/tests/ui_div.dsc 0000644 0001751 0001751 00000001543 12471661720 012340 0000000 0000000 # Description file for mpc_ui_div
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_ui_div
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
unsigned long int
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/tdiv_2si.c 0000644 0001751 0001751 00000002256 12471661720 012257 0000000 0000000 /* tdiv_2si -- test file for mpc_div_2si.
Copyright (C) 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_div_2si (P[1].mpc, P[2].mpc, P[3].si, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_div_2si (P[1].mpc, P[1].mpc, P[3].si, P[4].mpc_rnd)
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
tgeneric_template ("div_2si.dsc", 2, 1024, 7, 1024);
test_end ();
return 0;
}
mpc-1.1.0/tests/conj.dsc 0000644 0001751 0001751 00000001600 12471661720 012004 0000000 0000000 # Description file for mpc_conj
#
# Copyright (C) 2008, 2010, 2011, 2012, 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_conj
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/proj.dsc 0000644 0001751 0001751 00000001505 12471661720 012031 0000000 0000000 # Description file for mpc_proj
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_proj
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/neg.dsc 0000644 0001751 0001751 00000001503 12471661720 011626 0000000 0000000 # Description file for mpc_neg
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_neg
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/tacos.c 0000644 0001751 0001751 00000002304 12471661720 011637 0000000 0000000 /* tacos -- test file for mpc_acos.
Copyright (C) 2009, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_acos (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_acos (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("acos.dsc", "acos.dat");
tgeneric_template ("acos.dsc", 2, 512, 7, 7);
test_end ();
return 0;
}
mpc-1.1.0/tests/cosh.dsc 0000644 0001751 0001751 00000001505 12471661720 012013 0000000 0000000 # Description file for mpc_cosh
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_cosh
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/tmul.c 0000644 0001751 0001751 00000013741 12471661720 011516 0000000 0000000 /* tmul -- test file for mpc_mul.
Copyright (C) 2002, 2005, 2008, 2009, 2010, 2011, 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include
#ifdef TIMING
#include
#endif
#include "mpc-tests.h"
static void
cmpmul (mpc_srcptr x, mpc_srcptr y, mpc_rnd_t rnd)
/* computes the product of x and y with the naive and Karatsuba methods */
/* using the rounding mode rnd and compares the results and return */
/* values. */
/* In our current test suite, the real and imaginary parts of x and y */
/* all have the same precision, and we use this precision also for the */
/* result. */
{
mpc_t z, t;
int inex_z, inex_t;
mpc_init2 (z, MPC_MAX_PREC (x));
mpc_init2 (t, MPC_MAX_PREC (x));
inex_z = mpc_mul_naive (z, x, y, rnd);
inex_t = mpc_mul_karatsuba (t, x, y, rnd);
if (mpc_cmp (z, t) != 0 || inex_z != inex_t) {
fprintf (stderr, "mul_naive and mul_karatsuba differ for rnd=(%s,%s)\n",
mpfr_print_rnd_mode(MPC_RND_RE(rnd)),
mpfr_print_rnd_mode(MPC_RND_IM(rnd)));
MPC_OUT (x);
MPC_OUT (y);
MPC_OUT (z);
MPC_OUT (t);
if (inex_z != inex_t) {
fprintf (stderr, "inex_re (z): %s\n", MPC_INEX_STR (inex_z));
fprintf (stderr, "inex_re (t): %s\n", MPC_INEX_STR (inex_t));
}
exit (1);
}
mpc_clear (z);
mpc_clear (t);
}
static void
testmul (long a, long b, long c, long d, mpfr_prec_t prec, mpc_rnd_t rnd)
{
mpc_t x, y;
mpc_init2 (x, prec);
mpc_init2 (y, prec);
mpc_set_si_si (x, a, b, rnd);
mpc_set_si_si (y, c, d, rnd);
cmpmul (x, y, rnd);
mpc_clear (x);
mpc_clear (y);
}
static void
check_regular (void)
{
mpc_t x, y;
int rnd_re, rnd_im;
mpfr_prec_t prec;
testmul (247, -65, -223, 416, 8, 24);
testmul (5, -896, 5, -32, 3, 2);
testmul (-3, -512, -1, -1, 2, 16);
testmul (266013312, 121990769, 110585572, 116491059, 27, 0);
testmul (170, 9, 450, 251, 8, 0);
testmul (768, 85, 169, 440, 8, 16);
testmul (145, 1816, 848, 169, 8, 24);
mpc_init2 (x, 1000);
mpc_init2 (y, 1000);
/* Bug 20081114: mpc_mul_karatsuba returned wrong inexact value for
imaginary part */
mpc_set_prec (x, 7);
mpc_set_prec (y, 7);
mpfr_set_str (mpc_realref (x), "0xB4p+733", 16, MPFR_RNDN);
mpfr_set_str (mpc_imagref (x), "0x90p+244", 16, MPFR_RNDN);
mpfr_set_str (mpc_realref (y), "0xECp-146", 16, MPFR_RNDN);
mpfr_set_str (mpc_imagref (y), "0xACp-471", 16, MPFR_RNDN);
cmpmul (x, y, MPC_RNDNN);
mpfr_set_str (mpc_realref (x), "0xB4p+733", 16, MPFR_RNDN);
mpfr_set_str (mpc_imagref (x), "0x90p+244", 16, MPFR_RNDN);
mpfr_set_str (mpc_realref (y), "0xACp-471", 16, MPFR_RNDN);
mpfr_set_str (mpc_imagref (y), "-0xECp-146", 16, MPFR_RNDN);
cmpmul (x, y, MPC_RNDNN);
for (prec = 2; prec < 1000; prec = (mpfr_prec_t) (prec * 1.1 + 1))
{
mpc_set_prec (x, prec);
mpc_set_prec (y, prec);
test_default_random (x, -1024, 1024, 128, 0);
test_default_random (y, -1024, 1024, 128, 0);
for (rnd_re = 0; rnd_re < 4; rnd_re ++)
for (rnd_im = 0; rnd_im < 4; rnd_im ++)
cmpmul (x, y, MPC_RND (rnd_re, rnd_im));
}
mpc_clear (x);
mpc_clear (y);
}
#ifdef TIMING
static void
timemul (void)
{
/* measures the time needed with different precisions for naive and */
/* Karatsuba multiplication */
mpc_t x, y, z;
unsigned long int i, j;
const unsigned long int tests = 10000;
struct tms time_old, time_new;
double passed1, passed2;
mpc_init (x);
mpc_init (y);
mpc_init_set_ui_ui (z, 1, 0, MPC_RNDNN);
for (i = 1; i < 50; i++)
{
mpc_set_prec (x, i * BITS_PER_MP_LIMB);
mpc_set_prec (y, i * BITS_PER_MP_LIMB);
mpc_set_prec (z, i * BITS_PER_MP_LIMB);
test_default_random (x, -1, 1, 128, 25);
test_default_random (y, -1, 1, 128, 25);
times (&time_old);
for (j = 0; j < tests; j++)
mpc_mul_naive (z, x, y, MPC_RNDNN);
times (&time_new);
passed1 = ((double) (time_new.tms_utime - time_old.tms_utime)) / 100;
times (&time_old);
for (j = 0; j < tests; j++)
mpc_mul_karatsuba (z, x, y, MPC_RNDNN);
times (&time_new);
passed2 = ((double) (time_new.tms_utime - time_old.tms_utime)) / 100;
printf ("Time for %3li limbs naive/Karatsuba: %5.2f %5.2f\n", i,
passed1, passed2);
}
mpc_clear (x);
mpc_clear (y);
mpc_clear (z);
}
#endif
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_mul (P[1].mpc, P[2].mpc, P[3].mpc, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_SYMMETRIC \
P[0].mpc_inex = mpc_mul (P[1].mpc, P[3].mpc, P[2].mpc, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_mul (P[1].mpc, P[1].mpc, P[3].mpc, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP2 \
P[0].mpc_inex = mpc_mul (P[1].mpc, P[2].mpc, P[1].mpc, P[4].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
#ifdef TIMING
timemul ();
#endif
check_regular ();
data_check_template ("mul.dsc", "mul.dat");
tgeneric_template ("mul.dsc", 2, 4096, 41, 1024);
test_end ();
return 0;
}
mpc-1.1.0/tests/add_si.dsc 0000644 0001751 0001751 00000001615 12471661720 012304 0000000 0000000 # Description file for mpc_add_si
#
# Copyright (C) 2008, 2010, 2011, 2012, INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_add_si
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
long int
mpc_rnd_t
mpc-1.1.0/tests/read_line.c 0000644 0001751 0001751 00000015146 12471661720 012460 0000000 0000000 /* read_line.c -- Read line of test data in file.
Copyright (C) 2012, 2013, 2014 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
static void
read_param (mpc_datafile_context_t* datafile_context,
mpc_operand_t* p, mpc_param_t t)
{
switch (t)
{
case NATIVE_INT:
tpl_read_int (datafile_context, &(p->i),"");
return;
case NATIVE_UL:
tpl_read_ui (datafile_context, &(p->ui));
return;
case NATIVE_L:
tpl_read_si (datafile_context, &(p->si));
return;
case NATIVE_D:
case NATIVE_LD:
/* TODO */
fprintf (stderr, "read_param: type not implemented.\n");
exit (1);
break;
case NATIVE_DC:
case NATIVE_LDC:
#ifdef _Complex_I
/* TODO */
fprintf (stderr, "read_param: type not implemented.\n");
exit (1);
#endif
break;
case NATIVE_IM:
case NATIVE_UIM:
#ifdef _MPC_H_HAVE_INTMAX_T
/* TODO */
fprintf (stderr, "read_param: type not implemented.\n");
exit (1);
#endif
break;
case NATIVE_STRING:
/* TODO */
fprintf (stderr, "read_param: type not implemented.\n");
exit (1);
break;
case GMP_Z:
tpl_read_mpz (datafile_context, p->mpz);
return;
case GMP_Q:
case GMP_F:
/* TODO */
fprintf (stderr, "read_param: type not implemented.\n");
exit (1);
break;
case MPFR_INEX:
tpl_read_mpfr_inex (datafile_context, &p->mpfr_inex);
return;
case MPFR:
tpl_read_mpfr (datafile_context,
p->mpfr_data.mpfr, &p->mpfr_data.known_sign);
return;
case MPFR_RND:
tpl_read_mpfr_rnd (datafile_context, &p->mpfr_rnd);
return;
case MPC_INEX:
tpl_read_mpc_inex (datafile_context, &p->mpc_inex_data);
return;
case MPC:
tpl_read_mpc (datafile_context, &p->mpc_data);
return;
case MPC_RND:
tpl_read_mpc_rnd (datafile_context, &p->mpc_rnd);
return;
case MPCC_INEX:
/* TODO */
fprintf (stderr, "read_param: type not implemented.\n");
exit (1);
break;
}
fprintf (stderr, "read_param: unsupported type.\n");
exit (1);
}
static void
set_precision (mpc_fun_param_t* params, int index)
{
/* set output precision to reference precision */
int index_ref = index + params->nbout + params->nbin;
switch (params->T[index])
{
case MPFR:
mpfr_set_prec (params->P[index].mpfr,
mpfr_get_prec (params->P[index_ref].mpfr));
return;
case MPC:
mpfr_set_prec (mpc_realref (params->P[index].mpc),
MPC_PREC_RE (params->P[index_ref].mpc));
mpfr_set_prec (mpc_imagref (params->P[index].mpc),
MPC_PREC_IM (params->P[index_ref].mpc));
return;
case NATIVE_INT:
case NATIVE_UL: case NATIVE_L:
case NATIVE_D: case NATIVE_LD:
case NATIVE_DC: case NATIVE_LDC:
case NATIVE_IM: case NATIVE_UIM:
case NATIVE_STRING:
case GMP_Z: case GMP_Q:
case GMP_F:
case MPFR_INEX: case MPFR_RND:
case MPC_INEX: case MPC_RND:
case MPCC_INEX:
/* unsupported types */
break;
}
fprintf (stderr, "set_precision: unsupported type.\n");
exit (1);
}
void
read_line (mpc_datafile_context_t* datafile_context,
mpc_fun_param_t* params)
{
int in, out;
int total = params->nbout + params->nbin;
datafile_context->test_line_number = datafile_context->line_number;
for (out = 0; out < params->nbout; out++)
{
read_param (datafile_context, &(params->P[total + out]),
params->T[total + out]);
if (params->T[out] == MPFR || params->T[out] == MPC)
set_precision (params, out);
}
for (in = params->nbout; in < total; in++)
{
read_param (datafile_context, &(params->P[in]), params->T[in]);
}
}
/* read primitives */
static void
tpl_skip_line (mpc_datafile_context_t* datafile_context)
/* skips characters until reaching '\n' or EOF; */
/* '\n' is skipped as well */
{
while (datafile_context->nextchar != EOF && datafile_context->nextchar != '\n')
datafile_context->nextchar = getc (datafile_context->fd);
if (datafile_context->nextchar != EOF)
{
datafile_context->line_number ++;
datafile_context->nextchar = getc (datafile_context->fd);
}
}
static void
tpl_skip_whitespace (mpc_datafile_context_t* datafile_context)
/* skips over whitespace if any until reaching EOF */
/* or non-whitespace */
{
while (isspace (datafile_context->nextchar))
{
if (datafile_context->nextchar == '\n')
datafile_context->line_number ++;
datafile_context->nextchar = getc (datafile_context->fd);
}
}
void
tpl_skip_whitespace_comments (mpc_datafile_context_t* datafile_context)
/* skips over all whitespace and comments, if any */
{
tpl_skip_whitespace (datafile_context);
while (datafile_context->nextchar == '#') {
tpl_skip_line (datafile_context);
if (datafile_context->nextchar != EOF)
tpl_skip_whitespace (datafile_context);
}
}
/* All following read routines skip over whitespace and comments; */
/* so after calling them, nextchar is either EOF or the beginning */
/* of a non-comment token. */
void
tpl_read_ternary (mpc_datafile_context_t* datafile_context, int* ternary)
{
switch (datafile_context->nextchar)
{
case '!':
*ternary = TERNARY_ERROR;
break;
case '?':
*ternary = TERNARY_NOT_CHECKED;
break;
case '+':
*ternary = +1;
break;
case '0':
*ternary = 0;
break;
case '-':
*ternary = -1;
break;
default:
printf ("Error: Unexpected ternary value '%c' in file '%s' line %lu\n",
datafile_context->nextchar,
datafile_context->pathname,
datafile_context->line_number);
exit (1);
}
datafile_context->nextchar = getc (datafile_context->fd);
tpl_skip_whitespace_comments (datafile_context);
}
mpc-1.1.0/tests/pow_si.dat 0000644 0001751 0001751 00000002120 12426164730 012347 0000000 0000000 # Data file for mpc_pow_si.
#
# Copyright (C) 2011 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP1_RE OP1_RE PREC_OP1_IM OP1_IM OP2 RND_RE RND_IM
#
# For further details, see add_fr.dat.
# special cases with exponents -1 and -2
0 0 53 0.5 53 -0.5 53 1 53 1 -1 N N
0 0 53 0 53 -0.5 53 1 53 1 -2 N N
mpc-1.1.0/tests/atan.dat 0000644 0001751 0001751 00000022053 13067441550 012001 0000000 0000000 # Data file for mpc_atan.
#
# Copyright (C) 2009, 2012, 2013, 2017 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP_RE OP_RE PREC_OP_IM OP_IM RND_RE RND_IM
#
# where op = op_re + i * op_im, rop = rop_re + i * rop_im,
# rop_re is ROP_RE rounded to nearest to the precision of PREC_ROP_RE
# rop_im is ROP_IM rounded to nearest to the precision of PREC_ROP_IM
# op_re is OP_RE rounded to nearest to the precision of PREC_OP_RE
# op_im is OP_IM rounded to nearest to the precision of PREC_OP_IM
# ROP_RE is checked against Re(atan op) rounded to the precision PREC_ROP_RE
# in the direction RND_RE
# ROP_IM is checked against Im(atan op) rounded to the precision PREC_ROP_IM
# in the direction RND_IM
# INEX_RE is the ternary value for the real part with the following notation:
# "?" ternary value not checked
# "+" if ROP_RE is greater than the exact mathematical result
# "0" if ROP_RE is exactly the mathematical result
# "-" if ROP_RE is less than the exact mathematical result
# (m.m. INEX_IM)
# rounding modes notation:
# "N" is rounding to nearest
# "Z" is rounding towards zero
# "U" is rounding towards plus infinity
# "D" is rounding towards minus infinity
# Use prefixes "0b" for values in base two, "0x" for values in base sixteen,
# no prefix for value in base ten.
# In all bases, "nan" is NaN, "inf" is infinity;
# The sign of the result is checked with "+inf", "-inf", "-0", or "+0".
# special values (following ISO C99 standard)
+ 0 53 -0x1921FB54442D18p-52 53 -0 53 -inf 53 -inf N N
+ 0 53 -0x1921FB54442D18p-52 53 -0 53 -inf 53 -1 N N
+ 0 53 -0x1921FB54442D18p-52 53 -0 53 -inf 53 -0 N N
+ 0 53 -0x1921FB54442D18p-52 53 +0 53 -inf 53 +0 N N
+ 0 53 -0x1921FB54442D18p-52 53 +0 53 -inf 53 +1 N N
+ 0 53 -0x1921FB54442D18p-52 53 +0 53 -inf 53 +inf N N
+ 0 53 -0x1921FB54442D18p-52 53 0 53 -inf 53 nan N N
+ 0 53 -0x1921FB54442D18p-52 53 -0 53 -6 53 -inf N N
+ 0 53 -0x1921FB54442D18p-52 53 +0 53 -6 53 +inf N N
0 0 53 nan 53 nan 53 -6 53 nan N N
+ 0 53 -0x1921FB54442D18p-52 53 -0 53 -0 53 -inf N N
0 0 53 -0 53 -0 53 -0 53 -0 N N
0 0 53 -0 53 +0 53 -0 53 +0 N N
+ 0 53 -0x1921FB54442D18p-52 53 +0 53 -0 53 +inf N N
0 0 53 nan 53 nan 53 -0 53 nan N N
- 0 53 +0x1921FB54442D18p-52 53 -0 53 +0 53 -inf N N
0 0 53 +0 53 -0 53 +0 53 -0 N N
0 0 53 +0 53 +0 53 +0 53 +0 N N
- 0 53 +0x1921FB54442D18p-52 53 +0 53 +0 53 +inf N N
0 0 53 nan 53 nan 53 +0 53 nan N N
- 0 53 +0x1921FB54442D18p-52 53 -0 53 +6 53 -inf N N
- 0 53 +0x1921FB54442D18p-52 53 +0 53 +6 53 +inf N N
0 0 53 nan 53 nan 53 +6 53 nan N N
- 0 53 +0x1921FB54442D18p-52 53 -0 53 +inf 53 -inf N N
- 0 53 +0x1921FB54442D18p-52 53 -0 53 +inf 53 -1 N N
- 0 53 +0x1921FB54442D18p-52 53 -0 53 +inf 53 -0 N N
- 0 53 +0x1921FB54442D18p-52 53 +0 53 +inf 53 +0 N N
- 0 53 +0x1921FB54442D18p-52 53 +0 53 +inf 53 +1 N N
- 0 53 +0x1921FB54442D18p-52 53 +0 53 +inf 53 +inf N N
- 0 53 +0x1921FB54442D18p-52 53 0 53 +inf 53 nan N N
0 0 53 nan 53 -0 53 nan 53 -inf N N
0 0 53 nan 53 nan 53 nan 53 -1 N N
0 0 53 nan 53 -0 53 nan 53 -0 N N
0 0 53 nan 53 +0 53 nan 53 +0 N N
0 0 53 nan 53 nan 53 nan 53 +1 N N
0 0 53 nan 53 +0 53 nan 53 +inf N N
0 0 53 nan 53 nan 53 nan 53 nan N N
# pure real argument
- 0 53 -0x16DCC57BB565FDp-52 53 -0 53 -7 53 -0 N N
- 0 53 -0x16DCC57BB565FDp-52 53 +0 53 -7 53 +0 N N
+ 0 53 -0x1F730BD281F69Bp-53 53 -0 53 -1.5 53 -0 N N
+ 0 53 -0x1F730BD281F69Bp-53 53 +0 53 -1.5 53 +0 N N
+ 0 53 -0x1921FB54442D18p-53 53 -0 53 -1 53 -0 N N
+ 0 53 -0x1921FB54442D18p-53 53 +0 53 -1 53 +0 N N
- 0 53 -0x1700A7C5784634p-53 53 -0 53 -0.875 53 -0 N N
- 0 53 -0x1700A7C5784634p-53 53 +0 53 -0.875 53 +0 N N
- 0 53 -0x1FD5BA9AAC2F6Ep-56 53 -0 53 -0.125 53 -0 N N
- 0 53 -0x1FD5BA9AAC2F6Ep-56 53 +0 53 -0.125 53 +0 N N
+ 0 53 +0x1FD5BA9AAC2F6Ep-56 53 +0 53 +0.125 53 +0 N N
+ 0 53 +0x1FD5BA9AAC2F6Ep-56 53 -0 53 +0.125 53 -0 N N
+ 0 53 +0x1700A7C5784634p-53 53 +0 53 +0.875 53 +0 N N
+ 0 53 +0x1700A7C5784634p-53 53 -0 53 +0.875 53 -0 N N
- 0 53 +0x1921FB54442D18p-53 53 +0 53 +1 53 +0 N N
- 0 53 +0x1921FB54442D18p-53 53 -0 53 +1 53 -0 N N
- 0 53 +0x1F730BD281F69Bp-53 53 +0 53 +1.5 53 +0 N N
- 0 53 +0x1F730BD281F69Bp-53 53 -0 53 +1.5 53 -0 N N
+ 0 53 +0x16DCC57BB565FDp-52 53 +0 53 +7 53 +0 N N
+ 0 53 +0x16DCC57BB565FDp-52 53 -0 53 +7 53 -0 N N
# pure imaginary argument
+ + 53 -0x1921FB54442D18p-52 53 -0x1269621134DB92p-55 53 -0 53 -7 N N
- + 53 +0x1921FB54442D18p-52 53 -0x1269621134DB92p-55 53 +0 53 -7 N N
+ + 53 -0x1921FB54442D18p-52 53 -0x19C041F7ED8D33p-53 53 -0 53 -1.5 N N
- + 53 +0x1921FB54442D18p-52 53 -0x19C041F7ED8D33p-53 53 +0 53 -1.5 N N
0 0 53 -0 53 -inf 53 -0 53 -1 N N
0 0 53 +0 53 -inf 53 +0 53 -1 N N
0 + 53 -0 53 -0x15AA16394D481Fp-52 53 -0 53 -0.875 N N
0 + 53 +0 53 -0x15AA16394D481Fp-52 53 +0 53 -0.875 N N
0 + 53 -0 53 -0x1015891C9EAEF7p-55 53 -0 53 -0.125 N N
0 + 53 +0 53 -0x1015891C9EAEF7p-55 53 +0 53 -0.125 N N
0 - 53 +0 53 +0x1015891C9EAEF7p-55 53 +0 53 +0.125 N N
0 - 53 -0 53 +0x1015891C9EAEF7p-55 53 -0 53 +0.125 N N
0 - 53 +0 53 +0x15AA16394D481Fp-52 53 +0 53 +0.875 N N
0 - 53 -0 53 +0x15AA16394D481Fp-52 53 -0 53 +0.875 N N
0 0 53 +0 53 +inf 53 +0 53 +1 N N
0 0 53 -0 53 +inf 53 -0 53 +1 N N
- - 53 +0x1921FB54442D18p-52 53 +0x19C041F7ED8D33p-53 53 +0 53 +1.5 N N
+ - 53 -0x1921FB54442D18p-52 53 +0x19C041F7ED8D33p-53 53 -0 53 +1.5 N N
- - 53 +0x1921FB54442D18p-52 53 +0x1269621134DB92p-55 53 +0 53 +7 N N
+ - 53 -0x1921FB54442D18p-52 53 +0x1269621134DB92p-55 53 -0 53 +7 N N
0 + 53 +0 53 0x1FFFFFFFFFFF82p-52 53 +0 53 0x1ED9505E1BC3C2p-53 N N
+ - 512 0x6487ED5110B4611A62633145C06E0E68948127044533E63A0105DF531D89CD9128A5043CC71A026EF7CA8CD9E69D218D98158536F92F8A1BA7F09AB6B6A8E123p-510 512 0x5D137113B914461DA3202D77346EE4980DA5FD0BAD68F5A7928DCA9F632750D9BFFA00654C523929F15DED554EC6BC476DB2C46FA433E569227085E0BDEA86FFp-509 512 0 512 0x1018734E311AB77B710F9212969B3C86E8F388BB7DA5BAF74ADE078F43D96456D088C8A0B2A370159DFB8D4A4BC51BCDA91F2DCD01B2EC610C62AA33FAD1688p-504 N Z
+ - 12 0xC91p-11 12 0x6F1p-50 12 +0 12 0x9380000000 N N
# general inputs
+ - 72 0x91EA521228BFC46ACAp-118 72 -0x9E96A01DBAD6470974p-73 72 0x84C3E02A5C6DEE8410p-118 72 -0x99B43C52A95A21C220p-73 U N
- - 72 0x91EA521228BFC46AC9p-118 72 -0x9E96A01DBAD6470974p-73 72 0x84C3E02A5C6DEE8410p-118 72 -0x99B43C52A95A21C220p-73 D D
- + 72 0x91EA521228BFC46AC9p-118 72 -0x9E96A01DBAD6470973p-73 72 0x84C3E02A5C6DEE8410p-118 72 -0x99B43C52A95A21C220p-73 D U
+ + 72 0x91EA521228BFC46ACAp-118 72 0x9E96A01DBAD6470974p-73 72 0x84C3E02A5C6DEE8410p-118 72 0x99B43C52A95A21C220p-73 U N
- + 72 0x91EA521228BFC46AC9p-118 72 0x9E96A01DBAD6470974p-73 72 0x84C3E02A5C6DEE8410p-118 72 0x99B43C52A95A21C220p-73 D U
- - 72 0x91EA521228BFC46AC9p-118 72 0x9E96A01DBAD6470973p-73 72 0x84C3E02A5C6DEE8410p-118 72 0x99B43C52A95A21C220p-73 D D
+ - 156 -0xC90FDAA22167B20DB08A0C3B1FF415CABE49624p-155 156 0xEA84E971BD52E49CCEE036E303D5ECB2D9D9B9Ap-222 156 -0xF0CE58073F866A53F25DB85DE8D503FBDD81051p-109 156 0xCF81D7C76BB9754A52056CB0F144B0C6700CC8Cp-128 N N
- - 2 0.75 2 -3 2 0x1p-7 2 -1 N N
- + 2 0.75 2 3 2 0x1p-7 2 1 N N
# improve test coverage
+ - 57 -0x1.921fb54442d184 57 -0x8.a7e33db93ecf18@-34 57 -0xa.529626a89a1960@23 57 -0x3.9a5472b5709e74@14 N N
# bug reported by Joseph Myers, Tue, 7 Mar 2017
# http://lists.gforge.inria.fr/pipermail/mpc-discuss/2017-March/001404.html
- - 115 0x3243f6a8885a308d313198a2e037p-109 115 0x8.5159201dd5b9740d76d715caba0ep+0 115 0 115 0x1.000002p+0 Z Z
mpc-1.1.0/tests/tmul_2si.c 0000644 0001751 0001751 00000002256 12471661720 012272 0000000 0000000 /* tmul_2si -- test file for mpc_mul_2si.
Copyright (C) 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_mul_2si (P[1].mpc, P[2].mpc, P[3].si, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_mul_2si (P[1].mpc, P[1].mpc, P[3].si, P[4].mpc_rnd)
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
tgeneric_template ("mul_2si.dsc", 2, 1024, 7, 1024);
test_end ();
return 0;
}
mpc-1.1.0/tests/atan.dsc 0000644 0001751 0001751 00000001505 12471661720 012002 0000000 0000000 # Description file for mpc_atan
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_atan
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/real.dsc 0000644 0001751 0001751 00000001553 12471661720 012005 0000000 0000000 # Description file for mpc_real
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_real
RETURN:
mpfr_inex
OUTPUT:
mpfr_ptr
INPUT:
mpc_srcptr
mpfr_rnd_t
mpc-1.1.0/tests/tproj.c 0000644 0001751 0001751 00000002330 12471661720 011663 0000000 0000000 /* tproj -- test file for mpc_proj.
Copyright (C) 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_proj (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_proj (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("proj.dsc", "proj.dat");
tgeneric_template ("proj.dsc", 2, 1024, 1, 4096);
test_end ();
return 0;
}
mpc-1.1.0/tests/sin.dat 0000644 0001751 0001751 00000020273 12720536532 011651 0000000 0000000 # Data file for mpc_sin.
#
# Copyright (C) 2008, 2010 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP_RE OP_RE PREC_OP_IM OP_IM RND_RE RND_IM
#
# where op = op_re + i * op_im, rop = rop_re + i * rop_im,
# rop_re is ROP_RE rounded to nearest to the precision of PREC_ROP_RE
# rop_im is ROP_IM rounded to nearest to the precision of PREC_ROP_IM
# op_re is OP_RE rounded to nearest to the precision of PREC_OP_RE
# op_im is OP_IM rounded to nearest to the precision of PREC_OP_IM
# ROP_RE is checked against Re(sin op) rounded to the precision PREC_ROP_RE
# in the direction RND_RE
# ROP_IM is checked against Im(sin op) rounded to the precision PREC_ROP_IM
# in the direction RND_IM
# INEX_RE is the ternary value for the real part with the following notation:
# "?" ternary value not checked
# "+" if ROP_RE is greater than the exact mathematical result
# "0" if ROP_RE is exactly the mathematical result
# "-" if ROP_RE is less than the exact mathematical result
# (m.m. INEX_IM)
# rounding modes notation:
# "N" is rounding to nearest
# "Z" is rounding towards zero
# "U" is rounding towards plus infinity
# "D" is rounding towards minus infinity
# Use prefixes "0b" for values in base two, "0x" for values in base sixteen,
# no prefix for value in base ten.
# In all bases, "nan" is NaN, "inf" is infinity;
# The sign of the result is checked with "+inf", "-inf", "-0", or "+0".
# special values (following ISO C99 standard)
0 0 53 nan 53 inf 53 -inf 53 -inf N N
0 0 53 nan 53 nan 53 -inf 53 -1 N N
0 0 53 nan 53 0 53 -inf 53 -0 N N
0 0 53 nan 53 0 53 -inf 53 +0 N N
0 0 53 nan 53 nan 53 -inf 53 +1 N N
0 0 53 nan 53 inf 53 -inf 53 +inf N N
0 0 53 nan 53 nan 53 -inf 53 nan N N
0 0 53 +inf 53 -inf 53 -6 53 -inf N N
0 0 53 +inf 53 +inf 53 -6 53 +inf N N
0 0 53 nan 53 nan 53 -6 53 nan N N
0 0 53 +inf 53 +inf 53 -4 53 -inf N N
0 0 53 +inf 53 -inf 53 -4 53 +inf N N
0 0 53 nan 53 nan 53 -4 53 nan N N
0 0 53 -inf 53 +inf 53 -2 53 -inf N N
0 0 53 -inf 53 -inf 53 -2 53 +inf N N
0 0 53 nan 53 nan 53 -2 53 nan N N
0 0 53 -inf 53 -inf 53 -1 53 -inf N N
0 0 53 -inf 53 +inf 53 -1 53 +inf N N
0 0 53 nan 53 nan 53 -1 53 nan N N
0 0 53 -0 53 -inf 53 -0 53 -inf N N
0 0 53 -0 53 -0 53 -0 53 -0 N N
0 0 53 -0 53 +0 53 -0 53 +0 N N
0 0 53 -0 53 +inf 53 -0 53 +inf N N
0 0 53 -0 53 nan 53 -0 53 nan N N
0 0 53 +0 53 -inf 53 +0 53 -inf N N
0 0 53 +0 53 -0 53 +0 53 -0 N N
0 0 53 +0 53 +0 53 +0 53 +0 N N
0 0 53 +0 53 +inf 53 +0 53 +inf N N
0 0 53 +0 53 nan 53 +0 53 nan N N
0 0 53 +inf 53 -inf 53 +1 53 -inf N N
0 0 53 +inf 53 +inf 53 +1 53 +inf N N
0 0 53 nan 53 nan 53 +1 53 nan N N
0 0 53 +inf 53 +inf 53 +2 53 -inf N N
0 0 53 +inf 53 -inf 53 +2 53 +inf N N
0 0 53 nan 53 nan 53 +2 53 nan N N
0 0 53 -inf 53 +inf 53 +4 53 -inf N N
0 0 53 -inf 53 -inf 53 +4 53 +inf N N
0 0 53 nan 53 nan 53 +4 53 nan N N
0 0 53 -inf 53 -inf 53 +6 53 -inf N N
0 0 53 -inf 53 +inf 53 +6 53 +inf N N
0 0 53 nan 53 nan 53 +6 53 nan N N
0 0 53 nan 53 inf 53 +inf 53 -inf N N
0 0 53 nan 53 nan 53 +inf 53 -1 N N
0 0 53 nan 53 0 53 +inf 53 -0 N N
0 0 53 nan 53 0 53 +inf 53 +0 N N
0 0 53 nan 53 nan 53 +inf 53 +1 N N
0 0 53 nan 53 inf 53 +inf 53 +inf N N
0 0 53 nan 53 nan 53 +inf 53 nan N N
0 0 53 nan 53 inf 53 nan 53 -inf N N
0 0 53 nan 53 nan 53 nan 53 -1 N N
0 0 53 nan 53 0 53 nan 53 -0 N N
0 0 53 nan 53 0 53 nan 53 +0 N N
0 0 53 nan 53 nan 53 nan 53 +1 N N
0 0 53 nan 53 inf 53 nan 53 +inf N N
0 0 53 nan 53 nan 53 nan 53 nan N N
# pure real argument
- 0 53 0x4787C62AC28Bp-48 53 -0 53 -6 53 -0 N N
- 0 53 0x4787C62AC28Bp-48 53 +0 53 -6 53 +0 N N
- 0 53 0xC1BDCEEEE0F57p-52 53 +0 53 -4 53 -0 N N
- 0 53 0xC1BDCEEEE0F57p-52 53 -0 53 -4 53 +0 N N
- 0 53 -0xE8C7B7568DA23p-52 53 +0 53 -2 53 -0 N N
- 0 53 -0xE8C7B7568DA23p-52 53 -0 53 -2 53 +0 N N
+ 0 53 -0xD76AA47848677p-52 53 -0 53 -1 53 -0 N N
+ 0 53 -0xD76AA47848677p-52 53 +0 53 -1 53 +0 N N
- 0 53 0xD76AA47848677p-52 53 -0 53 +1 53 -0 N N
- 0 53 0xD76AA47848677p-52 53 +0 53 +1 53 +0 N N
+ 0 53 0xE8C7B7568DA23p-52 53 +0 53 +2 53 -0 N N
+ 0 53 0xE8C7B7568DA23p-52 53 -0 53 +2 53 +0 N N
+ 0 53 -0xC1BDCEEEE0F57p-52 53 +0 53 +4 53 -0 N N
+ 0 53 -0xC1BDCEEEE0F57p-52 53 -0 53 +4 53 +0 N N
+ 0 53 -0x4787C62AC28Bp-48 53 -0 53 +6 53 -0 N N
+ 0 53 -0x4787C62AC28Bp-48 53 +0 53 +6 53 +0 N N
# pure imaginary argument
0 + 53 -0 53 -0x1936D22F67C805p-45 53 -0 53 -6 N N
0 + 53 +0 53 -0x1936D22F67C805p-45 53 +0 53 -6 N N
0 - 53 -0 53 -0x1B4A3803703631p-48 53 -0 53 -4 N N
0 - 53 +0 53 -0x1B4A3803703631p-48 53 +0 53 -4 N N
0 + 53 -0 53 -0x1D03CF63B6E19Fp-51 53 -0 53 -2 N N
0 + 53 +0 53 -0x1D03CF63B6E19Fp-51 53 +0 53 -2 N N
0 + 53 -0 53 -0x966CFE2275CC1p-51 53 -0 53 -1 N N
0 + 53 +0 53 -0x966CFE2275CC1p-51 53 +0 53 -1 N N
0 - 53 -0 53 0x966CFE2275CC1p-51 53 -0 53 +1 N N
0 - 53 +0 53 0x966CFE2275CC1p-51 53 +0 53 +1 N N
0 - 53 -0 53 0x1D03CF63B6E19Fp-51 53 -0 53 +2 N N
0 - 53 +0 53 0x1D03CF63B6E19Fp-51 53 +0 53 +2 N N
0 + 53 -0 53 0x1B4A3803703631p-48 53 -0 53 +4 N N
0 + 53 +0 53 0x1B4A3803703631p-48 53 +0 53 +4 N N
0 - 53 -0 53 0x1936D22F67C805p-45 53 -0 53 +6 N N
0 - 53 +0 53 0x1936D22F67C805p-45 53 +0 53 +6 N N
# IEEE-754 double precision
+ + 53 514 53 -0x11B7CA26B51951p-97 53 0x3243F6A8885A3p-49 53 -0x1BBDD1808C59A3p-50 N N
+ + 53 514 53 -0x11B7CA26B51951p-97 53 0x3243F6A8885A3p-49 53 -0x1BBDD1808C59A3p-50 N Z
+ + 53 514 53 -0x11B7CA26B51951p-97 53 0x3243F6A8885A3p-49 53 -0x1BBDD1808C59A3p-50 N U
+ - 53 514 53 -0x8DBE5135A8CA9p-96 53 0x3243F6A8885A3p-49 53 -0x1BBDD1808C59A3p-50 N D
- + 53 0x100FFFFFFFFFFFp-43 53 -0x11B7CA26B51951p-97 53 0x3243F6A8885A3p-49 53 -0x1BBDD1808C59A3p-50 Z N
- + 53 0x100FFFFFFFFFFFp-43 53 -0x11B7CA26B51951p-97 53 0x3243F6A8885A3p-49 53 -0x1BBDD1808C59A3p-50 Z Z
- + 53 0x100FFFFFFFFFFFp-43 53 -0x11B7CA26B51951p-97 53 0x3243F6A8885A3p-49 53 -0x1BBDD1808C59A3p-50 Z U
- - 53 0x100FFFFFFFFFFFp-43 53 -0x8DBE5135A8CA9p-96 53 0x3243F6A8885A3p-49 53 -0x1BBDD1808C59A3p-50 Z D
+ + 53 514 53 -0x11B7CA26B51951p-97 53 0x3243F6A8885A3p-49 53 -0x1BBDD1808C59A3p-50 U N
+ + 53 514 53 -0x11B7CA26B51951p-97 53 0x3243F6A8885A3p-49 53 -0x1BBDD1808C59A3p-50 U Z
+ + 53 514 53 -0x11B7CA26B51951p-97 53 0x3243F6A8885A3p-49 53 -0x1BBDD1808C59A3p-50 U U
+ - 53 514 53 -0x8DBE5135A8CA9p-96 53 0x3243F6A8885A3p-49 53 -0x1BBDD1808C59A3p-50 U D
- + 53 0x100FFFFFFFFFFFp-43 53 -0x11B7CA26B51951p-97 53 0x3243F6A8885A3p-49 53 -0x1BBDD1808C59A3p-50 D N
- + 53 0x100FFFFFFFFFFFp-43 53 -0x11B7CA26B51951p-97 53 0x3243F6A8885A3p-49 53 -0x1BBDD1808C59A3p-50 D Z
- + 53 0x100FFFFFFFFFFFp-43 53 -0x11B7CA26B51951p-97 53 0x3243F6A8885A3p-49 53 -0x1BBDD1808C59A3p-50 D U
- - 53 0x100FFFFFFFFFFFp-43 53 -0x8DBE5135A8CA9p-96 53 0x3243F6A8885A3p-49 53 -0x1BBDD1808C59A3p-50 D D
# huge values
+ + 53 +inf 53 +inf 53 0x4580CBF242683p-3 53 -0x1B3E8A3660D279p-3 N N
- + 53 -inf 53 +inf 53 -0x1B3E8A3660D279p-3 53 0x4580CBF242683p-3 N N
# bug reported by Joseph Myers (25 Mar 2015)
- - 2 0x3p1073741819 2 0x3p1073741819 2 -0x1p200 2 -0x1p800 Z Z
mpc-1.1.0/tests/acosh.dsc 0000644 0001751 0001751 00000001507 12471661720 012156 0000000 0000000 # Description file for mpc_acosh
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_acosh
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/tgeneric.tpl 0000644 0001751 0001751 00000023024 12721065053 012700 0000000 0000000 /* tgeneric.tpl -- template file for generic tests.
Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#ifndef MPC_FUNCTION_CALL
#error Define MPC_FUNCTION_CALL before including 'data_check.tpl'.
#endif
/* helper functions, defined after tgeneric */
static int count_special_cases (mpc_fun_param_t *params);
static void random_params (mpc_fun_param_t *params,
mpfr_exp_t exp_min, mpfr_exp_t exp_max,
int special);
static void check_against_quadruple_precision (mpc_fun_param_t *params,
mpfr_prec_t prec,
mpfr_exp_t exp_min,
mpfr_exp_t exp_max,
int special);
/* tgeneric(desc, prec_min, prec_max, step, exp_max) checks rounding with
random numbers:
- with precision ranging from prec_min to prec_max with an increment of
step,
- with exponent between -exp_max and exp_max.
- for pure real, pure imaginary and infinite random parameters.
It also checks parameter reuse.
*/
static void
tgeneric_template (const char *description_file,
mpfr_prec_t prec_min, mpfr_prec_t prec_max, mpfr_prec_t step,
mpfr_exp_t exp_max)
{
int special = 0;
int last_special;
mpfr_prec_t prec;
mpfr_exp_t exp_min;
mpc_fun_param_t params;
read_description (¶ms, description_file);
init_parameters (¶ms);
/* ask for enough memory */
set_output_precision (¶ms, 4 * prec_max);
set_input_precision (¶ms, prec_max);
set_reference_precision (¶ms, prec_max);
/* sanity checks */
exp_min = mpfr_get_emin ();
if (exp_max <= 0 || exp_max > mpfr_get_emax ())
exp_max = mpfr_get_emax();
if (-exp_max > exp_min)
exp_min = - exp_max;
if (step < 1)
step = 1;
/* check consistency with quadruple precision for random parameters */
for (prec = prec_min; prec <= prec_max; prec += step)
check_against_quadruple_precision (¶ms, prec, exp_min, exp_max, -1);
/* check consistency with quadruple precision for special values:
pure real, pure imaginary, or infinite arguments */
last_special = count_special_cases (¶ms);
for (special = 0; special < last_special ; special++)
check_against_quadruple_precision (¶ms, prec_max, exp_min, exp_max,
special);
clear_parameters (¶ms);
}
static void
check_against_quadruple_precision (mpc_fun_param_t *params,
mpfr_prec_t prec,
mpfr_exp_t exp_min, mpfr_exp_t exp_max,
int special)
{
static int rand_counter = 0;
mpc_operand_t *P = params->P; /* developer-friendly alias, used in macros */
set_input_precision (params, prec);
set_reference_precision (params, prec);
set_output_precision (params, 4 * prec);
random_params (params, exp_min, exp_max, special);
for (first_rnd_mode (params);
is_valid_rnd_mode (params);
next_rnd_mode (params))
{
MPC_FUNCTION_CALL;
while (double_rounding (params))
/* try another input parameters until no double rounding occurs when
the extra-precise result is rounded to working precision */
{
random_params (params, exp_min, exp_max, special);
MPC_FUNCTION_CALL;
}
set_output_precision (params, prec);
set_mpfr_flags (rand_counter);
MPC_FUNCTION_CALL;
check_mpfr_flags (rand_counter++);
check_data (NULL, params, 0);
#ifdef MPC_FUNCTION_CALL_SYMMETRIC
MPC_FUNCTION_CALL_SYMMETRIC;
check_data (NULL, params, 0);
#endif
#ifdef MPC_FUNCTION_CALL_REUSE_OP1
if (copy_parameter (params, 1, 2) == 0)
{
MPC_FUNCTION_CALL_REUSE_OP1;
check_data (NULL, params, 2);
}
#endif
#ifdef MPC_FUNCTION_CALL_REUSE_OP2
if (copy_parameter (params, 1, 3) == 0)
{
MPC_FUNCTION_CALL_REUSE_OP2;
check_data (NULL, params, 3);
}
#endif
#ifdef MPC_FUNCTION_CALL_REUSE_OP3
if (copy_parameter (params, 1, 4) == 0)
{
MPC_FUNCTION_CALL_REUSE_OP3;
check_data (NULL, params, 4);
}
#endif
set_output_precision (params, 4 * prec);
}
}
/* special cases */
enum {
SPECIAL_MINF,
SPECIAL_MZERO,
SPECIAL_PZERO,
SPECIAL_PINF,
SPECIAL_COUNT
};
static int
count_special_cases (mpc_fun_param_t *params)
/* counts the number of possibilities of exactly one real or imaginary part of
any input parameter being special, all others being finite real numbers */
{
int i;
const int start = params->nbout;
const int end = start + params->nbin - 1; /* the last input parameter is the
rounding mode */
int count = 0;
for (i = start; i < end; i++)
{
if (params->T[i] == MPFR)
count += SPECIAL_COUNT;
else if (params->T[i] == MPC)
/* special + i x random and random + i x special */
count += 2 * SPECIAL_COUNT;
}
return count;
}
static void
special_mpfr (mpfr_ptr x, int special)
{
switch (special)
{
case SPECIAL_MINF:
mpfr_set_inf (x, -1);
break;
case SPECIAL_MZERO:
mpfr_set_zero (x, -1);
break;
case SPECIAL_PZERO:
mpfr_set_zero (x, +1);
break;
case SPECIAL_PINF:
mpfr_set_inf (x, +1);
break;
case SPECIAL_COUNT:
/* does not occur */
break;
}
}
static void
special_random_mpc (mpc_ptr z, mpfr_exp_t exp_min, mpfr_exp_t exp_max,
int special)
{
mpfr_ptr special_part;
mpfr_ptr random_part;
int mpfr_special;
if (special < SPECIAL_COUNT)
{
mpfr_special = special;
special_part = mpc_realref (z);
random_part = mpc_imagref (z);
}
else
{
mpfr_special = special - SPECIAL_COUNT;
special_part = mpc_imagref (z);
random_part = mpc_realref (z);
}
special_mpfr (special_part, mpfr_special);
test_random_mpfr (random_part, exp_min, exp_max, 128);
}
static void
random_params (mpc_fun_param_t *params,
mpfr_exp_t exp_min, mpfr_exp_t exp_max,
int special)
{
int i;
int base_index = 0;
const int start = params->nbout;
const int end = start + params->nbin;
const unsigned int int_emax = 42; /* maximum binary exponent for random
integer */
for (i = start; i < end; i++)
{
long int si;
switch (params->T[i])
{
case NATIVE_INT:
test_random_si (&si, int_emax, 128);
params->P[i].i = (int) si;
break;
case NATIVE_L:
test_random_si (¶ms->P[i].si, int_emax, 128);
break;
case NATIVE_UL:
test_random_si (&si, int_emax, 128);
params->P[i].ui = (unsigned long)si;
break;
case NATIVE_D:
test_random_d (¶ms->P[i].d, 128);
break;
case NATIVE_LD:
case NATIVE_DC:
case NATIVE_LDC:
/* TODO: draw random value */
fprintf (stderr, "random_params: type not implemented.\n");
exit (1);
break;
case NATIVE_IM:
case NATIVE_UIM:
/* TODO: draw random value */
fprintf (stderr, "random_params: type not implemented.\n");
exit (1);
break;
case GMP_Z:
/* TODO: draw random value */
fprintf (stderr, "random_params: type not implemented.\n");
exit (1);
break;
case GMP_Q:
/* TODO: draw random value */
fprintf (stderr, "random_params: type not implemented.\n");
exit (1);
break;
case GMP_F:
/* TODO: draw random value */
fprintf (stderr, "random_params: type not implemented.\n");
exit (1);
break;
case MPFR:
if (base_index <= special
&& special - base_index < SPECIAL_COUNT)
special_mpfr (params->P[i].mpfr, special - base_index);
else
test_random_mpfr (params->P[i].mpfr, exp_min, exp_max, 128);
base_index += SPECIAL_COUNT;
break;
case MPC:
if (base_index <= special
&& special - base_index < 2 * SPECIAL_COUNT)
special_random_mpc (params->P[i].mpc, exp_min, exp_max,
special - base_index);
else
test_random_mpc (params->P[i].mpc, exp_min, exp_max, 128);
base_index += 2 * SPECIAL_COUNT;
break;
case NATIVE_STRING:
case MPFR_INEX:
case MPC_INEX:
case MPCC_INEX:
/* unsupported types */
fprintf (stderr, "random_params: unsupported type.\n");
exit (1);
break;
case MPFR_RND:
case MPC_RND:
/* just skip rounding mode(s) */
break;
}
}
}
mpc-1.1.0/tests/mul_si.dsc 0000644 0001751 0001751 00000001543 12471661720 012351 0000000 0000000 # Description file for mpc_mul_si
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_mul_si
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
unsigned long int
mpc_rnd_t
mpc-1.1.0/tests/tlog10.c 0000644 0001751 0001751 00000002335 12471661720 011640 0000000 0000000 /* tlog10 -- test file for mpc_log10.
Copyright (C) 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_log10 (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_log10 (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("log10.dsc", "log10.dat");
tgeneric_template ("log10.dsc", 2, 512, 7, 128);
test_end ();
return 0;
}
mpc-1.1.0/tests/double_rounding.c 0000644 0001751 0001751 00000015407 12471661720 013715 0000000 0000000 /* double_rounding.c -- Functions for checking double rounding.
Copyright (C) 2013, 2014 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
/* return 1 if double rounding occurs;
return 0 otherwise */
static int
double_rounding_mpfr (mpfr_ptr lowprec,
mpfr_ptr hiprec, int hiprec_inex, mpfr_rnd_t hiprec_rnd)
{
mpfr_exp_t hiprec_err;
mpfr_rnd_t lowprec_rnd = hiprec_rnd;
mpfr_prec_t lowprec_prec = mpfr_get_prec (lowprec);
/* hiprec error is bounded by one ulp */
hiprec_err = mpfr_get_prec (hiprec) - 1;
if (hiprec_rnd == MPFR_RNDN)
/* when rounding to nearest, use the trick for determining the
correct ternary value which is described in the MPFR
documentation */
{
hiprec_err++; /* error is bounded by one half-ulp */
lowprec_rnd = MPFR_RNDZ;
lowprec_prec++;
}
return (hiprec_inex == 0
|| mpfr_can_round (hiprec, hiprec_err, hiprec_rnd,
lowprec_rnd, lowprec_prec));
}
/* return 1 if double rounding occurs;
return 0 otherwise */
static int
double_rounding_mpc (mpc_ptr lowprec,
mpc_ptr hiprec, int hiprec_inex, mpc_rnd_t hiprec_rnd)
{
mpfr_ptr lowprec_re = mpc_realref (lowprec);
mpfr_ptr lowprec_im = mpc_imagref (lowprec);
mpfr_ptr hiprec_re = mpc_realref (hiprec);
mpfr_ptr hiprec_im = mpc_imagref (hiprec);
int inex_re = MPC_INEX_RE (hiprec_inex);
int inex_im = MPC_INEX_IM (hiprec_inex);
mpfr_rnd_t rnd_re = MPC_RND_RE (hiprec_rnd);
mpfr_rnd_t rnd_im = MPC_RND_IM (hiprec_rnd);
return (double_rounding_mpfr (lowprec_re, hiprec_re, inex_re, rnd_re)
&& double_rounding_mpfr (lowprec_im, hiprec_im, inex_im, rnd_im));
}
/* check whether double rounding occurs; if not, round extra precise output
value and set reference parameter */
int
double_rounding (mpc_fun_param_t *params)
{
int out;
const int offset = params->nbout + params->nbin;
int rnd_index = offset - params->nbrnd;
for (out = 0; out < params->nbout; out++) {
if (params->T[out] == MPC)
{
int inex;
MPC_ASSERT ((params->T[0] == MPC_INEX)
|| (params->T[0] == MPCC_INEX));
MPC_ASSERT ((params->T[offset] == MPC_INEX)
|| (params->T[offset] == MPCC_INEX));
MPC_ASSERT (params->T[out + offset] == MPC);
MPC_ASSERT (params->T[rnd_index] == MPC_RND);
/*
For the time being, there may be either one or two rounding modes;
in the latter case, we assume that there are three outputs:
the inexact value and two complex numbers.
*/
inex = (params->nbrnd == 1 ? params->P[0].mpc_inex
: (out == 1 ? MPC_INEX1 (params->P[0].mpcc_inex)
: MPC_INEX2 (params->P[0].mpcc_inex)));
if (double_rounding_mpc (params->P[out + offset].mpc_data.mpc,
params->P[out].mpc,
inex,
params->P[rnd_index].mpc_rnd))
/* the high-precision value and the exact value round to the same
low-precision value */
{
int inex_hp, inex_re, inex_im;
inex = mpc_set (params->P[out + offset].mpc_data.mpc,
params->P[out].mpc,
params->P[rnd_index].mpc_rnd);
params->P[out + offset].mpc_data.known_sign_real = -1;
params->P[out + offset].mpc_data.known_sign_imag = -1;
/* no double rounding means that the ternary value may come from
the high-precision calculation or from the rounding */
if (params->nbrnd == 1)
inex_hp = params->P[0].mpc_inex;
else /* nbrnd == 2 */
if (out == 1)
inex_hp = MPC_INEX1 (params->P[0].mpcc_inex);
else /* out == 2 */
inex_hp = MPC_INEX2 (params->P[0].mpcc_inex);
if (MPC_INEX_RE (inex) == 0)
inex_re = MPC_INEX_RE (inex_hp);
else
inex_re = MPC_INEX_RE (inex);
if (MPC_INEX_IM (inex) == 0)
inex_im = MPC_INEX_IM (inex_hp);
else
inex_im = MPC_INEX_IM (inex);
if (params->nbrnd == 1) {
params->P[offset].mpc_inex_data.real = inex_re;
params->P[offset].mpc_inex_data.imag = inex_im;
}
else /* nbrnd == 2 */
if (out == 1)
params->P[offset].mpcc_inex = MPC_INEX (inex_re, inex_im);
else /* out == 2 */
params->P[offset].mpcc_inex
= MPC_INEX12 (params->P[offset].mpcc_inex,
MPC_INEX (inex_re, inex_im));
rnd_index++;
}
else
/* double rounding occurs */
return 1;
}
else if (params->T[out] == MPFR)
{
MPC_ASSERT (params->T[0] == MPFR_INEX);
MPC_ASSERT (params->T[offset] == MPFR_INEX);
MPC_ASSERT (params->T[out + offset] == MPFR);
MPC_ASSERT (params->T[rnd_index] == MPFR_RND);
if (double_rounding_mpfr (params->P[out + offset].mpfr_data.mpfr,
params->P[out].mpfr,
params->P[0].mpfr_inex,
params->P[rnd_index].mpfr_rnd))
/* the hight-precision value and the exact value round to the same
low-precision value */
{
int inex;
inex = mpfr_set (params->P[out + offset].mpfr_data.mpfr,
params->P[out].mpfr,
params->P[rnd_index].mpfr_rnd);
params->P[out + offset].mpfr_data.known_sign = -1;
/* no double rounding means that the ternary value may comes from
the high-precision calculation or from the rounding */
if (inex == 0)
params->P[offset].mpfr_inex = params->P[0].mpfr_inex;
else
params->P[offset].mpfr_inex = inex;
rnd_index++;
}
else
/* double rounding occurs */
return 1;
}
}
return 0;
}
mpc-1.1.0/tests/exp.dsc 0000644 0001751 0001751 00000001503 12471661720 011651 0000000 0000000 # Description file for mpc_exp
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_exp
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/sub.dat 0000644 0001751 0001751 00000010612 12426164730 011645 0000000 0000000 # Data file for mpc_sub.
#
# Copyright (C) 2008 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP1_RE OP1_RE PREC_OP1_IM OP1_IM PREC_OP2_RE OP2_RE PREC_OP2_IM OP2_IM RND_RE RND_IM
#
# see add.dat for details.
# special values (following ISO C99 standard)
0 0 53 nan 53 nan 53 -inf 53 -inf 53 -inf 53 -inf N Z
0 0 53 -inf 53 +inf 53 -inf 53 +inf 53 +1 53 -inf Z U
0 0 53 nan 53 -inf 53 +inf 53 -inf 53 +inf 53 +0 U D
0 0 53 +inf 53 +inf 53 +inf 53 +inf 53 -0 53 -1 D N
0 0 53 -inf 53 -inf 53 -inf 53 -inf 53 -0 53 -1 N U
0 0 53 -inf 53 nan 53 -inf 53 +inf 53 +inf 53 nan Z D
0 0 53 nan 53 -inf 53 +inf 53 -inf 53 nan 53 -1 U N
0 0 53 +inf 53 nan 53 +inf 53 +inf 53 -0 53 nan D Z
0 0 53 nan 53 nan 53 -inf 53 -inf 53 nan 53 nan N D
0 0 53 -inf 53 -inf 53 -1 53 -inf 53 +inf 53 -1 N D
0 0 53 -inf 53 +1 53 -inf 53 +1 53 +inf 53 -0 Z N
0 0 53 +1 53 -inf 53 +1 53 -inf 53 -0 53 +1 U Z
0 0 53 +inf 53 +1 53 +inf 53 +1 53 -0 53 -0 D U
0 0 53 -inf 53 nan 53 -1 53 -inf 53 +inf 53 nan N N
0 0 53 nan 53 +0 53 -inf 53 +1 53 nan 53 +1 Z Z
0 0 53 +1 53 nan 53 +1 53 -inf 53 -0 53 nan U U
0 0 53 nan 53 nan 53 +inf 53 +1 53 nan 53 nan D D
0 0 53 -0 53 -inf 53 -0 53 -inf 53 +0 53 +inf D D
0 0 53 -inf 53 +0 53 -inf 53 +0 53 +1 53 -0 N Z
0 0 53 +0 53 -inf 53 +0 53 -inf 53 -0 53 -0 Z U
0 0 53 +inf 53 nan 53 +inf 53 +0 53 -inf 53 nan U D
0 0 53 nan 53 -inf 53 -0 53 -inf 53 nan 53 -1 D N
0 0 53 -inf 53 nan 53 -inf 53 +0 53 +0 53 nan N U
0 0 53 nan 53 nan 53 +0 53 -inf 53 nan 53 nan Z D
0 0 53 +0 53 +2 53 +0 53 +1 53 -0 53 -1 Z D
0 0 53 -1 53 +0 53 -1 53 -0 53 +0 53 -0 U N
0 0 53 nan 53 -inf 53 -0 53 +1 53 nan 53 +inf D Z
0 0 53 +2 53 nan 53 +1 53 -0 53 -1 53 nan N D
0 0 53 nan 53 +1 53 +0 53 +1 53 nan 53 -0 Z N
0 0 53 nan 53 nan 53 -1 53 -0 53 nan 53 nan U Z
0 0 53 -0 53 +0 53 -0 53 +0 53 +0 53 -0 U Z
0 0 53 nan 53 +inf 53 +0 53 -0 53 nan 53 -inf D U
0 0 53 +1 53 nan 53 +0 53 +0 53 -1 53 nan N N
0 0 53 nan 53 +0 53 -0 53 -0 53 nan 53 -0 Z Z
0 0 53 nan 53 nan 53 -0 53 +0 53 nan 53 nan U U
0 0 53 nan 53 -inf 53 nan 53 -inf 53 nan 53 +inf U U
0 0 53 +inf 53 nan 53 +inf 53 nan 53 -1 53 nan D D
0 0 53 nan 53 -inf 53 nan 53 -inf 53 nan 53 -0 N Z
0 0 53 nan 53 nan 53 -inf 53 nan 53 nan 53 nan Z U
0 0 53 nan 53 nan 53 +1 53 nan 53 nan 53 -1 Z U
0 0 53 nan 53 nan 53 nan 53 +1 53 -0 53 nan U D
0 0 53 nan 53 nan 53 -1 53 nan 53 nan 53 nan D N
0 0 53 nan 53 nan 53 nan 53 +0 53 +0 53 nan D N
0 0 53 nan 53 nan 53 +0 53 nan 53 nan 53 nan N U
0 0 53 nan 53 nan 53 nan 53 nan 53 nan 53 nan N U
# pure real argument
+ 0 53 0x10000000000000p-52 53 +0 53 +1 53 -0 53 0x1p-105 53 -0 N N
- 0 53 0x1fffffffffffffp-53 53 +0 53 +1 53 -0 53 0x1p-105 53 -0 Z Z
+ 0 53 0x10000000000000p-52 53 +0 53 +1 53 -0 53 0x1p-105 53 -0 U U
- 0 53 0x1fffffffffffffp-53 53 -0 53 +1 53 -0 53 0x1p-105 53 -0 D D
# pure imaginary argument
0 - 53 +0 53 -0x10000000000000p-52 53 -0 53 0x10000000000000p-106 53 -0 53 +1 N N
0 + 53 +0 53 -0x1fffffffffffffp-53 53 -0 53 0x10000000000001p-106 53 -0 53 +1 N N
0 + 53 +0 53 -0x1fffffffffffffp-53 53 +0 53 0x10000000000001p-106 53 -0 53 +1 Z Z
0 + 53 +0 53 -0x1fffffffffffffp-53 53 +0 53 0x10000000000001p-106 53 -0 53 +1 U U
0 - 53 -0 53 -0x10000000000000p-52 53 -0 53 0x10000000000001p-106 53 -0 53 +1 D D
mpc-1.1.0/tests/tui_ui_sub.c 0000644 0001751 0001751 00000002312 12471661720 012674 0000000 0000000 /* tui_ui_sub -- test file for mpc_ui_ui_sub.
Copyright (C) 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_ui_ui_sub (P[1].mpc, P[2].ui, P[3].ui, P[4].mpc, P[5].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP3 \
P[0].mpc_inex = mpc_ui_ui_sub (P[1].mpc, P[2].ui, P[3].ui, P[4].mpc, P[5].mpc_rnd)
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
tgeneric_template ("ui_ui_sub.dsc", 2, 1024, 7, 1024);
test_end ();
return 0;
}
mpc-1.1.0/tests/tadd_ui.c 0000644 0001751 0001751 00000003541 12471661720 012143 0000000 0000000 /* tadd_ui -- test file for mpc_add_ui.
Copyright (C) 2008, 2010, 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include
#include "mpc-tests.h"
static void
check_ternary_value (void)
{
mpfr_prec_t prec;
mpc_t z;
mpc_init2 (z, 2);
for (prec=2; prec <= 1024; prec++)
{
mpc_set_prec (z, prec);
mpc_set_ui (z, 1, MPC_RNDNN);
if (mpc_add_ui (z, z, 1, MPC_RNDNZ))
{
printf ("Error in mpc_add_ui: 1+1 should be exact\n");
exit (1);
}
mpc_set_ui (z, 1, MPC_RNDNN);
mpc_mul_2ui (z, z, (unsigned long int) prec, MPC_RNDNN);
if (mpc_add_ui (z, z, 1, MPC_RNDNN) == 0)
{
printf ("Error in mpc_add_ui: 2^prec+1 cannot be exact\n");
exit (1);
}
}
mpc_clear (z);
}
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_add_ui (P[1].mpc, P[2].mpc, P[3].ui, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_add_ui (P[1].mpc, P[1].mpc, P[3].ui, P[4].mpc_rnd)
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
check_ternary_value ();
tgeneric_template ("add_ui.dsc", 2, 1024, 1, 1024);
test_end ();
return 0;
}
mpc-1.1.0/tests/tsin_cos.c 0000644 0001751 0001751 00000002045 12471661720 012351 0000000 0000000 /* tsin_cos -- test file for mpc_sin_cos.
Copyright (C) 2011, 2013, 2014 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpcc_inex = mpc_sin_cos (P[1].mpc, P[2].mpc, P[3].mpc, P[4].mpc_rnd, P[5].mpc_rnd)
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
tgeneric_template ("sin_cos.dsc", 2, 512, 13, 7);
test_end ();
return 0;
}
mpc-1.1.0/tests/log10.dsc 0000644 0001751 0001751 00000001507 12471661720 012003 0000000 0000000 # Description file for mpc_log10
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_log10
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/fma.dat 0000644 0001751 0001751 00000003445 12426164730 011625 0000000 0000000 # Data file for mpc_exp.
#
# Copyright (C) 2008, 2010, 2012 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP1_RE OP1_RE PREC_OP1_IM OP1_IM PREC_OP2_RE OP2_RE PREC_OP2_IM OP2_IM PREC_OP3_RE OP3_RE PREC_OP3_IM OP3_IM RND_RE RND_IM
#
# see sin.dat for precisions
+ - 53 -0x189281b52abc03p-55 53 0x178a1d3cd134e5p-49 53 0x16A09E667F3BCDp-52 53 0x9CC470A049097p-50 53 0x23C6EF372FE95p-48 53 0x9CC470A049097p-50 53 0xA953FD4E97C75p-50 53 0x16A09E667F3BCDp-51 N N
+ + 53 -0x178a1d3cd134e5p-49 53 -0x189281b52abc03p-55 53 -0x9CC470A049097p-50 53 0x16A09E667F3BCDp-52 53 0x23C6EF372FE95p-48 53 0x9CC470A049097p-50 53 -0x16A09E667F3BCDp-51 53 0xA953FD4E97C75p-50 N N
+ + 53 -0x178a1d3cd134e5p-49 53 -0x189281b52abc03p-55 53 -0x9CC470A049097p-50 53 0x16A09E667F3BCDp-52 53 0x23C6EF372FE95p-48 53 0x9CC470A049097p-50 53 -0x16A09E667F3BCDp-51 53 0xA953FD4E97C75p-50 U U
0 0 10 0 10 0 10 7 10 5 10 3 10 -12 10 -81 10 69 N N
0 0 10 0 10 0 10 7 10 5 10 3 10 -12 10 -81 10 69 Z D
0 0 2 1 2 1 7 99 7 98 7 97 7 96 7 -194 15 -19009 N N
mpc-1.1.0/tests/rootofunity.dsc 0000644 0001751 0001751 00000001560 12744456667 013500 0000000 0000000 # Description file for mpc_rootofunity
#
# Copyright (C) 2016 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_rootofunity
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
unsigned long int
unsigned long int
mpc_rnd_t
mpc-1.1.0/tests/init_parameters.c 0000644 0001751 0001751 00000003540 12471661720 013717 0000000 0000000 /* init_parameters -- Allocate memory for function parameters.
Copyright (C) 2012, 2014 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include
#include "mpc-tests.h"
static void
init_param (mpc_operand_t* p, mpc_param_t t)
{
switch (t)
{
case NATIVE_INT:
case NATIVE_UL:
case NATIVE_L:
case NATIVE_D:
break;
case GMP_Z:
mpz_init (p->mpz);
break;
case GMP_Q:
mpq_init (p->mpq);
break;
case GMP_F:
mpf_init (p->mpf);
break;
case MPFR_INEX:
break;
case MPFR:
mpfr_init2 (p->mpfr, 512);
break;
case MPC_INEX:
case MPCC_INEX:
break;
case MPC:
mpc_init2 (p->mpc, 512);
break;
case MPFR_RND:
case MPC_RND:
break;
default:
fprintf (stderr, "init_parameters: unsupported type.\n");
exit (1);
}
}
void
init_parameters (mpc_fun_param_t *params)
{
int in, out;
int total = params->nbout + params->nbin;
for (out = 0; out < params->nbout; out++)
{
init_param (&(params->P[out]), params->T[out]);
init_param (&(params->P[total + out]), params->T[total + out]);
}
for (in = params->nbout; in < total; in++)
{
init_param (&(params->P[in]), params->T[in]);
}
}
mpc-1.1.0/tests/tprec.c 0000644 0001751 0001751 00000003511 12426164730 011643 0000000 0000000 /* tprec -- Test file for mpc_set_prec, mpc_get_prec and mpc_get_prec2.
Copyright (C) 2009, 2011 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include
#include "mpc-tests.h"
int
main (void)
{
mpc_t z;
mpfr_prec_t prec, pr, pi;
mpc_init2 (z, 1000);
for (prec = 2; prec <= 1000; prec++)
{
/* check set_prec/get_prec */
mpfr_set_prec (mpc_realref (z), prec);
mpfr_set_prec (mpc_imagref (z), prec + 1);
if (mpc_get_prec (z) != 0)
{
printf ("Error in mpc_get_prec for prec (re) = %lu, "
"prec (im) = %lu\n", (unsigned long int) prec,
(unsigned long int) prec + 1ul);
exit (1);
}
mpc_get_prec2 (&pr, &pi, z);
if (pr != prec || pi != prec + 1)
{
printf ("Error in mpc_get_prec2 for prec (re) = %lu, "
"prec (im) = %lu\n", (unsigned long int) prec,
(unsigned long int) prec + 1ul);
exit (1);
}
mpc_set_prec (z, prec);
if (mpc_get_prec (z) != prec)
{
printf ("Error in mpc_get_prec for prec = %lu\n",
(unsigned long int) prec);
exit (1);
}
}
mpc_clear (z);
return 0;
}
mpc-1.1.0/tests/mul_2ui.dsc 0000644 0001751 0001751 00000001545 12471661720 012437 0000000 0000000 # Description file for mpc_mul_2ui
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_mul_2ui
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
unsigned long int
mpc_rnd_t
mpc-1.1.0/tests/targ.c 0000644 0001751 0001751 00000002115 12471661720 011463 0000000 0000000 /* targ -- test file for mpc_arg.
Copyright (C) 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpfr_inex = mpc_arg (P[1].mpfr, P[2].mpc, P[3].mpfr_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("arg.dsc", "arg.dat");
tgeneric_template ("arg.dsc", 2, 1024, 1, 4096);
test_end ();
return 0;
}
mpc-1.1.0/tests/log10.dat 0000644 0001751 0001751 00000021762 12433365705 012011 0000000 0000000 # Data test file for mpc_log10.
#
# Copyright (C) 2012 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
# See file sin.dat for the format description.
# Special values, following ISO C99 standard, Annex G,
# more precisely Section 7.26 "Future library directions"
# Rule [conj]: log10(conj(z)) = conj(log10(z))
# log10(nan + i*inf) = +inf + i*nan
0 0 2 +inf 2 nan 2 nan 2 +inf N N
0 0 2 +inf 2 nan 2 nan 2 -inf N N
# log10(nan + i*nan) = nan + i*nan
0 0 2 nan 2 nan 2 nan 2 nan N N
# log10(nan + i*y) = nan + i*nan for finite y
0 0 2 nan 2 nan 2 nan 2 1 N N
0 0 2 nan 2 nan 2 nan 2 +0 N N
0 0 2 nan 2 nan 2 nan 2 -0 N N
0 0 2 nan 2 nan 2 nan 2 -1 N N
# log10(+/-inf + i*nan) = +inf + i*nan
0 0 2 +inf 2 nan 2 +inf 2 nan N N
0 0 2 +inf 2 nan 2 -inf 2 nan N N
# log10(x + i*nan) = nan+i*nan for finite x
0 0 2 nan 2 nan 2 1 2 nan N N
0 0 2 nan 2 nan 2 +0 2 nan N N
0 0 2 nan 2 nan 2 -0 2 nan N N
0 0 2 nan 2 nan 2 -1 2 nan N N
# log10(x + i*inf) = +inf + i*pi/2/log(10) for finite x
0 + 2 +inf 53 +0x15d47c4cb2fba1p-53 2 1 2 +inf N N
0 + 2 +inf 53 +0x15d47c4cb2fba1p-53 2 +0 2 +inf N N
0 + 2 +inf 53 +0x15d47c4cb2fba1p-53 2 -0 2 +inf N N
0 + 2 +inf 53 +0x15d47c4cb2fba1p-53 2 -1 2 +inf N N
# by [conj]: log10(x - i*inf) = +inf - i*pi/2/log(10) for finite x
0 - 2 +inf 53 -0x15d47c4cb2fba1p-53 2 1 2 -inf N N
0 - 2 +inf 53 -0x15d47c4cb2fba1p-53 2 +0 2 -inf N N
0 - 2 +inf 53 -0x15d47c4cb2fba1p-53 2 -0 2 -inf N N
0 - 2 +inf 53 -0x15d47c4cb2fba1p-53 2 -1 2 -inf N N
# log10(-inf + i*y) = +inf + i*pi/log(10) for finite positive-signed y
0 + 2 +inf 53 0x15d47c4cb2fba1p-52 2 -inf 2 1 N N
0 + 2 +inf 53 0x15d47c4cb2fba1p-52 2 -inf 2 +0 N N
# by [conj]: log10(-inf+i*y) = +inf - i*pi/log(10) for finite negative-signed y
0 - 2 +inf 53 -0x15d47c4cb2fba1p-52 2 -inf 2 -1 N N
0 - 2 +inf 53 -0x15d47c4cb2fba1p-52 2 -inf 2 -0 N N
# log10(+inf + i*y) = +inf + i*0 for finite positive-signed y
0 0 2 +inf 2 +0 2 +inf 2 1 N N
0 0 2 +inf 2 +0 2 +inf 2 +0 N N
# by [conj]: log10(+inf + i*y) = +inf - i*0 for finite negative-signed y
0 0 2 +inf 2 -0 2 +inf 2 -1 N N
0 0 2 +inf 2 -0 2 +inf 2 -0 N N
# log10(-inf + i*inf) = +inf + i*(3*pi/4)/log(10)
0 + 2 +inf 53 0x105f5d39863cb9p-52 2 -inf 2 +inf N N
# by [conj]: log10(-inf - i*inf) = +inf - i*(3*pi/4)/log(10)
0 - 2 +inf 53 -0x105f5d39863cb9p-52 2 -inf 2 -inf N N
# log10(+inf + i*inf) = +inf + i*(pi/4)/log(10)
0 + 2 +inf 53 0x15d47c4cb2fba1p-54 2 +inf 2 +inf N N
# by [conj]: log10(+inf - i*inf) = +inf - i*(pi/4)/log(10)
0 - 2 +inf 53 -0x15d47c4cb2fba1p-54 2 +inf 2 -inf N N
# log10(-0 + i*0) = -inf + i*pi/log(10)
0 + 2 -inf 53 +0x15d47c4cb2fba1p-52 2 -0 2 +0 N N
0 - 2 -inf 53 -0x15d47c4cb2fba1p-52 2 -0 2 -0 N N
0 + 2 -inf 53 +0x15d47c4cb2fba1p-52 2 -0 2 +0 N U
0 + 2 -inf 53 -0xaea3e26597ddp-47 2 -0 2 -0 N U
0 - 2 -inf 53 +0xaea3e26597ddp-47 2 -0 2 +0 N D
0 - 2 -inf 53 -0x15d47c4cb2fba1p-52 2 -0 2 -0 N D
# log10(+0 + i*0) = -inf + i*0
0 0 2 -inf 2 +0 2 +0 2 +0 N N
0 0 2 -inf 2 -0 2 +0 2 -0 N N
# log10(+1 +- i*0) = +0 +- i*0
0 0 2 +0 2 +0 2 1 2 +0 N N
0 0 2 +0 2 -0 2 1 2 -0 N N
# log10(10 +- i*0) = 1 +- i*0
0 0 2 1 2 +0 4 10 2 +0 N N
0 0 2 1 2 -0 4 10 2 -0 N N
# log10(100 +- i*0) = 1 +- i*0
0 0 2 2 2 +0 5 100 2 +0 N N
0 0 2 2 2 -0 5 100 2 -0 N N
# log10(-1 +- i*0) = +0 +- i*pi/log(10)
0 + 2 +0 53 +0x15d47c4cb2fba1p-52 2 -1 2 +0 N N
0 - 2 +0 53 -0x15d47c4cb2fba1p-52 2 -1 2 -0 N N
# log10(x + i*y) with either x or y zero and the other non-zero
- 0 53 0x13afeb354b7d97p-52 2 0 5 0x11 2 0 N N
- + 53 0x13afeb354b7d97p-52 53 0x15d47c4cb2fba1p-53 2 0 5 0x11 N N
- + 53 0x1475c655fbc11p-48 53 0x15d47c4cb2fba1p-52 5 -0x13 2 +0 N N
- - 53 0x1475c655fbc11p-48 53 -0x15d47c4cb2fba1p-52 5 -0x13 2 -0 N N
- - 53 0x1475c655fbc11p-48 53 -0x15d47c4cb2fba1p-53 2 0 5 -0x13 N N
- + 53 0x15c9a3209bf97fp-52 53 0x15d47c4cb2fba1p-52 5 -0x17 2 +0 Z U
- - 53 0x15c9a3209bf97fp-52 53 -0x15d47c4cb2fba1p-52 5 -0x17 2 -0 N D
+ - 53 0x2b93464137f3p-45 53 0xaea3e26597ddp-47 5 -0x17 2 +0 U Z
- - 53 0x15c9a3209bf97fp-52 53 -0x15d47c4cb2fba1p-52 5 -0x17 2 -0 D N
- - 53 0x1d1cda1a0c996dp-52 53 0xaea3e26597ddp-47 7 -0x42 2 +0 Z D
+ + 53 0xe8e6d0d064cb7p-51 53 -0xaea3e26597ddp-47 7 -0x42 2 -0 N Z
+ + 53 0xe8e6d0d064cb7p-51 53 0x15d47c4cb2fba1p-52 7 -0x42 2 +0 U N
- + 53 0x1d1cda1a0c996dp-52 53 -0xaea3e26597ddp-47 7 -0x42 2 -0 D U
# huge values
+ 0 53 0x134413509f79ffp-44 2 0 2 0x1p1024 2 +0 U U
+ 0 53 0x134413509f79ffp-43 2 0 2 0x1p2048 2 +0 U U
+ 0 53 0x134413509f79ffp-42 2 0 2 0x1p4096 2 +0 U U
+ 0 53 0x134413509f79ffp-41 2 0 2 0x1p8192 2 +0 U U
+ 0 53 0x134413509f79ffp-40 2 0 2 0x1p16384 2 +0 U U
+ 0 53 0x134413509f79ffp-39 2 0 2 0x1p32768 2 +0 U U
+ 0 53 0x134413509f79ffp-38 2 0 2 0x1p65536 2 +0 U U
+ 0 53 0x134413509f79ffp-37 2 0 2 0x1p131072 2 +0 U U
+ 0 53 0x134413509f79ffp-36 2 0 2 0x1p262144 2 +0 U U
+ 0 53 0x134413509f79ffp-35 2 0 2 0x1p524288 2 +0 U U
+ 0 53 0x134413509f79ffp-34 2 0 2 0x1p1048576 2 +0 U U
+ 0 53 0x134413509f79ffp-33 2 0 2 0x1p2097152 2 +0 U U
+ 0 53 0x134413509f79ffp-32 2 0 2 0x1p4194304 2 +0 U U
+ 0 53 0x134413509f79ffp-31 2 0 2 0x1p8388608 2 +0 U U
+ 0 53 0x134413509f79ffp-30 2 0 2 0x1p16777216 2 +0 U U
+ 0 53 0x134413509f79ffp-29 2 0 2 0x1p33554432 2 +0 U U
+ 0 53 0x134413509f79ffp-28 2 0 2 0x1p67108864 2 +0 U U
+ 0 53 0x134413509f79ffp-27 2 0 2 0x1p134217728 2 +0 U U
+ 0 53 0x134413509f79ffp-26 2 0 2 0x1p268435456 2 +0 U U
+ 0 53 0x134413509f79ffp-25 2 0 2 0x1p536870912 2 +0 U U
+ + 53 0x13467bd3098defp-44 53 0x15d47c4cb2fba1p-54 2 0x1p1024 2 0x1p1024 U U
+ + 53 0x13454791d483f7p-43 53 0x15d47c4cb2fba1p-54 2 0x1p2048 2 0x1p2048 U U
+ + 53 0x1344ad7139fefbp-42 53 0x15d47c4cb2fba1p-54 2 0x1p4096 2 0x1p4096 U U
+ + 53 0x13446060ecbc7dp-41 53 0x15d47c4cb2fba1p-54 2 0x1p8192 2 0x1p8192 U U
+ + 53 0x9a21cec630d9fp-39 53 0x15d47c4cb2fba1p-54 2 0x1p16384 2 0x1p16384 U U
+ + 53 0x13442694b2ca9fp-39 53 0x15d47c4cb2fba1p-54 2 0x1p32768 2 0x1p32768 U U
+ + 53 0x13441cf2a9224fp-38 53 0x15d47c4cb2fba1p-54 2 0x1p65536 2 0x1p65536 U U
+ + 53 0x13441821a44e27p-37 2 0x3p-3 2 0x1p131072 2 0x1p131072 U U
+ + 53 0x134415b921e413p-36 2 0x3p-3 2 0x1p262144 2 0x1p262144 U U
+ + 53 0x13441484e0af09p-35 2 0x3p-3 2 0x1p524288 2 0x1p524288 U U
+ + 53 0x4d104fab00521p-32 2 0x3p-3 2 0x1p1048576 2 0x1p1048576 U U
+ + 53 0x9a209ced7e3a1p-32 2 0x3p-3 2 0x1p2097152 2 0x1p2097152 U U
+ + 53 0x1344137727a0a1p-32 2 0x3p-3 2 0x1p4194304 2 0x1p4194304 U U
+ + 53 0x13441363e38d5p-27 2 0x3p-3 2 0x1p8388608 2 0x1p8388608 U U
+ + 53 0x268826b483075p-27 2 0x3p-3 2 0x1p16777216 2 0x1p16777216 U U
+ + 53 0x4d104d55c1fb5p-27 2 0x3p-3 2 0x1p33554432 2 0x1p33554432 U U
+ + 53 0x9a209a983fe35p-27 2 0x3p-3 2 0x1p67108864 2 0x1p67108864 U U
+ + 53 0x4d104d474eecdp-25 2 0x3p-3 2 0x1p134217728 2 0x1p134217728 U U
+ + 53 0x9a209a89ccd4dp-25 2 0x3p-3 2 0x1p268435456 2 0x1p268435456 U U
# Due to intermediate overflow, the following result has wrong real part
# instead of the correct result. Since this may happen in other parts of the
# library as well, we do not consider it a bug for the moment.
# + + 53 0x13441350ec8a4dp-25 2 0x3p-3 2 0x1p536870912 2 0x1p536870912 U U
# log10(3+I) has an exact real part (from Joseph S. Myers)
0 + 53 0.5 53 0x8f168ee8415e7p-54 2 3 2 1 N N
# bug found by Mickael Gastineau on 29 Sep 2012
0 + 2 +0 2 0.75 2 +0 2 1 N N
0 - 2 +0 2 -0.75 2 +0 2 -1 N N
mpc-1.1.0/tests/close_datafile.c 0000644 0001751 0001751 00000001545 12471661720 013472 0000000 0000000 /* close_datafile.c -- Deallocate buffers and close datafile.
Copyright (C) 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
void
close_datafile (mpc_datafile_context_t *dc)
{
free (dc->pathname);
fclose (dc->fd);
}
mpc-1.1.0/tests/pow_ui.dat 0000644 0001751 0001751 00000010651 12426164730 012361 0000000 0000000 # Data file for mpc_pow_ui.
#
# Copyright (C) 2010, 2011, 2012 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP1_RE OP1_RE PREC_OP1_IM OP1_IM OP2 RND_RE RND_IM
#
# For further details, see add_fr.dat.
# special cases, copied from pow.dat
0 0 53 +1 53 0 53 nan 53 +0 +0 N N
0 0 53 nan 53 nan 53 nan 53 +0 +1 N N
0 0 53 inf 53 nan 53 +inf 53 +0 +1 N N
0 0 53 +inf 53 nan 53 +inf 53 +1 +1 N N
0 0 53 +inf 53 nan 53 +inf 53 -1 +1 N N
0 0 53 +inf 53 nan 53 -inf 53 +0 +1 N N
0 0 53 +inf 53 nan 53 -inf 53 +1 +1 N N
0 0 53 +inf 53 nan 53 -inf 53 -1 +1 N N
0 0 53 +1 53 +0 53 +0 53 +0 +0 N N
0 0 53 +0 53 +0 53 +0 53 +0 +1 N N
0 0 53 +1 53 +0 53 +0 53 +1 +0 N N
0 0 53 +1 53 -0 53 +0 53 +1 +0 N D
0 0 53 +1 53 +0 53 -0 53 +1 +0 N N
0 0 53 +1 53 +0 53 -1 53 +0 +0 N N
0 0 53 +1 53 -0 53 -1 53 -0 +0 N N
0 0 53 +1 53 -0 53 -0 53 -1 +0 N N
0 0 53 +1 53 -0 53 +0 53 -1 +0 N N
0 0 53 +1 53 +0 53 +inf 53 +2 +0 N N
0 0 53 +1 53 +0 53 +inf 53 -0 +0 N N
0 0 53 +1 53 +0 53 +2 53 +inf +0 N N
0 0 53 +1 53 +0 53 +2 53 +0 +0 N N
0 0 53 +1 53 +0 53 +0 53 +2 +0 N N
0 0 53 +1 53 +0 53 +0 53 +inf +0 N N
0 0 53 +1 53 +0 53 -0 53 +2 +0 N N
0 0 53 +1 53 +0 53 -0 53 +inf +0 N N
0 0 53 +1 53 +0 53 -5 53 +inf +0 N N
0 0 53 +1 53 +0 53 -2 53 +0 +0 N N
0 0 53 +1 53 +0 53 -inf 53 +0 +0 N N
0 0 53 +1 53 +0 53 -inf 53 +3 +0 N N
0 0 53 +1 53 -0 53 +0.5 53 -0.5 +0 N N
0 0 53 +1 53 -0 53 +0.5 53 +0 +0 N N
0 0 53 +1 53 -0 53 +0.5 53 -0 +0 N N
0 0 53 +1 53 -0 53 -0.5 53 -0 +0 N N
0 0 53 +1 53 -0 53 +0 53 -0.5 +0 N N
0 0 53 +1 53 -0 53 -0 53 -0.5 +0 N N
0 0 53 +9 53 +0 53 +3 53 +0 +2 N N
0 0 53 +1 53 +0 53 +1 53 +0 +4 N N
0 0 53 +1 53 -0 53 +1 53 -0 +4 N N
0 0 53 0.25 53 -0 53 +0.5 53 -0 +2 N N
0 0 53 1 53 0 53 +2 53 -1 +0 N N
0 0 53 1 53 0 53 -2 53 -1 +0 N N
0 0 53 1 53 0 53 -2 53 -0 +0 N N
0 0 53 1 53 0 53 +0.5 53 +0.5 +0 N N
0 0 53 1 53 0 53 -0.5 53 +0.5 +0 N N
0 0 53 1 53 0 53 -0.5 53 +0 +0 N N
0 0 53 1 53 0 53 +0 53 +0.5 +0 N N
0 0 53 1 53 0 53 -0 53 +0.5 +0 N N
0 0 53 1 53 0 53 -0 53 -4 +0 N N
0 0 53 1 53 0 53 +0 53 -4 +0 N N
0 0 53 1 53 0 53 -1 53 -0 +0 N N
0 0 53 1 53 0 53 -1 53 +0 +0 N N
0 0 53 4 53 0 53 +2 53 -0 +2 N N
0 0 53 1 53 0 53 +1 53 +0 +2 N N
0 0 53 1 53 0 53 +1 53 -0 +2 N N
# overflow
? ? 53 +inf 53 +inf 53 1e100000000 53 1e100000000 1000000000 N N
# underflow
? ? 53 0 53 0 53 1e-100000000 53 1e-100000000 1000000000 N N
# cannot round after one loop
? ? 420 -0x1.c3fb41a71665f9a144927e70cbc2dc899e9e30880c0b5aa924ad8a538b4cd06e503f38bdbb7cfcfded29f7504fe0c91ecd4230984@-187 420 -0xc.82a09ac98133eb05b2643c98eb1c8e1a1609e75f682b14098176abd6c8b4b3c6c72dadaf8929f9bd87f8c78d03361bacb9fb13140@-292 420 0x1.cf13ce58adc4e639fd1c3063ffc9291433647999951bc04ba6797ec4de0335336ad0a28df18573d3b6322ebab662c08eadaed4a8e@-8 420 0x3.cf71d602ca6f754ebd6af522154f3ee1c46da0a52deb1f60016fca4b1e0b4b447b752169e837bb1866aa3734850cd158a7e3ca33c@-9 24 N N
# exact result
0 0 5 -9 5 46 5 3 5 2 3 D U
# special cases with exponents 1 and 2
0 0 53 3 53 4 53 3 53 4 1 N N
0 0 53 -7 53 24 53 3 53 4 2 N N
# coverage test
+ - 2 1 2 1 100 0x8ac78f4e6aec091921cbdc891p-99 100 0x4a5f2972ea662e1cc0caebb81p-100 3 N N
mpc-1.1.0/tests/asinh.dat 0000644 0001751 0001751 00000014507 12426164730 012165 0000000 0000000 # Data file for mpc_asinh.
#
# Copyright (C) 2009 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP_RE OP_RE PREC_OP_IM OP_IM RND_RE RND_IM
#
# where op = op_re + i * op_im, rop = rop_re + i * rop_im,
# rop_re is ROP_RE rounded to nearest to the precision of PREC_ROP_RE
# rop_im is ROP_IM rounded to nearest to the precision of PREC_ROP_IM
# op_re is OP_RE rounded to nearest to the precision of PREC_OP_RE
# op_im is OP_IM rounded to nearest to the precision of PREC_OP_IM
# ROP_RE is checked against Re(asin op) rounded to the precision PREC_ROP_RE
# in the direction RND_RE
# ROP_IM is checked against Im(asin op) rounded to the precision PREC_ROP_IM
# in the direction RND_IM
# INEX_RE is the ternary value for the real part with the following notation:
# "?" ternary value not checked
# "+" if ROP_RE is greater than the exact mathematical result
# "0" if ROP_RE is exactly the mathematical result
# "-" if ROP_RE is less than the exact mathematical result
# (m.m. INEX_IM)
# rounding modes notation:
# "N" is rounding to nearest
# "Z" is rounding towards zero
# "U" is rounding towards plus infinity
# "D" is rounding towards minus infinity
# Use prefixes "0b" for values in base two, "0x" for values in base sixteen,
# no prefix for value in base ten.
# In all bases, "nan" is NaN, "inf" is infinity;
# The sign of the result is checked with "+inf", "-inf", "-0", or "+0".
# special values (following ISO C99 standard)
0 + 53 -inf 53 -0x1921FB54442D18p-53 53 -inf 53 -inf N N
0 0 53 -inf 53 -0 53 -inf 53 -1 N N
0 0 53 -inf 53 -0 53 -inf 53 -0 N N
0 0 53 -inf 53 +0 53 -inf 53 +0 N N
0 0 53 -inf 53 +0 53 -inf 53 +1 N N
0 - 53 -inf 53 0x1921FB54442D18p-53 53 -inf 53 +inf N N
0 0 53 -inf 53 nan 53 -inf 53 nan N N
0 + 53 -inf 53 -0x1921FB54442D18p-52 53 -6 53 -inf N N
0 - 53 -inf 53 0x1921FB54442D18p-52 53 -6 53 +inf N N
0 0 53 nan 53 nan 53 -6 53 nan N N
0 + 53 -inf 53 -0x1921FB54442D18p-52 53 -0 53 -inf N N
0 0 53 -0 53 -0 53 -0 53 -0 N N
0 0 53 -0 53 +0 53 -0 53 +0 N N
0 - 53 -inf 53 0x1921FB54442D18p-52 53 -0 53 +inf N N
0 0 53 nan 53 nan 53 -0 53 nan N N
0 + 53 +inf 53 -0x1921FB54442D18p-52 53 +0 53 -inf N N
0 0 53 +0 53 -0 53 +0 53 -0 N N
0 0 53 +0 53 +0 53 +0 53 +0 N N
0 - 53 +inf 53 0x1921FB54442D18p-52 53 +0 53 +inf N N
0 0 53 nan 53 nan 53 +0 53 nan N N
0 + 53 +inf 53 -0x1921FB54442D18p-52 53 +6 53 -inf N N
0 - 53 +inf 53 0x1921FB54442D18p-52 53 +6 53 +inf N N
0 0 53 nan 53 nan 53 +6 53 nan N N
0 + 53 +inf 53 -0x1921FB54442D18p-53 53 +inf 53 -inf N N
0 0 53 +inf 53 -0 53 +inf 53 -1 N N
0 0 53 +inf 53 -0 53 +inf 53 -0 N N
0 0 53 +inf 53 +0 53 +inf 53 +0 N N
0 0 53 +inf 53 +0 53 +inf 53 +1 N N
0 - 53 +inf 53 0x1921FB54442D18p-53 53 +inf 53 +inf N N
0 0 53 +inf 53 nan 53 +inf 53 nan N N
0 0 53 inf 53 nan 53 nan 53 -inf N N
0 0 53 nan 53 nan 53 nan 53 -1 N N
0 0 53 nan 53 -0 53 nan 53 -0 N N
0 0 53 nan 53 +0 53 nan 53 +0 N N
0 0 53 nan 53 nan 53 nan 53 +1 N N
0 0 53 inf 53 nan 53 nan 53 +inf N N
0 0 53 nan 53 nan 53 nan 53 nan N N
# pure real argument
+ 0 53 -0x131DC0090B63D8p-52 53 -0 53 -1.5 53 -0 N N
+ 0 53 -0x131DC0090B63D8p-52 53 +0 53 -1.5 53 +0 N N
- 0 53 -0x1C34366179D427p-53 53 -0 53 -1 53 -0 N N
- 0 53 -0x1C34366179D427p-53 53 +0 53 -1 53 +0 N N
- 0 53 -0x1ECC2CAEC5160Ap-54 53 -0 53 -0.5 53 -0 N N
- 0 53 -0x1ECC2CAEC5160Ap-54 53 +0 53 -0.5 53 +0 N N
+ 0 53 0x1ECC2CAEC5160Ap-54 53 -0 53 +0.5 53 -0 N N
+ 0 53 0x1ECC2CAEC5160Ap-54 53 +0 53 +0.5 53 +0 N N
+ 0 53 0x1C34366179D427p-53 53 -0 53 +1 53 -0 N N
+ 0 53 0x1C34366179D427p-53 53 +0 53 +1 53 +0 N N
- 0 53 0x131DC0090B63D8p-52 53 -0 53 +1.5 53 -0 N N
- 0 53 0x131DC0090B63D8p-52 53 +0 53 +1.5 53 +0 N N
# pure imaginary argument
- + 53 -0x1ECC2CAEC5160Ap-53 53 -0x1921FB54442D18p-52 53 -0 53 -1.5 N N
+ + 53 0x1ECC2CAEC5160Ap-53 53 -0x1921FB54442D18p-52 53 +0 53 -1.5 N N
0 + 53 -0 53 -0x1921FB54442D18p-52 53 -0 53 -1 N N
0 + 53 +0 53 -0x1921FB54442D18p-52 53 +0 53 -1 N N
0 - 53 -0 53 -0x10C152382D7366p-53 53 -0 53 -0.5 N N
0 - 53 +0 53 -0x10C152382D7366p-53 53 +0 53 -0.5 N N
0 + 53 -0 53 0x10C152382D7366p-53 53 -0 53 +0.5 N N
0 + 53 +0 53 0x10C152382D7366p-53 53 +0 53 +0.5 N N
0 - 53 -0 53 0x1921FB54442D18p-52 53 -0 53 +1 N N
0 - 53 +0 53 0x1921FB54442D18p-52 53 +0 53 +1 N N
- - 53 -0x1ECC2CAEC5160Ap-53 53 0x1921FB54442D18p-52 53 -0 53 +1.5 N N
+ - 53 0x1ECC2CAEC5160Ap-53 53 0x1921FB54442D18p-52 53 +0 53 +1.5 N N
# regular arguments
+ + 53 0x1E20C7792ECE6Bp-52 53 0x3526776219EEBp-52 53 0x3243F6A8885A3p-48 53 0x162E42FEFA39EFp-53 N N
mpc-1.1.0/tests/pow_fr.dsc 0000644 0001751 0001751 00000001574 12471661720 012361 0000000 0000000 # Description file for mpc_pow_fr
#
# Copyright (C) 2012 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_pow_fr
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpfr_srcptr
mpc_rnd_t
mpc-1.1.0/tests/fr_sub.dat 0000644 0001751 0001751 00000041340 12426164730 012336 0000000 0000000 # Data file for mpc_fr_sub.
#
# Copyright (C) 2008, 2012 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# For explanations on the file format, see add_fr.dat.
# special values
0 0 7 nan 7 +inf 7 -inf 7 -inf 7 -inf N N
0 0 7 nan 7 1 7 -inf 7 -inf 7 -1 N N
0 0 7 nan 7 +0 7 -inf 7 -inf 7 -0 N N
0 0 7 nan 7 -0 7 -inf 7 -inf 7 +0 N N
0 0 7 nan 7 -1 7 -inf 7 -inf 7 1 N N
0 0 7 nan 7 -inf 7 -inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 nan N N
0 0 7 -inf 7 +inf 7 -inf 7 -1 7 -inf N N
0 0 7 -inf 7 1 7 -inf 7 -1 7 -1 N N
0 0 7 -inf 7 +0 7 -inf 7 -1 7 -0 N N
0 0 7 -inf 7 -0 7 -inf 7 -1 7 +0 N N
0 0 7 -inf 7 -1 7 -inf 7 -1 7 1 N N
0 0 7 -inf 7 -inf 7 -inf 7 -1 7 +inf N N
0 0 7 -inf 7 nan 7 -inf 7 -1 7 nan N N
0 0 7 -inf 7 +inf 7 -inf 7 -0 7 -inf N N
0 0 7 -inf 7 1 7 -inf 7 -0 7 -1 N N
0 0 7 -inf 7 +0 7 -inf 7 -0 7 -0 N N
0 0 7 -inf 7 -0 7 -inf 7 -0 7 +0 N N
0 0 7 -inf 7 -1 7 -inf 7 -0 7 1 N N
0 0 7 -inf 7 -inf 7 -inf 7 -0 7 +inf N N
0 0 7 -inf 7 nan 7 -inf 7 -0 7 nan N N
0 0 7 -inf 7 +inf 7 -inf 7 +0 7 -inf N N
0 0 7 -inf 7 1 7 -inf 7 +0 7 -1 N N
0 0 7 -inf 7 +0 7 -inf 7 +0 7 -0 N N
0 0 7 -inf 7 -0 7 -inf 7 +0 7 +0 N N
0 0 7 -inf 7 -1 7 -inf 7 +0 7 1 N N
0 0 7 -inf 7 -inf 7 -inf 7 +0 7 +inf N N
0 0 7 -inf 7 nan 7 -inf 7 +0 7 nan N N
0 0 7 -inf 7 +inf 7 -inf 7 1 7 -inf N N
0 0 7 -inf 7 1 7 -inf 7 1 7 -1 N N
0 0 7 -inf 7 +0 7 -inf 7 1 7 -0 N N
0 0 7 -inf 7 -0 7 -inf 7 1 7 +0 N N
0 0 7 -inf 7 -1 7 -inf 7 1 7 1 N N
0 0 7 -inf 7 -inf 7 -inf 7 1 7 +inf N N
0 0 7 -inf 7 nan 7 -inf 7 1 7 nan N N
0 0 7 -inf 7 +inf 7 -inf 7 +inf 7 -inf N N
0 0 7 -inf 7 1 7 -inf 7 +inf 7 -1 N N
0 0 7 -inf 7 +0 7 -inf 7 +inf 7 -0 N N
0 0 7 -inf 7 -0 7 -inf 7 +inf 7 +0 N N
0 0 7 -inf 7 -1 7 -inf 7 +inf 7 1 N N
0 0 7 -inf 7 -inf 7 -inf 7 +inf 7 +inf N N
0 0 7 -inf 7 nan 7 -inf 7 +inf 7 nan N N
0 0 7 nan 7 +inf 7 -inf 7 nan 7 -inf N N
0 0 7 nan 7 1 7 -inf 7 nan 7 -1 N N
0 0 7 nan 7 +0 7 -inf 7 nan 7 -0 N N
0 0 7 nan 7 -0 7 -inf 7 nan 7 +0 N N
0 0 7 nan 7 -1 7 -inf 7 nan 7 1 N N
0 0 7 nan 7 -inf 7 -inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 nan N N
0 0 7 +inf 7 +inf 7 -1 7 -inf 7 -inf N N
0 0 7 +inf 7 1 7 -1 7 -inf 7 -1 N N
0 0 7 +inf 7 +0 7 -1 7 -inf 7 -0 N N
0 0 7 +inf 7 -0 7 -1 7 -inf 7 +0 N N
0 0 7 +inf 7 -1 7 -1 7 -inf 7 1 N N
0 0 7 +inf 7 -inf 7 -1 7 -inf 7 +inf N N
0 0 7 +inf 7 nan 7 -1 7 -inf 7 nan N N
0 0 7 0 7 +inf 7 -1 7 -1 7 -inf N N
0 0 7 0 7 -inf 7 -1 7 -1 7 +inf N N
0 0 7 0 7 nan 7 -1 7 -1 7 nan N N
0 0 7 -1 7 +inf 7 -1 7 -0 7 -inf N N
0 0 7 -1 7 -inf 7 -1 7 -0 7 +inf N N
0 0 7 -1 7 nan 7 -1 7 -0 7 nan N N
0 0 7 -1 7 +inf 7 -1 7 +0 7 -inf N N
0 0 7 -1 7 -inf 7 -1 7 +0 7 +inf N N
0 0 7 -1 7 nan 7 -1 7 +0 7 nan N N
0 0 7 -2 7 +inf 7 -1 7 1 7 -inf N N
0 0 7 -2 7 -inf 7 -1 7 1 7 +inf N N
0 0 7 -2 7 nan 7 -1 7 1 7 nan N N
0 0 7 -inf 7 +inf 7 -1 7 +inf 7 -inf N N
0 0 7 -inf 7 1 7 -1 7 +inf 7 -1 N N
0 0 7 -inf 7 +0 7 -1 7 +inf 7 -0 N N
0 0 7 -inf 7 -0 7 -1 7 +inf 7 +0 N N
0 0 7 -inf 7 -1 7 -1 7 +inf 7 1 N N
0 0 7 -inf 7 -inf 7 -1 7 +inf 7 +inf N N
0 0 7 -inf 7 nan 7 -1 7 +inf 7 nan N N
0 0 7 nan 7 +inf 7 -1 7 nan 7 -inf N N
0 0 7 nan 7 1 7 -1 7 nan 7 -1 N N
0 0 7 nan 7 +0 7 -1 7 nan 7 -0 N N
0 0 7 nan 7 -0 7 -1 7 nan 7 +0 N N
0 0 7 nan 7 -1 7 -1 7 nan 7 1 N N
0 0 7 nan 7 -inf 7 -1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 nan 7 nan N N
0 0 7 +inf 7 +inf 7 -0 7 -inf 7 -inf N N
0 0 7 +inf 7 1 7 -0 7 -inf 7 -1 N N
0 0 7 +inf 7 +0 7 -0 7 -inf 7 -0 N N
0 0 7 +inf 7 -0 7 -0 7 -inf 7 +0 N N
0 0 7 +inf 7 -1 7 -0 7 -inf 7 1 N N
0 0 7 +inf 7 -inf 7 -0 7 -inf 7 +inf N N
0 0 7 +inf 7 nan 7 -0 7 -inf 7 nan N N
0 0 7 1 7 +inf 7 -0 7 -1 7 -inf N N
0 0 7 1 7 -inf 7 -0 7 -1 7 +inf N N
0 0 7 1 7 nan 7 -0 7 -1 7 nan N N
0 0 7 0 7 +inf 7 -0 7 -0 7 -inf N N
0 0 7 0 7 -inf 7 -0 7 -0 7 +inf N N
0 0 7 0 7 nan 7 -0 7 -0 7 nan N N
0 0 7 -0 7 +inf 7 -0 7 +0 7 -inf N N
0 0 7 -0 7 -inf 7 -0 7 +0 7 +inf N N
0 0 7 -0 7 nan 7 -0 7 +0 7 nan N N
0 0 7 -1 7 +inf 7 -0 7 1 7 -inf N N
0 0 7 -1 7 -inf 7 -0 7 1 7 +inf N N
0 0 7 -1 7 nan 7 -0 7 1 7 nan N N
0 0 7 -inf 7 +inf 7 -0 7 +inf 7 -inf N N
0 0 7 -inf 7 1 7 -0 7 +inf 7 -1 N N
0 0 7 -inf 7 +0 7 -0 7 +inf 7 -0 N N
0 0 7 -inf 7 -0 7 -0 7 +inf 7 +0 N N
0 0 7 -inf 7 -1 7 -0 7 +inf 7 1 N N
0 0 7 -inf 7 -inf 7 -0 7 +inf 7 +inf N N
0 0 7 -inf 7 nan 7 -0 7 +inf 7 nan N N
0 0 7 nan 7 +inf 7 -0 7 nan 7 -inf N N
0 0 7 nan 7 1 7 -0 7 nan 7 -1 N N
0 0 7 nan 7 +0 7 -0 7 nan 7 -0 N N
0 0 7 nan 7 -0 7 -0 7 nan 7 +0 N N
0 0 7 nan 7 -1 7 -0 7 nan 7 1 N N
0 0 7 nan 7 -inf 7 -0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 nan 7 nan N N
0 0 7 +inf 7 +inf 7 +0 7 -inf 7 -inf N N
0 0 7 +inf 7 1 7 +0 7 -inf 7 -1 N N
0 0 7 +inf 7 +0 7 +0 7 -inf 7 -0 N N
0 0 7 +inf 7 -0 7 +0 7 -inf 7 +0 N N
0 0 7 +inf 7 -1 7 +0 7 -inf 7 1 N N
0 0 7 +inf 7 -inf 7 +0 7 -inf 7 +inf N N
0 0 7 +inf 7 nan 7 +0 7 -inf 7 nan N N
0 0 7 1 7 +inf 7 +0 7 -1 7 -inf N N
0 0 7 1 7 -inf 7 +0 7 -1 7 +inf N N
0 0 7 1 7 nan 7 +0 7 -1 7 nan N N
0 0 7 +0 7 +inf 7 +0 7 -0 7 -inf N N
0 0 7 +0 7 -inf 7 +0 7 -0 7 +inf N N
0 0 7 +0 7 nan 7 +0 7 -0 7 nan N N
0 0 7 0 7 +inf 7 +0 7 +0 7 -inf N N
0 0 7 0 7 -inf 7 +0 7 +0 7 +inf N N
0 0 7 0 7 nan 7 +0 7 +0 7 nan N N
0 0 7 -1 7 +inf 7 +0 7 1 7 -inf N N
0 0 7 -1 7 -inf 7 +0 7 1 7 +inf N N
0 0 7 -1 7 nan 7 +0 7 1 7 nan N N
0 0 7 -inf 7 +inf 7 +0 7 +inf 7 -inf N N
0 0 7 -inf 7 1 7 +0 7 +inf 7 -1 N N
0 0 7 -inf 7 +0 7 +0 7 +inf 7 -0 N N
0 0 7 -inf 7 -0 7 +0 7 +inf 7 +0 N N
0 0 7 -inf 7 -1 7 +0 7 +inf 7 1 N N
0 0 7 -inf 7 -inf 7 +0 7 +inf 7 +inf N N
0 0 7 -inf 7 nan 7 +0 7 +inf 7 nan N N
0 0 7 nan 7 +inf 7 +0 7 nan 7 -inf N N
0 0 7 nan 7 1 7 +0 7 nan 7 -1 N N
0 0 7 nan 7 +0 7 +0 7 nan 7 -0 N N
0 0 7 nan 7 -0 7 +0 7 nan 7 +0 N N
0 0 7 nan 7 -1 7 +0 7 nan 7 1 N N
0 0 7 nan 7 -inf 7 +0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 nan 7 nan N N
0 0 7 +inf 7 +inf 7 1 7 -inf 7 -inf N N
0 0 7 +inf 7 1 7 1 7 -inf 7 -1 N N
0 0 7 +inf 7 +0 7 1 7 -inf 7 -0 N N
0 0 7 +inf 7 -0 7 1 7 -inf 7 +0 N N
0 0 7 +inf 7 -1 7 1 7 -inf 7 1 N N
0 0 7 +inf 7 -inf 7 1 7 -inf 7 +inf N N
0 0 7 +inf 7 nan 7 1 7 -inf 7 nan N N
0 0 7 2 7 +inf 7 1 7 -1 7 -inf N N
0 0 7 2 7 -inf 7 1 7 -1 7 +inf N N
0 0 7 2 7 nan 7 1 7 -1 7 nan N N
0 0 7 1 7 +inf 7 1 7 -0 7 -inf N N
0 0 7 1 7 -inf 7 1 7 -0 7 +inf N N
0 0 7 1 7 nan 7 1 7 -0 7 nan N N
0 0 7 1 7 +inf 7 1 7 +0 7 -inf N N
0 0 7 1 7 -inf 7 1 7 +0 7 +inf N N
0 0 7 1 7 nan 7 1 7 +0 7 nan N N
0 0 7 0 7 +inf 7 1 7 1 7 -inf N N
0 0 7 0 7 -inf 7 1 7 1 7 +inf N N
0 0 7 0 7 nan 7 1 7 1 7 nan N N
0 0 7 -inf 7 +inf 7 1 7 +inf 7 -inf N N
0 0 7 -inf 7 1 7 1 7 +inf 7 -1 N N
0 0 7 -inf 7 +0 7 1 7 +inf 7 -0 N N
0 0 7 -inf 7 -0 7 1 7 +inf 7 +0 N N
0 0 7 -inf 7 -1 7 1 7 +inf 7 1 N N
0 0 7 -inf 7 -inf 7 1 7 +inf 7 +inf N N
0 0 7 -inf 7 nan 7 1 7 +inf 7 nan N N
0 0 7 nan 7 +inf 7 1 7 nan 7 -inf N N
0 0 7 nan 7 1 7 1 7 nan 7 -1 N N
0 0 7 nan 7 +0 7 1 7 nan 7 -0 N N
0 0 7 nan 7 -0 7 1 7 nan 7 +0 N N
0 0 7 nan 7 -1 7 1 7 nan 7 1 N N
0 0 7 nan 7 -inf 7 1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 1 7 nan 7 nan N N
0 0 7 +inf 7 +inf 7 +inf 7 -inf 7 -inf N N
0 0 7 +inf 7 1 7 +inf 7 -inf 7 -1 N N
0 0 7 +inf 7 +0 7 +inf 7 -inf 7 -0 N N
0 0 7 +inf 7 -0 7 +inf 7 -inf 7 +0 N N
0 0 7 +inf 7 -1 7 +inf 7 -inf 7 1 N N
0 0 7 +inf 7 -inf 7 +inf 7 -inf 7 +inf N N
0 0 7 +inf 7 nan 7 +inf 7 -inf 7 nan N N
0 0 7 +inf 7 +inf 7 +inf 7 -1 7 -inf N N
0 0 7 +inf 7 1 7 +inf 7 -1 7 -1 N N
0 0 7 +inf 7 +0 7 +inf 7 -1 7 -0 N N
0 0 7 +inf 7 -0 7 +inf 7 -1 7 +0 N N
0 0 7 +inf 7 -1 7 +inf 7 -1 7 1 N N
0 0 7 +inf 7 -inf 7 +inf 7 -1 7 +inf N N
0 0 7 +inf 7 nan 7 +inf 7 -1 7 nan N N
0 0 7 +inf 7 +inf 7 +inf 7 -0 7 -inf N N
0 0 7 +inf 7 1 7 +inf 7 -0 7 -1 N N
0 0 7 +inf 7 +0 7 +inf 7 -0 7 -0 N N
0 0 7 +inf 7 -0 7 +inf 7 -0 7 +0 N N
0 0 7 +inf 7 -1 7 +inf 7 -0 7 1 N N
0 0 7 +inf 7 -inf 7 +inf 7 -0 7 +inf N N
0 0 7 +inf 7 nan 7 +inf 7 -0 7 nan N N
0 0 7 +inf 7 +inf 7 +inf 7 +0 7 -inf N N
0 0 7 +inf 7 1 7 +inf 7 +0 7 -1 N N
0 0 7 +inf 7 +0 7 +inf 7 +0 7 -0 N N
0 0 7 +inf 7 -0 7 +inf 7 +0 7 +0 N N
0 0 7 +inf 7 -1 7 +inf 7 +0 7 1 N N
0 0 7 +inf 7 -inf 7 +inf 7 +0 7 +inf N N
0 0 7 +inf 7 nan 7 +inf 7 +0 7 nan N N
0 0 7 +inf 7 +inf 7 +inf 7 1 7 -inf N N
0 0 7 +inf 7 1 7 +inf 7 1 7 -1 N N
0 0 7 +inf 7 +0 7 +inf 7 1 7 -0 N N
0 0 7 +inf 7 -0 7 +inf 7 1 7 +0 N N
0 0 7 +inf 7 -1 7 +inf 7 1 7 1 N N
0 0 7 +inf 7 -inf 7 +inf 7 1 7 +inf N N
0 0 7 +inf 7 nan 7 +inf 7 1 7 nan N N
0 0 7 nan 7 +inf 7 +inf 7 +inf 7 -inf N N
0 0 7 nan 7 1 7 +inf 7 +inf 7 -1 N N
0 0 7 nan 7 +0 7 +inf 7 +inf 7 -0 N N
0 0 7 nan 7 -0 7 +inf 7 +inf 7 +0 N N
0 0 7 nan 7 -1 7 +inf 7 +inf 7 1 N N
0 0 7 nan 7 -inf 7 +inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 nan N N
0 0 7 nan 7 +inf 7 +inf 7 nan 7 -inf N N
0 0 7 nan 7 1 7 +inf 7 nan 7 -1 N N
0 0 7 nan 7 +0 7 +inf 7 nan 7 -0 N N
0 0 7 nan 7 -0 7 +inf 7 nan 7 +0 N N
0 0 7 nan 7 -1 7 +inf 7 nan 7 1 N N
0 0 7 nan 7 -inf 7 +inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 nan N N
0 0 7 nan 7 +inf 7 nan 7 -inf 7 -inf N N
0 0 7 nan 7 1 7 nan 7 -inf 7 -1 N N
0 0 7 nan 7 +0 7 nan 7 -inf 7 -0 N N
0 0 7 nan 7 -0 7 nan 7 -inf 7 +0 N N
0 0 7 nan 7 -1 7 nan 7 -inf 7 1 N N
0 0 7 nan 7 -inf 7 nan 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 nan N N
0 0 7 nan 7 +inf 7 nan 7 -1 7 -inf N N
0 0 7 nan 7 1 7 nan 7 -1 7 -1 N N
0 0 7 nan 7 +0 7 nan 7 -1 7 -0 N N
0 0 7 nan 7 -0 7 nan 7 -1 7 +0 N N
0 0 7 nan 7 -1 7 nan 7 -1 7 1 N N
0 0 7 nan 7 -inf 7 nan 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -1 7 nan N N
0 0 7 nan 7 +inf 7 nan 7 -0 7 -inf N N
0 0 7 nan 7 1 7 nan 7 -0 7 -1 N N
0 0 7 nan 7 +0 7 nan 7 -0 7 -0 N N
0 0 7 nan 7 -0 7 nan 7 -0 7 +0 N N
0 0 7 nan 7 -1 7 nan 7 -0 7 1 N N
0 0 7 nan 7 -inf 7 nan 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -0 7 nan N N
0 0 7 nan 7 +inf 7 nan 7 +0 7 -inf N N
0 0 7 nan 7 1 7 nan 7 +0 7 -1 N N
0 0 7 nan 7 +0 7 nan 7 +0 7 -0 N N
0 0 7 nan 7 -0 7 nan 7 +0 7 +0 N N
0 0 7 nan 7 -1 7 nan 7 +0 7 1 N N
0 0 7 nan 7 -inf 7 nan 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +0 7 nan N N
0 0 7 nan 7 +inf 7 nan 7 1 7 -inf N N
0 0 7 nan 7 1 7 nan 7 1 7 -1 N N
0 0 7 nan 7 +0 7 nan 7 1 7 -0 N N
0 0 7 nan 7 -0 7 nan 7 1 7 +0 N N
0 0 7 nan 7 -1 7 nan 7 1 7 1 N N
0 0 7 nan 7 -inf 7 nan 7 1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 1 7 nan N N
0 0 7 nan 7 +inf 7 nan 7 +inf 7 -inf N N
0 0 7 nan 7 1 7 nan 7 +inf 7 -1 N N
0 0 7 nan 7 +0 7 nan 7 +inf 7 -0 N N
0 0 7 nan 7 -0 7 nan 7 +inf 7 +0 N N
0 0 7 nan 7 -1 7 nan 7 +inf 7 1 N N
0 0 7 nan 7 -inf 7 nan 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 nan N N
0 0 7 nan 7 +inf 7 nan 7 nan 7 -inf N N
0 0 7 nan 7 1 7 nan 7 nan 7 -1 N N
0 0 7 nan 7 +0 7 nan 7 nan 7 -0 N N
0 0 7 nan 7 -0 7 nan 7 nan 7 +0 N N
0 0 7 nan 7 -1 7 nan 7 nan 7 1 N N
0 0 7 nan 7 -inf 7 nan 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 nan N N
# values with only 1, -1, +0, -0
0 0 7 0 7 1 7 -1 7 -1 7 -1 N N
0 0 7 0 7 +0 7 -1 7 -1 7 -0 N N
0 0 7 0 7 -0 7 -1 7 -1 7 +0 N N
0 0 7 0 7 -1 7 -1 7 -1 7 1 N N
0 0 7 -1 7 1 7 -1 7 -0 7 -1 N N
0 0 7 -1 7 +0 7 -1 7 -0 7 -0 N N
0 0 7 -1 7 -0 7 -1 7 -0 7 +0 N N
0 0 7 -1 7 -1 7 -1 7 -0 7 1 N N
0 0 7 -1 7 1 7 -1 7 +0 7 -1 N N
0 0 7 -1 7 +0 7 -1 7 +0 7 -0 N N
0 0 7 -1 7 -0 7 -1 7 +0 7 +0 N N
0 0 7 -1 7 -1 7 -1 7 +0 7 1 N N
0 0 7 -2 7 1 7 -1 7 1 7 -1 N N
0 0 7 -2 7 +0 7 -1 7 1 7 -0 N N
0 0 7 -2 7 -0 7 -1 7 1 7 +0 N N
0 0 7 -2 7 -1 7 -1 7 1 7 1 N N
0 0 7 1 7 1 7 -0 7 -1 7 -1 N N
0 0 7 1 7 +0 7 -0 7 -1 7 -0 N N
0 0 7 1 7 -0 7 -0 7 -1 7 +0 N N
0 0 7 1 7 -1 7 -0 7 -1 7 1 N N
0 0 7 0 7 1 7 -0 7 -0 7 -1 N N
0 0 7 0 7 +0 7 -0 7 -0 7 -0 N N
0 0 7 0 7 -0 7 -0 7 -0 7 +0 N N
0 0 7 0 7 -1 7 -0 7 -0 7 1 N N
0 0 7 -0 7 1 7 -0 7 +0 7 -1 N N
0 0 7 -0 7 +0 7 -0 7 +0 7 -0 N N
0 0 7 -0 7 -0 7 -0 7 +0 7 +0 N N
0 0 7 -0 7 -1 7 -0 7 +0 7 1 N N
0 0 7 -1 7 1 7 -0 7 1 7 -1 N N
0 0 7 -1 7 +0 7 -0 7 1 7 -0 N N
0 0 7 -1 7 -0 7 -0 7 1 7 +0 N N
0 0 7 -1 7 -1 7 -0 7 1 7 1 N N
0 0 7 1 7 1 7 +0 7 -1 7 -1 N N
0 0 7 1 7 +0 7 +0 7 -1 7 -0 N N
0 0 7 1 7 -0 7 +0 7 -1 7 +0 N N
0 0 7 1 7 -1 7 +0 7 -1 7 1 N N
0 0 7 +0 7 1 7 +0 7 -0 7 -1 N N
0 0 7 +0 7 +0 7 +0 7 -0 7 -0 N N
0 0 7 +0 7 -0 7 +0 7 -0 7 +0 N N
0 0 7 +0 7 -1 7 +0 7 -0 7 1 N N
0 0 7 0 7 1 7 +0 7 +0 7 -1 N N
0 0 7 0 7 +0 7 +0 7 +0 7 -0 N N
0 0 7 0 7 -0 7 +0 7 +0 7 +0 N N
0 0 7 0 7 -1 7 +0 7 +0 7 1 N N
0 0 7 -1 7 1 7 +0 7 1 7 -1 N N
0 0 7 -1 7 +0 7 +0 7 1 7 -0 N N
0 0 7 -1 7 -0 7 +0 7 1 7 +0 N N
0 0 7 -1 7 -1 7 +0 7 1 7 1 N N
0 0 7 2 7 1 7 1 7 -1 7 -1 N N
0 0 7 2 7 +0 7 1 7 -1 7 -0 N N
0 0 7 2 7 -0 7 1 7 -1 7 +0 N N
0 0 7 2 7 -1 7 1 7 -1 7 1 N N
0 0 7 1 7 1 7 1 7 -0 7 -1 N N
0 0 7 1 7 +0 7 1 7 -0 7 -0 N N
0 0 7 1 7 -0 7 1 7 -0 7 +0 N N
0 0 7 1 7 -1 7 1 7 -0 7 1 N N
0 0 7 1 7 1 7 1 7 +0 7 -1 N N
0 0 7 1 7 +0 7 1 7 +0 7 -0 N N
0 0 7 1 7 -0 7 1 7 +0 7 +0 N N
0 0 7 1 7 -1 7 1 7 +0 7 1 N N
0 0 7 0 7 1 7 1 7 1 7 -1 N N
0 0 7 0 7 +0 7 1 7 1 7 -0 N N
0 0 7 0 7 -0 7 1 7 1 7 +0 N N
0 0 7 0 7 -1 7 1 7 1 7 1 N N
# inexact return values
- - 2 -8 2 -8 3 1 3 8 3 7 D D
- - 2 -8 2 -8 3 1 3 8 3 7 N N
+ + 2 -6 2 -6 3 1 3 8 3 7 U U
+ + 2 -6 2 -6 3 1 3 8 3 7 Z Z
mpc-1.1.0/tests/div_2si.dsc 0000644 0001751 0001751 00000001545 12471661720 012422 0000000 0000000 # Description file for mpc_div_2si
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_div_2si
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
unsigned long int
mpc_rnd_t
mpc-1.1.0/tests/tmul_ui.c 0000644 0001751 0001751 00000002265 12471661720 012212 0000000 0000000 /* tmul_ui -- test file for mpc_mul_ui.
Copyright (C) 2002, 2005, 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_mul_ui (P[1].mpc, P[2].mpc, P[3].si, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_mul_ui (P[1].mpc, P[1].mpc, P[3].si, P[4].mpc_rnd)
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
tgeneric_template ("mul_ui.dsc", 2, 1024, 7, 1024);
test_end ();
return 0;
}
mpc-1.1.0/tests/print_parameter.c 0000644 0001751 0001751 00000010311 12471661720 013717 0000000 0000000 /* print_parameter.c -- Helper function for parameter printing.
Copyright (C) 2012, 2013, 2014 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
static const char *mpfr_rnd_mode [] =
{ "MPFR_RNDN", "MPFR_RNDZ", "MPFR_RNDU", "MPFR_RNDD" };
const char *mpc_rnd_mode[] =
{ "MPC_RNDNN", "MPC_RNDZN", "MPC_RNDUN", "MPC_RNDDN",
"undefined", "undefined", "undefined", "undefined", "undefined",
"undefined", "undefined", "undefined", "undefined", "undefined",
"undefined", "undefined",
"MPC_RNDNZ", "MPC_RNDZZ", "MPC_RNDUZ", "MPC_RNDDZ",
"undefined", "undefined", "undefined", "undefined", "undefined",
"undefined", "undefined", "undefined", "undefined", "undefined",
"undefined", "undefined",
"MPC_RNDNU", "MPC_RNDZU", "MPC_RNDUU", "MPC_RNDDU",
"undefined", "undefined", "undefined", "undefined", "undefined",
"undefined", "undefined", "undefined", "undefined", "undefined",
"undefined", "undefined",
"MPC_RNDND", "MPC_RNDZD", "MPC_RNDUD", "MPC_RNDDD",
"undefined", "undefined", "undefined", "undefined", "undefined",
"undefined", "undefined", "undefined", "undefined", "undefined",
"undefined", "undefined",
};
/* needed in tio_str.c and tstrtoc.c, so not static */
#define MPFR_INEX_STR(inex) \
(inex) == TERNARY_NOT_CHECKED ? "?" \
: (inex) == +1 ? "+1" \
: (inex) == -1 ? "-1" : "0"
void
print_parameter (mpc_fun_param_t* params, int index)
{
switch (params->T[index])
{
case NATIVE_INT:
printf ("= %d\n", params->P[index].i);
break;
case NATIVE_UL:
printf ("= %lu\n", params->P[index].ui);
break;
case NATIVE_L:
printf ("= %ld\n", params->P[index].si);
break;
case NATIVE_D:
printf ("= %e\n", params->P[index].d);
break;
case GMP_Z:
gmp_printf ("= %Zd\n", params->P[index].mpz);
break;
case GMP_Q:
gmp_printf ("= %Qd\n", params->P[index].mpq);
break;
case GMP_F:
gmp_printf ("= %Fe\n", params->P[index].mpf);
break;
case MPFR_INEX:
printf (" ternary value = %s\n",
MPFR_INEX_STR (params->P[index].mpfr_inex));
break;
case MPFR:
printf ("[%lu]=",
(unsigned long int) mpfr_get_prec (params->P[index].mpfr));
mpfr_out_str (stdout, 2, 0, params->P[index].mpfr, GMP_RNDN);
printf ("\n");
break;
case MPC_INEX:
if (index >= params->nbout + params->nbin)
printf (" ternary value = (%s, %s)\n",
MPFR_INEX_STR (params->P[index].mpc_inex_data.real),
MPFR_INEX_STR (params->P[index].mpc_inex_data.imag));
else
printf (" ternary value = %s\n", MPC_INEX_STR (params->P[index].mpc_inex));
break;
case MPC:
printf ("[%lu,%lu]=",
(unsigned long int) MPC_PREC_RE (params->P[index].mpc),
(unsigned long int) MPC_PREC_IM (params->P[index].mpc));
mpc_out_str (stdout, 2, 0, params->P[index].mpc, MPC_RNDNN);
printf ("\n");
break;
case MPFR_RND:
printf ("(rounding mode): %s\n",
mpfr_rnd_mode[params->P[index].mpfr_rnd]);
break;
case MPC_RND:
printf ("(rounding mode): %s\n",
mpc_rnd_mode[params->P[index].mpc_rnd]);
break;
case MPCC_INEX:
printf (" double ternary value = %s, %s\n",
MPC_INEX_STR (MPC_INEX1 (params->P[index].mpcc_inex)),
MPC_INEX_STR (MPC_INEX2 (params->P[index].mpcc_inex))
);
break;
default:
fprintf (stderr, "print_parameter: unsupported type.\n");
exit (1);
}
}
mpc-1.1.0/tests/pow_d.dsc 0000644 0001751 0001751 00000001565 12471661720 012175 0000000 0000000 # Description file for mpc_pow_d
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_pow_d
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
double
mpc_rnd_t
mpc-1.1.0/tests/sqr.dat 0000644 0001751 0001751 00000023604 12720536532 011666 0000000 0000000 # Data file for mpc_sqr.
#
# Copyright (C) 2008, 2010, 2012 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP_RE OP_RE PREC_OP_IM OP_IM RND_RE RND_IM
#
# see sin.dat for precisions
# special values (following ISO C99 standard)
0 0 53 nan 53 +inf 53 -inf 53 -inf N N
0 0 53 +inf 53 +inf 53 -inf 53 -1 N N
0 0 53 +inf 53 nan 53 -inf 53 -0 N N
0 0 53 +inf 53 nan 53 -inf 53 +0 N N
0 0 53 +inf 53 -inf 53 -inf 53 +1 N N
0 0 53 nan 53 -inf 53 -inf 53 +inf N N
0 0 53 nan 53 nan 53 -inf 53 nan N N
0 0 53 -inf 53 +inf 53 -1 53 -inf N N
0 0 53 +1 53 +0 53 -1 53 -0 N N
0 0 53 +1 53 -0 53 -1 53 +0 N N
0 0 53 -inf 53 -inf 53 -1 53 +inf N N
0 0 53 nan 53 nan 53 -1 53 nan N N
0 0 53 -inf 53 nan 53 -0 53 -inf N N
0 0 53 -1 53 +0 53 -0 53 -1 N N
0 0 53 0 53 +0 53 -0 53 -0 N N
0 0 53 0 53 -0 53 -0 53 +0 N N
0 0 53 -1 53 -0 53 -0 53 +1 N N
0 0 53 -inf 53 nan 53 -0 53 +inf N N
0 0 53 nan 53 nan 53 -0 53 nan N N
0 0 53 -inf 53 nan 53 +0 53 -inf N N
0 0 53 -1 53 -0 53 +0 53 -1 N N
0 0 53 0 53 -0 53 +0 53 -0 N N
0 0 53 0 53 +0 53 +0 53 +0 N N
0 0 53 -1 53 +0 53 +0 53 +1 N N
0 0 53 -inf 53 nan 53 +0 53 +inf N N
0 0 53 nan 53 nan 53 +0 53 nan N N
0 0 53 -inf 53 -inf 53 +1 53 -inf N N
0 0 53 +1 53 -0 53 +1 53 -0 N N
0 0 53 +1 53 +0 53 +1 53 +0 N N
0 0 53 -inf 53 +inf 53 +1 53 +inf N N
0 0 53 nan 53 nan 53 +1 53 nan N N
0 0 53 nan 53 -inf 53 +inf 53 -inf N N
0 0 53 +inf 53 -inf 53 +inf 53 -1 N N
0 0 53 +inf 53 nan 53 +inf 53 -0 N N
0 0 53 +inf 53 nan 53 +inf 53 +0 N N
0 0 53 +inf 53 +inf 53 +inf 53 +1 N N
0 0 53 nan 53 +inf 53 +inf 53 +inf N N
0 0 53 nan 53 nan 53 +inf 53 nan N N
0 0 53 nan 53 nan 53 nan 53 -inf N N
0 0 53 nan 53 nan 53 nan 53 -1 N N
0 0 53 nan 53 nan 53 nan 53 -0 N N
0 0 53 nan 53 nan 53 nan 53 +0 N N
0 0 53 nan 53 nan 53 nan 53 +1 N N
0 0 53 nan 53 nan 53 nan 53 +inf N N
0 0 53 nan 53 nan 53 nan 53 nan N N
# pure real argument
+ 0 53 0x12345676543230p+52 2 +0 53 0x1111111000000f 17 +0 N N
- 0 53 0x1234567654322fp+52 3 -0 54 -0x1111111000000f 16 +0 Z N
+ 0 53 0x12345676543230p+52 4 -0 55 0x1111111000000f 15 -0 U N
- 0 53 0x1234567654322fp+52 5 +0 56 -0x1111111000000f 14 -0 D N
- 0 53 0x1234567654322fp+52 6 +0 57 0x1111111000000f 13 +0 Z Z
+ 0 53 0x12345676543230p+52 7 -0 58 -0x1111111000000f 12 +0 U Z
- 0 53 0x1234567654322fp+52 8 -0 59 0x1111111000000f 11 -0 D Z
+ 0 53 0x12345676543230p+52 9 +0 60 -0x1111111000000f 10 -0 N Z
+ 0 53 0x12345676543230p+52 10 +0 61 0x1111111000000f 9 +0 U U
- 0 53 0x1234567654322fp+52 11 -0 62 -0x1111111000000f 8 +0 D U
+ 0 53 0x12345676543230p+52 12 -0 63 0x1111111000000f 7 -0 N U
- 0 53 0x1234567654322fp+52 13 +0 64 -0x1111111000000f 6 -0 Z U
- 0 53 0x1234567654322fp+52 14 +0 65 0x1111111000000f 5 +0 D D
+ 0 53 0x12345676543230p+52 15 -0 66 -0x1111111000000f 4 +0 N D
- 0 53 0x1234567654322fp+52 16 -0 67 0x1111111000000f 3 -0 Z D
+ 0 53 0x12345676543230p+52 17 +0 68 -0x1111111000000f 2 -0 U D
# pure imaginary argument
- 0 53 -0xE1000002000000p+56 53 +0 53 +0 53 0xf0000001111111 N N
+ 0 53 -0xe1000001fffff8p+56 52 -0 51 -0 54 0xf0000001111111 Z N
+ 0 53 -0xe1000001fffff8p+56 51 -0 49 +0 55 -0xf0000001111111 U N
- 0 53 -0xe1000002000000p+56 50 +0 47 -0 56 -0xf0000001111111 D N
+ 0 53 -0xe1000001fffff8p+56 49 +0 45 +0 57 0xf0000001111111 Z Z
+ 0 53 -0xe1000001fffff8p+56 48 -0 43 -0 58 0xf0000001111111 U Z
- 0 53 -0xe1000002000000p+56 47 -0 41 +0 59 -0xf0000001111111 D Z
- 0 53 -0xe1000002000000p+56 46 +0 39 -0 60 -0xf0000001111111 N Z
+ 0 53 -0xe1000001fffff8p+56 45 +0 37 +0 61 0xf0000001111111 U U
- 0 53 -0xe1000002000000p+56 44 -0 35 -0 62 0xf0000001111111 D U
- 0 53 -0xe1000002000000p+56 43 -0 33 +0 63 -0xf0000001111111 N U
+ 0 53 -0xe1000001fffff8p+56 42 +0 31 -0 64 -0xf0000001111111 Z U
- 0 53 -0xe1000002000000p+56 41 +0 29 +0 65 0xf0000001111111 D D
- 0 53 -0xe1000002000000p+56 40 -0 27 -0 66 0xf0000001111111 N D
+ 0 53 -0xe1000001fffff8p+56 39 -0 25 +0 67 -0xf0000001111111 Z D
+ 0 53 -0xe1000001fffff8p+56 38 +0 23 -0 68 -0xf0000001111111 U D
# IEEE-754 double precision
- + 53 0x10000000020000p+04 53 0x10000000effff 53 0x400008000180fp-22 53 0x7ffff0077efcbp-32 N N
- - 53 0x3ffffffffffffd 53 0x7ffffffffffff4p+52 53 0x1fffffffffffff 53 0x1ffffffffffffe Z N
+ + 53 0x1c16e5d4c4d5e7p-45 53 -0x7ffffff800007p-47 53 0xf 53 -0x1111111000000fp-53 U N
- + 53 0xfdbac097c8dc50p+2096 53 0x7f6e5d4c3b2a2p+1036 53 0xfedcba9876543p+1024 53 0x10000000000001p-42 D N
+ - 53 -0x10000000020000p+04 53 0x10000000efffefp-04 53 0x7ffff0077efcbp-32 53 0x400008000180fp-22 Z Z
+ + 53 0x3ffffffffffffe 53 -0x7ffffffffffff4p+52 53 0x1fffffffffffff 53 -0x1ffffffffffffe U Z
- - 53 0xe0b72ea626af3p-44 53 0x7ffffff800007p-47 53 0xf 53 0x1111111000000fp-53 D Z
- - 53 -0xfdbac097c8dc58p+2096 53 0x7f6e5d4c3b2a1cp+1032 53 -0x10000000000001p-42 53 -0xfedcba9876543p+1024 N Z
+ + 53 0x10000000020001p+04 53 -0x10000000efffefp-04 53 0x400008000180fp-22 53 -0x7ffff0077efcbp-32 U U
- + 53 -0x3ffffffffffffe 53 -0x7ffffffffffff4p+52 53 -0x1ffffffffffffe 53 0x1fffffffffffff D U
- + 53 -0x1C16E5D4C4D5E7p-45 53 0x1ffffffe00001dp-49 53 -0x1111111000000fp-53 53 -0xf N U
+ + 53 -0xfdbac097c8dc50p+2096 53 -0x7f6e5d4c3b2a1cp+1032 53 0x10000000000001p-42 53 -0xfedcba9876543p+1024 Z U
- - 53 -0x10000000020001p+04 53 -0x10000000effff 53 -0x7ffff0077efcbp-32 53 0x400008000180fp-22 D D
- - 53 0x3ffffffffffffd 53 -0x7ffffffffffff8p+52 53 -0x1fffffffffffff 53 0x1ffffffffffffe N D
+ - 53 -0xE0B72EA626AF3p-44 53 -0x1FFFFFFE00001Dp-49 53 0x1111111000000fp-53 53 -0xf Z D
+ - 53 0xfdbac097c8dc58p+2096 53 -0x7f6e5d4c3b2a2p+1036 53 -0xfedcba9876543p+1024 53 0x10000000000001p-42 U D
# improve test coverage:
# For op=x+i*y, we need a case where x+y and x-y are inexact at the
# higher computing precision, and where x and y do not have too
# distinct exponents so that Karatsuba gets triggered...
# (2^44 + i*(2^29 + 1))^2 \approx (2^88-2^58) + i*2^45*(2^29+1)
+ 0 30 309485009533114692573069312 30 18889465966662952943616 30 17592186044416 30 536870913 N N
# ...and a case where x+y or x-y are 0.
0 0 4 0 4 2 4 1 4 1 N N
# a few values, previously hard-coded in tsqr.c
0 0 8 7 8 24 8 4 8 3 N N
+ + 8 0b1.1000111e-3 8 0b1.1100111e-3 27 0b1.11111011011000010101000000e-2 27 0b1.11010001010110111001110001e-3 N N
# bug 20090930, infinite loop
+ + 3464 inf 3464 inf 866 -0x2.5763c6519ef1510f8afa101a210b8030b1909cc17004db561a25d9b53e2c08c41c01e8bbac5af6299b9d8786030aa14943d841798c8c369287942e4d4cec42a60ab0922af931159805e631128e97f973754ad53972d5d320a651a3b4a667f0ef2b92dbd698d159c3642675140@192158913 866 -0xd.15f2d530934dd930d66e89d70762d2337a8f973dd6915eb6b532fd372fcc955df1d852632d4e46fe64154ceda991a1302caf1b0ec622497e3e5724dd05b1c89a06e28d7e18e8af58f5ff4c9998cb31714688867524f41e0b31e847c1bf40de5127f858069998efd7c3e599080@192158893 N N
# bug 20091001, infinite loop
? + 2256 0 2256 -0 564 0xc.87999bfd1cb1a64288881e214b7cf1af979863b23c030b79c4a8bebb39177967608388a2e4df527977e7755a25df8af8f72fdd6dd2f42bd00de83088b4e9b59ce85caf2e6b0c0@-184298749 564 -0x2.5109af459d4daf357e09475ec991cdc9b02c8f7dfacdc060d2a24710d09c997f8aea6dbd46f10828c30b583fdcc90d7dcbb895689d594d3813db40784d2309e450d1fb6e38da8@-184298726 N N
# (x+x*i)^2 = 0+2*x^2*i with exact real part
0 0 100 0 100 304831530559368 100 12345678 100 12345678 N N
0 0 1000 0 100 304831530559368 100 12345678 100 12345678 N N
# intermediate overflow- and underflows
0 + 100 0 100 +inf 100 0x1@225000750 100 0x1@225000750 N N
0 + 10000 0 10000 +inf 100 0x1@225000750 100 0x1@225000750 N N
0 - 100 0 100 +0 100 0x1@-225000750 100 0x1@-225000750 N N
0 + 100 0 100 -0 100 0x1@-225000750 100 -0x1@-225000750 N N
0 - 10000 0 10000 +0 100 0x1@-225000750 100 0x1@-225000750 N N
0 + 10000 0 10000 -0 100 0x1@-225000750 100 -0x1@-225000750 N N
# intermediate overflow in Karatsuba found by hydra, simplified test case
- - 100 -inf 100 -inf 593 -0xf@192058806 593 0x1@192058873 N N
# another interesting one with not exactly the same behaviour
- - 100 -inf 100 -inf 100 -0xf@192058806 100 0x1@192058873 N N
0 + 100 0 100 inf 100 0x1@192058806 100 0x1@192058806 N N
# Re(op)*Im(op) can be computed, but multiplication by 2 triggers overflow
0 + 100 0 100 inf 100 0b1@536870911 100 0b1@536870911 N N
0 - 10 0 10 0b1.111111111e1073741820 100 0b1@536870911 100 0b1@536870911 N D
0 - 10 0 10 0b1.111111111e1073741820 100 0b1@536870912 100 0b1@536870912 N D
0 0 10 0 10 0b1e-1073741821 100 0b1@-536870911 100 0b1@-536870911 N N
0 - 10 0 10 0 100 0b1@-536870913 100 0b1@-536870913 N N
0 + 10 0 10 0b1@-1073741822 100 0b1@-536870912 100 0b1@-536870912 N U
+ - 10 0b1e-1073741822 10 0 100 0b1@-536870911 100 0b1@-536870912 N N
mpc-1.1.0/tests/asin.dat 0000644 0001751 0001751 00000016110 12471661720 012006 0000000 0000000 # Data file for mpc_asin.
#
# Copyright (C) 2009, 2011, 2013, 2014 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP_RE OP_RE PREC_OP_IM OP_IM RND_RE RND_IM
#
# where op = op_re + i * op_im, rop = rop_re + i * rop_im,
# rop_re is ROP_RE rounded to nearest to the precision of PREC_ROP_RE
# rop_im is ROP_IM rounded to nearest to the precision of PREC_ROP_IM
# op_re is OP_RE rounded to nearest to the precision of PREC_OP_RE
# op_im is OP_IM rounded to nearest to the precision of PREC_OP_IM
# ROP_RE is checked against Re(asin op) rounded to the precision PREC_ROP_RE
# in the direction RND_RE
# ROP_IM is checked against Im(asin op) rounded to the precision PREC_ROP_IM
# in the direction RND_IM
# INEX_RE is the ternary value for the real part with the following notation:
# "?" ternary value not checked
# "+" if ROP_RE is greater than the exact mathematical result
# "0" if ROP_RE is exactly the mathematical result
# "-" if ROP_RE is less than the exact mathematical result
# (m.m. INEX_IM)
# rounding modes notation:
# "N" is rounding to nearest
# "Z" is rounding towards zero
# "U" is rounding towards plus infinity
# "D" is rounding towards minus infinity
# Use prefixes "0b" for values in base two, "0x" for values in base sixteen,
# no prefix for value in base ten.
# In all bases, "nan" is NaN, "inf" is infinity;
# The sign of the result is checked with "+inf", "-inf", "-0", or "+0".
# special values (following ISO C99 standard)
+ 0 53 -0x1921FB54442D18p-53 53 -inf 53 -inf 53 -inf N N
+ 0 53 -0x1921FB54442D18p-52 53 -inf 53 -inf 53 -1 N N
+ 0 53 -0x1921FB54442D18p-52 53 -inf 53 -inf 53 -0 N N
+ 0 53 -0x1921FB54442D18p-52 53 +inf 53 -inf 53 +0 N N
+ 0 53 -0x1921FB54442D18p-52 53 +inf 53 -inf 53 +1 N N
+ 0 53 -0x1921FB54442D18p-53 53 +inf 53 -inf 53 +inf N N
0 0 53 nan 53 inf 53 -inf 53 nan N N
0 0 53 -0 53 -inf 53 -6 53 -inf N N
0 0 53 -0 53 +inf 53 -6 53 +inf N N
0 0 53 nan 53 nan 53 -6 53 nan N N
0 0 53 -0 53 -inf 53 -0.5 53 -inf N N
0 0 53 -0 53 +inf 53 -0.5 53 +inf N N
0 0 53 nan 53 nan 53 -0.5 53 nan N N
0 0 53 -0 53 -inf 53 -0 53 -inf N N
0 0 53 -0 53 -0 53 -0 53 -0 N N
0 0 53 -0 53 +0 53 -0 53 +0 N N
0 0 53 -0 53 +inf 53 -0 53 +inf N N
0 0 53 -0 53 nan 53 -0 53 nan N N
0 0 53 +0 53 -inf 53 +0 53 -inf N N
0 0 53 +0 53 -0 53 +0 53 -0 N N
0 0 53 +0 53 +0 53 +0 53 +0 N N
0 0 53 +0 53 +inf 53 +0 53 +inf N N
0 0 53 +0 53 nan 53 +0 53 nan N N
0 0 53 +0 53 -inf 53 +0.5 53 -inf N N
0 0 53 +0 53 +inf 53 +0.5 53 +inf N N
0 0 53 nan 53 nan 53 +0.5 53 nan N N
0 0 53 +0 53 -inf 53 +6 53 -inf N N
0 0 53 +0 53 +inf 53 +6 53 +inf N N
0 0 53 nan 53 nan 53 +6 53 nan N N
- 0 53 0x1921FB54442D18p-53 53 -inf 53 +inf 53 -inf N N
- 0 53 0x1921FB54442D18p-52 53 -inf 53 +inf 53 -1 N N
- 0 53 0x1921FB54442D18p-52 53 -inf 53 +inf 53 -0 N N
- 0 53 0x1921FB54442D18p-52 53 +inf 53 +inf 53 +0 N N
- 0 53 0x1921FB54442D18p-52 53 +inf 53 +inf 53 +1 N N
- 0 53 0x1921FB54442D18p-53 53 +inf 53 +inf 53 +inf N N
0 0 53 nan 53 inf 53 +inf 53 nan N N
0 0 53 nan 53 -inf 53 nan 53 -inf N N
0 0 53 nan 53 nan 53 nan 53 -1 N N
0 0 53 nan 53 nan 53 nan 53 -0 N N
0 0 53 nan 53 nan 53 nan 53 +0 N N
0 0 53 nan 53 nan 53 nan 53 +1 N N
0 0 53 nan 53 +inf 53 nan 53 +inf N N
0 0 53 nan 53 nan 53 nan 53 nan N N
# pure real argument
+ - 53 -0x1921FB54442D18p-52 53 -0x1ECC2CAEC5160Ap-53 53 -1.5 53 -0 N N
+ + 53 -0x1921FB54442D18p-52 53 0x1ECC2CAEC5160Ap-53 53 -1.5 53 +0 N N
+ 0 53 -0x1921FB54442D18p-52 53 -0 53 -1 53 -0 N N
+ 0 53 -0x1921FB54442D18p-52 53 +0 53 -1 53 +0 N N
- 0 53 -0x10C152382D7366p-53 53 -0 53 -0.5 53 -0 N N
- 0 53 -0x10C152382D7366p-53 53 +0 53 -0.5 53 +0 N N
+ 0 53 0x10C152382D7366p-53 53 -0 53 +0.5 53 -0 N N
+ 0 53 0x10C152382D7366p-53 53 +0 53 +0.5 53 +0 N N
- 0 53 0x1921FB54442D18p-52 53 -0 53 +1 53 -0 N N
- 0 53 0x1921FB54442D18p-52 53 +0 53 +1 53 +0 N N
- - 53 0x1921FB54442D18p-52 53 -0x1ECC2CAEC5160Ap-53 53 +1.5 53 -0 N N
- + 53 0x1921FB54442D18p-52 53 0x1ECC2CAEC5160Ap-53 53 +1.5 53 +0 N N
# pure imaginary argument
0 + 53 -0 53 -0x131DC0090B63D8p-52 53 -0 53 -1.5 N N
0 + 53 +0 53 -0x131DC0090B63D8p-52 53 +0 53 -1.5 N N
0 - 53 -0 53 -0x1C34366179D427p-53 53 -0 53 -1 N N
0 - 53 +0 53 -0x1C34366179D427p-53 53 +0 53 -1 N N
0 - 53 -0 53 -0x1ECC2CAEC5160Ap-54 53 -0 53 -0.5 N N
0 - 53 +0 53 -0x1ECC2CAEC5160Ap-54 53 +0 53 -0.5 N N
0 + 53 -0 53 0x1ECC2CAEC5160Ap-54 53 -0 53 +0.5 N N
0 + 53 +0 53 0x1ECC2CAEC5160Ap-54 53 +0 53 +0.5 N N
0 + 53 -0 53 0x1C34366179D427p-53 53 -0 53 +1 N N
0 + 53 +0 53 0x1C34366179D427p-53 53 +0 53 +1 N N
0 - 53 -0 53 0x131DC0090B63D8p-52 53 -0 53 +1.5 N N
0 - 53 +0 53 0x131DC0090B63D8p-52 53 +0 53 +1.5 N N
# IEEE-754 double precision and other precisions
+ - 53 0x189BF9EC7FCD5Bp-54 53 0x1206ECFA94614Bp-50 53 17 53 42 N N
- + 2 1.5 2 6 2 96 2 0x1p-8 N N
- - 8 0xC9p-7 8 0x15p-2 2 96 2 0x1p-8 N N
# special cases 1 + i*y with tiny y
- - 53 0x3243f6a8885a3p-49 53 0x1p-500 53 1 53 0x1p-1000 N N
- + 53 0x3243f6a8885a3p-49 53 -0x1p-500 53 1 53 -0x1p-1000 N N
- - 11 0xc9p-7 11 0xb5p-28 11 1 11 0x1p-41 N N
- + 53 0x3243f6a8885a3p-49 53 0x16a09e667f3bcdp-552 53 1 53 0x1p-999 N N
- + 2 1.5 2 0x1p-40 2 1 20 0xff802p-100 N N
mpc-1.1.0/tests/abs.dsc 0000644 0001751 0001751 00000001551 12471661720 011625 0000000 0000000 # Description file for mpc_abs
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_abs
RETURN:
mpfr_inex
OUTPUT:
mpfr_ptr
INPUT:
mpc_srcptr
mpfr_rnd_t
mpc-1.1.0/tests/tabs.c 0000644 0001751 0001751 00000002115 12471661720 011457 0000000 0000000 /* tabs -- test file for mpc_abs.
Copyright (C) 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpfr_inex = mpc_abs (P[1].mpfr, P[2].mpc, P[3].mpfr_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("abs.dsc", "abs.dat");
tgeneric_template ("abs.dsc", 2, 1024, 1, 1024);
test_end ();
return 0;
}
mpc-1.1.0/tests/cos.dsc 0000644 0001751 0001751 00000001503 12471661720 011641 0000000 0000000 # Description file for mpc_cos
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_cos
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/tfma.c 0000644 0001751 0001751 00000007176 12471661720 011471 0000000 0000000 /* tfma -- test file for mpc_fma.
Copyright (C) 2011, 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
static void
cmpfma (mpc_srcptr a, mpc_srcptr b, mpc_srcptr c, mpc_rnd_t rnd)
/* computes a*b+c with the naive and fast functions using the rounding
mode rnd and compares the results and return values.
In our current test suite, all input precisions are the same, and we
use this precision also for the result.
*/
{
mpc_t z, t;
int inex_z, inex_t;
mpc_init2 (z, MPC_MAX_PREC (a));
mpc_init2 (t, MPC_MAX_PREC (a));
inex_z = mpc_fma_naive (z, a, b, c, rnd);
inex_t = mpc_fma (t, a, b, c, rnd);
if (mpc_cmp (z, t) != 0 || inex_z != inex_t) {
fprintf (stderr, "fma_naive and fma differ for rnd=(%s,%s)\n",
mpfr_print_rnd_mode(MPC_RND_RE(rnd)),
mpfr_print_rnd_mode(MPC_RND_IM(rnd)));
MPC_OUT (a);
MPC_OUT (b);
MPC_OUT (c);
MPC_OUT (z);
MPC_OUT (t);
if (inex_z != inex_t) {
fprintf (stderr, "inex_re (z): %s\n", MPC_INEX_STR (inex_z));
fprintf (stderr, "inex_re (t): %s\n", MPC_INEX_STR (inex_t));
}
exit (1);
}
mpc_clear (z);
mpc_clear (t);
}
static void
check_random (void)
{
mpfr_prec_t prec;
int rnd_re, rnd_im;
mpc_t a, b, c;
mpc_init2 (a, 1000);
mpc_init2 (b, 1000);
mpc_init2 (c, 1000);
for (prec = 2; prec < 1000; prec = (mpfr_prec_t) (prec * 1.1 + 1)) {
mpc_set_prec (a, prec);
mpc_set_prec (b, prec);
mpc_set_prec (c, prec);
test_default_random (a, -1024, 1024, 128, 0);
test_default_random (b, -1024, 1024, 128, 0);
test_default_random (c, -1024, 1024, 128, 0);
for (rnd_re = 0; rnd_re < 4; rnd_re ++)
for (rnd_im = 0; rnd_im < 4; rnd_im ++)
cmpfma (a, b, c, MPC_RND (rnd_re, rnd_im));
}
mpc_clear (a);
mpc_clear (b);
mpc_clear (c);
}
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = \
mpc_fma (P[1].mpc, P[2].mpc, P[3].mpc, P[4].mpc, P[5].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = \
mpc_fma (P[1].mpc, P[1].mpc, P[3].mpc, P[4].mpc, P[5].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP2 \
P[0].mpc_inex = \
mpc_fma (P[1].mpc, P[2].mpc, P[1].mpc, P[4].mpc, P[5].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP3 \
P[0].mpc_inex = \
mpc_fma (P[1].mpc, P[2].mpc, P[3].mpc, P[1].mpc, P[5].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
check_random (); /* Remove it? */
data_check_template ("fma.dsc", "fma.dat");
tgeneric_template ("fma.dsc", 2, 1024, 1, 256);
test_end ();
return 0;
}
mpc-1.1.0/tests/open_datafile.c 0000644 0001751 0001751 00000003470 12471661720 013325 0000000 0000000 /* open_datafile.c -- Set up datafile context.
Usage: Before including this template file in your source file,
#define the prototype of the function under test in the CALL
symbol, see tadd_tmpl.c for an example.
Copyright (C) 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include
#include "mpc-tests.h"
void
open_datafile (mpc_datafile_context_t* datafile_context,
const char * data_filename)
{
char *src_dir;
char default_srcdir[] = ".";
src_dir = getenv ("srcdir");
if (src_dir == NULL)
src_dir = default_srcdir;
datafile_context->pathname =
(char *) malloc ((strlen (src_dir)) + strlen (data_filename) + 2);
if (datafile_context->pathname == NULL)
{
fprintf (stderr, "Cannot allocate memory\n");
exit (1);
}
sprintf (datafile_context->pathname, "%s/%s", src_dir, data_filename);
datafile_context->fd = fopen (datafile_context->pathname, "r");
if (datafile_context->fd == NULL)
{
fprintf (stderr, "Unable to open %s\n", datafile_context->pathname);
exit (1);
}
datafile_context->line_number = 1;
datafile_context->nextchar = getc (datafile_context->fd);
tpl_skip_whitespace_comments (datafile_context);
}
mpc-1.1.0/tests/rounding.c 0000644 0001751 0001751 00000011145 12471661720 012356 0000000 0000000 /* rounding.c -- file for functions iterating over rounding modes.
Copyright (C) 2013, 2014 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
/* helper functions for iterating over mpfr rounding modes */
#define FIRST_MPFR_RND_MODE MPFR_RNDN
static mpfr_rnd_t
next_mpfr_rnd_mode (mpfr_rnd_t curr)
{
switch (curr)
{
case MPFR_RNDN:
return MPFR_RNDZ;
case MPFR_RNDZ:
return MPFR_RNDU;
case MPFR_RNDU:
return MPFR_RNDD;
default:
/* return invalid guard value in mpfr_rnd_t */
#if MPFR_VERSION_MAJOR < 3
return MPFR_RNDNA;
#else
return MPFR_RNDA; /* valid rounding type, but not used in mpc */
#endif
}
}
static int
is_valid_mpfr_rnd_mode (mpfr_rnd_t curr)
/* returns 1 if curr is a valid rounding mode, and 0 otherwise */
{
if ( curr == MPFR_RNDN || curr == MPFR_RNDZ
|| curr == MPFR_RNDU || curr == MPFR_RNDD)
return 1;
else
return 0;
}
static mpc_rnd_t
next_mpc_rnd_mode (mpc_rnd_t rnd)
{
mpfr_rnd_t rnd_re = MPC_RND_RE (rnd);
mpfr_rnd_t rnd_im = MPC_RND_IM (rnd);
rnd_im = next_mpfr_rnd_mode (rnd_im);
if (!is_valid_mpfr_rnd_mode (rnd_im))
{
rnd_re = next_mpfr_rnd_mode (rnd_re);
rnd_im = FIRST_MPFR_RND_MODE;
}
return MPC_RND(rnd_re, rnd_im);
}
static int
is_valid_mpc_rnd_mode (mpc_rnd_t rnd)
/* returns 1 if curr is a valid rounding mode, and 0 otherwise */
{
mpfr_rnd_t rnd_re = MPC_RND_RE (rnd);
mpfr_rnd_t rnd_im = MPC_RND_IM (rnd);
return is_valid_mpfr_rnd_mode (rnd_re) && is_valid_mpfr_rnd_mode (rnd_im);
}
/* functions using abstract parameters */
static void
first_mode (mpc_fun_param_t *params, int index)
{
switch (params->T[index])
{
case MPC_RND:
params->P[index].mpc_rnd =
MPC_RND(FIRST_MPFR_RND_MODE, FIRST_MPFR_RND_MODE);
break;
case MPFR_RND:
params->P[index].mpfr_rnd = FIRST_MPFR_RND_MODE;
break;
default:
printf ("The rounding mode is expected to be"
" the last input parameter.\n");
exit (-1);
}
}
static void
next_mode (mpc_fun_param_t *params, int index)
{
switch (params->T[index])
{
case MPC_RND:
params->P[index].mpc_rnd =
next_mpc_rnd_mode (params->P[index].mpc_rnd);
break;
case MPFR_RND:
params->P[index].mpfr_rnd =
next_mpfr_rnd_mode (params->P[index].mpfr_rnd);
break;
default:
printf ("The rounding mode is expected to be"
" the last input parameter.\n");
exit (-1);
}
}
static int
is_valid_mode (mpc_fun_param_t *params, int index)
/* returns 1 if params->P[index] is a valid rounding mode, and 0 otherwise */
{
switch (params->T[index])
{
case MPC_RND:
return is_valid_mpc_rnd_mode (params->P[index].mpc_rnd);
case MPFR_RND:
return is_valid_mpfr_rnd_mode (params->P[index].mpfr_rnd);
default:
printf ("The rounding mode is expected to be"
" the last input parameter.\n");
exit (-1);
}
}
void
first_rnd_mode (mpc_fun_param_t *params)
{
int rnd_mode_index;
for (rnd_mode_index = params->nbout + params->nbin - params->nbrnd;
rnd_mode_index < params->nbout + params->nbin;
rnd_mode_index++)
{
first_mode (params, rnd_mode_index);
}
}
void
next_rnd_mode (mpc_fun_param_t *params)
/* cycle through all valid rounding modes and finish with an invalid one */
{
int last = params->nbout + params->nbin - 1;
int index = params->nbout + params->nbin - params->nbrnd;
int carry = 1;
while (carry && index <= last) {
next_mode (params, index);
if (!is_valid_mode (params, index) && index < last)
first_mode (params, index);
else
carry = 0;
index++;
}
}
int
is_valid_rnd_mode (mpc_fun_param_t *params)
/* returns 1 if all rounding parameters are set to a valid rounding mode,
and 0 otherwise */
{
int index;
for (index = params->nbout + params->nbin - params->nbrnd;
index < params->nbout + params->nbin;
index++)
if (! is_valid_mode (params, index))
return 0;
return 1;
}
mpc-1.1.0/tests/log.dat 0000644 0001751 0001751 00000023025 12720536532 011637 0000000 0000000 # Data test file for mpc_log.
#
# Copyright (C) 2008, 2009, 2010, 2012 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
# See file sin.dat for the format description.
# Special values, following ISO C99 standard, Annex G,
# more precisely Section G.6.3.2 "The clog functions".
# Rule [conj]: log(conj(z)) = conj(log(z))
# log(-0 + i*0) = -inf + i*pi
0 - 2 -inf 53 +0x3243F6A8885A3p-48 2 -0 2 +0 N N
0 + 2 -inf 53 -0x3243F6A8885A3p-48 2 -0 2 -0 N N
0 - 2 -inf 53 +0x3243F6A8885A3p-48 2 -0 2 +0 N D
0 - 2 -inf 53 -0x3243F6A8885A32p-52 2 -0 2 -0 N D
# log(+0 + i*0) = -inf + i*0
0 0 2 -inf 2 +0 2 +0 2 +0 N N
0 0 2 -inf 2 -0 2 +0 2 -0 N N
# log(+1 +- i*0) = +0 +- i*0
0 0 2 +0 2 +0 2 1 2 +0 N N
0 0 2 +0 2 -0 2 1 2 -0 N N
# log(-1 +- i*0) = +0 +- i*pi
0 - 2 +0 53 +0x3243F6A8885A3p-48 2 -1 2 +0 N N
0 + 2 +0 53 -0x3243F6A8885A3p-48 2 -1 2 -0 N N
# log(x + i*inf) = +inf + i*pi/2 for finite x
0 - 2 +inf 53 +0x3243F6A8885A3p-49 2 1 2 +inf N N
0 - 2 +inf 53 +0x3243F6A8885A3p-49 2 +0 2 +inf N N
0 - 2 +inf 53 +0x3243F6A8885A3p-49 2 -0 2 +inf N N
0 - 2 +inf 53 +0x3243F6A8885A3p-49 2 -1 2 +inf N N
# by [conj]: log(x - i*inf) = +inf - i*pi/2 for finite x
0 + 2 +inf 53 -0x3243F6A8885A3p-49 2 1 2 -inf N N
0 + 2 +inf 53 -0x3243F6A8885A3p-49 2 +0 2 -inf N N
0 + 2 +inf 53 -0x3243F6A8885A3p-49 2 -0 2 -inf N N
0 + 2 +inf 53 -0x3243F6A8885A3p-49 2 -1 2 -inf N N
# log(x + i*nan) = nan+i*nan for finite x
0 0 2 nan 2 nan 2 1 2 nan N N
0 0 2 nan 2 nan 2 +0 2 nan N N
0 0 2 nan 2 nan 2 -0 2 nan N N
0 0 2 nan 2 nan 2 -1 2 nan N N
# log(-inf + i*y) = +inf + i*pi for finite positive-signed y
0 - 2 +inf 53 0x3243F6A8885A3p-48 2 -inf 2 1 N N
0 - 2 +inf 53 0x3243F6A8885A3p-48 2 -inf 2 +0 N N
# by [conj]: log(-inf + i*y) = +inf - i*pi for finite negative-signed y
0 + 2 +inf 53 -0x3243F6A8885A3p-48 2 -inf 2 -1 N N
0 + 2 +inf 53 -0x3243F6A8885A3p-48 2 -inf 2 -0 N N
# log(+inf + i*y) = +inf + i*0 for finite positive-signed y
0 0 2 +inf 2 +0 2 +inf 2 1 N N
0 0 2 +inf 2 +0 2 +inf 2 +0 N N
# by [conj]: log(+inf + i*y) = +inf - i*0 for finite negative-signed y
0 0 2 +inf 2 -0 2 +inf 2 -1 N N
0 0 2 +inf 2 -0 2 +inf 2 -0 N N
# log(-inf + i*inf) = +inf + i*(3*pi/4)
0 - 2 +inf 53 0x96CBE3F9990E9p-50 2 -inf 2 +inf N N
# by [conj]: log(-inf - i*inf) = +inf - i*(3*pi/4)
0 + 2 +inf 53 -0x96CBE3F9990E9p-50 2 -inf 2 -inf N N
# log(+inf + i*inf) = +inf + i*(pi/4)
0 - 2 +inf 53 0x3243F6A8885A3p-50 2 +inf 2 +inf N N
# by [conj]: log(+inf - i*inf) = +inf - i*(pi/4)
0 + 2 +inf 53 -0x3243F6A8885A3p-50 2 +inf 2 -inf N N
# log(+/-inf + i*nan) = +inf + i*nan
0 0 2 +inf 2 nan 2 +inf 2 nan N N
0 0 2 +inf 2 nan 2 -inf 2 nan N N
# log(nan + i*y) = nan + i*nan for finite y
0 0 2 nan 2 nan 2 nan 2 1 N N
0 0 2 nan 2 nan 2 nan 2 +0 N N
0 0 2 nan 2 nan 2 nan 2 -0 N N
0 0 2 nan 2 nan 2 nan 2 -1 N N
# log(nan + i*inf) = +inf + i*nan
0 0 2 +inf 2 nan 2 nan 2 +inf N N
0 0 2 +inf 2 nan 2 nan 2 -inf N N
# log(nan + i*nan) = nan + i*nan
0 0 2 nan 2 nan 2 nan 2 nan N N
# log(x + i*y) with either x or y zero and the other non-zero
+ 0 53 0xB5535E0FD3FBDp-50 2 0 5 0x11 2 0 N N
+ - 53 0xB5535E0FD3FBDp-50 53 0x3243F6A8885A3p-49 2 0 5 0x11 N N
- - 53 0x5E38D81812CCBp-49 53 0x3243F6A8885A3p-48 5 -0x13 2 +0 N N
- + 53 0x5E38D81812CCBp-49 53 -0x3243F6A8885A3p-48 5 -0x13 2 -0 N N
- + 53 0x5E38D81812CCBp-49 53 -0x3243F6A8885A3p-49 2 0 5 -0x13 N N
- + 53 0x19157DFDD1B3Fp-47 53 0x1921FB54442D19p-51 5 -0x17 2 +0 Z U
- - 53 0x19157DFDD1B3Fp-47 53 -0x1921FB54442D19p-51 5 -0x17 2 -0 N D
+ - 53 0x19157DFDD1B3F1p-51 53 0x3243F6A8885A3p-48 5 -0x17 2 +0 U Z
- + 53 0x19157DFDD1B3Fp-47 53 -0x3243F6A8885A3p-48 5 -0x17 2 -0 D N
- - 53 0x8611A6D2511D3p-49 53 0x3243F6A8885A3p-48 7 -0x42 2 +0 Z D
- + 53 0x8611A6D2511D3p-49 53 -0x3243F6A8885A3p-48 7 -0x42 2 -0 N Z
+ - 53 0x10C234DA4A23A7p-50 53 0x3243F6A8885A3p-48 7 -0x42 2 +0 U N
- + 53 0x8611A6D2511D3p-49 53 -0x3243F6A8885A3p-48 7 -0x42 2 -0 D U
# normal non-zero numbers
- - 17 0x6701p-15 42 0x3b58ce0ac37p-43 2 2 2 1 N N
- + 17 0x6701p-15 42 -0x3b58ce0ac37p-43 2 2 2 -1 N N
- + 17 0x6701p-15 42 0x2ad8dce72ffp-40 2 -2 2 1 N N
- - 17 0x6701p-15 42 -0x2ad8dce72ffp-40 2 -2 2 -1 N N
- + 17 0x6701p-15 42 0x46db864bafp-38 2 1 2 2 N N
- - 17 0x6701p-15 42 -0x46db864bafp-38 2 1 2 -2 N N
- + 17 0x6701p-15 42 0x10468a8ace5p-39 2 -1 2 2 N N
- - 17 0x6701p-15 42 -0x10468a8ace5p-39 2 -1 2 -2 N N
# huge values
+ 0 53 0x162E42FEFA39Fp-39 2 0 2 0x1p1024 2 +0 U U
+ 0 53 0x162E42FEFA39Fp-38 2 0 2 0x1p2048 2 +0 U U
+ 0 53 0x162E42FEFA39Fp-37 2 0 2 0x1p4096 2 +0 U U
+ 0 53 0x162E42FEFA39Fp-36 2 0 2 0x1p8192 2 +0 U U
+ 0 53 0x162E42FEFA39Fp-35 2 0 2 0x1p16384 2 +0 U U
+ 0 53 0x162E42FEFA39Fp-34 2 0 2 0x1p32768 2 +0 U U
+ 0 53 0x162E42FEFA39Fp-33 2 0 2 0x1p65536 2 +0 U U
+ 0 53 0x162E42FEFA39Fp-32 2 0 2 0x1p131072 2 +0 U U
+ 0 53 0x162E42FEFA39Fp-31 2 0 2 0x1p262144 2 +0 U U
+ 0 53 0x162E42FEFA39Fp-30 2 0 2 0x1p524288 2 +0 U U
+ 0 53 0x162E42FEFA39Fp-29 2 0 2 0x1p1048576 2 +0 U U
+ 0 53 0x162E42FEFA39Fp-28 2 0 2 0x1p2097152 2 +0 U U
+ 0 53 0x162E42FEFA39Fp-27 2 0 2 0x1p4194304 2 +0 U U
+ 0 53 0x162E42FEFA39Fp-26 2 0 2 0x1p8388608 2 +0 U U
+ 0 53 0x162E42FEFA39Fp-25 2 0 2 0x1p16777216 2 +0 U U
+ 0 53 0x162E42FEFA39Fp-24 2 0 2 0x1p33554432 2 +0 U U
+ 0 53 0x162E42FEFA39Fp-23 2 0 2 0x1p67108864 2 +0 U U
+ 0 53 0x162E42FEFA39Fp-22 2 0 2 0x1p134217728 2 +0 U U
+ 0 53 0x162E42FEFA39Fp-21 2 0 2 0x1p268435456 2 +0 U U
+ 0 53 0x162E42FEFA39Fp-20 2 0 2 0x1p536870912 2 +0 U U
+ + 53 0x163108C75A1937p-43 53 0x1921FB54442D19p-53 2 0x1p1024 2 0x1p1024 U U
+ + 53 0x162FA5E32A2993p-42 53 0x1921FB54442D19p-53 2 0x1p2048 2 0x1p2048 U U
+ + 53 0xB177A388918E1p-40 53 0x1921FB54442D19p-53 2 0x1p4096 2 0x1p4096 U U
+ + 53 0x162E9BB80635D9p-40 53 0x1921FB54442D19p-53 2 0x1p8192 2 0x1p8192 U U
+ + 53 0x58B9BD6E00DF9p-37 53 0x1921FB54442D19p-53 2 0x1p16384 2 0x1p16384 U U
+ + 53 0xB172C969E9C75p-37 53 0x1921FB54442D19p-53 2 0x1p32768 2 0x1p32768 U U
+ + 53 0x162E4E161BB96Dp-37 53 0x1921FB54442D19p-53 2 0x1p65536 2 0x1p65536 U U
+ + 53 0xB172445457CD7p-35 2 0x1p0 2 0x1p131072 2 0x1p131072 U U
+ + 53 0x162E45C4C299CFp-35 2 0x1p0 2 0x1p262144 2 0x1p262144 U U
+ + 53 0x162E4461DE69DFp-34 2 0x1p0 2 0x1p524288 2 0x1p524288 U U
+ + 53 0x2C5C8760D8A3Dp-30 2 0x1p0 2 0x1p1048576 2 0x1p1048576 U U
+ + 53 0x58B90D5ECD17Bp-30 2 0x1p0 2 0x1p2097152 2 0x1p2097152 U U
+ + 53 0xB172195AB5FF7p-30 2 0x1p0 2 0x1p4194304 2 0x1p4194304 U U
+ + 53 0x162E4315287CEFp-30 2 0x1p0 2 0x1p8388608 2 0x1p8388608 U U
+ + 53 0x162E430A115B6Fp-29 2 0x1p0 2 0x1p16777216 2 0x1p16777216 U U
+ + 53 0x162E430485CAAFp-28 2 0x1p0 2 0x1p33554432 2 0x1p33554432 U U
+ + 53 0x162E4301C0025p-23 2 0x1p0 2 0x1p67108864 2 0x1p67108864 U U
+ + 53 0xB1721802E8F1p-21 2 0x1p0 2 0x1p134217728 2 0x1p134217728 U U
+ + 53 0x2C5C85FF57581p-22 2 0x1p0 2 0x1p268435456 2 0x1p268435456 U U
# Example leading to intermediate overflow in x^2+y^2
+ + 53 0x58B90BFD4BCBFp-22 2 0x1p0 2 0x1p536870912 2 0x1p536870912 U U
+ + 53 0xb17217efbcc47p-22 2 0x1p0 2 0x3p1073741819 2 0x3p1073741819 U U
# Example leading to intermediate underflow in x^2+y^2
- - 53 -0xb17217f0e35a9p-22 2 0x3p-2 2 0x1p-1073741822 2 0x1p-1073741822 D D
# log (-1 + i*eps), looped in previous version
- - 2 0 2 3 2 -1 2 0x1p-1073741813 N N
- - 2 0 2 3 2 -1 2 0x1p-1073741813 D D
+ + 2 0x1p-1073741822 2 4 2 -1 2 0x1p-1073741813 U U
# log(1 + i*eps), could cause similar problems
- + 2 0 2 0x1p-1073741822 2 1 2 0x1p-1073741822 N N
- - 2 0 2 0 2 1 2 0x1p-1073741822 D D
+ + 2 0x1p-1073741822 2 0x1p-1073741822 2 1 2 0x1p-1073741822 U U
# log (eps + i)
- - 2 0 2 0x3p-1 2 0x1p-1073741822 2 1 N N
- - 2 0 2 0x3p-1 2 0x1p-1073741822 2 1 D D
+ + 2 0x1p-1073741822 2 2 2 0x1p-1073741822 2 1 U U
# log (close to 1 + i*eps), improves test coverage
+ - 2 -0x1p-36 2 0x1p-1073741822 36 0x0.FFFFFFFFF 2 0x1p-1073741822 N N
mpc-1.1.0/tests/ui_ui_sub.dsc 0000644 0001751 0001751 00000001603 12471661720 013041 0000000 0000000 # Description file for mpc_ui_ui_sub
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_ui_ui_sub
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
unsigned long int
unsigned long int
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/tsqrt.c 0000644 0001751 0001751 00000002307 12471661720 011706 0000000 0000000 /* tsqrt -- test file for mpc_sqrt.
Copyright (C) 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_sqrt (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_sqrt (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("sqrt.dsc", "sqrt.dat");
tgeneric_template ("sqrt.dsc", 2, 1024, 7, 256);
test_end ();
return 0;
}
mpc-1.1.0/tests/pow_z.dat 0000644 0001751 0001751 00000004366 12471661720 012224 0000000 0000000 # Data file for mpc_pow_z.
#
# Copyright (C) 2012 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP1_RE OP1_RE PREC_OP1_IM OP1_IM OP2 RND_RE RND_IM
#
# where op1 = op1_re + i * op1_im, rop = rop_re + i * rop_im,
# The data are read from the file and stored in variables op1, op2, rop using
# rounding to nearest when needed, for instance: rop_re is ROP_RE rounded to
# nearest to the precision of PREC_ROP_RE.
# ROP_RE is checked against Re(op1^op2) rounded to the precision PREC_ROP_RE
# in the direction RND_RE
# ROP_IM is checked against Im(op1^op2) rounded to the precision PREC_ROP_IM
# in the direction RND_IM
# INEX_RE is the ternary value for the real part with the following notation:
# "?" ternary value not checked
# "+" if ROP_RE is greater than the exact mathematical result
# "0" if ROP_RE is exactly the mathematical result
# "-" if ROP_RE is less than the exact mathematical result
# (m.m. INEX_IM)
# rounding modes notation:
# "N" is rounding to nearest
# "Z" is rounding towards zero
# "U" is rounding towards plus infinity
# "D" is rounding towards minus infinity
# Use prefixes "0b" for values in base two, "0x" for values in base sixteen,
# no prefix for value in base ten.
# In all bases, "nan" is NaN, "inf" is infinity;
# The sign of the result is checked with "+inf", "-inf", "-0", or "+0".
0 0 5 17 5 42 5 17 5 42 1 N N
0 0 5 0.5 5 -0.5 5 1 5 1 -1 N N
0 0 5 1 5 0 5 0 5 1 0x8000000000000000 N N
mpc-1.1.0/tests/tpow_z.c 0000644 0001751 0001751 00000003166 12471661720 012057 0000000 0000000 /* tpow_z -- test file for mpc_pow_z.
Copyright (C) 2009, 2011, 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include /* for CHAR_BIT */
#include "mpc-tests.h"
static void
test_large (void)
{
mpc_t z;
mpz_t t;
mpc_init2 (z, 5);
mpz_init_set_ui (t, 1ul);
mpz_set_ui (t, 1ul);
mpz_mul_2exp (t, t, sizeof (long) * CHAR_BIT);
mpc_set_ui_ui (z, 0ul, 1ul, MPC_RNDNN);
mpc_pow_z (z, z, t, MPC_RNDNN);
if (mpc_cmp_si_si (z, 1l, 0l) != 0) {
printf ("Error for mpc_pow_z (4*large)\n");
exit (1);
}
mpc_clear (z);
mpz_clear (t);
}
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_pow_z (P[1].mpc, P[2].mpc, P[3].mpz, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_pow_z (P[1].mpc, P[1].mpc, P[3].mpz, P[4].mpc_rnd)
#include "data_check.tpl"
int
main (void)
{
test_start ();
data_check_template ("pow_z.dsc", "pow_z.dat");
test_large ();
test_end ();
return 0;
}
mpc-1.1.0/tests/mul_fr.dsc 0000644 0001751 0001751 00000001531 12471661720 012342 0000000 0000000 # Description file for mpc_mul_fr
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_mul_fr
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpfr_srcptr
mpc_rnd_t
mpc-1.1.0/tests/mul_fr.dat 0000644 0001751 0001751 00000041106 12426164730 012342 0000000 0000000 # Data file for mpc_mul_fr.
#
# Copyright (C) 2008 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# For explanations on the file format, see add_fr.dat.
# special values
0 0 7 +inf 7 +inf 7 -inf 7 -inf 7 -inf N N
0 0 7 +inf 7 +inf 7 -inf 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 +0 N N
0 0 7 -inf 7 -inf 7 -inf 7 -inf 7 1 N N
0 0 7 -inf 7 -inf 7 -inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 nan N N
0 0 7 +inf 7 +inf 7 -inf 7 -1 7 -inf N N
0 0 7 +inf 7 1 7 -inf 7 -1 7 -1 N N
0 0 7 nan 7 +0 7 -inf 7 -1 7 -0 N N
0 0 7 nan 7 -0 7 -inf 7 -1 7 +0 N N
0 0 7 -inf 7 -1 7 -inf 7 -1 7 1 N N
0 0 7 -inf 7 -inf 7 -inf 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 nan N N
0 0 7 +inf 7 nan 7 -inf 7 -0 7 -inf N N
0 0 7 +inf 7 +0 7 -inf 7 -0 7 -1 N N
0 0 7 nan 7 +0 7 -inf 7 -0 7 -0 N N
0 0 7 nan 7 -0 7 -inf 7 -0 7 +0 N N
0 0 7 -inf 7 -0 7 -inf 7 -0 7 1 N N
0 0 7 -inf 7 nan 7 -inf 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 nan N N
0 0 7 +inf 7 nan 7 -inf 7 +0 7 -inf N N
0 0 7 +inf 7 -0 7 -inf 7 +0 7 -1 N N
0 0 7 nan 7 -0 7 -inf 7 +0 7 -0 N N
0 0 7 nan 7 +0 7 -inf 7 +0 7 +0 N N
0 0 7 -inf 7 +0 7 -inf 7 +0 7 1 N N
0 0 7 -inf 7 nan 7 -inf 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 nan N N
0 0 7 +inf 7 -inf 7 -inf 7 1 7 -inf N N
0 0 7 +inf 7 -1 7 -inf 7 1 7 -1 N N
0 0 7 nan 7 -0 7 -inf 7 1 7 -0 N N
0 0 7 nan 7 +0 7 -inf 7 1 7 +0 N N
0 0 7 -inf 7 1 7 -inf 7 1 7 1 N N
0 0 7 -inf 7 +inf 7 -inf 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 1 7 nan N N
0 0 7 +inf 7 -inf 7 -inf 7 +inf 7 -inf N N
0 0 7 +inf 7 -inf 7 -inf 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 +0 N N
0 0 7 -inf 7 +inf 7 -inf 7 +inf 7 1 N N
0 0 7 -inf 7 +inf 7 -inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 nan N N
0 0 7 +inf 7 nan 7 -inf 7 nan 7 -inf N N
0 0 7 +inf 7 nan 7 -inf 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 +0 N N
0 0 7 -inf 7 nan 7 -inf 7 nan 7 1 N N
0 0 7 -inf 7 nan 7 -inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 nan N N
0 0 7 +inf 7 +inf 7 -1 7 -inf 7 -inf N N
0 0 7 1 7 +inf 7 -1 7 -inf 7 -1 N N
0 0 7 +0 7 nan 7 -1 7 -inf 7 -0 N N
0 0 7 -0 7 nan 7 -1 7 -inf 7 +0 N N
0 0 7 -1 7 -inf 7 -1 7 -inf 7 1 N N
0 0 7 -inf 7 -inf 7 -1 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 nan N N
0 0 7 +inf 7 +inf 7 -1 7 -1 7 -inf N N
0 0 7 -inf 7 -inf 7 -1 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -1 7 nan N N
0 0 7 +inf 7 nan 7 -1 7 -0 7 -inf N N
0 0 7 -inf 7 nan 7 -1 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -0 7 nan N N
0 0 7 +inf 7 nan 7 -1 7 +0 7 -inf N N
0 0 7 -inf 7 nan 7 -1 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 +0 7 nan N N
0 0 7 +inf 7 -inf 7 -1 7 1 7 -inf N N
0 0 7 -inf 7 +inf 7 -1 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 1 7 nan N N
0 0 7 +inf 7 -inf 7 -1 7 +inf 7 -inf N N
0 0 7 1 7 -inf 7 -1 7 +inf 7 -1 N N
0 0 7 +0 7 nan 7 -1 7 +inf 7 -0 N N
0 0 7 -0 7 nan 7 -1 7 +inf 7 +0 N N
0 0 7 -1 7 +inf 7 -1 7 +inf 7 1 N N
0 0 7 -inf 7 +inf 7 -1 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 nan N N
0 0 7 +inf 7 nan 7 -1 7 nan 7 -inf N N
0 0 7 1 7 nan 7 -1 7 nan 7 -1 N N
0 0 7 +0 7 nan 7 -1 7 nan 7 -0 N N
0 0 7 -0 7 nan 7 -1 7 nan 7 +0 N N
0 0 7 -1 7 nan 7 -1 7 nan 7 1 N N
0 0 7 -inf 7 nan 7 -1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 nan 7 nan N N
0 0 7 nan 7 +inf 7 -0 7 -inf 7 -inf N N
0 0 7 +0 7 +inf 7 -0 7 -inf 7 -1 N N
0 0 7 +0 7 nan 7 -0 7 -inf 7 -0 N N
0 0 7 -0 7 nan 7 -0 7 -inf 7 +0 N N
0 0 7 -0 7 -inf 7 -0 7 -inf 7 1 N N
0 0 7 nan 7 -inf 7 -0 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 nan N N
0 0 7 nan 7 +inf 7 -0 7 -1 7 -inf N N
0 0 7 nan 7 -inf 7 -0 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -1 7 nan N N
0 0 7 nan 7 nan 7 -0 7 -0 7 -inf N N
0 0 7 nan 7 nan 7 -0 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -0 7 nan N N
0 0 7 nan 7 nan 7 -0 7 +0 7 -inf N N
0 0 7 nan 7 nan 7 -0 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 +0 7 nan N N
0 0 7 nan 7 -inf 7 -0 7 1 7 -inf N N
0 0 7 nan 7 +inf 7 -0 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 1 7 nan N N
0 0 7 nan 7 -inf 7 -0 7 +inf 7 -inf N N
0 0 7 +0 7 -inf 7 -0 7 +inf 7 -1 N N
0 0 7 +0 7 nan 7 -0 7 +inf 7 -0 N N
0 0 7 -0 7 nan 7 -0 7 +inf 7 +0 N N
0 0 7 -0 7 +inf 7 -0 7 +inf 7 1 N N
0 0 7 nan 7 +inf 7 -0 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -inf N N
0 0 7 +0 7 nan 7 -0 7 nan 7 -1 N N
0 0 7 +0 7 nan 7 -0 7 nan 7 -0 N N
0 0 7 -0 7 nan 7 -0 7 nan 7 +0 N N
0 0 7 -0 7 nan 7 -0 7 nan 7 1 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 nan 7 nan N N
0 0 7 nan 7 +inf 7 +0 7 -inf 7 -inf N N
0 0 7 -0 7 +inf 7 +0 7 -inf 7 -1 N N
0 0 7 -0 7 nan 7 +0 7 -inf 7 -0 N N
0 0 7 +0 7 nan 7 +0 7 -inf 7 +0 N N
0 0 7 +0 7 -inf 7 +0 7 -inf 7 1 N N
0 0 7 nan 7 -inf 7 +0 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 nan N N
0 0 7 nan 7 +inf 7 +0 7 -1 7 -inf N N
0 0 7 nan 7 -inf 7 +0 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -1 7 nan N N
0 0 7 nan 7 nan 7 +0 7 -0 7 -inf N N
0 0 7 nan 7 nan 7 +0 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -0 7 nan N N
0 0 7 nan 7 nan 7 +0 7 +0 7 -inf N N
0 0 7 nan 7 nan 7 +0 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 +0 7 nan N N
0 0 7 nan 7 -inf 7 +0 7 1 7 -inf N N
0 0 7 nan 7 +inf 7 +0 7 1 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 1 7 nan N N
0 0 7 nan 7 -inf 7 +0 7 +inf 7 -inf N N
0 0 7 -0 7 -inf 7 +0 7 +inf 7 -1 N N
0 0 7 -0 7 nan 7 +0 7 +inf 7 -0 N N
0 0 7 +0 7 nan 7 +0 7 +inf 7 +0 N N
0 0 7 +0 7 +inf 7 +0 7 +inf 7 1 N N
0 0 7 nan 7 +inf 7 +0 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -inf N N
0 0 7 -0 7 nan 7 +0 7 nan 7 -1 N N
0 0 7 -0 7 nan 7 +0 7 nan 7 -0 N N
0 0 7 +0 7 nan 7 +0 7 nan 7 +0 N N
0 0 7 +0 7 nan 7 +0 7 nan 7 1 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 nan 7 nan N N
0 0 7 -inf 7 +inf 7 1 7 -inf 7 -inf N N
0 0 7 -1 7 +inf 7 1 7 -inf 7 -1 N N
0 0 7 -0 7 nan 7 1 7 -inf 7 -0 N N
0 0 7 +0 7 nan 7 1 7 -inf 7 +0 N N
0 0 7 1 7 -inf 7 1 7 -inf 7 1 N N
0 0 7 +inf 7 -inf 7 1 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -inf 7 nan N N
0 0 7 -inf 7 +inf 7 1 7 -1 7 -inf N N
0 0 7 +inf 7 -inf 7 1 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -1 7 nan N N
0 0 7 -inf 7 nan 7 1 7 -0 7 -inf N N
0 0 7 +inf 7 nan 7 1 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -0 7 nan N N
0 0 7 -inf 7 nan 7 1 7 +0 7 -inf N N
0 0 7 +inf 7 nan 7 1 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 1 7 +0 7 nan N N
0 0 7 -inf 7 -inf 7 1 7 1 7 -inf N N
0 0 7 +inf 7 +inf 7 1 7 1 7 +inf N N
0 0 7 nan 7 nan 7 1 7 1 7 nan N N
0 0 7 -inf 7 -inf 7 1 7 +inf 7 -inf N N
0 0 7 -1 7 -inf 7 1 7 +inf 7 -1 N N
0 0 7 -0 7 nan 7 1 7 +inf 7 -0 N N
0 0 7 +0 7 nan 7 1 7 +inf 7 +0 N N
0 0 7 1 7 +inf 7 1 7 +inf 7 1 N N
0 0 7 +inf 7 +inf 7 1 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 1 7 +inf 7 nan N N
0 0 7 -inf 7 nan 7 1 7 nan 7 -inf N N
0 0 7 -1 7 nan 7 1 7 nan 7 -1 N N
0 0 7 -0 7 nan 7 1 7 nan 7 -0 N N
0 0 7 +0 7 nan 7 1 7 nan 7 +0 N N
0 0 7 1 7 nan 7 1 7 nan 7 1 N N
0 0 7 +inf 7 nan 7 1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 1 7 nan 7 nan N N
0 0 7 -inf 7 +inf 7 +inf 7 -inf 7 -inf N N
0 0 7 -inf 7 +inf 7 +inf 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 +0 N N
0 0 7 +inf 7 -inf 7 +inf 7 -inf 7 1 N N
0 0 7 +inf 7 -inf 7 +inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 nan N N
0 0 7 -inf 7 +inf 7 +inf 7 -1 7 -inf N N
0 0 7 -inf 7 1 7 +inf 7 -1 7 -1 N N
0 0 7 nan 7 +0 7 +inf 7 -1 7 -0 N N
0 0 7 nan 7 -0 7 +inf 7 -1 7 +0 N N
0 0 7 +inf 7 -1 7 +inf 7 -1 7 1 N N
0 0 7 +inf 7 -inf 7 +inf 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 nan N N
0 0 7 -inf 7 nan 7 +inf 7 -0 7 -inf N N
0 0 7 -inf 7 +0 7 +inf 7 -0 7 -1 N N
0 0 7 nan 7 +0 7 +inf 7 -0 7 -0 N N
0 0 7 nan 7 -0 7 +inf 7 -0 7 +0 N N
0 0 7 +inf 7 -0 7 +inf 7 -0 7 1 N N
0 0 7 +inf 7 nan 7 +inf 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 nan N N
0 0 7 -inf 7 nan 7 +inf 7 +0 7 -inf N N
0 0 7 -inf 7 -0 7 +inf 7 +0 7 -1 N N
0 0 7 nan 7 -0 7 +inf 7 +0 7 -0 N N
0 0 7 nan 7 +0 7 +inf 7 +0 7 +0 N N
0 0 7 +inf 7 +0 7 +inf 7 +0 7 1 N N
0 0 7 +inf 7 nan 7 +inf 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 nan N N
0 0 7 -inf 7 -inf 7 +inf 7 1 7 -inf N N
0 0 7 -inf 7 -1 7 +inf 7 1 7 -1 N N
0 0 7 nan 7 -0 7 +inf 7 1 7 -0 N N
0 0 7 nan 7 +0 7 +inf 7 1 7 +0 N N
0 0 7 +inf 7 1 7 +inf 7 1 7 1 N N
0 0 7 +inf 7 +inf 7 +inf 7 1 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 1 7 nan N N
0 0 7 -inf 7 -inf 7 +inf 7 +inf 7 -inf N N
0 0 7 -inf 7 -inf 7 +inf 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 +0 N N
0 0 7 +inf 7 +inf 7 +inf 7 +inf 7 1 N N
0 0 7 +inf 7 +inf 7 +inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 nan N N
0 0 7 -inf 7 nan 7 +inf 7 nan 7 -inf N N
0 0 7 -inf 7 nan 7 +inf 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 +0 N N
0 0 7 +inf 7 nan 7 +inf 7 nan 7 1 N N
0 0 7 +inf 7 nan 7 +inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 nan N N
0 0 7 nan 7 +inf 7 nan 7 -inf 7 -inf N N
0 0 7 nan 7 +inf 7 nan 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 +0 N N
0 0 7 nan 7 -inf 7 nan 7 -inf 7 1 N N
0 0 7 nan 7 -inf 7 nan 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 nan N N
0 0 7 nan 7 +inf 7 nan 7 -1 7 -inf N N
0 0 7 nan 7 1 7 nan 7 -1 7 -1 N N
0 0 7 nan 7 +0 7 nan 7 -1 7 -0 N N
0 0 7 nan 7 -0 7 nan 7 -1 7 +0 N N
0 0 7 nan 7 -1 7 nan 7 -1 7 1 N N
0 0 7 nan 7 -inf 7 nan 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -1 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -inf N N
0 0 7 nan 7 +0 7 nan 7 -0 7 -1 N N
0 0 7 nan 7 +0 7 nan 7 -0 7 -0 N N
0 0 7 nan 7 -0 7 nan 7 -0 7 +0 N N
0 0 7 nan 7 -0 7 nan 7 -0 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -0 7 nan N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -inf N N
0 0 7 nan 7 -0 7 nan 7 +0 7 -1 N N
0 0 7 nan 7 -0 7 nan 7 +0 7 -0 N N
0 0 7 nan 7 +0 7 nan 7 +0 7 +0 N N
0 0 7 nan 7 +0 7 nan 7 +0 7 1 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +0 7 nan N N
0 0 7 nan 7 -inf 7 nan 7 1 7 -inf N N
0 0 7 nan 7 -1 7 nan 7 1 7 -1 N N
0 0 7 nan 7 -0 7 nan 7 1 7 -0 N N
0 0 7 nan 7 +0 7 nan 7 1 7 +0 N N
0 0 7 nan 7 1 7 nan 7 1 7 1 N N
0 0 7 nan 7 +inf 7 nan 7 1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 1 7 nan N N
0 0 7 nan 7 -inf 7 nan 7 +inf 7 -inf N N
0 0 7 nan 7 -inf 7 nan 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 +0 N N
0 0 7 nan 7 +inf 7 nan 7 +inf 7 1 N N
0 0 7 nan 7 +inf 7 nan 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 nan N N
# values with only 1, -1, +0, -0
0 0 7 1 7 1 7 -1 7 -1 7 -1 N N
0 0 7 +0 7 +0 7 -1 7 -1 7 -0 N N
0 0 7 -0 7 -0 7 -1 7 -1 7 +0 N N
0 0 7 -1 7 -1 7 -1 7 -1 7 1 N N
0 0 7 1 7 +0 7 -1 7 -0 7 -1 N N
0 0 7 +0 7 +0 7 -1 7 -0 7 -0 N N
0 0 7 -0 7 -0 7 -1 7 -0 7 +0 N N
0 0 7 -1 7 -0 7 -1 7 -0 7 1 N N
0 0 7 1 7 -0 7 -1 7 +0 7 -1 N N
0 0 7 +0 7 -0 7 -1 7 +0 7 -0 N N
0 0 7 -0 7 +0 7 -1 7 +0 7 +0 N N
0 0 7 -1 7 +0 7 -1 7 +0 7 1 N N
0 0 7 1 7 -1 7 -1 7 1 7 -1 N N
0 0 7 +0 7 -0 7 -1 7 1 7 -0 N N
0 0 7 -0 7 +0 7 -1 7 1 7 +0 N N
0 0 7 -1 7 1 7 -1 7 1 7 1 N N
0 0 7 +0 7 1 7 -0 7 -1 7 -1 N N
0 0 7 +0 7 +0 7 -0 7 -1 7 -0 N N
0 0 7 -0 7 -0 7 -0 7 -1 7 +0 N N
0 0 7 -0 7 -1 7 -0 7 -1 7 1 N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -1 N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -0 N N
0 0 7 -0 7 -0 7 -0 7 -0 7 +0 N N
0 0 7 -0 7 -0 7 -0 7 -0 7 1 N N
0 0 7 +0 7 -0 7 -0 7 +0 7 -1 N N
0 0 7 +0 7 -0 7 -0 7 +0 7 -0 N N
0 0 7 -0 7 +0 7 -0 7 +0 7 +0 N N
0 0 7 -0 7 +0 7 -0 7 +0 7 1 N N
0 0 7 +0 7 -1 7 -0 7 1 7 -1 N N
0 0 7 +0 7 -0 7 -0 7 1 7 -0 N N
0 0 7 -0 7 +0 7 -0 7 1 7 +0 N N
0 0 7 -0 7 1 7 -0 7 1 7 1 N N
0 0 7 -0 7 1 7 +0 7 -1 7 -1 N N
0 0 7 -0 7 +0 7 +0 7 -1 7 -0 N N
0 0 7 +0 7 -0 7 +0 7 -1 7 +0 N N
0 0 7 +0 7 -1 7 +0 7 -1 7 1 N N
0 0 7 -0 7 +0 7 +0 7 -0 7 -1 N N
0 0 7 -0 7 +0 7 +0 7 -0 7 -0 N N
0 0 7 +0 7 -0 7 +0 7 -0 7 +0 N N
0 0 7 +0 7 -0 7 +0 7 -0 7 1 N N
0 0 7 -0 7 -0 7 +0 7 +0 7 -1 N N
0 0 7 -0 7 -0 7 +0 7 +0 7 -0 N N
0 0 7 +0 7 +0 7 +0 7 +0 7 +0 N N
0 0 7 +0 7 +0 7 +0 7 +0 7 1 N N
0 0 7 -0 7 -1 7 +0 7 1 7 -1 N N
0 0 7 -0 7 -0 7 +0 7 1 7 -0 N N
0 0 7 +0 7 +0 7 +0 7 1 7 +0 N N
0 0 7 +0 7 1 7 +0 7 1 7 1 N N
0 0 7 -1 7 1 7 1 7 -1 7 -1 N N
0 0 7 -0 7 +0 7 1 7 -1 7 -0 N N
0 0 7 +0 7 -0 7 1 7 -1 7 +0 N N
0 0 7 1 7 -1 7 1 7 -1 7 1 N N
0 0 7 -1 7 +0 7 1 7 -0 7 -1 N N
0 0 7 -0 7 +0 7 1 7 -0 7 -0 N N
0 0 7 +0 7 -0 7 1 7 -0 7 +0 N N
0 0 7 1 7 -0 7 1 7 -0 7 1 N N
0 0 7 -1 7 -0 7 1 7 +0 7 -1 N N
0 0 7 -0 7 -0 7 1 7 +0 7 -0 N N
0 0 7 +0 7 +0 7 1 7 +0 7 +0 N N
0 0 7 1 7 +0 7 1 7 +0 7 1 N N
0 0 7 -1 7 -1 7 1 7 1 7 -1 N N
0 0 7 -0 7 -0 7 1 7 1 7 -0 N N
0 0 7 +0 7 +0 7 1 7 1 7 +0 N N
0 0 7 1 7 1 7 1 7 1 7 1 N N
mpc-1.1.0/tests/fr_div.dat 0000644 0001751 0001751 00000041430 12426164730 012327 0000000 0000000 # Data file for mpc_fr_div.
#
# Copyright (C) 2008, 2009 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# For explanations on the file format, see add.dat, and take into
# account the necessary modifications for one real argument.
# special values
0 0 7 nan 7 nan 7 -inf 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 -inf N N
0 0 7 +inf 7 -inf 7 -inf 7 -1 7 -1 N N
0 0 7 +inf 7 nan 7 -inf 7 -1 7 -0 N N
0 0 7 +inf 7 nan 7 -inf 7 -1 7 +0 N N
0 0 7 +inf 7 +inf 7 -inf 7 -1 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 -inf N N
0 0 7 nan 7 -inf 7 -inf 7 -0 7 -1 N N
0 0 7 +inf 7 nan 7 -inf 7 -0 7 -0 N N
0 0 7 +inf 7 nan 7 -inf 7 -0 7 +0 N N
0 0 7 nan 7 +inf 7 -inf 7 -0 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 -inf N N
0 0 7 nan 7 -inf 7 -inf 7 +0 7 -1 N N
0 0 7 -inf 7 nan 7 -inf 7 +0 7 -0 N N
0 0 7 -inf 7 nan 7 -inf 7 +0 7 +0 N N
0 0 7 nan 7 +inf 7 -inf 7 +0 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 1 7 -inf N N
0 0 7 -inf 7 -inf 7 -inf 7 1 7 -1 N N
0 0 7 -inf 7 nan 7 -inf 7 1 7 -0 N N
0 0 7 -inf 7 nan 7 -inf 7 1 7 +0 N N
0 0 7 -inf 7 +inf 7 -inf 7 1 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 1 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 nan N N
0 0 7 +0 7 -0 7 -1 7 -inf 7 -inf N N
0 0 7 +0 7 -0 7 -1 7 -inf 7 -1 N N
0 0 7 +0 7 -0 7 -1 7 -inf 7 -0 N N
0 0 7 +0 7 +0 7 -1 7 -inf 7 +0 N N
0 0 7 +0 7 +0 7 -1 7 -inf 7 1 N N
0 0 7 +0 7 +0 7 -1 7 -inf 7 +inf N N
0 0 7 +0 7 +0 7 -1 7 -inf 7 nan N N
0 0 7 +0 7 -0 7 -1 7 -1 7 -inf N N
0 0 7 +0 7 +0 7 -1 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -1 7 nan N N
0 0 7 +0 7 -0 7 -1 7 -0 7 -inf N N
0 0 7 +0 7 +0 7 -1 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -0 7 nan N N
0 0 7 -0 7 -0 7 -1 7 +0 7 -inf N N
0 0 7 +0 7 +0 7 -1 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 +0 7 nan N N
0 0 7 -0 7 -0 7 -1 7 1 7 -inf N N
0 0 7 +0 7 +0 7 -1 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 1 7 nan N N
0 0 7 -0 7 -0 7 -1 7 +inf 7 -inf N N
0 0 7 -0 7 +0 7 -1 7 +inf 7 -1 N N
0 0 7 -0 7 +0 7 -1 7 +inf 7 -0 N N
0 0 7 -0 7 +0 7 -1 7 +inf 7 +0 N N
0 0 7 -0 7 +0 7 -1 7 +inf 7 1 N N
0 0 7 -0 7 +0 7 -1 7 +inf 7 +inf N N
0 0 7 -0 7 +0 7 -1 7 +inf 7 nan N N
0 0 7 -0 7 -0 7 -1 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 1 N N
0 0 7 +0 7 +0 7 -1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 nan 7 nan N N
0 0 7 +0 7 -0 7 -0 7 -inf 7 -inf N N
0 0 7 +0 7 -0 7 -0 7 -inf 7 -1 N N
0 0 7 +0 7 -0 7 -0 7 -inf 7 -0 N N
0 0 7 +0 7 +0 7 -0 7 -inf 7 +0 N N
0 0 7 +0 7 +0 7 -0 7 -inf 7 1 N N
0 0 7 +0 7 +0 7 -0 7 -inf 7 +inf N N
0 0 7 +0 7 +0 7 -0 7 -inf 7 nan N N
0 0 7 +0 7 -0 7 -0 7 -1 7 -inf N N
0 0 7 +0 7 +0 7 -0 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -1 7 nan N N
0 0 7 +0 7 -0 7 -0 7 -0 7 -inf N N
0 0 7 +0 7 +0 7 -0 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -0 7 nan N N
0 0 7 -0 7 +0 7 -0 7 +0 7 -inf N N
0 0 7 +0 7 +0 7 -0 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 +0 7 nan N N
0 0 7 -0 7 +0 7 -0 7 1 7 -inf N N
0 0 7 +0 7 +0 7 -0 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 1 7 nan N N
0 0 7 -0 7 +0 7 -0 7 +inf 7 -inf N N
0 0 7 -0 7 +0 7 -0 7 +inf 7 -1 N N
0 0 7 -0 7 +0 7 -0 7 +inf 7 -0 N N
0 0 7 +0 7 +0 7 -0 7 +inf 7 +0 N N
0 0 7 +0 7 +0 7 -0 7 +inf 7 1 N N
0 0 7 +0 7 +0 7 -0 7 +inf 7 +inf N N
0 0 7 +0 7 +0 7 -0 7 +inf 7 nan N N
0 0 7 -0 7 +0 7 -0 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 1 N N
0 0 7 +0 7 +0 7 -0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 nan 7 nan N N
0 0 7 -0 7 +0 7 +0 7 -inf 7 -inf N N
0 0 7 -0 7 +0 7 +0 7 -inf 7 -1 N N
0 0 7 -0 7 +0 7 +0 7 -inf 7 -0 N N
0 0 7 +0 7 -0 7 +0 7 -inf 7 +0 N N
0 0 7 +0 7 -0 7 +0 7 -inf 7 1 N N
0 0 7 +0 7 -0 7 +0 7 -inf 7 +inf N N
0 0 7 +0 7 -0 7 +0 7 -inf 7 nan N N
0 0 7 -0 7 +0 7 +0 7 -1 7 -inf N N
0 0 7 +0 7 -0 7 +0 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -1 7 nan N N
0 0 7 -0 7 +0 7 +0 7 -0 7 -inf N N
0 0 7 +0 7 -0 7 +0 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -0 7 nan N N
0 0 7 +0 7 +0 7 +0 7 +0 7 -inf N N
0 0 7 +0 7 +0 7 +0 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 +0 7 nan N N
0 0 7 +0 7 +0 7 +0 7 1 7 -inf N N
0 0 7 +0 7 +0 7 +0 7 1 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 1 7 nan N N
0 0 7 +0 7 +0 7 +0 7 +inf 7 -inf N N
0 0 7 +0 7 +0 7 +0 7 +inf 7 -1 N N
0 0 7 +0 7 +0 7 +0 7 +inf 7 -0 N N
0 0 7 +0 7 +0 7 +0 7 +inf 7 +0 N N
0 0 7 +0 7 +0 7 +0 7 +inf 7 1 N N
0 0 7 +0 7 +0 7 +0 7 +inf 7 +inf N N
0 0 7 +0 7 +0 7 +0 7 +inf 7 nan N N
0 0 7 +0 7 +0 7 +0 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 1 N N
0 0 7 +0 7 +0 7 +0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 nan 7 nan N N
0 0 7 -0 7 +0 7 1 7 -inf 7 -inf N N
0 0 7 -0 7 +0 7 1 7 -inf 7 -1 N N
0 0 7 -0 7 +0 7 1 7 -inf 7 -0 N N
0 0 7 -0 7 -0 7 1 7 -inf 7 +0 N N
0 0 7 -0 7 -0 7 1 7 -inf 7 1 N N
0 0 7 -0 7 -0 7 1 7 -inf 7 +inf N N
0 0 7 -0 7 -0 7 1 7 -inf 7 nan N N
0 0 7 -0 7 +0 7 1 7 -1 7 -inf N N
0 0 7 +0 7 -0 7 1 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -1 7 nan N N
0 0 7 -0 7 +0 7 1 7 -0 7 -inf N N
0 0 7 +0 7 -0 7 1 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -0 7 nan N N
0 0 7 +0 7 +0 7 1 7 +0 7 -inf N N
0 0 7 +0 7 -0 7 1 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 1 7 +0 7 nan N N
0 0 7 +0 7 +0 7 1 7 1 7 -inf N N
0 0 7 +0 7 -0 7 1 7 1 7 +inf N N
0 0 7 nan 7 nan 7 1 7 1 7 nan N N
0 0 7 +0 7 +0 7 1 7 +inf 7 -inf N N
0 0 7 +0 7 +0 7 1 7 +inf 7 -1 N N
0 0 7 +0 7 +0 7 1 7 +inf 7 -0 N N
0 0 7 +0 7 +0 7 1 7 +inf 7 +0 N N
0 0 7 +0 7 +0 7 1 7 +inf 7 1 N N
0 0 7 +0 7 -0 7 1 7 +inf 7 +inf N N
0 0 7 +0 7 +0 7 1 7 +inf 7 nan N N
0 0 7 +0 7 +0 7 1 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 1 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 1 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 1 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 1 7 nan 7 1 N N
0 0 7 +0 7 -0 7 1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 1 7 nan 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 -inf N N
0 0 7 -inf 7 +inf 7 +inf 7 -1 7 -1 N N
0 0 7 -inf 7 nan 7 +inf 7 -1 7 -0 N N
0 0 7 -inf 7 nan 7 +inf 7 -1 7 +0 N N
0 0 7 -inf 7 -inf 7 +inf 7 -1 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 -inf N N
0 0 7 nan 7 +inf 7 +inf 7 -0 7 -1 N N
0 0 7 -inf 7 nan 7 +inf 7 -0 7 -0 N N
0 0 7 -inf 7 nan 7 +inf 7 -0 7 +0 N N
0 0 7 nan 7 -inf 7 +inf 7 -0 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 -inf N N
0 0 7 nan 7 +inf 7 +inf 7 +0 7 -1 N N
0 0 7 +inf 7 nan 7 +inf 7 +0 7 -0 N N
0 0 7 +inf 7 nan 7 +inf 7 +0 7 +0 N N
0 0 7 nan 7 -inf 7 +inf 7 +0 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 1 7 -inf N N
0 0 7 +inf 7 +inf 7 +inf 7 1 7 -1 N N
0 0 7 +inf 7 nan 7 +inf 7 1 7 -0 N N
0 0 7 +inf 7 nan 7 +inf 7 1 7 +0 N N
0 0 7 +inf 7 -inf 7 +inf 7 1 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 1 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 1 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -1 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -0 7 nan N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 1 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +0 7 nan N N
0 0 7 nan 7 nan 7 nan 7 1 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 1 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 1 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 1 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 1 7 1 N N
0 0 7 nan 7 nan 7 nan 7 1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 1 7 nan N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 nan N N
# finite values
0 0 7 0.5 7 -0.5 7 -1 7 -1 7 -1 N N
0 0 7 1 7 -0 7 -1 7 -1 7 -0 N N
# cf line 2206 of div.dat, revision 658:
0 0 7 1 7 +0 7 -1 7 -1 7 +0 N N
0 0 7 0.5 7 0.5 7 -1 7 -1 7 1 N N
# cf line 2208 of div.dat, revision 658:
0 0 7 +0 7 -1 7 -1 7 -0 7 -1 N N
0 0 7 +inf 7 nan 7 -1 7 -0 7 -0 N N
0 0 7 +inf 7 nan 7 -1 7 -0 7 +0 N N
0 0 7 +0 7 1 7 -1 7 -0 7 1 N N
0 0 7 -0 7 -1 7 -1 7 +0 7 -1 N N
0 0 7 -inf 7 nan 7 -1 7 +0 7 -0 N N
0 0 7 -inf 7 nan 7 -1 7 +0 7 +0 N N
0 0 7 +0 7 1 7 -1 7 +0 7 1 N N
0 0 7 -0.5 7 -0.5 7 -1 7 1 7 -1 N N
0 0 7 -1 7 +0 7 -1 7 1 7 -0 N N
0 0 7 -1 7 +0 7 -1 7 1 7 +0 N N
0 0 7 -0.5 7 0.5 7 -1 7 1 7 1 N N
0 0 7 0 7 -0 7 -0 7 -1 7 -1 N N
0 0 7 +0 7 -0 7 -0 7 -1 7 -0 N N
# cf line 2270 of div.dat, revision 658:
0 0 7 +0 7 +0 7 -0 7 -1 7 +0 N N
0 0 7 +0 7 0 7 -0 7 -1 7 1 N N
# cf line 2272 of div.dat, revision 658:
0 0 7 +0 7 -0 7 -0 7 -0 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 -0 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 -0 7 +0 N N
0 0 7 +0 7 +0 7 -0 7 -0 7 1 N N
# cf line 2276 of div.dat, revision 658:
0 0 7 -0 7 +0 7 -0 7 +0 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 +0 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 +0 7 +0 N N
0 0 7 +0 7 +0 7 -0 7 +0 7 1 N N
0 0 7 -0 7 0 7 -0 7 1 7 -1 N N
0 0 7 -0 7 +0 7 -0 7 1 7 -0 N N
# cf line 2282 of div.dat, revision 658:
0 0 7 +0 7 +0 7 -0 7 1 7 +0 N N
0 0 7 0 7 +0 7 -0 7 1 7 1 N N
0 0 7 -0 7 0 7 +0 7 -1 7 -1 N N
# cf line 2333 of div.dat, revision 658:
0 0 7 -0 7 +0 7 +0 7 -1 7 -0 N N
# cf line 2334 of div.dat, revision 658:
0 0 7 +0 7 -0 7 +0 7 -1 7 +0 N N
0 0 7 0 7 -0 7 +0 7 -1 7 1 N N
0 0 7 -0 7 +0 7 +0 7 -0 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 -0 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 -0 7 +0 N N
0 0 7 +0 7 -0 7 +0 7 -0 7 1 N N
# cf line 2340 of div.dat, revision 658:
0 0 7 +0 7 +0 7 +0 7 +0 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 +0 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 +0 7 +0 N N
# cf line 2343 of div.dat, revision 658:
0 0 7 +0 7 +0 7 +0 7 +0 7 1 N N
0 0 7 0 7 +0 7 +0 7 1 7 -1 N N
0 0 7 +0 7 +0 7 +0 7 1 7 -0 N N
0 0 7 +0 7 +0 7 +0 7 1 7 +0 N N
0 0 7 +0 7 0 7 +0 7 1 7 1 N N
0 0 7 -0.5 7 0.5 7 1 7 -1 7 -1 N N
# cf line 2397 of div.dat, revision 658:
0 0 7 -1 7 +0 7 1 7 -1 7 -0 N N
0 0 7 -1 7 -0 7 1 7 -1 7 +0 N N
0 0 7 -0.5 7 -0.5 7 1 7 -1 7 1 N N
0 0 7 -0 7 1 7 1 7 -0 7 -1 N N
0 0 7 -inf 7 nan 7 1 7 -0 7 -0 N N
0 0 7 -inf 7 nan 7 1 7 -0 7 +0 N N
0 0 7 +0 7 -1 7 1 7 -0 7 1 N N
# cf line 2404 of div.dat, revision 658:
0 0 7 +0 7 1 7 1 7 +0 7 -1 N N
0 0 7 +inf 7 nan 7 1 7 +0 7 -0 N N
0 0 7 +inf 7 nan 7 1 7 +0 7 +0 N N
0 0 7 +0 7 -1 7 1 7 +0 7 1 N N
0 0 7 0.5 7 0.5 7 1 7 1 7 -1 N N
0 0 7 1 7 +0 7 1 7 1 7 -0 N N
0 0 7 1 7 +0 7 1 7 1 7 +0 N N
0 0 7 0.5 7 -0.5 7 1 7 1 7 1 N N
mpc-1.1.0/tests/tsqr.c 0000644 0001751 0001751 00000014501 12471661720 011521 0000000 0000000 /* tsqr -- test file for mpc_sqr.
Copyright (C) 2002, 2005, 2008, 2010, 2011, 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include
#include "mpc-tests.h"
static void
cmpsqr (mpc_srcptr x, mpc_rnd_t rnd)
/* computes the square of x with the specific function or by simple */
/* multiplication using the rounding mode rnd and compares the results */
/* and return values. */
/* In our current test suite, the real and imaginary parts of x have */
/* the same precision, and we use this precision also for the result. */
/* Furthermore, we check whether computing the square in the same */
/* place yields the same result. */
/* We also compute the result with four times the precision and check */
/* whether the rounding is correct. Error reports in this part of the */
/* algorithm might still be wrong, though, since there are two */
/* consecutive roundings. */
{
mpc_t z, t, u;
int inexact_z, inexact_t;
mpc_init2 (z, MPC_MAX_PREC (x));
mpc_init2 (t, MPC_MAX_PREC (x));
mpc_init2 (u, 4 * MPC_MAX_PREC (x));
inexact_z = mpc_sqr (z, x, rnd);
inexact_t = mpc_mul (t, x, x, rnd);
if (mpc_cmp (z, t))
{
fprintf (stderr, "sqr and mul differ for rnd=(%s,%s) \nx=",
mpfr_print_rnd_mode(MPC_RND_RE(rnd)),
mpfr_print_rnd_mode(MPC_RND_IM(rnd)));
mpc_out_str (stderr, 2, 0, x, MPC_RNDNN);
fprintf (stderr, "\nmpc_sqr gives ");
mpc_out_str (stderr, 2, 0, z, MPC_RNDNN);
fprintf (stderr, "\nmpc_mul gives ");
mpc_out_str (stderr, 2, 0, t, MPC_RNDNN);
fprintf (stderr, "\n");
exit (1);
}
if (inexact_z != inexact_t)
{
fprintf (stderr, "The return values of sqr and mul differ for rnd=(%s,%s) \nx= ",
mpfr_print_rnd_mode(MPC_RND_RE(rnd)),
mpfr_print_rnd_mode(MPC_RND_IM(rnd)));
mpc_out_str (stderr, 2, 0, x, MPC_RNDNN);
fprintf (stderr, "\nx^2=");
mpc_out_str (stderr, 2, 0, z, MPC_RNDNN);
fprintf (stderr, "\nmpc_sqr gives %i", inexact_z);
fprintf (stderr, "\nmpc_mul gives %i", inexact_t);
fprintf (stderr, "\n");
exit (1);
}
mpc_set (t, x, MPC_RNDNN);
inexact_t = mpc_sqr (t, t, rnd);
if (mpc_cmp (z, t))
{
fprintf (stderr, "sqr and sqr in place differ for rnd=(%s,%s) \nx=",
mpfr_print_rnd_mode(MPC_RND_RE(rnd)),
mpfr_print_rnd_mode(MPC_RND_IM(rnd)));
mpc_out_str (stderr, 2, 0, x, MPC_RNDNN);
fprintf (stderr, "\nmpc_sqr gives ");
mpc_out_str (stderr, 2, 0, z, MPC_RNDNN);
fprintf (stderr, "\nmpc_sqr in place gives ");
mpc_out_str (stderr, 2, 0, t, MPC_RNDNN);
fprintf (stderr, "\n");
exit (1);
}
if (inexact_z != inexact_t)
{
fprintf (stderr, "The return values of sqr and sqr in place differ for rnd=(%s,%s) \nx= ",
mpfr_print_rnd_mode(MPC_RND_RE(rnd)),
mpfr_print_rnd_mode(MPC_RND_IM(rnd)));
mpc_out_str (stderr, 2, 0, x, MPC_RNDNN);
fprintf (stderr, "\nx^2=");
mpc_out_str (stderr, 2, 0, z, MPC_RNDNN);
fprintf (stderr, "\nmpc_sqr gives %i", inexact_z);
fprintf (stderr, "\nmpc_sqr in place gives %i", inexact_t);
fprintf (stderr, "\n");
exit (1);
}
mpc_sqr (u, x, rnd);
mpc_set (t, u, rnd);
if (mpc_cmp (z, t))
{
fprintf (stderr, "rounding in sqr might be incorrect for rnd=(%s,%s) \nx=",
mpfr_print_rnd_mode(MPC_RND_RE(rnd)),
mpfr_print_rnd_mode(MPC_RND_IM(rnd)));
mpc_out_str (stderr, 2, 0, x, MPC_RNDNN);
fprintf (stderr, "\nmpc_sqr gives ");
mpc_out_str (stderr, 2, 0, z, MPC_RNDNN);
fprintf (stderr, "\nmpc_sqr quadruple precision gives ");
mpc_out_str (stderr, 2, 0, u, MPC_RNDNN);
fprintf (stderr, "\nand is rounded to ");
mpc_out_str (stderr, 2, 0, t, MPC_RNDNN);
fprintf (stderr, "\n");
exit (1);
}
mpc_clear (z);
mpc_clear (t);
mpc_clear (u);
}
static void
testsqr (long a, long b, mpfr_prec_t prec, mpc_rnd_t rnd)
{
mpc_t x;
mpc_init2 (x, prec);
mpc_set_si_si (x, a, b, rnd);
cmpsqr (x, rnd);
mpc_clear (x);
}
static void
reuse_bug (void)
{
mpc_t z1;
/* reuse bug found by Paul Zimmermann 20081021 */
mpc_init2 (z1, 2);
/* RE (z1^2) overflows, IM(z^2) = -0 */
mpfr_set_str (mpc_realref (z1), "0.11", 2, MPFR_RNDN);
mpfr_mul_2si (mpc_realref (z1), mpc_realref (z1), mpfr_get_emax (), MPFR_RNDN);
mpfr_set_ui (mpc_imagref (z1), 0, MPFR_RNDN);
mpc_conj (z1, z1, MPC_RNDNN);
mpc_sqr (z1, z1, MPC_RNDNN);
if (!mpfr_inf_p (mpc_realref (z1)) || mpfr_signbit (mpc_realref (z1))
||!mpfr_zero_p (mpc_imagref (z1)) || !mpfr_signbit (mpc_imagref (z1)))
{
printf ("Error: Regression, bug 20081021 reproduced\n");
MPC_OUT (z1);
exit (1);
}
mpc_clear (z1);
}
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_sqr (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_sqr (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
testsqr (247, -65, 8, 24);
testsqr (5, -896, 3, 2);
testsqr (-3, -512, 2, 16);
testsqr (266013312, 121990769, 27, 0);
testsqr (170, 9, 8, 0);
testsqr (768, 85, 8, 16);
testsqr (145, 1816, 8, 24);
testsqr (0, 1816, 8, 24);
testsqr (145, 0, 8, 24);
data_check_template ("sqr.dsc", "sqr.dat");
tgeneric_template ("sqr.dsc", 2, 1024, 1, 1024);
reuse_bug ();
test_end ();
return 0;
}
mpc-1.1.0/tests/acos.dat 0000644 0001751 0001751 00000015367 12426164730 012015 0000000 0000000 # Data file for mpc_acos.
#
# Copyright (C) INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP_RE OP_RE PREC_OP_IM OP_IM RND_RE RND_IM
#
# where op = op_re + i * op_im, rop = rop_re + i * rop_im,
# rop_re is ROP_RE rounded to nearest to the precision of PREC_ROP_RE
# rop_im is ROP_IM rounded to nearest to the precision of PREC_ROP_IM
# op_re is OP_RE rounded to nearest to the precision of PREC_OP_RE
# op_im is OP_IM rounded to nearest to the precision of PREC_OP_IM
# ROP_RE is checked against Re(acos op) rounded to the precision PREC_ROP_RE
# in the direction RND_RE
# ROP_IM is checked against Im(acos op) rounded to the precision PREC_ROP_IM
# in the direction RND_IM
# INEX_RE is the ternary value for the real part with the following notation:
# "?" ternary value not checked
# "+" if ROP_RE is greater than the exact mathematical result
# "0" if ROP_RE is exactly the mathematical result
# "-" if ROP_RE is less than the exact mathematical result
# (m.m. INEX_IM)
# rounding modes notation:
# "N" is rounding to nearest
# "Z" is rounding towards zero
# "U" is rounding towards plus infinity
# "D" is rounding towards minus infinity
# Use prefixes "0b" for values in base two, "0x" for values in base sixteen,
# no prefix for value in base ten.
# In all bases, "nan" is NaN, "inf" is infinity;
# The sign of the result is checked with "+inf", "-inf", "-0", or "+0".
# special values (following ISO C99 standard)
- 0 53 0x12D97C7F3321D2p-51 53 +inf 53 -inf 53 -inf N N
- 0 53 0x1921FB54442D18p-51 53 +inf 53 -inf 53 -1 N N
- 0 53 0x1921FB54442D18p-51 53 +inf 53 -inf 53 -0 N N
- 0 53 0x1921FB54442D18p-51 53 -inf 53 -inf 53 +0 N N
- 0 53 0x1921FB54442D18p-51 53 -inf 53 -inf 53 +1 N N
- 0 53 0x12D97C7F3321D2p-51 53 -inf 53 -inf 53 +inf N N
0 0 53 nan 53 inf 53 -inf 53 nan N N
- 0 53 0x1921FB54442D18p-52 53 +inf 53 -6 53 -inf N N
- 0 53 0x1921FB54442D18p-52 53 -inf 53 -6 53 +inf N N
0 0 53 nan 53 nan 53 -6 53 nan N N
- 0 53 0x1921FB54442D18p-52 53 +inf 53 -0.5 53 -inf N N
- 0 53 0x1921FB54442D18p-52 53 -inf 53 -0.5 53 +inf N N
0 0 53 nan 53 nan 53 -0.5 53 nan N N
- 0 53 0x1921FB54442D18p-52 53 +inf 53 -0 53 -inf N N
- 0 53 0x1921FB54442D18p-52 53 +0 53 -0 53 -0 N N
- 0 53 0x1921FB54442D18p-52 53 -0 53 -0 53 +0 N N
- 0 53 0x1921FB54442D18p-52 53 -inf 53 -0 53 +inf N N
- 0 53 0x1921FB54442D18p-52 53 nan 53 -0 53 nan N N
- 0 53 0x1921FB54442D18p-52 53 +inf 53 +0 53 -inf N N
- 0 53 0x1921FB54442D18p-52 53 +0 53 +0 53 -0 N N
- 0 53 0x1921FB54442D18p-52 53 -0 53 +0 53 +0 N N
- 0 53 0x1921FB54442D18p-52 53 -inf 53 +0 53 +inf N N
- 0 53 0x1921FB54442D18p-52 53 nan 53 +0 53 nan N N
- 0 53 0x1921FB54442D18p-52 53 +inf 53 +0.5 53 -inf N N
- 0 53 0x1921FB54442D18p-52 53 -inf 53 +0.5 53 +inf N N
0 0 53 nan 53 nan 53 +0.5 53 nan N N
- 0 53 0x1921FB54442D18p-52 53 +inf 53 +6 53 -inf N N
- 0 53 0x1921FB54442D18p-52 53 -inf 53 +6 53 +inf N N
0 0 53 nan 53 nan 53 +6 53 nan N N
- 0 53 0x1921FB54442D18p-53 53 +inf 53 +inf 53 -inf N N
0 0 53 +0 53 +inf 53 +inf 53 -1 N N
0 0 53 +0 53 +inf 53 +inf 53 -0 N N
0 0 53 +0 53 -inf 53 +inf 53 +0 N N
0 0 53 +0 53 -inf 53 +inf 53 +1 N N
- 0 53 0x1921FB54442D18p-53 53 -inf 53 +inf 53 +inf N N
0 0 53 nan 53 inf 53 +inf 53 nan N N
0 0 53 nan 53 +inf 53 nan 53 -inf N N
0 0 53 nan 53 nan 53 nan 53 -1 N N
0 0 53 nan 53 nan 53 nan 53 -0 N N
0 0 53 nan 53 nan 53 nan 53 +0 N N
0 0 53 nan 53 nan 53 nan 53 +1 N N
0 0 53 nan 53 -inf 53 nan 53 +inf N N
0 0 53 nan 53 nan 53 nan 53 nan N N
# pure real argument
- + 53 0x1921FB54442D18p-51 53 0x13D2B7539DBA4Cp-51 53 -6 53 -0 N N
- - 53 0x1921FB54442D18p-51 53 -0x13D2B7539DBA4Cp-51 53 -6 53 +0 N N
- + 53 0x1921FB54442D18p-51 53 0x15124271980435p-52 53 -2 53 -0 N N
- - 53 0x1921FB54442D18p-51 53 -0x15124271980435p-52 53 -2 53 +0 N N
- 0 53 0x1921FB54442D18p-51 53 +0 53 -1 53 -0 N N
- 0 53 0x1921FB54442D18p-51 53 -0 53 -1 53 +0 N N
+ 0 53 0x10C152382D7366p-51 53 +0 53 -0.5 53 -0 N N
+ 0 53 0x10C152382D7366p-51 53 -0 53 -0.5 53 +0 N N
+ 0 53 0x10C152382D7366p-52 53 -0 53 +0.5 53 +0 N N
+ 0 53 0x10C152382D7366p-52 53 +0 53 +0.5 53 -0 N N
0 0 53 +0 53 -0 53 +1 53 +0 N N
0 0 53 +0 53 +0 53 +1 53 -0 N N
0 - 53 +0 53 -0x15124271980435p-52 53 +2 53 +0 N N
0 + 53 +0 53 0x15124271980435p-52 53 +2 53 -0 N N
0 - 53 +0 53 -0x13D2B7539DBA4Cp-51 53 +6 53 +0 N N
0 + 53 +0 53 0x13D2B7539DBA4Cp-51 53 +6 53 -0 N N
# pure imaginary argument
- + 53 0x1921FB54442D18p-52 53 0x1D185B507EDC0Ep-52 53 -0 53 -3 N N
- + 53 0x1921FB54442D18p-52 53 0x1D185B507EDC0Ep-52 53 +0 53 -3 N N
- + 53 0x1921FB54442D18p-52 53 0x1FACFB2399E637p-55 53 -0 53 -.25 N N
- + 53 0x1921FB54442D18p-52 53 0x1FACFB2399E637p-55 53 +0 53 -.25 N N
- - 53 0x1921FB54442D18p-52 53 -0x1FACFB2399E637p-55 53 -0 53 +.25 N N
- - 53 0x1921FB54442D18p-52 53 -0x1FACFB2399E637p-55 53 +0 53 +.25 N N
- - 53 0x1921FB54442D18p-52 53 -0x1D185B507EDC0Ep-52 53 -0 53 +3 N N
- - 53 0x1921FB54442D18p-52 53 -0x1D185B507EDC0Ep-52 53 +0 53 +3 N N
# regular argument for various precisions
- + 2 0.5 2 -1 2 2 2 1 N Z
+ + 9 0x5Dp-6 9 0x9Fp-5 9 8.5 9 -71 N U
+ + 2 0x3p-9 2 1.5 2 2 2 -0x1p-7 U N
+ - 53 0x74C141310E695p-53 53 -0x1D6D2CFA9F3F11p-52 53 0x3243F6A8885A3p-48 53 0x162E42FEFA39EFp-53 N N
mpc-1.1.0/tests/trootofunity.c 0000644 0001751 0001751 00000004257 12744456667 013343 0000000 0000000 /* trootofunity -- test file for mpc_rootofunity.
Copyright (C) 2012, 2016 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_rootofunity (P[1].mpc, P[2].ui, P[3].ui, P[4].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
static void
check (unsigned long int n)
/* checks whether zeta_n^n = 1, which is somewhat dangerous in floating
point */
{
mpc_t z, zero;
mpfr_prec_t prec;
mpc_init2 (z, 2);
mpc_init2 (zero, 2);
for (prec = 2*n; prec < 1000; prec = (mpfr_prec_t) (prec * 1.1 + 1)) {
mpc_set_prec (z, prec);
mpc_set_prec (zero, prec);
mpc_rootofunity (z, n, 1, MPC_RNDNN);
mpc_pow_ui (zero, z, n, MPC_RNDNN);
mpc_sub_ui (zero, zero, 1u, MPC_RNDNN);
if (MPC_MAX (mpfr_get_exp (mpc_realref (zero)), mpfr_get_exp (mpc_imagref (zero)))
> - ((long int) prec - (long int) n)) {
fprintf (stderr, "rootofunity too imprecise for n=%lu\n", n);
MPC_OUT (z);
MPC_OUT (zero);
exit (1);
}
}
mpc_clear (z);
mpc_clear (zero);
}
int
main (void)
{
unsigned long int n;
for (n = 1; n < 10000; n += 10)
check (n);
test_start ();
data_check_template ("rootofunity.dsc", "rootofunity.dat");
/* Avoid checking roots of unity of high order at very low precision,
so start only at 20. */
tgeneric_template ("rootofunity.dsc", 20, 512, 7, 256);
test_end ();
return 0;
}
mpc-1.1.0/tests/tswap.c 0000644 0001751 0001751 00000003025 12426164730 011664 0000000 0000000 /* tswap -- Test file for mpc_swap.
Copyright (C) 2011 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
int
main (void)
{
mpc_t x, y, x2, y2;
mpc_init2 (x, 50);
mpc_init2 (x2, 50);
mpc_init2 (y, 100);
mpc_init2 (y2, 100);
mpc_set_ui_ui (x, 1ul, 2ul, MPC_RNDNN);
mpc_set_ui_ui (x2, 1ul, 2ul, MPC_RNDNN);
mpc_set_ui_ui (y, 3ul, 4ul, MPC_RNDNN);
mpc_set_ui_ui (y2, 3ul, 4ul, MPC_RNDNN);
mpc_swap (x, y);
if ( mpfr_get_prec (mpc_realref (x)) != mpfr_get_prec (mpc_realref (y2))
|| mpfr_get_prec (mpc_imagref (x)) != mpfr_get_prec (mpc_imagref (y2))
|| mpfr_get_prec (mpc_realref (y)) != mpfr_get_prec (mpc_realref (x2))
|| mpfr_get_prec (mpc_imagref (y)) != mpfr_get_prec (mpc_imagref (x2))
|| mpc_cmp (x, y2) != 0
|| mpc_cmp (y, x2) != 0)
exit (1);
mpc_clear (x);
mpc_clear (x2);
mpc_clear (y);
mpc_clear (y2);
return 0;
}
mpc-1.1.0/tests/check_data.c 0000644 0001751 0001751 00000007375 12471661720 012611 0000000 0000000 /* check_data.c -- Check computed data against reference result.
Copyright (C) 2012, 2013, 2014 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_INEX_CMP(c, r, i) \
(((r) == TERNARY_NOT_CHECKED || (r) == MPC_INEX_RE(c)) \
&& ((i) == TERNARY_NOT_CHECKED || (i) == MPC_INEX_IM (c)))
static int
check_param (mpc_operand_t* got, mpc_operand_t* expected, mpc_param_t t)
{
switch (t)
{
case NATIVE_INT:
return got->i == expected->i;
case NATIVE_UL:
return got->ui == expected->ui;
case NATIVE_L:
return got->si == expected->si;
case NATIVE_D:
return got->d == expected->d;
case GMP_Z:
return mpz_cmp (got->mpz, expected->mpz);
case GMP_Q:
return mpq_cmp (got->mpq, expected->mpq);
case GMP_F:
return mpf_cmp (got->mpf, expected->mpf);
case MPFR_INEX:
return expected->mpfr_inex == TERNARY_NOT_CHECKED
|| got->mpfr_inex == expected->mpfr_inex;
case MPFR:
return tpl_check_mpfr_data (got->mpfr,
expected->mpfr_data);
case MPC_INEX:
return MPC_INEX_CMP (got->mpc_inex,
expected->mpc_inex_data.real,
expected->mpc_inex_data.imag);
case MPC:
return tpl_check_mpc_data (got->mpc,
expected->mpc_data);
case MPCC_INEX:
return got->mpcc_inex == expected->mpcc_inex;
default:
fprintf (stderr, "check_data: unsupported type.\n");
exit (1);
}
}
void
check_data (mpc_datafile_context_t* dc, mpc_fun_param_t* params, int reused_op)
{
int out, i;
int total = params->nbout + params->nbin;
for (out = 0; out < params->nbout; out++)
{
if (!check_param (&(params->P[out]), &(params->P[total + out]),
params->T[out]))
{
printf ("%s() failed", params->name);
if (dc != NULL)
printf (" (line %lu, file %s)",
dc->test_line_number, dc->pathname);
else
printf (" with random parameter%c",
params->nbin > 2 ? 's' : '\0');
if (reused_op != 0)
printf (" when reusing input parameter op%d as output parameter",
reused_op - params->nbout);
printf ("\n");
for (i = 0; i < params->nbin; i++)
{
printf ("op%d", i + 1);
print_parameter (params, params->nbout + i);
}
for (i = 0; i < params->nbout; i++)
{
if ((params->T[i] == MPFR_INEX && params->T[out] != MPFR_INEX)
|| (params->T[i] == MPC_INEX && params->T[out] != MPC_INEX))
continue; /* don't print inexact flag if it is correct */
printf (" got%c",
(total + i > params->nbout ? '\0' : i + '0'));
print_parameter (params, i);
printf ("expected%c",
(total + i > params->nbout ? '\0' : i + '0'));
print_parameter (params, total + i);
}
printf ("\n");
exit (1);
}
}
}
mpc-1.1.0/tests/abs.dat 0000644 0001751 0001751 00000006045 12426164730 011626 0000000 0000000 # Data file for mpc_abs.
#
# Copyright (C) 2008 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX PREC_ROP ROP PREC_ROP_IM ROP_IM PREC_OP_RE OP_RE PREC_OP_IM OP_IM RND
#
# where op = op_re + i * op_im,
# rop is ROP rounded to nearest to the precision of PREC_ROP
# op_re is OP_RE rounded to nearest to the precision of PREC_OP_RE
# op_im is OP_IM rounded to nearest to the precision of PREC_OP_IM
# ROP is checked against abs(op) rounded to the precision PREC_ROP
# in the direction RND
# INEX is the ternary value with the following notation:
# "?" ternary value not checked
# "+" if ROP is greater than the exact mathematical result
# "0" if ROP is exactly the mathematical result
# "-" if ROP is less than the exact mathematical result
# rounding modes notation:
# "N" is rounding to nearest
# "Z" is rounding towards zero
# "U" is rounding towards plus infinity
# "D" is rounding towards minus infinity
# Use prefixes "0b" for values in base two, "0x" for values in base sixteen,
# no prefix for value in base ten.
# In all bases, "nan" is NaN, "inf" is infinity;
# The sign of the result is checked with "+inf", "-inf", "-0", or "+0".
# special values (following ISO C99 standard)
0 53 +inf 53 -inf 53 -inf N
0 53 +inf 53 -inf 53 -1 N
0 53 +inf 53 -inf 53 -0 N
0 53 +inf 53 -inf 53 +0 N
0 53 +inf 53 -inf 53 +1 N
0 53 +inf 53 -inf 53 +inf N
0 53 +inf 53 -inf 53 nan N
0 53 +inf 53 -1 53 -inf N
0 53 +inf 53 -1 53 +inf N
0 53 nan 53 -1 53 nan N
0 53 +inf 53 -0 53 -inf N
0 53 +0 53 -0 53 -0 N
0 53 +0 53 -0 53 +0 N
0 53 +inf 53 -0 53 +inf N
0 53 nan 53 -0 53 nan N
0 53 +inf 53 +0 53 -inf N
0 53 +0 53 +0 53 -0 N
0 53 +0 53 +0 53 +0 N
0 53 +inf 53 +0 53 +inf N
0 53 nan 53 +0 53 nan N
0 53 +inf 53 +1 53 -inf N
0 53 +inf 53 +1 53 +inf N
0 53 nan 53 +1 53 nan N
0 53 +inf 53 +inf 53 -inf N
0 53 +inf 53 +inf 53 -1 N
0 53 +inf 53 +inf 53 -0 N
0 53 +inf 53 +inf 53 +0 N
0 53 +inf 53 +inf 53 +1 N
0 53 +inf 53 +inf 53 +inf N
0 53 +inf 53 +inf 53 nan N
0 53 +inf 53 nan 53 -inf N
0 53 nan 53 nan 53 -1 N
0 53 nan 53 nan 53 -0 N
0 53 nan 53 nan 53 +0 N
0 53 nan 53 nan 53 +1 N
0 53 +inf 53 nan 53 +inf N
0 53 nan 53 nan 53 nan N
mpc-1.1.0/tests/tneg.c 0000644 0001751 0001751 00000002316 12471661720 011466 0000000 0000000 /* tneg -- test file for mpc_neg.
Copyright (C) 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_neg (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_neg (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("neg.dsc", "neg.dat");
tgeneric_template ("neg.dsc", 2, 1024, 1, 0);
test_end ();
return 0;
}
mpc-1.1.0/tests/tnorm.c 0000644 0001751 0001751 00000005700 12471661720 011670 0000000 0000000 /* tnorm -- test file for mpc_norm.
Copyright (C) 2008, 2011, 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
static void
test_underflow (void)
{
mpfr_exp_t emin = mpfr_get_emin ();
mpc_t z;
mpfr_t f;
int inex;
mpfr_set_emin (-1); /* smallest positive number is 0.5*2^emin = 0.25 */
mpc_init2 (z, 10);
mpfr_set_ui_2exp (mpc_realref (z), 1023, -11, MPFR_RNDN); /* exact */
mpfr_set_ui_2exp (mpc_imagref (z), 1023, -11, MPFR_RNDN); /* exact */
mpfr_init2 (f, 10);
inex = mpc_norm (f, z, MPFR_RNDZ); /* should give 511/1024 */
if (inex >= 0)
{
printf ("Error in underflow case (1)\n");
printf ("expected inex < 0, got %d\n", inex);
exit (1);
}
if (mpfr_cmp_ui_2exp (f, 511, -10) != 0)
{
printf ("Error in underflow case (1)\n");
printf ("got ");
mpfr_dump (f);
printf ("expected ");
mpfr_set_ui_2exp (f, 511, -10, MPFR_RNDZ);
mpfr_dump (f);
exit (1);
}
inex = mpc_norm (f, z, MPFR_RNDN); /* should give 511/1024 */
if (inex >= 0)
{
printf ("Error in underflow case (2)\n");
printf ("expected inex < 0, got %d\n", inex);
exit (1);
}
if (mpfr_cmp_ui_2exp (f, 511, -10) != 0)
{
printf ("Error in underflow case (2)\n");
printf ("got ");
mpfr_dump (f);
printf ("expected ");
mpfr_set_ui_2exp (f, 511, -10, MPFR_RNDZ);
mpfr_dump (f);
exit (1);
}
inex = mpc_norm (f, z, MPFR_RNDU); /* should give 1023/2048 */
if (inex <= 0)
{
printf ("Error in underflow case (3)\n");
printf ("expected inex > 0, got %d\n", inex);
exit (1);
}
if (mpfr_cmp_ui_2exp (f, 1023, -11) != 0)
{
printf ("Error in underflow case (3)\n");
printf ("got ");
mpfr_dump (f);
printf ("expected ");
mpfr_set_ui_2exp (f, 1023, -11, MPFR_RNDZ);
mpfr_dump (f);
exit (1);
}
mpc_clear (z);
mpfr_clear (f);
mpfr_set_emin (emin);
}
#define MPC_FUNCTION_CALL \
P[0].mpfr_inex = mpc_norm (P[1].mpfr, P[2].mpc, P[3].mpfr_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("norm.dsc", "norm.dat");
tgeneric_template ("norm.dsc", 2, 1024, 1, 4096);
test_underflow ();
test_end ();
return 0;
}
mpc-1.1.0/tests/tacosh.c 0000644 0001751 0001751 00000003136 12471661720 012013 0000000 0000000 /* tacosh.c -- test file for mpc_acosh.
Copyright (C) 2009, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
static void
bug20091120 (void)
{
mpc_t x, y;
mpc_init2 (x, 53);
mpc_init3 (y, 17, 42);
mpc_set_ui_ui (x, 1, 1, MPC_RNDNN);
mpc_acosh (y, x, MPC_RNDNN);
if (mpfr_get_prec (mpc_realref(y)) != 17 ||
mpfr_get_prec (mpc_imagref(y)) != 42)
{
printf ("Error, mpc_acosh changed the precisions!!!\n");
exit (1);
}
mpc_clear (x);
mpc_clear (y);
}
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_acosh (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_acosh (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
bug20091120 ();
data_check_template ("acosh.dsc", "acosh.dat");
tgeneric_template ("acosh.dsc", 2, 512, 7, 7);
test_end ();
return 0;
}
mpc-1.1.0/tests/sub_fr.dsc 0000644 0001751 0001751 00000001617 12471661720 012343 0000000 0000000 # Description file for mpc_sub_fr
#
# Copyright (C) 2008, 2010, 2011, 2012, INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_sub_fr
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpfr_srcptr
mpc_rnd_t
mpc-1.1.0/tests/sub_fr.dat 0000644 0001751 0001751 00000041753 12426164730 012346 0000000 0000000 # Data file for mpc_sub_fr.
#
# Copyright (C) 2008 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
# For explanations on the file format, see add_fr.dat.
# special values
0 0 7 nan 7 -inf 7 -inf 7 -inf 7 -inf N N
0 0 7 -inf 7 -inf 7 -inf 7 -inf 7 -1 N N
0 0 7 -inf 7 -inf 7 -inf 7 -inf 7 -0 N N
0 0 7 -inf 7 -inf 7 -inf 7 -inf 7 +0 N N
0 0 7 -inf 7 -inf 7 -inf 7 -inf 7 1 N N
0 0 7 -inf 7 -inf 7 -inf 7 -inf 7 +inf N N
0 0 7 nan 7 -inf 7 -inf 7 -inf 7 nan N N
0 0 7 nan 7 -1 7 -inf 7 -1 7 -inf N N
0 0 7 -inf 7 -1 7 -inf 7 -1 7 -1 N N
0 0 7 -inf 7 -1 7 -inf 7 -1 7 -0 N N
0 0 7 -inf 7 -1 7 -inf 7 -1 7 +0 N N
0 0 7 -inf 7 -1 7 -inf 7 -1 7 1 N N
0 0 7 -inf 7 -1 7 -inf 7 -1 7 +inf N N
0 0 7 nan 7 -1 7 -inf 7 -1 7 nan N N
0 0 7 nan 7 -0 7 -inf 7 -0 7 -inf N N
0 0 7 -inf 7 -0 7 -inf 7 -0 7 -1 N N
0 0 7 -inf 7 -0 7 -inf 7 -0 7 -0 N N
0 0 7 -inf 7 -0 7 -inf 7 -0 7 +0 N N
0 0 7 -inf 7 -0 7 -inf 7 -0 7 1 N N
0 0 7 -inf 7 -0 7 -inf 7 -0 7 +inf N N
0 0 7 nan 7 -0 7 -inf 7 -0 7 nan N N
0 0 7 nan 7 +0 7 -inf 7 +0 7 -inf N N
0 0 7 -inf 7 +0 7 -inf 7 +0 7 -1 N N
0 0 7 -inf 7 +0 7 -inf 7 +0 7 -0 N N
0 0 7 -inf 7 +0 7 -inf 7 +0 7 +0 N N
0 0 7 -inf 7 +0 7 -inf 7 +0 7 1 N N
0 0 7 -inf 7 +0 7 -inf 7 +0 7 +inf N N
0 0 7 nan 7 +0 7 -inf 7 +0 7 nan N N
0 0 7 nan 7 1 7 -inf 7 1 7 -inf N N
0 0 7 -inf 7 1 7 -inf 7 1 7 -1 N N
0 0 7 -inf 7 1 7 -inf 7 1 7 -0 N N
0 0 7 -inf 7 1 7 -inf 7 1 7 +0 N N
0 0 7 -inf 7 1 7 -inf 7 1 7 1 N N
0 0 7 -inf 7 1 7 -inf 7 1 7 +inf N N
0 0 7 nan 7 1 7 -inf 7 1 7 nan N N
0 0 7 nan 7 +inf 7 -inf 7 +inf 7 -inf N N
0 0 7 -inf 7 +inf 7 -inf 7 +inf 7 -1 N N
0 0 7 -inf 7 +inf 7 -inf 7 +inf 7 -0 N N
0 0 7 -inf 7 +inf 7 -inf 7 +inf 7 +0 N N
0 0 7 -inf 7 +inf 7 -inf 7 +inf 7 1 N N
0 0 7 -inf 7 +inf 7 -inf 7 +inf 7 +inf N N
0 0 7 nan 7 +inf 7 -inf 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 -inf N N
0 0 7 -inf 7 nan 7 -inf 7 nan 7 -1 N N
0 0 7 -inf 7 nan 7 -inf 7 nan 7 -0 N N
0 0 7 -inf 7 nan 7 -inf 7 nan 7 +0 N N
0 0 7 -inf 7 nan 7 -inf 7 nan 7 1 N N
0 0 7 -inf 7 nan 7 -inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 nan N N
0 0 7 +inf 7 -inf 7 -1 7 -inf 7 -inf N N
0 0 7 0 7 -inf 7 -1 7 -inf 7 -1 N N
0 0 7 -1 7 -inf 7 -1 7 -inf 7 -0 N N
0 0 7 -1 7 -inf 7 -1 7 -inf 7 +0 N N
0 0 7 -2 7 -inf 7 -1 7 -inf 7 1 N N
0 0 7 -inf 7 -inf 7 -1 7 -inf 7 +inf N N
0 0 7 nan 7 -inf 7 -1 7 -inf 7 nan N N
0 0 7 +inf 7 -1 7 -1 7 -1 7 -inf N N
0 0 7 -inf 7 -1 7 -1 7 -1 7 +inf N N
0 0 7 nan 7 -1 7 -1 7 -1 7 nan N N
0 0 7 +inf 7 -0 7 -1 7 -0 7 -inf N N
0 0 7 -inf 7 -0 7 -1 7 -0 7 +inf N N
0 0 7 nan 7 -0 7 -1 7 -0 7 nan N N
0 0 7 +inf 7 +0 7 -1 7 +0 7 -inf N N
0 0 7 -inf 7 +0 7 -1 7 +0 7 +inf N N
0 0 7 nan 7 +0 7 -1 7 +0 7 nan N N
0 0 7 +inf 7 1 7 -1 7 1 7 -inf N N
0 0 7 -inf 7 1 7 -1 7 1 7 +inf N N
0 0 7 nan 7 1 7 -1 7 1 7 nan N N
0 0 7 +inf 7 +inf 7 -1 7 +inf 7 -inf N N
0 0 7 0 7 +inf 7 -1 7 +inf 7 -1 N N
0 0 7 -1 7 +inf 7 -1 7 +inf 7 -0 N N
0 0 7 -1 7 +inf 7 -1 7 +inf 7 +0 N N
0 0 7 -2 7 +inf 7 -1 7 +inf 7 1 N N
0 0 7 -inf 7 +inf 7 -1 7 +inf 7 +inf N N
0 0 7 nan 7 +inf 7 -1 7 +inf 7 nan N N
0 0 7 +inf 7 nan 7 -1 7 nan 7 -inf N N
0 0 7 0 7 nan 7 -1 7 nan 7 -1 N N
0 0 7 -1 7 nan 7 -1 7 nan 7 -0 N N
0 0 7 -1 7 nan 7 -1 7 nan 7 +0 N N
0 0 7 -2 7 nan 7 -1 7 nan 7 1 N N
0 0 7 -inf 7 nan 7 -1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 nan 7 nan N N
0 0 7 +inf 7 -inf 7 -0 7 -inf 7 -inf N N
0 0 7 1 7 -inf 7 -0 7 -inf 7 -1 N N
0 0 7 0 7 -inf 7 -0 7 -inf 7 -0 N N
0 0 7 -0 7 -inf 7 -0 7 -inf 7 +0 N N
0 0 7 -1 7 -inf 7 -0 7 -inf 7 1 N N
0 0 7 -inf 7 -inf 7 -0 7 -inf 7 +inf N N
0 0 7 nan 7 -inf 7 -0 7 -inf 7 nan N N
0 0 7 +inf 7 -1 7 -0 7 -1 7 -inf N N
0 0 7 -inf 7 -1 7 -0 7 -1 7 +inf N N
0 0 7 nan 7 -1 7 -0 7 -1 7 nan N N
0 0 7 +inf 7 -0 7 -0 7 -0 7 -inf N N
0 0 7 -inf 7 -0 7 -0 7 -0 7 +inf N N
0 0 7 nan 7 -0 7 -0 7 -0 7 nan N N
0 0 7 +inf 7 +0 7 -0 7 +0 7 -inf N N
0 0 7 -inf 7 +0 7 -0 7 +0 7 +inf N N
0 0 7 nan 7 +0 7 -0 7 +0 7 nan N N
0 0 7 +inf 7 1 7 -0 7 1 7 -inf N N
0 0 7 -inf 7 1 7 -0 7 1 7 +inf N N
0 0 7 nan 7 1 7 -0 7 1 7 nan N N
0 0 7 +inf 7 +inf 7 -0 7 +inf 7 -inf N N
0 0 7 1 7 +inf 7 -0 7 +inf 7 -1 N N
0 0 7 0 7 +inf 7 -0 7 +inf 7 -0 N N
0 0 7 -0 7 +inf 7 -0 7 +inf 7 +0 N N
0 0 7 -1 7 +inf 7 -0 7 +inf 7 1 N N
0 0 7 -inf 7 +inf 7 -0 7 +inf 7 +inf N N
0 0 7 nan 7 +inf 7 -0 7 +inf 7 nan N N
0 0 7 +inf 7 nan 7 -0 7 nan 7 -inf N N
0 0 7 1 7 nan 7 -0 7 nan 7 -1 N N
0 0 7 0 7 nan 7 -0 7 nan 7 -0 N N
0 0 7 -0 7 nan 7 -0 7 nan 7 +0 N N
0 0 7 -1 7 nan 7 -0 7 nan 7 1 N N
0 0 7 -inf 7 nan 7 -0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 nan 7 nan N N
0 0 7 +inf 7 -inf 7 +0 7 -inf 7 -inf N N
0 0 7 1 7 -inf 7 +0 7 -inf 7 -1 N N
0 0 7 +0 7 -inf 7 +0 7 -inf 7 -0 N N
0 0 7 0 7 -inf 7 +0 7 -inf 7 +0 N N
0 0 7 -1 7 -inf 7 +0 7 -inf 7 1 N N
0 0 7 -inf 7 -inf 7 +0 7 -inf 7 +inf N N
0 0 7 nan 7 -inf 7 +0 7 -inf 7 nan N N
0 0 7 +inf 7 -1 7 +0 7 -1 7 -inf N N
0 0 7 -inf 7 -1 7 +0 7 -1 7 +inf N N
0 0 7 nan 7 -1 7 +0 7 -1 7 nan N N
0 0 7 +inf 7 -0 7 +0 7 -0 7 -inf N N
0 0 7 -inf 7 -0 7 +0 7 -0 7 +inf N N
0 0 7 nan 7 -0 7 +0 7 -0 7 nan N N
0 0 7 +inf 7 +0 7 +0 7 +0 7 -inf N N
0 0 7 -inf 7 +0 7 +0 7 +0 7 +inf N N
0 0 7 nan 7 +0 7 +0 7 +0 7 nan N N
0 0 7 +inf 7 1 7 +0 7 1 7 -inf N N
0 0 7 -inf 7 1 7 +0 7 1 7 +inf N N
0 0 7 nan 7 1 7 +0 7 1 7 nan N N
0 0 7 +inf 7 +inf 7 +0 7 +inf 7 -inf N N
0 0 7 1 7 +inf 7 +0 7 +inf 7 -1 N N
0 0 7 +0 7 +inf 7 +0 7 +inf 7 -0 N N
0 0 7 0 7 +inf 7 +0 7 +inf 7 +0 N N
0 0 7 -1 7 +inf 7 +0 7 +inf 7 1 N N
0 0 7 -inf 7 +inf 7 +0 7 +inf 7 +inf N N
0 0 7 nan 7 +inf 7 +0 7 +inf 7 nan N N
0 0 7 +inf 7 nan 7 +0 7 nan 7 -inf N N
0 0 7 1 7 nan 7 +0 7 nan 7 -1 N N
0 0 7 +0 7 nan 7 +0 7 nan 7 -0 N N
0 0 7 0 7 nan 7 +0 7 nan 7 +0 N N
0 0 7 -1 7 nan 7 +0 7 nan 7 1 N N
0 0 7 -inf 7 nan 7 +0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 nan 7 nan N N
0 0 7 +inf 7 -inf 7 1 7 -inf 7 -inf N N
0 0 7 2 7 -inf 7 1 7 -inf 7 -1 N N
0 0 7 1 7 -inf 7 1 7 -inf 7 -0 N N
0 0 7 1 7 -inf 7 1 7 -inf 7 +0 N N
0 0 7 0 7 -inf 7 1 7 -inf 7 1 N N
0 0 7 -inf 7 -inf 7 1 7 -inf 7 +inf N N
0 0 7 nan 7 -inf 7 1 7 -inf 7 nan N N
0 0 7 +inf 7 -1 7 1 7 -1 7 -inf N N
0 0 7 -inf 7 -1 7 1 7 -1 7 +inf N N
0 0 7 nan 7 -1 7 1 7 -1 7 nan N N
0 0 7 +inf 7 -0 7 1 7 -0 7 -inf N N
0 0 7 -inf 7 -0 7 1 7 -0 7 +inf N N
0 0 7 nan 7 -0 7 1 7 -0 7 nan N N
0 0 7 +inf 7 +0 7 1 7 +0 7 -inf N N
0 0 7 -inf 7 +0 7 1 7 +0 7 +inf N N
0 0 7 nan 7 +0 7 1 7 +0 7 nan N N
0 0 7 +inf 7 1 7 1 7 1 7 -inf N N
0 0 7 -inf 7 1 7 1 7 1 7 +inf N N
0 0 7 nan 7 1 7 1 7 1 7 nan N N
0 0 7 +inf 7 +inf 7 1 7 +inf 7 -inf N N
0 0 7 2 7 +inf 7 1 7 +inf 7 -1 N N
0 0 7 1 7 +inf 7 1 7 +inf 7 -0 N N
0 0 7 1 7 +inf 7 1 7 +inf 7 +0 N N
0 0 7 0 7 +inf 7 1 7 +inf 7 1 N N
0 0 7 -inf 7 +inf 7 1 7 +inf 7 +inf N N
0 0 7 nan 7 +inf 7 1 7 +inf 7 nan N N
0 0 7 +inf 7 nan 7 1 7 nan 7 -inf N N
0 0 7 2 7 nan 7 1 7 nan 7 -1 N N
0 0 7 1 7 nan 7 1 7 nan 7 -0 N N
0 0 7 1 7 nan 7 1 7 nan 7 +0 N N
0 0 7 0 7 nan 7 1 7 nan 7 1 N N
0 0 7 -inf 7 nan 7 1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 1 7 nan 7 nan N N
0 0 7 +inf 7 -inf 7 +inf 7 -inf 7 -inf N N
0 0 7 +inf 7 -inf 7 +inf 7 -inf 7 -1 N N
0 0 7 +inf 7 -inf 7 +inf 7 -inf 7 -0 N N
0 0 7 +inf 7 -inf 7 +inf 7 -inf 7 +0 N N
0 0 7 +inf 7 -inf 7 +inf 7 -inf 7 1 N N
0 0 7 nan 7 -inf 7 +inf 7 -inf 7 +inf N N
0 0 7 nan 7 -inf 7 +inf 7 -inf 7 nan N N
0 0 7 +inf 7 -1 7 +inf 7 -1 7 -inf N N
0 0 7 +inf 7 -1 7 +inf 7 -1 7 -1 N N
0 0 7 +inf 7 -1 7 +inf 7 -1 7 -0 N N
0 0 7 +inf 7 -1 7 +inf 7 -1 7 +0 N N
0 0 7 +inf 7 -1 7 +inf 7 -1 7 1 N N
0 0 7 nan 7 -1 7 +inf 7 -1 7 +inf N N
0 0 7 nan 7 -1 7 +inf 7 -1 7 nan N N
0 0 7 +inf 7 -0 7 +inf 7 -0 7 -inf N N
0 0 7 +inf 7 -0 7 +inf 7 -0 7 -1 N N
0 0 7 +inf 7 -0 7 +inf 7 -0 7 -0 N N
0 0 7 +inf 7 -0 7 +inf 7 -0 7 +0 N N
0 0 7 +inf 7 -0 7 +inf 7 -0 7 1 N N
0 0 7 nan 7 -0 7 +inf 7 -0 7 +inf N N
0 0 7 nan 7 -0 7 +inf 7 -0 7 nan N N
0 0 7 +inf 7 +0 7 +inf 7 +0 7 -inf N N
0 0 7 +inf 7 +0 7 +inf 7 +0 7 -1 N N
0 0 7 +inf 7 +0 7 +inf 7 +0 7 -0 N N
0 0 7 +inf 7 +0 7 +inf 7 +0 7 +0 N N
0 0 7 +inf 7 +0 7 +inf 7 +0 7 1 N N
0 0 7 nan 7 +0 7 +inf 7 +0 7 +inf N N
0 0 7 nan 7 +0 7 +inf 7 +0 7 nan N N
0 0 7 +inf 7 1 7 +inf 7 1 7 -inf N N
0 0 7 +inf 7 1 7 +inf 7 1 7 -1 N N
0 0 7 +inf 7 1 7 +inf 7 1 7 -0 N N
0 0 7 +inf 7 1 7 +inf 7 1 7 +0 N N
0 0 7 +inf 7 1 7 +inf 7 1 7 1 N N
0 0 7 nan 7 1 7 +inf 7 1 7 +inf N N
0 0 7 nan 7 1 7 +inf 7 1 7 nan N N
0 0 7 +inf 7 +inf 7 +inf 7 +inf 7 -inf N N
0 0 7 +inf 7 +inf 7 +inf 7 +inf 7 -1 N N
0 0 7 +inf 7 +inf 7 +inf 7 +inf 7 -0 N N
0 0 7 +inf 7 +inf 7 +inf 7 +inf 7 +0 N N
0 0 7 +inf 7 +inf 7 +inf 7 +inf 7 1 N N
0 0 7 nan 7 +inf 7 +inf 7 +inf 7 +inf N N
0 0 7 nan 7 +inf 7 +inf 7 +inf 7 nan N N
0 0 7 +inf 7 nan 7 +inf 7 nan 7 -inf N N
0 0 7 +inf 7 nan 7 +inf 7 nan 7 -1 N N
0 0 7 +inf 7 nan 7 +inf 7 nan 7 -0 N N
0 0 7 +inf 7 nan 7 +inf 7 nan 7 +0 N N
0 0 7 +inf 7 nan 7 +inf 7 nan 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 nan N N
0 0 7 nan 7 -inf 7 nan 7 -inf 7 -inf N N
0 0 7 nan 7 -inf 7 nan 7 -inf 7 -1 N N
0 0 7 nan 7 -inf 7 nan 7 -inf 7 -0 N N
0 0 7 nan 7 -inf 7 nan 7 -inf 7 +0 N N
0 0 7 nan 7 -inf 7 nan 7 -inf 7 1 N N
0 0 7 nan 7 -inf 7 nan 7 -inf 7 +inf N N
0 0 7 nan 7 -inf 7 nan 7 -inf 7 nan N N
0 0 7 nan 7 -1 7 nan 7 -1 7 -inf N N
0 0 7 nan 7 -1 7 nan 7 -1 7 -1 N N
0 0 7 nan 7 -1 7 nan 7 -1 7 -0 N N
0 0 7 nan 7 -1 7 nan 7 -1 7 +0 N N
0 0 7 nan 7 -1 7 nan 7 -1 7 1 N N
0 0 7 nan 7 -1 7 nan 7 -1 7 +inf N N
0 0 7 nan 7 -1 7 nan 7 -1 7 nan N N
0 0 7 nan 7 -0 7 nan 7 -0 7 -inf N N
0 0 7 nan 7 -0 7 nan 7 -0 7 -1 N N
0 0 7 nan 7 -0 7 nan 7 -0 7 -0 N N
0 0 7 nan 7 -0 7 nan 7 -0 7 +0 N N
0 0 7 nan 7 -0 7 nan 7 -0 7 1 N N
0 0 7 nan 7 -0 7 nan 7 -0 7 +inf N N
0 0 7 nan 7 -0 7 nan 7 -0 7 nan N N
0 0 7 nan 7 +0 7 nan 7 +0 7 -inf N N
0 0 7 nan 7 +0 7 nan 7 +0 7 -1 N N
0 0 7 nan 7 +0 7 nan 7 +0 7 -0 N N
0 0 7 nan 7 +0 7 nan 7 +0 7 +0 N N
0 0 7 nan 7 +0 7 nan 7 +0 7 1 N N
0 0 7 nan 7 +0 7 nan 7 +0 7 +inf N N
0 0 7 nan 7 +0 7 nan 7 +0 7 nan N N
0 0 7 nan 7 1 7 nan 7 1 7 -inf N N
0 0 7 nan 7 1 7 nan 7 1 7 -1 N N
0 0 7 nan 7 1 7 nan 7 1 7 -0 N N
0 0 7 nan 7 1 7 nan 7 1 7 +0 N N
0 0 7 nan 7 1 7 nan 7 1 7 1 N N
0 0 7 nan 7 1 7 nan 7 1 7 +inf N N
0 0 7 nan 7 1 7 nan 7 1 7 nan N N
0 0 7 nan 7 +inf 7 nan 7 +inf 7 -inf N N
0 0 7 nan 7 +inf 7 nan 7 +inf 7 -1 N N
0 0 7 nan 7 +inf 7 nan 7 +inf 7 -0 N N
0 0 7 nan 7 +inf 7 nan 7 +inf 7 +0 N N
0 0 7 nan 7 +inf 7 nan 7 +inf 7 1 N N
0 0 7 nan 7 +inf 7 nan 7 +inf 7 +inf N N
0 0 7 nan 7 +inf 7 nan 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 nan N N
# values with only 1, -1, +0, -0
0 0 7 0 7 -1 7 -1 7 -1 7 -1 N N
0 0 7 -1 7 -1 7 -1 7 -1 7 -0 N N
0 0 7 -1 7 -1 7 -1 7 -1 7 +0 N N
0 0 7 -2 7 -1 7 -1 7 -1 7 1 N N
0 0 7 0 7 -0 7 -1 7 -0 7 -1 N N
0 0 7 -1 7 -0 7 -1 7 -0 7 -0 N N
0 0 7 -1 7 -0 7 -1 7 -0 7 +0 N N
0 0 7 -2 7 -0 7 -1 7 -0 7 1 N N
0 0 7 0 7 +0 7 -1 7 +0 7 -1 N N
0 0 7 -1 7 +0 7 -1 7 +0 7 -0 N N
0 0 7 -1 7 +0 7 -1 7 +0 7 +0 N N
0 0 7 -2 7 +0 7 -1 7 +0 7 1 N N
0 0 7 0 7 1 7 -1 7 1 7 -1 N N
0 0 7 -1 7 1 7 -1 7 1 7 -0 N N
0 0 7 -1 7 1 7 -1 7 1 7 +0 N N
0 0 7 -2 7 1 7 -1 7 1 7 1 N N
0 0 7 1 7 -1 7 -0 7 -1 7 -1 N N
0 0 7 0 7 -1 7 -0 7 -1 7 -0 N N
0 0 7 -0 7 -1 7 -0 7 -1 7 +0 N N
0 0 7 -1 7 -1 7 -0 7 -1 7 1 N N
0 0 7 1 7 -0 7 -0 7 -0 7 -1 N N
0 0 7 0 7 -0 7 -0 7 -0 7 -0 N N
0 0 7 -0 7 -0 7 -0 7 -0 7 +0 N N
0 0 7 -1 7 -0 7 -0 7 -0 7 1 N N
0 0 7 1 7 +0 7 -0 7 +0 7 -1 N N
0 0 7 0 7 +0 7 -0 7 +0 7 -0 N N
0 0 7 -0 7 +0 7 -0 7 +0 7 +0 N N
0 0 7 -1 7 +0 7 -0 7 +0 7 1 N N
0 0 7 1 7 1 7 -0 7 1 7 -1 N N
0 0 7 0 7 1 7 -0 7 1 7 -0 N N
0 0 7 -0 7 1 7 -0 7 1 7 +0 N N
0 0 7 -1 7 1 7 -0 7 1 7 1 N N
0 0 7 1 7 -1 7 +0 7 -1 7 -1 N N
0 0 7 +0 7 -1 7 +0 7 -1 7 -0 N N
0 0 7 0 7 -1 7 +0 7 -1 7 +0 N N
0 0 7 -1 7 -1 7 +0 7 -1 7 1 N N
0 0 7 1 7 -0 7 +0 7 -0 7 -1 N N
0 0 7 +0 7 -0 7 +0 7 -0 7 -0 N N
0 0 7 0 7 -0 7 +0 7 -0 7 +0 N N
0 0 7 -1 7 -0 7 +0 7 -0 7 1 N N
0 0 7 1 7 +0 7 +0 7 +0 7 -1 N N
0 0 7 +0 7 +0 7 +0 7 +0 7 -0 N N
0 0 7 0 7 +0 7 +0 7 +0 7 +0 N N
0 0 7 -1 7 +0 7 +0 7 +0 7 1 N N
0 0 7 1 7 1 7 +0 7 1 7 -1 N N
0 0 7 +0 7 1 7 +0 7 1 7 -0 N N
0 0 7 0 7 1 7 +0 7 1 7 +0 N N
0 0 7 -1 7 1 7 +0 7 1 7 1 N N
0 0 7 2 7 -1 7 1 7 -1 7 -1 N N
0 0 7 1 7 -1 7 1 7 -1 7 -0 N N
0 0 7 1 7 -1 7 1 7 -1 7 +0 N N
0 0 7 0 7 -1 7 1 7 -1 7 1 N N
0 0 7 2 7 -0 7 1 7 -0 7 -1 N N
0 0 7 1 7 -0 7 1 7 -0 7 -0 N N
0 0 7 1 7 -0 7 1 7 -0 7 +0 N N
0 0 7 0 7 -0 7 1 7 -0 7 1 N N
0 0 7 2 7 +0 7 1 7 +0 7 -1 N N
0 0 7 1 7 +0 7 1 7 +0 7 -0 N N
0 0 7 1 7 +0 7 1 7 +0 7 +0 N N
0 0 7 0 7 +0 7 1 7 +0 7 1 N N
0 0 7 2 7 1 7 1 7 1 7 -1 N N
0 0 7 1 7 1 7 1 7 1 7 -0 N N
0 0 7 1 7 1 7 1 7 1 7 +0 N N
0 0 7 0 7 1 7 1 7 1 7 1 N N
# also check the imaginary part is correctly rounded
0 - 2 nan 2 16 2 nan 5 17 2 nan N N
0 + 2 nan 2 24 2 nan 5 17 2 nan N U
0 - 2 nan 2 16 2 nan 5 17 2 nan N D
0 - 2 nan 2 16 2 nan 5 17 2 nan N Z
0 + 2 nan 2 -16 2 nan 5 -17 2 nan N N
0 + 2 nan 2 -16 2 nan 5 -17 2 nan N U
0 - 2 nan 2 -24 2 nan 5 -17 2 nan N D
0 + 2 nan 2 -16 2 nan 5 -17 2 nan N Z
mpc-1.1.0/tests/pow_fr.dat 0000644 0001751 0001751 00000006276 12426164730 012363 0000000 0000000 # Data file for mpc_pow_fr.
#
# Copyright (C) 2011 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# For explanations on the file format, see add_fr.dat.
0 0 5 -9 5 46 5 3 5 2 3 3 N N
# (-0 -0.75)^4 = (0.31640625 -0) is rounded to (0.375 -0)
+ 0 2 0x3p-3 2 -0 2 -0 2 -0x3p-2 2 4 N N
0 0 8 0x51p-8 2 -0 2 -0 2 -0x3p-2 2 4 N N
# (+0 -0.75)^4 = (0.31640625 +0) is rounded to (0.375 +0)
+ 0 2 0x3p-3 2 +0 2 +0 2 -0x3p-2 2 4 N N
0 0 8 0x51p-8 2 +0 2 +0 2 -0x3p-2 2 4 N N
# (-0 0.75)^5 = (0.31640625 +0) is rounded to (0.375 +0)
+ 0 2 0x3p-3 2 +0 2 -0 2 0x3p-2 2 4 N N
0 0 8 0x51p-8 2 +0 2 -0 2 0x3p-2 2 4 N N
# (+0 0.75)^5 = (0.31640625 -0) is rounded to (0.375 -0)
+ 0 2 0x3p-3 2 -0 2 +0 2 0x3p-2 2 4 N N
0 0 8 0x51p-8 2 -0 2 +0 2 0x3p-2 2 4 N N
# (-0 -0.75)^5 = (-0 -0.2373046875) is rounded to (-0 -0.25)
0 - 2 -0 2 -0x1p-2 2 -0 2 -0x3p-2 3 5 N N
0 0 8 -0 8 -0xf3p-10 2 -0 2 -0x3p-2 3 5 N N
# (+0 -0.75)^5 = (+0 -0.2373046875) is rounded to (+0 -0.25)
0 - 2 +0 2 -0x1p-2 2 +0 2 -0x3p-2 3 5 N N
0 0 8 +0 8 -0xf3p-10 2 +0 2 -0x3p-2 3 5 N N
# (-0 0.75)^5 = (-0 0.2373046875) is rounded to (-0 0.25)
0 + 2 -0 2 0x1p-2 2 -0 2 0x3p-2 3 5 N N
0 0 8 -0 8 0xf3p-10 2 -0 2 0x3p-2 3 5 N N
# (+0 0.75)^5 = (+0 0.2373046875) is rounded to (+0 0.25)
0 + 2 +0 2 0x1p-2 2 +0 2 0x3p-2 3 5 N N
0 0 8 +0 8 0xf3p-10 2 +0 2 0x3p-2 3 5 N N
# (-0 -0.75)^6 = (-0.177978515625 +0) is rounded to (-0.1875 +0)
- 0 2 -0x3p-4 2 +0 2 -0 2 -0x3p-2 3 6 N N
+ 0 8 -0x5bp-9 8 +0 2 -0 2 -0x3p-2 3 6 N N
# (+0 -0.75)^6 = (-0.177978515625 -0) is rounded to (-0.1875 -0)
- 0 2 -0x3p-4 2 -0 2 +0 2 -0x3p-2 3 6 N N
+ 0 8 -0x5bp-9 8 -0 2 +0 2 -0x3p-2 3 6 N N
# (-0 0.75)^6 = (-0.177978515625 -0) is rounded to (-0.1875 -0)
- 0 2 -0x3p-4 2 -0 2 -0 2 0x3p-2 3 6 N N
+ 0 8 -0x5bp-9 8 -0 2 -0 2 0x3p-2 3 6 N N
# (+0 0.75)^6 = (-0.177978515625 +0) is rounded to (-0.1875 +0)
- 0 2 -0x3p-4 2 +0 2 +0 2 0x3p-2 3 6 N N
+ 0 8 -0x5bp-9 8 +0 2 +0 2 0x3p-2 3 6 N N
# (-0 -0.75)^7 = (+0 0.13348388671875) is rounded to (+0 0.125)
0 - 2 +0 2 0x1p-3 2 -0 2 -0x3p-2 3 7 N N
0 + 8 +0 8 0x89p-10 2 -0 2 -0x3p-2 3 7 N N
# (+0 -0.75)^7 = (-0 0.13348388671875) is rounded to (-0 0.125)
0 - 2 -0 2 0x1p-3 2 +0 2 -0x3p-2 3 7 N N
0 + 8 -0 8 0x89p-10 2 +0 2 -0x3p-2 3 7 N N
# (-0 0.75)^7 = (+0 -0.13348388671875) is rounded to (+0 -0.125)
0 + 2 +0 2 -0x1p-3 2 -0 2 0x3p-2 3 7 N N
0 - 8 +0 8 -0x89p-10 2 -0 2 0x3p-2 3 7 N N
# (+0 0.75)^7 = (-0 -0.13348388671875) is rounded to (-0 -0.125)
0 + 2 -0 2 -0x1p-3 2 +0 2 0x3p-2 3 7 N N
0 - 8 -0 8 -0x89p-10 2 +0 2 0x3p-2 3 7 N N
mpc-1.1.0/tests/inp_str.dat 0000644 0001751 0001751 00000020565 12426164730 012542 0000000 0000000 # Data file for mpc_inp_str.
#
# Copyright (C) 2009 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The format respects the parameter order in function prototype as follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM SIZE BASE RND_RE RND_IM "STRING"
#
# The string STRING is considered as a complex number rop = rop1 + i*rop2
# written in base BASE as "rop1 " if rop is real or "(rop1 rop2)". Notice that
# a least one whitespace is required after real part
#
# ROP_RE is checked against rop1 rounded to the precision PREC_ROP_RE
# in the direction RND_RE
# ROP_IM is checked against rop2 rounded to the precision PREC_ROP_IM
# in the direction RND_IM
# INEX_RE is the ternary value for the real part with the following notation:
# "?" ternary value not checked
# "!" function should return error indicator -1
# "+" if ROP_RE is greater than the exact mathematical result
# "0" if ROP_RE is exactly the mathematical result
# "-" if ROP_RE is less than the exact mathematical result
# (m.m. INEX_IM)
# rounding modes notation:
# "N" is rounding to nearest
# "Z" is rounding towards zero
# "U" is rounding towards plus infinity
# "D" is rounding towards minus infinity
# Use prefixes "0b" for values in base two, "0x" for values in base sixteen,
# no prefix for value in base ten.
# In all bases, "nan" is NaN, "inf" is infinity;
# The sign of the result is checked with "+inf", "-inf", "-0", or "+0".
# invalid strings
! ! 53 nan 53 nan 3 10 N N "non "
! ! 53 nan 53 nan 4 10 N N " NON "
! ! 53 nan 53 nan 5 10 N N "nan(0 1) " #invalid space in brackets
! ! 53 nan 53 nan 5 10 N N "nan(0-1) " #invalid char in brackets
! ! 53 nan 53 nan 4 10 N N "NaN((keepout)) " #two levels of parenthesis
! ! 53 nan 53 nan 4 10 N N "(1e1) " #one part missing
! ! 53 nan 53 nan 1 10 N N ". " #no digit
! ! 53 nan 53 nan 2 2 N N "+3 " #invalid binary digit
! ! 53 nan 53 nan 6 10 N N "( +INF) " #one part missing
! ! 53 nan 53 nan 2 10 N N "(1(1))" #too many levels of parentheses
! ! 53 nan 53 nan 3 10 N N "(1 (1 (1 0)))"
! ! 53 nan 53 nan 1 10 N N "((1 1)) "
! ! 53 nan 53 nan 6 10 N N "(1 +1 " #closing parenthesis missing
! ! 53 nan 53 nan 4 10 N N "(1+1) " #space needed
! ! 53 nan 53 nan 5 10 N N "(1 + 1) " #space after sign
! ! 53 nan 53 nan 17 10 N N "(@nan@(quiet) 0 " #closing parenthesis missing
! ! 53 nan 53 nan 4 10 N N "zero " #invalid digits
! ! 53 nan 53 nan 3 10 N N "&^+ " #invalid digits
! ! 53 nan 53 nan 1 18 N N "i " #invalid digit
! ! 53 nan 53 nan 1 18 N N "I " #invalid digit
! ! 53 nan 53 nan 1 35 N N "z " #invalid digit
! ! 53 nan 53 nan 1 35 N N "Z " #invalid digit
! ! 53 nan 53 nan 5 18 N N "(i 0) " #invalid digit
! ! 53 nan 53 nan 5 18 N N "(I 0) " #invalid digit
! ! 53 nan 53 nan 5 35 N N "(z 0) " #invalid digit
! ! 53 nan 53 nan 5 35 N N "(Z 0) " #invalid digit
! ! 53 nan 53 nan 5 18 N N "(0 i) " #invalid digit
! ! 53 nan 53 nan 5 18 N N "(0 I) " #invalid digit
! ! 53 nan 53 nan 5 35 N N "(0 z) " #invalid digit
! ! 53 nan 53 nan 5 35 N N "(0 Z) " #invalid digit
! ! 53 nan 53 nan 7 10 N N "-25p+32 " #invalid exponent char in base 10
! ! 53 nan 53 nan 6 10 N N "0xabcd " #invalid prefix in base 10
! ! 53 nan 53 nan 6 10 N N "+0b010 " #invalid prefix in base 10
# special values
0 0 53 nan 53 +0 3 10 N N "nan "
0 0 53 nan 53 +0 4 10 N N "+NAN "
0 0 53 nan 53 +0 5 10 N N "@NAN@ "
0 0 53 nan 53 nan 18 10 N N "(@nan@(QUIET) nan) "
0 0 53 nan 53 +0 5 10 N N "@nan@ "
0 0 53 nan 53 +0 12 10 N N "NaN(keepout) "
0 0 53 nan 53 +0 122 10 N N "Nan(very_long_suffix_oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo) "
0 0 53 nan 53 +0 8 10 N N "nan(0_1) "
0 0 53 nan 53 +0 3 10 N N "nan "
0 0 53 inf 53 +0 3 10 N N "inf "
0 0 53 -inf 53 +0 4 10 N N "-inf "
0 0 53 +inf 53 +0 8 10 N N "infinity "
0 0 53 +inf 53 +0 4 10 N N "+INF "
0 0 53 +0 53 +inf 8 10 N N "(0 +inf) "
0 0 53 +0 53 +inf 12 10 N N "(+0 INF) "
0 0 53 +0 53 -inf 13 10 N N "(0 -infinity) "
0 0 53 +0 53 -inf 9 10 N N "(+0 -INF) "
0 0 53 -inf 53 -0 11 10 N N "(-@inf@ -0) "
0 0 53 +inf 53 nan 17 10 N N "(+inf nan(9u137)) "
0 0 53 nan 53 +inf 12 10 N N "(NaN +inf ) "
# pure real argument
0 0 53 +0 53 +0 1 10 N N "0 "
0 0 53 +0 53 +0 5 10 N N "00000 "
0 0 53 +0 53 +0 2 10 N N "+0 "
0 0 53 -0 53 +0 2 10 N N "-0 "
0 0 53 +1 53 +0 1 10 N N "1 "
0 0 53 +1 53 +0 3 10 N N "001 "
0 0 53 +1 53 +0 6 10 N N "1.0000 "
0 0 53 +1 53 +0 2 10 N N "+1) "
- 0 53 +0x9D70A3D70A3D7p-51 53 +0 11 10 N N "(+1.23 0.0) "
0 0 53 -10 53 +0 11 10 N N "(-10. 0000) "
0 0 53 +0x5p-3 53 -0 12 10 N N "( .625 -0 )"
- 0 53 +0x14E718D7D7625Ap+612 53 +0 10 10 N N "(1e200 0) "
+ 0 53 +0x14E718D7D7625Bp+612 53 +0 10 10 U N "(1e200 0) "
- 0 53 +0x14E718D7D7625Ap+612 53 +0 10 10 D N "(1e200 0) "
0 0 53 +0x7530 53 +0 8 10 N N "(3e+4 0) "
- 0 53 +0x10C6F7A0B5ED8Dp-73 53 +0 5 10 N N ".5e-6 "
- 0 53 +0x1B1C1E0D914133p-83 53 +0 12 10 N N "(7.89E-10 0) "
+ 0 53 -0x7B426FAB61F00Cp+56 53 +0 7 10 N N "-25@+32 "
0 0 53 +43981 53 +0 6 16 N N "0xabcd "
0 0 53 +2 53 +0 6 2 N N "+0b010 "
0 0 53 +18 53 +0 1 20 N N "i "
0 0 53 +18 53 +0 1 19 N N "i "
0 0 53 +35 53 +0 1 36 N N "z "
0 0 53 +35 53 +0 1 36 N N "Z "
# pure imaginary argument
0 0 53 +0 53 +1 5 10 N N "(0 1) "
0 0 53 +0 53 +1 6 20 N N "(0 +1) "
0 0 53 -0 53 -1 7 10 N N "(-0 -1) "
0 0 53 -0 53 -2 7 10 N N "(-0 -2) "
0 0 53 +0 53 +2 6 10 N N "(+0 2) "
0 0 53 +0 53 +17 5 20 N N "(0 h) "
0 0 53 +0 53 +18 5 20 N N "(0 i) "
0 + 53 +0 53 -0x14F800008637BDp-44 19 10 N Z "(0 -33.55000005e+1) "
0 + 53 +0 53 -0xA1765976008AFp-401 18 10 N U "(+0 -.550000E-105) "
0 0 53 +0 53 +18 5 19 N N "(0 i) "
0 0 53 +0 53 +18 5 19 N N "(0 I) "
0 0 53 +0 53 +35 5 36 N N "(0 z) "
0 0 53 +0 53 +35 5 36 N N "(0 Z) "
# complex argument
0 0 53 +1 53 +1 10 10 N N "( 1 +1) "
0 0 53 +1 53 +1 8 10 N N "(1 +1) "
0 0 53 +7 53 +14 7 10 N N "(7 14) "
0 0 53 +17 53 +1 7 10 N N "(+17 1) "
0 0 53 +27 53 +1 8 20 N N "(+17 +1) "
0 0 53 -18 53 -1 7 20 N N "(-i -1) "
0 0 53 +18 53 -1 6 20 N N "(i -1) "
0 0 53 -18 53 +1 7 20 N N "(-i +1) "
0 0 53 +18 53 +18 6 20 N N "(i +i) "
0 0 53 -14643 53 +20328 10 36 N N "(-bar foo) "
0 0 53 -1647190 53 -512315 13 36 N N "(-zaza -azaz) "
0 0 53 +0b1010 53 +0xabcd 16 0 N N "(0b1010 +0xabcd) "
0 0 53 +0xabcd 53 +0b1010 22 0 N N "(+0xa.bcd@+3 0b.101p4) "
# white space before the closing ')'
0 0 53 +1 53 +1 13 10 N N "( 1 +1 ) "
mpc-1.1.0/tests/tsub.c 0000644 0001751 0001751 00000002573 12471661720 011513 0000000 0000000 /* tsub -- test file for mpc_sub.
Copyright (C) 2008, 2011, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_sub (P[1].mpc, P[2].mpc, P[3].mpc, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_sub (P[1].mpc, P[1].mpc, P[3].mpc, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP2 \
P[0].mpc_inex = mpc_sub (P[1].mpc, P[2].mpc, P[1].mpc, P[4].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("sub.dsc", "sub.dat");
tgeneric_template ("sub.dsc", 2, 1024, 7, 128);
test_end ();
return 0;
}
mpc-1.1.0/tests/add_fr.dsc 0000644 0001751 0001751 00000001617 12471661720 012302 0000000 0000000 # Description file for mpc_add_fr
#
# Copyright (C) 2008, 2010, 2011, 2012, INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_add_fr
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpfr_srcptr
mpc_rnd_t
mpc-1.1.0/tests/fr_div.dsc 0000644 0001751 0001751 00000001531 12471661720 012327 0000000 0000000 # Description file for mpc_fr_div
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_fr_div
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpfr_srcptr
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/fr_sub.dsc 0000644 0001751 0001751 00000001531 12471661720 012336 0000000 0000000 # Description file for mpc_fr_sub
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_fr_sub
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpfr_srcptr
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/tcosh.c 0000644 0001751 0001751 00000010211 12471661720 011642 0000000 0000000 /* tcosh -- test file for mpc_cosh.
Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include
#include "mpc-tests.h"
static void
pure_real_argument (void)
{
/* cosh(x -i*0) = cosh(x) +i*0 if x<0 */
/* cosh(x -i*0) = cosh(x) -i*0 if x>0 */
/* cosh(x +i*0) = cosh(x) -i*0 if x<0 */
/* cosh(x -i*0) = cosh(x) +i*0 if x>0 */
mpc_t u;
mpc_t z;
mpc_t cosh_z;
mpc_init2 (z, 2);
mpc_init2 (u, 100);
mpc_init2 (cosh_z, 100);
/* cosh(1 +i*0) = cosh(1) +i*0 */
mpc_set_ui_ui (z, 1, 0, MPC_RNDNN);
mpfr_cosh (mpc_realref (u), mpc_realref (z), MPFR_RNDN);
mpfr_set_ui (mpc_imagref (u), 0, MPFR_RNDN);
mpc_cosh (cosh_z, z, MPC_RNDNN);
if (mpc_cmp (cosh_z, u) != 0 || mpfr_signbit (mpc_imagref (cosh_z)))
TEST_FAILED ("mpc_cosh", z, cosh_z, u, MPC_RNDNN);
/* cosh(1 -i*0) = cosh(1) -i*0 */
mpc_conj (z, z, MPC_RNDNN);
mpc_conj (u, u, MPC_RNDNN);
mpc_cosh (cosh_z, z, MPC_RNDNN);
if (mpc_cmp (cosh_z, u) != 0 || !mpfr_signbit (mpc_imagref (cosh_z)))
TEST_FAILED ("mpc_cosh", z, cosh_z, u, MPC_RNDNN);
/* cosh(-1 +i*0) = cosh(1) -i*0 */
mpc_neg (z, z, MPC_RNDNN);
mpc_cosh (cosh_z, z, MPC_RNDNN);
if (mpc_cmp (cosh_z, u) != 0 || !mpfr_signbit (mpc_imagref (cosh_z)))
TEST_FAILED ("mpc_cosh", z, cosh_z, u, MPC_RNDNN);
/* cosh(-1 -i*0) = cosh(1) +i*0 */
mpc_conj (z, z, MPC_RNDNN);
mpc_conj (u, u, MPC_RNDNN);
mpc_cosh (cosh_z, z, MPC_RNDNN);
if (mpc_cmp (cosh_z, u) != 0 || mpfr_signbit (mpc_imagref (cosh_z)))
TEST_FAILED ("mpc_cosh", z, cosh_z, u, MPC_RNDNN);
mpc_clear (cosh_z);
mpc_clear (z);
mpc_clear (u);
}
static void
pure_imaginary_argument (void)
{
/* cosh(+0 +i*y) = cos y +i*0*sin y */
/* cosh(-0 +i*y) = cos y -i*0*sin y */
mpc_t u;
mpc_t z;
mpc_t cosh_z;
mpc_init2 (z, 2);
mpc_init2 (u, 100);
mpc_init2 (cosh_z, 100);
/* cosh(+0 +i) = cos(1) + i*0 */
mpc_set_ui_ui (z, 0, 1, MPC_RNDNN);
mpfr_cos (mpc_realref (u), mpc_imagref (z), MPFR_RNDN);
mpfr_set_ui (mpc_imagref (u), 0, MPFR_RNDN);
mpc_cosh (cosh_z, z, MPC_RNDNN);
if (mpc_cmp (cosh_z, u) != 0 || mpfr_signbit (mpc_imagref (cosh_z)))
TEST_FAILED ("mpc_cosh", z, cosh_z, u, MPC_RNDNN);
/* cosh(+0 -i) = cos(1) - i*0 */
mpc_conj (z, z, MPC_RNDNN);
mpc_conj (u, u, MPC_RNDNN);
mpc_cosh (cosh_z, z, MPC_RNDNN);
if (mpc_cmp (cosh_z, u) != 0 || !mpfr_signbit (mpc_imagref (cosh_z)))
TEST_FAILED ("mpc_cosh", z, cosh_z, u, MPC_RNDNN);
/* cosh(-0 +i) = cos(1) - i*0 */
mpc_neg (z, z, MPC_RNDNN);
mpc_cosh (cosh_z, z, MPC_RNDNN);
if (mpc_cmp (cosh_z, u) != 0 || !mpfr_signbit (mpc_imagref (cosh_z)))
TEST_FAILED ("mpc_cosh", z, cosh_z, u, MPC_RNDNN);
/* cosh(-0 -i) = cos(1) + i*0 */
mpc_conj (z, z, MPC_RNDNN);
mpc_conj (u, u, MPC_RNDNN);
mpc_cosh (cosh_z, z, MPC_RNDNN);
if (mpc_cmp (cosh_z, u) != 0 || mpfr_signbit (mpc_imagref (cosh_z)))
TEST_FAILED ("mpc_cosh", z, cosh_z, u, MPC_RNDNN);
mpc_clear (cosh_z);
mpc_clear (z);
mpc_clear (u);
}
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_cosh (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_cosh (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("cosh.dsc", "cosh.dat");
tgeneric_template ("cosh.dsc", 2, 512, 7, 7);
/* FIXME: remove the following tests? (Now tested by tgeneric) */
pure_real_argument ();
pure_imaginary_argument ();
test_end ();
return 0;
}
mpc-1.1.0/tests/div_2ui.dsc 0000644 0001751 0001751 00000001545 12471661720 012424 0000000 0000000 # Description file for mpc_div_2ui
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_div_2ui
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
unsigned long int
mpc_rnd_t
mpc-1.1.0/tests/sinh.dsc 0000644 0001751 0001751 00000001505 12471661720 012020 0000000 0000000 # Description file for mpc_sinh
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_sinh
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/sqrt.dat 0000644 0001751 0001751 00000022527 12426164730 012055 0000000 0000000 # Data file for mpc_sqrt.
#
# Copyright (C) 2008, 2010 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP_RE OP_RE PREC_OP_IM OP_IM RND_RE RND_IM
#
# see sin.dat for precisions
# special values (following ISO C99 standard)
0 0 53 +inf 53 -inf 53 -inf 53 -inf N N
0 0 53 +0 53 -inf 53 -inf 53 -1 N N
0 0 53 +0 53 -inf 53 -inf 53 -0 N N
0 0 53 +0 53 +inf 53 -inf 53 +0 N N
0 0 53 +0 53 +inf 53 -inf 53 +1 N N
0 0 53 +inf 53 +inf 53 -inf 53 +inf N N
0 0 53 nan 53 inf 53 -inf 53 nan N N
0 0 53 +inf 53 -inf 53 -1 53 -inf N N
0 0 53 +0 53 -1 53 -1 53 -0 N N
0 0 53 +0 53 +1 53 -1 53 +0 N N
0 0 53 +inf 53 +inf 53 -1 53 +inf N N
0 0 53 nan 53 nan 53 -1 53 nan N N
0 0 53 +inf 53 -inf 53 -0 53 -inf N N
0 0 53 +1 53 -1 53 -0 53 -2 N N
0 0 53 +0 53 -0 53 -0 53 -0 N N
0 0 53 +0 53 +0 53 -0 53 +0 N N
0 0 53 +1 53 +1 53 -0 53 +2 N N
0 0 53 +inf 53 +inf 53 -0 53 +inf N N
0 0 53 nan 53 nan 53 -0 53 nan N N
0 0 53 +inf 53 -inf 53 +0 53 -inf N N
0 0 53 +1 53 -1 53 +0 53 -2 N N
0 0 53 +0 53 -0 53 +0 53 -0 N N
0 0 53 +0 53 +0 53 +0 53 +0 N N
0 0 53 +1 53 +1 53 +0 53 +2 N N
0 0 53 +inf 53 +inf 53 +0 53 +inf N N
0 0 53 nan 53 nan 53 +0 53 nan N N
0 0 53 +inf 53 -inf 53 +1 53 -inf N N
0 0 53 +1 53 -0 53 +1 53 -0 N N
0 0 53 +1 53 +0 53 +1 53 +0 N N
0 0 53 +inf 53 +inf 53 +1 53 +inf N N
0 0 53 nan 53 nan 53 +1 53 nan N N
0 0 53 +inf 53 -inf 53 +inf 53 -inf N N
0 0 53 +inf 53 -0 53 +inf 53 -1 N N
0 0 53 +inf 53 -0 53 +inf 53 -0 N N
0 0 53 +inf 53 +0 53 +inf 53 +0 N N
0 0 53 +inf 53 +0 53 +inf 53 +1 N N
0 0 53 +inf 53 +inf 53 +inf 53 +inf N N
0 0 53 +inf 53 nan 53 +inf 53 nan N N
0 0 53 +inf 53 -inf 53 nan 53 -inf N N
0 0 53 nan 53 nan 53 nan 53 -1 N N
0 0 53 nan 53 nan 53 nan 53 -0 N N
0 0 53 nan 53 nan 53 nan 53 +0 N N
0 0 53 nan 53 nan 53 nan 53 +1 N N
0 0 53 +inf 53 +inf 53 nan 53 +inf N N
0 0 53 nan 53 nan 53 nan 53 nan N N
# purely real argument
# sqrt(x +i*0) = sqrt(x) +i*0, when x>0
# sqrt(x -i*0) = sqrt(x) -i*0, when x>0
# sqrt(x +i*0) = +0 +i*sqrt(-x) +i*0, when x<0
# sqrt(x -i*0) = +0 -i*sqrt(-x) +i*0, when x<0
+ 0 53 0x16a09e667f3bcdp-52 53 +0 53 2 17 +0 N N
0 + 53 +0 53 0x16a09e667f3bcdp-52 54 -2 16 +0 Z N
+ 0 53 0x16a09e667f3bcdp-52 53 -0 55 2 15 -0 U N
0 - 53 +0 53 -0x16a09e667f3bcdp-52 56 -2 14 -0 D N
- 0 53 0x5a827999fcef30p-54 53 +0 57 2 13 +0 Z Z
0 - 53 +0 53 0x5a827999fcef30p-54 58 -2 12 +0 U Z
- 0 53 0x5a827999fcef30p-54 53 -0 59 2 11 -0 D Z
0 + 53 +0 53 -0x5a827999fcef30p-54 60 -2 10 -0 N Z
+ 0 53 0x16a09e667f3bcdp-52 53 +0 61 2 9 +0 U U
0 + 53 +0 53 0x16a09e667f3bcdp-52 62 -2 8 +0 D U
+ 0 53 0x16a09e667f3bcdp-52 53 -0 63 2 7 -0 N U
0 + 53 +0 53 -0x5a827999fcef30p-54 64 -2 6 -0 Z U
- 0 53 0x5a827999fcef30p-54 53 +0 65 2 5 +0 D D
0 - 53 +0 53 0x5a827999fcef30p-54 66 -2 4 +0 N D
- 0 53 0x5a827999fcef30p-54 53 -0 67 2 3 -0 Z D
0 - 53 +0 53 -0x16a09e667f3bcdp-52 68 -2 2 -0 U D
# purely imaginary argument
# sqrt(+/-0 +i*y) = sqrt(y/2) * (1 +i), when y >0
# sqrt(+/-0 +i*y) = sqrt(-y/2) * (1 -i), when y < 0
+ + 53 0x16a09e667f3bcdp-52 53 0x16a09e667f3bcdp-52 53 +0 53 4 N N
- + 53 0x5a827999fcef30p-54 53 0x16a09e667f3bcdp-52 51 -0 54 4 Z N
+ - 53 0x16a09e667f3bcdp-52 53 -0x16a09e667f3bcdp-52 49 +0 55 -4 U N
- - 53 0x5a827999fcef30p-54 53 -0x16a09e667f3bcdp-52 47 -0 56 -4 D N
- - 53 0x5a827999fcef30p-54 53 0x5a827999fcef30p-54 45 +0 57 4 Z Z
+ - 53 0x16a09e667f3bcdp-52 53 0x5a827999fcef30p-54 43 -0 58 4 U Z
- + 53 0x5a827999fcef30p-54 53 -0x5a827999fcef30p-54 41 +0 59 -4 D Z
+ + 53 0x16a09e667f3bcdp-52 53 -0x5a827999fcef30p-54 39 -0 60 -4 N Z
+ + 53 0x16a09e667f3bcdp-52 53 0x16a09e667f3bcdp-52 37 +0 61 4 U U
- + 53 0x5a827999fcef30p-54 53 0x16a09e667f3bcdp-52 35 -0 62 4 D U
+ + 53 0x16a09e667f3bcdp-52 53 -0x5a827999fcef30p-54 33 +0 63 -4 N U
- + 53 0x5a827999fcef30p-54 53 -0x5a827999fcef30p-54 31 -0 64 -4 Z U
- - 53 0x5a827999fcef30p-54 53 0x5a827999fcef30p-54 29 +0 65 4 D D
+ - 53 0x16a09e667f3bcdp-52 53 0x5a827999fcef30p-54 27 -0 66 4 N D
- - 53 0x5a827999fcef30p-54 53 -0x16a09e667f3bcdp-52 25 +0 67 -4 Z D
+ - 53 0x16a09e667f3bcdp-52 53 -0x16a09e667f3bcdp-52 23 -0 68 -4 U D
# bugs fixed in r160 2008-07-15
- + 19 0b11101001001001001100p+39 19 -0b1010110101100111011p-236 19 0b1.101010001010100000p+117 19 -0b1.001110111101100001p-158 N Z
- + 2 0b11p+100 2 -0b11p+100 2 -0 2 -0b11p+203 N Z
0 + 2 0 2 -0b10p+117 2 -0b11p+235 2 -0 N Z
# close to infinite loop reported by Emmanuel Thome, 22 Oct 2010,
# and all its variants of signs and directed roundings
- + 375 1 375 0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281177 375 1 375 0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281176 N N
+ + 375 0x1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004 375 0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281177 375 1 375 0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281176 U U
- - 375 1 375 0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef5fffffffffffffffffffffffffffffffffffffffffffep-202281177 375 1 375 0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281176 D D
- + 375 1 375 -0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef5fffffffffffffffffffffffffffffffffffffffffffep-202281177 375 1 375 -0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281176 D U
- - 375 1 375 0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef5fffffffffffffffffffffffffffffffffffffffffffep-202281177 375 1 375 0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281176 Z Z
- - 375 1 375 -0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281177 375 1 375 -0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281176 N N
+ + 375 0x1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004 375 -0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef5fffffffffffffffffffffffffffffffffffffffffffep-202281177 375 1 375 -0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281176 U U
- - 375 1 375 -0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281177 375 1 375 -0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281176 D D
- + 375 1 375 -0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef5fffffffffffffffffffffffffffffffffffffffffffep-202281177 375 1 375 -0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281176 Z Z
+ - 375 0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281177 375 1 375 -1 375 0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281176 N N
+ + 375 0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281177 375 0x1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004 375 -1 375 0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281176 U U
- - 375 0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef5fffffffffffffffffffffffffffffffffffffffffffep-202281177 375 1 375 -1 375 0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281176 D D
- - 375 0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef5fffffffffffffffffffffffffffffffffffffffffffep-202281177 375 1 375 -1 375 0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281176 Z Z
+ + 375 0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281177 375 -1 375 -1 375 -0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281176 N N
+ + 375 0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281177 375 -1 375 -1 375 -0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281176 U U
- - 375 0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef5fffffffffffffffffffffffffffffffffffffffffffep-202281177 375 -0x1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004 375 -1 375 -0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281176 D D
- + 375 0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef5fffffffffffffffffffffffffffffffffffffffffffep-202281177 375 -1 375 -1 375 -0xf.8a8aae3080b3dd665e316d262fd54c1ca22a83dc9acb92ef6p-202281176 Z Z
mpc-1.1.0/tests/log.dsc 0000644 0001751 0001751 00000001503 12471661720 011636 0000000 0000000 # Description file for mpc_log
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_log
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/treal.c 0000644 0001751 0001751 00000002010 12471661720 011627 0000000 0000000 /* treal -- test file for mpc_real.
Copyright (C) 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpfr_inex = mpc_imag (P[1].mpfr, P[2].mpc, P[3].mpfr_rnd)
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
tgeneric_template ("real.dsc", 2, 1024, 1, 4096);
test_end ();
return 0;
}
mpc-1.1.0/tests/proj.dat 0000644 0001751 0001751 00000005661 12426164730 012036 0000000 0000000 # Data file for mpc_proj.
#
# Copyright (C) 2008 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_RE PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP_RE OP_RE PREC_OP_IM OP_IM RND_RE RND_IM
#
# see sin.dat for precisions
# special values (following ISO C99 standard)
0 0 53 +inf 53 -0 53 -inf 53 -inf N N
0 0 53 +inf 53 -0 53 -inf 53 -1 N N
0 0 53 +inf 53 -0 53 -inf 53 -0 N N
0 0 53 +inf 53 +0 53 -inf 53 +0 N N
0 0 53 +inf 53 +0 53 -inf 53 +1 N N
0 0 53 +inf 53 +0 53 -inf 53 +inf N N
0 0 53 +inf 53 0 53 -inf 53 nan N N
0 0 53 +inf 53 -0 53 -1 53 -inf N N
0 0 53 -1 53 -0 53 -1 53 -0 N N
0 0 53 -1 53 +0 53 -1 53 +0 N N
0 0 53 +inf 53 +0 53 -1 53 +inf N N
0 0 53 -1 53 nan 53 -1 53 nan N N
0 0 53 +inf 53 -0 53 -0 53 -inf N N
0 0 53 -0 53 -1 53 -0 53 -1 N N
0 0 53 -0 53 -0 53 -0 53 -0 N N
0 0 53 -0 53 +0 53 -0 53 +0 N N
0 0 53 -0 53 +1 53 -0 53 +1 N N
0 0 53 +inf 53 +0 53 -0 53 +inf N N
0 0 53 -0 53 nan 53 -0 53 nan N N
0 0 53 +inf 53 -0 53 +0 53 -inf N N
0 0 53 +0 53 -1 53 +0 53 -1 N N
0 0 53 +0 53 -0 53 +0 53 -0 N N
0 0 53 +0 53 +0 53 +0 53 +0 N N
0 0 53 +0 53 +1 53 +0 53 +1 N N
0 0 53 +inf 53 +0 53 +0 53 +inf N N
0 0 53 +0 53 nan 53 +0 53 nan N N
0 0 53 +inf 53 -0 53 +1 53 -inf N N
0 0 53 +1 53 -0 53 +1 53 -0 N N
0 0 53 +1 53 +0 53 +1 53 +0 N N
0 0 53 +inf 53 +0 53 +1 53 +inf N N
0 0 53 +1 53 nan 53 +1 53 nan N N
0 0 53 +inf 53 -0 53 +inf 53 -inf N N
0 0 53 +inf 53 -0 53 +inf 53 -1 N N
0 0 53 +inf 53 -0 53 +inf 53 -0 N N
0 0 53 +inf 53 +0 53 +inf 53 +0 N N
0 0 53 +inf 53 +0 53 +inf 53 +1 N N
0 0 53 +inf 53 +0 53 +inf 53 +inf N N
0 0 53 +inf 53 0 53 +inf 53 nan N N
0 0 53 +inf 53 -0 53 nan 53 -inf N N
0 0 53 nan 53 -1 53 nan 53 -1 N N
0 0 53 nan 53 -0 53 nan 53 -0 N N
0 0 53 nan 53 +0 53 nan 53 +0 N N
0 0 53 nan 53 +1 53 nan 53 +1 N N
0 0 53 +inf 53 +0 53 nan 53 +inf N N
0 0 53 nan 53 nan 53 nan 53 nan N N
mpc-1.1.0/tests/atanh.dsc 0000644 0001751 0001751 00000001507 12471661720 012154 0000000 0000000 # Description file for mpc_atanh
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_atanh
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/tsin.c 0000644 0001751 0001751 00000002311 12471661720 011501 0000000 0000000 /* tsin -- test file for mpc_sin.
Copyright (C) 2007, 2008, 2010, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_sin (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_sin (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("sin.dsc", "sin.dat");
tgeneric_template ("sin.dsc", 2, 512, 7, 7);
test_end ();
return 0;
}
mpc-1.1.0/tests/sin.dsc 0000644 0001751 0001751 00000001503 12471661720 011646 0000000 0000000 # Description file for mpc_sin
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_sin
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/add_ui.dsc 0000644 0001751 0001751 00000001626 12471661720 012310 0000000 0000000 # Description file for mpc_add_ui
#
# Copyright (C) 2008, 2010, 2011, 2012, INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_add_ui
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
unsigned long int
mpc_rnd_t
mpc-1.1.0/tests/add_fr.dat 0000644 0001751 0001751 00000012547 12426164730 012304 0000000 0000000 # Data file for mpc_add_fr.
#
# Copyright (C) 2008, 2012 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP1_RE OP1_RE PREC_OP1_IM OP1_IM PREC_OP2 OP2 RND_RE RND_IM
#
# where op1 = op1_re + i * op1_im, rop = rop_re + i * rop_im,
# The data are read from the file and stored in variables op1, op2, rop using
# rounding to nearest when needed, for instance: rop_re is ROP_RE rounded to
# nearest to the precision of PREC_ROP_RE.
# ROP_RE is checked against Re(op1 + op2) rounded to the precision PREC_ROP_RE
# in the direction RND_RE
# ROP_IM is checked against Im(op1) rounded to the precision PREC_ROP_IM
# in the direction RND_IM
# INEX_RE is the ternary value for the real part with the following notation:
# "?" ternary value not checked
# "+" if ROP_RE is greater than the exact mathematical result
# "0" if ROP_RE is exactly the mathematical result
# "-" if ROP_RE is less than the exact mathematical result
# (m.m. INEX_IM)
# rounding modes notation:
# "N" is rounding to nearest
# "Z" is rounding towards zero
# "U" is rounding towards plus infinity
# "D" is rounding towards minus infinity
# Use prefixes "0b" for values in base two, "0x" for values in base sixteen,
# no prefix for value in base ten.
# In all bases, "nan" is NaN, "inf" is infinity;
# The sign of the result is checked with "+inf", "-inf", "-0", or "+0".
# special values (following ISO C99 standard)
0 0 53 -inf 53 -inf 53 -inf 53 -inf 53 -inf N Z
0 0 53 -inf 53 +inf 53 -inf 53 +inf 53 -1 Z U
0 0 53 -inf 53 -0 53 -inf 53 -0 53 -0 U D
0 0 53 -inf 53 +0 53 -inf 53 +0 53 +0 D N
0 0 53 -inf 53 -1 53 -inf 53 -1 53 +1 N U
0 0 53 nan 53 +1 53 -inf 53 +1 53 +inf Z D
0 0 53 nan 53 nan 53 -inf 53 nan 53 nan U N
0 0 53 -inf 53 +inf 53 -1 53 +inf 53 -inf N Z
0 0 53 -2 53 -0 53 -1 53 -0 53 -1 Z U
0 0 53 -1 53 +0 53 -1 53 +0 53 -0 U D
0 0 53 -1 53 -1 53 -1 53 -1 53 +0 D N
0 0 53 +0 53 +1 53 -1 53 +1 53 +1 N U
0 0 53 +inf 53 nan 53 -1 53 nan 53 +inf Z D
0 0 53 nan 53 -inf 53 -1 53 -inf 53 nan U N
0 0 53 -inf 53 -0 53 -0 53 -0 53 -inf N Z
0 0 53 -1 53 +0 53 -0 53 +0 53 -1 Z U
0 0 53 -0 53 -1 53 -0 53 -1 53 -0 U D
0 0 53 -0 53 +1 53 -0 53 +1 53 +0 D N
0 0 53 +1 53 nan 53 -0 53 nan 53 +1 N U
0 0 53 +inf 53 -inf 53 -0 53 -inf 53 +inf Z D
0 0 53 nan 53 +inf 53 -0 53 +inf 53 nan U N
0 0 53 -inf 53 +0 53 +0 53 +0 53 -inf N Z
0 0 53 -1 53 -1 53 +0 53 -1 53 -1 Z U
0 0 53 +0 53 +1 53 +0 53 +1 53 -0 U D
0 0 53 +0 53 nan 53 +0 53 nan 53 +0 D N
0 0 53 +1 53 -inf 53 +0 53 -inf 53 +1 N U
0 0 53 +inf 53 +inf 53 +0 53 +inf 53 +inf Z D
0 0 53 nan 53 -0 53 +0 53 -0 53 nan U N
0 0 53 -inf 53 -1 53 +1 53 -1 53 -inf N Z
0 0 53 +0 53 +1 53 +1 53 +1 53 -1 Z U
0 0 53 +1 53 nan 53 +1 53 nan 53 -0 U D
0 0 53 +1 53 -inf 53 +1 53 -inf 53 +0 D N
0 0 53 +2 53 +inf 53 +1 53 +inf 53 +1 N U
0 0 53 +inf 53 -0 53 +1 53 -0 53 +inf Z D
0 0 53 nan 53 +0 53 +1 53 +0 53 nan U N
0 0 53 nan 53 +1 53 +inf 53 +1 53 -inf N Z
0 0 53 +inf 53 nan 53 +inf 53 nan 53 -1 Z U
0 0 53 +inf 53 -inf 53 +inf 53 -inf 53 -0 U D
0 0 53 +inf 53 +inf 53 +inf 53 +inf 53 +0 D N
0 0 53 +inf 53 -0 53 +inf 53 -0 53 +1 N U
0 0 53 +inf 53 +0 53 +inf 53 +0 53 +inf Z D
0 0 53 nan 53 -1 53 +inf 53 -1 53 nan U N
0 0 53 nan 53 nan 53 nan 53 nan 53 -inf N Z
0 0 53 nan 53 -inf 53 nan 53 -inf 53 -1 Z U
0 0 53 nan 53 +inf 53 nan 53 +inf 53 -0 U D
0 0 53 nan 53 -0 53 nan 53 -0 53 +0 D N
0 0 53 nan 53 +0 53 nan 53 +0 53 +1 N U
0 0 53 nan 53 -1 53 nan 53 -1 53 +inf Z D
0 0 53 nan 53 +1 53 nan 53 +1 53 nan U N
# pure real argument
- 0 53 0x10000000000000p-52 53 -0 53 +1 53 -0 53 0x10000000000001p-106 N N
+ 0 53 0x10000000000001p-52 53 -0 53 +1 53 -0 53 0x10000000000001p-105 N N
- 0 53 0x10000000000001p-52 53 -0 53 +1 53 -0 53 0x10000000000001p-104 N N
- 0 53 0x10000000000000p-52 53 -0 53 +1 53 -0 53 0x10000000000001p-105 Z Z
+ 0 53 0x10000000000001p-52 53 -0 53 +1 53 -0 53 0x10000000000001p-105 U U
- 0 53 0x10000000000000p-52 53 -0 53 +1 53 -0 53 0x10000000000001p-105 D D
# pure imaginary argument
0 0 53 +1 53 +1 53 -0 53 1 53 +1 N N
0 0 53 +1 53 +1 53 +0 53 1 53 +1 Z Z
0 0 53 +1 53 +1 53 +0 53 1 53 +1 U U
0 0 53 +1 53 +1 53 -0 53 1 53 +1 D D
# non-zero return values for imaginary part
0 + 2 0 2 8 3 0 3 7 3 0 N N
0 - 2 0 2 4 3 0 3 5 3 0 N N
mpc-1.1.0/tests/arg.dat 0000644 0001751 0001751 00000006076 12426164730 011636 0000000 0000000 # Data file for mpc_arg.
#
# Copyright (C) 2008 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX PREC_ROP ROP PREC_ROP_IM ROP_IM PREC_OP_RE OP_RE PREC_OP_IM OP_IM RND
#
# where op = op_re + i * op_im.
# See abs.dat for other details.
# special values (following ISO C99 standard)
+ 53 -0x96CBE3F9990E9p-50 53 -inf 53 -inf N
+ 53 -0x3243F6A8885A3p-48 53 -inf 53 -1 N
+ 53 -0x3243F6A8885A3p-48 53 -inf 53 -0 N
- 53 +0x3243F6A8885A3p-48 53 -inf 53 +0 N
- 53 +0x3243F6A8885A3p-48 53 -inf 53 +1 N
- 53 +0x96CBE3F9990E9p-50 53 -inf 53 +inf N
0 53 nan 53 -inf 53 nan N
+ 53 -0x3243F6A8885A3p-49 53 -1 53 -inf N
+ 53 -0x3243F6A8885A3p-48 53 -1 53 -0 N
- 53 +0x3243F6A8885A3p-48 53 -1 53 +0 N
- 53 +0x3243F6A8885A3p-49 53 -1 53 +inf N
0 53 nan 53 -1 53 nan N
+ 53 -0x3243F6A8885A3p-49 53 -0 53 -inf N
+ 53 -0x3243F6A8885A3p-49 53 -0 53 -1 N
+ 53 -0x3243F6A8885A3p-48 53 -0 53 -0 N
- 53 +0x3243F6A8885A3p-48 53 -0 53 +0 N
- 53 +0x3243F6A8885A3p-49 53 -0 53 +1 N
- 53 +0x3243F6A8885A3p-49 53 -0 53 +inf N
0 53 nan 53 -0 53 nan N
+ 53 -0x3243F6A8885A3p-49 53 +0 53 -inf N
+ 53 -0x3243F6A8885A3p-49 53 +0 53 -1 N
0 53 -0 53 +0 53 -0 N
0 53 +0 53 +0 53 +0 N
- 53 +0x3243F6A8885A3p-49 53 +0 53 +1 N
- 53 +0x3243F6A8885A3p-49 53 +0 53 +inf N
0 53 nan 53 +0 53 nan N
+ 53 -0x3243F6A8885A3p-49 53 +1 53 -inf N
0 53 -0 53 +1 53 -0 N
0 53 +0 53 +1 53 +0 N
- 53 +0x3243F6A8885A3p-49 53 +1 53 +inf N
0 53 nan 53 +1 53 nan N
+ 53 -0x3243F6A8885A3p-50 53 +inf 53 -inf N
0 53 -0 53 +inf 53 -1 N
0 53 -0 53 +inf 53 -0 N
0 53 +0 53 +inf 53 +0 N
0 53 +0 53 +inf 53 +1 N
- 53 +0x3243F6A8885A3p-50 53 +inf 53 +inf N
0 53 nan 53 +inf 53 nan N
0 53 nan 53 nan 53 -inf N
0 53 nan 53 nan 53 -1 N
0 53 nan 53 nan 53 -0 N
0 53 nan 53 nan 53 +0 N
0 53 nan 53 nan 53 +1 N
0 53 nan 53 nan 53 +inf N
0 53 nan 53 nan 53 nan N
mpc-1.1.0/tests/cmp_abs.dsc 0000644 0001751 0001751 00000001536 12721025724 012463 0000000 0000000 # Description file for mpc_cmp_abs
#
# Copyright (C) 2016 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_cmp_abs
RETURN:
int
OUTPUT:
INPUT:
mpc_srcptr
mpc_srcptr
mpc-1.1.0/tests/sqr.dsc 0000644 0001751 0001751 00000001546 12471661720 011671 0000000 0000000 # Description file for mpc_sqr
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_sqr
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/data_check.tpl 0000644 0001751 0001751 00000005240 12471661720 013153 0000000 0000000 /* data_check.tpl -- template file for checking result against data
file.
Usage: Before including this template file in your source file,
#define the prototype of the function under test in the
CALL_MPC_FUNCTION symbol, see tadd_tmpl.c for an example.
To test the reuse of the first parameter, #define the
MPC_FUNCTION_CALL_REUSE_OP1 and MPC_FUNCTION_CALL_REUSE_OP2 symbols
with the first and second input parameter reused as the output, see
tadd_tmpl.c for an example. It is not possible to test parameter
reuse in functions with two output (like mpc_sin_cos) with this
system.
Copyright (C) 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#ifndef MPC_FUNCTION_CALL
#error Define MPC_FUNCTION_CALL before including 'data_check.tpl'.
#endif
int
data_check_template (const char* descr_file, const char * data_file)
{
static int rand_counter = 0;
mpc_datafile_context_t datafile_context;
mpc_datafile_context_t *dc = &datafile_context;
mpc_fun_param_t params;
mpc_operand_t *P = params.P; /* developer-friendly alias */
read_description (¶ms, descr_file);
init_parameters (¶ms);
open_datafile (dc, data_file);
while (datafile_context.nextchar != EOF) {
read_line (dc, ¶ms);
set_mpfr_flags (rand_counter);
MPC_FUNCTION_CALL;
check_mpfr_flags (rand_counter++);
check_data (dc, ¶ms, 0);
#ifdef MPC_FUNCTION_CALL_SYMMETRIC
MPC_FUNCTION_CALL_SYMMETRIC;
check_data (dc, ¶ms, 0);
#endif
#ifdef MPC_FUNCTION_CALL_REUSE_OP1
if (copy_parameter (¶ms, 1, 2) == 0)
{
MPC_FUNCTION_CALL_REUSE_OP1;
check_data (dc, ¶ms, 2);
}
#endif
#ifdef MPC_FUNCTION_CALL_REUSE_OP2
if (copy_parameter (¶ms, 1, 3) == 0)
{
MPC_FUNCTION_CALL_REUSE_OP2;
check_data (dc, ¶ms, 3);
}
#endif
#ifdef MPC_FUNCTION_CALL_REUSE_OP3
if (copy_parameter (¶ms, 1, 4) == 0)
{
MPC_FUNCTION_CALL_REUSE_OP3;
check_data (dc, ¶ms, 4);
}
#endif
}
close_datafile (dc);
clear_parameters (¶ms);
return 0;
}
mpc-1.1.0/tests/div_fr.dat 0000644 0001751 0001751 00000041106 12426164730 012327 0000000 0000000 # Data file for mpc_div_fr.
#
# Copyright (C) 2008 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# For explanations on the file format, see add_fr.dat.
# special values
0 0 7 nan 7 nan 7 -inf 7 -inf 7 -inf N N
0 0 7 +inf 7 +inf 7 -inf 7 -inf 7 -1 N N
0 0 7 +inf 7 +inf 7 -inf 7 -inf 7 -0 N N
0 0 7 -inf 7 -inf 7 -inf 7 -inf 7 +0 N N
0 0 7 -inf 7 -inf 7 -inf 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 nan N N
0 0 7 nan 7 +0 7 -inf 7 -1 7 -inf N N
0 0 7 +inf 7 1 7 -inf 7 -1 7 -1 N N
0 0 7 +inf 7 +inf 7 -inf 7 -1 7 -0 N N
0 0 7 -inf 7 -inf 7 -inf 7 -1 7 +0 N N
0 0 7 -inf 7 -1 7 -inf 7 -1 7 1 N N
0 0 7 nan 7 -0 7 -inf 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 nan N N
0 0 7 nan 7 +0 7 -inf 7 -0 7 -inf N N
0 0 7 +inf 7 +0 7 -inf 7 -0 7 -1 N N
0 0 7 +inf 7 nan 7 -inf 7 -0 7 -0 N N
0 0 7 -inf 7 nan 7 -inf 7 -0 7 +0 N N
0 0 7 -inf 7 -0 7 -inf 7 -0 7 1 N N
0 0 7 nan 7 -0 7 -inf 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 nan N N
0 0 7 nan 7 -0 7 -inf 7 +0 7 -inf N N
0 0 7 +inf 7 -0 7 -inf 7 +0 7 -1 N N
0 0 7 +inf 7 nan 7 -inf 7 +0 7 -0 N N
0 0 7 -inf 7 nan 7 -inf 7 +0 7 +0 N N
0 0 7 -inf 7 +0 7 -inf 7 +0 7 1 N N
0 0 7 nan 7 +0 7 -inf 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 nan N N
0 0 7 nan 7 -0 7 -inf 7 1 7 -inf N N
0 0 7 +inf 7 -1 7 -inf 7 1 7 -1 N N
0 0 7 +inf 7 -inf 7 -inf 7 1 7 -0 N N
0 0 7 -inf 7 +inf 7 -inf 7 1 7 +0 N N
0 0 7 -inf 7 1 7 -inf 7 1 7 1 N N
0 0 7 nan 7 +0 7 -inf 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 1 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 -inf N N
0 0 7 +inf 7 -inf 7 -inf 7 +inf 7 -1 N N
0 0 7 +inf 7 -inf 7 -inf 7 +inf 7 -0 N N
0 0 7 -inf 7 +inf 7 -inf 7 +inf 7 +0 N N
0 0 7 -inf 7 +inf 7 -inf 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 -inf N N
0 0 7 +inf 7 nan 7 -inf 7 nan 7 -1 N N
0 0 7 +inf 7 nan 7 -inf 7 nan 7 -0 N N
0 0 7 -inf 7 nan 7 -inf 7 nan 7 +0 N N
0 0 7 -inf 7 nan 7 -inf 7 nan 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 nan N N
0 0 7 +0 7 nan 7 -1 7 -inf 7 -inf N N
0 0 7 1 7 +inf 7 -1 7 -inf 7 -1 N N
0 0 7 +inf 7 +inf 7 -1 7 -inf 7 -0 N N
0 0 7 -inf 7 -inf 7 -1 7 -inf 7 +0 N N
0 0 7 -1 7 -inf 7 -1 7 -inf 7 1 N N
0 0 7 -0 7 nan 7 -1 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 nan N N
0 0 7 +0 7 +0 7 -1 7 -1 7 -inf N N
0 0 7 -0 7 -0 7 -1 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -1 7 nan N N
0 0 7 +0 7 +0 7 -1 7 -0 7 -inf N N
0 0 7 -0 7 -0 7 -1 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -0 7 nan N N
0 0 7 +0 7 -0 7 -1 7 +0 7 -inf N N
0 0 7 -0 7 +0 7 -1 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 +0 7 nan N N
0 0 7 +0 7 -0 7 -1 7 1 7 -inf N N
0 0 7 -0 7 +0 7 -1 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 1 7 nan N N
0 0 7 +0 7 nan 7 -1 7 +inf 7 -inf N N
0 0 7 1 7 -inf 7 -1 7 +inf 7 -1 N N
0 0 7 +inf 7 -inf 7 -1 7 +inf 7 -0 N N
0 0 7 -inf 7 +inf 7 -1 7 +inf 7 +0 N N
0 0 7 -1 7 +inf 7 -1 7 +inf 7 1 N N
0 0 7 -0 7 nan 7 -1 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 nan N N
0 0 7 +0 7 nan 7 -1 7 nan 7 -inf N N
0 0 7 1 7 nan 7 -1 7 nan 7 -1 N N
0 0 7 +inf 7 nan 7 -1 7 nan 7 -0 N N
0 0 7 -inf 7 nan 7 -1 7 nan 7 +0 N N
0 0 7 -1 7 nan 7 -1 7 nan 7 1 N N
0 0 7 -0 7 nan 7 -1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 nan 7 nan N N
0 0 7 +0 7 nan 7 -0 7 -inf 7 -inf N N
0 0 7 +0 7 +inf 7 -0 7 -inf 7 -1 N N
0 0 7 nan 7 +inf 7 -0 7 -inf 7 -0 N N
0 0 7 nan 7 -inf 7 -0 7 -inf 7 +0 N N
0 0 7 -0 7 -inf 7 -0 7 -inf 7 1 N N
0 0 7 -0 7 nan 7 -0 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 nan N N
0 0 7 +0 7 +0 7 -0 7 -1 7 -inf N N
0 0 7 -0 7 -0 7 -0 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -1 7 nan N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -inf N N
0 0 7 -0 7 -0 7 -0 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -0 7 nan N N
0 0 7 +0 7 -0 7 -0 7 +0 7 -inf N N
0 0 7 -0 7 +0 7 -0 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 +0 7 nan N N
0 0 7 +0 7 -0 7 -0 7 1 7 -inf N N
0 0 7 -0 7 +0 7 -0 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 1 7 nan N N
0 0 7 +0 7 nan 7 -0 7 +inf 7 -inf N N
0 0 7 +0 7 -inf 7 -0 7 +inf 7 -1 N N
0 0 7 nan 7 -inf 7 -0 7 +inf 7 -0 N N
0 0 7 nan 7 +inf 7 -0 7 +inf 7 +0 N N
0 0 7 -0 7 +inf 7 -0 7 +inf 7 1 N N
0 0 7 -0 7 nan 7 -0 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 nan N N
0 0 7 +0 7 nan 7 -0 7 nan 7 -inf N N
0 0 7 +0 7 nan 7 -0 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 +0 N N
0 0 7 -0 7 nan 7 -0 7 nan 7 1 N N
0 0 7 -0 7 nan 7 -0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 nan 7 nan N N
0 0 7 -0 7 nan 7 +0 7 -inf 7 -inf N N
0 0 7 -0 7 +inf 7 +0 7 -inf 7 -1 N N
0 0 7 nan 7 +inf 7 +0 7 -inf 7 -0 N N
0 0 7 nan 7 -inf 7 +0 7 -inf 7 +0 N N
0 0 7 +0 7 -inf 7 +0 7 -inf 7 1 N N
0 0 7 +0 7 nan 7 +0 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 nan N N
0 0 7 -0 7 +0 7 +0 7 -1 7 -inf N N
0 0 7 +0 7 -0 7 +0 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -1 7 nan N N
0 0 7 -0 7 +0 7 +0 7 -0 7 -inf N N
0 0 7 +0 7 -0 7 +0 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -0 7 nan N N
0 0 7 -0 7 -0 7 +0 7 +0 7 -inf N N
0 0 7 +0 7 +0 7 +0 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 +0 7 nan N N
0 0 7 -0 7 -0 7 +0 7 1 7 -inf N N
0 0 7 +0 7 +0 7 +0 7 1 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 1 7 nan N N
0 0 7 -0 7 nan 7 +0 7 +inf 7 -inf N N
0 0 7 -0 7 -inf 7 +0 7 +inf 7 -1 N N
0 0 7 nan 7 -inf 7 +0 7 +inf 7 -0 N N
0 0 7 nan 7 +inf 7 +0 7 +inf 7 +0 N N
0 0 7 +0 7 +inf 7 +0 7 +inf 7 1 N N
0 0 7 +0 7 nan 7 +0 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 nan N N
0 0 7 -0 7 nan 7 +0 7 nan 7 -inf N N
0 0 7 -0 7 nan 7 +0 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 +0 N N
0 0 7 +0 7 nan 7 +0 7 nan 7 1 N N
0 0 7 +0 7 nan 7 +0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 nan 7 nan N N
0 0 7 -0 7 nan 7 1 7 -inf 7 -inf N N
0 0 7 -1 7 +inf 7 1 7 -inf 7 -1 N N
0 0 7 -inf 7 +inf 7 1 7 -inf 7 -0 N N
0 0 7 +inf 7 -inf 7 1 7 -inf 7 +0 N N
0 0 7 1 7 -inf 7 1 7 -inf 7 1 N N
0 0 7 +0 7 nan 7 1 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -inf 7 nan N N
0 0 7 -0 7 +0 7 1 7 -1 7 -inf N N
0 0 7 +0 7 -0 7 1 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -1 7 nan N N
0 0 7 -0 7 +0 7 1 7 -0 7 -inf N N
0 0 7 +0 7 -0 7 1 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -0 7 nan N N
0 0 7 -0 7 -0 7 1 7 +0 7 -inf N N
0 0 7 +0 7 +0 7 1 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 1 7 +0 7 nan N N
0 0 7 -0 7 -0 7 1 7 1 7 -inf N N
0 0 7 +0 7 +0 7 1 7 1 7 +inf N N
0 0 7 nan 7 nan 7 1 7 1 7 nan N N
0 0 7 -0 7 nan 7 1 7 +inf 7 -inf N N
0 0 7 -1 7 -inf 7 1 7 +inf 7 -1 N N
0 0 7 -inf 7 -inf 7 1 7 +inf 7 -0 N N
0 0 7 +inf 7 +inf 7 1 7 +inf 7 +0 N N
0 0 7 1 7 +inf 7 1 7 +inf 7 1 N N
0 0 7 +0 7 nan 7 1 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 1 7 +inf 7 nan N N
0 0 7 -0 7 nan 7 1 7 nan 7 -inf N N
0 0 7 -1 7 nan 7 1 7 nan 7 -1 N N
0 0 7 -inf 7 nan 7 1 7 nan 7 -0 N N
0 0 7 +inf 7 nan 7 1 7 nan 7 +0 N N
0 0 7 1 7 nan 7 1 7 nan 7 1 N N
0 0 7 +0 7 nan 7 1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 1 7 nan 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 -inf N N
0 0 7 -inf 7 +inf 7 +inf 7 -inf 7 -1 N N
0 0 7 -inf 7 +inf 7 +inf 7 -inf 7 -0 N N
0 0 7 +inf 7 -inf 7 +inf 7 -inf 7 +0 N N
0 0 7 +inf 7 -inf 7 +inf 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 nan N N
0 0 7 nan 7 +0 7 +inf 7 -1 7 -inf N N
0 0 7 -inf 7 1 7 +inf 7 -1 7 -1 N N
0 0 7 -inf 7 +inf 7 +inf 7 -1 7 -0 N N
0 0 7 +inf 7 -inf 7 +inf 7 -1 7 +0 N N
0 0 7 +inf 7 -1 7 +inf 7 -1 7 1 N N
0 0 7 nan 7 -0 7 +inf 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 nan N N
0 0 7 nan 7 +0 7 +inf 7 -0 7 -inf N N
0 0 7 -inf 7 +0 7 +inf 7 -0 7 -1 N N
0 0 7 -inf 7 nan 7 +inf 7 -0 7 -0 N N
0 0 7 +inf 7 nan 7 +inf 7 -0 7 +0 N N
0 0 7 +inf 7 -0 7 +inf 7 -0 7 1 N N
0 0 7 nan 7 -0 7 +inf 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 nan N N
0 0 7 nan 7 -0 7 +inf 7 +0 7 -inf N N
0 0 7 -inf 7 -0 7 +inf 7 +0 7 -1 N N
0 0 7 -inf 7 nan 7 +inf 7 +0 7 -0 N N
0 0 7 +inf 7 nan 7 +inf 7 +0 7 +0 N N
0 0 7 +inf 7 +0 7 +inf 7 +0 7 1 N N
0 0 7 nan 7 +0 7 +inf 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 nan N N
0 0 7 nan 7 -0 7 +inf 7 1 7 -inf N N
0 0 7 -inf 7 -1 7 +inf 7 1 7 -1 N N
0 0 7 -inf 7 -inf 7 +inf 7 1 7 -0 N N
0 0 7 +inf 7 +inf 7 +inf 7 1 7 +0 N N
0 0 7 +inf 7 1 7 +inf 7 1 7 1 N N
0 0 7 nan 7 +0 7 +inf 7 1 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 1 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 -inf N N
0 0 7 -inf 7 -inf 7 +inf 7 +inf 7 -1 N N
0 0 7 -inf 7 -inf 7 +inf 7 +inf 7 -0 N N
0 0 7 +inf 7 +inf 7 +inf 7 +inf 7 +0 N N
0 0 7 +inf 7 +inf 7 +inf 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 -inf N N
0 0 7 -inf 7 nan 7 +inf 7 nan 7 -1 N N
0 0 7 -inf 7 nan 7 +inf 7 nan 7 -0 N N
0 0 7 +inf 7 nan 7 +inf 7 nan 7 +0 N N
0 0 7 +inf 7 nan 7 +inf 7 nan 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 -inf N N
0 0 7 nan 7 +inf 7 nan 7 -inf 7 -1 N N
0 0 7 nan 7 +inf 7 nan 7 -inf 7 -0 N N
0 0 7 nan 7 -inf 7 nan 7 -inf 7 +0 N N
0 0 7 nan 7 -inf 7 nan 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 nan N N
0 0 7 nan 7 +0 7 nan 7 -1 7 -inf N N
0 0 7 nan 7 1 7 nan 7 -1 7 -1 N N
0 0 7 nan 7 +inf 7 nan 7 -1 7 -0 N N
0 0 7 nan 7 -inf 7 nan 7 -1 7 +0 N N
0 0 7 nan 7 -1 7 nan 7 -1 7 1 N N
0 0 7 nan 7 -0 7 nan 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -1 7 nan N N
0 0 7 nan 7 +0 7 nan 7 -0 7 -inf N N
0 0 7 nan 7 +0 7 nan 7 -0 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 +0 N N
0 0 7 nan 7 -0 7 nan 7 -0 7 1 N N
0 0 7 nan 7 -0 7 nan 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -0 7 nan N N
0 0 7 nan 7 -0 7 nan 7 +0 7 -inf N N
0 0 7 nan 7 -0 7 nan 7 +0 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 +0 N N
0 0 7 nan 7 +0 7 nan 7 +0 7 1 N N
0 0 7 nan 7 +0 7 nan 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +0 7 nan N N
0 0 7 nan 7 -0 7 nan 7 1 7 -inf N N
0 0 7 nan 7 -1 7 nan 7 1 7 -1 N N
0 0 7 nan 7 -inf 7 nan 7 1 7 -0 N N
0 0 7 nan 7 +inf 7 nan 7 1 7 +0 N N
0 0 7 nan 7 1 7 nan 7 1 7 1 N N
0 0 7 nan 7 +0 7 nan 7 1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 1 7 nan N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 -inf N N
0 0 7 nan 7 -inf 7 nan 7 +inf 7 -1 N N
0 0 7 nan 7 -inf 7 nan 7 +inf 7 -0 N N
0 0 7 nan 7 +inf 7 nan 7 +inf 7 +0 N N
0 0 7 nan 7 +inf 7 nan 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 nan N N
# values with only 1, -1, +0, -0
0 0 7 1 7 1 7 -1 7 -1 7 -1 N N
0 0 7 +inf 7 +inf 7 -1 7 -1 7 -0 N N
0 0 7 -inf 7 -inf 7 -1 7 -1 7 +0 N N
0 0 7 -1 7 -1 7 -1 7 -1 7 1 N N
0 0 7 1 7 +0 7 -1 7 -0 7 -1 N N
0 0 7 +inf 7 nan 7 -1 7 -0 7 -0 N N
0 0 7 -inf 7 nan 7 -1 7 -0 7 +0 N N
0 0 7 -1 7 -0 7 -1 7 -0 7 1 N N
0 0 7 1 7 -0 7 -1 7 +0 7 -1 N N
0 0 7 +inf 7 nan 7 -1 7 +0 7 -0 N N
0 0 7 -inf 7 nan 7 -1 7 +0 7 +0 N N
0 0 7 -1 7 +0 7 -1 7 +0 7 1 N N
0 0 7 1 7 -1 7 -1 7 1 7 -1 N N
0 0 7 +inf 7 -inf 7 -1 7 1 7 -0 N N
0 0 7 -inf 7 +inf 7 -1 7 1 7 +0 N N
0 0 7 -1 7 1 7 -1 7 1 7 1 N N
0 0 7 +0 7 1 7 -0 7 -1 7 -1 N N
0 0 7 nan 7 +inf 7 -0 7 -1 7 -0 N N
0 0 7 nan 7 -inf 7 -0 7 -1 7 +0 N N
0 0 7 -0 7 -1 7 -0 7 -1 7 1 N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 -0 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 -0 7 +0 N N
0 0 7 -0 7 -0 7 -0 7 -0 7 1 N N
0 0 7 +0 7 -0 7 -0 7 +0 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 +0 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 +0 7 +0 N N
0 0 7 -0 7 +0 7 -0 7 +0 7 1 N N
0 0 7 +0 7 -1 7 -0 7 1 7 -1 N N
0 0 7 nan 7 -inf 7 -0 7 1 7 -0 N N
0 0 7 nan 7 +inf 7 -0 7 1 7 +0 N N
0 0 7 -0 7 1 7 -0 7 1 7 1 N N
0 0 7 -0 7 1 7 +0 7 -1 7 -1 N N
0 0 7 nan 7 +inf 7 +0 7 -1 7 -0 N N
0 0 7 nan 7 -inf 7 +0 7 -1 7 +0 N N
0 0 7 +0 7 -1 7 +0 7 -1 7 1 N N
0 0 7 -0 7 +0 7 +0 7 -0 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 -0 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 -0 7 +0 N N
0 0 7 +0 7 -0 7 +0 7 -0 7 1 N N
0 0 7 -0 7 -0 7 +0 7 +0 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 +0 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 +0 7 +0 N N
0 0 7 +0 7 +0 7 +0 7 +0 7 1 N N
0 0 7 -0 7 -1 7 +0 7 1 7 -1 N N
0 0 7 nan 7 -inf 7 +0 7 1 7 -0 N N
0 0 7 nan 7 +inf 7 +0 7 1 7 +0 N N
0 0 7 +0 7 1 7 +0 7 1 7 1 N N
0 0 7 -1 7 1 7 1 7 -1 7 -1 N N
0 0 7 -inf 7 +inf 7 1 7 -1 7 -0 N N
0 0 7 +inf 7 -inf 7 1 7 -1 7 +0 N N
0 0 7 1 7 -1 7 1 7 -1 7 1 N N
0 0 7 -1 7 +0 7 1 7 -0 7 -1 N N
0 0 7 -inf 7 nan 7 1 7 -0 7 -0 N N
0 0 7 +inf 7 nan 7 1 7 -0 7 +0 N N
0 0 7 1 7 -0 7 1 7 -0 7 1 N N
0 0 7 -1 7 -0 7 1 7 +0 7 -1 N N
0 0 7 -inf 7 nan 7 1 7 +0 7 -0 N N
0 0 7 +inf 7 nan 7 1 7 +0 7 +0 N N
0 0 7 1 7 +0 7 1 7 +0 7 1 N N
0 0 7 -1 7 -1 7 1 7 1 7 -1 N N
0 0 7 -inf 7 -inf 7 1 7 1 7 -0 N N
0 0 7 +inf 7 +inf 7 1 7 1 7 +0 N N
0 0 7 1 7 1 7 1 7 1 7 1 N N
mpc-1.1.0/tests/tpow_fr.c 0000644 0001751 0001751 00000004157 12471661720 012216 0000000 0000000 /* tpow_fr -- test file for mpc_pow_fr.
Copyright (C) 2009, 2011, 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
static void
test_reuse (void)
{
mpc_t z;
mpfr_t y;
int inex;
mpfr_init2 (y, 2);
mpc_init2 (z, 2);
mpc_set_si_si (z, 0, -1, MPC_RNDNN);
mpfr_neg (mpc_realref (z), mpc_realref (z), MPFR_RNDN);
mpc_div_2ui (z, z, 4, MPC_RNDNN);
mpfr_set_ui (y, 512, MPFR_RNDN);
inex = mpc_pow_fr (z, z, y, MPC_RNDNN);
if (MPC_INEX_RE(inex) != 0 || MPC_INEX_IM(inex) != 0 ||
mpfr_cmp_ui_2exp (mpc_realref(z), 1, -2048) != 0 ||
mpfr_cmp_ui (mpc_imagref(z), 0) != 0 || mpfr_signbit (mpc_imagref(z)) == 0)
{
printf ("Error in test_reuse, wrong ternary value or output\n");
printf ("inex=(%d %d)\n", MPC_INEX_RE(inex), MPC_INEX_IM(inex));
printf ("z="); mpc_out_str (stdout, 2, 0, z, MPC_RNDNN); printf ("\n");
exit (1);
}
mpfr_clear (y);
mpc_clear (z);
}
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_pow_fr (P[1].mpc, P[2].mpc, P[3].mpfr, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_pow_fr (P[1].mpc, P[1].mpc, P[3].mpfr, P[4].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
test_reuse (); /* FIXME: remove it, already checked by tgeneric */
data_check_template ("pow_fr.dsc", "pow_fr.dat");
tgeneric_template ("pow_fr.dsc", 2, 1024, 7, 10);
test_end ();
return 0;
}
mpc-1.1.0/tests/sub_ui.dsc 0000644 0001751 0001751 00000001603 12471661720 012344 0000000 0000000 # Description file for mpc_sub_ui
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_sub_ui
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
unsigned long int
mpc_rnd_t
mpc-1.1.0/tests/rootofunity.dat 0000644 0001751 0001751 00000010032 12744456667 013471 0000000 0000000 # Data file for mpc_rootofunity.
#
# Copyright (C) 2008, 2010, 2016 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM OP1 OP2 RND_RE RND_IM
# special values
0 0 53 nan 53 nan 0 0 N N
0 0 53 nan 53 nan 0 1 N N
# roots of unity of small order, some of them with exact results
0 0 53 1 53 0 1 1 Z U
0 0 53 -1 53 0 2 1 N N
0 0 53 0 53 1 4 1 U Z
0 0 53 -1 53 0 4 2 U Z
0 0 53 0 53 -1 4 3 U Z
0 0 53 1 53 0 4 4 U Z
0 - 53 -0.5 53 0b1.1011101101100111101011101000010110000100110010101010e-1 3 1 N D
0 + 53 -0.5 53 0b1.1011101101100111101011101000010110000100110010101011e-1 3 1 N U
0 - 53 -0.5 53 -0b1.1011101101100111101011101000010110000100110010101011e-1 3 2 N D
0 + 53 -0.5 53 -0b1.1011101101100111101011101000010110000100110010101010e-1 3 2 N U
0 - 53 0.5 53 0b1.1011101101100111101011101000010110000100110010101010e-1 6 1 D Z
0 - 53 0.5 53 -0b1.1011101101100111101011101000010110000100110010101011e-1 6 5 D D
0 + 53 0.5 53 -0b1.1011101101100111101011101000010110000100110010101010e-1 6 5 D U
- 0 53 0b1.1011101101100111101011101000010110000100110010101010e-1 53 0.5 12 1 N Z
- 0 53 0b1.1011101101100111101011101000010110000100110010101010e-1 53 0.5 12 1 D Z
+ 0 53 0b1.1011101101100111101011101000010110000100110010101011e-1 53 0.5 12 1 U Z
- 0 53 -0b1.1011101101100111101011101000010110000100110010101011e-1 53 0.5 12 5 D Z
+ 0 53 -0b1.1011101101100111101011101000010110000100110010101010e-1 53 0.5 12 5 U Z
- 0 53 -0b1.1011101101100111101011101000010110000100110010101011e-1 53 -0.5 12 7 D Z
+ 0 53 -0b1.1011101101100111101011101000010110000100110010101010e-1 53 -0.5 12 7 U Z
- 0 53 0b1.1011101101100111101011101000010110000100110010101010e-1 53 -0.5 12 11 D Z
+ 0 53 0b1.1011101101100111101011101000010110000100110010101011e-1 53 -0.5 12 11 U Z
+ + 53 0b1.0110101000001001111001100110011111110011101111001101e-1 53 0b1.0110101000001001111001100110011111110011101111001101e-1 8 1 N N
+ - 53 0b1.0110101000001001111001100110011111110011101111001101e-1 53 0b1.0110101000001001111001100110011111110011101111001100e-1 8 1 U D
- + 53 0b1.0110101000001001111001100110011111110011101111001100e-1 53 0b1.0110101000001001111001100110011111110011101111001101e-1 8 1 D U
+ - 53 -0b1.0110101000001001111001100110011111110011101111001100e-1 53 0b1.0110101000001001111001100110011111110011101111001100e-1 8 3 U D
- + 53 -0b1.0110101000001001111001100110011111110011101111001101e-1 53 0b1.0110101000001001111001100110011111110011101111001101e-1 8 3 D U
+ - 53 -0b1.0110101000001001111001100110011111110011101111001100e-1 53 -0b1.0110101000001001111001100110011111110011101111001101e-1 8 5 U D
- + 53 -0b1.0110101000001001111001100110011111110011101111001101e-1 53 -0b1.0110101000001001111001100110011111110011101111001100e-1 8 5 D U
+ - 53 0b1.0110101000001001111001100110011111110011101111001101e-1 53 -0b1.0110101000001001111001100110011111110011101111001101e-1 8 7 U D
- + 53 0b1.0110101000001001111001100110011111110011101111001100e-1 53 -0b1.0110101000001001111001100110011111110011101111001100e-1 8 7 D U
# example with large n=2^32-1 and small real or imaginary part
+ + 53 1 53 0b1.1001001000011111101101010100010111010100111100010100e-30 4294967295 1 N N
- + 53 -0b1.1001001000011111101101010100010111010100111100010100e-32 53 1 4294967295 1073741824 N N
mpc-1.1.0/tests/ttanh.c 0000644 0001751 0001751 00000002304 12471661720 011644 0000000 0000000 /* ttanh -- test file for mpc_tanh.
Copyright (C) 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_tanh (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_tanh (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("tanh.dsc", "tanh.dat");
tgeneric_template ("tanh.dsc", 2, 512, 7, 4);
test_end ();
return 0;
}
mpc-1.1.0/tests/sub.dsc 0000644 0001751 0001751 00000001601 12471661720 011645 0000000 0000000 # Description file for mpc_sub
#
# Copyright (C) 2008, 2011, 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_sub
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/tcos.c 0000644 0001751 0001751 00000004365 12471661720 011507 0000000 0000000 /* tcos -- test file for mpc_cos.
Copyright (C) 2008, 2009, 2011, 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
static void
bug20090105 (void)
{
/* this bug appeared on 32-bits machines */
mpc_t op, expected, got;
mpc_init2 (op, 324);
mpc_init2 (expected, 324);
mpc_init2 (got, 324);
mpfr_set_str (mpc_realref(op), "-3.f1813b1487372434fea4414a520f65a343a16d0ec1ffb"
"b2b880154db8d63377ce788fc4215c450300@1", 16, MPFR_RNDN);
mpfr_set_str (mpc_imagref(op), "-2.b7a0c80bcacf1ccbbac614bf53a58b672b1b503161bee"
"59a82e46a23570b652f7ba5f01ef766d1c50", 16,MPFR_RNDN);
mpfr_set_str (mpc_realref(expected), "7.57c5b08a2b11b660d906a354289b0724b9c4b237"
"95abe33424e8d9858e534bd5d776ddd18e34b0240", 16, MPFR_RNDN);
mpfr_set_str (mpc_imagref(expected), "-1.f41a389646d068e0263561cb3c5d1df763945ad"
"ed9339f2a98387a3c4f97dbfd8a08b7d0af2f11b46", 16,MPFR_RNDN);
mpc_cos (got, op, MPC_RNDNN);
if (mpc_cmp (got, expected) != 0)
TEST_FAILED ("mpc_cos", op, got, expected, MPC_RNDNN);
mpc_clear (got);
mpc_clear(expected);
mpc_clear (op);
}
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_cos (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_cos (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("cos.dsc", "cos.dat");
tgeneric_template ("cos.dsc", 2, 512, 7, 7);
bug20090105 (); /* TODO: move data in cos.dat */
test_end ();
return 0;
}
mpc-1.1.0/tests/sin_cos.dsc 0000644 0001751 0001751 00000001554 12471661720 012520 0000000 0000000 # Description file for mpc_sin_cos
#
# Copyright (C) 2013, 2014 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_sin_cos
RETURN:
mpcc_inex
OUTPUT:
mpc_ptr
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc_rnd_t
mpc-1.1.0/tests/random.c 0000644 0001751 0001751 00000017325 12720536532 012016 0000000 0000000 /* random.c -- Handle seed for random numbers.
// Copyright (C) 2008, 2009, 2010, 2011, 2012 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
/* Put test_start at the beginning of your test function and
test_end at the end.
These are an adaptation of those of MPFR. */
#include "config.h"
#include
#include "mpc-tests.h"
#ifdef TIME_WITH_SYS_TIME
# include
# include
#else
# ifdef HAVE_SYS_TIME_H
# include
# else
# include
# endif
#endif
gmp_randstate_t rands;
static char rands_initialized;
void
test_start (void)
{
char *environment_seed;
unsigned long seed;
if (rands_initialized)
{
fprintf (stderr,
"Put test_start at the beginning of your test function.\n");
exit (1);
}
gmp_randinit_default (rands);
rands_initialized = 1;
environment_seed = getenv ("GMP_CHECK_RANDOMIZE");
if (environment_seed == NULL)
gmp_randseed_ui (rands, 0xfac11e);
else
{
seed = (unsigned long int) atoi (environment_seed);
if (seed == 0 || seed == 1)
{
#if defined HAVE_GETTIMEOFDAY
struct timeval tv;
gettimeofday (&tv, NULL);
seed = (unsigned long int) (tv.tv_sec + tv.tv_usec);
#else
time_t tv;
time (&tv);
seed = (unsigned long int) tv;
#endif
gmp_randseed_ui (rands, seed);
printf ("Seed GMP_CHECK_RANDOMIZE=%lu "
"(include this in bug reports)\n", seed);
}
else
{
printf ("Re-seeding with GMP_CHECK_RANDOMIZE=%lu\n", seed);
gmp_randseed_ui (rands, seed);
}
}
/* some tests assume a given exponent range for MPFR, thus since the
default exponent range for MPFR is not specified, we hard-code it */
mpfr_set_emax (1073741821);
mpfr_set_emin (-1073741821);
}
void
test_end (void)
{
if (rands_initialized)
{
rands_initialized = 0;
gmp_randclear (rands);
}
mpfr_free_cache ();
}
/* Set z to a non zero value random value with absolute values of Re(z) and
Im(z) either zero (but not both in the same time) or otherwise greater than
or equal to 2^{emin-1} and less than 2^emax.
Each part is negative with probability equal to NEGATIVE_PROBABILITY / 256.
The result has one zero part (but never the two of them) with probability
equal to ZERO_PROBABILITY / 256.
*/
void
test_default_random (mpc_ptr z, mpfr_exp_t emin, mpfr_exp_t emax,
unsigned int negative_probability,
unsigned int zero_probability)
{
const unsigned long range = (unsigned long int) (emax - emin) + 1;
unsigned long r;
if (!rands_initialized)
{
fprintf (stderr,
"Put test_start at the beginning of your test function.\n");
exit (1);
}
do
{
mpc_urandom (z, rands);
} while (mpfr_zero_p (mpc_realref (z)) || mpfr_zero_p (mpc_imagref (z)));
if (zero_probability > 256)
zero_probability = 256;
r = gmp_urandomb_ui (rands, 19);
if ((r & 0x1FF) < zero_probability
|| ((r >> 9) & 0x1FF) < zero_probability)
{
int zero_re_p = (r & 0x1FF) < zero_probability;
int zero_im_p = ((r >> 9) & 0x1FF) < zero_probability;
if (zero_re_p && zero_im_p)
{
/* we just want one zero part. */
zero_re_p = (r >> 18) & 1;
zero_im_p = !zero_re_p;
}
if (zero_re_p)
mpfr_set_ui (mpc_realref (z), 0, MPFR_RNDN);
if (zero_im_p)
mpfr_set_ui (mpc_imagref (z), 0, MPFR_RNDN);
}
if (!mpfr_zero_p (mpc_realref (z)))
mpfr_set_exp (mpc_realref (z), (mpfr_exp_t) gmp_urandomm_ui (rands, range) + emin);
if (!mpfr_zero_p (mpc_imagref (z)))
mpfr_set_exp (mpc_imagref (z), (mpfr_exp_t) gmp_urandomm_ui (rands, range) + emin);
if (negative_probability > 256)
negative_probability = 256;
r = gmp_urandomb_ui (rands, 16);
if ((r & 0xFF) < negative_probability)
mpfr_neg (mpc_realref (z), mpc_realref (z), MPFR_RNDN);
if (((r>>8) & 0xFF) < negative_probability)
mpfr_neg (mpc_imagref (z), mpc_imagref (z), MPFR_RNDN);
}
/* Set n to a non zero value random value with absolute values less than
2^emax.
n is negative with probability equal to NEGATIVE_PROBABILITY / 256.
*/
void test_random_si (long int *n, unsigned long emax,
unsigned int negative_probability)
{
unsigned long r;
if (!rands_initialized)
{
fprintf (stderr,
"Put test_start at the beginning of your test function.\n");
exit (1);
}
do
{
*n = gmp_urandomb_ui (rands, emax);
} while (*n == 0);
if (negative_probability > 256)
negative_probability = 256;
r = gmp_urandomb_ui (rands, 8);
if ((r & 0xFF) < negative_probability)
*n = -(*n);
}
/* Set x to a non zero value random value with absolute values greater than
or equal to 2^{emin-1} and less than 2^emax.
x is negative with probability equal to NEGATIVE_PROBABILITY / 256.
*/
void
test_random_mpfr (mpfr_ptr x, mpfr_exp_t emin, mpfr_exp_t emax,
unsigned int negative_probability)
{
const unsigned long range = (unsigned long int) (emax - emin) + 1;
unsigned long r;
if (!rands_initialized)
{
fprintf (stderr,
"Put test_start at the beginning of your test function.\n");
exit (1);
}
do
{
mpfr_urandom (x, rands, MPFR_RNDN);
} while (mpfr_zero_p (x));
mpfr_set_exp (x, (mpfr_exp_t) gmp_urandomm_ui (rands, range) + emin);
if (negative_probability > 256)
negative_probability = 256;
r = gmp_urandomb_ui (rands, 8);
if ((r & 0xFF) < negative_probability)
mpfr_neg (x, x, MPFR_RNDN);
}
/* Set x to a non zero value random value.
x is negative with probability equal to NEGATIVE_PROBABILITY / 256.
*/
void
test_random_d (double *x, unsigned int negative_probability)
{
MPFR_DECL_INIT (mpfr_x, 53);
test_random_mpfr (mpfr_x, -1022, 1022, negative_probability);
*x = mpfr_get_d (mpfr_x, MPFR_RNDN);
}
/* Set z to a non zero value random value with absolute values of Re(z) and
Im(z) greater than or equal to 2^{emin-1} and less than 2^emax.
Each part is negative with probability equal to NEGATIVE_PROBABILITY / 256.
*/
void
test_random_mpc (mpc_ptr z, mpfr_exp_t emin, mpfr_exp_t emax,
unsigned int negative_probability)
{
const unsigned long range = (unsigned long int) (emax - emin) + 1;
unsigned long r;
if (!rands_initialized)
{
fprintf (stderr,
"Put test_start at the beginning of your test function.\n");
exit (1);
}
do
{
mpc_urandom (z, rands);
} while (mpfr_zero_p (mpc_realref (z)) || mpfr_zero_p (mpc_imagref (z)));
mpfr_set_exp (mpc_realref (z),
(mpfr_exp_t) gmp_urandomm_ui (rands, range) + emin);
mpfr_set_exp (mpc_imagref (z),
(mpfr_exp_t) gmp_urandomm_ui (rands, range) + emin);
if (negative_probability > 256)
negative_probability = 256;
r = gmp_urandomb_ui (rands, 16);
if ((r & 0xFF) < negative_probability)
mpfr_neg (mpc_realref (z), mpc_realref (z), MPFR_RNDN);
if (((r>>8) & 0xFF) < negative_probability)
mpfr_neg (mpc_imagref (z), mpc_imagref (z), MPFR_RNDN);
}
mpc-1.1.0/tests/pow_z.dsc 0000644 0001751 0001751 00000001572 12471661720 012221 0000000 0000000 # Description file for mpc_pow_z
#
# Copyright (C) 2012 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_pow_fr
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpz_srcptr
mpc_rnd_t
mpc-1.1.0/tests/tcmp_abs.c 0000644 0001751 0001751 00000001767 12721025724 012326 0000000 0000000 /* tcmp_abs -- test file for mpc_cmp_abs.
Copyright (C) 2016 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].i = mpc_cmp_abs (P[1].mpc, P[2].mpc)
#include "data_check.tpl"
int
main (void)
{
test_start ();
data_check_template ("cmp_abs.dsc", "cmp_abs.dat");
test_end ();
return 0;
}
mpc-1.1.0/tests/div_ui.dsc 0000644 0001751 0001751 00000001543 12471661720 012340 0000000 0000000 # Description file for mpc_div_ui
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_div_ui
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
unsigned long int
mpc_rnd_t
mpc-1.1.0/tests/tmul_si.c 0000644 0001751 0001751 00000002265 12471661720 012210 0000000 0000000 /* tmul_si -- test file for mpc_mul_si.
Copyright (C) 2002, 2005, 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_mul_si (P[1].mpc, P[2].mpc, P[3].si, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_mul_si (P[1].mpc, P[1].mpc, P[3].si, P[4].mpc_rnd)
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
tgeneric_template ("mul_si.dsc", 2, 1024, 7, 1024);
test_end ();
return 0;
}
mpc-1.1.0/tests/tget_version.c 0000644 0001751 0001751 00000003512 12523111044 013223 0000000 0000000 /* tget_version -- Test file for mpc_get_version
Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include
#include
#include "mpc-tests.h"
int
main (void)
{
#ifdef __MPIR_VERSION
printf ("MPIR: include %d.%d.%d, lib %s\n",
__MPIR_VERSION, __MPIR_VERSION_MINOR, __MPIR_VERSION_PATCHLEVEL,
mpir_version);
#else
printf ("GMP: include %d.%d.%d, lib %s\n",
__GNU_MP_VERSION, __GNU_MP_VERSION_MINOR, __GNU_MP_VERSION_PATCHLEVEL,
gmp_version);
#endif
printf ("MPFR: include %s, lib %s\n",
MPFR_VERSION_STRING,
mpfr_get_version ());
printf ("MPC: include %s, lib %s\n", MPC_VERSION_STRING,
mpc_get_version ());
if (strcmp (mpc_get_version (), MPC_VERSION_STRING) != 0)
{
printf ("Error: header and library do not match\n"
"mpc_get_version: \"%s\"\nMPC_VERSION_STRING: \"%s\"\n",
mpc_get_version(), MPC_VERSION_STRING);
exit (1);
}
#ifdef MPC_CC
printf ("C compiler: %s\n", MPC_CC);
#endif
#ifdef MPC_GCC
printf ("GCC: %s\n", MPC_GCC);
#endif
#ifdef MPC_GCC_VERSION
printf ("GCC version: %s\n", MPC_GCC_VERSION);
#endif
return 0;
}
mpc-1.1.0/tests/norm.dat 0000644 0001751 0001751 00000016004 12720536532 012030 0000000 0000000 # Data file for mpc_norm.
#
# Copyright (C) 2008, 2010, 2011 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# For explanations on the file format, see abs.dat.
# special values
0 7 +inf 7 -inf 7 -inf N
0 7 +inf 7 -inf 7 -1 N
0 7 +inf 7 -inf 7 -0 N
0 7 +inf 7 -inf 7 +0 N
0 7 +inf 7 -inf 7 1 N
0 7 +inf 7 -inf 7 +inf N
0 7 +inf 7 -inf 7 nan N
0 7 +inf 7 -1 7 -inf N
0 7 +inf 7 -1 7 +inf N
0 7 nan 7 -1 7 nan N
0 7 +inf 7 -0 7 -inf N
0 7 +inf 7 -0 7 +inf N
0 7 nan 7 -0 7 nan N
0 7 +inf 7 +0 7 -inf N
0 7 +inf 7 +0 7 +inf N
0 7 nan 7 +0 7 nan N
0 7 +inf 7 1 7 -inf N
0 7 +inf 7 1 7 +inf N
0 7 nan 7 1 7 nan N
0 7 +inf 7 +inf 7 -inf N
0 7 +inf 7 +inf 7 -1 N
0 7 +inf 7 +inf 7 -0 N
0 7 +inf 7 +inf 7 +0 N
0 7 +inf 7 +inf 7 1 N
0 7 +inf 7 +inf 7 +inf N
0 7 +inf 7 +inf 7 nan N
0 7 +inf 7 nan 7 -inf N
0 7 nan 7 nan 7 -1 N
0 7 nan 7 nan 7 -0 N
0 7 nan 7 nan 7 +0 N
0 7 nan 7 nan 7 1 N
0 7 +inf 7 nan 7 +inf N
0 7 nan 7 nan 7 nan N
# values with only 1, -1, +0, -0
0 7 2 7 -1 7 -1 N
0 7 1 7 -1 7 -0 N
0 7 1 7 -1 7 +0 N
0 7 2 7 -1 7 1 N
0 7 1 7 -0 7 -1 N
0 7 +0 7 -0 7 -0 N
0 7 +0 7 -0 7 +0 N
0 7 1 7 -0 7 1 N
0 7 1 7 +0 7 -1 N
0 7 +0 7 +0 7 -0 N
0 7 +0 7 +0 7 +0 N
0 7 1 7 +0 7 1 N
0 7 2 7 1 7 -1 N
0 7 1 7 1 7 -0 N
0 7 1 7 1 7 +0 N
0 7 2 7 1 7 1 N
# overflow
+ 53 +inf 2 0x1p536870912 2 0x1p536870912 U
# infinite loop reported by E. Thome
- 250 +0 250 -0xf.fdda3457c3e69e5841461d505b42987feb42867a4a2d2872179c4efa20054c0@-136943039 250 -0xc.670d1beda685fdd771b6246e32ff49ec4fd70aec25367444e00933e6965d3c0@-136943040 N
# inexact values: norm (2+i)=5, in the middle between two values at precision 2
- 2 4 2 2 2 1 D
- 2 4 2 2 2 1 Z
+ 2 6 2 2 2 1 U
- 2 4 2 2 2 1 N
# over- and underflows
+ 10 inf 10 0 10 0b1@536870912 N
+ 10 inf 10 0 10 0b1@536870912 U
- 10 0b1.111111111@1073741820 10 0 10 0b1@536870912 D
- 10 0b1.111111111@1073741820 10 0 10 0b1@536870912 Z
- 10 0 10 0 10 0b1@-536870913 N
- 10 0 10 0 10 0b1@-536870913 D
- 10 0 10 0 10 0b1@-536870913 Z
+ 10 0b1.000000000e-1073741822 10 0 10 0b1@-536870913 U
+ 10 inf 10 0b1@536870912 10 0 N
+ 10 inf 10 0b1@536870912 10 0 U
- 10 0b1.111111111@1073741820 10 0b1@536870912 10 0 D
- 10 0b1.111111111@1073741820 10 0b1@536870912 10 0 Z
- 10 0 10 0b1@-536870913 10 0 N
- 10 0 10 0b1@-536870913 10 0 D
- 10 0 10 0b1@-536870913 10 0 Z
+ 10 0b1.000000000e-1073741822 10 0b1@-536870913 10 0 U
+ 10 inf 10 1 10 0b1@536870912 N
+ 10 inf 10 1 10 0b1@536870912 U
- 10 0b1.111111111@1073741820 10 1 10 0b1@536870912 D
- 10 0b1.111111111@1073741820 10 1 10 0b1@536870912 Z
- 10 1 10 1 10 0b1@-536870913 N
- 10 1 10 1 10 0b1@-536870913 D
- 10 1 10 1 10 0b1@-536870913 Z
+ 10 0b1.000000001 10 1 10 0b1@-536870913 U
+ 10 inf 10 0b1@536870912 10 1 N
+ 10 inf 10 0b1@536870912 10 1 U
- 10 0b1.111111111@1073741820 10 0b1@536870912 10 1 D
- 10 0b1.111111111@1073741820 10 0b1@536870912 10 1 Z
- 10 1 10 0b1@-536870913 10 1 N
- 10 1 10 0b1@-536870913 10 1 D
- 10 1 10 0b1@-536870913 10 1 Z
+ 10 0b1.000000001 10 0b1@-536870913 10 1 U
+ 3 inf 10 0b1.1 10 0b1@536870912 N
+ 3 inf 10 0b1.1 10 0b1@536870912 U
- 3 0b1.11@1073741820 10 0b1.1 10 0b1@536870912 D
- 3 0b1.11@1073741820 10 0b1.1 10 0b1@536870912 Z
+ 3 2.5 10 0b1.1 10 0b1@-536870913 N
- 3 2 10 0b1.1 10 0b1@-536870913 D
- 3 2 10 0b1.1 10 0b1@-536870913 Z
+ 3 0b1.01@1 10 0b1.1 10 0b1@-536870913 U
+ 3 inf 10 0b1@536870912 10 0b1.1 N
+ 3 inf 10 0b1@536870912 10 0b1.1 U
- 3 0b1.11@1073741820 10 0b1@536870912 10 0b1.1 D
- 3 0b1.11@1073741820 10 0b1@536870912 10 0b1.1 Z
+ 3 2.5 10 0b1@-536870913 10 0b1.1 N
- 3 2 10 0b1@-536870913 10 0b1.1 D
- 3 2 10 0b1@-536870913 10 0b1.1 Z
+ 3 0b1.01@1 10 0b1@-536870913 10 0b1.1 U
+ 10 inf 10 0b1@-536870913 10 0b1@536870912 N
+ 10 inf 10 0b1@-536870913 10 0b1@536870912 U
- 10 0b1.111111111@1073741820 10 0b1@-536870913 10 0b1@536870912 D
- 10 0b1.111111111@1073741820 10 0b1@-536870912 10 0b1@536870912 Z
+ 10 inf 10 0b1@536870912 10 0b1@-536870913 N
+ 10 inf 10 0b1@536870912 10 0b1@-536870913 U
- 10 0b1.111111111@1073741820 10 0b1@536870912 10 0b1@-536870913 D
- 10 0b1.111111111@1073741820 10 0b1@536870912 10 0b1@-536870913 Z
+ 10 inf 10 0b1@536870912 10 0b1@536870912 N
+ 10 inf 10 0b1@536870912 10 0b1@536870912 U
- 10 0b1.111111111@1073741820 10 0b1@536870912 10 0b1@536870912 D
- 10 0b1.111111111@1073741820 10 0b1@536870912 10 0b1@536870912 Z
- 10 0 10 0b1@-536870913 10 0b1@-536870913 N
- 10 0 10 0b1@-536870913 10 0b1@-536870913 D
- 10 0 10 0b1@-536870913 10 0b1@-536870913 Z
+ 10 0b1@-1073741822 10 0b1@-536870913 10 0b1@-536870913 U
0 18 0b1.00100000000001001@-1073741811 2 0b1.1@-536870906 2 0b1.1@-536870913 N
0 18 0b1.00100000000001001@-1073741811 2 0b1.1@-536870913 2 0b1.1@-536870906 N
0 18 0b1.00100000000001001@-1073741811 2 0b1.1@-536870906 2 0b1.1@-536870913 Z
0 18 0b1.00100000000001001@-1073741811 2 0b1.1@-536870913 2 0b1.1@-536870906 Z
0 18 0b1.00100000000001001@-1073741811 2 0b1.1@-536870906 2 0b1.1@-536870913 D
0 18 0b1.00100000000001001@-1073741811 2 0b1.1@-536870913 2 0b1.1@-536870906 D
0 18 0b1.00100000000001001@-1073741811 2 0b1.1@-536870906 2 0b1.1@-536870913 U
0 18 0b1.00100000000001001@-1073741811 2 0b1.1@-536870913 2 0b1.1@-536870906 U
mpc-1.1.0/tests/mul.dsc 0000644 0001751 0001751 00000001566 12471661720 011663 0000000 0000000 # Description file for mpc_mul
#
# Copyright (C) 2012, INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_mul
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/neg.dat 0000644 0001751 0001751 00000012401 12426164730 011623 0000000 0000000 # Data file for mpc_neg.
#
# Copyright (C) 2008 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP_RE OP_RE PREC_OP_IM OP_IM RND_RE RND_IM
#
# see sin.dat for precisions
# special values (following ISO C99 standard)
0 0 53 +inf 53 +inf 53 -inf 53 -inf N N
0 0 53 +inf 53 +1 53 -inf 53 -1 N N
0 0 53 +inf 53 +0 53 -inf 53 -0 N N
0 0 53 +inf 53 -0 53 -inf 53 +0 N N
0 0 53 +inf 53 -1 53 -inf 53 +1 N N
0 0 53 +inf 53 -inf 53 -inf 53 +inf N N
0 0 53 +inf 53 nan 53 -inf 53 nan N N
0 0 53 +1 53 +inf 53 -1 53 -inf N N
0 0 53 +1 53 +0 53 -1 53 -0 N N
0 0 53 +1 53 -0 53 -1 53 +0 N N
0 0 53 +1 53 -inf 53 -1 53 +inf N N
0 0 53 +1 53 nan 53 -1 53 nan N N
0 0 53 +0 53 +inf 53 -0 53 -inf N N
0 0 53 +0 53 +1 53 -0 53 -1 N N
0 0 53 +0 53 +0 53 -0 53 -0 N N
0 0 53 +0 53 -0 53 -0 53 +0 N N
0 0 53 +0 53 -1 53 -0 53 +1 N N
0 0 53 +0 53 -inf 53 -0 53 +inf N N
0 0 53 +0 53 nan 53 -0 53 nan N N
0 0 53 -0 53 +inf 53 +0 53 -inf N N
0 0 53 -0 53 +1 53 +0 53 -1 N N
0 0 53 -0 53 +0 53 +0 53 -0 N N
0 0 53 -0 53 -0 53 +0 53 +0 N N
0 0 53 -0 53 -1 53 +0 53 +1 N N
0 0 53 -0 53 -inf 53 +0 53 +inf N N
0 0 53 -0 53 nan 53 +0 53 nan N N
0 0 53 -1 53 +inf 53 +1 53 -inf N N
0 0 53 -1 53 +0 53 +1 53 -0 N N
0 0 53 -1 53 -0 53 +1 53 +0 N N
0 0 53 -1 53 -inf 53 +1 53 +inf N N
0 0 53 -1 53 nan 53 +1 53 nan N N
0 0 53 -inf 53 +inf 53 +inf 53 -inf N N
0 0 53 -inf 53 +1 53 +inf 53 -1 N N
0 0 53 -inf 53 +0 53 +inf 53 -0 N N
0 0 53 -inf 53 -0 53 +inf 53 +0 N N
0 0 53 -inf 53 -1 53 +inf 53 +1 N N
0 0 53 -inf 53 -inf 53 +inf 53 +inf N N
0 0 53 -inf 53 nan 53 +inf 53 nan N N
0 0 53 nan 53 +inf 53 nan 53 -inf N N
0 0 53 nan 53 +1 53 nan 53 -1 N N
0 0 53 nan 53 +0 53 nan 53 -0 N N
0 0 53 nan 53 -0 53 nan 53 +0 N N
0 0 53 nan 53 -1 53 nan 53 +1 N N
0 0 53 nan 53 -inf 53 nan 53 +inf N N
0 0 53 nan 53 nan 53 nan 53 nan N N
# pure real argument
0 0 53 -0x123456789abcdep+52 2 -0 53 0x123456789abcdep+52 17 +0 N N
0 0 53 0x123456789abcdep+52 3 -0 54 -0x123456789abcdep+52 16 +0 Z N
0 0 53 -0x123456789abcdep+52 4 +0 55 0x123456789abcdep+52 15 -0 U N
0 0 53 0x123456789abcdep+52 5 +0 56 -0x123456789abcdep+52 14 -0 D N
0 0 53 -0x123456789abcdep+52 6 -0 57 0x123456789abcdep+52 13 +0 Z Z
0 0 53 0x123456789abcdep+52 7 -0 58 -0x123456789abcdep+52 12 +0 U Z
0 0 53 -0x123456789abcdep+52 8 +0 59 0x123456789abcdep+52 11 -0 D Z
0 0 53 0x123456789abcdep+52 9 +0 60 -0x123456789abcdep+52 10 -0 N Z
0 0 53 -0x123456789abcdep+52 10 -0 61 0x123456789abcdep+52 9 +0 U U
0 0 53 0x123456789abcdep+52 11 -0 62 -0x123456789abcdep+52 8 +0 D U
0 0 53 -0x123456789abcdep+52 12 +0 63 0x123456789abcdep+52 7 -0 N U
0 0 53 0x123456789abcdep+52 13 +0 64 -0x123456789abcdep+52 6 -0 Z U
0 0 53 -0x123456789abcdep+52 14 -0 65 0x123456789abcdep+52 5 +0 D D
0 0 53 0x123456789abcdep+52 15 -0 66 -0x123456789abcdep+52 4 +0 N D
0 0 53 -0x123456789abcdep+52 16 +0 67 0x123456789abcdep+52 3 -0 Z D
0 0 53 0x123456789abcdep+52 17 +0 68 -0x123456789abcdep+52 2 -0 U D
# pure imaginary argument
0 0 53 -0 53 -0x123456789abcdep+52 53 +0 53 0x123456789abcdep+52 N N
0 0 53 +0 53 -0x123456789abcdep+52 51 -0 54 0x123456789abcdep+52 Z N
0 0 53 -0 53 0x123456789abcdep+52 49 +0 55 -0x123456789abcdep+52 U N
0 0 53 +0 53 0x123456789abcdep+52 47 -0 56 -0x123456789abcdep+52 D N
0 0 53 -0 53 -0x123456789abcdep+52 45 +0 57 0x123456789abcdep+52 Z Z
0 0 53 +0 53 -0x123456789abcdep+52 43 -0 58 0x123456789abcdep+52 U Z
0 0 53 -0 53 0x123456789abcdep+52 41 +0 59 -0x123456789abcdep+52 D Z
0 0 53 +0 53 0x123456789abcdep+52 39 -0 60 -0x123456789abcdep+52 N Z
0 0 53 -0 53 -0x123456789abcdep+52 37 +0 61 0x123456789abcdep+52 U U
0 0 53 +0 53 -0x123456789abcdep+52 35 -0 62 0x123456789abcdep+52 D U
0 0 53 -0 53 0x123456789abcdep+52 33 +0 63 -0x123456789abcdep+52 N U
0 0 53 +0 53 0x123456789abcdep+52 31 -0 64 -0x123456789abcdep+52 Z U
0 0 53 -0 53 -0x123456789abcdep+52 29 +0 65 0x123456789abcdep+52 D D
0 0 53 +0 53 -0x123456789abcdep+52 27 -0 66 0x123456789abcdep+52 N D
0 0 53 -0 53 0x123456789abcdep+52 25 +0 67 -0x123456789abcdep+52 Z D
0 0 53 +0 53 0x123456789abcdep+52 23 -0 68 -0x123456789abcdep+52 U D
mpc-1.1.0/tests/treimref.c 0000644 0001751 0001751 00000002435 12471661720 012350 0000000 0000000 /* treimref -- test file for mpc_realref and mpc_imagref.
Copyright (C) 2009, 2012 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
int
main (void)
{
mpc_t z;
test_start ();
test_end ();
mpc_init2 (z, 6);
mpc_set_ui_ui (z, 17, 42, MPC_RNDNN);
mpfr_set_ui (mpc_realref (z), 18, MPFR_RNDN);
if (mpfr_get_ui (mpc_realref (z), MPFR_RNDN) != 18)
{
fprintf (stderr, "Error in mpfr_set_ui/mpc_realref\n");
exit (1);
}
mpfr_set_ui (mpc_imagref (z), 43, MPFR_RNDN);
if (mpfr_get_ui (mpc_imagref (z), MPFR_RNDN) != 43)
{
fprintf (stderr, "Error in mpfr_set_ui/mpc_imagref\n");
exit (1);
}
mpc_clear (z);
return 0;
}
mpc-1.1.0/tests/sqrt.dsc 0000644 0001751 0001751 00000001550 12471661720 012050 0000000 0000000 # Description file for mpc_sqrt
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_sqrt
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/mul_i.dsc 0000644 0001751 0001751 00000001523 12471661720 012164 0000000 0000000 # Description file for mpc_mul_i
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_mul_i
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
int
mpc_rnd_t
mpc-1.1.0/tests/mul_ui.dsc 0000644 0001751 0001751 00000001543 12471661720 012353 0000000 0000000 # Description file for mpc_mul_ui
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_mul_ui
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
unsigned long int
mpc_rnd_t
mpc-1.1.0/tests/div.dsc 0000644 0001751 0001751 00000001522 12471661720 011640 0000000 0000000 # Description file for mpc_div
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_div
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/imag.dsc 0000644 0001751 0001751 00000001553 12471661720 011777 0000000 0000000 # Description file for mpc_imag
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_imag
RETURN:
mpfr_inex
OUTPUT:
mpfr_ptr
INPUT:
mpc_srcptr
mpfr_rnd_t
mpc-1.1.0/tests/tasinh.c 0000644 0001751 0001751 00000003133 12471661720 012015 0000000 0000000 /* tasinh -- test file for mpc_asinh.
Copyright (C) 2009, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
static void
bug20091120 (void)
{
mpc_t x, y;
mpc_init2 (x, 53);
mpc_init3 (y, 17, 42);
mpc_set_ui_ui (x, 1, 1, MPC_RNDNN);
mpc_asinh (y, x, MPC_RNDNN);
if (mpfr_get_prec (mpc_realref(y)) != 17 ||
mpfr_get_prec (mpc_imagref(y)) != 42)
{
printf ("Error, mpc_asinh changed the precisions!!!\n");
exit (1);
}
mpc_clear (x);
mpc_clear (y);
}
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_asinh (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_asinh (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
bug20091120 ();
data_check_template ("asinh.dsc", "asinh.dat");
tgeneric_template ("asinh.dsc", 2, 512, 7, 7);
test_end ();
return 0;
}
mpc-1.1.0/tests/tsub_fr.c 0000644 0001751 0001751 00000002373 12471661720 012200 0000000 0000000 /* tsub_fr -- test file for mpc_sub_fr.
Copyright (C) 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_sub_fr (P[1].mpc, P[2].mpc, P[3].mpfr, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_sub_fr (P[1].mpc, P[1].mpc, P[3].mpfr, P[4].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("sub_fr.dsc", "sub_fr.dat");
tgeneric_template ("sub_fr.dsc", 2, 1024, 7, 128);
test_end ();
return 0;
}
mpc-1.1.0/tests/acos.dsc 0000644 0001751 0001751 00000001505 12471661720 012004 0000000 0000000 # Description file for mpc_acos
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_acos
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/tmul_2ui.c 0000644 0001751 0001751 00000002264 12471661720 012273 0000000 0000000 /* tmul_2ui -- test file for mpc_mul_2ui.
Copyright (C) 2008, 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_mul_2ui (P[1].mpc, P[2].mpc, P[3].ui, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_mul_2ui (P[1].mpc, P[1].mpc, P[3].ui, P[4].mpc_rnd)
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
tgeneric_template ("mul_2ui.dsc", 2, 1024, 7, 1024);
test_end ();
return 0;
}
mpc-1.1.0/tests/tpow_d.c 0000644 0001751 0001751 00000003557 12471661720 012035 0000000 0000000 /* tpow_d -- test file for mpc_pow_d.
Copyright (C) 2009, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
static void
test_integer_values (void)
{
mpc_t z;
mpc_init2 (z, 11);
mpc_set_ui_ui (z, 2, 3, MPC_RNDNN);
mpc_pow_d (z, z, 3.0, MPC_RNDNN);
if (mpc_cmp_si_si (z, -46, 9) != 0)
{
printf ("Error for mpc_pow_d (1)\n");
exit (1);
}
mpc_set_si_si (z, -3, 4, MPC_RNDNN);
mpc_pow_d (z, z, 0.5, MPC_RNDNN);
if (mpc_cmp_si_si (z, 1, 2) != 0)
{
printf ("Error for mpc_pow_d (2)\n");
exit (1);
}
mpc_set_ui_ui (z, 2, 3, MPC_RNDNN);
mpc_pow_d (z, z, 6.0, MPC_RNDNN);
if (mpc_cmp_si_si (z, 2035, -828) != 0)
{
printf ("Error for mpc_pow_d (3)\n");
exit (1);
}
mpc_clear (z);
}
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_pow_d (P[1].mpc, P[2].mpc, P[3].d, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_pow_d (P[1].mpc, P[1].mpc, P[3].d, P[4].mpc_rnd)
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
tgeneric_template ("pow_d.dsc", 2, 1024, 15, 20);
test_integer_values (); /* FIXME: should be in a data file */
test_end ();
return 0;
}
mpc-1.1.0/tests/tconj.c 0000644 0001751 0001751 00000002325 12471661720 011646 0000000 0000000 /* tconj -- test file for mpc_conj.
Copyright (C) 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_conj (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_conj (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("conj.dsc", "conj.dat");
tgeneric_template ("conj.dsc", 2, 1024, 1, 0);
test_end ();
return 0;
}
mpc-1.1.0/tests/atanh.dat 0000644 0001751 0001751 00000013327 12433365705 012160 0000000 0000000 # Data file for mpc_atanh.
#
# Copyright (C) 2009, 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP_RE OP_RE PREC_OP_IM OP_IM RND_RE RND_IM
#
# where op = op_re + i * op_im, rop = rop_re + i * rop_im,
# rop_re is ROP_RE rounded to nearest to the precision of PREC_ROP_RE
# rop_im is ROP_IM rounded to nearest to the precision of PREC_ROP_IM
# op_re is OP_RE rounded to nearest to the precision of PREC_OP_RE
# op_im is OP_IM rounded to nearest to the precision of PREC_OP_IM
# ROP_RE is checked against Re(atan op) rounded to the precision PREC_ROP_RE
# in the direction RND_RE
# ROP_IM is checked against Im(atan op) rounded to the precision PREC_ROP_IM
# in the direction RND_IM
# INEX_RE is the ternary value for the real part with the following notation:
# "?" ternary value not checked
# "+" if ROP_RE is greater than the exact mathematical result
# "0" if ROP_RE is exactly the mathematical result
# "-" if ROP_RE is less than the exact mathematical result
# (m.m. INEX_IM)
# rounding modes notation:
# "N" is rounding to nearest
# "Z" is rounding towards zero
# "U" is rounding towards plus infinity
# "D" is rounding towards minus infinity
# Use prefixes "0b" for values in base two, "0x" for values in base sixteen,
# no prefix for value in base ten.
# In all bases, "nan" is NaN, "inf" is infinity;
# The sign of the result is checked with "+inf", "-inf", "-0", or "+0".
# special values (following ISO C99 standard)
0 + 53 -0 53 -0x1921FB54442D18p-52 53 -inf 53 -inf N N
0 + 53 -0 53 -0x1921FB54442D18p-52 53 -inf 53 -1 N N
0 + 53 -0 53 -0x1921FB54442D18p-52 53 -inf 53 -0 N N
0 - 53 -0 53 +0x1921FB54442D18p-52 53 -inf 53 +0 N N
0 - 53 -0 53 +0x1921FB54442D18p-52 53 -inf 53 +1 N N
0 - 53 -0 53 +0x1921FB54442D18p-52 53 -inf 53 +inf N N
0 0 53 -0 53 nan 53 -inf 53 nan N N
0 + 53 -0 53 -0x1921FB54442D18p-52 53 -6 53 -inf N N
0 - 53 -0 53 +0x1921FB54442D18p-52 53 -6 53 +inf N N
0 0 53 nan 53 nan 53 -6 53 nan N N
0 + 53 -0 53 -0x1921FB54442D18p-52 53 -0 53 -inf N N
0 0 53 -0 53 -0 53 -0 53 -0 N N
0 0 53 -0 53 +0 53 -0 53 +0 N N
0 - 53 -0 53 +0x1921FB54442D18p-52 53 -0 53 +inf N N
0 0 53 -0 53 nan 53 -0 53 nan N N
0 + 53 +0 53 -0x1921FB54442D18p-52 53 +0 53 -inf N N
0 0 53 +0 53 -0 53 +0 53 -0 N N
0 0 53 +0 53 +0 53 +0 53 +0 N N
0 - 53 +0 53 +0x1921FB54442D18p-52 53 +0 53 +inf N N
0 0 53 +0 53 nan 53 +0 53 nan N N
0 + 53 +0 53 -0x1921FB54442D18p-52 53 +6 53 -inf N N
0 - 53 +0 53 +0x1921FB54442D18p-52 53 +6 53 +inf N N
0 0 53 nan 53 nan 53 +6 53 nan N N
0 + 53 +0 53 -0x1921FB54442D18p-52 53 +inf 53 -inf N N
0 + 53 +0 53 -0x1921FB54442D18p-52 53 +inf 53 -1 N N
0 + 53 +0 53 -0x1921FB54442D18p-52 53 +inf 53 -0 N N
0 - 53 +0 53 +0x1921FB54442D18p-52 53 +inf 53 +0 N N
0 - 53 +0 53 +0x1921FB54442D18p-52 53 +inf 53 +1 N N
0 - 53 +0 53 +0x1921FB54442D18p-52 53 +inf 53 +inf N N
0 0 53 +0 53 nan 53 +inf 53 nan N N
0 + 53 0 53 -0x1921FB54442D18p-52 53 nan 53 -inf N N
0 0 53 nan 53 nan 53 nan 53 -1 N N
0 0 53 nan 53 nan 53 nan 53 -0 N N
0 0 53 nan 53 nan 53 nan 53 +0 N N
0 0 53 nan 53 nan 53 nan 53 +1 N N
0 - 53 0 53 +0x1921FB54442D18p-52 53 nan 53 +inf N N
0 0 53 nan 53 nan 53 nan 53 nan N N
0 0 53 +inf 53 +0 53 1 53 +0 N N
# pure real argument
- + 53 -0x1E27076E2AF2E6p-57 53 -0x1921FB54442D18p-52 53 -17 53 -0 N N
- - 53 -0x1E27076E2AF2E6p-57 53 +0x1921FB54442D18p-52 53 -17 53 +0 N N
+ + 53 +0x1E27076E2AF2E6p-57 53 -0x1921FB54442D18p-52 53 +17 53 -0 N N
+ - 53 +0x1E27076E2AF2E6p-57 53 +0x1921FB54442D18p-52 53 +17 53 +0 N N
+ 0 53 -0x1F2272AE325A57p-53 53 -0 53 -.75 53 -0 N N
+ 0 53 -0x1F2272AE325A57p-53 53 +0 53 -.75 53 +0 N N
- 0 53 +0x1F2272AE325A57p-53 53 -0 53 +.75 53 -0 N N
- 0 53 +0x1F2272AE325A57p-53 53 +0 53 +.75 53 +0 N N
- + 12 0x6F1p-50 12 0xC91p-11 12 0x9380000000 12 +0 N N
# pure imaginary argument
0 - 53 -0 53 -0x167D8863BC99BDp-52 53 -0 53 -6 N N
0 - 53 +0 53 -0x167D8863BC99BDp-52 53 +0 53 -6 N N
0 + 53 -0 53 +0x167D8863BC99BDp-52 53 -0 53 +6 N N
0 + 53 +0 53 +0x167D8863BC99BDp-52 53 +0 53 +6 N N
0 + 53 -0 53 -0x1F5B75F92C80DDp-55 53 -0 53 -.25 N N
0 + 53 +0 53 -0x1F5B75F92C80DDp-55 53 +0 53 -.25 N N
0 - 53 -0 53 +0x1F5B75F92C80DDp-55 53 -0 53 +.25 N N
0 - 53 +0 53 +0x1F5B75F92C80DDp-55 53 +0 53 +.25 N N
# IEEE-754 double precision
- + 53 0x13F3F785301CE9p-54 53 0xBFA43C2A868B3p-51 53 0x3243F6A8885A3p-48 53 0x162E42FEFA39EFp-53 N N
mpc-1.1.0/tests/comparisons.c 0000644 0001751 0001751 00000003103 12426164730 013060 0000000 0000000 /* comparisons.c -- Comparison functions.
Copyright (C) 2008, 2009, 2011 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
/* comparisons, see description in mpc-tests.h */
int
same_mpfr_value (mpfr_ptr got, mpfr_ptr ref, int known_sign)
{
/* The sign of zeroes and infinities is checked only when
known_sign is true. */
if (mpfr_nan_p (got))
return mpfr_nan_p (ref);
if (mpfr_inf_p (got))
return mpfr_inf_p (ref) &&
(!known_sign || mpfr_signbit (got) == mpfr_signbit (ref));
if (mpfr_zero_p (got))
return mpfr_zero_p (ref) &&
(!known_sign || mpfr_signbit (got) == mpfr_signbit (ref));
return mpfr_cmp (got, ref) == 0;
}
int
same_mpc_value (mpc_ptr got, mpc_ptr ref, known_signs_t known_signs)
{
return same_mpfr_value (mpc_realref (got), mpc_realref (ref), known_signs.re)
&& same_mpfr_value (mpc_imagref (got), mpc_imagref (ref), known_signs.im);
}
mpc-1.1.0/tests/asin.dsc 0000644 0001751 0001751 00000001505 12471661720 012011 0000000 0000000 # Description file for mpc_asin
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_asin
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/cos.dat 0000644 0001751 0001751 00000006542 12720536532 011647 0000000 0000000 # Data file for mpc_cos.
#
# Copyright (C) 2008, 2010 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# For explanations on the file format, see sin.dat.
# special values (following ISO C99 standard)
0 0 7 inf 7 NaN 7 -inf 7 -inf N N
0 0 7 NaN 7 NaN 7 -inf 7 -1 N N
0 0 7 NaN 7 0 7 -inf 7 -0 N N
0 0 7 NaN 7 0 7 -inf 7 +0 N N
0 0 7 NaN 7 NaN 7 -inf 7 1 N N
0 0 7 inf 7 NaN 7 -inf 7 +inf N N
0 0 7 NaN 7 NaN 7 -inf 7 NaN N N
0 0 7 +inf 7 -inf 7 -1 7 -inf N N
0 0 7 +inf 7 +inf 7 -1 7 +inf N N
0 0 7 NaN 7 NaN 7 -1 7 NaN N N
0 0 7 +inf 7 -0 7 -0 7 -inf N N
0 0 7 1 7 -0 7 -0 7 -0 N N
0 0 7 1 7 +0 7 -0 7 +0 N N
0 0 7 +inf 7 +0 7 -0 7 +inf N N
0 0 7 NaN 7 0 7 -0 7 NaN N N
0 0 7 +inf 7 +0 7 +0 7 -inf N N
0 0 7 1 7 +0 7 +0 7 -0 N N
0 0 7 1 7 -0 7 +0 7 +0 N N
0 0 7 +inf 7 -0 7 +0 7 +inf N N
0 0 7 NaN 7 0 7 +0 7 NaN N N
0 0 7 +inf 7 +inf 7 1 7 -inf N N
0 0 7 +inf 7 -inf 7 1 7 +inf N N
0 0 7 NaN 7 NaN 7 1 7 NaN N N
0 0 7 inf 7 NaN 7 +inf 7 -inf N N
0 0 7 NaN 7 NaN 7 +inf 7 -1 N N
0 0 7 NaN 7 0 7 +inf 7 -0 N N
0 0 7 NaN 7 0 7 +inf 7 +0 N N
0 0 7 NaN 7 NaN 7 +inf 7 1 N N
0 0 7 inf 7 NaN 7 +inf 7 +inf N N
0 0 7 NaN 7 NaN 7 +inf 7 NaN N N
0 0 7 +inf 7 NaN 7 NaN 7 -inf N N
0 0 7 NaN 7 NaN 7 NaN 7 -1 N N
0 0 7 NaN 7 0 7 NaN 7 -0 N N
0 0 7 NaN 7 0 7 NaN 7 +0 N N
0 0 7 NaN 7 NaN 7 NaN 7 1 N N
0 0 7 +inf 7 NaN 7 NaN 7 +inf N N
0 0 7 NaN 7 NaN 7 NaN 7 NaN N N
# purely real argument
- 0 50 0x8a51407da8344p-52 50 -0 7 -1 7 -0 N N
- 0 50 0x8a51407da8344p-52 50 +0 7 -1 7 +0 N N
- 0 50 0x8a51407da8344p-52 50 +0 7 1 7 -0 N N
- 0 50 0x8a51407da8344p-52 50 -0 7 1 7 +0 N N
# purely imaginary argument
- 0 50 0x18b07551d9f55p-48 50 -0 7 -0 7 -1 N N
- 0 50 0x18b07551d9f55p-48 50 +0 7 -0 7 1 N N
- 0 50 0x18b07551d9f55p-48 50 +0 7 +0 7 -1 N N
- 0 50 0x18b07551d9f55p-48 50 -0 7 +0 7 1 N N
# values with +1 and -1
- + 50 0xd56f54b7a1accp-52 50 -0xfd28666957478p-52 7 -1 7 -1 N N
- - 50 0xd56f54b7a1accp-52 50 0xfd28666957478p-52 7 -1 7 1 N N
- - 50 0xd56f54b7a1accp-52 50 0xfd28666957478p-52 7 1 7 -1 N N
- + 50 0xd56f54b7a1accp-52 50 -0xfd28666957478p-52 7 1 7 1 N N
# IEEE-754 double precision
+ 0 53 514 53 -0 53 +0 53 0x1BBDD1808C59A3p-50 N N
- 0 53 0x100FFFFFFFFFFFp-43 53 -0 53 +0 53 0x1BBDD1808C59A3p-50 D D
# huge values
- + 53 -inf 53 +inf 53 0x4580CBF242683p-3 53 -0x1B3E8A3660D279p-3 N N
+ + 53 +inf 53 +inf 53 -0x1B3E8A3660D279p-3 53 0x4580CBF242683p-3 N N
# bug reported by Joseph Myers (25 Mar 2015)
+ - 2 -0x3p1073741819 2 0x3p1073741819 2 -0x1p200 2 -0x1p800 Z Z
mpc-1.1.0/tests/tfr_div.c 0000644 0001751 0001751 00000002374 12471661720 012172 0000000 0000000 /* tfr_div -- test file for mpc_fr_div.
Copyright (C) 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_fr_div (P[1].mpc, P[2].mpfr, P[3].mpc, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP2 \
P[0].mpc_inex = mpc_fr_div (P[1].mpc, P[2].mpfr, P[1].mpc, P[4].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start();
data_check_template ("fr_div.dsc", "fr_div.dat");
tgeneric_template ("fr_div.dsc", 2, 1024, 7, 65535);
test_end ();
return 0;
}
mpc-1.1.0/tests/tpow_si.c 0000644 0001751 0001751 00000005724 12471661720 012223 0000000 0000000 /* tpow_si -- test file for mpc_pow_si.
Copyright (C) 2009, 2010, 2011, 2012 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include /* for CHAR_BIT */
#include "mpc-tests.h"
static void
compare_mpc_pow (mpfr_prec_t pmax, int iter, unsigned long nbits)
/* copied from tpow_ui.c and replaced unsigned by signed */
{
mpfr_prec_t p;
mpc_t x, y, z, t;
long n;
int i, inex_pow, inex_pow_si;
mpc_rnd_t rnd;
mpc_init3 (y, sizeof (unsigned long) * CHAR_BIT, MPFR_PREC_MIN);
for (p = MPFR_PREC_MIN; p <= pmax; p++)
for (i = 0; i < iter; i++)
{
mpc_init2 (x, p);
mpc_init2 (z, p);
mpc_init2 (t, p);
mpc_urandom (x, rands);
n = (signed long) gmp_urandomb_ui (rands, nbits);
mpc_set_si (y, n, MPC_RNDNN);
for (rnd = 0; rnd < 16; rnd ++)
{
inex_pow = mpc_pow (z, x, y, rnd);
inex_pow_si = mpc_pow_si (t, x, n, rnd);
if (mpc_cmp (z, t) != 0)
{
printf ("mpc_pow and mpc_pow_si differ for x=");
mpc_out_str (stdout, 10, 0, x, MPC_RNDNN);
printf (" n=%li\n", n);
printf ("mpc_pow gives ");
mpc_out_str (stdout, 10, 0, z, MPC_RNDNN);
printf ("\nmpc_pow_si gives ");
mpc_out_str (stdout, 10, 0, t, MPC_RNDNN);
printf ("\n");
exit (1);
}
if (inex_pow != inex_pow_si)
{
printf ("mpc_pow and mpc_pow_si give different flags for x=");
mpc_out_str (stdout, 10, 0, x, MPC_RNDNN);
printf (" n=%li\n", n);
printf ("mpc_pow gives %d\n", inex_pow);
printf ("mpc_pow_si gives %d\n", inex_pow_si);
exit (1);
}
}
mpc_clear (x);
mpc_clear (z);
mpc_clear (t);
}
mpc_clear (y);
}
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_pow_si (P[1].mpc, P[2].mpc, P[3].si, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_pow_si (P[1].mpc, P[1].mpc, P[3].si, P[4].mpc_rnd)
#include "data_check.tpl"
int
main (void)
{
test_start ();
data_check_template ("pow_si.dsc", "pow_si.dat");
compare_mpc_pow (100, 5, 19);
test_end ();
return 0;
}
mpc-1.1.0/tests/cmp_abs.dat 0000644 0001751 0001751 00000011161 12721025724 012455 0000000 0000000 # Data file for mpc_cmp_abs
#
# Copyright (C) 2016 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INT PREC_OP1_RE OP1_RE PREC_OP1_IM OP1_IM PREC_OP2_RE OP2_RE PREC_OP2_IM OP2_IM
# special values
0 53 -inf 53 -inf 53 -inf 53 -inf
0 53 -inf 53 +inf 53 +1 53 -inf
0 53 +inf 53 -inf 53 +inf 53 +0
1 53 +inf 53 +inf 53 -0 53 -1
1 53 -inf 53 -inf 53 -0 53 -1
0 53 -inf 53 +inf 53 +inf 53 nan
0 53 +inf 53 -inf 53 nan 53 -1
0 53 +inf 53 +inf 53 -0 53 nan
0 53 -inf 53 -inf 53 nan 53 nan
0 53 -1 53 -inf 53 +inf 53 -1
0 53 -inf 53 +1 53 +inf 53 -0
1 53 +1 53 -inf 53 -0 53 +1
1 53 +inf 53 +1 53 -0 53 -0
0 53 -1 53 -inf 53 +inf 53 nan
0 53 -inf 53 +1 53 nan 53 +1
0 53 +1 53 -inf 53 -0 53 nan
0 53 +inf 53 +1 53 nan 53 nan
0 53 -0 53 -inf 53 +0 53 +inf
1 53 -inf 53 +0 53 +1 53 -0
1 53 +0 53 -inf 53 -0 53 -0
0 53 +inf 53 +0 53 -inf 53 nan
0 53 -0 53 -inf 53 nan 53 -1
0 53 -inf 53 +0 53 +0 53 nan
0 53 +0 53 -inf 53 nan 53 nan
0 53 +0 53 +1 53 -0 53 -1
1 53 -1 53 -0 53 +0 53 -0
0 53 -0 53 +1 53 nan 53 +inf
0 53 +1 53 -0 53 -1 53 nan
0 53 +0 53 +1 53 nan 53 -0
0 53 -1 53 -0 53 nan 53 nan
0 53 -0 53 +0 53 +0 53 -0
0 53 +0 53 -0 53 nan 53 -inf
0 53 +0 53 +0 53 -1 53 nan
0 53 -0 53 -0 53 nan 53 -0
0 53 -0 53 +0 53 nan 53 nan
0 53 nan 53 -inf 53 nan 53 +inf
0 53 +inf 53 nan 53 -1 53 nan
0 53 nan 53 -inf 53 nan 53 -0
0 53 -inf 53 nan 53 nan 53 nan
0 53 +1 53 nan 53 nan 53 -1
0 53 nan 53 +1 53 -0 53 nan
0 53 -1 53 nan 53 nan 53 nan
0 53 nan 53 +0 53 +0 53 nan
0 53 +0 53 nan 53 nan 53 nan
0 53 nan 53 nan 53 nan 53 nan
# real arguments
-1 53 +1 53 -0 53 0x10000000000001p-52 53 -0
-1 53 +1 53 -0 53 0x10000000000001p-52 53 -0
-1 53 +1 53 -0 53 0x10000000000001p-52 53 -0
-1 53 -1 53 -0 53 0x10000000000001p-52 53 -0
# one real argument
1 53 +1 53 +1 53 0x10000000000001p-52 53 -0
1 53 +1 53 -2 53 0x10000000000001p-52 53 -0
1 53 -3 53 +3 53 0x10000000000001p-52 53 +0
1 53 -3 53 +3 53 0x10000000000001p-52 53 +0
1 53 -3 53 +3 53 0x10000000000001p-52 53 +0
1 53 -3 53 +3 53 0x10000000000001p-52 53 +0
1 53 -1 53 -4 53 0x10000000000001p-52 53 +0
-1 53 +0 53 +0 53 0x10000000000001p-52 53 -1
-1 53 +0 53 -0 53 0x10000000000001p-52 53 -2
-1 53 +0 53 +0 53 0x10000000000001p-52 53 +3
-1 53 -0 53 -0 53 0x10000000000001p-52 53 +4
# purely imaginary arguments
1 53 -0 53 0x10000000000001p-52 53 -0 53 +1
1 53 +0 53 0x10000000000001p-52 53 -0 53 +1
1 53 +0 53 0x10000000000001p-52 53 -0 53 +1
1 53 -0 53 0x10000000000001p-52 53 -0 53 +1
# one purely imaginary argument
-1 53 -0 53 0x10000000000001p-52 53 -1 53 +1
-1 53 +0 53 0x10000000000001p-52 53 -2 53 -1
-1 53 +0 53 0x10000000000001p-52 53 -3 53 -3
-1 53 +0 53 0x10000000000001p-52 53 -3 53 -3
-1 53 +0 53 0x10000000000001p-52 53 -3 53 -3
-1 53 +0 53 0x10000000000001p-52 53 -3 53 -3
-1 53 -0 53 0x10000000000001p-52 53 -4 53 -1
# some finite numbers with different signs, also at higher precision
0 53 1 53 8 53 4 53 7
0 53 1 53 8 53 4 53 -7
0 53 1 53 8 53 -4 53 7
0 53 1 53 8 53 -4 53 -7
0 53 1 53 -8 53 4 53 7
0 53 1 53 -8 53 4 53 -7
0 53 1 53 -8 53 -4 53 7
0 53 1 53 -8 53 -4 53 -7
0 53 -1 53 8 53 4 53 7
0 53 -1 53 8 53 4 53 -7
0 53 -1 53 8 53 -4 53 7
0 53 -1 53 8 53 -4 53 -7
0 53 -1 53 -8 53 4 53 7
0 53 -1 53 -8 53 4 53 -7
0 53 -1 53 -8 53 -4 53 7
0 53 -1 53 -8 53 -4 53 -7
0 53 1 53 8 53 4 53 7
0 53 1 53 8 53 7 53 4
0 53 8 53 1 53 4 53 7
0 53 8 53 1 53 7 53 4
0 100000 1 53 8 53 4 53 7
0 100000 1 53 8 53 7 53 4
0 100000 8 53 1 53 4 53 7
0 100000 8 53 1 53 7 53 4
1 53 1 53 4 53 2 53 3
-1 53 2 53 3 53 1 53 4
1 100000 1 53 4 53 2 53 3
-1 100000 2 53 3 53 1 53 4
mpc-1.1.0/tests/asinh.dsc 0000644 0001751 0001751 00000001507 12471661720 012163 0000000 0000000 # Description file for mpc_asinh
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_asinh
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/tsub_ui.c 0000644 0001751 0001751 00000002251 12471661720 012201 0000000 0000000 /* tsub_ui -- test file for mpc_sub_ui.
Copyright (C) 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_sub_ui (P[1].mpc, P[2].mpc, P[3].ui, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_sub_ui (P[1].mpc, P[1].mpc, P[3].ui, P[4].mpc_rnd)
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
tgeneric_template ("sub_ui.dsc", 2, 1024, 7, 1024);
test_end ();
return 0;
}
mpc-1.1.0/tests/tadd.c 0000644 0001751 0001751 00000004245 12471661720 011450 0000000 0000000 /* tadd -- test file for mpc_add.
Copyright (C) 2008, 2010, 2011, 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include
#include "mpc-tests.h"
static void
check_ternary_value (void)
{
mpc_t x, y, z;
mpfr_prec_t prec;
mpc_init2 (x, 2);
mpc_init2 (y, 2);
mpc_init2 (z, 2);
for (prec = 2; prec <= 1000; prec++)
{
mpc_set_prec (x, prec);
mpc_set_prec (y, prec);
mpc_set_ui (x, 1, MPC_RNDNN);
mpc_mul_2ui (x, x, (unsigned long int) prec, MPC_RNDNN);
mpc_set_ui (y, 1, MPC_RNDNN);
if (mpc_add (z, x, y, MPC_RNDNN) == 0)
{
fprintf (stderr, "Error in mpc_add: 2^(-prec)+1 cannot be exact\n");
exit (1);
}
}
mpc_clear (x);
mpc_clear (y);
mpc_clear (z);
}
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_add (P[1].mpc, P[2].mpc, P[3].mpc, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_SYMMETRIC \
P[0].mpc_inex = mpc_add (P[1].mpc, P[3].mpc, P[2].mpc, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_add (P[1].mpc, P[1].mpc, P[3].mpc, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP2 \
P[0].mpc_inex = mpc_add (P[1].mpc, P[2].mpc, P[1].mpc, P[4].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
check_ternary_value();
data_check_template ("add.dsc", "add.dat");
tgeneric_template ("add.dsc", 2, 1024, 7, 128);
test_end ();
return 0;
}
mpc-1.1.0/tests/tlog.c 0000644 0001751 0001751 00000002325 12471661720 011476 0000000 0000000 /* tlog -- test file for mpc_log.
Copyright (C) 2008, 2009, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_log (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_log (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("log.dsc", "log.dat");
tgeneric_template ("log.dsc", 2, 512, 7, 128);
test_end ();
return 0;
}
mpc-1.1.0/tests/exp.dat 0000644 0001751 0001751 00000016002 12721065657 011655 0000000 0000000 # Data file for mpc_exp.
#
# Copyright (C) 2008, 2010, 2016 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP_RE OP_RE PREC_OP_IM OP_IM RND_RE RND_IM
#
# see sin.dat for precisions
# special values (following ISO C99 standard)
0 0 53 0 53 0 53 -inf 53 -inf N N
0 0 53 +0 53 +0 53 -inf 53 -6 N N
0 0 53 -0 53 +0 53 -inf 53 -4 N N
0 0 53 -0 53 -0 53 -inf 53 -2 N N
0 0 53 +0 53 -0 53 -inf 53 -1 N N
0 0 53 +0 53 -0 53 -inf 53 -0 N N
0 0 53 +0 53 +0 53 -inf 53 +0 N N
0 0 53 +0 53 +0 53 -inf 53 +1 N N
0 0 53 -0 53 +0 53 -inf 53 +2 N N
0 0 53 -0 53 -0 53 -inf 53 +4 N N
0 0 53 +0 53 -0 53 -inf 53 +6 N N
0 0 53 0 53 0 53 -inf 53 +inf N N
0 0 53 0 53 0 53 -inf 53 nan N N
0 0 53 nan 53 nan 53 -1 53 -inf N N
0 0 53 nan 53 nan 53 -1 53 +inf N N
0 0 53 nan 53 nan 53 -1 53 nan N N
0 0 53 nan 53 nan 53 -0 53 -inf N N
0 0 53 +1 53 -0 53 -0 53 -0 N N
0 0 53 +1 53 +0 53 -0 53 +0 N N
0 0 53 nan 53 nan 53 -0 53 +inf N N
0 0 53 nan 53 nan 53 -0 53 nan N N
0 0 53 nan 53 nan 53 +0 53 -inf N N
0 0 53 +1 53 -0 53 +0 53 -0 N N
0 0 53 +1 53 +0 53 +0 53 +0 N N
0 0 53 nan 53 nan 53 +0 53 +inf N N
0 0 53 nan 53 nan 53 +0 53 nan N N
0 0 53 nan 53 nan 53 +1 53 -inf N N
0 0 53 nan 53 nan 53 +1 53 +inf N N
0 0 53 nan 53 nan 53 +1 53 nan N N
0 0 53 inf 53 nan 53 +inf 53 -inf N N
0 0 53 +inf 53 +inf 53 +inf 53 -6 N N
0 0 53 -inf 53 +inf 53 +inf 53 -4 N N
0 0 53 -inf 53 -inf 53 +inf 53 -2 N N
0 0 53 +inf 53 -inf 53 +inf 53 -1 N N
0 0 53 +inf 53 -0 53 +inf 53 -0 N N
0 0 53 +inf 53 +0 53 +inf 53 +0 N N
0 0 53 +inf 53 +inf 53 +inf 53 +1 N N
0 0 53 -inf 53 +inf 53 +inf 53 +2 N N
0 0 53 -inf 53 -inf 53 +inf 53 +4 N N
0 0 53 +inf 53 -inf 53 +inf 53 +6 N N
0 0 53 inf 53 nan 53 +inf 53 +inf N N
0 0 53 inf 53 nan 53 +inf 53 nan N N
0 0 53 nan 53 nan 53 nan 53 -inf N N
0 0 53 nan 53 nan 53 nan 53 -1 N N
0 0 53 nan 53 -0 53 nan 53 -0 N N
0 0 53 nan 53 +0 53 nan 53 +0 N N
0 0 53 nan 53 nan 53 nan 53 +1 N N
0 0 53 nan 53 nan 53 nan 53 +inf N N
0 0 53 nan 53 nan 53 nan 53 nan N N
# purely real argument
- 0 53 0x1936dc5690c08fp-44 2 +0 53 6 17 +0 N N
- 0 53 0x4b0556e084f3d0p-60 3 +0 54 -4 16 +0 Z N
+ 0 53 0xec7325c6a6ed70p-53 4 -0 55 2 15 -0 U N
- 0 53 0x178b56362cef37p-54 5 -0 56 -1 14 -0 D N
- 0 53 0x3699205c4e74b0p-48 6 +0 57 4 13 +0 Z Z
+ 0 53 0x454aaa8efe0730p-57 7 +0 58 -2 12 +0 U Z
- 0 53 0x15bf0a8b145769p-51 8 -0 59 1 11 -0 D Z
+ 0 53 0xa2728f889ea6b0p-64 9 -0 60 -6 10 -0 N Z
+ 0 53 0xec7325c6a6ed70p-53 10 +0 61 2 9 +0 U U
- 0 53 0x178b56362cef37p-54 11 +0 62 -1 8 +0 D U
- 0 53 0x1936dc5690c08fp-44 12 -0 63 6 7 -0 N U
- 0 53 0x4b0556e084f3d0p-60 13 -0 64 -4 6 -0 Z U
- 0 53 0x15bf0a8b145769p-51 14 +0 65 1 5 +0 D D
+ 0 53 0xa2728f889ea6b0p-64 15 +0 66 -6 4 +0 N D
- 0 53 0x3699205c4e74b0p-48 16 -0 67 4 3 -0 Z D
+ 0 53 0x454aaa8efe0730p-57 17 -0 68 -2 2 -0 U D
# purely imaginary argument
- + 53 0x1eb9b7097822f5p-53 53 -0x4787c62ac28b0p-52 53 +0 53 6 N N
+ + 53 -0x53aa981b6c9300p-55 53 -0xc1bdceeee0f57p-52 51 -0 54 4 Z N
+ - 53 -0x6a88995d4dc810p-56 53 -0xe8c7b7568da23p-52 49 +0 55 -2 U N
- + 53 0x114a280fb5068bp-53 53 -0xd76aa47848677p-52 47 -0 56 -1 D N
+ + 53 -0x53aa981b6c9300p-55 53 -0xc1bdceeee0f57p-52 45 +0 57 4 Z Z
+ - 53 -0x6a88995d4dc810p-56 53 0x1d18f6ead1b445p-53 43 -0 58 2 U Z
- + 53 0x114a280fb5068bp-53 53 -0xd76aa47848677p-52 41 +0 59 -1 D Z
- - 53 0x1eb9b7097822f5p-53 53 0x4787c62ac28b0p-52 39 -0 60 -6 N Z
+ + 53 -0x6a88995d4dc810p-56 53 0xe8c7b7568da23p-52 37 +0 61 2 U U
- + 53 0x114a280fb5068bp-53 53 0x1aed548f090cefp-53 35 -0 62 1 D U
- + 53 0x1eb9b7097822f5p-53 53 0x11e1f18ab0a2c1p-54 33 +0 63 -6 N U
+ + 53 -0x53aa981b6c9300p-55 53 0x1837b9dddc1eafp-53 31 -0 64 -4 Z U
- - 53 0x114a280fb5068bp-53 53 0xd76aa47848677p-52 29 +0 65 1 D D
- - 53 0x1eb9b7097822f5p-53 53 -0x11e1f18ab0a2c1p-54 27 -0 66 6 N D
+ - 53 -0x53aa981b6c9300p-55 53 0xc1bdceeee0f57p-52 25 +0 67 -4 Z D
+ - 53 -0x6a88995d4dc810p-56 53 -0xe8c7b7568da23p-52 23 -0 68 -2 U D
# overflow
- - 2 -inf 2 -inf 53 0x3312ae437f94441ec@-9 53 0xe45f7bab0595dd700@-10 N N
# input close to 0
? ? 53 1 53 0x5D7A2148071Fp-72135 53 0x1E02AE0D0F6Fp-72135 53 0x5D7A2148071Fp-72135 N N
# bug reported by Joseph Myers (07 Apr 2015)
- + 2 0x3p1073741819 2 -0x3p1073741819 2 0x1p200 2 0x1p800 Z Z
mpc-1.1.0/tests/tfr_sub.c 0000644 0001751 0001751 00000002373 12471661720 012200 0000000 0000000 /* tfr_div -- test file for mpc_fr_sub.
Copyright (C) 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_fr_sub (P[1].mpc, P[2].mpfr, P[3].mpc, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP2 \
P[0].mpc_inex = mpc_fr_sub (P[1].mpc, P[2].mpfr, P[1].mpc, P[4].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start();
data_check_template ("fr_sub.dsc", "fr_sub.dat");
tgeneric_template ("fr_sub.dsc", 2, 4096, 7, 1024);
test_end ();
return 0;
}
mpc-1.1.0/tests/tui_div.c 0000644 0001751 0001751 00000005603 12471661720 012176 0000000 0000000 /* tui_div -- test file for mpc_ui_div.
Copyright (C) 2008, 2011, 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
static void
test_special (void)
{
mpc_t a, b;
mpc_init2 (a, 10);
mpc_init2 (b, 10);
mpc_set_ui_ui (a, 2, 4, MPC_RNDNN);
mpc_ui_div (b, 10, a, MPC_RNDNN);
if (mpc_cmp_si_si (b, 1, -2) != 0)
{
printf ("10/(2,4) failed\n");
printf ("expected (1,-2)\n");
printf ("got ");
mpc_out_str (stdout, 10, 0, b, MPC_RNDNN);
printf ("\n");
exit (1);
}
/* 0/(-1-0*I) should give (-0, +0) */
mpfr_set_str (mpc_realref(a), "-1", 10, MPFR_RNDN);
mpfr_set_str (mpc_imagref(a), "-0", 10, MPFR_RNDN);
mpc_ui_div (b, 0, a, MPC_RNDNN);
if ((mpc_cmp_si_si (b, 0, 0) != 0) || (MPFR_SIGN (mpc_realref(b)) > 0)
|| (MPFR_SIGN (mpc_imagref(b)) < 0))
{
printf ("0/(-1,-0) failed\n");
printf ("expected (-0,+0)\n");
printf ("got ");
mpc_out_str (stdout, 10, 0, b, MPC_RNDNN);
printf ("\n");
exit (1);
}
mpc_set_ui_ui (a, 1, 0, MPC_RNDNN);
mpc_ui_div (b, 1, a, MPC_RNDNN);
if (mpc_cmp_si_si (b, 1, 0) != 0)
{
printf ("1/(1,0) failed\n");
printf ("expected (1,0)\n");
printf ("got ");
mpc_out_str (stdout, 10, 0, b, MPC_RNDNN);
printf ("\n");
exit (1);
}
/* problem reported by Timo Hartmann with mpc-0.7, 21 Oct 2009 */
mpc_set_ui_ui (a, 4, 0, MPC_RNDNN);
mpc_ui_div (b, 1, a, MPC_RNDNN);
if (mpfr_cmp_ui_2exp (mpc_realref(b), 1, -2) != 0 ||
mpfr_cmp_ui (mpc_imagref(b), 0) != 0 || mpfr_signbit (mpc_imagref(b)) != 0)
{
printf ("1/(4,0) failed\n");
printf ("expected (1/4,0)\n");
printf ("got ");
mpc_out_str (stdout, 10, 0, b, MPC_RNDNN);
printf ("\n");
exit (1);
}
mpc_clear (a);
mpc_clear (b);
}
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_ui_div (P[1].mpc, P[2].ui, P[3].mpc, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP2 \
P[0].mpc_inex = mpc_ui_div (P[1].mpc, P[2].ui, P[1].mpc, P[4].mpc_rnd)
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
test_special ();
tgeneric_template ("ui_div.dsc", 2, 1024, 7, 4096);
test_end ();
return 0;
}
mpc-1.1.0/tests/acosh.dat 0000644 0001751 0001751 00000015051 12426164730 012153 0000000 0000000 # Data file for mpc_acosh.
#
# Copyright (C) 2009 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP_RE OP_RE PREC_OP_IM OP_IM RND_RE RND_IM
#
# where op = op_re + i * op_im, rop = rop_re + i * rop_im,
# rop_re is ROP_RE rounded to nearest to the precision of PREC_ROP_RE
# rop_im is ROP_IM rounded to nearest to the precision of PREC_ROP_IM
# op_re is OP_RE rounded to nearest to the precision of PREC_OP_RE
# op_im is OP_IM rounded to nearest to the precision of PREC_OP_IM
# ROP_RE is checked against Re(acos op) rounded to the precision PREC_ROP_RE
# in the direction RND_RE
# ROP_IM is checked against Im(acos op) rounded to the precision PREC_ROP_IM
# in the direction RND_IM
# INEX_RE is the ternary value for the real part with the following notation:
# "?" ternary value not checked
# "+" if ROP_RE is greater than the exact mathematical result
# "0" if ROP_RE is exactly the mathematical result
# "-" if ROP_RE is less than the exact mathematical result
# (m.m. INEX_IM)
# rounding modes notation:
# "N" is rounding to nearest
# "Z" is rounding towards zero
# "U" is rounding towards plus infinity
# "D" is rounding towards minus infinity
# Use prefixes "0b" for values in base two, "0x" for values in base sixteen,
# no prefix for value in base ten.
# In all bases, "nan" is NaN, "inf" is infinity;
# The sign of the result is checked with "+inf", "-inf", "-0", or "+0".
# special values (following ISO C99 standard)
0 + 53 +inf 53 -0x12D97C7F3321D2p-51 53 -inf 53 -inf N N
0 + 53 +inf 53 -0x1921FB54442D18p-51 53 -inf 53 -1 N N
0 + 53 +inf 53 -0x1921FB54442D18p-51 53 -inf 53 -0 N N
0 - 53 +inf 53 0x1921FB54442D18p-51 53 -inf 53 +0 N N
0 - 53 +inf 53 0x1921FB54442D18p-51 53 -inf 53 +1 N N
0 - 53 +inf 53 0x12D97C7F3321D2p-51 53 -inf 53 +inf N N
0 0 53 +inf 53 nan 53 -inf 53 nan N N
0 + 53 +inf 53 -0x1921FB54442D18p-52 53 -6 53 -inf N N
0 - 53 +inf 53 0x1921FB54442D18p-52 53 -6 53 +inf N N
0 0 53 nan 53 nan 53 -6 53 nan N N
0 + 53 +inf 53 -0x1921FB54442D18p-52 53 -0.5 53 -inf N N
0 - 53 +inf 53 0x1921FB54442D18p-52 53 -0.5 53 +inf N N
0 0 53 nan 53 nan 53 -0.5 53 nan N N
0 + 53 +inf 53 -0x1921FB54442D18p-52 53 -0 53 -inf N N
0 + 53 +0 53 -0x1921FB54442D18p-52 53 -0 53 -0 N N
0 - 53 +0 53 0x1921FB54442D18p-52 53 -0 53 +0 N N
0 - 53 +inf 53 0x1921FB54442D18p-52 53 -0 53 +inf N N
0 0 53 nan 53 nan 53 -0 53 nan N N
0 + 53 +inf 53 -0x1921FB54442D18p-52 53 +0 53 -inf N N
0 + 53 +0 53 -0x1921FB54442D18p-52 53 +0 53 -0 N N
0 - 53 +0 53 0x1921FB54442D18p-52 53 +0 53 +0 N N
0 - 53 +inf 53 0x1921FB54442D18p-52 53 +0 53 +inf N N
0 0 53 nan 53 nan 53 +0 53 nan N N
0 + 53 +inf 53 -0x1921FB54442D18p-52 53 +6 53 -inf N N
0 - 53 +inf 53 0x1921FB54442D18p-52 53 +6 53 +inf N N
0 0 53 nan 53 nan 53 +6 53 nan N N
0 + 53 +inf 53 -0x1921FB54442D18p-53 53 +inf 53 -inf N N
0 0 53 +inf 53 -0 53 +inf 53 -1 N N
0 0 53 +inf 53 -0 53 +inf 53 -0 N N
0 0 53 +inf 53 +0 53 +inf 53 +0 N N
0 0 53 +inf 53 +0 53 +inf 53 +1 N N
0 - 53 +inf 53 0x1921FB54442D18p-53 53 +inf 53 +inf N N
0 0 53 +inf 53 nan 53 +inf 53 nan N N
0 0 53 +inf 53 nan 53 nan 53 -inf N N
0 0 53 nan 53 nan 53 nan 53 -1 N N
0 0 53 nan 53 nan 53 nan 53 -0 N N
0 0 53 nan 53 nan 53 nan 53 +0 N N
0 0 53 nan 53 nan 53 nan 53 +1 N N
0 0 53 +inf 53 nan 53 nan 53 +inf N N
0 0 53 nan 53 nan 53 nan 53 nan N N
# pure real argument
+ + 53 0x1C34366179D427p-51 53 -0x1921FB54442D18p-51 53 -17 53 -0 N N
+ - 53 0x1C34366179D427p-51 53 0x1921FB54442D18p-51 53 -17 53 +0 N N
0 + 53 +0 53 -0x1921FB54442D18p-51 53 -1 53 -0 N N
0 - 53 +0 53 0x1921FB54442D18p-51 53 -1 53 +0 N N
0 - 53 +0 53 -0x10C152382D7366p-51 53 -0.5 53 -0 N N
0 + 53 +0 53 0x10C152382D7366p-51 53 -0.5 53 +0 N N
0 - 53 +0 53 -0x10C152382D7366p-52 53 +0.5 53 -0 N N
0 + 53 +0 53 0x10C152382D7366p-52 53 +0.5 53 +0 N N
0 0 53 +0 53 -0 53 +1 53 -0 N N
0 0 53 +0 53 +0 53 +1 53 +0 N N
+ 0 53 0x1C34366179D427p-51 53 -0 53 +17 53 -0 N N
+ 0 53 0x1C34366179D427p-51 53 +0 53 +17 53 +0 N N
# pure imaginary argument
- + 53 0x1C37C174A83DEDp-51 53 -0x1921FB54442D18p-52 53 -0 53 -17 N N
- + 53 0x1C37C174A83DEDp-51 53 -0x1921FB54442D18p-52 53 +0 53 -17 N N
+ + 53 0x1C34366179D427p-53 53 -0x1921FB54442D18p-52 53 -0 53 -1 N N
+ + 53 0x1C34366179D427p-53 53 -0x1921FB54442D18p-52 53 +0 53 -1 N N
+ + 53 0x1ECC2CAEC5160Ap-54 53 -0x1921FB54442D18p-52 53 -0 53 -0.5 N N
+ + 53 0x1ECC2CAEC5160Ap-54 53 -0x1921FB54442D18p-52 53 +0 53 -0.5 N N
+ - 53 0x1ECC2CAEC5160Ap-54 53 0x1921FB54442D18p-52 53 -0 53 +0.5 N N
+ - 53 0x1ECC2CAEC5160Ap-54 53 0x1921FB54442D18p-52 53 +0 53 +0.5 N N
+ - 53 0x1C34366179D427p-53 53 0x1921FB54442D18p-52 53 -0 53 +1 N N
+ - 53 0x1C34366179D427p-53 53 0x1921FB54442D18p-52 53 +0 53 +1 N N
- - 53 0x1C37C174A83DEDp-51 53 0x1921FB54442D18p-52 53 -0 53 +17 N N
- - 53 0x1C37C174A83DEDp-51 53 0x1921FB54442D18p-52 53 +0 53 +17 N N
# IEEE-754 double precision
+ + 53 0x1D6D2CFA9F3F11p-52 53 0x74C141310E695p-53 53 0x3243F6A8885A3p-48 53 0x162E42FEFA39EFp-53 N N
mpc-1.1.0/tests/div_fr.dsc 0000644 0001751 0001751 00000001531 12471661720 012327 0000000 0000000 # Description file for mpc_div_fr
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_div_fr
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpfr_srcptr
mpc_rnd_t
mpc-1.1.0/tests/tpow_ui.c 0000644 0001751 0001751 00000007246 12471661720 012226 0000000 0000000 /* tpow_ui -- test file for mpc_pow_ui.
Copyright (C) 2009, 2010, 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include /* for CHAR_BIT */
#include "mpc-tests.h"
static void
compare_mpc_pow (mpfr_prec_t pmax, int iter, unsigned long nbits)
{
mpfr_prec_t p;
mpc_t x, y, z, t;
unsigned long n;
int i, inex_pow, inex_pow_ui;
mpc_rnd_t rnd;
mpc_init3 (y, sizeof (unsigned long) * CHAR_BIT, MPFR_PREC_MIN);
for (p = MPFR_PREC_MIN; p <= pmax; p++)
for (i = 0; i < iter; i++)
{
mpc_init2 (x, p);
mpc_init2 (z, p);
mpc_init2 (t, p);
mpc_urandom (x, rands);
n = gmp_urandomb_ui (rands, nbits); /* 0 <= n < 2^nbits */
mpc_set_ui (y, n, MPC_RNDNN);
for (rnd = 0; rnd < 16; rnd ++)
{
inex_pow = mpc_pow (z, x, y, rnd);
inex_pow_ui = mpc_pow_ui (t, x, n, rnd);
if (mpc_cmp (z, t) != 0)
{
printf ("mpc_pow and mpc_pow_ui differ for x=");
mpc_out_str (stdout, 10, 0, x, MPC_RNDNN);
printf (" n=%lu\n", n);
printf ("mpc_pow gives ");
mpc_out_str (stdout, 10, 0, z, MPC_RNDNN);
printf ("\nmpc_pow_ui gives ");
mpc_out_str (stdout, 10, 0, t, MPC_RNDNN);
printf ("\n");
exit (1);
}
if (inex_pow != inex_pow_ui)
{
printf ("mpc_pow and mpc_pow_ui give different flags for x=");
mpc_out_str (stdout, 10, 0, x, MPC_RNDNN);
printf (" n=%lu\n", n);
printf ("mpc_pow gives %d\n", inex_pow);
printf ("mpc_pow_ui gives %d\n", inex_pow_ui);
exit (1);
}
}
mpc_clear (x);
mpc_clear (z);
mpc_clear (t);
}
mpc_clear (y);
}
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_pow_ui (P[1].mpc, P[2].mpc, P[3].ui, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_pow_ui (P[1].mpc, P[1].mpc, P[3].ui, P[4].mpc_rnd)
#include "data_check.tpl"
int
main (int argc, char *argv[])
{
mpc_t z;
if (argc != 1)
{
mpfr_prec_t p;
long int n, k;
mpc_t res;
if (argc != 3 && argc != 4)
{
printf ("Usage: tpow_ui precision exponent [k]\n");
exit (1);
}
p = atoi (argv[1]);
n = atoi (argv[2]);
MPC_ASSERT (n >= 0);
k = (argc > 3) ? atoi (argv[3]) : 1;
MPC_ASSERT (k >= 0);
mpc_init2 (z, p);
mpc_init2 (res, p);
mpfr_const_pi (mpc_realref (z), MPFR_RNDN);
mpfr_div_2exp (mpc_realref (z), mpc_realref (z), 2, MPFR_RNDN);
mpfr_const_log2 (mpc_imagref (z), MPFR_RNDN);
while (k--)
mpc_pow_ui (res, z, (unsigned long int) n, MPC_RNDNN);
mpc_clear (z);
mpc_clear (res);
return 0;
}
test_start ();
data_check_template ("pow_ui.dsc", "pow_ui.dat");
compare_mpc_pow (100, 5, 19);
test_end ();
return 0;
}
mpc-1.1.0/tests/cosh.dat 0000644 0001751 0001751 00000011036 12426164730 012011 0000000 0000000 # Data test file for mpc_cosh.
#
# Copyright (C) 2008, 2010 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
# See file sin.dat for the format description.
# Special values, following ISO C99 standard, Annex G,
# more precisely Section G.6.2.4 "The ccosh functions".
# Rule [conj]: cosh(conj(z)) = conj(cosh(z))
# Rule [even]: cosh(-z) = cosh(z)
# cosh(+0 + i*0) = 1 + i*0
0 0 2 1 2 +0 2 +0 2 +0 N N
# [conj]: cosh(+0 - i*0) = 1 - i*0
0 0 2 1 2 -0 2 +0 2 -0 N N
# [even]: cosh(-0 - i*0) = 1 + i*0
0 0 2 1 2 +0 2 -0 2 -0 N N
# [even+conj]: cosh(-0 + i*0) = 1 - i*0
0 0 2 1 2 -0 2 -0 2 +0 N N
# cosh(+0 + i*inf) = nan + i*0 (C99 says that the sign of the imaginary part
# is left unspecified)
0 0 2 nan 2 0 2 +0 2 +inf N N
# [conj]: cosh(+0 - i*inf) = nan - i*0
0 0 2 nan 2 0 2 +0 2 -inf N N
# [even]: cosh(-0 - i*inf) = nan + i*0
0 0 2 nan 2 0 2 -0 2 -inf N N
# [even+conj]: cosh(-0 + i*inf) = nan - i*0
0 0 2 nan 2 0 2 -0 2 +inf N N
# cosh(+0 +i*nan) = nan + i*0 (C99 says that the sign of the imaginary part
# is left unspecified)
0 0 2 nan 2 0 2 +0 2 nan N N
# [even]: cosh(-0 + i*nan) = nan + i*0
0 0 2 nan 2 0 2 -0 2 nan N N
# cosh(x + i*inf) = nan + i*nan for finite nonzero x
0 0 2 nan 2 nan 2 1 2 inf N N
0 0 2 nan 2 nan 2 -1 2 inf N N
# [conj]: cosh(x - i*inf) = nan + i*nan
0 0 2 nan 2 nan 2 1 2 -inf N N
0 0 2 nan 2 nan 2 -1 2 -inf N N
# [even] and [even+conj] are already considered for x=-1 < 0
# cosh(x + i*nan) = nan + i*nan for finite nonzero x
0 0 2 nan 2 nan 2 1 2 nan N N
0 0 2 nan 2 nan 2 -1 2 nan N N
# [conj] makes no sense since nan has no sign
# [even] is already considered for x=-1 < 0
# cosh(+inf + i*0) = +inf + i*0
0 0 2 +inf 2 +0 2 +inf 2 +0 N N
# [conj]: cosh(+inf - i*0) = +inf - i*0
0 0 2 +inf 2 -0 2 +inf 2 -0 N N
# [even]: cosh(-inf - i*0) = +inf + i*0
0 0 2 +inf 2 +0 2 -inf 2 -0 N N
# [even+conj]: cosh(-inf + i*0) = +inf - i*0
0 0 2 +inf 2 -0 2 -inf 2 +0 N N
# cosh(+inf + i*y) = +inf * (cos(y) + i*sin(y)) for finite non-zero y
0 0 2 +inf 2 +inf 2 +inf 2 1 N N
0 0 2 -inf 2 +inf 2 +inf 2 2 N N
0 0 2 -inf 2 -inf 2 +inf 2 4 N N
0 0 2 +inf 2 -inf 2 +inf 2 1024 N N
# [conj]
0 0 2 +inf 2 -inf 2 +inf 2 -1 N N
0 0 2 -inf 2 -inf 2 +inf 2 -2 N N
0 0 2 -inf 2 +inf 2 +inf 2 -4 N N
0 0 2 +inf 2 +inf 2 +inf 2 -1024 N N
# [even]
0 0 2 +inf 2 +inf 2 -inf 2 -1 N N
0 0 2 -inf 2 +inf 2 -inf 2 -2 N N
0 0 2 -inf 2 -inf 2 -inf 2 -4 N N
0 0 2 +inf 2 -inf 2 -inf 2 -1024 N N
# [even+conj]
0 0 2 +inf 2 -inf 2 -inf 2 1 N N
0 0 2 -inf 2 -inf 2 -inf 2 2 N N
0 0 2 -inf 2 +inf 2 -inf 2 4 N N
0 0 2 +inf 2 +inf 2 -inf 2 1024 N N
# cosh(+inf + i*inf) = +inf + i*nan (C99 leaves unspecified the sign of the
# real part)
0 0 2 inf 2 nan 2 +inf 2 +inf N N
# [conj]: cosh(+inf - i*inf) = +inf + i*nan
0 0 2 inf 2 nan 2 +inf 2 -inf N N
# [even]: cosh(-inf - i*inf) = +inf + i*nan
0 0 2 inf 2 nan 2 -inf 2 -inf N N
# [even+conj]: cosh(-inf + i*inf) = +inf + i*nan
0 0 2 inf 2 nan 2 -inf 2 +inf N N
# cosh(+inf + i*nan) = +inf + i*nan
0 0 2 +inf 2 nan 2 +inf 2 nan N N
# [conj] makes no sense since NaN has no sign
# [even]: cosh(-inf + i*nan) = +inf + i*nan
0 0 2 +inf 2 nan 2 -inf 2 nan N N
# cosh(nan + i*0) = nan - i*0 (C99 leaves unspecified the sign of the
# imaginary part)
0 0 2 nan 2 0 2 nan 2 +0 N N
# [conj]: cosh(nan - i*0) = nan + i*0
0 0 2 nan 2 0 2 nan 2 -0 N N
# cosh(nan + i*y) = nan + i*nan for all nonzero y (including +/-inf)
0 0 2 nan 2 nan 2 nan 2 1 N N
0 0 2 nan 2 nan 2 nan 2 -1 N N
0 0 2 nan 2 nan 2 nan 2 +inf N N
0 0 2 nan 2 nan 2 nan 2 -inf N N
# cosh(nan + i*nan) = nan + i*nan
0 0 2 nan 2 nan 2 nan 2 nan N N
+ + 53 0x10000000000001p-53 53 0x10000000000001p-52 53 0x1DA2E1BD2C9EBCp-53 53 0x138AADEA15829Fp-52 N N
# huge values
+ - 53 +inf 53 -inf 53 0x4580CBF242683p-3 53 -0x1B3E8A3660D279p-3 N N
- - 53 -inf 53 -inf 53 -0x1B3E8A3660D279p-3 53 0x4580CBF242683p-3 N N
mpc-1.1.0/tests/tadd_si.c 0000644 0001751 0001751 00000003632 12471661720 012142 0000000 0000000 /* tadd_si -- test file for mpc_add_si.
Copyright (C) 2011, 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include
#include "mpc-tests.h"
static void
check_ternary_value (void)
{
mpfr_prec_t prec;
mpc_t z;
const long int s = -1;
mpc_init2 (z, 2);
for (prec=2; prec <= 1024; prec++) {
mpc_set_prec (z, prec);
mpc_set_ui (z, 3ul, MPC_RNDNN);
if (mpc_add_si (z, z, s, MPC_RNDDU)) {
printf ("Error in mpc_add_si: 3+(-1) should be exact\n");
exit (1);
}
else if (mpc_cmp_si (z, 2l) != 0) {
printf ("Error in mpc_add_si: 3+(-1) should be 2\n");
exit (1);
}
mpc_mul_2ui (z, z, (unsigned long int) prec, MPC_RNDNN);
if (mpc_add_si (z, z, s, MPC_RNDNN) == 0) {
printf ("Error in mpc_add_si: 2^(prec+1)-1 cannot be exact\n");
exit (1);
}
}
mpc_clear (z);
}
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_add_si (P[1].mpc, P[2].mpc, P[3].si, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_add_si (P[1].mpc, P[1].mpc, P[3].si, P[4].mpc_rnd)
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
check_ternary_value ();
tgeneric_template ("add_si.dsc", 2, 1024, 1, 1024);
test_end ();
return 0;
}
mpc-1.1.0/tests/tdiv_ui.c 0000644 0001751 0001751 00000002251 12471661720 012172 0000000 0000000 /* tdiv_ui.c -- test file for mpc_div_ui.
Copyright (C) 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_div_ui (P[1].mpc, P[2].mpc, P[3].ui, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_div_ui (P[1].mpc, P[1].mpc, P[3].ui, P[4].mpc_rnd)
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
tgeneric_template ("div_ui.dsc", 2, 1024, 7, -1);
test_end ();
return 0;
}
mpc-1.1.0/tests/strtoc.dat 0000644 0001751 0001751 00000024153 12426164730 012377 0000000 0000000 # Data file for mpc_strtoc.
#
# Copyright (C) 2009 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The format respects the parameter order in function prototype as follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM "NSTRING" "RSTRING" BASE RND_RE RND_IM
#
# The string NSTRING is considered as a complex number rop = rop1 + i*rop2
# written in base BASE. The remainder of the string, i.e. non-whitespace
# characters being not part of the number, is equal to RSTRING.
#
# ROP_RE is checked against rop1 rounded to the precision PREC_ROP_RE
# in the direction RND_RE
# ROP_IM is checked against rop2 rounded to the precision PREC_ROP_IM
# in the direction RND_IM
# INEX_RE is the ternary value for the real part with the following notation:
# "?" ternary value not checked
# "!" function should return error indicator -1
# "+" if ROP_RE is greater than the exact mathematical result
# "0" if ROP_RE is exactly the mathematical result
# "-" if ROP_RE is less than the exact mathematical result
# (m.m. INEX_IM)
# rounding modes notation:
# "N" is rounding to nearest
# "Z" is rounding towards zero
# "U" is rounding towards plus infinity
# "D" is rounding towards minus infinity
# Use prefixes "0b" for values in base two, "0x" for values in base sixteen,
# no prefix for value in base ten.
# In all bases, "nan" is NaN, "inf" is infinity;
# The sign of the result is checked with "+inf", "-inf", "-0", or "+0".
# invalid base
! ! 53 nan 53 nan "(1 1)" "(1 1)" 99 N N
! ! 53 nan 53 nan "(1 1)" "(1 1)" 1 N N
# invalid strings
! ! 53 nan 53 nan "" "" 10 N N
! ! 53 nan 53 nan "non" "non" 10 N N
! ! 53 nan 53 nan "NON" "NON" 10 N N
! ! 53 nan 53 nan "N A N" "N A N" 10 N N
! ! 53 nan 53 nan "(1) 1" "(1) 1" 10 N N #no imaginary part
! ! 53 nan 53 nan "." "." 10 N N
! ! 53 nan 53 nan ". 1" ". 1" 10 N N #no space allowed here
! ! 53 nan 53 nan "+ 1" "+ 1" 2 N N #no space allowed here
! ! 53 nan 53 nan "+3 " "+3 " 2 N N #invalid digit
! ! 53 nan 53 nan "+ INF " "+ INF " 10 N N #no space allowed here
! ! 53 nan 53 nan "( +INF)" "( +INF)" 10 N N
! ! 53 nan 53 nan "(1 +1 " "(1 +1 " 10 N N
! ! 53 nan 53 nan "(1+1)" "(1+1)" 10 N N
! ! 53 nan 53 nan "(1 + 1)" "(1 + 1)" 10 N N
! ! 53 nan 53 nan "(@nan@(quiet)" "(@nan@(quiet)" 10 N N
! ! 53 nan 53 nan "zero" "zero" 10 N N
! ! 53 nan 53 nan "&^+" "&^+" 10 N N
! ! 53 nan 53 nan "i" "i" 18 N N
! ! 53 nan 53 nan "I" "I" 18 N N
! ! 53 nan 53 nan "z" "z" 35 N N
! ! 53 nan 53 nan "Z" "Z" 35 N N
! ! 53 nan 53 nan "(i 0)" "(i 0)" 18 N N
! ! 53 nan 53 nan "(I 0)" "(I 0)" 18 N N
! ! 53 nan 53 nan "(z 0)" "(z 0)" 35 N N
! ! 53 nan 53 nan "(Z 0)" "(Z 0)" 35 N N
! ! 53 nan 53 nan "(0 i)" "(0 i)" 18 N N
! ! 53 nan 53 nan "(0 I)" "(0 I)" 18 N N
! ! 53 nan 53 nan "(0 z)" "(0 z)" 35 N N
! ! 53 nan 53 nan "(0 Z)" "(0 Z)" 35 N N
# special values
0 0 53 nan 53 +0 "nan" "" 10 N N
0 0 53 +nan 53 +0 "+NAN" "" 10 N N
0 0 53 nan 53 +0 " @NAN@ " " " 10 N N
0 0 53 nan 53 nan "(@nan@(QUIET) nan)" "" 10 N N
0 0 53 nan 53 +0 "@nan@(quiet" "(quiet" 10 N N
0 0 53 nan 53 +0 "NaN((keep out))" "((keep out))" 10 N N
0 0 53 nan 53 +0 "nan(0 1)" "(0 1)" 10 N N
0 0 53 nan 53 +0 "nan(0-1)" "(0-1)" 10 N N
0 0 53 nan 53 +0 "nan(0_1)" "" 10 N N
0 0 53 nan 53 +0 " nan nan nan nan" " nan nan nan" 10 N N
0 0 53 inf 53 +0 "inf" "" 10 N N
0 0 53 -inf 53 +0 "-inf" "" 10 N N
0 0 53 +inf 53 +0 " infinity" "" 10 N N
0 0 53 +inf 53 +0 "+INF x" " x" 10 N N
0 0 53 +0 53 +inf "(0 +inf)" "" 10 N N
0 0 53 +0 53 +inf " (+0 INF) " " " 10 N N
0 0 53 +0 53 -inf "(0 -infinity)" "" 10 N N
0 0 53 +0 53 -inf " (+0 -INF)" "" 10 N N
0 0 53 -inf 53 -0 " (-@inf@ -0)" "" 10 N N
0 0 53 +inf 53 nan "(+inf nan(9u137)) " " " 10 N N
0 0 53 nan 53 +0 "NaN + inf" " + inf" 10 N N
# pure real argument
0 0 53 +0 53 +0 "0" "" 10 N N
0 0 53 +0 53 +0 "00000" "" 10 N N
0 0 53 +0 53 +0 "+0" "" 10 N N
0 0 53 -0 53 +0 "-0" "" 10 N N
0 0 53 +1 53 +0 "1" "" 10 N N
0 0 53 +1 53 +0 "001" "" 10 N N
0 0 53 +1 53 +0 "1 +1" " +1" 10 N N
0 0 53 +1 53 +0 "1a" "a" 10 N N
0 0 53 +1 53 +0 "1e-" "e-" 10 N N
0 0 53 +1 53 +0 "1+2" "+2" 10 N N
- 0 53 +0x9D70A3D70A3D7p-51 53 +0 "(+1.23 0.0)" "" 10 N N
0 0 53 -10 53 +0 "(-10. 0000) " " " 10 N N
0 0 53 +0x5p-3 53 -0 "(.625 -0)" "" 10 N N
- 0 53 +0x14E718D7D7625Ap+612 53 +0 "(1e200 0)" "" 10 N N
0 0 53 +0x7530 53 +0 " (3e+4 0)" "" 10 N N
- 0 53 +0x10C6F7A0B5ED8Dp-73 53 +0 ".5e-6" "" 10 N N
- 0 53 +0x1B1C1E0D914133p-83 53 +0 "(7.89E-10 0)" "" 10 N N
+ 0 53 -0x7B426FAB61F00Cp+56 53 +0 " -25@+32" "" 10 N N
0 0 53 -25 53 +0 "-25p+32" "p+32" 10 N N
0 0 53 +43981 53 +0 "0xabcd" "" 16 N N
0 0 53 +0 53 +0 "0xabcd" "xabcd" 10 N N #no prefix in base ten
0 0 53 +2 53 +0 "+0b010" "" 2 N N
0 0 53 +0 53 +0 "+0b010" "b010" 10 N N #no prefix in base ten
0 0 53 +1 53 +0 "1*i" "*i" 10 N N
0 0 53 +18 53 +0 "i*i" "*i" 20 N N
0 0 53 18 53 0 "i" "" 19 N N
0 0 53 35 53 0 "z" "" 36 N N
0 0 53 35 53 0 "Z" "" 36 N N
# pure imaginary argument
0 0 53 +0 53 +1 "(0 1)" "" 10 N N
0 0 53 +0 53 +1 "(0 +1)" "" 20 N N
0 0 53 -0 53 -1 " (-0 -1)" "" 10 N N
0 0 53 -0 53 -2 "(-0 -2) " " " 10 N N
0 0 53 +0 53 +2 "(+0 2)" "" 10 N N
0 0 53 +0 53 +17 "(0 h)" "" 20 N N
0 0 53 +0 53 +18 "(0 i)" "" 20 N N
0 + 53 +0 53 -0x14F800008637BDp-44 "(0 -33.55000005e+1)" "" 10 N Z
0 + 53 +0 53 -0xA1765976008AFp-401 "(+0 -.550000E-105) " " " 10 N U
0 0 53 0 53 18 "(0 i)" "" 19 N N
0 0 53 0 53 18 "(0 I)" "" 19 N N
0 0 53 0 53 35 "(0 z)" "" 36 N N
0 0 53 0 53 35 "(0 Z)" "" 36 N N
# complex argument
0 0 53 +1 53 +1 "( 1 +1)" "" 10 N N
0 0 53 +1 53 +1 " (1 +1) " " " 10 N N
0 0 53 +7 53 +14 "(7 14)" "" 10 N N
0 0 53 +17 53 +1 "(+17 1)" "" 10 N N
0 0 53 +27 53 +1 " (+17 +1)" "" 20 N N
0 0 53 -18 53 -1 "(-i -1)" "" 20 N N
0 0 53 +18 53 -1 "(i -1)" "" 20 N N
0 0 53 -18 53 +1 "(-i +1)" "" 20 N N
0 0 53 +18 53 +18 "(i +i)" "" 20 N N
0 0 53 -14643 53 +20328 "(-bar foo)" "" 36 N N
0 0 53 -1647190 53 -512315 "(-zaza -azaz)" "" 36 N N
0 0 53 +0b1010 53 +0xabcd "(0b1010 +0xabcd)" "" 0 N N #base autodetection
0 0 53 +0xabcd 53 +0b1010 "(+0xa.bcd@+3 0b.101p4)" "" 0 N N #base autodetection
# white space before the closing ')'
0 0 53 +1 53 +1 "( 1 +1 )1" "1" 10 N N
mpc-1.1.0/tests/setprec_parameters.c 0000644 0001751 0001751 00000003600 12471661720 014416 0000000 0000000 /* setprec_parameters.c -- Functions changing the precision of i/o parameters.
Copyright (C) 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
void
set_output_precision (mpc_fun_param_t *params, mpfr_prec_t prec)
{
int out;
const int start = 0;
const int end = params->nbout;
for (out = start; out < end; out++)
{
if (params->T[out] == MPFR)
mpfr_set_prec (params->P[out].mpfr, prec);
else if (params->T[out] == MPC)
mpc_set_prec (params->P[out].mpc, prec);
}
}
void
set_input_precision (mpc_fun_param_t *params, mpfr_prec_t prec)
{
int i;
const int start = params->nbout;
const int end = start + params->nbin;
for (i = start; i < end; i++)
{
if (params->T[i] == MPFR)
mpfr_set_prec (params->P[i].mpfr, prec);
else if (params->T[i] == MPC)
mpc_set_prec (params->P[i].mpc, prec);
}
}
void
set_reference_precision (mpc_fun_param_t *params, mpfr_prec_t prec)
{
int i;
const int start = params->nbout + params->nbin;
const int end = start + params->nbout;
for (i = start; i < end; i++)
{
if (params->T[i] == MPFR)
mpfr_set_prec (params->P[i].mpfr_data.mpfr, prec);
else if (params->T[i] == MPC)
mpc_set_prec (params->P[i].mpc_data.mpc, prec);
}
}
mpc-1.1.0/tests/tdiv_2ui.c 0000644 0001751 0001751 00000002264 12471661720 012260 0000000 0000000 /* tdiv_2ui -- test file for mpc_div_2ui.
Copyright (C) 2008, 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_div_2ui (P[1].mpc, P[2].mpc, P[3].ui, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_div_2ui (P[1].mpc, P[1].mpc, P[3].ui, P[4].mpc_rnd)
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
tgeneric_template ("div_2ui.dsc", 2, 1024, 7, 1024);
test_end ();
return 0;
}
mpc-1.1.0/tests/tpl_mpfr.c 0000644 0001751 0001751 00000012073 12471661720 012355 0000000 0000000 /* tpl_mpfr.c -- Helper functions for mpfr data.
Copyright (C) 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
static mpfr_prec_t
tpl_read_mpfr_prec (mpc_datafile_context_t* datafile_context)
{
unsigned long prec;
int n;
if (datafile_context->nextchar == EOF) {
printf ("Error: Unexpected EOF when reading mpfr precision "
"in file '%s' line %lu\n",
datafile_context->pathname, datafile_context->line_number);
exit (1);
}
ungetc (datafile_context->nextchar, datafile_context->fd);
n = fscanf (datafile_context->fd, "%lu", &prec);
if (ferror (datafile_context->fd)) /* then also n == EOF */
perror ("Error when reading mpfr precision");
if (n == 0 || n == EOF || prec < MPFR_PREC_MIN || prec > MPFR_PREC_MAX) {
printf ("Error: Impossible mpfr precision in file '%s' line %lu\n",
datafile_context->pathname, datafile_context->line_number);
exit (1);
}
datafile_context->nextchar = getc (datafile_context->fd);
tpl_skip_whitespace_comments (datafile_context);
return (mpfr_prec_t) prec;
}
static void
tpl_read_mpfr_mantissa (mpc_datafile_context_t* datafile_context, mpfr_ptr x)
{
if (datafile_context->nextchar == EOF) {
printf ("Error: Unexpected EOF when reading mpfr mantissa "
"in file '%s' line %lu\n",
datafile_context->pathname, datafile_context->line_number);
exit (1);
}
ungetc (datafile_context->nextchar, datafile_context->fd);
if (mpfr_inp_str (x, datafile_context->fd, 0, GMP_RNDN) == 0) {
printf ("Error: Impossible to read mpfr mantissa "
"in file '%s' line %lu\n",
datafile_context->pathname, datafile_context->line_number);
exit (1);
}
datafile_context->nextchar = getc (datafile_context->fd);
tpl_skip_whitespace_comments (datafile_context);
}
void
tpl_read_mpfr (mpc_datafile_context_t* datafile_context, mpfr_ptr x,
int* known_sign)
{
int sign;
mpfr_set_prec (x, tpl_read_mpfr_prec (datafile_context));
sign = datafile_context->nextchar;
tpl_read_mpfr_mantissa (datafile_context, x);
/* the sign always matters for regular values ('+' is implicit),
but when no sign appears before 0 or Inf in the data file, it means
that only absolute value must be checked. */
MPC_ASSERT(known_sign != NULL);
*known_sign =
(!mpfr_zero_p (x) && !mpfr_inf_p (x)) || sign == '+' || sign == '-';
}
void
tpl_read_mpfr_rnd (mpc_datafile_context_t* datafile_context, mpfr_rnd_t* rnd)
{
switch (datafile_context->nextchar)
{
case 'n': case 'N':
*rnd = GMP_RNDN;
break;
case 'z': case 'Z':
*rnd = GMP_RNDZ;
break;
case 'u': case 'U':
*rnd = GMP_RNDU;
break;
case 'd': case 'D':
*rnd = GMP_RNDD;
break;
default:
printf ("Error: Unexpected rounding mode '%c' in file '%s' line %lu\n",
datafile_context->nextchar,
datafile_context->pathname,
datafile_context->line_number);
exit (1);
}
datafile_context->nextchar = getc (datafile_context->fd);
if (datafile_context->nextchar != EOF
&& !isspace (datafile_context->nextchar)) {
printf ("Error: Rounding mode not followed by white space "
"in file '%s' line %lu\n",
datafile_context->pathname, datafile_context->line_number);
exit (1);
}
tpl_skip_whitespace_comments (datafile_context);
}
void
tpl_read_mpfr_inex (mpc_datafile_context_t* datafile_context, int *ternary)
{
tpl_read_ternary(datafile_context, ternary);
}
int
tpl_same_mpfr_value (mpfr_ptr x1, mpfr_ptr x2, int known_sign)
{
/* The sign of zeroes and infinities is checked only when known_sign is
true. */
if (mpfr_nan_p (x1))
return mpfr_nan_p (x2);
if (mpfr_inf_p (x1))
return mpfr_inf_p (x2) &&
(!known_sign || mpfr_signbit (x1) == mpfr_signbit (x2));
if (mpfr_zero_p (x1))
return mpfr_zero_p (x2) &&
(!known_sign || mpfr_signbit (x1) == mpfr_signbit (x2));
return mpfr_cmp (x1, x2) == 0;
}
int
tpl_check_mpfr_data (mpfr_t got, mpfr_data_t expected)
{
return tpl_same_mpfr_value (got, expected.mpfr, expected.known_sign);
}
void
tpl_copy_mpfr (mpfr_ptr dest, mpfr_srcptr src)
{
/* source and destination are assumed to be of the same precision , so the
copy is exact (no rounding) */
MPC_ASSERT(mpfr_get_prec (dest) == mpfr_get_prec (src));
mpfr_set (dest, src, GMP_RNDN);
}
mpc-1.1.0/tests/tpl_mpc.c 0000644 0001751 0001751 00000003777 12471661720 012203 0000000 0000000 /* tpl_mpc.c -- Helper functions for mpc data.
Copyright (C) 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
void
tpl_read_mpc_rnd (mpc_datafile_context_t* datafile_context, mpc_rnd_t* rnd)
{
mpfr_rnd_t re, im;
tpl_read_mpfr_rnd (datafile_context, &re);
tpl_read_mpfr_rnd (datafile_context, &im);
*rnd = MPC_RND (re, im);
}
void
tpl_read_mpc (mpc_datafile_context_t* datafile_context, mpc_data_t* z)
{
tpl_read_mpfr (datafile_context, mpc_realref (z->mpc), &z->known_sign_real);
tpl_read_mpfr (datafile_context, mpc_imagref (z->mpc), &z->known_sign_imag);
}
void
tpl_read_mpc_inex (mpc_datafile_context_t* datafile_context,
mpc_inex_data_t *ternarypair)
{
tpl_read_ternary(datafile_context, &ternarypair->real);
tpl_read_ternary(datafile_context, &ternarypair->imag);
}
void
tpl_copy_mpc (mpc_ptr dest, mpc_srcptr src)
{
/* source and destination are assumed to be of the same precision , so the
copy is exact (no rounding) */
mpc_set (dest, src, MPC_RNDNN);
}
int
tpl_check_mpc_data (mpc_ptr got, mpc_data_t expected)
{
return tpl_same_mpfr_value (mpc_realref (got),
mpc_realref (expected.mpc),
expected.known_sign_real)
&& tpl_same_mpfr_value (mpc_imagref (got),
mpc_imagref (expected.mpc),
expected.known_sign_imag);
}
mpc-1.1.0/tests/mul.dat 0000644 0001751 0001751 00000031751 13071445474 011664 0000000 0000000 # Data file for mpc_mul
#
# Copyright (C) 2008, 2010, 2011, 2012 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP1_RE OP1_RE PREC_OP1_IM OP1_IM PREC_OP2_RE OP2_RE PREC_OP2_IM OP2_IM RND_RE RND_IM
#
# See add.dat for more details.
# special values (following ISO C99 standard, G.5.1)
0 0 53 nan 53 +inf 53 -inf 53 -inf 53 -inf 53 -inf N Z
0 0 53 nan 53 +inf 53 -inf 53 +inf 53 +1 53 -inf Z U
0 0 53 +inf 53 -inf 53 +inf 53 -inf 53 +inf 53 +0 U D
0 0 53 +inf 53 -inf 53 +inf 53 +inf 53 -0 53 -1 D N
0 0 53 -inf 53 +inf 53 -inf 53 -inf 53 -0 53 -1 N U
0 0 53 -inf 53 +inf 53 -inf 53 +inf 53 +inf 53 nan Z D
0 0 53 -inf 53 -inf 53 +inf 53 -inf 53 nan 53 -1 U N
0 0 53 nan 53 nan 53 +inf 53 +inf 53 -0 53 nan D Z
0 0 53 nan 53 nan 53 -inf 53 -inf 53 nan 53 nan N D
0 0 53 -inf 53 -inf 53 -1 53 -inf 53 +inf 53 -1 N D
0 0 53 -inf 53 nan 53 -inf 53 +1 53 +inf 53 -0 Z N
0 0 53 +inf 53 nan 53 +1 53 -inf 53 -0 53 +1 U Z
0 0 53 nan 53 nan 53 +inf 53 +1 53 -0 53 -0 D U
0 0 53 nan 53 -inf 53 -1 53 -inf 53 +inf 53 nan N N
0 0 53 nan 53 -inf 53 -inf 53 +1 53 nan 53 +1 Z Z
0 0 53 nan 53 nan 53 +1 53 -inf 53 -0 53 nan U U
0 0 53 nan 53 nan 53 +inf 53 +1 53 nan 53 nan D D
0 0 53 +inf 53 nan 53 -0 53 -inf 53 +0 53 +inf D D
0 0 53 -inf 53 nan 53 -inf 53 +0 53 +1 53 -0 N Z
0 0 53 nan 53 nan 53 +0 53 -inf 53 -0 53 -0 Z U
0 0 53 -inf 53 nan 53 +inf 53 +0 53 -inf 53 nan U D
0 0 53 -inf 53 nan 53 -0 53 -inf 53 nan 53 -1 D N
0 0 53 nan 53 nan 53 -inf 53 +0 53 +0 53 nan N U
0 0 53 nan 53 nan 53 +0 53 -inf 53 nan 53 nan Z D
0 0 53 +1 53 -0 53 +0 53 +1 53 -0 53 -1 Z D
0 0 53 -0 53 +0 53 -1 53 -0 53 +0 53 -0 U N
0 0 53 -inf 53 nan 53 -0 53 +1 53 nan 53 +inf D Z
0 0 53 nan 53 nan 53 +1 53 -0 53 -1 53 nan N D
0 0 53 nan 53 nan 53 +0 53 +1 53 nan 53 -0 Z N
0 0 53 nan 53 nan 53 -1 53 -0 53 nan 53 nan U Z
0 0 53 +0 53 +0 53 -0 53 +0 53 +0 53 -0 U Z
0 0 53 nan 53 nan 53 +0 53 -0 53 nan 53 -inf D U
0 0 53 nan 53 nan 53 +0 53 +0 53 -1 53 nan N N
0 0 53 nan 53 nan 53 -0 53 -0 53 nan 53 -0 Z Z
0 0 53 nan 53 nan 53 -0 53 +0 53 nan 53 nan U U
0 0 53 +inf 53 nan 53 nan 53 -inf 53 nan 53 +inf U U
0 0 53 -inf 53 nan 53 +inf 53 nan 53 -1 53 nan D D
0 0 53 nan 53 nan 53 nan 53 -inf 53 nan 53 -0 N Z
0 0 53 nan 53 nan 53 -inf 53 nan 53 nan 53 nan Z U
0 0 53 nan 53 nan 53 +1 53 nan 53 nan 53 -1 Z U
0 0 53 nan 53 nan 53 nan 53 +1 53 -0 53 nan U D
0 0 53 nan 53 nan 53 -1 53 nan 53 nan 53 nan D N
0 0 53 nan 53 nan 53 nan 53 +0 53 +0 53 nan D N
0 0 53 nan 53 nan 53 +0 53 nan 53 nan 53 nan N U
0 0 53 nan 53 nan 53 nan 53 nan 53 nan 53 nan N U
# pure real arguments
0 0 53 0x10000000000001p-52 53 -0 53 +1 53 -0 53 0x10000000000001p-52 53 -0 N N
0 0 53 0x10000000000001p-52 53 -0 53 +1 53 -0 53 0x10000000000001p-52 53 -0 Z Z
0 0 53 0x10000000000001p-52 53 -0 53 +1 53 -0 53 0x10000000000001p-52 53 -0 U U
0 0 53 -0x10000000000001p-52 53 -0 53 -1 53 -0 53 0x10000000000001p-52 53 -0 D D
# one pure real argument
0 0 53 0x10000000000001p-52 53 0x10000000000001p-52 53 +1 53 +1 53 0x10000000000001p-52 53 -0 N N
0 0 53 0x10000000000001p-52 53 -0x10000000000001p-51 53 +1 53 -2 53 0x10000000000001p-52 53 -0 Z Z
- + 53 -0x30000000000004p-52 53 0x30000000000004p-52 53 -3 53 +3 53 0x10000000000001p-52 53 +0 N N
+ - 53 -0x30000000000002p-52 53 0x30000000000002p-52 53 -3 53 +3 53 0x10000000000001p-52 53 +0 Z Z
+ + 53 -0x30000000000002p-52 53 0x30000000000004p-52 53 -3 53 +3 53 0x10000000000001p-52 53 +0 U U
- - 53 -0x30000000000004p-52 53 0x30000000000002p-52 53 -3 53 +3 53 0x10000000000001p-52 53 +0 D D
0 0 53 -0x10000000000001p-52 53 -0x10000000000001p-50 53 -1 53 -4 53 0x10000000000001p-52 53 +0 D D
0 0 53 +0 53 +0 53 +0 53 +0 53 0x10000000000001p-52 53 -1 N N
0 0 53 +0 53 -0 53 +0 53 -0 53 0x10000000000001p-52 53 -2 Z Z
0 0 53 +0 53 +0 53 +0 53 +0 53 0x10000000000001p-52 53 +3 U U
0 0 53 -0 53 -0 53 -0 53 -0 53 0x10000000000001p-52 53 +4 D D
# pure imaginary arguments
0 0 53 -0x10000000000001p-52 53 -0 53 -0 53 0x10000000000001p-52 53 -0 53 +1 N N
0 0 53 -0x10000000000001p-52 53 +0 53 +0 53 0x10000000000001p-52 53 -0 53 +1 Z Z
0 0 53 -0x10000000000001p-52 53 +0 53 +0 53 0x10000000000001p-52 53 -0 53 +1 U U
0 0 53 -0x10000000000001p-52 53 -0 53 -0 53 0x10000000000001p-52 53 -0 53 +1 D D
# one pure imaginary argument
0 0 53 -0x10000000000001p-52 53 -0x10000000000001p-52 53 -0 53 0x10000000000001p-52 53 -1 53 +1 N N
0 0 53 +0x10000000000001p-52 53 -0x10000000000001p-51 53 +0 53 0x10000000000001p-52 53 -2 53 -1 Z Z
+ - 53 0x30000000000004p-52 53 -0x30000000000004p-52 53 +0 53 0x10000000000001p-52 53 -3 53 -3 N N
- + 53 0x30000000000002p-52 53 -0x30000000000002p-52 53 +0 53 0x10000000000001p-52 53 -3 53 -3 Z Z
+ + 53 0x30000000000004p-52 53 -0x30000000000002p-52 53 +0 53 0x10000000000001p-52 53 -3 53 -3 U U
- - 53 0x30000000000002p-52 53 -0x30000000000004p-52 53 +0 53 0x10000000000001p-52 53 -3 53 -3 D D
0 0 53 +0x10000000000001p-52 53 -0x10000000000001p-50 53 -0 53 0x10000000000001p-52 53 -4 53 -1 D D
# big precision uses Karatsuba method
0 0 4096 0x1420176785BD601FC018AD36471p-96 4096 -0x1ECCDBDA38B2611A32848E7ADF43p-100 53 0x6B2E363676587p-44 53 0x1AC20AAC49ED37p-47 53 0x12264C57B44C6Bp-53 53 -0x138639A4B8D8B3p-50 N N
# Karatsuba case where x=0 since ad=bc: (1+i)^2 at artificially high
# precision so that Karatsuba is actually used.
0 0 4096 0 4096 2 4096 1 4096 1 4096 1 4096 1 N N
# trigger the line reducing prec_x to prec_u
0 0 4096 0 4096 2 40960 1 40960 1 40960 1 40960 1 N N
# another particular cases
+ + 6 -0x9p-497 6 0x33p-315 6 -0x1dp-73 6 0x3p148 6 0x11p-463 6 0x3p-645 N N
+ - 6 0x33p-315 6 0x9p-497 6 0x3p148 6 0x1dp-73 6 0x11p-463 6 0x3p-645 N N
0 0 4 0x1p-1902 4 0x3p-1085 4 -0x1p-892 4 -0x3p-75 4 -0x1p-1010 4 0 N N
# a few particular values
0 0 8 10 8 -5 8 4 8 3 8 1 8 -2 N N
+ + 27 0b1.10110000001100010010000000e-3 27 0b1.00111100000010100001011001e-1 27 0b1.11111011011000010101000000e-2 27 0b1.11010001010110111001110001e-3 27 0b1.10100101110110011011100100e-1 27 0b1.10111100011000001100110011e-1 N N
0 0 15 2 15 0 15 -1 15 -1 15 -1 15 1 N N
# check squares, copied from sqr.dat
+ - 53 0xfdbac097c8dc58p+2096 53 -0x7f6e5d4c3b2a2p+1036 53 -0xfedcba9876543p+1024 53 0x10000000000001p-42 53 -0xfedcba9876543p+1024 53 0x10000000000001p-42 U D
+ 0 30 309485009533114692573069312 30 18889465966662952943616 30 17592186044416 30 536870913 30 17592186044416 30 536870913 N N
0 0 4 0 4 2 4 1 4 1 4 1 4 1 N N
+ + 8 0b1.1000111e-3 8 0b1.1100111e-3 27 0b1.11111011011000010101000000e-2 27 0b1.11010001010110111001110001e-3 27 0b1.11111011011000010101000000e-2 27 0b1.11010001010110111001110001e-3 N N
# the following is the square (x+i*y)^2 where |x| >= 2.34*2^768635652 and
# |y| <= 13.09*2^768635572, thus x^2 >= 5.47*2^1537271304 and
# y^2 <= 171.34*2^1537271144 < x*2^(-155) thus x^2-y^2 should overflow
# with the default emax = 1073741821
? + 3464 inf 3464 inf 866 -0x2.5763c6519ef1510f8afa101a210b8030b1909cc17004db561a25d9b53e2c08c41c01e8bbac5af6299b9d8786030aa14943d841798c8c369287942e4d4cec42a60ab0922af931159805e631128e97f973754ad53972d5d320a651a3b4a667f0ef2b92dbd698d159c3642675140@192158913 866 -0xd.15f2d530934dd930d66e89d70762d2337a8f973dd6915eb6b532fd372fcc955df1d852632d4e46fe64154ceda991a1302caf1b0ec622497e3e5724dd05b1c89a06e28d7e18e8af58f5ff4c9998cb31714688867524f41e0b31e847c1bf40de5127f858069998efd7c3e599080@192158893 866 -0x2.5763c6519ef1510f8afa101a210b8030b1909cc17004db561a25d9b53e2c08c41c01e8bbac5af6299b9d8786030aa14943d841798c8c369287942e4d4cec42a60ab0922af931159805e631128e97f973754ad53972d5d320a651a3b4a667f0ef2b92dbd698d159c3642675140@192158913 866 -0xd.15f2d530934dd930d66e89d70762d2337a8f973dd6915eb6b532fd372fcc955df1d852632d4e46fe64154ceda991a1302caf1b0ec622497e3e5724dd05b1c89a06e28d7e18e8af58f5ff4c9998cb31714688867524f41e0b31e847c1bf40de5127f858069998efd7c3e599080@192158893 N N
? + 2256 0 2256 -0 564 0xc.87999bfd1cb1a64288881e214b7cf1af979863b23c030b79c4a8bebb39177967608388a2e4df527977e7755a25df8af8f72fdd6dd2f42bd00de83088b4e9b59ce85caf2e6b0c0@-184298749 564 -0x2.5109af459d4daf357e09475ec991cdc9b02c8f7dfacdc060d2a24710d09c997f8aea6dbd46f10828c30b583fdcc90d7dcbb895689d594d3813db40784d2309e450d1fb6e38da8@-184298726 564 0xc.87999bfd1cb1a64288881e214b7cf1af979863b23c030b79c4a8bebb39177967608388a2e4df527977e7755a25df8af8f72fdd6dd2f42bd00de83088b4e9b59ce85caf2e6b0c0@-184298749 564 -0x2.5109af459d4daf357e09475ec991cdc9b02c8f7dfacdc060d2a24710d09c997f8aea6dbd46f10828c30b583fdcc90d7dcbb895689d594d3813db40784d2309e450d1fb6e38da8@-184298726 N N
# intermediate over- and underflows
- + 100 -inf 100 +inf 100 0x1@125000750 100 0x3@125000750 100 0x1@225000750 100 0x2@225000750 N N
- + 100 -inf 100 +inf 100 0x1@225000750 100 0x2@225000750 100 0x1@125000750 100 0x3@125000750 N N
- - 100 -inf 100 -inf 100 0x1@225000750 100 -0x2@225000750 100 0x1@125000750 100 -0x3@125000750 N N
+ - 100 -0 100 +0 100 0x1@-125000750 100 0x3@-125000750 100 0x1@-225000750 100 0x2@-225000750 N N
+ - 100 -0 100 +0 100 0x1@-225000750 100 0x2@-225000750 100 0x1@-125000750 100 0x3@-125000750 N N
- - 100 +0 100 +0 100 0x3@-125000750 100 0x1@-125000750 100 0x1@-225000750 100 0x2@-225000750 N N
- - 100 +0 100 +0 100 0x4@-125000750 100 0x1@-125000750 100 0x1@-225000750 100 0x2@-225000750 N N
+ - 100 -0 100 +0 100 0x2@-225000750 100 0x1@-225000750 100 0x1@-125000750 100 0x3@-125000750 N N
0 - 100 +0 100 +0 100 0x1@-225000750 100 0x1@-225000750 100 0x1@-125000750 100 0x1@-125000750 N N
0 + 100 +0 100 +inf 100 0x1@125000750 100 0x1@125000750 100 0x1@225000750 100 0x1@225000750 N N
+ 0 100 +inf 100 +0 100 0x1@125000750 100 0x1@125000750 100 0x1@225000750 100 -0x1@225000750 N N
# the same with directed rounding
- + 10 -inf 10 +inf 10 0x1@125000750 10 0x3@125000750 10 0x1@225000750 10 0x2@225000750 D U
# the following test assumes the maximum MPFR exponent is 1073741821
# and the minimum exponent is -1073741821
+ - 10 -0b1.111111111e1073741820 10 0b1.111111111e1073741820 10 0x1@125000750 10 0x3@125000750 10 0x1@225000750 10 0x2@225000750 U D
+ - 10 -0 10 +0 10 0x1@-125000750 10 0x3@-125000750 10 0x1@-225000750 10 0x2@-225000750 U D
- + 10 -0b1e-1073741822 10 0b1e-1073741822 10 0x1@-125000750 10 0x3@-125000750 10 0x1@-225000750 10 0x2@-225000750 D U
# starting with Karatsuba
- + 10000 -inf 100 +inf 100 0x1@125000750 100 0x3@125000750 100 0x1@225000750 100 0x2@225000750 N N
- + 10000 -inf 100 +inf 100 0x1@225000750 100 0x2@225000750 100 0x1@125000750 100 0x3@125000750 N N
- - 10000 -inf 100 -inf 100 0x1@225000750 100 -0x2@225000750 100 0x1@125000750 100 -0x3@125000750 N N
+ - 10000 -0 100 +0 100 0x1@-125000750 100 0x3@-125000750 100 0x1@-225000750 100 0x2@-225000750 N N
+ - 10000 -0 100 +0 100 0x1@-225000750 100 0x2@-225000750 100 0x1@-125000750 100 0x3@-125000750 N N
- - 10000 +0 100 +0 100 0x3@-125000750 100 0x1@-125000750 100 0x1@-225000750 100 0x2@-225000750 N N
- - 10000 +0 100 +0 100 0x4@-125000750 100 0x1@-125000750 100 0x1@-225000750 100 0x2@-225000750 N N
+ - 10000 -0 100 +0 100 0x2@-225000750 100 0x1@-225000750 100 0x1@-125000750 100 0x3@-125000750 N N
0 - 10000 +0 100 +0 100 0x1@-225000750 100 0x1@-225000750 100 0x1@-125000750 100 0x1@-125000750 N N
0 + 10000 +0 100 +inf 100 0x1@125000750 100 0x1@125000750 100 0x1@225000750 100 0x1@225000750 N N
+ 0 10000 +inf 100 +0 100 0x1@125000750 100 0x1@125000750 100 0x1@225000750 100 -0x1@225000750 N N
+ + 10000 +inf 100 +inf 100 0x1@125000750 100 0x3@125000750 100 0x1@143434706 100 0x2@143434705 N N
# improve code coverage: case where sign_x==0 in mpc_mul_karatsuba
0 0 2000 6 2000 8 2000 4 2000 2 2000 2 2000 1 N N
0 0 2000 0 2000 4 2000 2 2000 2 2000 1 2000 1 N N
+ 0 2 1 2 0x2p-536870913 2 1 2 0x1p-536870913 2 1 2 0x1p-536870913 N N
0 - 2 0 2 1 2 0x1p-536870913 2 1 2 1 2 0x1p-536870913 N N
mpc-1.1.0/tests/Makefile.in 0000644 0001751 0001751 00000244263 13225640263 012440 0000000 0000000 # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
check_PROGRAMS = tabs$(EXEEXT) tacos$(EXEEXT) tacosh$(EXEEXT) \
tadd$(EXEEXT) tadd_fr$(EXEEXT) tadd_si$(EXEEXT) \
tadd_ui$(EXEEXT) targ$(EXEEXT) tasin$(EXEEXT) tasinh$(EXEEXT) \
tatan$(EXEEXT) tatanh$(EXEEXT) tcmp_abs$(EXEEXT) \
tconj$(EXEEXT) tcos$(EXEEXT) tcosh$(EXEEXT) tdiv$(EXEEXT) \
tdiv_2si$(EXEEXT) tdiv_2ui$(EXEEXT) tdiv_fr$(EXEEXT) \
tdiv_ui$(EXEEXT) texp$(EXEEXT) tfma$(EXEEXT) tfr_div$(EXEEXT) \
tfr_sub$(EXEEXT) timag$(EXEEXT) tio_str$(EXEEXT) tlog$(EXEEXT) \
tlog10$(EXEEXT) tmul$(EXEEXT) tmul_2si$(EXEEXT) \
tmul_2ui$(EXEEXT) tmul_fr$(EXEEXT) tmul_i$(EXEEXT) \
tmul_si$(EXEEXT) tmul_ui$(EXEEXT) tneg$(EXEEXT) tnorm$(EXEEXT) \
tpow$(EXEEXT) tpow_d$(EXEEXT) tpow_fr$(EXEEXT) \
tpow_ld$(EXEEXT) tpow_si$(EXEEXT) tpow_ui$(EXEEXT) \
tpow_z$(EXEEXT) tprec$(EXEEXT) tproj$(EXEEXT) treal$(EXEEXT) \
treimref$(EXEEXT) trootofunity$(EXEEXT) tset$(EXEEXT) \
tsin$(EXEEXT) tsin_cos$(EXEEXT) tsinh$(EXEEXT) tsqr$(EXEEXT) \
tsqrt$(EXEEXT) tstrtoc$(EXEEXT) tsub$(EXEEXT) tsub_fr$(EXEEXT) \
tsub_ui$(EXEEXT) tswap$(EXEEXT) ttan$(EXEEXT) ttanh$(EXEEXT) \
tui_div$(EXEEXT) tui_ui_sub$(EXEEXT) tget_version$(EXEEXT) \
exceptions$(EXEEXT)
subdir = tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c_check_flag.m4 \
$(top_srcdir)/m4/ax_gcc_option.m4 \
$(top_srcdir)/m4/ax_gcc_version.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/mpc.m4 $(top_srcdir)/m4/valgrind-tests.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
libmpc_tests_la_LIBADD =
am_libmpc_tests_la_OBJECTS = check_data.lo clear_parameters.lo \
close_datafile.lo comparisons.lo copy_parameter.lo \
double_rounding.lo init_parameters.lo mpfr_flags.lo \
open_datafile.lo print_parameter.lo random.lo read_data.lo \
read_description.lo read_line.lo rounding.lo \
setprec_parameters.lo tpl_gmp.lo tpl_mpc.lo tpl_mpfr.lo \
tpl_native.lo
libmpc_tests_la_OBJECTS = $(am_libmpc_tests_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
exceptions_SOURCES = exceptions.c
exceptions_OBJECTS = exceptions.$(OBJEXT)
exceptions_LDADD = $(LDADD)
exceptions_DEPENDENCIES = libmpc-tests.la \
$(top_builddir)/src/libmpc.la
tabs_SOURCES = tabs.c
tabs_OBJECTS = tabs.$(OBJEXT)
tabs_LDADD = $(LDADD)
tabs_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tacos_SOURCES = tacos.c
tacos_OBJECTS = tacos.$(OBJEXT)
tacos_LDADD = $(LDADD)
tacos_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tacosh_SOURCES = tacosh.c
tacosh_OBJECTS = tacosh.$(OBJEXT)
tacosh_LDADD = $(LDADD)
tacosh_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tadd_SOURCES = tadd.c
tadd_OBJECTS = tadd.$(OBJEXT)
tadd_LDADD = $(LDADD)
tadd_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tadd_fr_SOURCES = tadd_fr.c
tadd_fr_OBJECTS = tadd_fr.$(OBJEXT)
tadd_fr_LDADD = $(LDADD)
tadd_fr_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tadd_si_SOURCES = tadd_si.c
tadd_si_OBJECTS = tadd_si.$(OBJEXT)
tadd_si_LDADD = $(LDADD)
tadd_si_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tadd_ui_SOURCES = tadd_ui.c
tadd_ui_OBJECTS = tadd_ui.$(OBJEXT)
tadd_ui_LDADD = $(LDADD)
tadd_ui_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
targ_SOURCES = targ.c
targ_OBJECTS = targ.$(OBJEXT)
targ_LDADD = $(LDADD)
targ_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tasin_SOURCES = tasin.c
tasin_OBJECTS = tasin.$(OBJEXT)
tasin_LDADD = $(LDADD)
tasin_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tasinh_SOURCES = tasinh.c
tasinh_OBJECTS = tasinh.$(OBJEXT)
tasinh_LDADD = $(LDADD)
tasinh_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tatan_SOURCES = tatan.c
tatan_OBJECTS = tatan.$(OBJEXT)
tatan_LDADD = $(LDADD)
tatan_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tatanh_SOURCES = tatanh.c
tatanh_OBJECTS = tatanh.$(OBJEXT)
tatanh_LDADD = $(LDADD)
tatanh_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tcmp_abs_SOURCES = tcmp_abs.c
tcmp_abs_OBJECTS = tcmp_abs.$(OBJEXT)
tcmp_abs_LDADD = $(LDADD)
tcmp_abs_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tconj_SOURCES = tconj.c
tconj_OBJECTS = tconj.$(OBJEXT)
tconj_LDADD = $(LDADD)
tconj_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tcos_SOURCES = tcos.c
tcos_OBJECTS = tcos.$(OBJEXT)
tcos_LDADD = $(LDADD)
tcos_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tcosh_SOURCES = tcosh.c
tcosh_OBJECTS = tcosh.$(OBJEXT)
tcosh_LDADD = $(LDADD)
tcosh_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tdiv_SOURCES = tdiv.c
tdiv_OBJECTS = tdiv.$(OBJEXT)
tdiv_LDADD = $(LDADD)
tdiv_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tdiv_2si_SOURCES = tdiv_2si.c
tdiv_2si_OBJECTS = tdiv_2si.$(OBJEXT)
tdiv_2si_LDADD = $(LDADD)
tdiv_2si_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tdiv_2ui_SOURCES = tdiv_2ui.c
tdiv_2ui_OBJECTS = tdiv_2ui.$(OBJEXT)
tdiv_2ui_LDADD = $(LDADD)
tdiv_2ui_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tdiv_fr_SOURCES = tdiv_fr.c
tdiv_fr_OBJECTS = tdiv_fr.$(OBJEXT)
tdiv_fr_LDADD = $(LDADD)
tdiv_fr_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tdiv_ui_SOURCES = tdiv_ui.c
tdiv_ui_OBJECTS = tdiv_ui.$(OBJEXT)
tdiv_ui_LDADD = $(LDADD)
tdiv_ui_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
texp_SOURCES = texp.c
texp_OBJECTS = texp.$(OBJEXT)
texp_LDADD = $(LDADD)
texp_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tfma_SOURCES = tfma.c
tfma_OBJECTS = tfma.$(OBJEXT)
tfma_LDADD = $(LDADD)
tfma_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tfr_div_SOURCES = tfr_div.c
tfr_div_OBJECTS = tfr_div.$(OBJEXT)
tfr_div_LDADD = $(LDADD)
tfr_div_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tfr_sub_SOURCES = tfr_sub.c
tfr_sub_OBJECTS = tfr_sub.$(OBJEXT)
tfr_sub_LDADD = $(LDADD)
tfr_sub_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tget_version_SOURCES = tget_version.c
tget_version_OBJECTS = tget_version.$(OBJEXT)
tget_version_LDADD = $(LDADD)
tget_version_DEPENDENCIES = libmpc-tests.la \
$(top_builddir)/src/libmpc.la
timag_SOURCES = timag.c
timag_OBJECTS = timag.$(OBJEXT)
timag_LDADD = $(LDADD)
timag_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tio_str_SOURCES = tio_str.c
tio_str_OBJECTS = tio_str.$(OBJEXT)
tio_str_LDADD = $(LDADD)
tio_str_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tlog_SOURCES = tlog.c
tlog_OBJECTS = tlog.$(OBJEXT)
tlog_LDADD = $(LDADD)
tlog_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tlog10_SOURCES = tlog10.c
tlog10_OBJECTS = tlog10.$(OBJEXT)
tlog10_LDADD = $(LDADD)
tlog10_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tmul_SOURCES = tmul.c
tmul_OBJECTS = tmul.$(OBJEXT)
tmul_LDADD = $(LDADD)
tmul_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tmul_2si_SOURCES = tmul_2si.c
tmul_2si_OBJECTS = tmul_2si.$(OBJEXT)
tmul_2si_LDADD = $(LDADD)
tmul_2si_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tmul_2ui_SOURCES = tmul_2ui.c
tmul_2ui_OBJECTS = tmul_2ui.$(OBJEXT)
tmul_2ui_LDADD = $(LDADD)
tmul_2ui_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tmul_fr_SOURCES = tmul_fr.c
tmul_fr_OBJECTS = tmul_fr.$(OBJEXT)
tmul_fr_LDADD = $(LDADD)
tmul_fr_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tmul_i_SOURCES = tmul_i.c
tmul_i_OBJECTS = tmul_i.$(OBJEXT)
tmul_i_LDADD = $(LDADD)
tmul_i_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tmul_si_SOURCES = tmul_si.c
tmul_si_OBJECTS = tmul_si.$(OBJEXT)
tmul_si_LDADD = $(LDADD)
tmul_si_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tmul_ui_SOURCES = tmul_ui.c
tmul_ui_OBJECTS = tmul_ui.$(OBJEXT)
tmul_ui_LDADD = $(LDADD)
tmul_ui_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tneg_SOURCES = tneg.c
tneg_OBJECTS = tneg.$(OBJEXT)
tneg_LDADD = $(LDADD)
tneg_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tnorm_SOURCES = tnorm.c
tnorm_OBJECTS = tnorm.$(OBJEXT)
tnorm_LDADD = $(LDADD)
tnorm_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tpow_SOURCES = tpow.c
tpow_OBJECTS = tpow.$(OBJEXT)
tpow_LDADD = $(LDADD)
tpow_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tpow_d_SOURCES = tpow_d.c
tpow_d_OBJECTS = tpow_d.$(OBJEXT)
tpow_d_LDADD = $(LDADD)
tpow_d_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tpow_fr_SOURCES = tpow_fr.c
tpow_fr_OBJECTS = tpow_fr.$(OBJEXT)
tpow_fr_LDADD = $(LDADD)
tpow_fr_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tpow_ld_SOURCES = tpow_ld.c
tpow_ld_OBJECTS = tpow_ld.$(OBJEXT)
tpow_ld_LDADD = $(LDADD)
tpow_ld_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tpow_si_SOURCES = tpow_si.c
tpow_si_OBJECTS = tpow_si.$(OBJEXT)
tpow_si_LDADD = $(LDADD)
tpow_si_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tpow_ui_SOURCES = tpow_ui.c
tpow_ui_OBJECTS = tpow_ui.$(OBJEXT)
tpow_ui_LDADD = $(LDADD)
tpow_ui_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tpow_z_SOURCES = tpow_z.c
tpow_z_OBJECTS = tpow_z.$(OBJEXT)
tpow_z_LDADD = $(LDADD)
tpow_z_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tprec_SOURCES = tprec.c
tprec_OBJECTS = tprec.$(OBJEXT)
tprec_LDADD = $(LDADD)
tprec_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tproj_SOURCES = tproj.c
tproj_OBJECTS = tproj.$(OBJEXT)
tproj_LDADD = $(LDADD)
tproj_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
treal_SOURCES = treal.c
treal_OBJECTS = treal.$(OBJEXT)
treal_LDADD = $(LDADD)
treal_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
treimref_SOURCES = treimref.c
treimref_OBJECTS = treimref.$(OBJEXT)
treimref_LDADD = $(LDADD)
treimref_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
trootofunity_SOURCES = trootofunity.c
trootofunity_OBJECTS = trootofunity.$(OBJEXT)
trootofunity_LDADD = $(LDADD)
trootofunity_DEPENDENCIES = libmpc-tests.la \
$(top_builddir)/src/libmpc.la
tset_SOURCES = tset.c
tset_OBJECTS = tset.$(OBJEXT)
tset_LDADD = $(LDADD)
tset_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tsin_SOURCES = tsin.c
tsin_OBJECTS = tsin.$(OBJEXT)
tsin_LDADD = $(LDADD)
tsin_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tsin_cos_SOURCES = tsin_cos.c
tsin_cos_OBJECTS = tsin_cos.$(OBJEXT)
tsin_cos_LDADD = $(LDADD)
tsin_cos_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tsinh_SOURCES = tsinh.c
tsinh_OBJECTS = tsinh.$(OBJEXT)
tsinh_LDADD = $(LDADD)
tsinh_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tsqr_SOURCES = tsqr.c
tsqr_OBJECTS = tsqr.$(OBJEXT)
tsqr_LDADD = $(LDADD)
tsqr_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tsqrt_SOURCES = tsqrt.c
tsqrt_OBJECTS = tsqrt.$(OBJEXT)
tsqrt_LDADD = $(LDADD)
tsqrt_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tstrtoc_SOURCES = tstrtoc.c
tstrtoc_OBJECTS = tstrtoc.$(OBJEXT)
tstrtoc_LDADD = $(LDADD)
tstrtoc_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tsub_SOURCES = tsub.c
tsub_OBJECTS = tsub.$(OBJEXT)
tsub_LDADD = $(LDADD)
tsub_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tsub_fr_SOURCES = tsub_fr.c
tsub_fr_OBJECTS = tsub_fr.$(OBJEXT)
tsub_fr_LDADD = $(LDADD)
tsub_fr_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tsub_ui_SOURCES = tsub_ui.c
tsub_ui_OBJECTS = tsub_ui.$(OBJEXT)
tsub_ui_LDADD = $(LDADD)
tsub_ui_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tswap_SOURCES = tswap.c
tswap_OBJECTS = tswap.$(OBJEXT)
tswap_LDADD = $(LDADD)
tswap_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
ttan_SOURCES = ttan.c
ttan_OBJECTS = ttan.$(OBJEXT)
ttan_LDADD = $(LDADD)
ttan_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
ttanh_SOURCES = ttanh.c
ttanh_OBJECTS = ttanh.$(OBJEXT)
ttanh_LDADD = $(LDADD)
ttanh_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tui_div_SOURCES = tui_div.c
tui_div_OBJECTS = tui_div.$(OBJEXT)
tui_div_LDADD = $(LDADD)
tui_div_DEPENDENCIES = libmpc-tests.la $(top_builddir)/src/libmpc.la
tui_ui_sub_SOURCES = tui_ui_sub.c
tui_ui_sub_OBJECTS = tui_ui_sub.$(OBJEXT)
tui_ui_sub_LDADD = $(LDADD)
tui_ui_sub_DEPENDENCIES = libmpc-tests.la \
$(top_builddir)/src/libmpc.la
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libmpc_tests_la_SOURCES) exceptions.c tabs.c tacos.c \
tacosh.c tadd.c tadd_fr.c tadd_si.c tadd_ui.c targ.c tasin.c \
tasinh.c tatan.c tatanh.c tcmp_abs.c tconj.c tcos.c tcosh.c \
tdiv.c tdiv_2si.c tdiv_2ui.c tdiv_fr.c tdiv_ui.c texp.c tfma.c \
tfr_div.c tfr_sub.c tget_version.c timag.c tio_str.c tlog.c \
tlog10.c tmul.c tmul_2si.c tmul_2ui.c tmul_fr.c tmul_i.c \
tmul_si.c tmul_ui.c tneg.c tnorm.c tpow.c tpow_d.c tpow_fr.c \
tpow_ld.c tpow_si.c tpow_ui.c tpow_z.c tprec.c tproj.c treal.c \
treimref.c trootofunity.c tset.c tsin.c tsin_cos.c tsinh.c \
tsqr.c tsqrt.c tstrtoc.c tsub.c tsub_fr.c tsub_ui.c tswap.c \
ttan.c ttanh.c tui_div.c tui_ui_sub.c
DIST_SOURCES = $(libmpc_tests_la_SOURCES) exceptions.c tabs.c tacos.c \
tacosh.c tadd.c tadd_fr.c tadd_si.c tadd_ui.c targ.c tasin.c \
tasinh.c tatan.c tatanh.c tcmp_abs.c tconj.c tcos.c tcosh.c \
tdiv.c tdiv_2si.c tdiv_2ui.c tdiv_fr.c tdiv_ui.c texp.c tfma.c \
tfr_div.c tfr_sub.c tget_version.c timag.c tio_str.c tlog.c \
tlog10.c tmul.c tmul_2si.c tmul_2ui.c tmul_fr.c tmul_i.c \
tmul_si.c tmul_ui.c tneg.c tnorm.c tpow.c tpow_d.c tpow_fr.c \
tpow_ld.c tpow_si.c tpow_ui.c tpow_z.c tprec.c tproj.c treal.c \
treimref.c trootofunity.c tset.c tsin.c tsin_cos.c tsinh.c \
tsqr.c tsqrt.c tstrtoc.c tsub.c tsub_fr.c tsub_ui.c tswap.c \
ttan.c ttanh.c tui_div.c tui_ui_sub.c
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__tty_colors_dummy = \
mgn= red= grn= lgn= blu= brg= std=; \
am__color_tests=no
am__tty_colors = { \
$(am__tty_colors_dummy); \
if test "X$(AM_COLOR_TESTS)" = Xno; then \
am__color_tests=no; \
elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
am__color_tests=yes; \
elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
am__color_tests=yes; \
fi; \
if test $$am__color_tests = yes; then \
red='[0;31m'; \
grn='[0;32m'; \
lgn='[1;32m'; \
blu='[1;34m'; \
mgn='[0;35m'; \
brg='[1m'; \
std='[m'; \
fi; \
}
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__recheck_rx = ^[ ]*:recheck:[ ]*
am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
# A command that, given a newline-separated list of test names on the
# standard input, print the name of the tests that are to be re-run
# upon "make recheck".
am__list_recheck_tests = $(AWK) '{ \
recheck = 1; \
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
{ \
if (rc < 0) \
{ \
if ((getline line2 < ($$0 ".log")) < 0) \
recheck = 0; \
break; \
} \
else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
{ \
recheck = 0; \
break; \
} \
else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
{ \
break; \
} \
}; \
if (recheck) \
print $$0; \
close ($$0 ".trs"); \
close ($$0 ".log"); \
}'
# A command that, given a newline-separated list of test names on the
# standard input, create the global log from their .trs and .log files.
am__create_global_log = $(AWK) ' \
function fatal(msg) \
{ \
print "fatal: making $@: " msg | "cat >&2"; \
exit 1; \
} \
function rst_section(header) \
{ \
print header; \
len = length(header); \
for (i = 1; i <= len; i = i + 1) \
printf "="; \
printf "\n\n"; \
} \
{ \
copy_in_global_log = 1; \
global_test_result = "RUN"; \
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
{ \
if (rc < 0) \
fatal("failed to read from " $$0 ".trs"); \
if (line ~ /$(am__global_test_result_rx)/) \
{ \
sub("$(am__global_test_result_rx)", "", line); \
sub("[ ]*$$", "", line); \
global_test_result = line; \
} \
else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
copy_in_global_log = 0; \
}; \
if (copy_in_global_log) \
{ \
rst_section(global_test_result ": " $$0); \
while ((rc = (getline line < ($$0 ".log"))) != 0) \
{ \
if (rc < 0) \
fatal("failed to read from " $$0 ".log"); \
print line; \
}; \
printf "\n"; \
}; \
close ($$0 ".trs"); \
close ($$0 ".log"); \
}'
# Restructured Text title.
am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
# Solaris 10 'make', and several other traditional 'make' implementations,
# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
# by disabling -e (using the XSI extension "set +e") if it's set.
am__sh_e_setup = case $$- in *e*) set +e;; esac
# Default flags passed to test drivers.
am__common_driver_flags = \
--color-tests "$$am__color_tests" \
--enable-hard-errors "$$am__enable_hard_errors" \
--expect-failure "$$am__expect_failure"
# To be inserted before the command running the test. Creates the
# directory for the log if needed. Stores in $dir the directory
# containing $f, in $tst the test, in $log the log. Executes the
# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
# will run the test scripts (or their associated LOG_COMPILER, if
# thy have one).
am__check_pre = \
$(am__sh_e_setup); \
$(am__vpath_adj_setup) $(am__vpath_adj) \
$(am__tty_colors); \
srcdir=$(srcdir); export srcdir; \
case "$@" in \
*/*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
*) am__odir=.;; \
esac; \
test "x$$am__odir" = x"." || test -d "$$am__odir" \
|| $(MKDIR_P) "$$am__odir" || exit $$?; \
if test -f "./$$f"; then dir=./; \
elif test -f "$$f"; then dir=; \
else dir="$(srcdir)/"; fi; \
tst=$$dir$$f; log='$@'; \
if test -n '$(DISABLE_HARD_ERRORS)'; then \
am__enable_hard_errors=no; \
else \
am__enable_hard_errors=yes; \
fi; \
case " $(XFAIL_TESTS) " in \
*[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
am__expect_failure=yes;; \
*) \
am__expect_failure=no;; \
esac; \
$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
# A shell command to get the names of the tests scripts with any registered
# extension removed (i.e., equivalently, the names of the test logs, with
# the '.log' extension removed). The result is saved in the shell variable
# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
# since that might cause problem with VPATH rewrites for suffix-less tests.
# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
am__set_TESTS_bases = \
bases='$(TEST_LOGS)'; \
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
bases=`echo $$bases`
RECHECK_LOGS = $(TEST_LOGS)
AM_RECURSIVE_TARGETS = check recheck
TEST_SUITE_LOG = test-suite.log
TEST_EXTENSIONS = @EXEEXT@ .test
LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
am__set_b = \
case '$@' in \
*/*) \
case '$*' in \
*/*) b='$*';; \
*) b=`echo '$@' | sed 's/\.log$$//'`; \
esac;; \
*) \
b='$*';; \
esac
am__test_logs1 = $(TESTS:=.log)
am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
TEST_LOGS = $(am__test_logs2:.test.log=.log)
TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
$(TEST_LOG_FLAGS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
$(top_srcdir)/test-driver
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GCC_VERSION = @GCC_VERSION@
GITVERSION = @GITVERSION@
GREP = @GREP@
HASGIT = @HASGIT@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPC_LDFLAGS = @MPC_LDFLAGS@
MPC_LOG_H = @MPC_LOG_H@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VALGRIND = @VALGRIND@
VALGRIND_OPTS = @VALGRIND_OPTS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I$(top_srcdir)/src
LDADD = libmpc-tests.la $(top_builddir)/src/libmpc.la
# let libtool create an executable instead of a shell script
# useful for tests with valgrind
AM_LDFLAGS = -no-install
# LOADLIBES (documented in the "GNU make" manual and equivalent to LDLIBS)
# enables to compile a program foo.c in the test directory by simply doing
# "make foo".
LOADLIBES = $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) \
$(top_builddir)/tests/.libs/libmpc-tests.a \
$(top_builddir)/src/.libs/libmpc.a $(LIBS)
check_LTLIBRARIES = libmpc-tests.la
libmpc_tests_la_SOURCES = mpc-tests.h check_data.c clear_parameters.c \
close_datafile.c comparisons.c copy_parameter.c double_rounding.c \
init_parameters.c mpfr_flags.c open_datafile.c print_parameter.c \
random.c read_data.c read_description.c read_line.c rounding.c \
setprec_parameters.c tpl_gmp.c tpl_mpc.c tpl_mpfr.c tpl_native.c
DESCRIPTIONS = abs.dsc acos.dsc acosh.dsc add.dsc add_fr.dsc add_si.dsc \
add_ui.dsc arg.dsc asin.dsc asinh.dsc atan.dsc atanh.dsc \
cmp_abs.dsc conj.dsc \
cos.dsc cosh.dsc div.dsc div_2si.dsc div_2ui.dsc div_fr.dsc \
div_ui.dsc exp.dsc fma.dsc fr_div.dsc fr_sub.dsc imag.dsc log.dsc \
log10.dsc mul.dsc mul_2si.dsc mul_2ui.dsc mul_fr.dsc mul_i.dsc \
mul_si.dsc mul_ui.dsc neg.dsc norm.dsc pow.dsc pow_d.dsc pow_fr.dsc \
pow_si.dsc pow_ui.dsc pow_z.dsc proj.dsc real.dsc rootofunity.dsc \
sin.dsc sin_cos.dsc \
sinh.dsc sqr.dsc sqrt.dsc sub.dsc sub_fr.dsc sub_ui.dsc tan.dsc \
tanh.dsc ui_div.dsc ui_ui_sub.dsc
DATA_SETS = abs.dat acos.dat acosh.dat add.dat add_fr.dat arg.dat \
asin.dat asinh.dat atan.dat atanh.dat \
cmp_abs.dat conj.dat cos.dat cosh.dat \
div.dat div_fr.dat exp.dat fma.dat fr_div.dat fr_sub.dat inp_str.dat \
log.dat log10.dat mul.dat mul_fr.dat neg.dat norm.dat pow.dat \
pow_fr.dat pow_si.dat pow_ui.dat pow_z.dat proj.dat rootofunity.dat \
sin.dat sinh.dat \
sqr.dat sqrt.dat strtoc.dat sub.dat sub_fr.dat tan.dat tanh.dat
EXTRA_DIST = data_check.tpl tgeneric.tpl $(DATA_SETS) $(DESCRIPTIONS)
LOG_COMPILER = $(VALGRIND)
AM_LOG_FLAGS = $(VALGRIND_OPTS)
TESTS = $(check_PROGRAMS)
CLEANFILES = mpc_test
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu tests/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
clean-checkLTLIBRARIES:
-test -z "$(check_LTLIBRARIES)" || rm -f $(check_LTLIBRARIES)
@list='$(check_LTLIBRARIES)'; \
locs=`for p in $$list; do echo $$p; done | \
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
sort -u`; \
test -z "$$locs" || { \
echo rm -f $${locs}; \
rm -f $${locs}; \
}
libmpc-tests.la: $(libmpc_tests_la_OBJECTS) $(libmpc_tests_la_DEPENDENCIES) $(EXTRA_libmpc_tests_la_DEPENDENCIES)
$(AM_V_CCLD)$(LINK) $(libmpc_tests_la_OBJECTS) $(libmpc_tests_la_LIBADD) $(LIBS)
clean-checkPROGRAMS:
@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
echo " rm -f" $$list; \
rm -f $$list || exit $$?; \
test -n "$(EXEEXT)" || exit 0; \
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
exceptions$(EXEEXT): $(exceptions_OBJECTS) $(exceptions_DEPENDENCIES) $(EXTRA_exceptions_DEPENDENCIES)
@rm -f exceptions$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(exceptions_OBJECTS) $(exceptions_LDADD) $(LIBS)
tabs$(EXEEXT): $(tabs_OBJECTS) $(tabs_DEPENDENCIES) $(EXTRA_tabs_DEPENDENCIES)
@rm -f tabs$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tabs_OBJECTS) $(tabs_LDADD) $(LIBS)
tacos$(EXEEXT): $(tacos_OBJECTS) $(tacos_DEPENDENCIES) $(EXTRA_tacos_DEPENDENCIES)
@rm -f tacos$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tacos_OBJECTS) $(tacos_LDADD) $(LIBS)
tacosh$(EXEEXT): $(tacosh_OBJECTS) $(tacosh_DEPENDENCIES) $(EXTRA_tacosh_DEPENDENCIES)
@rm -f tacosh$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tacosh_OBJECTS) $(tacosh_LDADD) $(LIBS)
tadd$(EXEEXT): $(tadd_OBJECTS) $(tadd_DEPENDENCIES) $(EXTRA_tadd_DEPENDENCIES)
@rm -f tadd$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tadd_OBJECTS) $(tadd_LDADD) $(LIBS)
tadd_fr$(EXEEXT): $(tadd_fr_OBJECTS) $(tadd_fr_DEPENDENCIES) $(EXTRA_tadd_fr_DEPENDENCIES)
@rm -f tadd_fr$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tadd_fr_OBJECTS) $(tadd_fr_LDADD) $(LIBS)
tadd_si$(EXEEXT): $(tadd_si_OBJECTS) $(tadd_si_DEPENDENCIES) $(EXTRA_tadd_si_DEPENDENCIES)
@rm -f tadd_si$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tadd_si_OBJECTS) $(tadd_si_LDADD) $(LIBS)
tadd_ui$(EXEEXT): $(tadd_ui_OBJECTS) $(tadd_ui_DEPENDENCIES) $(EXTRA_tadd_ui_DEPENDENCIES)
@rm -f tadd_ui$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tadd_ui_OBJECTS) $(tadd_ui_LDADD) $(LIBS)
targ$(EXEEXT): $(targ_OBJECTS) $(targ_DEPENDENCIES) $(EXTRA_targ_DEPENDENCIES)
@rm -f targ$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(targ_OBJECTS) $(targ_LDADD) $(LIBS)
tasin$(EXEEXT): $(tasin_OBJECTS) $(tasin_DEPENDENCIES) $(EXTRA_tasin_DEPENDENCIES)
@rm -f tasin$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tasin_OBJECTS) $(tasin_LDADD) $(LIBS)
tasinh$(EXEEXT): $(tasinh_OBJECTS) $(tasinh_DEPENDENCIES) $(EXTRA_tasinh_DEPENDENCIES)
@rm -f tasinh$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tasinh_OBJECTS) $(tasinh_LDADD) $(LIBS)
tatan$(EXEEXT): $(tatan_OBJECTS) $(tatan_DEPENDENCIES) $(EXTRA_tatan_DEPENDENCIES)
@rm -f tatan$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tatan_OBJECTS) $(tatan_LDADD) $(LIBS)
tatanh$(EXEEXT): $(tatanh_OBJECTS) $(tatanh_DEPENDENCIES) $(EXTRA_tatanh_DEPENDENCIES)
@rm -f tatanh$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tatanh_OBJECTS) $(tatanh_LDADD) $(LIBS)
tcmp_abs$(EXEEXT): $(tcmp_abs_OBJECTS) $(tcmp_abs_DEPENDENCIES) $(EXTRA_tcmp_abs_DEPENDENCIES)
@rm -f tcmp_abs$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tcmp_abs_OBJECTS) $(tcmp_abs_LDADD) $(LIBS)
tconj$(EXEEXT): $(tconj_OBJECTS) $(tconj_DEPENDENCIES) $(EXTRA_tconj_DEPENDENCIES)
@rm -f tconj$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tconj_OBJECTS) $(tconj_LDADD) $(LIBS)
tcos$(EXEEXT): $(tcos_OBJECTS) $(tcos_DEPENDENCIES) $(EXTRA_tcos_DEPENDENCIES)
@rm -f tcos$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tcos_OBJECTS) $(tcos_LDADD) $(LIBS)
tcosh$(EXEEXT): $(tcosh_OBJECTS) $(tcosh_DEPENDENCIES) $(EXTRA_tcosh_DEPENDENCIES)
@rm -f tcosh$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tcosh_OBJECTS) $(tcosh_LDADD) $(LIBS)
tdiv$(EXEEXT): $(tdiv_OBJECTS) $(tdiv_DEPENDENCIES) $(EXTRA_tdiv_DEPENDENCIES)
@rm -f tdiv$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tdiv_OBJECTS) $(tdiv_LDADD) $(LIBS)
tdiv_2si$(EXEEXT): $(tdiv_2si_OBJECTS) $(tdiv_2si_DEPENDENCIES) $(EXTRA_tdiv_2si_DEPENDENCIES)
@rm -f tdiv_2si$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tdiv_2si_OBJECTS) $(tdiv_2si_LDADD) $(LIBS)
tdiv_2ui$(EXEEXT): $(tdiv_2ui_OBJECTS) $(tdiv_2ui_DEPENDENCIES) $(EXTRA_tdiv_2ui_DEPENDENCIES)
@rm -f tdiv_2ui$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tdiv_2ui_OBJECTS) $(tdiv_2ui_LDADD) $(LIBS)
tdiv_fr$(EXEEXT): $(tdiv_fr_OBJECTS) $(tdiv_fr_DEPENDENCIES) $(EXTRA_tdiv_fr_DEPENDENCIES)
@rm -f tdiv_fr$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tdiv_fr_OBJECTS) $(tdiv_fr_LDADD) $(LIBS)
tdiv_ui$(EXEEXT): $(tdiv_ui_OBJECTS) $(tdiv_ui_DEPENDENCIES) $(EXTRA_tdiv_ui_DEPENDENCIES)
@rm -f tdiv_ui$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tdiv_ui_OBJECTS) $(tdiv_ui_LDADD) $(LIBS)
texp$(EXEEXT): $(texp_OBJECTS) $(texp_DEPENDENCIES) $(EXTRA_texp_DEPENDENCIES)
@rm -f texp$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(texp_OBJECTS) $(texp_LDADD) $(LIBS)
tfma$(EXEEXT): $(tfma_OBJECTS) $(tfma_DEPENDENCIES) $(EXTRA_tfma_DEPENDENCIES)
@rm -f tfma$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tfma_OBJECTS) $(tfma_LDADD) $(LIBS)
tfr_div$(EXEEXT): $(tfr_div_OBJECTS) $(tfr_div_DEPENDENCIES) $(EXTRA_tfr_div_DEPENDENCIES)
@rm -f tfr_div$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tfr_div_OBJECTS) $(tfr_div_LDADD) $(LIBS)
tfr_sub$(EXEEXT): $(tfr_sub_OBJECTS) $(tfr_sub_DEPENDENCIES) $(EXTRA_tfr_sub_DEPENDENCIES)
@rm -f tfr_sub$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tfr_sub_OBJECTS) $(tfr_sub_LDADD) $(LIBS)
tget_version$(EXEEXT): $(tget_version_OBJECTS) $(tget_version_DEPENDENCIES) $(EXTRA_tget_version_DEPENDENCIES)
@rm -f tget_version$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tget_version_OBJECTS) $(tget_version_LDADD) $(LIBS)
timag$(EXEEXT): $(timag_OBJECTS) $(timag_DEPENDENCIES) $(EXTRA_timag_DEPENDENCIES)
@rm -f timag$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(timag_OBJECTS) $(timag_LDADD) $(LIBS)
tio_str$(EXEEXT): $(tio_str_OBJECTS) $(tio_str_DEPENDENCIES) $(EXTRA_tio_str_DEPENDENCIES)
@rm -f tio_str$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tio_str_OBJECTS) $(tio_str_LDADD) $(LIBS)
tlog$(EXEEXT): $(tlog_OBJECTS) $(tlog_DEPENDENCIES) $(EXTRA_tlog_DEPENDENCIES)
@rm -f tlog$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tlog_OBJECTS) $(tlog_LDADD) $(LIBS)
tlog10$(EXEEXT): $(tlog10_OBJECTS) $(tlog10_DEPENDENCIES) $(EXTRA_tlog10_DEPENDENCIES)
@rm -f tlog10$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tlog10_OBJECTS) $(tlog10_LDADD) $(LIBS)
tmul$(EXEEXT): $(tmul_OBJECTS) $(tmul_DEPENDENCIES) $(EXTRA_tmul_DEPENDENCIES)
@rm -f tmul$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tmul_OBJECTS) $(tmul_LDADD) $(LIBS)
tmul_2si$(EXEEXT): $(tmul_2si_OBJECTS) $(tmul_2si_DEPENDENCIES) $(EXTRA_tmul_2si_DEPENDENCIES)
@rm -f tmul_2si$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tmul_2si_OBJECTS) $(tmul_2si_LDADD) $(LIBS)
tmul_2ui$(EXEEXT): $(tmul_2ui_OBJECTS) $(tmul_2ui_DEPENDENCIES) $(EXTRA_tmul_2ui_DEPENDENCIES)
@rm -f tmul_2ui$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tmul_2ui_OBJECTS) $(tmul_2ui_LDADD) $(LIBS)
tmul_fr$(EXEEXT): $(tmul_fr_OBJECTS) $(tmul_fr_DEPENDENCIES) $(EXTRA_tmul_fr_DEPENDENCIES)
@rm -f tmul_fr$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tmul_fr_OBJECTS) $(tmul_fr_LDADD) $(LIBS)
tmul_i$(EXEEXT): $(tmul_i_OBJECTS) $(tmul_i_DEPENDENCIES) $(EXTRA_tmul_i_DEPENDENCIES)
@rm -f tmul_i$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tmul_i_OBJECTS) $(tmul_i_LDADD) $(LIBS)
tmul_si$(EXEEXT): $(tmul_si_OBJECTS) $(tmul_si_DEPENDENCIES) $(EXTRA_tmul_si_DEPENDENCIES)
@rm -f tmul_si$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tmul_si_OBJECTS) $(tmul_si_LDADD) $(LIBS)
tmul_ui$(EXEEXT): $(tmul_ui_OBJECTS) $(tmul_ui_DEPENDENCIES) $(EXTRA_tmul_ui_DEPENDENCIES)
@rm -f tmul_ui$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tmul_ui_OBJECTS) $(tmul_ui_LDADD) $(LIBS)
tneg$(EXEEXT): $(tneg_OBJECTS) $(tneg_DEPENDENCIES) $(EXTRA_tneg_DEPENDENCIES)
@rm -f tneg$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tneg_OBJECTS) $(tneg_LDADD) $(LIBS)
tnorm$(EXEEXT): $(tnorm_OBJECTS) $(tnorm_DEPENDENCIES) $(EXTRA_tnorm_DEPENDENCIES)
@rm -f tnorm$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tnorm_OBJECTS) $(tnorm_LDADD) $(LIBS)
tpow$(EXEEXT): $(tpow_OBJECTS) $(tpow_DEPENDENCIES) $(EXTRA_tpow_DEPENDENCIES)
@rm -f tpow$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tpow_OBJECTS) $(tpow_LDADD) $(LIBS)
tpow_d$(EXEEXT): $(tpow_d_OBJECTS) $(tpow_d_DEPENDENCIES) $(EXTRA_tpow_d_DEPENDENCIES)
@rm -f tpow_d$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tpow_d_OBJECTS) $(tpow_d_LDADD) $(LIBS)
tpow_fr$(EXEEXT): $(tpow_fr_OBJECTS) $(tpow_fr_DEPENDENCIES) $(EXTRA_tpow_fr_DEPENDENCIES)
@rm -f tpow_fr$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tpow_fr_OBJECTS) $(tpow_fr_LDADD) $(LIBS)
tpow_ld$(EXEEXT): $(tpow_ld_OBJECTS) $(tpow_ld_DEPENDENCIES) $(EXTRA_tpow_ld_DEPENDENCIES)
@rm -f tpow_ld$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tpow_ld_OBJECTS) $(tpow_ld_LDADD) $(LIBS)
tpow_si$(EXEEXT): $(tpow_si_OBJECTS) $(tpow_si_DEPENDENCIES) $(EXTRA_tpow_si_DEPENDENCIES)
@rm -f tpow_si$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tpow_si_OBJECTS) $(tpow_si_LDADD) $(LIBS)
tpow_ui$(EXEEXT): $(tpow_ui_OBJECTS) $(tpow_ui_DEPENDENCIES) $(EXTRA_tpow_ui_DEPENDENCIES)
@rm -f tpow_ui$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tpow_ui_OBJECTS) $(tpow_ui_LDADD) $(LIBS)
tpow_z$(EXEEXT): $(tpow_z_OBJECTS) $(tpow_z_DEPENDENCIES) $(EXTRA_tpow_z_DEPENDENCIES)
@rm -f tpow_z$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tpow_z_OBJECTS) $(tpow_z_LDADD) $(LIBS)
tprec$(EXEEXT): $(tprec_OBJECTS) $(tprec_DEPENDENCIES) $(EXTRA_tprec_DEPENDENCIES)
@rm -f tprec$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tprec_OBJECTS) $(tprec_LDADD) $(LIBS)
tproj$(EXEEXT): $(tproj_OBJECTS) $(tproj_DEPENDENCIES) $(EXTRA_tproj_DEPENDENCIES)
@rm -f tproj$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tproj_OBJECTS) $(tproj_LDADD) $(LIBS)
treal$(EXEEXT): $(treal_OBJECTS) $(treal_DEPENDENCIES) $(EXTRA_treal_DEPENDENCIES)
@rm -f treal$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(treal_OBJECTS) $(treal_LDADD) $(LIBS)
treimref$(EXEEXT): $(treimref_OBJECTS) $(treimref_DEPENDENCIES) $(EXTRA_treimref_DEPENDENCIES)
@rm -f treimref$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(treimref_OBJECTS) $(treimref_LDADD) $(LIBS)
trootofunity$(EXEEXT): $(trootofunity_OBJECTS) $(trootofunity_DEPENDENCIES) $(EXTRA_trootofunity_DEPENDENCIES)
@rm -f trootofunity$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(trootofunity_OBJECTS) $(trootofunity_LDADD) $(LIBS)
tset$(EXEEXT): $(tset_OBJECTS) $(tset_DEPENDENCIES) $(EXTRA_tset_DEPENDENCIES)
@rm -f tset$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tset_OBJECTS) $(tset_LDADD) $(LIBS)
tsin$(EXEEXT): $(tsin_OBJECTS) $(tsin_DEPENDENCIES) $(EXTRA_tsin_DEPENDENCIES)
@rm -f tsin$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tsin_OBJECTS) $(tsin_LDADD) $(LIBS)
tsin_cos$(EXEEXT): $(tsin_cos_OBJECTS) $(tsin_cos_DEPENDENCIES) $(EXTRA_tsin_cos_DEPENDENCIES)
@rm -f tsin_cos$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tsin_cos_OBJECTS) $(tsin_cos_LDADD) $(LIBS)
tsinh$(EXEEXT): $(tsinh_OBJECTS) $(tsinh_DEPENDENCIES) $(EXTRA_tsinh_DEPENDENCIES)
@rm -f tsinh$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tsinh_OBJECTS) $(tsinh_LDADD) $(LIBS)
tsqr$(EXEEXT): $(tsqr_OBJECTS) $(tsqr_DEPENDENCIES) $(EXTRA_tsqr_DEPENDENCIES)
@rm -f tsqr$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tsqr_OBJECTS) $(tsqr_LDADD) $(LIBS)
tsqrt$(EXEEXT): $(tsqrt_OBJECTS) $(tsqrt_DEPENDENCIES) $(EXTRA_tsqrt_DEPENDENCIES)
@rm -f tsqrt$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tsqrt_OBJECTS) $(tsqrt_LDADD) $(LIBS)
tstrtoc$(EXEEXT): $(tstrtoc_OBJECTS) $(tstrtoc_DEPENDENCIES) $(EXTRA_tstrtoc_DEPENDENCIES)
@rm -f tstrtoc$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tstrtoc_OBJECTS) $(tstrtoc_LDADD) $(LIBS)
tsub$(EXEEXT): $(tsub_OBJECTS) $(tsub_DEPENDENCIES) $(EXTRA_tsub_DEPENDENCIES)
@rm -f tsub$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tsub_OBJECTS) $(tsub_LDADD) $(LIBS)
tsub_fr$(EXEEXT): $(tsub_fr_OBJECTS) $(tsub_fr_DEPENDENCIES) $(EXTRA_tsub_fr_DEPENDENCIES)
@rm -f tsub_fr$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tsub_fr_OBJECTS) $(tsub_fr_LDADD) $(LIBS)
tsub_ui$(EXEEXT): $(tsub_ui_OBJECTS) $(tsub_ui_DEPENDENCIES) $(EXTRA_tsub_ui_DEPENDENCIES)
@rm -f tsub_ui$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tsub_ui_OBJECTS) $(tsub_ui_LDADD) $(LIBS)
tswap$(EXEEXT): $(tswap_OBJECTS) $(tswap_DEPENDENCIES) $(EXTRA_tswap_DEPENDENCIES)
@rm -f tswap$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tswap_OBJECTS) $(tswap_LDADD) $(LIBS)
ttan$(EXEEXT): $(ttan_OBJECTS) $(ttan_DEPENDENCIES) $(EXTRA_ttan_DEPENDENCIES)
@rm -f ttan$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(ttan_OBJECTS) $(ttan_LDADD) $(LIBS)
ttanh$(EXEEXT): $(ttanh_OBJECTS) $(ttanh_DEPENDENCIES) $(EXTRA_ttanh_DEPENDENCIES)
@rm -f ttanh$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(ttanh_OBJECTS) $(ttanh_LDADD) $(LIBS)
tui_div$(EXEEXT): $(tui_div_OBJECTS) $(tui_div_DEPENDENCIES) $(EXTRA_tui_div_DEPENDENCIES)
@rm -f tui_div$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tui_div_OBJECTS) $(tui_div_LDADD) $(LIBS)
tui_ui_sub$(EXEEXT): $(tui_ui_sub_OBJECTS) $(tui_ui_sub_DEPENDENCIES) $(EXTRA_tui_ui_sub_DEPENDENCIES)
@rm -f tui_ui_sub$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tui_ui_sub_OBJECTS) $(tui_ui_sub_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_data.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clear_parameters.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close_datafile.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/comparisons.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy_parameter.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/double_rounding.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exceptions.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init_parameters.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mpfr_flags.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open_datafile.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_parameter.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read_data.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read_description.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read_line.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rounding.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setprec_parameters.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tabs.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tacos.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tacosh.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tadd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tadd_fr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tadd_si.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tadd_ui.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/targ.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tasin.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tasinh.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tatan.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tatanh.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcmp_abs.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tconj.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcos.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcosh.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdiv.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdiv_2si.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdiv_2ui.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdiv_fr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tdiv_ui.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfma.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfr_div.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfr_sub.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tget_version.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timag.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tio_str.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlog.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlog10.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmul.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmul_2si.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmul_2ui.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmul_fr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmul_i.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmul_si.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmul_ui.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tneg.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tnorm.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tpl_gmp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tpl_mpc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tpl_mpfr.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tpl_native.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tpow.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tpow_d.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tpow_fr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tpow_ld.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tpow_si.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tpow_ui.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tpow_z.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tprec.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tproj.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/treal.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/treimref.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trootofunity.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tset.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsin.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsin_cos.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsinh.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsqr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsqrt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tstrtoc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsub.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsub_fr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tsub_ui.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tswap.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttan.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ttanh.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tui_div.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tui_ui_sub.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-am
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
$(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: ctags-am
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-am
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
# Recover from deleted '.trs' file; this should ensure that
# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
# to avoid problems with "make -n".
.log.trs:
rm -f $< $@
$(MAKE) $(AM_MAKEFLAGS) $<
# Leading 'am--fnord' is there to ensure the list of targets does not
# expand to empty, as could happen e.g. with make check TESTS=''.
am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
am--force-recheck:
@:
$(TEST_SUITE_LOG): $(TEST_LOGS)
@$(am__set_TESTS_bases); \
am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
redo_bases=`for i in $$bases; do \
am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
done`; \
if test -n "$$redo_bases"; then \
redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
if $(am__make_dryrun); then :; else \
rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
fi; \
fi; \
if test -n "$$am__remaking_logs"; then \
echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
"recursion detected" >&2; \
elif test -n "$$redo_logs"; then \
am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
fi; \
if $(am__make_dryrun); then :; else \
st=0; \
errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
for i in $$redo_bases; do \
test -f $$i.trs && test -r $$i.trs \
|| { echo "$$errmsg $$i.trs" >&2; st=1; }; \
test -f $$i.log && test -r $$i.log \
|| { echo "$$errmsg $$i.log" >&2; st=1; }; \
done; \
test $$st -eq 0 || exit 1; \
fi
@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
ws='[ ]'; \
results=`for b in $$bases; do echo $$b.trs; done`; \
test -n "$$results" || results=/dev/null; \
all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
if test `expr $$fail + $$xpass + $$error` -eq 0; then \
success=true; \
else \
success=false; \
fi; \
br='==================='; br=$$br$$br$$br$$br; \
result_count () \
{ \
if test x"$$1" = x"--maybe-color"; then \
maybe_colorize=yes; \
elif test x"$$1" = x"--no-color"; then \
maybe_colorize=no; \
else \
echo "$@: invalid 'result_count' usage" >&2; exit 4; \
fi; \
shift; \
desc=$$1 count=$$2; \
if test $$maybe_colorize = yes && test $$count -gt 0; then \
color_start=$$3 color_end=$$std; \
else \
color_start= color_end=; \
fi; \
echo "$${color_start}# $$desc $$count$${color_end}"; \
}; \
create_testsuite_report () \
{ \
result_count $$1 "TOTAL:" $$all "$$brg"; \
result_count $$1 "PASS: " $$pass "$$grn"; \
result_count $$1 "SKIP: " $$skip "$$blu"; \
result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
result_count $$1 "FAIL: " $$fail "$$red"; \
result_count $$1 "XPASS:" $$xpass "$$red"; \
result_count $$1 "ERROR:" $$error "$$mgn"; \
}; \
{ \
echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
$(am__rst_title); \
create_testsuite_report --no-color; \
echo; \
echo ".. contents:: :depth: 2"; \
echo; \
for b in $$bases; do echo $$b; done \
| $(am__create_global_log); \
} >$(TEST_SUITE_LOG).tmp || exit 1; \
mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
if $$success; then \
col="$$grn"; \
else \
col="$$red"; \
test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
fi; \
echo "$${col}$$br$${std}"; \
echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
echo "$${col}$$br$${std}"; \
create_testsuite_report --maybe-color; \
echo "$$col$$br$$std"; \
if $$success; then :; else \
echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
if test -n "$(PACKAGE_BUGREPORT)"; then \
echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
fi; \
echo "$$col$$br$$std"; \
fi; \
$$success || exit 1
check-TESTS:
@list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
@set +e; $(am__set_TESTS_bases); \
log_list=`for i in $$bases; do echo $$i.log; done`; \
trs_list=`for i in $$bases; do echo $$i.trs; done`; \
log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
exit $$?;
recheck: all $(check_LTLIBRARIES) $(check_PROGRAMS)
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
@set +e; $(am__set_TESTS_bases); \
bases=`for i in $$bases; do echo $$i; done \
| $(am__list_recheck_tests)` || exit 1; \
log_list=`for i in $$bases; do echo $$i.log; done`; \
log_list=`echo $$log_list`; \
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
am__force_recheck=am--force-recheck \
TEST_LOGS="$$log_list"; \
exit $$?
tabs.log: tabs$(EXEEXT)
@p='tabs$(EXEEXT)'; \
b='tabs'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tacos.log: tacos$(EXEEXT)
@p='tacos$(EXEEXT)'; \
b='tacos'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tacosh.log: tacosh$(EXEEXT)
@p='tacosh$(EXEEXT)'; \
b='tacosh'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tadd.log: tadd$(EXEEXT)
@p='tadd$(EXEEXT)'; \
b='tadd'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tadd_fr.log: tadd_fr$(EXEEXT)
@p='tadd_fr$(EXEEXT)'; \
b='tadd_fr'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tadd_si.log: tadd_si$(EXEEXT)
@p='tadd_si$(EXEEXT)'; \
b='tadd_si'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tadd_ui.log: tadd_ui$(EXEEXT)
@p='tadd_ui$(EXEEXT)'; \
b='tadd_ui'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
targ.log: targ$(EXEEXT)
@p='targ$(EXEEXT)'; \
b='targ'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tasin.log: tasin$(EXEEXT)
@p='tasin$(EXEEXT)'; \
b='tasin'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tasinh.log: tasinh$(EXEEXT)
@p='tasinh$(EXEEXT)'; \
b='tasinh'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tatan.log: tatan$(EXEEXT)
@p='tatan$(EXEEXT)'; \
b='tatan'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tatanh.log: tatanh$(EXEEXT)
@p='tatanh$(EXEEXT)'; \
b='tatanh'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tcmp_abs.log: tcmp_abs$(EXEEXT)
@p='tcmp_abs$(EXEEXT)'; \
b='tcmp_abs'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tconj.log: tconj$(EXEEXT)
@p='tconj$(EXEEXT)'; \
b='tconj'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tcos.log: tcos$(EXEEXT)
@p='tcos$(EXEEXT)'; \
b='tcos'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tcosh.log: tcosh$(EXEEXT)
@p='tcosh$(EXEEXT)'; \
b='tcosh'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tdiv.log: tdiv$(EXEEXT)
@p='tdiv$(EXEEXT)'; \
b='tdiv'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tdiv_2si.log: tdiv_2si$(EXEEXT)
@p='tdiv_2si$(EXEEXT)'; \
b='tdiv_2si'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tdiv_2ui.log: tdiv_2ui$(EXEEXT)
@p='tdiv_2ui$(EXEEXT)'; \
b='tdiv_2ui'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tdiv_fr.log: tdiv_fr$(EXEEXT)
@p='tdiv_fr$(EXEEXT)'; \
b='tdiv_fr'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tdiv_ui.log: tdiv_ui$(EXEEXT)
@p='tdiv_ui$(EXEEXT)'; \
b='tdiv_ui'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
texp.log: texp$(EXEEXT)
@p='texp$(EXEEXT)'; \
b='texp'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tfma.log: tfma$(EXEEXT)
@p='tfma$(EXEEXT)'; \
b='tfma'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tfr_div.log: tfr_div$(EXEEXT)
@p='tfr_div$(EXEEXT)'; \
b='tfr_div'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tfr_sub.log: tfr_sub$(EXEEXT)
@p='tfr_sub$(EXEEXT)'; \
b='tfr_sub'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
timag.log: timag$(EXEEXT)
@p='timag$(EXEEXT)'; \
b='timag'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tio_str.log: tio_str$(EXEEXT)
@p='tio_str$(EXEEXT)'; \
b='tio_str'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tlog.log: tlog$(EXEEXT)
@p='tlog$(EXEEXT)'; \
b='tlog'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tlog10.log: tlog10$(EXEEXT)
@p='tlog10$(EXEEXT)'; \
b='tlog10'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tmul.log: tmul$(EXEEXT)
@p='tmul$(EXEEXT)'; \
b='tmul'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tmul_2si.log: tmul_2si$(EXEEXT)
@p='tmul_2si$(EXEEXT)'; \
b='tmul_2si'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tmul_2ui.log: tmul_2ui$(EXEEXT)
@p='tmul_2ui$(EXEEXT)'; \
b='tmul_2ui'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tmul_fr.log: tmul_fr$(EXEEXT)
@p='tmul_fr$(EXEEXT)'; \
b='tmul_fr'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tmul_i.log: tmul_i$(EXEEXT)
@p='tmul_i$(EXEEXT)'; \
b='tmul_i'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tmul_si.log: tmul_si$(EXEEXT)
@p='tmul_si$(EXEEXT)'; \
b='tmul_si'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tmul_ui.log: tmul_ui$(EXEEXT)
@p='tmul_ui$(EXEEXT)'; \
b='tmul_ui'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tneg.log: tneg$(EXEEXT)
@p='tneg$(EXEEXT)'; \
b='tneg'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tnorm.log: tnorm$(EXEEXT)
@p='tnorm$(EXEEXT)'; \
b='tnorm'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tpow.log: tpow$(EXEEXT)
@p='tpow$(EXEEXT)'; \
b='tpow'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tpow_d.log: tpow_d$(EXEEXT)
@p='tpow_d$(EXEEXT)'; \
b='tpow_d'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tpow_fr.log: tpow_fr$(EXEEXT)
@p='tpow_fr$(EXEEXT)'; \
b='tpow_fr'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tpow_ld.log: tpow_ld$(EXEEXT)
@p='tpow_ld$(EXEEXT)'; \
b='tpow_ld'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tpow_si.log: tpow_si$(EXEEXT)
@p='tpow_si$(EXEEXT)'; \
b='tpow_si'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tpow_ui.log: tpow_ui$(EXEEXT)
@p='tpow_ui$(EXEEXT)'; \
b='tpow_ui'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tpow_z.log: tpow_z$(EXEEXT)
@p='tpow_z$(EXEEXT)'; \
b='tpow_z'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tprec.log: tprec$(EXEEXT)
@p='tprec$(EXEEXT)'; \
b='tprec'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tproj.log: tproj$(EXEEXT)
@p='tproj$(EXEEXT)'; \
b='tproj'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
treal.log: treal$(EXEEXT)
@p='treal$(EXEEXT)'; \
b='treal'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
treimref.log: treimref$(EXEEXT)
@p='treimref$(EXEEXT)'; \
b='treimref'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
trootofunity.log: trootofunity$(EXEEXT)
@p='trootofunity$(EXEEXT)'; \
b='trootofunity'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tset.log: tset$(EXEEXT)
@p='tset$(EXEEXT)'; \
b='tset'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tsin.log: tsin$(EXEEXT)
@p='tsin$(EXEEXT)'; \
b='tsin'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tsin_cos.log: tsin_cos$(EXEEXT)
@p='tsin_cos$(EXEEXT)'; \
b='tsin_cos'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tsinh.log: tsinh$(EXEEXT)
@p='tsinh$(EXEEXT)'; \
b='tsinh'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tsqr.log: tsqr$(EXEEXT)
@p='tsqr$(EXEEXT)'; \
b='tsqr'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tsqrt.log: tsqrt$(EXEEXT)
@p='tsqrt$(EXEEXT)'; \
b='tsqrt'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tstrtoc.log: tstrtoc$(EXEEXT)
@p='tstrtoc$(EXEEXT)'; \
b='tstrtoc'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tsub.log: tsub$(EXEEXT)
@p='tsub$(EXEEXT)'; \
b='tsub'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tsub_fr.log: tsub_fr$(EXEEXT)
@p='tsub_fr$(EXEEXT)'; \
b='tsub_fr'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tsub_ui.log: tsub_ui$(EXEEXT)
@p='tsub_ui$(EXEEXT)'; \
b='tsub_ui'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tswap.log: tswap$(EXEEXT)
@p='tswap$(EXEEXT)'; \
b='tswap'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
ttan.log: ttan$(EXEEXT)
@p='ttan$(EXEEXT)'; \
b='ttan'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
ttanh.log: ttanh$(EXEEXT)
@p='ttanh$(EXEEXT)'; \
b='ttanh'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tui_div.log: tui_div$(EXEEXT)
@p='tui_div$(EXEEXT)'; \
b='tui_div'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tui_ui_sub.log: tui_ui_sub$(EXEEXT)
@p='tui_ui_sub$(EXEEXT)'; \
b='tui_ui_sub'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
tget_version.log: tget_version$(EXEEXT)
@p='tget_version$(EXEEXT)'; \
b='tget_version'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
exceptions.log: exceptions$(EXEEXT)
@p='exceptions$(EXEEXT)'; \
b='exceptions'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
.test.log:
@p='$<'; \
$(am__set_b); \
$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
@am__EXEEXT_TRUE@.test$(EXEEXT).log:
@am__EXEEXT_TRUE@ @p='$<'; \
@am__EXEEXT_TRUE@ $(am__set_b); \
@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES) $(check_PROGRAMS)
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
-test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-checkLTLIBRARIES clean-checkPROGRAMS clean-generic \
clean-libtool mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: check-am install-am install-strip
.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \
clean-checkLTLIBRARIES clean-checkPROGRAMS clean-generic \
clean-libtool cscopelist-am ctags ctags-am distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am recheck tags tags-am uninstall \
uninstall-am
.PRECIOUS: Makefile
# 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.
.NOEXPORT:
mpc-1.1.0/tests/clear_parameters.c 0000644 0001751 0001751 00000003544 12471661720 014046 0000000 0000000 /* clear_parameters -- Deallocate memory for function parameters.
Copyright (C) 2012, 2013, 2014 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
static void
clear_param (mpc_operand_t* p, mpc_param_t t)
{
switch (t)
{
case NATIVE_INT:
case NATIVE_UL:
case NATIVE_L:
case NATIVE_D:
break;
case GMP_Z:
mpz_clear (p->mpz);
break;
case GMP_Q:
mpq_clear (p->mpq);
break;
case GMP_F:
mpf_clear (p->mpf);
break;
case MPFR_INEX:
break;
case MPFR:
mpfr_clear (p->mpfr);
break;
case MPC_INEX:
case MPCC_INEX:
break;
case MPC:
mpc_clear (p->mpc);
break;
case MPFR_RND:
case MPC_RND:
break;
default:
fprintf (stderr, "clear_parameters: unsupported type.\n");
exit (1);
}
}
void
clear_parameters (mpc_fun_param_t *params)
{
int in, out;
int total = params->nbout + params->nbin;
free (params->name);
for (out = 0; out < params->nbout; out++)
{
clear_param (&(params->P[out]), params->T[out]);
clear_param (&(params->P[total + out]), params->T[out]);
}
for (in = params->nbout; in < total; in++)
{
clear_param (&(params->P[in]), params->T[in]);
}
}
mpc-1.1.0/tests/pow.dsc 0000644 0001751 0001751 00000001565 12471661720 011672 0000000 0000000 # Description file for mpc_pow
#
# Copyright (C) 2012 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_pow
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/ttan.c 0000644 0001751 0001751 00000014140 12471661720 011475 0000000 0000000 /* ttan -- test file for mpc_tan.
Copyright (C) 2008, 2011, 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include
#include "mpc-tests.h"
static void
pure_real_argument (void)
{
/* tan(x -i*0) = tan(x) -i*0 */
/* tan(x +i*0) = tan(x) +i*0 */
mpfr_t x;
mpfr_t tan_x;
mpc_t z;
mpc_t tan_z;
mpfr_init2 (x, 79);
mpfr_init2 (tan_x, 113);
mpc_init2 (z, 79);
mpc_init2 (tan_z, 113);
/* tan(1 +i*0) = tan(1) +i*0 */
mpc_set_ui_ui (z, 1, 0, MPC_RNDNN);
mpfr_set_ui (x, 1, MPFR_RNDN);
mpfr_tan (tan_x, x, MPFR_RNDN);
mpc_tan (tan_z, z, MPC_RNDNN);
if (mpfr_cmp (mpc_realref (tan_z), tan_x) != 0
|| !mpfr_zero_p (mpc_imagref (tan_z)) || mpfr_signbit (mpc_imagref (tan_z)))
{
printf ("mpc_tan(1 + i * 0) failed\n");
exit (1);
}
/* tan(1 -i*0) = tan(1) -i*0 */
mpc_conj (z, z, MPC_RNDNN);
mpc_tan (tan_z, z, MPC_RNDNN);
if (mpfr_cmp (mpc_realref (tan_z), tan_x) != 0
|| !mpfr_zero_p (mpc_imagref (tan_z)) || !mpfr_signbit (mpc_imagref (tan_z)))
{
printf ("mpc_tan(1 - i * 0) failed\n");
exit (1);
}
/* tan(Pi/2 +i*0) = +Inf +i*0 */
mpfr_const_pi (x, MPFR_RNDN);
mpfr_div_2ui (x, x, 1, MPFR_RNDN);
mpfr_set (mpc_realref (z), x, MPFR_RNDN);
mpfr_set_ui (mpc_imagref (z), 0, MPFR_RNDN);
mpfr_tan (tan_x, x, MPFR_RNDN);
mpc_tan (tan_z, z, MPC_RNDNN);
if (mpfr_cmp (mpc_realref (tan_z), tan_x) != 0
|| !mpfr_zero_p (mpc_imagref (tan_z)) || mpfr_signbit (mpc_imagref (tan_z)))
{
printf ("mpc_tan(Pi/2 + i * 0) failed\n");
exit (1);
}
/* tan(Pi/2 -i*0) = +Inf -i*0 */
mpc_conj (z, z, MPC_RNDNN);
mpc_tan (tan_z, z, MPC_RNDNN);
if (mpfr_cmp (mpc_realref (tan_z), tan_x) != 0
|| !mpfr_zero_p (mpc_imagref (tan_z)) || !mpfr_signbit (mpc_imagref (tan_z)))
{
printf ("mpc_tan(Pi/2 - i * 0) failed\n");
exit (1);
}
/* tan(-Pi/2 +i*0) = -Inf +i*0 */
mpfr_neg (x, x, MPFR_RNDN);
mpc_neg (z, z, MPC_RNDNN);
mpfr_tan (tan_x, x, MPFR_RNDN);
mpc_tan (tan_z, z, MPC_RNDNN);
if (mpfr_cmp (mpc_realref (tan_z), tan_x) != 0
|| !mpfr_zero_p (mpc_imagref (tan_z)) || mpfr_signbit (mpc_imagref (tan_z)))
{
printf ("mpc_tan(-Pi/2 + i * 0) failed\n");
exit (1);
}
/* tan(-Pi/2 -i*0) = -Inf -i*0 */
mpc_conj (z, z, MPC_RNDNN);
mpc_tan (tan_z, z, MPC_RNDNN);
if (mpfr_cmp (mpc_realref (tan_z), tan_x) != 0
|| !mpfr_zero_p (mpc_imagref (tan_z)) || !mpfr_signbit (mpc_imagref (tan_z)))
{
printf ("mpc_tan(-Pi/2 - i * 0) failed\n");
exit (1);
}
mpc_clear (tan_z);
mpc_clear (z);
mpfr_clear (tan_x);
mpfr_clear (x);
}
static void
pure_imaginary_argument (void)
{
/* tan(-0 +i*y) = -0 +i*tanh(y) */
/* tan(+0 +i*y) = +0 +i*tanh(y) */
mpfr_t y;
mpfr_t tanh_y;
mpc_t z;
mpc_t tan_z;
mpfr_prec_t prec = (mpfr_prec_t) 111;
mpfr_init2 (y, 2);
mpfr_init2 (tanh_y, prec);
mpc_init2 (z, 2);
mpc_init2 (tan_z, prec);
/* tan(0 +i) = +0 +i*tanh(1) */
mpc_set_ui_ui (z, 0, 1, MPC_RNDNN);
mpfr_set_ui (y, 1, MPFR_RNDN);
mpfr_tanh (tanh_y, y, MPFR_RNDN);
mpc_tan (tan_z, z, MPC_RNDNN);
if (mpfr_cmp (mpc_imagref (tan_z), tanh_y) != 0
|| !mpfr_zero_p (mpc_realref (tan_z)) || mpfr_signbit (mpc_realref (tan_z)))
{
mpc_t c99;
mpc_init2 (c99, prec);
mpfr_set_ui (mpc_realref (c99), 0, MPFR_RNDN);
mpfr_set (mpc_imagref (c99), tanh_y, MPFR_RNDN);
TEST_FAILED ("mpc_tan", z, tan_z, c99, MPC_RNDNN);
}
/* tan(0 -i) = +0 +i*tanh(-1) */
mpc_conj (z, z, MPC_RNDNN);
mpfr_neg (tanh_y, tanh_y, MPFR_RNDN);
mpc_tan (tan_z, z, MPC_RNDNN);
if (mpfr_cmp (mpc_imagref (tan_z), tanh_y) != 0
|| !mpfr_zero_p (mpc_realref (tan_z)) || mpfr_signbit (mpc_realref (tan_z)))
{
mpc_t c99;
mpc_init2 (c99, prec);
mpfr_set_ui (mpc_realref (c99), 0, MPFR_RNDN);
mpfr_set (mpc_imagref (c99), tanh_y, MPFR_RNDN);
TEST_FAILED ("mpc_tan", z, tan_z, c99, MPC_RNDNN);
}
/* tan(-0 +i) = -0 +i*tanh(1) */
mpc_neg (z, z, MPC_RNDNN);
mpfr_neg (tanh_y, tanh_y, MPFR_RNDN);
mpc_tan (tan_z, z, MPC_RNDNN);
if (mpfr_cmp (mpc_imagref (tan_z), tanh_y) != 0
|| !mpfr_zero_p (mpc_realref (tan_z)) || !mpfr_signbit (mpc_realref (tan_z)))
{
mpc_t c99;
mpc_init2 (c99, prec);
mpfr_set_ui (mpc_realref (c99), 0, MPFR_RNDN);
mpfr_set (mpc_imagref (c99), tanh_y, MPFR_RNDN);
TEST_FAILED ("mpc_tan", z, tan_z, c99, MPC_RNDNN);
}
/* tan(-0 -i) = -0 +i*tanh(-1) */
mpc_conj (z, z, MPC_RNDNN);
mpfr_neg (tanh_y, tanh_y, MPFR_RNDN);
mpc_tan (tan_z, z, MPC_RNDNN);
if (mpfr_cmp (mpc_imagref (tan_z), tanh_y) != 0
|| !mpfr_zero_p (mpc_realref (tan_z)) || !mpfr_signbit (mpc_realref (tan_z)))
{
mpc_t c99;
mpc_init2 (c99, prec);
mpfr_set_ui (mpc_realref (c99), 0, MPFR_RNDN);
mpfr_set (mpc_imagref (c99), tanh_y, MPFR_RNDN);
TEST_FAILED ("mpc_tan", z, tan_z, c99, MPC_RNDNN);
}
mpc_clear (tan_z);
mpc_clear (z);
mpfr_clear (tanh_y);
mpfr_clear (y);
}
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_tan (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_tan (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("tan.dsc", "tan.dat");
tgeneric_template ("tan.dsc", 2, 512, 7, 4);
/* FIXME: remove them? */
pure_real_argument ();
pure_imaginary_argument ();
test_end ();
return 0;
}
mpc-1.1.0/tests/tan.dsc 0000644 0001751 0001751 00000001503 12471661720 011637 0000000 0000000 # Description file for mpc_tan
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_tan
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/div.dat 0000644 0001751 0001751 00000377540 12720536532 011656 0000000 0000000 # Data file for mpc_div.
#
# Copyright (C) 2008, 2009, 2010, 2011, 2012 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# For explanations on the file format, see add.dat.
# special values
0 0 7 nan 7 nan 7 -inf 7 -inf 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 -1 7 -inf N N
0 0 7 +inf 7 nan 7 -inf 7 -inf 7 -1 7 -1 N N
0 0 7 +inf 7 +inf 7 -inf 7 -inf 7 -1 7 -0 N N
0 0 7 +inf 7 +inf 7 -inf 7 -inf 7 -1 7 +0 N N
0 0 7 nan 7 +inf 7 -inf 7 -inf 7 -1 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 -1 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 -0 7 -inf N N
0 0 7 +inf 7 -inf 7 -inf 7 -inf 7 -0 7 -1 N N
0 0 7 +inf 7 +inf 7 -inf 7 -inf 7 -0 7 -0 N N
0 0 7 +inf 7 +inf 7 -inf 7 -inf 7 -0 7 +0 N N
0 0 7 -inf 7 +inf 7 -inf 7 -inf 7 -0 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 -0 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 +0 7 -inf N N
0 0 7 +inf 7 -inf 7 -inf 7 -inf 7 +0 7 -1 N N
0 0 7 -inf 7 -inf 7 -inf 7 -inf 7 +0 7 -0 N N
0 0 7 -inf 7 -inf 7 -inf 7 -inf 7 +0 7 +0 N N
0 0 7 -inf 7 +inf 7 -inf 7 -inf 7 +0 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 +0 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 1 7 -inf N N
0 0 7 nan 7 -inf 7 -inf 7 -inf 7 1 7 -1 N N
0 0 7 -inf 7 -inf 7 -inf 7 -inf 7 1 7 -0 N N
0 0 7 -inf 7 -inf 7 -inf 7 -inf 7 1 7 +0 N N
0 0 7 -inf 7 nan 7 -inf 7 -inf 7 1 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 1 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 nan 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -inf 7 nan 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 -1 7 -inf N N
0 0 7 +inf 7 -inf 7 -inf 7 -1 7 -1 7 -1 N N
0 0 7 +inf 7 nan 7 -inf 7 -1 7 -1 7 -0 N N
0 0 7 +inf 7 nan 7 -inf 7 -1 7 -1 7 +0 N N
0 0 7 +inf 7 +inf 7 -inf 7 -1 7 -1 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 -1 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 -0 7 -inf N N
0 0 7 nan 7 -inf 7 -inf 7 -1 7 -0 7 -1 N N
0 0 7 +inf 7 +inf 7 -inf 7 -1 7 -0 7 -0 N N
0 0 7 +inf 7 +inf 7 -inf 7 -1 7 -0 7 +0 N N
0 0 7 nan 7 +inf 7 -inf 7 -1 7 -0 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 -0 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 +0 7 -inf N N
0 0 7 nan 7 -inf 7 -inf 7 -1 7 +0 7 -1 N N
0 0 7 -inf 7 -inf 7 -inf 7 -1 7 +0 7 -0 N N
0 0 7 -inf 7 -inf 7 -inf 7 -1 7 +0 7 +0 N N
0 0 7 nan 7 +inf 7 -inf 7 -1 7 +0 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 +0 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 1 7 -inf N N
0 0 7 -inf 7 -inf 7 -inf 7 -1 7 1 7 -1 N N
0 0 7 -inf 7 nan 7 -inf 7 -1 7 1 7 -0 N N
0 0 7 -inf 7 nan 7 -inf 7 -1 7 1 7 +0 N N
0 0 7 -inf 7 +inf 7 -inf 7 -1 7 1 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 1 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 nan 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -1 7 nan 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 -1 7 -inf N N
0 0 7 +inf 7 -inf 7 -inf 7 -0 7 -1 7 -1 N N
0 0 7 +inf 7 nan 7 -inf 7 -0 7 -1 7 -0 N N
0 0 7 +inf 7 nan 7 -inf 7 -0 7 -1 7 +0 N N
0 0 7 +inf 7 +inf 7 -inf 7 -0 7 -1 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 -1 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 -0 7 -inf N N
0 0 7 nan 7 -inf 7 -inf 7 -0 7 -0 7 -1 N N
0 0 7 +inf 7 nan 7 -inf 7 -0 7 -0 7 -0 N N
0 0 7 +inf 7 nan 7 -inf 7 -0 7 -0 7 +0 N N
0 0 7 nan 7 +inf 7 -inf 7 -0 7 -0 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 -0 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 +0 7 -inf N N
0 0 7 nan 7 -inf 7 -inf 7 -0 7 +0 7 -1 N N
0 0 7 -inf 7 nan 7 -inf 7 -0 7 +0 7 -0 N N
0 0 7 -inf 7 nan 7 -inf 7 -0 7 +0 7 +0 N N
0 0 7 nan 7 +inf 7 -inf 7 -0 7 +0 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 +0 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 1 7 -inf N N
0 0 7 -inf 7 -inf 7 -inf 7 -0 7 1 7 -1 N N
0 0 7 -inf 7 nan 7 -inf 7 -0 7 1 7 -0 N N
0 0 7 -inf 7 nan 7 -inf 7 -0 7 1 7 +0 N N
0 0 7 -inf 7 +inf 7 -inf 7 -0 7 1 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 1 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 nan 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 -0 7 nan 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 -1 7 -inf N N
0 0 7 +inf 7 -inf 7 -inf 7 +0 7 -1 7 -1 N N
0 0 7 +inf 7 nan 7 -inf 7 +0 7 -1 7 -0 N N
0 0 7 +inf 7 nan 7 -inf 7 +0 7 -1 7 +0 N N
0 0 7 +inf 7 +inf 7 -inf 7 +0 7 -1 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 -1 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 -0 7 -inf N N
0 0 7 nan 7 -inf 7 -inf 7 +0 7 -0 7 -1 N N
0 0 7 +inf 7 nan 7 -inf 7 +0 7 -0 7 -0 N N
0 0 7 +inf 7 nan 7 -inf 7 +0 7 -0 7 +0 N N
0 0 7 nan 7 +inf 7 -inf 7 +0 7 -0 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 -0 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 +0 7 -inf N N
0 0 7 nan 7 -inf 7 -inf 7 +0 7 +0 7 -1 N N
0 0 7 -inf 7 nan 7 -inf 7 +0 7 +0 7 -0 N N
0 0 7 -inf 7 nan 7 -inf 7 +0 7 +0 7 +0 N N
0 0 7 nan 7 +inf 7 -inf 7 +0 7 +0 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 +0 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 1 7 -inf N N
0 0 7 -inf 7 -inf 7 -inf 7 +0 7 1 7 -1 N N
0 0 7 -inf 7 nan 7 -inf 7 +0 7 1 7 -0 N N
0 0 7 -inf 7 nan 7 -inf 7 +0 7 1 7 +0 N N
0 0 7 -inf 7 +inf 7 -inf 7 +0 7 1 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 1 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 nan 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 +0 7 nan 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 1 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 1 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 1 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 1 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 1 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 1 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 1 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 1 7 -1 7 -inf N N
0 0 7 +inf 7 -inf 7 -inf 7 1 7 -1 7 -1 N N
0 0 7 +inf 7 nan 7 -inf 7 1 7 -1 7 -0 N N
0 0 7 +inf 7 nan 7 -inf 7 1 7 -1 7 +0 N N
0 0 7 +inf 7 +inf 7 -inf 7 1 7 -1 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 1 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 1 7 -1 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 1 7 -0 7 -inf N N
0 0 7 nan 7 -inf 7 -inf 7 1 7 -0 7 -1 N N
0 0 7 +inf 7 -inf 7 -inf 7 1 7 -0 7 -0 N N
0 0 7 +inf 7 -inf 7 -inf 7 1 7 -0 7 +0 N N
0 0 7 nan 7 +inf 7 -inf 7 1 7 -0 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 1 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 1 7 -0 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 1 7 +0 7 -inf N N
0 0 7 nan 7 -inf 7 -inf 7 1 7 +0 7 -1 N N
0 0 7 -inf 7 +inf 7 -inf 7 1 7 +0 7 -0 N N
0 0 7 -inf 7 +inf 7 -inf 7 1 7 +0 7 +0 N N
0 0 7 nan 7 +inf 7 -inf 7 1 7 +0 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 1 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 1 7 +0 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 1 7 1 7 -inf N N
0 0 7 -inf 7 -inf 7 -inf 7 1 7 1 7 -1 N N
0 0 7 -inf 7 nan 7 -inf 7 1 7 1 7 -0 N N
0 0 7 -inf 7 nan 7 -inf 7 1 7 1 7 +0 N N
0 0 7 -inf 7 +inf 7 -inf 7 1 7 1 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 1 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 1 7 1 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 1 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 1 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 1 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 1 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 1 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 1 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 1 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 1 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 1 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 1 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 1 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 1 7 nan 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 1 7 nan 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 -1 7 -inf N N
0 0 7 nan 7 -inf 7 -inf 7 +inf 7 -1 7 -1 N N
0 0 7 +inf 7 -inf 7 -inf 7 +inf 7 -1 7 -0 N N
0 0 7 +inf 7 -inf 7 -inf 7 +inf 7 -1 7 +0 N N
0 0 7 +inf 7 nan 7 -inf 7 +inf 7 -1 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 -1 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 -0 7 -inf N N
0 0 7 -inf 7 -inf 7 -inf 7 +inf 7 -0 7 -1 N N
0 0 7 +inf 7 -inf 7 -inf 7 +inf 7 -0 7 -0 N N
0 0 7 +inf 7 -inf 7 -inf 7 +inf 7 -0 7 +0 N N
0 0 7 +inf 7 +inf 7 -inf 7 +inf 7 -0 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 -0 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 +0 7 -inf N N
0 0 7 -inf 7 -inf 7 -inf 7 +inf 7 +0 7 -1 N N
0 0 7 -inf 7 +inf 7 -inf 7 +inf 7 +0 7 -0 N N
0 0 7 -inf 7 +inf 7 -inf 7 +inf 7 +0 7 +0 N N
0 0 7 +inf 7 +inf 7 -inf 7 +inf 7 +0 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 +0 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 1 7 -inf N N
0 0 7 -inf 7 nan 7 -inf 7 +inf 7 1 7 -1 N N
0 0 7 -inf 7 +inf 7 -inf 7 +inf 7 1 7 -0 N N
0 0 7 -inf 7 +inf 7 -inf 7 +inf 7 1 7 +0 N N
0 0 7 nan 7 +inf 7 -inf 7 +inf 7 1 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 1 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 nan 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 +inf 7 nan 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 -1 7 -inf N N
0 0 7 +inf 7 -inf 7 -inf 7 nan 7 -1 7 -1 N N
0 0 7 +inf 7 nan 7 -inf 7 nan 7 -1 7 -0 N N
0 0 7 +inf 7 nan 7 -inf 7 nan 7 -1 7 +0 N N
0 0 7 +inf 7 +inf 7 -inf 7 nan 7 -1 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 -1 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 -0 7 -inf N N
0 0 7 nan 7 -inf 7 -inf 7 nan 7 -0 7 -1 N N
0 0 7 +inf 7 nan 7 -inf 7 nan 7 -0 7 -0 N N
0 0 7 +inf 7 nan 7 -inf 7 nan 7 -0 7 +0 N N
0 0 7 nan 7 +inf 7 -inf 7 nan 7 -0 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 -0 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 +0 7 -inf N N
0 0 7 nan 7 -inf 7 -inf 7 nan 7 +0 7 -1 N N
0 0 7 -inf 7 nan 7 -inf 7 nan 7 +0 7 -0 N N
0 0 7 -inf 7 nan 7 -inf 7 nan 7 +0 7 +0 N N
0 0 7 nan 7 +inf 7 -inf 7 nan 7 +0 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 +0 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 1 7 -inf N N
0 0 7 -inf 7 -inf 7 -inf 7 nan 7 1 7 -1 N N
0 0 7 -inf 7 nan 7 -inf 7 nan 7 1 7 -0 N N
0 0 7 -inf 7 nan 7 -inf 7 nan 7 1 7 +0 N N
0 0 7 -inf 7 +inf 7 -inf 7 nan 7 1 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 1 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 nan 7 1 N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -inf 7 nan 7 nan 7 nan N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 -1 7 -inf N N
0 0 7 +inf 7 +inf 7 -1 7 -inf 7 -1 7 -1 N N
0 0 7 nan 7 +inf 7 -1 7 -inf 7 -1 7 -0 N N
0 0 7 nan 7 +inf 7 -1 7 -inf 7 -1 7 +0 N N
0 0 7 -inf 7 +inf 7 -1 7 -inf 7 -1 7 1 N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 -1 7 nan N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 -0 7 -inf N N
0 0 7 +inf 7 nan 7 -1 7 -inf 7 -0 7 -1 N N
0 0 7 +inf 7 +inf 7 -1 7 -inf 7 -0 7 -0 N N
0 0 7 +inf 7 +inf 7 -1 7 -inf 7 -0 7 +0 N N
0 0 7 -inf 7 nan 7 -1 7 -inf 7 -0 7 1 N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 -0 7 nan N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 +0 7 -inf N N
0 0 7 +inf 7 nan 7 -1 7 -inf 7 +0 7 -1 N N
0 0 7 -inf 7 -inf 7 -1 7 -inf 7 +0 7 -0 N N
0 0 7 -inf 7 -inf 7 -1 7 -inf 7 +0 7 +0 N N
0 0 7 -inf 7 nan 7 -1 7 -inf 7 +0 7 1 N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 +0 7 nan N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 1 7 -inf N N
0 0 7 +inf 7 -inf 7 -1 7 -inf 7 1 7 -1 N N
0 0 7 nan 7 -inf 7 -1 7 -inf 7 1 7 -0 N N
0 0 7 nan 7 -inf 7 -1 7 -inf 7 1 7 +0 N N
0 0 7 -inf 7 -inf 7 -1 7 -inf 7 1 7 1 N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 1 7 nan N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 nan 7 1 N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -inf 7 nan 7 nan N N
0 0 7 +0 7 +0 7 -1 7 -1 7 -inf 7 -inf N N
0 0 7 +0 7 +0 7 -1 7 -1 7 -inf 7 -1 N N
0 0 7 +0 7 +0 7 -1 7 -1 7 -inf 7 -0 N N
0 0 7 +0 7 +0 7 -1 7 -1 7 -inf 7 +0 N N
0 0 7 +0 7 +0 7 -1 7 -1 7 -inf 7 1 N N
0 0 7 +0 7 +0 7 -1 7 -1 7 -inf 7 +inf N N
0 0 7 +0 7 +0 7 -1 7 -1 7 -inf 7 nan N N
0 0 7 +0 7 -0 7 -1 7 -1 7 -1 7 -inf N N
0 0 7 -0 7 +0 7 -1 7 -1 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -1 7 -1 7 nan N N
0 0 7 +0 7 -0 7 -1 7 -1 7 -0 7 -inf N N
0 0 7 -0 7 +0 7 -1 7 -1 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -1 7 -0 7 nan N N
0 0 7 +0 7 -0 7 -1 7 -1 7 +0 7 -inf N N
0 0 7 -0 7 +0 7 -1 7 -1 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -1 7 +0 7 nan N N
0 0 7 +0 7 -0 7 -1 7 -1 7 1 7 -inf N N
0 0 7 -0 7 +0 7 -1 7 -1 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -1 7 1 7 nan N N
0 0 7 +0 7 -0 7 -1 7 -1 7 +inf 7 -inf N N
0 0 7 -0 7 -0 7 -1 7 -1 7 +inf 7 -1 N N
0 0 7 -0 7 -0 7 -1 7 -1 7 +inf 7 -0 N N
0 0 7 -0 7 -0 7 -1 7 -1 7 +inf 7 +0 N N
0 0 7 -0 7 -0 7 -1 7 -1 7 +inf 7 1 N N
0 0 7 -0 7 +0 7 -1 7 -1 7 +inf 7 +inf N N
0 0 7 -0 7 -0 7 -1 7 -1 7 +inf 7 nan N N
0 0 7 +0 7 -0 7 -1 7 -1 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -1 7 -1 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -1 7 -1 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -1 7 -1 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -1 7 -1 7 nan 7 1 N N
0 0 7 -0 7 +0 7 -1 7 -1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -1 7 nan 7 nan N N
0 0 7 +0 7 -0 7 -1 7 -0 7 -inf 7 -inf N N
0 0 7 +0 7 +0 7 -1 7 -0 7 -inf 7 -1 N N
0 0 7 +0 7 +0 7 -1 7 -0 7 -inf 7 -0 N N
0 0 7 +0 7 +0 7 -1 7 -0 7 -inf 7 +0 N N
0 0 7 +0 7 +0 7 -1 7 -0 7 -inf 7 1 N N
0 0 7 +0 7 +0 7 -1 7 -0 7 -inf 7 +inf N N
0 0 7 +0 7 +0 7 -1 7 -0 7 -inf 7 nan N N
0 0 7 +0 7 -0 7 -1 7 -0 7 -1 7 -inf N N
0 0 7 +0 7 +0 7 -1 7 -0 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -0 7 -1 7 nan N N
0 0 7 +0 7 -0 7 -1 7 -0 7 -0 7 -inf N N
0 0 7 +0 7 +0 7 -1 7 -0 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -0 7 -0 7 nan N N
0 0 7 +0 7 -0 7 -1 7 -0 7 +0 7 -inf N N
0 0 7 -0 7 +0 7 -1 7 -0 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -0 7 +0 7 nan N N
0 0 7 +0 7 -0 7 -1 7 -0 7 1 7 -inf N N
0 0 7 -0 7 +0 7 -1 7 -0 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -0 7 1 7 nan N N
0 0 7 -0 7 -0 7 -1 7 -0 7 +inf 7 -inf N N
0 0 7 -0 7 -0 7 -1 7 -0 7 +inf 7 -1 N N
0 0 7 -0 7 -0 7 -1 7 -0 7 +inf 7 -0 N N
0 0 7 -0 7 +0 7 -1 7 -0 7 +inf 7 +0 N N
0 0 7 -0 7 +0 7 -1 7 -0 7 +inf 7 1 N N
0 0 7 -0 7 +0 7 -1 7 -0 7 +inf 7 +inf N N
0 0 7 -0 7 +0 7 -1 7 -0 7 +inf 7 nan N N
0 0 7 +0 7 -0 7 -1 7 -0 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -1 7 -0 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -1 7 -0 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -1 7 -0 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -1 7 -0 7 nan 7 1 N N
0 0 7 -0 7 +0 7 -1 7 -0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 -0 7 nan 7 nan N N
0 0 7 +0 7 -0 7 -1 7 +0 7 -inf 7 -inf N N
0 0 7 +0 7 -0 7 -1 7 +0 7 -inf 7 -1 N N
0 0 7 +0 7 -0 7 -1 7 +0 7 -inf 7 -0 N N
0 0 7 +0 7 +0 7 -1 7 +0 7 -inf 7 +0 N N
0 0 7 +0 7 +0 7 -1 7 +0 7 -inf 7 1 N N
0 0 7 +0 7 +0 7 -1 7 +0 7 -inf 7 +inf N N
0 0 7 +0 7 +0 7 -1 7 +0 7 -inf 7 nan N N
0 0 7 +0 7 -0 7 -1 7 +0 7 -1 7 -inf N N
0 0 7 +0 7 +0 7 -1 7 +0 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 +0 7 -1 7 nan N N
0 0 7 +0 7 -0 7 -1 7 +0 7 -0 7 -inf N N
0 0 7 +0 7 +0 7 -1 7 +0 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 +0 7 -0 7 nan N N
0 0 7 -0 7 -0 7 -1 7 +0 7 +0 7 -inf N N
0 0 7 +0 7 +0 7 -1 7 +0 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 +0 7 +0 7 nan N N
0 0 7 -0 7 -0 7 -1 7 +0 7 1 7 -inf N N
0 0 7 +0 7 +0 7 -1 7 +0 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 +0 7 1 7 nan N N
0 0 7 -0 7 -0 7 -1 7 +0 7 +inf 7 -inf N N
0 0 7 -0 7 +0 7 -1 7 +0 7 +inf 7 -1 N N
0 0 7 -0 7 +0 7 -1 7 +0 7 +inf 7 -0 N N
0 0 7 -0 7 +0 7 -1 7 +0 7 +inf 7 +0 N N
0 0 7 -0 7 +0 7 -1 7 +0 7 +inf 7 1 N N
0 0 7 -0 7 +0 7 -1 7 +0 7 +inf 7 +inf N N
0 0 7 -0 7 +0 7 -1 7 +0 7 +inf 7 nan N N
0 0 7 -0 7 -0 7 -1 7 +0 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -1 7 +0 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -1 7 +0 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -1 7 +0 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -1 7 +0 7 nan 7 1 N N
0 0 7 +0 7 +0 7 -1 7 +0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 +0 7 nan 7 nan N N
0 0 7 +0 7 -0 7 -1 7 1 7 -inf 7 -inf N N
0 0 7 +0 7 -0 7 -1 7 1 7 -inf 7 -1 N N
0 0 7 +0 7 -0 7 -1 7 1 7 -inf 7 -0 N N
0 0 7 +0 7 -0 7 -1 7 1 7 -inf 7 +0 N N
0 0 7 +0 7 -0 7 -1 7 1 7 -inf 7 1 N N
0 0 7 +0 7 +0 7 -1 7 1 7 -inf 7 +inf N N
0 0 7 +0 7 -0 7 -1 7 1 7 -inf 7 nan N N
0 0 7 -0 7 -0 7 -1 7 1 7 -1 7 -inf N N
0 0 7 +0 7 +0 7 -1 7 1 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 1 7 -1 7 nan N N
0 0 7 -0 7 -0 7 -1 7 1 7 -0 7 -inf N N
0 0 7 +0 7 +0 7 -1 7 1 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 1 7 -0 7 nan N N
0 0 7 -0 7 -0 7 -1 7 1 7 +0 7 -inf N N
0 0 7 +0 7 +0 7 -1 7 1 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 1 7 +0 7 nan N N
0 0 7 -0 7 -0 7 -1 7 1 7 1 7 -inf N N
0 0 7 +0 7 +0 7 -1 7 1 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 1 7 1 7 nan N N
0 0 7 -0 7 +0 7 -1 7 1 7 +inf 7 -inf N N
0 0 7 -0 7 +0 7 -1 7 1 7 +inf 7 -1 N N
0 0 7 -0 7 +0 7 -1 7 1 7 +inf 7 -0 N N
0 0 7 -0 7 +0 7 -1 7 1 7 +inf 7 +0 N N
0 0 7 -0 7 +0 7 -1 7 1 7 +inf 7 1 N N
0 0 7 +0 7 +0 7 -1 7 1 7 +inf 7 +inf N N
0 0 7 -0 7 +0 7 -1 7 1 7 +inf 7 nan N N
0 0 7 -0 7 -0 7 -1 7 1 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -1 7 1 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -1 7 1 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -1 7 1 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -1 7 1 7 nan 7 1 N N
0 0 7 +0 7 +0 7 -1 7 1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 1 7 nan 7 nan N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 -1 7 -inf N N
0 0 7 -inf 7 -inf 7 -1 7 +inf 7 -1 7 -1 N N
0 0 7 nan 7 -inf 7 -1 7 +inf 7 -1 7 -0 N N
0 0 7 nan 7 -inf 7 -1 7 +inf 7 -1 7 +0 N N
0 0 7 +inf 7 -inf 7 -1 7 +inf 7 -1 7 1 N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 -1 7 nan N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 -0 7 -inf N N
0 0 7 -inf 7 nan 7 -1 7 +inf 7 -0 7 -1 N N
0 0 7 +inf 7 -inf 7 -1 7 +inf 7 -0 7 -0 N N
0 0 7 +inf 7 -inf 7 -1 7 +inf 7 -0 7 +0 N N
0 0 7 +inf 7 nan 7 -1 7 +inf 7 -0 7 1 N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 -0 7 nan N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 +0 7 -inf N N
0 0 7 -inf 7 nan 7 -1 7 +inf 7 +0 7 -1 N N
0 0 7 -inf 7 +inf 7 -1 7 +inf 7 +0 7 -0 N N
0 0 7 -inf 7 +inf 7 -1 7 +inf 7 +0 7 +0 N N
0 0 7 +inf 7 nan 7 -1 7 +inf 7 +0 7 1 N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 +0 7 nan N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 1 7 -inf N N
0 0 7 -inf 7 +inf 7 -1 7 +inf 7 1 7 -1 N N
0 0 7 nan 7 +inf 7 -1 7 +inf 7 1 7 -0 N N
0 0 7 nan 7 +inf 7 -1 7 +inf 7 1 7 +0 N N
0 0 7 +inf 7 +inf 7 -1 7 +inf 7 1 7 1 N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 1 7 nan N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 nan 7 1 N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 +inf 7 nan 7 nan N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -1 7 -inf N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -1 7 -1 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -1 7 -0 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -1 7 +0 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -1 7 1 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -1 7 nan N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -0 7 -inf N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -0 7 -1 N N
0 0 7 +inf 7 nan 7 -1 7 nan 7 -0 7 -0 N N
0 0 7 +inf 7 nan 7 -1 7 nan 7 -0 7 +0 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -0 7 1 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 nan 7 -0 7 nan N N
0 0 7 nan 7 nan 7 -1 7 nan 7 +0 7 -inf N N
0 0 7 nan 7 nan 7 -1 7 nan 7 +0 7 -1 N N
0 0 7 -inf 7 nan 7 -1 7 nan 7 +0 7 -0 N N
0 0 7 -inf 7 nan 7 -1 7 nan 7 +0 7 +0 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 +0 7 1 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 nan 7 +0 7 nan N N
0 0 7 nan 7 nan 7 -1 7 nan 7 1 7 -inf N N
0 0 7 nan 7 nan 7 -1 7 nan 7 1 7 -1 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 1 7 -0 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 1 7 +0 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 1 7 1 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 nan 7 1 7 nan N N
0 0 7 nan 7 nan 7 -1 7 nan 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 -1 7 nan 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 nan 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 -1 7 nan 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -1 7 nan 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 nan 7 1 N N
0 0 7 nan 7 nan 7 -1 7 nan 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -1 7 nan 7 nan 7 nan N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 -1 7 -inf N N
0 0 7 +inf 7 +inf 7 -0 7 -inf 7 -1 7 -1 N N
0 0 7 nan 7 +inf 7 -0 7 -inf 7 -1 7 -0 N N
0 0 7 nan 7 +inf 7 -0 7 -inf 7 -1 7 +0 N N
0 0 7 -inf 7 +inf 7 -0 7 -inf 7 -1 7 1 N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 -1 7 nan N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 -0 7 -inf N N
0 0 7 +inf 7 nan 7 -0 7 -inf 7 -0 7 -1 N N
0 0 7 nan 7 +inf 7 -0 7 -inf 7 -0 7 -0 N N
0 0 7 nan 7 +inf 7 -0 7 -inf 7 -0 7 +0 N N
0 0 7 -inf 7 nan 7 -0 7 -inf 7 -0 7 1 N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 -0 7 nan N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 +0 7 -inf N N
0 0 7 +inf 7 nan 7 -0 7 -inf 7 +0 7 -1 N N
0 0 7 nan 7 -inf 7 -0 7 -inf 7 +0 7 -0 N N
0 0 7 nan 7 -inf 7 -0 7 -inf 7 +0 7 +0 N N
0 0 7 -inf 7 nan 7 -0 7 -inf 7 +0 7 1 N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 +0 7 nan N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 1 7 -inf N N
0 0 7 +inf 7 -inf 7 -0 7 -inf 7 1 7 -1 N N
0 0 7 nan 7 -inf 7 -0 7 -inf 7 1 7 -0 N N
0 0 7 nan 7 -inf 7 -0 7 -inf 7 1 7 +0 N N
0 0 7 -inf 7 -inf 7 -0 7 -inf 7 1 7 1 N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 1 7 nan N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 nan 7 1 N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -inf 7 nan 7 nan N N
0 0 7 +0 7 +0 7 -0 7 -1 7 -inf 7 -inf N N
0 0 7 +0 7 +0 7 -0 7 -1 7 -inf 7 -1 N N
0 0 7 +0 7 +0 7 -0 7 -1 7 -inf 7 -0 N N
0 0 7 +0 7 +0 7 -0 7 -1 7 -inf 7 +0 N N
0 0 7 +0 7 +0 7 -0 7 -1 7 -inf 7 1 N N
0 0 7 -0 7 +0 7 -0 7 -1 7 -inf 7 +inf N N
0 0 7 +0 7 +0 7 -0 7 -1 7 -inf 7 nan N N
0 0 7 +0 7 +0 7 -0 7 -1 7 -1 7 -inf N N
0 0 7 -0 7 +0 7 -0 7 -1 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -1 7 -1 7 nan N N
0 0 7 +0 7 +0 7 -0 7 -1 7 -0 7 -inf N N
0 0 7 -0 7 +0 7 -0 7 -1 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -1 7 -0 7 nan N N
0 0 7 +0 7 -0 7 -0 7 -1 7 +0 7 -inf N N
0 0 7 -0 7 +0 7 -0 7 -1 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -1 7 +0 7 nan N N
0 0 7 +0 7 -0 7 -0 7 -1 7 1 7 -inf N N
0 0 7 -0 7 +0 7 -0 7 -1 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -1 7 1 7 nan N N
0 0 7 +0 7 -0 7 -0 7 -1 7 +inf 7 -inf N N
0 0 7 +0 7 -0 7 -0 7 -1 7 +inf 7 -1 N N
0 0 7 +0 7 -0 7 -0 7 -1 7 +inf 7 -0 N N
0 0 7 -0 7 -0 7 -0 7 -1 7 +inf 7 +0 N N
0 0 7 -0 7 -0 7 -0 7 -1 7 +inf 7 1 N N
0 0 7 -0 7 -0 7 -0 7 -1 7 +inf 7 +inf N N
0 0 7 -0 7 -0 7 -0 7 -1 7 +inf 7 nan N N
0 0 7 +0 7 -0 7 -0 7 -1 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -0 7 -1 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 -1 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 -1 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -0 7 -1 7 nan 7 1 N N
0 0 7 -0 7 +0 7 -0 7 -1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -1 7 nan 7 nan N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -inf 7 -inf N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -inf 7 -1 N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -inf 7 -0 N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -inf 7 +0 N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -inf 7 1 N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -inf 7 +inf N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -inf 7 nan N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -1 7 -inf N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -0 7 -1 7 nan N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -0 7 -inf N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -0 7 -0 7 nan N N
0 0 7 +0 7 -0 7 -0 7 -0 7 +0 7 -inf N N
0 0 7 -0 7 +0 7 -0 7 -0 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -0 7 +0 7 nan N N
0 0 7 +0 7 -0 7 -0 7 -0 7 1 7 -inf N N
0 0 7 -0 7 +0 7 -0 7 -0 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -0 7 1 7 nan N N
0 0 7 +0 7 -0 7 -0 7 -0 7 +inf 7 -inf N N
0 0 7 +0 7 -0 7 -0 7 -0 7 +inf 7 -1 N N
0 0 7 +0 7 -0 7 -0 7 -0 7 +inf 7 -0 N N
0 0 7 -0 7 +0 7 -0 7 -0 7 +inf 7 +0 N N
0 0 7 -0 7 +0 7 -0 7 -0 7 +inf 7 1 N N
0 0 7 -0 7 +0 7 -0 7 -0 7 +inf 7 +inf N N
0 0 7 -0 7 +0 7 -0 7 -0 7 +inf 7 nan N N
0 0 7 +0 7 -0 7 -0 7 -0 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -0 7 -0 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 -0 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 -0 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -0 7 -0 7 nan 7 1 N N
0 0 7 -0 7 +0 7 -0 7 -0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 -0 7 nan 7 nan N N
0 0 7 +0 7 -0 7 -0 7 +0 7 -inf 7 -inf N N
0 0 7 +0 7 -0 7 -0 7 +0 7 -inf 7 -1 N N
0 0 7 +0 7 -0 7 -0 7 +0 7 -inf 7 -0 N N
0 0 7 +0 7 +0 7 -0 7 +0 7 -inf 7 +0 N N
0 0 7 +0 7 +0 7 -0 7 +0 7 -inf 7 1 N N
0 0 7 +0 7 +0 7 -0 7 +0 7 -inf 7 +inf N N
0 0 7 +0 7 +0 7 -0 7 +0 7 -inf 7 nan N N
0 0 7 +0 7 -0 7 -0 7 +0 7 -1 7 -inf N N
0 0 7 +0 7 +0 7 -0 7 +0 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 +0 7 -1 7 nan N N
0 0 7 +0 7 -0 7 -0 7 +0 7 -0 7 -inf N N
0 0 7 +0 7 +0 7 -0 7 +0 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 +0 7 -0 7 nan N N
0 0 7 -0 7 +0 7 -0 7 +0 7 +0 7 -inf N N
0 0 7 +0 7 +0 7 -0 7 +0 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 +0 7 +0 7 nan N N
0 0 7 -0 7 +0 7 -0 7 +0 7 1 7 -inf N N
0 0 7 +0 7 +0 7 -0 7 +0 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 +0 7 1 7 nan N N
0 0 7 -0 7 +0 7 -0 7 +0 7 +inf 7 -inf N N
0 0 7 -0 7 +0 7 -0 7 +0 7 +inf 7 -1 N N
0 0 7 -0 7 +0 7 -0 7 +0 7 +inf 7 -0 N N
0 0 7 +0 7 +0 7 -0 7 +0 7 +inf 7 +0 N N
0 0 7 +0 7 +0 7 -0 7 +0 7 +inf 7 1 N N
0 0 7 +0 7 +0 7 -0 7 +0 7 +inf 7 +inf N N
0 0 7 +0 7 +0 7 -0 7 +0 7 +inf 7 nan N N
0 0 7 -0 7 +0 7 -0 7 +0 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -0 7 +0 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 +0 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 +0 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -0 7 +0 7 nan 7 1 N N
0 0 7 +0 7 +0 7 -0 7 +0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 +0 7 nan 7 nan N N
0 0 7 -0 7 -0 7 -0 7 1 7 -inf 7 -inf N N
0 0 7 +0 7 -0 7 -0 7 1 7 -inf 7 -1 N N
0 0 7 +0 7 -0 7 -0 7 1 7 -inf 7 -0 N N
0 0 7 +0 7 -0 7 -0 7 1 7 -inf 7 +0 N N
0 0 7 +0 7 -0 7 -0 7 1 7 -inf 7 1 N N
0 0 7 +0 7 -0 7 -0 7 1 7 -inf 7 +inf N N
0 0 7 +0 7 -0 7 -0 7 1 7 -inf 7 nan N N
0 0 7 -0 7 -0 7 -0 7 1 7 -1 7 -inf N N
0 0 7 +0 7 +0 7 -0 7 1 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 1 7 -1 7 nan N N
0 0 7 -0 7 -0 7 -0 7 1 7 -0 7 -inf N N
0 0 7 +0 7 +0 7 -0 7 1 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 1 7 -0 7 nan N N
0 0 7 -0 7 +0 7 -0 7 1 7 +0 7 -inf N N
0 0 7 +0 7 +0 7 -0 7 1 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 1 7 +0 7 nan N N
0 0 7 -0 7 +0 7 -0 7 1 7 1 7 -inf N N
0 0 7 +0 7 +0 7 -0 7 1 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 1 7 1 7 nan N N
0 0 7 -0 7 +0 7 -0 7 1 7 +inf 7 -inf N N
0 0 7 -0 7 +0 7 -0 7 1 7 +inf 7 -1 N N
0 0 7 -0 7 +0 7 -0 7 1 7 +inf 7 -0 N N
0 0 7 +0 7 +0 7 -0 7 1 7 +inf 7 +0 N N
0 0 7 +0 7 +0 7 -0 7 1 7 +inf 7 1 N N
0 0 7 +0 7 +0 7 -0 7 1 7 +inf 7 +inf N N
0 0 7 +0 7 +0 7 -0 7 1 7 +inf 7 nan N N
0 0 7 -0 7 +0 7 -0 7 1 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -0 7 1 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 1 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 1 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -0 7 1 7 nan 7 1 N N
0 0 7 +0 7 +0 7 -0 7 1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 1 7 nan 7 nan N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 -1 7 -inf N N
0 0 7 -inf 7 -inf 7 -0 7 +inf 7 -1 7 -1 N N
0 0 7 nan 7 -inf 7 -0 7 +inf 7 -1 7 -0 N N
0 0 7 nan 7 -inf 7 -0 7 +inf 7 -1 7 +0 N N
0 0 7 +inf 7 -inf 7 -0 7 +inf 7 -1 7 1 N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 -1 7 nan N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 -0 7 -inf N N
0 0 7 -inf 7 nan 7 -0 7 +inf 7 -0 7 -1 N N
0 0 7 nan 7 -inf 7 -0 7 +inf 7 -0 7 -0 N N
0 0 7 nan 7 -inf 7 -0 7 +inf 7 -0 7 +0 N N
0 0 7 +inf 7 nan 7 -0 7 +inf 7 -0 7 1 N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 -0 7 nan N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 +0 7 -inf N N
0 0 7 -inf 7 nan 7 -0 7 +inf 7 +0 7 -1 N N
0 0 7 nan 7 +inf 7 -0 7 +inf 7 +0 7 -0 N N
0 0 7 nan 7 +inf 7 -0 7 +inf 7 +0 7 +0 N N
0 0 7 +inf 7 nan 7 -0 7 +inf 7 +0 7 1 N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 +0 7 nan N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 1 7 -inf N N
0 0 7 -inf 7 +inf 7 -0 7 +inf 7 1 7 -1 N N
0 0 7 nan 7 +inf 7 -0 7 +inf 7 1 7 -0 N N
0 0 7 nan 7 +inf 7 -0 7 +inf 7 1 7 +0 N N
0 0 7 +inf 7 +inf 7 -0 7 +inf 7 1 7 1 N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 1 7 nan N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 nan 7 1 N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 +inf 7 nan 7 nan N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -1 7 -inf N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -1 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -1 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -1 7 +0 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -1 7 1 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -1 7 nan N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -0 7 -inf N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -0 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -0 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -0 7 +0 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -0 7 1 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 nan 7 -0 7 nan N N
0 0 7 nan 7 nan 7 -0 7 nan 7 +0 7 -inf N N
0 0 7 nan 7 nan 7 -0 7 nan 7 +0 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 +0 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 +0 7 +0 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 +0 7 1 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 nan 7 +0 7 nan N N
0 0 7 nan 7 nan 7 -0 7 nan 7 1 7 -inf N N
0 0 7 nan 7 nan 7 -0 7 nan 7 1 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 1 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 1 7 +0 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 1 7 1 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 1 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 nan 7 1 7 nan N N
0 0 7 nan 7 nan 7 -0 7 nan 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 -0 7 nan 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 nan 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 -0 7 nan 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 -0 7 nan 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 nan 7 1 N N
0 0 7 nan 7 nan 7 -0 7 nan 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 -0 7 nan 7 nan 7 nan N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 -1 7 -inf N N
0 0 7 +inf 7 +inf 7 +0 7 -inf 7 -1 7 -1 N N
0 0 7 nan 7 +inf 7 +0 7 -inf 7 -1 7 -0 N N
0 0 7 nan 7 +inf 7 +0 7 -inf 7 -1 7 +0 N N
0 0 7 -inf 7 +inf 7 +0 7 -inf 7 -1 7 1 N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 -1 7 nan N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 -0 7 -inf N N
0 0 7 +inf 7 nan 7 +0 7 -inf 7 -0 7 -1 N N
0 0 7 nan 7 +inf 7 +0 7 -inf 7 -0 7 -0 N N
0 0 7 nan 7 +inf 7 +0 7 -inf 7 -0 7 +0 N N
0 0 7 -inf 7 nan 7 +0 7 -inf 7 -0 7 1 N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 -0 7 nan N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 +0 7 -inf N N
0 0 7 +inf 7 nan 7 +0 7 -inf 7 +0 7 -1 N N
0 0 7 nan 7 -inf 7 +0 7 -inf 7 +0 7 -0 N N
0 0 7 nan 7 -inf 7 +0 7 -inf 7 +0 7 +0 N N
0 0 7 -inf 7 nan 7 +0 7 -inf 7 +0 7 1 N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 +0 7 nan N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 1 7 -inf N N
0 0 7 +inf 7 -inf 7 +0 7 -inf 7 1 7 -1 N N
0 0 7 nan 7 -inf 7 +0 7 -inf 7 1 7 -0 N N
0 0 7 nan 7 -inf 7 +0 7 -inf 7 1 7 +0 N N
0 0 7 -inf 7 -inf 7 +0 7 -inf 7 1 7 1 N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 1 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 1 7 nan N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 nan 7 1 N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -inf 7 nan 7 nan N N
0 0 7 +0 7 +0 7 +0 7 -1 7 -inf 7 -inf N N
0 0 7 +0 7 +0 7 +0 7 -1 7 -inf 7 -1 N N
0 0 7 +0 7 +0 7 +0 7 -1 7 -inf 7 -0 N N
0 0 7 -0 7 +0 7 +0 7 -1 7 -inf 7 +0 N N
0 0 7 -0 7 +0 7 +0 7 -1 7 -inf 7 1 N N
0 0 7 -0 7 +0 7 +0 7 -1 7 -inf 7 +inf N N
0 0 7 -0 7 +0 7 +0 7 -1 7 -inf 7 nan N N
0 0 7 +0 7 +0 7 +0 7 -1 7 -1 7 -inf N N
0 0 7 -0 7 +0 7 +0 7 -1 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -1 7 -1 7 nan N N
0 0 7 +0 7 +0 7 +0 7 -1 7 -0 7 -inf N N
0 0 7 -0 7 +0 7 +0 7 -1 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -1 7 -0 7 nan N N
0 0 7 +0 7 +0 7 +0 7 -1 7 +0 7 -inf N N
0 0 7 -0 7 -0 7 +0 7 -1 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -1 7 +0 7 nan N N
0 0 7 +0 7 +0 7 +0 7 -1 7 1 7 -inf N N
0 0 7 -0 7 -0 7 +0 7 -1 7 1 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -1 7 1 7 nan N N
0 0 7 +0 7 -0 7 +0 7 -1 7 +inf 7 -inf N N
0 0 7 +0 7 -0 7 +0 7 -1 7 +inf 7 -1 N N
0 0 7 +0 7 -0 7 +0 7 -1 7 +inf 7 -0 N N
0 0 7 +0 7 -0 7 +0 7 -1 7 +inf 7 +0 N N
0 0 7 +0 7 -0 7 +0 7 -1 7 +inf 7 1 N N
0 0 7 -0 7 -0 7 +0 7 -1 7 +inf 7 +inf N N
0 0 7 +0 7 -0 7 +0 7 -1 7 +inf 7 nan N N
0 0 7 +0 7 +0 7 +0 7 -1 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 +0 7 -1 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 -1 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 -1 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 +0 7 -1 7 nan 7 1 N N
0 0 7 -0 7 -0 7 +0 7 -1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -1 7 nan 7 nan N N
0 0 7 +0 7 +0 7 +0 7 -0 7 -inf 7 -inf N N
0 0 7 +0 7 +0 7 +0 7 -0 7 -inf 7 -1 N N
0 0 7 +0 7 +0 7 +0 7 -0 7 -inf 7 -0 N N
0 0 7 -0 7 +0 7 +0 7 -0 7 -inf 7 +0 N N
0 0 7 -0 7 +0 7 +0 7 -0 7 -inf 7 1 N N
0 0 7 -0 7 +0 7 +0 7 -0 7 -inf 7 +inf N N
0 0 7 -0 7 +0 7 +0 7 -0 7 -inf 7 nan N N
0 0 7 +0 7 +0 7 +0 7 -0 7 -1 7 -inf N N
0 0 7 -0 7 +0 7 +0 7 -0 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -0 7 -1 7 nan N N
0 0 7 +0 7 +0 7 +0 7 -0 7 -0 7 -inf N N
0 0 7 -0 7 +0 7 +0 7 -0 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -0 7 -0 7 nan N N
0 0 7 +0 7 +0 7 +0 7 -0 7 +0 7 -inf N N
0 0 7 +0 7 -0 7 +0 7 -0 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -0 7 +0 7 nan N N
0 0 7 +0 7 +0 7 +0 7 -0 7 1 7 -inf N N
0 0 7 +0 7 -0 7 +0 7 -0 7 1 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -0 7 1 7 nan N N
0 0 7 +0 7 +0 7 +0 7 -0 7 +inf 7 -inf N N
0 0 7 +0 7 +0 7 +0 7 -0 7 +inf 7 -1 N N
0 0 7 +0 7 +0 7 +0 7 -0 7 +inf 7 -0 N N
0 0 7 +0 7 -0 7 +0 7 -0 7 +inf 7 +0 N N
0 0 7 +0 7 -0 7 +0 7 -0 7 +inf 7 1 N N
0 0 7 +0 7 -0 7 +0 7 -0 7 +inf 7 +inf N N
0 0 7 +0 7 -0 7 +0 7 -0 7 +inf 7 nan N N
0 0 7 +0 7 +0 7 +0 7 -0 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 +0 7 -0 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 -0 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 -0 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 +0 7 -0 7 nan 7 1 N N
0 0 7 +0 7 -0 7 +0 7 -0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 -0 7 nan 7 nan N N
0 0 7 -0 7 +0 7 +0 7 +0 7 -inf 7 -inf N N
0 0 7 -0 7 +0 7 +0 7 +0 7 -inf 7 -1 N N
0 0 7 -0 7 +0 7 +0 7 +0 7 -inf 7 -0 N N
0 0 7 +0 7 -0 7 +0 7 +0 7 -inf 7 +0 N N
0 0 7 +0 7 -0 7 +0 7 +0 7 -inf 7 1 N N
0 0 7 +0 7 -0 7 +0 7 +0 7 -inf 7 +inf N N
0 0 7 +0 7 -0 7 +0 7 +0 7 -inf 7 nan N N
0 0 7 -0 7 +0 7 +0 7 +0 7 -1 7 -inf N N
0 0 7 +0 7 -0 7 +0 7 +0 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 +0 7 -1 7 nan N N
0 0 7 -0 7 +0 7 +0 7 +0 7 -0 7 -inf N N
0 0 7 +0 7 -0 7 +0 7 +0 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 +0 7 -0 7 nan N N
0 0 7 +0 7 +0 7 +0 7 +0 7 +0 7 -inf N N
0 0 7 +0 7 +0 7 +0 7 +0 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 +0 7 +0 7 nan N N
0 0 7 +0 7 +0 7 +0 7 +0 7 1 7 -inf N N
0 0 7 +0 7 +0 7 +0 7 +0 7 1 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 +0 7 1 7 nan N N
0 0 7 +0 7 +0 7 +0 7 +0 7 +inf 7 -inf N N
0 0 7 +0 7 +0 7 +0 7 +0 7 +inf 7 -1 N N
0 0 7 +0 7 +0 7 +0 7 +0 7 +inf 7 -0 N N
0 0 7 +0 7 +0 7 +0 7 +0 7 +inf 7 +0 N N
0 0 7 +0 7 +0 7 +0 7 +0 7 +inf 7 1 N N
0 0 7 +0 7 +0 7 +0 7 +0 7 +inf 7 +inf N N
0 0 7 +0 7 +0 7 +0 7 +0 7 +inf 7 nan N N
0 0 7 +0 7 +0 7 +0 7 +0 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 +0 7 +0 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 +0 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 +0 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 +0 7 +0 7 nan 7 1 N N
0 0 7 +0 7 +0 7 +0 7 +0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 +0 7 nan 7 nan N N
0 0 7 -0 7 -0 7 +0 7 1 7 -inf 7 -inf N N
0 0 7 -0 7 -0 7 +0 7 1 7 -inf 7 -1 N N
0 0 7 -0 7 -0 7 +0 7 1 7 -inf 7 -0 N N
0 0 7 +0 7 -0 7 +0 7 1 7 -inf 7 +0 N N
0 0 7 +0 7 -0 7 +0 7 1 7 -inf 7 1 N N
0 0 7 +0 7 -0 7 +0 7 1 7 -inf 7 +inf N N
0 0 7 +0 7 -0 7 +0 7 1 7 -inf 7 nan N N
0 0 7 -0 7 +0 7 +0 7 1 7 -1 7 -inf N N
0 0 7 +0 7 -0 7 +0 7 1 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 1 7 -1 7 nan N N
0 0 7 -0 7 +0 7 +0 7 1 7 -0 7 -inf N N
0 0 7 +0 7 -0 7 +0 7 1 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 1 7 -0 7 nan N N
0 0 7 -0 7 +0 7 +0 7 1 7 +0 7 -inf N N
0 0 7 +0 7 +0 7 +0 7 1 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 1 7 +0 7 nan N N
0 0 7 -0 7 +0 7 +0 7 1 7 1 7 -inf N N
0 0 7 +0 7 +0 7 +0 7 1 7 1 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 1 7 1 7 nan N N
0 0 7 -0 7 +0 7 +0 7 1 7 +inf 7 -inf N N
0 0 7 +0 7 +0 7 +0 7 1 7 +inf 7 -1 N N
0 0 7 +0 7 +0 7 +0 7 1 7 +inf 7 -0 N N
0 0 7 +0 7 +0 7 +0 7 1 7 +inf 7 +0 N N
0 0 7 +0 7 +0 7 +0 7 1 7 +inf 7 1 N N
0 0 7 +0 7 +0 7 +0 7 1 7 +inf 7 +inf N N
0 0 7 +0 7 +0 7 +0 7 1 7 +inf 7 nan N N
0 0 7 -0 7 +0 7 +0 7 1 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 +0 7 1 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 1 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 1 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 +0 7 1 7 nan 7 1 N N
0 0 7 +0 7 +0 7 +0 7 1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 1 7 nan 7 nan N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 -1 7 -inf N N
0 0 7 -inf 7 -inf 7 +0 7 +inf 7 -1 7 -1 N N
0 0 7 nan 7 -inf 7 +0 7 +inf 7 -1 7 -0 N N
0 0 7 nan 7 -inf 7 +0 7 +inf 7 -1 7 +0 N N
0 0 7 +inf 7 -inf 7 +0 7 +inf 7 -1 7 1 N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 -1 7 nan N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 -0 7 -inf N N
0 0 7 -inf 7 nan 7 +0 7 +inf 7 -0 7 -1 N N
0 0 7 nan 7 -inf 7 +0 7 +inf 7 -0 7 -0 N N
0 0 7 nan 7 -inf 7 +0 7 +inf 7 -0 7 +0 N N
0 0 7 +inf 7 nan 7 +0 7 +inf 7 -0 7 1 N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 -0 7 nan N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 +0 7 -inf N N
0 0 7 -inf 7 nan 7 +0 7 +inf 7 +0 7 -1 N N
0 0 7 nan 7 +inf 7 +0 7 +inf 7 +0 7 -0 N N
0 0 7 nan 7 +inf 7 +0 7 +inf 7 +0 7 +0 N N
0 0 7 +inf 7 nan 7 +0 7 +inf 7 +0 7 1 N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 +0 7 nan N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 1 7 -inf N N
0 0 7 -inf 7 +inf 7 +0 7 +inf 7 1 7 -1 N N
0 0 7 nan 7 +inf 7 +0 7 +inf 7 1 7 -0 N N
0 0 7 nan 7 +inf 7 +0 7 +inf 7 1 7 +0 N N
0 0 7 +inf 7 +inf 7 +0 7 +inf 7 1 7 1 N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 1 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 1 7 nan N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 nan 7 1 N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 +inf 7 nan 7 nan N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -1 7 -inf N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -1 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -1 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -1 7 +0 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -1 7 1 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -1 7 nan N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -0 7 -inf N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -0 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -0 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -0 7 +0 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -0 7 1 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 nan 7 -0 7 nan N N
0 0 7 nan 7 nan 7 +0 7 nan 7 +0 7 -inf N N
0 0 7 nan 7 nan 7 +0 7 nan 7 +0 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 +0 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 +0 7 +0 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 +0 7 1 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 nan 7 +0 7 nan N N
0 0 7 nan 7 nan 7 +0 7 nan 7 1 7 -inf N N
0 0 7 nan 7 nan 7 +0 7 nan 7 1 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 1 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 1 7 +0 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 1 7 1 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 1 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 nan 7 1 7 nan N N
0 0 7 nan 7 nan 7 +0 7 nan 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 +0 7 nan 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 nan 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 +0 7 nan 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 +0 7 nan 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 nan 7 1 N N
0 0 7 nan 7 nan 7 +0 7 nan 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +0 7 nan 7 nan 7 nan N N
0 0 7 nan 7 nan 7 1 7 -inf 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 1 7 -inf 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 1 7 -inf 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 1 7 -inf 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 1 7 -inf 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 1 7 -inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -inf 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 1 7 -inf 7 -1 7 -inf N N
0 0 7 +inf 7 +inf 7 1 7 -inf 7 -1 7 -1 N N
0 0 7 nan 7 +inf 7 1 7 -inf 7 -1 7 -0 N N
0 0 7 nan 7 +inf 7 1 7 -inf 7 -1 7 +0 N N
0 0 7 -inf 7 +inf 7 1 7 -inf 7 -1 7 1 N N
0 0 7 nan 7 nan 7 1 7 -inf 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -inf 7 -1 7 nan N N
0 0 7 nan 7 nan 7 1 7 -inf 7 -0 7 -inf N N
0 0 7 +inf 7 nan 7 1 7 -inf 7 -0 7 -1 N N
0 0 7 -inf 7 +inf 7 1 7 -inf 7 -0 7 -0 N N
0 0 7 -inf 7 +inf 7 1 7 -inf 7 -0 7 +0 N N
0 0 7 -inf 7 nan 7 1 7 -inf 7 -0 7 1 N N
0 0 7 nan 7 nan 7 1 7 -inf 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -inf 7 -0 7 nan N N
0 0 7 nan 7 nan 7 1 7 -inf 7 +0 7 -inf N N
0 0 7 +inf 7 nan 7 1 7 -inf 7 +0 7 -1 N N
0 0 7 +inf 7 -inf 7 1 7 -inf 7 +0 7 -0 N N
0 0 7 +inf 7 -inf 7 1 7 -inf 7 +0 7 +0 N N
0 0 7 -inf 7 nan 7 1 7 -inf 7 +0 7 1 N N
0 0 7 nan 7 nan 7 1 7 -inf 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -inf 7 +0 7 nan N N
0 0 7 nan 7 nan 7 1 7 -inf 7 1 7 -inf N N
0 0 7 +inf 7 -inf 7 1 7 -inf 7 1 7 -1 N N
0 0 7 nan 7 -inf 7 1 7 -inf 7 1 7 -0 N N
0 0 7 nan 7 -inf 7 1 7 -inf 7 1 7 +0 N N
0 0 7 -inf 7 -inf 7 1 7 -inf 7 1 7 1 N N
0 0 7 nan 7 nan 7 1 7 -inf 7 1 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -inf 7 1 7 nan N N
0 0 7 nan 7 nan 7 1 7 -inf 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 1 7 -inf 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 1 7 -inf 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 1 7 -inf 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 1 7 -inf 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 1 7 -inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -inf 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 1 7 -inf 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 1 7 -inf 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 1 7 -inf 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 1 7 -inf 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 1 7 -inf 7 nan 7 1 N N
0 0 7 nan 7 nan 7 1 7 -inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -inf 7 nan 7 nan N N
0 0 7 +0 7 +0 7 1 7 -1 7 -inf 7 -inf N N
0 0 7 -0 7 +0 7 1 7 -1 7 -inf 7 -1 N N
0 0 7 -0 7 +0 7 1 7 -1 7 -inf 7 -0 N N
0 0 7 -0 7 +0 7 1 7 -1 7 -inf 7 +0 N N
0 0 7 -0 7 +0 7 1 7 -1 7 -inf 7 1 N N
0 0 7 -0 7 +0 7 1 7 -1 7 -inf 7 +inf N N
0 0 7 -0 7 +0 7 1 7 -1 7 -inf 7 nan N N
0 0 7 +0 7 +0 7 1 7 -1 7 -1 7 -inf N N
0 0 7 -0 7 -0 7 1 7 -1 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -1 7 -1 7 nan N N
0 0 7 +0 7 +0 7 1 7 -1 7 -0 7 -inf N N
0 0 7 -0 7 -0 7 1 7 -1 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -1 7 -0 7 nan N N
0 0 7 +0 7 +0 7 1 7 -1 7 +0 7 -inf N N
0 0 7 -0 7 -0 7 1 7 -1 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -1 7 +0 7 nan N N
0 0 7 +0 7 +0 7 1 7 -1 7 1 7 -inf N N
0 0 7 -0 7 -0 7 1 7 -1 7 1 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -1 7 1 7 nan N N
0 0 7 +0 7 +0 7 1 7 -1 7 +inf 7 -inf N N
0 0 7 +0 7 -0 7 1 7 -1 7 +inf 7 -1 N N
0 0 7 +0 7 -0 7 1 7 -1 7 +inf 7 -0 N N
0 0 7 +0 7 -0 7 1 7 -1 7 +inf 7 +0 N N
0 0 7 +0 7 -0 7 1 7 -1 7 +inf 7 1 N N
0 0 7 +0 7 -0 7 1 7 -1 7 +inf 7 +inf N N
0 0 7 +0 7 -0 7 1 7 -1 7 +inf 7 nan N N
0 0 7 +0 7 +0 7 1 7 -1 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 1 7 -1 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 1 7 -1 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 1 7 -1 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 1 7 -1 7 nan 7 1 N N
0 0 7 -0 7 -0 7 1 7 -1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -1 7 nan 7 nan N N
0 0 7 -0 7 +0 7 1 7 -0 7 -inf 7 -inf N N
0 0 7 -0 7 +0 7 1 7 -0 7 -inf 7 -1 N N
0 0 7 -0 7 +0 7 1 7 -0 7 -inf 7 -0 N N
0 0 7 -0 7 +0 7 1 7 -0 7 -inf 7 +0 N N
0 0 7 -0 7 +0 7 1 7 -0 7 -inf 7 1 N N
0 0 7 -0 7 -0 7 1 7 -0 7 -inf 7 +inf N N
0 0 7 -0 7 +0 7 1 7 -0 7 -inf 7 nan N N
0 0 7 +0 7 +0 7 1 7 -0 7 -1 7 -inf N N
0 0 7 -0 7 -0 7 1 7 -0 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -0 7 -1 7 nan N N
0 0 7 +0 7 +0 7 1 7 -0 7 -0 7 -inf N N
0 0 7 -0 7 -0 7 1 7 -0 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -0 7 -0 7 nan N N
0 0 7 +0 7 +0 7 1 7 -0 7 +0 7 -inf N N
0 0 7 +0 7 -0 7 1 7 -0 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -0 7 +0 7 nan N N
0 0 7 +0 7 +0 7 1 7 -0 7 1 7 -inf N N
0 0 7 +0 7 -0 7 1 7 -0 7 1 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -0 7 1 7 nan N N
0 0 7 +0 7 +0 7 1 7 -0 7 +inf 7 -inf N N
0 0 7 +0 7 +0 7 1 7 -0 7 +inf 7 -1 N N
0 0 7 +0 7 +0 7 1 7 -0 7 +inf 7 -0 N N
0 0 7 +0 7 -0 7 1 7 -0 7 +inf 7 +0 N N
0 0 7 +0 7 -0 7 1 7 -0 7 +inf 7 1 N N
0 0 7 +0 7 -0 7 1 7 -0 7 +inf 7 +inf N N
0 0 7 +0 7 -0 7 1 7 -0 7 +inf 7 nan N N
0 0 7 +0 7 +0 7 1 7 -0 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 1 7 -0 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 1 7 -0 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 1 7 -0 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 1 7 -0 7 nan 7 1 N N
0 0 7 +0 7 -0 7 1 7 -0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 1 7 -0 7 nan 7 nan N N
0 0 7 -0 7 +0 7 1 7 +0 7 -inf 7 -inf N N
0 0 7 -0 7 +0 7 1 7 +0 7 -inf 7 -1 N N
0 0 7 -0 7 +0 7 1 7 +0 7 -inf 7 -0 N N
0 0 7 -0 7 -0 7 1 7 +0 7 -inf 7 +0 N N
0 0 7 -0 7 -0 7 1 7 +0 7 -inf 7 1 N N
0 0 7 -0 7 -0 7 1 7 +0 7 -inf 7 +inf N N
0 0 7 -0 7 -0 7 1 7 +0 7 -inf 7 nan N N
0 0 7 -0 7 +0 7 1 7 +0 7 -1 7 -inf N N
0 0 7 +0 7 -0 7 1 7 +0 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 1 7 +0 7 -1 7 nan N N
0 0 7 -0 7 +0 7 1 7 +0 7 -0 7 -inf N N
0 0 7 +0 7 -0 7 1 7 +0 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 1 7 +0 7 -0 7 nan N N
0 0 7 +0 7 +0 7 1 7 +0 7 +0 7 -inf N N
0 0 7 +0 7 -0 7 1 7 +0 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 1 7 +0 7 +0 7 nan N N
0 0 7 +0 7 +0 7 1 7 +0 7 1 7 -inf N N
0 0 7 +0 7 -0 7 1 7 +0 7 1 7 +inf N N
0 0 7 nan 7 nan 7 1 7 +0 7 1 7 nan N N
0 0 7 +0 7 +0 7 1 7 +0 7 +inf 7 -inf N N
0 0 7 +0 7 +0 7 1 7 +0 7 +inf 7 -1 N N
0 0 7 +0 7 +0 7 1 7 +0 7 +inf 7 -0 N N
0 0 7 +0 7 +0 7 1 7 +0 7 +inf 7 +0 N N
0 0 7 +0 7 +0 7 1 7 +0 7 +inf 7 1 N N
0 0 7 +0 7 -0 7 1 7 +0 7 +inf 7 +inf N N
0 0 7 +0 7 +0 7 1 7 +0 7 +inf 7 nan N N
0 0 7 +0 7 +0 7 1 7 +0 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 1 7 +0 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 1 7 +0 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 1 7 +0 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 1 7 +0 7 nan 7 1 N N
0 0 7 +0 7 -0 7 1 7 +0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 1 7 +0 7 nan 7 nan N N
0 0 7 -0 7 +0 7 1 7 1 7 -inf 7 -inf N N
0 0 7 -0 7 -0 7 1 7 1 7 -inf 7 -1 N N
0 0 7 -0 7 -0 7 1 7 1 7 -inf 7 -0 N N
0 0 7 -0 7 -0 7 1 7 1 7 -inf 7 +0 N N
0 0 7 -0 7 -0 7 1 7 1 7 -inf 7 1 N N
0 0 7 +0 7 -0 7 1 7 1 7 -inf 7 +inf N N
0 0 7 -0 7 -0 7 1 7 1 7 -inf 7 nan N N
0 0 7 -0 7 +0 7 1 7 1 7 -1 7 -inf N N
0 0 7 +0 7 -0 7 1 7 1 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 1 7 1 7 -1 7 nan N N
0 0 7 -0 7 +0 7 1 7 1 7 -0 7 -inf N N
0 0 7 +0 7 -0 7 1 7 1 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 1 7 1 7 -0 7 nan N N
0 0 7 -0 7 +0 7 1 7 1 7 +0 7 -inf N N
0 0 7 +0 7 -0 7 1 7 1 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 1 7 1 7 +0 7 nan N N
0 0 7 -0 7 +0 7 1 7 1 7 1 7 -inf N N
0 0 7 +0 7 -0 7 1 7 1 7 1 7 +inf N N
0 0 7 nan 7 nan 7 1 7 1 7 1 7 nan N N
0 0 7 +0 7 +0 7 1 7 1 7 +inf 7 -inf N N
0 0 7 +0 7 +0 7 1 7 1 7 +inf 7 -1 N N
0 0 7 +0 7 +0 7 1 7 1 7 +inf 7 -0 N N
0 0 7 +0 7 +0 7 1 7 1 7 +inf 7 +0 N N
0 0 7 +0 7 +0 7 1 7 1 7 +inf 7 1 N N
0 0 7 +0 7 +0 7 1 7 1 7 +inf 7 +inf N N
0 0 7 +0 7 +0 7 1 7 1 7 +inf 7 nan N N
0 0 7 -0 7 +0 7 1 7 1 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 1 7 1 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 1 7 1 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 1 7 1 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 1 7 1 7 nan 7 1 N N
0 0 7 +0 7 -0 7 1 7 1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 1 7 1 7 nan 7 nan N N
0 0 7 nan 7 nan 7 1 7 +inf 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 1 7 +inf 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 1 7 +inf 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 1 7 +inf 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 1 7 +inf 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 1 7 +inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 1 7 +inf 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 1 7 +inf 7 -1 7 -inf N N
0 0 7 -inf 7 -inf 7 1 7 +inf 7 -1 7 -1 N N
0 0 7 nan 7 -inf 7 1 7 +inf 7 -1 7 -0 N N
0 0 7 nan 7 -inf 7 1 7 +inf 7 -1 7 +0 N N
0 0 7 +inf 7 -inf 7 1 7 +inf 7 -1 7 1 N N
0 0 7 nan 7 nan 7 1 7 +inf 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 1 7 +inf 7 -1 7 nan N N
0 0 7 nan 7 nan 7 1 7 +inf 7 -0 7 -inf N N
0 0 7 -inf 7 nan 7 1 7 +inf 7 -0 7 -1 N N
0 0 7 -inf 7 -inf 7 1 7 +inf 7 -0 7 -0 N N
0 0 7 -inf 7 -inf 7 1 7 +inf 7 -0 7 +0 N N
0 0 7 +inf 7 nan 7 1 7 +inf 7 -0 7 1 N N
0 0 7 nan 7 nan 7 1 7 +inf 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 1 7 +inf 7 -0 7 nan N N
0 0 7 nan 7 nan 7 1 7 +inf 7 +0 7 -inf N N
0 0 7 -inf 7 nan 7 1 7 +inf 7 +0 7 -1 N N
0 0 7 +inf 7 +inf 7 1 7 +inf 7 +0 7 -0 N N
0 0 7 +inf 7 +inf 7 1 7 +inf 7 +0 7 +0 N N
0 0 7 +inf 7 nan 7 1 7 +inf 7 +0 7 1 N N
0 0 7 nan 7 nan 7 1 7 +inf 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 1 7 +inf 7 +0 7 nan N N
0 0 7 nan 7 nan 7 1 7 +inf 7 1 7 -inf N N
0 0 7 -inf 7 +inf 7 1 7 +inf 7 1 7 -1 N N
0 0 7 nan 7 +inf 7 1 7 +inf 7 1 7 -0 N N
0 0 7 nan 7 +inf 7 1 7 +inf 7 1 7 +0 N N
0 0 7 +inf 7 +inf 7 1 7 +inf 7 1 7 1 N N
0 0 7 nan 7 nan 7 1 7 +inf 7 1 7 +inf N N
0 0 7 nan 7 nan 7 1 7 +inf 7 1 7 nan N N
0 0 7 nan 7 nan 7 1 7 +inf 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 1 7 +inf 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 1 7 +inf 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 1 7 +inf 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 1 7 +inf 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 1 7 +inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 1 7 +inf 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 1 7 +inf 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 1 7 +inf 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 1 7 +inf 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 1 7 +inf 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 1 7 +inf 7 nan 7 1 N N
0 0 7 nan 7 nan 7 1 7 +inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 1 7 +inf 7 nan 7 nan N N
0 0 7 nan 7 nan 7 1 7 nan 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 1 7 nan 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 1 7 nan 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 1 7 nan 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 1 7 nan 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 1 7 nan 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 1 7 nan 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 1 7 nan 7 -1 7 -inf N N
0 0 7 nan 7 nan 7 1 7 nan 7 -1 7 -1 N N
0 0 7 nan 7 nan 7 1 7 nan 7 -1 7 -0 N N
0 0 7 nan 7 nan 7 1 7 nan 7 -1 7 +0 N N
0 0 7 nan 7 nan 7 1 7 nan 7 -1 7 1 N N
0 0 7 nan 7 nan 7 1 7 nan 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 1 7 nan 7 -1 7 nan N N
0 0 7 nan 7 nan 7 1 7 nan 7 -0 7 -inf N N
0 0 7 nan 7 nan 7 1 7 nan 7 -0 7 -1 N N
0 0 7 -inf 7 nan 7 1 7 nan 7 -0 7 -0 N N
0 0 7 -inf 7 nan 7 1 7 nan 7 -0 7 +0 N N
0 0 7 nan 7 nan 7 1 7 nan 7 -0 7 1 N N
0 0 7 nan 7 nan 7 1 7 nan 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 1 7 nan 7 -0 7 nan N N
0 0 7 nan 7 nan 7 1 7 nan 7 +0 7 -inf N N
0 0 7 nan 7 nan 7 1 7 nan 7 +0 7 -1 N N
0 0 7 +inf 7 nan 7 1 7 nan 7 +0 7 -0 N N
0 0 7 +inf 7 nan 7 1 7 nan 7 +0 7 +0 N N
0 0 7 nan 7 nan 7 1 7 nan 7 +0 7 1 N N
0 0 7 nan 7 nan 7 1 7 nan 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 1 7 nan 7 +0 7 nan N N
0 0 7 nan 7 nan 7 1 7 nan 7 1 7 -inf N N
0 0 7 nan 7 nan 7 1 7 nan 7 1 7 -1 N N
0 0 7 nan 7 nan 7 1 7 nan 7 1 7 -0 N N
0 0 7 nan 7 nan 7 1 7 nan 7 1 7 +0 N N
0 0 7 nan 7 nan 7 1 7 nan 7 1 7 1 N N
0 0 7 nan 7 nan 7 1 7 nan 7 1 7 +inf N N
0 0 7 nan 7 nan 7 1 7 nan 7 1 7 nan N N
0 0 7 nan 7 nan 7 1 7 nan 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 1 7 nan 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 1 7 nan 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 1 7 nan 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 1 7 nan 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 1 7 nan 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 1 7 nan 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 1 7 nan 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 1 7 nan 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 1 7 nan 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 1 7 nan 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 1 7 nan 7 nan 7 1 N N
0 0 7 nan 7 nan 7 1 7 nan 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 1 7 nan 7 nan 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 -1 7 -inf N N
0 0 7 nan 7 +inf 7 +inf 7 -inf 7 -1 7 -1 N N
0 0 7 -inf 7 +inf 7 +inf 7 -inf 7 -1 7 -0 N N
0 0 7 -inf 7 +inf 7 +inf 7 -inf 7 -1 7 +0 N N
0 0 7 -inf 7 nan 7 +inf 7 -inf 7 -1 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 -1 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 -0 7 -inf N N
0 0 7 +inf 7 +inf 7 +inf 7 -inf 7 -0 7 -1 N N
0 0 7 -inf 7 +inf 7 +inf 7 -inf 7 -0 7 -0 N N
0 0 7 -inf 7 +inf 7 +inf 7 -inf 7 -0 7 +0 N N
0 0 7 -inf 7 -inf 7 +inf 7 -inf 7 -0 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 -0 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 +0 7 -inf N N
0 0 7 +inf 7 +inf 7 +inf 7 -inf 7 +0 7 -1 N N
0 0 7 +inf 7 -inf 7 +inf 7 -inf 7 +0 7 -0 N N
0 0 7 +inf 7 -inf 7 +inf 7 -inf 7 +0 7 +0 N N
0 0 7 -inf 7 -inf 7 +inf 7 -inf 7 +0 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 +0 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 1 7 -inf N N
0 0 7 +inf 7 nan 7 +inf 7 -inf 7 1 7 -1 N N
0 0 7 +inf 7 -inf 7 +inf 7 -inf 7 1 7 -0 N N
0 0 7 +inf 7 -inf 7 +inf 7 -inf 7 1 7 +0 N N
0 0 7 nan 7 -inf 7 +inf 7 -inf 7 1 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 1 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 1 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 nan 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -inf 7 nan 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 -1 7 -inf N N
0 0 7 -inf 7 +inf 7 +inf 7 -1 7 -1 7 -1 N N
0 0 7 -inf 7 nan 7 +inf 7 -1 7 -1 7 -0 N N
0 0 7 -inf 7 nan 7 +inf 7 -1 7 -1 7 +0 N N
0 0 7 -inf 7 -inf 7 +inf 7 -1 7 -1 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 -1 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 -0 7 -inf N N
0 0 7 nan 7 +inf 7 +inf 7 -1 7 -0 7 -1 N N
0 0 7 -inf 7 +inf 7 +inf 7 -1 7 -0 7 -0 N N
0 0 7 -inf 7 +inf 7 +inf 7 -1 7 -0 7 +0 N N
0 0 7 nan 7 -inf 7 +inf 7 -1 7 -0 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 -0 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 +0 7 -inf N N
0 0 7 nan 7 +inf 7 +inf 7 -1 7 +0 7 -1 N N
0 0 7 +inf 7 -inf 7 +inf 7 -1 7 +0 7 -0 N N
0 0 7 +inf 7 -inf 7 +inf 7 -1 7 +0 7 +0 N N
0 0 7 nan 7 -inf 7 +inf 7 -1 7 +0 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 +0 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 1 7 -inf N N
0 0 7 +inf 7 +inf 7 +inf 7 -1 7 1 7 -1 N N
0 0 7 +inf 7 nan 7 +inf 7 -1 7 1 7 -0 N N
0 0 7 +inf 7 nan 7 +inf 7 -1 7 1 7 +0 N N
0 0 7 +inf 7 -inf 7 +inf 7 -1 7 1 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 1 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 1 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 nan 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -1 7 nan 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 -1 7 -inf N N
0 0 7 -inf 7 +inf 7 +inf 7 -0 7 -1 7 -1 N N
0 0 7 -inf 7 nan 7 +inf 7 -0 7 -1 7 -0 N N
0 0 7 -inf 7 nan 7 +inf 7 -0 7 -1 7 +0 N N
0 0 7 -inf 7 -inf 7 +inf 7 -0 7 -1 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 -1 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 -0 7 -inf N N
0 0 7 nan 7 +inf 7 +inf 7 -0 7 -0 7 -1 N N
0 0 7 -inf 7 nan 7 +inf 7 -0 7 -0 7 -0 N N
0 0 7 -inf 7 nan 7 +inf 7 -0 7 -0 7 +0 N N
0 0 7 nan 7 -inf 7 +inf 7 -0 7 -0 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 -0 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 +0 7 -inf N N
0 0 7 nan 7 +inf 7 +inf 7 -0 7 +0 7 -1 N N
0 0 7 +inf 7 nan 7 +inf 7 -0 7 +0 7 -0 N N
0 0 7 +inf 7 nan 7 +inf 7 -0 7 +0 7 +0 N N
0 0 7 nan 7 -inf 7 +inf 7 -0 7 +0 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 +0 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 1 7 -inf N N
0 0 7 +inf 7 +inf 7 +inf 7 -0 7 1 7 -1 N N
0 0 7 +inf 7 nan 7 +inf 7 -0 7 1 7 -0 N N
0 0 7 +inf 7 nan 7 +inf 7 -0 7 1 7 +0 N N
0 0 7 +inf 7 -inf 7 +inf 7 -0 7 1 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 1 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 1 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 nan 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 -0 7 nan 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 -1 7 -inf N N
0 0 7 -inf 7 +inf 7 +inf 7 +0 7 -1 7 -1 N N
0 0 7 -inf 7 nan 7 +inf 7 +0 7 -1 7 -0 N N
0 0 7 -inf 7 nan 7 +inf 7 +0 7 -1 7 +0 N N
0 0 7 -inf 7 -inf 7 +inf 7 +0 7 -1 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 -1 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 -0 7 -inf N N
0 0 7 nan 7 +inf 7 +inf 7 +0 7 -0 7 -1 N N
0 0 7 -inf 7 nan 7 +inf 7 +0 7 -0 7 -0 N N
0 0 7 -inf 7 nan 7 +inf 7 +0 7 -0 7 +0 N N
0 0 7 nan 7 -inf 7 +inf 7 +0 7 -0 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 -0 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 +0 7 -inf N N
0 0 7 nan 7 +inf 7 +inf 7 +0 7 +0 7 -1 N N
0 0 7 +inf 7 nan 7 +inf 7 +0 7 +0 7 -0 N N
0 0 7 +inf 7 nan 7 +inf 7 +0 7 +0 7 +0 N N
0 0 7 nan 7 -inf 7 +inf 7 +0 7 +0 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 +0 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 1 7 -inf N N
0 0 7 +inf 7 +inf 7 +inf 7 +0 7 1 7 -1 N N
0 0 7 +inf 7 nan 7 +inf 7 +0 7 1 7 -0 N N
0 0 7 +inf 7 nan 7 +inf 7 +0 7 1 7 +0 N N
0 0 7 +inf 7 -inf 7 +inf 7 +0 7 1 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 1 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 1 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 nan 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +0 7 nan 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 1 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 1 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 1 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 1 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 1 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 1 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 1 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 1 7 -1 7 -inf N N
0 0 7 -inf 7 +inf 7 +inf 7 1 7 -1 7 -1 N N
0 0 7 -inf 7 nan 7 +inf 7 1 7 -1 7 -0 N N
0 0 7 -inf 7 nan 7 +inf 7 1 7 -1 7 +0 N N
0 0 7 -inf 7 -inf 7 +inf 7 1 7 -1 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 1 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 1 7 -1 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 1 7 -0 7 -inf N N
0 0 7 nan 7 +inf 7 +inf 7 1 7 -0 7 -1 N N
0 0 7 -inf 7 -inf 7 +inf 7 1 7 -0 7 -0 N N
0 0 7 -inf 7 -inf 7 +inf 7 1 7 -0 7 +0 N N
0 0 7 nan 7 -inf 7 +inf 7 1 7 -0 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 1 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 1 7 -0 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 1 7 +0 7 -inf N N
0 0 7 nan 7 +inf 7 +inf 7 1 7 +0 7 -1 N N
0 0 7 +inf 7 +inf 7 +inf 7 1 7 +0 7 -0 N N
0 0 7 +inf 7 +inf 7 +inf 7 1 7 +0 7 +0 N N
0 0 7 nan 7 -inf 7 +inf 7 1 7 +0 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 1 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 1 7 +0 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 1 7 1 7 -inf N N
0 0 7 +inf 7 +inf 7 +inf 7 1 7 1 7 -1 N N
0 0 7 +inf 7 nan 7 +inf 7 1 7 1 7 -0 N N
0 0 7 +inf 7 nan 7 +inf 7 1 7 1 7 +0 N N
0 0 7 +inf 7 -inf 7 +inf 7 1 7 1 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 1 7 1 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 1 7 1 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 1 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 1 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 1 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 1 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 1 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 1 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 1 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 1 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 1 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 1 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 1 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 1 7 nan 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 1 7 nan 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 -1 7 -inf N N
0 0 7 -inf 7 nan 7 +inf 7 +inf 7 -1 7 -1 N N
0 0 7 -inf 7 -inf 7 +inf 7 +inf 7 -1 7 -0 N N
0 0 7 -inf 7 -inf 7 +inf 7 +inf 7 -1 7 +0 N N
0 0 7 nan 7 -inf 7 +inf 7 +inf 7 -1 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 -1 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 -0 7 -inf N N
0 0 7 -inf 7 +inf 7 +inf 7 +inf 7 -0 7 -1 N N
0 0 7 -inf 7 -inf 7 +inf 7 +inf 7 -0 7 -0 N N
0 0 7 -inf 7 -inf 7 +inf 7 +inf 7 -0 7 +0 N N
0 0 7 +inf 7 -inf 7 +inf 7 +inf 7 -0 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 -0 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 +0 7 -inf N N
0 0 7 -inf 7 +inf 7 +inf 7 +inf 7 +0 7 -1 N N
0 0 7 +inf 7 +inf 7 +inf 7 +inf 7 +0 7 -0 N N
0 0 7 +inf 7 +inf 7 +inf 7 +inf 7 +0 7 +0 N N
0 0 7 +inf 7 -inf 7 +inf 7 +inf 7 +0 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 +0 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 1 7 -inf N N
0 0 7 nan 7 +inf 7 +inf 7 +inf 7 1 7 -1 N N
0 0 7 +inf 7 +inf 7 +inf 7 +inf 7 1 7 -0 N N
0 0 7 +inf 7 +inf 7 +inf 7 +inf 7 1 7 +0 N N
0 0 7 +inf 7 nan 7 +inf 7 +inf 7 1 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 1 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 1 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 nan 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 +inf 7 nan 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 -1 7 -inf N N
0 0 7 -inf 7 +inf 7 +inf 7 nan 7 -1 7 -1 N N
0 0 7 -inf 7 nan 7 +inf 7 nan 7 -1 7 -0 N N
0 0 7 -inf 7 nan 7 +inf 7 nan 7 -1 7 +0 N N
0 0 7 -inf 7 -inf 7 +inf 7 nan 7 -1 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 -1 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 -0 7 -inf N N
0 0 7 nan 7 +inf 7 +inf 7 nan 7 -0 7 -1 N N
0 0 7 -inf 7 nan 7 +inf 7 nan 7 -0 7 -0 N N
0 0 7 -inf 7 nan 7 +inf 7 nan 7 -0 7 +0 N N
0 0 7 nan 7 -inf 7 +inf 7 nan 7 -0 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 -0 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 +0 7 -inf N N
0 0 7 nan 7 +inf 7 +inf 7 nan 7 +0 7 -1 N N
0 0 7 +inf 7 nan 7 +inf 7 nan 7 +0 7 -0 N N
0 0 7 +inf 7 nan 7 +inf 7 nan 7 +0 7 +0 N N
0 0 7 nan 7 -inf 7 +inf 7 nan 7 +0 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 +0 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 1 7 -inf N N
0 0 7 +inf 7 +inf 7 +inf 7 nan 7 1 7 -1 N N
0 0 7 +inf 7 nan 7 +inf 7 nan 7 1 7 -0 N N
0 0 7 +inf 7 nan 7 +inf 7 nan 7 1 7 +0 N N
0 0 7 +inf 7 -inf 7 +inf 7 nan 7 1 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 1 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 1 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 nan 7 1 N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 +inf 7 nan 7 nan 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 -1 7 -inf N N
0 0 7 +inf 7 +inf 7 nan 7 -inf 7 -1 7 -1 N N
0 0 7 nan 7 +inf 7 nan 7 -inf 7 -1 7 -0 N N
0 0 7 nan 7 +inf 7 nan 7 -inf 7 -1 7 +0 N N
0 0 7 -inf 7 +inf 7 nan 7 -inf 7 -1 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 -1 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 -0 7 -inf N N
0 0 7 +inf 7 nan 7 nan 7 -inf 7 -0 7 -1 N N
0 0 7 nan 7 +inf 7 nan 7 -inf 7 -0 7 -0 N N
0 0 7 nan 7 +inf 7 nan 7 -inf 7 -0 7 +0 N N
0 0 7 -inf 7 nan 7 nan 7 -inf 7 -0 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 -0 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 +0 7 -inf N N
0 0 7 +inf 7 nan 7 nan 7 -inf 7 +0 7 -1 N N
0 0 7 nan 7 -inf 7 nan 7 -inf 7 +0 7 -0 N N
0 0 7 nan 7 -inf 7 nan 7 -inf 7 +0 7 +0 N N
0 0 7 -inf 7 nan 7 nan 7 -inf 7 +0 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 +0 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 1 7 -inf N N
0 0 7 +inf 7 -inf 7 nan 7 -inf 7 1 7 -1 N N
0 0 7 nan 7 -inf 7 nan 7 -inf 7 1 7 -0 N N
0 0 7 nan 7 -inf 7 nan 7 -inf 7 1 7 +0 N N
0 0 7 -inf 7 -inf 7 nan 7 -inf 7 1 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 1 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 nan 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -inf 7 nan 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -1 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -1 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -1 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -1 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -1 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -1 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -0 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -0 7 -1 N N
0 0 7 nan 7 +inf 7 nan 7 -1 7 -0 7 -0 N N
0 0 7 nan 7 +inf 7 nan 7 -1 7 -0 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -0 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -1 7 -0 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -1 7 +0 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 -1 7 +0 7 -1 N N
0 0 7 nan 7 -inf 7 nan 7 -1 7 +0 7 -0 N N
0 0 7 nan 7 -inf 7 nan 7 -1 7 +0 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 +0 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -1 7 +0 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -1 7 1 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 -1 7 1 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 1 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 1 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 1 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -1 7 1 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -1 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 -1 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -1 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -1 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 -1 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 nan 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -1 7 nan 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -1 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -1 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -1 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -1 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -1 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -1 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -0 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -0 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -0 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -0 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -0 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -0 7 -0 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -0 7 +0 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 -0 7 +0 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 +0 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 +0 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 +0 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -0 7 +0 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -0 7 1 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 -0 7 1 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 1 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 1 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 1 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -0 7 1 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -0 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 -0 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -0 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 nan 7 -0 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 -0 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 nan 7 1 N N
0 0 7 nan 7 nan 7 nan 7 -0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 -0 7 nan 7 nan N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -1 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -1 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -1 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -1 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -1 7 1 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -1 7 nan N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -0 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -0 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -0 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -0 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -0 7 1 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +0 7 -0 7 nan N N
0 0 7 nan 7 nan 7 nan 7 +0 7 +0 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 +0 7 +0 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 +0 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 +0 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 +0 7 1 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +0 7 +0 7 nan N N
0 0 7 nan 7 nan 7 nan 7 +0 7 1 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 +0 7 1 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 1 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 1 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 1 7 1 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +0 7 1 7 nan N N
0 0 7 nan 7 nan 7 nan 7 +0 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 +0 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +0 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 nan 7 +0 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 +0 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 nan 7 1 N N
0 0 7 nan 7 nan 7 nan 7 +0 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +0 7 nan 7 nan N N
0 0 7 nan 7 nan 7 nan 7 1 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 1 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 1 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 1 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 1 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 nan 7 1 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 1 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 nan 7 1 7 -1 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 1 7 -1 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 1 7 -1 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 1 7 -1 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 1 7 -1 7 1 N N
0 0 7 nan 7 nan 7 nan 7 1 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 1 7 -1 7 nan N N
0 0 7 nan 7 nan 7 nan 7 1 7 -0 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 1 7 -0 7 -1 N N
0 0 7 nan 7 -inf 7 nan 7 1 7 -0 7 -0 N N
0 0 7 nan 7 -inf 7 nan 7 1 7 -0 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 1 7 -0 7 1 N N
0 0 7 nan 7 nan 7 nan 7 1 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 1 7 -0 7 nan N N
0 0 7 nan 7 nan 7 nan 7 1 7 +0 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 1 7 +0 7 -1 N N
0 0 7 nan 7 +inf 7 nan 7 1 7 +0 7 -0 N N
0 0 7 nan 7 +inf 7 nan 7 1 7 +0 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 1 7 +0 7 1 N N
0 0 7 nan 7 nan 7 nan 7 1 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 1 7 +0 7 nan N N
0 0 7 nan 7 nan 7 nan 7 1 7 1 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 1 7 1 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 1 7 1 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 1 7 1 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 1 7 1 7 1 N N
0 0 7 nan 7 nan 7 nan 7 1 7 1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 1 7 1 7 nan N N
0 0 7 nan 7 nan 7 nan 7 1 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 1 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 1 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 1 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 1 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 nan 7 1 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 1 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 nan 7 1 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 1 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 1 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 1 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 1 7 nan 7 1 N N
0 0 7 nan 7 nan 7 nan 7 1 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 1 7 nan 7 nan N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 -1 7 -inf N N
0 0 7 -inf 7 -inf 7 nan 7 +inf 7 -1 7 -1 N N
0 0 7 nan 7 -inf 7 nan 7 +inf 7 -1 7 -0 N N
0 0 7 nan 7 -inf 7 nan 7 +inf 7 -1 7 +0 N N
0 0 7 +inf 7 -inf 7 nan 7 +inf 7 -1 7 1 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 -1 7 nan N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 -0 7 -inf N N
0 0 7 -inf 7 nan 7 nan 7 +inf 7 -0 7 -1 N N
0 0 7 nan 7 -inf 7 nan 7 +inf 7 -0 7 -0 N N
0 0 7 nan 7 -inf 7 nan 7 +inf 7 -0 7 +0 N N
0 0 7 +inf 7 nan 7 nan 7 +inf 7 -0 7 1 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 -0 7 nan N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 +0 7 -inf N N
0 0 7 -inf 7 nan 7 nan 7 +inf 7 +0 7 -1 N N
0 0 7 nan 7 +inf 7 nan 7 +inf 7 +0 7 -0 N N
0 0 7 nan 7 +inf 7 nan 7 +inf 7 +0 7 +0 N N
0 0 7 +inf 7 nan 7 nan 7 +inf 7 +0 7 1 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 +0 7 nan N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 1 7 -inf N N
0 0 7 -inf 7 +inf 7 nan 7 +inf 7 1 7 -1 N N
0 0 7 nan 7 +inf 7 nan 7 +inf 7 1 7 -0 N N
0 0 7 nan 7 +inf 7 nan 7 +inf 7 1 7 +0 N N
0 0 7 +inf 7 +inf 7 nan 7 +inf 7 1 7 1 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 1 7 nan N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 nan 7 1 N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 +inf 7 nan 7 nan N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -inf 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -inf 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -inf 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -inf 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -inf 7 1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -inf 7 nan N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -1 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -1 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -1 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -1 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -1 7 1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -1 7 nan N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -0 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -0 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -0 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -0 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -0 7 1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 -0 7 nan N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +0 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +0 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +0 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +0 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +0 7 1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +0 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +0 7 nan N N
0 0 7 nan 7 nan 7 nan 7 nan 7 1 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 1 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 1 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 1 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 1 7 1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 1 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 1 7 nan N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +inf 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +inf 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +inf 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +inf 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +inf 7 1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +inf 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 +inf 7 nan N N
0 0 7 nan 7 nan 7 nan 7 nan 7 nan 7 -inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 nan 7 -1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 nan 7 -0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 nan 7 +0 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 nan 7 1 N N
0 0 7 nan 7 nan 7 nan 7 nan 7 nan 7 +inf N N
0 0 7 nan 7 nan 7 nan 7 nan 7 nan 7 nan N N
# finite values
0 0 7 1 7 +0 7 -1 7 -1 7 -1 7 -1 N N
0 0 7 1 7 1 7 -1 7 -1 7 -1 7 -0 N N
0 0 7 1 7 1 7 -1 7 -1 7 -1 7 +0 N N
0 0 7 +0 7 1 7 -1 7 -1 7 -1 7 1 N N
0 0 7 1 7 -1 7 -1 7 -1 7 -0 7 -1 N N
0 0 7 +inf 7 +inf 7 -1 7 -1 7 -0 7 -0 N N
0 0 7 +inf 7 +inf 7 -1 7 -1 7 -0 7 +0 N N
0 0 7 -1 7 1 7 -1 7 -1 7 -0 7 1 N N
0 0 7 1 7 -1 7 -1 7 -1 7 +0 7 -1 N N
0 0 7 -inf 7 -inf 7 -1 7 -1 7 +0 7 -0 N N
0 0 7 -inf 7 -inf 7 -1 7 -1 7 +0 7 +0 N N
0 0 7 -1 7 1 7 -1 7 -1 7 +0 7 1 N N
0 0 7 +0 7 -1 7 -1 7 -1 7 1 7 -1 N N
0 0 7 -1 7 -1 7 -1 7 -1 7 1 7 -0 N N
0 0 7 -1 7 -1 7 -1 7 -1 7 1 7 +0 N N
0 0 7 -1 7 +0 7 -1 7 -1 7 1 7 1 N N
0 0 7 0.5 7 -0.5 7 -1 7 -0 7 -1 7 -1 N N
0 0 7 1 7 +0 7 -1 7 -0 7 -1 7 -0 N N
0 0 7 1 7 +0 7 -1 7 -0 7 -1 7 +0 N N
0 0 7 0.5 7 0.5 7 -1 7 -0 7 -1 7 1 N N
0 0 7 +0 7 -1 7 -1 7 -0 7 -0 7 -1 N N
0 0 7 +inf 7 nan 7 -1 7 -0 7 -0 7 -0 N N
0 0 7 +inf 7 nan 7 -1 7 -0 7 -0 7 +0 N N
0 0 7 +0 7 1 7 -1 7 -0 7 -0 7 1 N N
0 0 7 +0 7 -1 7 -1 7 -0 7 +0 7 -1 N N
0 0 7 -inf 7 nan 7 -1 7 -0 7 +0 7 -0 N N
0 0 7 -inf 7 nan 7 -1 7 -0 7 +0 7 +0 N N
0 0 7 -0 7 1 7 -1 7 -0 7 +0 7 1 N N
0 0 7 -0.5 7 -0.5 7 -1 7 -0 7 1 7 -1 N N
0 0 7 -1 7 -0 7 -1 7 -0 7 1 7 -0 N N
0 0 7 -1 7 +0 7 -1 7 -0 7 1 7 +0 N N
0 0 7 -0.5 7 0.5 7 -1 7 -0 7 1 7 1 N N
0 0 7 0.5 7 -0.5 7 -1 7 +0 7 -1 7 -1 N N
0 0 7 1 7 -0 7 -1 7 +0 7 -1 7 -0 N N
0 0 7 1 7 +0 7 -1 7 +0 7 -1 7 +0 N N
0 0 7 0.5 7 0.5 7 -1 7 +0 7 -1 7 1 N N
0 0 7 +0 7 -1 7 -1 7 +0 7 -0 7 -1 N N
0 0 7 +inf 7 nan 7 -1 7 +0 7 -0 7 -0 N N
0 0 7 +inf 7 nan 7 -1 7 +0 7 -0 7 +0 N N
0 0 7 +0 7 1 7 -1 7 +0 7 -0 7 1 N N
0 0 7 -0 7 -1 7 -1 7 +0 7 +0 7 -1 N N
0 0 7 -inf 7 nan 7 -1 7 +0 7 +0 7 -0 N N
0 0 7 -inf 7 nan 7 -1 7 +0 7 +0 7 +0 N N
0 0 7 +0 7 1 7 -1 7 +0 7 +0 7 1 N N
0 0 7 -0.5 7 -0.5 7 -1 7 +0 7 1 7 -1 N N
0 0 7 -1 7 +0 7 -1 7 +0 7 1 7 -0 N N
0 0 7 -1 7 +0 7 -1 7 +0 7 1 7 +0 N N
0 0 7 -0.5 7 0.5 7 -1 7 +0 7 1 7 1 N N
0 0 7 +0 7 -1 7 -1 7 1 7 -1 7 -1 N N
0 0 7 1 7 -1 7 -1 7 1 7 -1 7 -0 N N
0 0 7 1 7 -1 7 -1 7 1 7 -1 7 +0 N N
0 0 7 1 7 +0 7 -1 7 1 7 -1 7 1 N N
0 0 7 -1 7 -1 7 -1 7 1 7 -0 7 -1 N N
0 0 7 +inf 7 -inf 7 -1 7 1 7 -0 7 -0 N N
0 0 7 +inf 7 -inf 7 -1 7 1 7 -0 7 +0 N N
0 0 7 1 7 1 7 -1 7 1 7 -0 7 1 N N
0 0 7 -1 7 -1 7 -1 7 1 7 +0 7 -1 N N
0 0 7 -inf 7 +inf 7 -1 7 1 7 +0 7 -0 N N
0 0 7 -inf 7 +inf 7 -1 7 1 7 +0 7 +0 N N
0 0 7 1 7 1 7 -1 7 1 7 +0 7 1 N N
0 0 7 -1 7 +0 7 -1 7 1 7 1 7 -1 N N
0 0 7 -1 7 1 7 -1 7 1 7 1 7 -0 N N
0 0 7 -1 7 1 7 -1 7 1 7 1 7 +0 N N
0 0 7 +0 7 1 7 -1 7 1 7 1 7 1 N N
0 0 7 0.5 7 0.5 7 -0 7 -1 7 -1 7 -1 N N
0 0 7 +0 7 1 7 -0 7 -1 7 -1 7 -0 N N
0 0 7 +0 7 1 7 -0 7 -1 7 -1 7 +0 N N
0 0 7 -0.5 7 0.5 7 -0 7 -1 7 -1 7 1 N N
0 0 7 1 7 +0 7 -0 7 -1 7 -0 7 -1 N N
0 0 7 nan 7 +inf 7 -0 7 -1 7 -0 7 -0 N N
0 0 7 nan 7 +inf 7 -0 7 -1 7 -0 7 +0 N N
0 0 7 -1 7 +0 7 -0 7 -1 7 -0 7 1 N N
0 0 7 1 7 -0 7 -0 7 -1 7 +0 7 -1 N N
0 0 7 nan 7 -inf 7 -0 7 -1 7 +0 7 -0 N N
0 0 7 nan 7 -inf 7 -0 7 -1 7 +0 7 +0 N N
0 0 7 -1 7 +0 7 -0 7 -1 7 +0 7 1 N N
0 0 7 0.5 7 -0.5 7 -0 7 -1 7 1 7 -1 N N
0 0 7 +0 7 -1 7 -0 7 -1 7 1 7 -0 N N
0 0 7 -0 7 -1 7 -0 7 -1 7 1 7 +0 N N
0 0 7 -0.5 7 -0.5 7 -0 7 -1 7 1 7 1 N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -1 7 -1 N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -1 7 -0 N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -1 7 +0 N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -1 7 1 N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -0 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 -0 7 -0 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 -0 7 -0 7 +0 N N
0 0 7 +0 7 +0 7 -0 7 -0 7 -0 7 1 N N
0 0 7 +0 7 -0 7 -0 7 -0 7 +0 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 -0 7 +0 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 -0 7 +0 7 +0 N N
0 0 7 -0 7 +0 7 -0 7 -0 7 +0 7 1 N N
0 0 7 +0 7 -0 7 -0 7 -0 7 1 7 -1 N N
0 0 7 +0 7 -0 7 -0 7 -0 7 1 7 -0 N N
0 0 7 -0 7 +0 7 -0 7 -0 7 1 7 +0 N N
0 0 7 -0 7 +0 7 -0 7 -0 7 1 7 1 N N
0 0 7 +0 7 -0 7 -0 7 +0 7 -1 7 -1 N N
0 0 7 +0 7 -0 7 -0 7 +0 7 -1 7 -0 N N
0 0 7 +0 7 +0 7 -0 7 +0 7 -1 7 +0 N N
0 0 7 +0 7 +0 7 -0 7 +0 7 -1 7 1 N N
0 0 7 +0 7 -0 7 -0 7 +0 7 -0 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 +0 7 -0 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 +0 7 -0 7 +0 N N
0 0 7 +0 7 +0 7 -0 7 +0 7 -0 7 1 N N
0 0 7 -0 7 +0 7 -0 7 +0 7 +0 7 -1 N N
0 0 7 nan 7 nan 7 -0 7 +0 7 +0 7 -0 N N
0 0 7 nan 7 nan 7 -0 7 +0 7 +0 7 +0 N N
0 0 7 +0 7 +0 7 -0 7 +0 7 +0 7 1 N N
0 0 7 -0 7 +0 7 -0 7 +0 7 1 7 -1 N N
0 0 7 -0 7 +0 7 -0 7 +0 7 1 7 -0 N N
0 0 7 +0 7 +0 7 -0 7 +0 7 1 7 +0 N N
0 0 7 +0 7 +0 7 -0 7 +0 7 1 7 1 N N
0 0 7 -0.5 7 -0.5 7 -0 7 1 7 -1 7 -1 N N
0 0 7 +0 7 -1 7 -0 7 1 7 -1 7 -0 N N
0 0 7 +0 7 -1 7 -0 7 1 7 -1 7 +0 N N
0 0 7 0.5 7 -0.5 7 -0 7 1 7 -1 7 1 N N
0 0 7 -1 7 -0 7 -0 7 1 7 -0 7 -1 N N
0 0 7 nan 7 -inf 7 -0 7 1 7 -0 7 -0 N N
0 0 7 nan 7 -inf 7 -0 7 1 7 -0 7 +0 N N
0 0 7 1 7 +0 7 -0 7 1 7 -0 7 1 N N
0 0 7 -1 7 +0 7 -0 7 1 7 +0 7 -1 N N
0 0 7 nan 7 +inf 7 -0 7 1 7 +0 7 -0 N N
0 0 7 nan 7 +inf 7 -0 7 1 7 +0 7 +0 N N
0 0 7 1 7 +0 7 -0 7 1 7 +0 7 1 N N
0 0 7 -0.5 7 0.5 7 -0 7 1 7 1 7 -1 N N
0 0 7 -0 7 1 7 -0 7 1 7 1 7 -0 N N
0 0 7 +0 7 1 7 -0 7 1 7 1 7 +0 N N
0 0 7 0.5 7 0.5 7 -0 7 1 7 1 7 1 N N
0 0 7 0.5 7 0.5 7 +0 7 -1 7 -1 7 -1 N N
0 0 7 +0 7 1 7 +0 7 -1 7 -1 7 -0 N N
0 0 7 -0 7 1 7 +0 7 -1 7 -1 7 +0 N N
0 0 7 -0.5 7 0.5 7 +0 7 -1 7 -1 7 1 N N
0 0 7 1 7 +0 7 +0 7 -1 7 -0 7 -1 N N
0 0 7 nan 7 +inf 7 +0 7 -1 7 -0 7 -0 N N
0 0 7 nan 7 +inf 7 +0 7 -1 7 -0 7 +0 N N
0 0 7 -1 7 +0 7 +0 7 -1 7 -0 7 1 N N
0 0 7 1 7 +0 7 +0 7 -1 7 +0 7 -1 N N
0 0 7 nan 7 -inf 7 +0 7 -1 7 +0 7 -0 N N
0 0 7 nan 7 -inf 7 +0 7 -1 7 +0 7 +0 N N
0 0 7 -1 7 -0 7 +0 7 -1 7 +0 7 1 N N
0 0 7 0.5 7 -0.5 7 +0 7 -1 7 1 7 -1 N N
0 0 7 +0 7 -1 7 +0 7 -1 7 1 7 -0 N N
0 0 7 +0 7 -1 7 +0 7 -1 7 1 7 +0 N N
0 0 7 -0.5 7 -0.5 7 +0 7 -1 7 1 7 1 N N
0 0 7 +0 7 +0 7 +0 7 -0 7 -1 7 -1 N N
0 0 7 +0 7 +0 7 +0 7 -0 7 -1 7 -0 N N
0 0 7 -0 7 +0 7 +0 7 -0 7 -1 7 +0 N N
0 0 7 -0 7 +0 7 +0 7 -0 7 -1 7 1 N N
0 0 7 +0 7 +0 7 +0 7 -0 7 -0 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 -0 7 -0 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 -0 7 -0 7 +0 N N
0 0 7 -0 7 +0 7 +0 7 -0 7 -0 7 1 N N
0 0 7 +0 7 +0 7 +0 7 -0 7 +0 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 -0 7 +0 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 -0 7 +0 7 +0 N N
0 0 7 +0 7 -0 7 +0 7 -0 7 +0 7 1 N N
0 0 7 +0 7 +0 7 +0 7 -0 7 1 7 -1 N N
0 0 7 +0 7 +0 7 +0 7 -0 7 1 7 -0 N N
0 0 7 +0 7 -0 7 +0 7 -0 7 1 7 +0 N N
0 0 7 +0 7 -0 7 +0 7 -0 7 1 7 1 N N
0 0 7 -0 7 +0 7 +0 7 +0 7 -1 7 -1 N N
0 0 7 -0 7 +0 7 +0 7 +0 7 -1 7 -0 N N
0 0 7 +0 7 -0 7 +0 7 +0 7 -1 7 +0 N N
0 0 7 +0 7 -0 7 +0 7 +0 7 -1 7 1 N N
0 0 7 -0 7 +0 7 +0 7 +0 7 -0 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 +0 7 -0 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 +0 7 -0 7 +0 N N
0 0 7 +0 7 -0 7 +0 7 +0 7 -0 7 1 N N
0 0 7 +0 7 +0 7 +0 7 +0 7 +0 7 -1 N N
0 0 7 nan 7 nan 7 +0 7 +0 7 +0 7 -0 N N
0 0 7 nan 7 nan 7 +0 7 +0 7 +0 7 +0 N N
0 0 7 +0 7 +0 7 +0 7 +0 7 +0 7 1 N N
0 0 7 +0 7 +0 7 +0 7 +0 7 1 7 -1 N N
0 0 7 +0 7 +0 7 +0 7 +0 7 1 7 -0 N N
0 0 7 +0 7 +0 7 +0 7 +0 7 1 7 +0 N N
0 0 7 +0 7 +0 7 +0 7 +0 7 1 7 1 N N
0 0 7 -0.5 7 -0.5 7 +0 7 1 7 -1 7 -1 N N
0 0 7 -0 7 -1 7 +0 7 1 7 -1 7 -0 N N
0 0 7 +0 7 -1 7 +0 7 1 7 -1 7 +0 N N
0 0 7 0.5 7 -0.5 7 +0 7 1 7 -1 7 1 N N
0 0 7 -1 7 +0 7 +0 7 1 7 -0 7 -1 N N
0 0 7 nan 7 -inf 7 +0 7 1 7 -0 7 -0 N N
0 0 7 nan 7 -inf 7 +0 7 1 7 -0 7 +0 N N
0 0 7 1 7 -0 7 +0 7 1 7 -0 7 1 N N
0 0 7 -1 7 +0 7 +0 7 1 7 +0 7 -1 N N
0 0 7 nan 7 +inf 7 +0 7 1 7 +0 7 -0 N N
0 0 7 nan 7 +inf 7 +0 7 1 7 +0 7 +0 N N
0 0 7 1 7 +0 7 +0 7 1 7 +0 7 1 N N
0 0 7 -0.5 7 0.5 7 +0 7 1 7 1 7 -1 N N
0 0 7 +0 7 1 7 +0 7 1 7 1 7 -0 N N
0 0 7 +0 7 1 7 +0 7 1 7 1 7 +0 N N
0 0 7 0.5 7 0.5 7 +0 7 1 7 1 7 1 N N
0 0 7 +0 7 1 7 1 7 -1 7 -1 7 -1 N N
0 0 7 -1 7 1 7 1 7 -1 7 -1 7 -0 N N
0 0 7 -1 7 1 7 1 7 -1 7 -1 7 +0 N N
0 0 7 -1 7 +0 7 1 7 -1 7 -1 7 1 N N
0 0 7 1 7 1 7 1 7 -1 7 -0 7 -1 N N
0 0 7 -inf 7 +inf 7 1 7 -1 7 -0 7 -0 N N
0 0 7 -inf 7 +inf 7 1 7 -1 7 -0 7 +0 N N
0 0 7 -1 7 -1 7 1 7 -1 7 -0 7 1 N N
0 0 7 1 7 1 7 1 7 -1 7 +0 7 -1 N N
0 0 7 +inf 7 -inf 7 1 7 -1 7 +0 7 -0 N N
0 0 7 +inf 7 -inf 7 1 7 -1 7 +0 7 +0 N N
0 0 7 -1 7 -1 7 1 7 -1 7 +0 7 1 N N
0 0 7 1 7 +0 7 1 7 -1 7 1 7 -1 N N
0 0 7 1 7 -1 7 1 7 -1 7 1 7 -0 N N
0 0 7 1 7 -1 7 1 7 -1 7 1 7 +0 N N
0 0 7 +0 7 -1 7 1 7 -1 7 1 7 1 N N
0 0 7 -0.5 7 0.5 7 1 7 -0 7 -1 7 -1 N N
0 0 7 -1 7 +0 7 1 7 -0 7 -1 7 -0 N N
0 0 7 -1 7 +0 7 1 7 -0 7 -1 7 +0 N N
0 0 7 -0.5 7 -0.5 7 1 7 -0 7 -1 7 1 N N
0 0 7 +0 7 1 7 1 7 -0 7 -0 7 -1 N N
0 0 7 -inf 7 nan 7 1 7 -0 7 -0 7 -0 N N
0 0 7 -inf 7 nan 7 1 7 -0 7 -0 7 +0 N N
0 0 7 -0 7 -1 7 1 7 -0 7 -0 7 1 N N
0 0 7 +0 7 1 7 1 7 -0 7 +0 7 -1 N N
0 0 7 +inf 7 nan 7 1 7 -0 7 +0 7 -0 N N
0 0 7 +inf 7 nan 7 1 7 -0 7 +0 7 +0 N N
0 0 7 +0 7 -1 7 1 7 -0 7 +0 7 1 N N
0 0 7 0.5 7 0.5 7 1 7 -0 7 1 7 -1 N N
0 0 7 1 7 +0 7 1 7 -0 7 1 7 -0 N N
0 0 7 1 7 -0 7 1 7 -0 7 1 7 +0 N N
0 0 7 0.5 7 -0.5 7 1 7 -0 7 1 7 1 N N
0 0 7 -0.5 7 0.5 7 1 7 +0 7 -1 7 -1 N N
0 0 7 -1 7 +0 7 1 7 +0 7 -1 7 -0 N N
0 0 7 -1 7 -0 7 1 7 +0 7 -1 7 +0 N N
0 0 7 -0.5 7 -0.5 7 1 7 +0 7 -1 7 1 N N
0 0 7 -0 7 1 7 1 7 +0 7 -0 7 -1 N N
0 0 7 -inf 7 nan 7 1 7 +0 7 -0 7 -0 N N
0 0 7 -inf 7 nan 7 1 7 +0 7 -0 7 +0 N N
0 0 7 +0 7 -1 7 1 7 +0 7 -0 7 1 N N
0 0 7 +0 7 1 7 1 7 +0 7 +0 7 -1 N N
0 0 7 +inf 7 nan 7 1 7 +0 7 +0 7 -0 N N
0 0 7 +inf 7 nan 7 1 7 +0 7 +0 7 +0 N N
0 0 7 +0 7 -1 7 1 7 +0 7 +0 7 1 N N
0 0 7 0.5 7 0.5 7 1 7 +0 7 1 7 -1 N N
0 0 7 1 7 +0 7 1 7 +0 7 1 7 -0 N N
0 0 7 1 7 +0 7 1 7 +0 7 1 7 +0 N N
0 0 7 0.5 7 -0.5 7 1 7 +0 7 1 7 1 N N
0 0 7 -1 7 +0 7 1 7 1 7 -1 7 -1 N N
0 0 7 -1 7 -1 7 1 7 1 7 -1 7 -0 N N
0 0 7 -1 7 -1 7 1 7 1 7 -1 7 +0 N N
0 0 7 +0 7 -1 7 1 7 1 7 -1 7 1 N N
0 0 7 -1 7 1 7 1 7 1 7 -0 7 -1 N N
0 0 7 -inf 7 -inf 7 1 7 1 7 -0 7 -0 N N
0 0 7 -inf 7 -inf 7 1 7 1 7 -0 7 +0 N N
0 0 7 1 7 -1 7 1 7 1 7 -0 7 1 N N
0 0 7 -1 7 1 7 1 7 1 7 +0 7 -1 N N
0 0 7 +inf 7 +inf 7 1 7 1 7 +0 7 -0 N N
0 0 7 +inf 7 +inf 7 1 7 1 7 +0 7 +0 N N
0 0 7 1 7 -1 7 1 7 1 7 +0 7 1 N N
0 0 7 +0 7 1 7 1 7 1 7 1 7 -1 N N
0 0 7 1 7 1 7 1 7 1 7 1 7 -0 N N
0 0 7 1 7 1 7 1 7 1 7 1 7 +0 N N
0 0 7 1 7 +0 7 1 7 1 7 1 7 1 N N
# small exact/inexact examples
- - 10 0b1.01010001 10 -0b1.1000101@-6 10 973 10 964 10 725 10 745 N N
0 0 10 -14 10 9 10 -837 10 637 10 63 10 -5 N N
0 0 2 2 2 -1 2 4 2 3 2 1 2 2 N N
+ - 4 1.375 4 1.25 4 15 4 14 4 11 4 0 N N
# Bug 20080923
+ + 4 0b11@527 4 -0b111@-489 4 -0b11@-206 4 0 4 -0b1@-733 4 -0b101@-1750 N Z
# potential intermediate over- or underflow
0 0 10 1 10 0 10 0 10 0b1@536870912 10 0 10 0b1@536870912 N N
0 0 10 1 10 0 10 0b1@536870912 10 0 10 0b1@536870912 10 0 N N
# overflow (reported by Emmanuel Thome)
- + 250 -inf 250 +inf 250 1 250 0 250 -1e-164895850 250 -1e-164895850 N N
# bug found by tgeneric of ui_div
+ + 2 0b1.1@256 2 0b1.1@-2758 34 52349199244 2 0 2 0b1.1@-221 2 -0b1@-3234 U N
# cases that should yield 1, but cannot be handled due to intermediate
# over- or underflows
# current result: (@NaN@ 0)
#0 0 10 1 10 0 10 1 10 0b1@536870912 10 1 10 0b1@536870912 N N
# current result: (@Inf@ 0)
#0 0 10 1 10 0 10 1 10 0b1@-536870913 10 1 10 0b1@-536870913 N N
# current result: (@NaN@ 0)
#0 0 10 1 10 0 10 0b1@536870912 10 0b1@536870912 10 0b1@536870912 10 0b1@536870912 N N
# current result: (@NaN@ 0)
#0 0 10 1 10 0 10 0b1@-536870913 10 0b1@-536870913 10 0b1@-536870913 10 0b1@-536870913 N N
# current result: (@Inf@ 0)
#0 0 10 1 10 0 10 0b1@536870912 10 0b1@-536870913 10 0b1@536870912 10 0b1@-536870913 N N
# cases that should yield i, but cannot be handled due to intermediate
# over- or underflows
# current result: (0 @Inf@)
#0 0 10 0 10 1 10 -0b1@536870912 10 1 10 1 10 0b1@536870912 N N
# current result: (@NaN@ 1.0)
#0 0 10 0 10 1 10 -0b1@-536870913 10 1 10 1 10 0b1@-536870913 N N
# current result: (0 @Inf@)
#0 0 10 0 10 1 10 -0b1@536870912 10 0b1@536870912 10 0b1@536870912 10 0b1@536870912 N N
# current result: (@NaN@ 0)
#0 0 10 0 10 1 10 -0b1@-536870913 10 0b1@-536870913 10 0b1@-536870913 10 0b1@-536870913 N N
# current result: (@NaN@ @Inf@)
#0 0 10 0 10 1 10 -0b1@-536870913 10 0b1@536870912 10 0b1@536870912 10 0b1@-536870913 N N
# examples to exercise overflow (re)
# positive overflow
+ 0 2 inf 2 0 10 0x3ffp1073741811 10 0x3ffp1073741811 10 0x2abp-10 10 0x2abp-10 N N
# negative overflow
- 0 2 -inf 2 0 10 -0x3ffp1073741811 10 -0x3ffp1073741811 10 0x2abp-10 10 0x2abp-10 N N
# examples to exercise overflow (im)
# positive overflow
0 + 2 0 2 inf 10 0x3ffp1073741811 10 0x3ffp1073741811 10 0x2abp-10 10 -0x2abp-10 N N
# negative overflow
0 - 2 0 2 -inf 10 -0x3ffp1073741811 10 -0x3ffp1073741811 10 0x2abp-10 10 -0x2abp-10 N N
# examples to exercise underflow
# (1.5+i)*2^emin/(1-i) gives (0.25 + 1.25*i)*2^emin
- - 2 0 2 0x1p-1073741823 2 0x3p-1073741824 2 0x1p-1073741823 2 1 2 -1 Z Z
# (1.5+i)*2^emin/(1+i) gives (1.25 - 0.25*i)*2^emin
- + 2 0x1p-1073741823 2 -0 2 0x3p-1073741824 2 0x1p-1073741823 2 1 2 1 Z Z
mpc-1.1.0/tests/tmul_fr.c 0000644 0001751 0001751 00000002372 12471661720 012203 0000000 0000000 /* tmul_fr -- test file for mpc_mul_fr.
Copyright (C) 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_mul_fr (P[1].mpc, P[2].mpc, P[3].mpfr, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_mul_fr (P[1].mpc, P[1].mpc, P[3].mpfr, P[4].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("mul_fr.dsc", "mul_fr.dat");
tgeneric_template ("mul_fr.dsc", 2, 1024, 7, -1);
test_end ();
return 0;
}
mpc-1.1.0/tests/conj.dat 0000644 0001751 0001751 00000012612 12426164730 012007 0000000 0000000 # Data file for mpc_conj.
#
# Copyright (C) 2008, 2012 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# The line format respects the parameter order in function prototype as
# follow:
#
# INEX_RE INEX_IM PREC_ROP_RE ROP_RE PREC_ROP_IM ROP_IM PREC_OP_RE OP_RE PREC_OP_IM OP_IM RND_RE RND_IM
#
# see sin.dat for precisions
# special values (following ISO C99 standard)
0 0 53 -inf 53 +inf 53 -inf 53 -inf N N
0 0 53 -inf 53 +1 53 -inf 53 -1 N N
0 0 53 -inf 53 +0 53 -inf 53 -0 N N
0 0 53 -inf 53 -0 53 -inf 53 +0 N N
0 0 53 -inf 53 -1 53 -inf 53 +1 N N
0 0 53 -inf 53 -inf 53 -inf 53 +inf N N
0 0 53 -inf 53 nan 53 -inf 53 nan N N
0 0 53 -1 53 +inf 53 -1 53 -inf N N
0 0 53 -1 53 +0 53 -1 53 -0 N N
0 0 53 -1 53 -0 53 -1 53 +0 N N
0 0 53 -1 53 -inf 53 -1 53 +inf N N
0 0 53 -1 53 nan 53 -1 53 nan N N
0 0 53 -0 53 +inf 53 -0 53 -inf N N
0 0 53 -0 53 +1 53 -0 53 -1 N N
0 0 53 -0 53 +0 53 -0 53 -0 N N
0 0 53 -0 53 -0 53 -0 53 +0 N N
0 0 53 -0 53 -1 53 -0 53 +1 N N
0 0 53 -0 53 -inf 53 -0 53 +inf N N
0 0 53 -0 53 nan 53 -0 53 nan N N
0 0 53 +0 53 +inf 53 +0 53 -inf N N
0 0 53 +0 53 +1 53 +0 53 -1 N N
0 0 53 +0 53 +0 53 +0 53 -0 N N
0 0 53 +0 53 -0 53 +0 53 +0 N N
0 0 53 +0 53 -1 53 +0 53 +1 N N
0 0 53 +0 53 -inf 53 +0 53 +inf N N
0 0 53 +0 53 nan 53 +0 53 nan N N
0 0 53 +1 53 +inf 53 +1 53 -inf N N
0 0 53 +1 53 +0 53 +1 53 -0 N N
0 0 53 +1 53 -0 53 +1 53 +0 N N
0 0 53 +1 53 -inf 53 +1 53 +inf N N
0 0 53 +1 53 nan 53 +1 53 nan N N
0 0 53 +inf 53 +inf 53 +inf 53 -inf N N
0 0 53 +inf 53 +1 53 +inf 53 -1 N N
0 0 53 +inf 53 +0 53 +inf 53 -0 N N
0 0 53 +inf 53 -0 53 +inf 53 +0 N N
0 0 53 +inf 53 -1 53 +inf 53 +1 N N
0 0 53 +inf 53 -inf 53 +inf 53 +inf N N
0 0 53 +inf 53 nan 53 +inf 53 nan N N
0 0 53 nan 53 +inf 53 nan 53 -inf N N
0 0 53 nan 53 +1 53 nan 53 -1 N N
0 0 53 nan 53 +0 53 nan 53 -0 N N
0 0 53 nan 53 -0 53 nan 53 +0 N N
0 0 53 nan 53 -1 53 nan 53 +1 N N
0 0 53 nan 53 -inf 53 nan 53 +inf N N
0 0 53 nan 53 nan 53 nan 53 nan N N
# pure real argument
0 0 53 0x123456789abcdep+52 2 -0 53 0x123456789abcdep+52 17 +0 N N
0 0 53 -0x123456789abcdep+52 3 -0 54 -0x123456789abcdep+52 16 +0 Z N
0 0 53 0x123456789abcdep+52 4 +0 55 0x123456789abcdep+52 15 -0 U N
0 0 53 -0x123456789abcdep+52 5 +0 56 -0x123456789abcdep+52 14 -0 D N
0 0 53 0x123456789abcdep+52 6 -0 57 0x123456789abcdep+52 13 +0 Z Z
0 0 53 -0x123456789abcdep+52 7 -0 58 -0x123456789abcdep+52 12 +0 U Z
0 0 53 0x123456789abcdep+52 8 +0 59 0x123456789abcdep+52 11 -0 D Z
0 0 53 -0x123456789abcdep+52 9 +0 60 -0x123456789abcdep+52 10 -0 N Z
0 0 53 0x123456789abcdep+52 10 -0 61 0x123456789abcdep+52 9 +0 U U
0 0 53 -0x123456789abcdep+52 11 -0 62 -0x123456789abcdep+52 8 +0 D U
0 0 53 0x123456789abcdep+52 12 +0 63 0x123456789abcdep+52 7 -0 N U
0 0 53 -0x123456789abcdep+52 13 +0 64 -0x123456789abcdep+52 6 -0 Z U
0 0 53 0x123456789abcdep+52 14 -0 65 0x123456789abcdep+52 5 +0 D D
0 0 53 -0x123456789abcdep+52 15 -0 66 -0x123456789abcdep+52 4 +0 N D
0 0 53 0x123456789abcdep+52 16 +0 67 0x123456789abcdep+52 3 -0 Z D
0 0 53 -0x123456789abcdep+52 17 +0 68 -0x123456789abcdep+52 2 -0 U D
# pure imaginary argument
0 0 53 +0 53 -0x123456789abcdep+52 53 +0 53 0x123456789abcdep+52 N N
0 0 53 -0 53 -0x123456789abcdep+52 51 -0 54 0x123456789abcdep+52 Z N
0 0 53 +0 53 0x123456789abcdep+52 49 +0 55 -0x123456789abcdep+52 U N
0 0 53 -0 53 0x123456789abcdep+52 47 -0 56 -0x123456789abcdep+52 D N
0 0 53 +0 53 -0x123456789abcdep+52 45 +0 57 0x123456789abcdep+52 Z Z
0 0 53 -0 53 -0x123456789abcdep+52 43 -0 58 0x123456789abcdep+52 U Z
0 0 53 +0 53 0x123456789abcdep+52 41 +0 59 -0x123456789abcdep+52 D Z
0 0 53 -0 53 0x123456789abcdep+52 39 -0 60 -0x123456789abcdep+52 N Z
0 0 53 +0 53 -0x123456789abcdep+52 37 +0 61 0x123456789abcdep+52 U U
0 0 53 -0 53 -0x123456789abcdep+52 35 -0 62 0x123456789abcdep+52 D U
0 0 53 +0 53 0x123456789abcdep+52 33 +0 63 -0x123456789abcdep+52 N U
0 0 53 -0 53 0x123456789abcdep+52 31 -0 64 -0x123456789abcdep+52 Z U
0 0 53 +0 53 -0x123456789abcdep+52 29 +0 65 0x123456789abcdep+52 D D
0 0 53 -0 53 -0x123456789abcdep+52 27 -0 66 0x123456789abcdep+52 N D
0 0 53 +0 53 0x123456789abcdep+52 25 +0 67 -0x123456789abcdep+52 Z D
0 0 53 -0 53 0x123456789abcdep+52 23 -0 68 -0x123456789abcdep+52 U D
# non-exact return values
- - 2 4 2 -8 3 5 3 7 N N
- + 2 4 2 -6 3 5 3 7 D U
+ - 2 6 2 -8 3 5 3 7 U D
- + 2 4 2 -6 3 5 3 7 Z Z
mpc-1.1.0/tests/tpow.c 0000644 0001751 0001751 00000004256 12471661720 011527 0000000 0000000 /* tpow -- test file for mpc_pow.
Copyright (C) 2009, 2011, 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
static void
reuse_bug (void)
{
/* bug found by the automatic builds on
http://hydra.nixos.org/build/1469029/log/raw */
mpc_t x, y, z;
mp_prec_t prec = 2;
for (prec = 2; prec <= 20; prec ++)
{
mpc_init2 (x, prec);
mpc_init2 (y, prec);
mpc_init2 (z, prec);
mpfr_set_ui (mpc_realref (x), 0ul, MPFR_RNDN);
mpfr_set_ui_2exp (mpc_imagref (x), 3ul, -2, MPFR_RNDN);
mpc_set_ui (y, 8ul, MPC_RNDNN);
mpc_pow (z, x, y, MPC_RNDNN);
mpc_pow (y, x, y, MPC_RNDNN);
if (mpfr_signbit (mpc_imagref (y)) != mpfr_signbit (mpc_imagref (z)))
{
printf ("Error: regression, reuse_bug reproduced\n");
exit (1);
}
mpc_clear (x);
mpc_clear (y);
mpc_clear (z);
}
}
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_pow (P[1].mpc, P[2].mpc, P[3].mpc, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_pow (P[1].mpc, P[1].mpc, P[3].mpc, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP2 \
P[0].mpc_inex = mpc_pow (P[1].mpc, P[2].mpc, P[1].mpc, P[4].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
reuse_bug ();
data_check_template ("pow.dsc", "pow.dat");
tgeneric_template ("pow.dsc", 2, 1024, 7, 10);
test_end ();
return 0;
}
mpc-1.1.0/tests/tpl_gmp.c 0000644 0001751 0001751 00000003164 12471661720 012175 0000000 0000000 /* tpl_gmp.c -- Helper functions for mpfr data.
Copyright (C) 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
void
tpl_read_mpz (mpc_datafile_context_t* datafile_context, mpz_t mpz)
{
if (datafile_context->nextchar == EOF) {
printf ("Error: Unexpected EOF when reading mpz "
"in file '%s' line %lu\n",
datafile_context->pathname, datafile_context->line_number);
exit (1);
}
ungetc (datafile_context->nextchar, datafile_context->fd);
if (mpz_inp_str (mpz, datafile_context->fd, 0) == 0) {
printf ("Error: Impossible to read mpz "
"in file '%s' line %lu\n",
datafile_context->pathname, datafile_context->line_number);
exit (1);
}
datafile_context->nextchar = getc (datafile_context->fd);
tpl_skip_whitespace_comments (datafile_context);
}
int
tpl_same_mpz_value (mpz_ptr z1, mpz_ptr z2)
{
return mpz_cmp (z1, z2) == 0;
}
void
tpl_copy_mpz (mpz_ptr dest, mpz_srcptr src)
{
mpz_set (dest, src);
}
mpc-1.1.0/tests/tset.c 0000644 0001751 0001751 00000032561 12471661720 011515 0000000 0000000 /* tset -- Test file for mpc_set_x and mpc_set_x_x functions.
Copyright (C) 2009, 2010, 2011, 2012 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "config.h"
#include /* for LONG_MAX */
#ifdef HAVE_INTTYPES_H
# include /* for intmax_t */
#else
# ifdef HAVE_STDINT_H
# include
# endif
#endif
#ifdef HAVE_COMPLEX_H
# include
#endif
#ifdef HAVE_LOCALE_H
#include
#endif
#include "mpc-tests.h"
#define PRINT_ERROR(function_name, precision, a) \
do { \
printf ("Error in "function_name" for prec = %lu\n", \
(unsigned long int) precision); \
MPC_OUT(a); \
exit (1); \
} while (0)
/* test MPC_SET_X_Y through some functions */
static int
mpc_set_ui_fr (mpc_ptr z, unsigned long int a, mpfr_srcptr b, mpc_rnd_t rnd)
MPC_SET_X_Y (ui, fr, z, a, b, rnd)
static int
mpc_set_fr_ui (mpc_ptr z, mpfr_srcptr a, unsigned long int b, mpc_rnd_t rnd)
MPC_SET_X_Y (fr, ui, z, a, b, rnd)
static int
mpc_set_f_si (mpc_ptr z, mpf_t a, long int b, mpc_rnd_t rnd)
MPC_SET_X_Y (f, si, z, a, b, rnd)
static void
check_set (void)
{
long int lo;
mpz_t mpz;
mpq_t mpq;
mpf_t mpf;
mpfr_t fr;
mpc_t x, z;
mpfr_prec_t prec;
mpz_init (mpz);
mpq_init (mpq);
mpf_init2 (mpf, 1000);
mpfr_init2 (fr, 1000);
mpc_init2 (x, 1000);
mpc_init2 (z, 1000);
mpz_set_ui (mpz, 0x4217);
mpq_set_si (mpq, -1, 0x4321);
mpf_set_q (mpf, mpq);
for (prec = 2; prec <= 1000; prec++)
{
unsigned long int u = (unsigned long int) prec;
mpc_set_prec (z, prec);
mpfr_set_prec (fr, prec);
lo = -prec;
mpfr_set_d (fr, 1.23456789, MPFR_RNDN);
mpc_set_d (z, 1.23456789, MPC_RNDNN);
if (mpfr_cmp (mpc_realref(z), fr) != 0 || mpfr_cmp_si (mpc_imagref(z), 0) != 0)
PRINT_ERROR ("mpc_set_d", prec, z);
#if defined HAVE_COMPLEX_H
mpc_set_dc (z, I*1.23456789+1.23456789, MPC_RNDNN);
if (mpfr_cmp (mpc_realref(z), fr) != 0 || mpfr_cmp (mpc_imagref(z), fr) != 0)
PRINT_ERROR ("mpc_set_c", prec, z);
#endif
mpc_set_ui (z, u, MPC_RNDNN);
if (mpfr_cmp_ui (mpc_realref(z), u) != 0
|| mpfr_cmp_ui (mpc_imagref(z), 0) != 0)
PRINT_ERROR ("mpc_set_ui", prec, z);
mpc_set_d_d (z, 1.23456789, 1.23456789, MPC_RNDNN);
if (mpfr_cmp (mpc_realref(z), fr) != 0 || mpfr_cmp (mpc_imagref(z), fr) != 0)
PRINT_ERROR ("mpc_set_d_d", prec, z);
mpc_set_si (z, lo, MPC_RNDNN);
if (mpfr_cmp_si (mpc_realref(z), lo) != 0 || mpfr_cmp_ui (mpc_imagref(z), 0) != 0)
PRINT_ERROR ("mpc_set_si", prec, z);
mpfr_set_ld (fr, 1.23456789L, MPFR_RNDN);
mpc_set_ld_ld (z, 1.23456789L, 1.23456789L, MPC_RNDNN);
if (mpfr_cmp (mpc_realref(z), fr) != 0 || mpfr_cmp (mpc_imagref(z), fr) != 0)
PRINT_ERROR ("mpc_set_ld_ld", prec, z);
#if defined HAVE_COMPLEX_H
mpc_set_ldc (z, I*1.23456789L+1.23456789L, MPC_RNDNN);
if (mpfr_cmp (mpc_realref(z), fr) != 0 || mpfr_cmp (mpc_imagref(z), fr) != 0)
PRINT_ERROR ("mpc_set_lc", prec, z);
#endif
mpc_set_ui_ui (z, u, u, MPC_RNDNN);
if (mpfr_cmp_ui (mpc_realref(z), u) != 0
|| mpfr_cmp_ui (mpc_imagref(z), u) != 0)
PRINT_ERROR ("mpc_set_ui_ui", prec, z);
mpc_set_ld (z, 1.23456789L, MPC_RNDNN);
mpfr_clear_flags ();
if (mpfr_cmp (mpc_realref(z), fr) != 0
|| mpfr_cmp_ui (mpc_imagref(z), 0) != 0
|| mpfr_erangeflag_p())
PRINT_ERROR ("mpc_set_ld", prec, z);
mpc_set_prec (x, prec);
mpfr_set_ui(fr, 1, MPFR_RNDN);
mpfr_div_ui(fr, fr, 3, MPFR_RNDN);
mpfr_set(mpc_realref(x), fr, MPFR_RNDN);
mpfr_set(mpc_imagref(x), fr, MPFR_RNDN);
mpc_set (z, x, MPC_RNDNN);
mpfr_clear_flags (); /* mpc_cmp set erange flag when an operand is a
NaN */
if (mpc_cmp (z, x) != 0 || mpfr_erangeflag_p())
{
printf ("Error in mpc_set for prec = %lu\n",
(unsigned long int) prec);
MPC_OUT(z);
MPC_OUT(x);
exit (1);
}
mpc_set_si_si (z, lo, lo, MPC_RNDNN);
if (mpfr_cmp_si (mpc_realref(z), lo) != 0
|| mpfr_cmp_si (mpc_imagref(z), lo) != 0)
PRINT_ERROR ("mpc_set_si_si", prec, z);
mpc_set_fr (z, fr, MPC_RNDNN);
mpfr_clear_flags ();
if (mpfr_cmp (mpc_realref(z), fr) != 0
|| mpfr_cmp_ui (mpc_imagref(z), 0) != 0
|| mpfr_erangeflag_p())
PRINT_ERROR ("mpc_set_fr", prec, z);
mpfr_set_z (fr, mpz, MPFR_RNDN);
mpc_set_z_z (z, mpz, mpz, MPC_RNDNN);
mpfr_clear_flags ();
if (mpfr_cmp (mpc_realref(z), fr) != 0
|| mpfr_cmp (mpc_imagref(z), fr) != 0
|| mpfr_erangeflag_p())
PRINT_ERROR ("mpc_set_z_z", prec, z);
mpc_set_fr_fr (z, fr, fr, MPC_RNDNN);
mpfr_clear_flags ();
if (mpfr_cmp (mpc_realref(z), fr) != 0
|| mpfr_cmp (mpc_imagref(z), fr) != 0
|| mpfr_erangeflag_p())
PRINT_ERROR ("mpc_set_fr_fr", prec, z);
mpc_set_z (z, mpz, MPC_RNDNN);
mpfr_clear_flags ();
if (mpfr_cmp (mpc_realref(z), fr) != 0
|| mpfr_cmp_ui (mpc_imagref(z), 0) != 0
|| mpfr_erangeflag_p())
PRINT_ERROR ("mpc_set_z", prec, z);
mpfr_set_q (fr, mpq, MPFR_RNDN);
mpc_set_q_q (z, mpq, mpq, MPC_RNDNN);
mpfr_clear_flags ();
if (mpfr_cmp (mpc_realref(z), fr) != 0
|| mpfr_cmp (mpc_imagref(z), fr) != 0
|| mpfr_erangeflag_p())
PRINT_ERROR ("mpc_set_q_q", prec, z);
mpc_set_ui_fr (z, u, fr, MPC_RNDNN);
mpfr_clear_flags ();
if (mpfr_cmp_ui (mpc_realref (z), u) != 0
|| mpfr_cmp (mpc_imagref (z), fr) != 0
|| mpfr_erangeflag_p ())
PRINT_ERROR ("mpc_set_ui_fr", prec, z);
mpc_set_fr_ui (z, fr, u, MPC_RNDNN);
mpfr_clear_flags ();
if (mpfr_cmp (mpc_realref (z), fr) != 0
|| mpfr_cmp_ui (mpc_imagref (z), u) != 0
|| mpfr_erangeflag_p())
PRINT_ERROR ("mpc_set_fr_ui", prec, z);
mpc_set_q (z, mpq, MPC_RNDNN);
mpfr_clear_flags ();
if (mpfr_cmp (mpc_realref(z), fr) != 0
|| mpfr_cmp_ui (mpc_imagref(z), 0) != 0
|| mpfr_erangeflag_p())
PRINT_ERROR ("mpc_set_q", prec, z);
mpfr_set_f (fr, mpf, MPFR_RNDN);
mpc_set_f_f (z, mpf, mpf, MPC_RNDNN);
mpfr_clear_flags ();
if (mpfr_cmp (mpc_realref(z), fr) != 0
|| mpfr_cmp (mpc_imagref(z), fr) != 0
|| mpfr_erangeflag_p())
PRINT_ERROR ("mpc_set_f_f", prec, z);
mpc_set_f (z, mpf, MPC_RNDNN);
mpfr_clear_flags ();
if (mpfr_cmp (mpc_realref(z), fr) != 0
|| mpfr_cmp_ui (mpc_imagref(z), 0) != 0
|| mpfr_erangeflag_p())
PRINT_ERROR ("mpc_set_f", prec, z);
mpc_set_f_si (z, mpf, lo, MPC_RNDNN);
mpfr_clear_flags ();
if (mpfr_cmp (mpc_realref (z), fr) != 0
|| mpfr_cmp_si (mpc_imagref (z), lo) != 0
|| mpfr_erangeflag_p ())
PRINT_ERROR ("mpc_set_f", prec, z);
mpc_set_nan (z);
if (!mpfr_nan_p (mpc_realref(z)) || !mpfr_nan_p (mpc_imagref(z)))
PRINT_ERROR ("mpc_set_nan", prec, z);
#ifdef _MPC_H_HAVE_INTMAX_T
{
uintmax_t uim = (uintmax_t) prec;
intmax_t im = (intmax_t) prec;
mpc_set_uj (z, uim, MPC_RNDNN);
if (mpfr_cmp_ui (mpc_realref(z), u) != 0
|| mpfr_cmp_ui (mpc_imagref(z), 0) != 0)
PRINT_ERROR ("mpc_set_uj", prec, z);
mpc_set_sj (z, im, MPC_RNDNN);
if (mpfr_cmp_ui (mpc_realref(z), u) != 0
|| mpfr_cmp_ui (mpc_imagref(z), 0) != 0)
PRINT_ERROR ("mpc_set_sj (1)", prec, z);
mpc_set_uj_uj (z, uim, uim, MPC_RNDNN);
if (mpfr_cmp_ui (mpc_realref(z), u) != 0
|| mpfr_cmp_ui (mpc_imagref(z), u) != 0)
PRINT_ERROR ("mpc_set_uj_uj", prec, z);
mpc_set_sj_sj (z, im, im, MPC_RNDNN);
if (mpfr_cmp_ui (mpc_realref(z), u) != 0
|| mpfr_cmp_ui (mpc_imagref(z), u) != 0)
PRINT_ERROR ("mpc_set_sj_sj (1)", prec, z);
im = LONG_MAX;
if (sizeof (intmax_t) == 2 * sizeof (unsigned long))
im = 2 * im * im + 4 * im + 1; /* gives 2^(2n-1)-1 from 2^(n-1)-1 */
mpc_set_sj (z, im, MPC_RNDNN);
if (mpfr_get_sj (mpc_realref(z), MPFR_RNDN) != im ||
mpfr_cmp_ui (mpc_imagref(z), 0) != 0)
PRINT_ERROR ("mpc_set_sj (2)", im, z);
mpc_set_sj_sj (z, im, im, MPC_RNDNN);
if (mpfr_get_sj (mpc_realref(z), MPFR_RNDN) != im ||
mpfr_get_sj (mpc_imagref(z), MPFR_RNDN) != im)
PRINT_ERROR ("mpc_set_sj_sj (2)", im, z);
}
#endif /* _MPC_H_HAVE_INTMAX_T */
#if defined HAVE_COMPLEX_H
{
double _Complex c = 1.0 - 2.0*I, d;
long double _Complex lc = c, ld;
mpc_set_dc (z, c, MPC_RNDNN);
if ((d = mpc_get_dc (z, MPC_RNDNN)) != c)
{
printf ("expected (%f,%f)\n", creal (c), cimag (c));
printf ("got (%f,%f)\n", creal (d), cimag (d));
PRINT_ERROR ("mpc_get_dc", prec, z);
}
mpc_set_ldc (z, lc, MPC_RNDNN);
if ((ld = mpc_get_ldc (z, MPC_RNDNN)) != lc)
{
printf ("expected (%Lf,%Lf)\n", creall (lc), cimagl (lc));
printf ("got (%Lf,%Lf)\n", creall (ld), cimagl (ld));
PRINT_ERROR ("mpc_get_ldc", prec, z);
}
}
#endif
}
mpz_clear (mpz);
mpq_clear (mpq);
mpf_clear (mpf);
mpfr_clear (fr);
mpc_clear (x);
mpc_clear (z);
}
static void
check_set_str (mpfr_exp_t exp_max)
{
mpc_t expected;
mpc_t got;
char *str;
mpfr_prec_t prec;
mpfr_exp_t exp_min;
int base;
mpc_init2 (expected, 1024);
mpc_init2 (got, 1024);
exp_min = mpfr_get_emin ();
if (exp_max <= 0)
exp_max = mpfr_get_emax ();
else if (exp_max > mpfr_get_emax ())
exp_max = mpfr_get_emax();
if (-exp_max > exp_min)
exp_min = - exp_max;
for (prec = 2; prec < 1024; prec += 7)
{
mpc_set_prec (got, prec);
mpc_set_prec (expected, prec);
base = 2 + (int) gmp_urandomm_ui (rands, 35);
/* uses external variable rands from random.c */
mpfr_set_nan (mpc_realref (expected));
mpfr_set_inf (mpc_imagref (expected), prec % 2 - 1);
str = mpc_get_str (base, 0, expected, MPC_RNDNN);
if (mpfr_nan_p (mpc_realref (got)) == 0
|| mpfr_cmp (mpc_imagref (got), mpc_imagref (expected)) != 0)
{
printf ("Error: mpc_set_str o mpc_get_str != Id\n"
"in base %u with str=\"%s\"\n", base, str);
MPC_OUT (expected);
printf (" ");
MPC_OUT (got);
exit (1);
}
mpc_free_str (str);
test_default_random (expected, exp_min, exp_max, 128, 25);
str = mpc_get_str (base, 0, expected, MPC_RNDNN);
if (mpc_set_str (got, str, base, MPC_RNDNN) == -1
|| mpc_cmp (got, expected) != 0)
{
printf ("Error: mpc_set_str o mpc_get_str != Id\n"
"in base %u with str=\"%s\"\n", base, str);
MPC_OUT (expected);
printf (" ");
MPC_OUT (got);
exit (1);
}
mpc_free_str (str);
}
#ifdef HAVE_SETLOCALE
{
/* Check with ',' as a decimal point */
char *old_locale;
old_locale = setlocale (LC_ALL, "de_DE");
if (old_locale != NULL)
{
str = mpc_get_str (10, 0, expected, MPC_RNDNN);
if (mpc_set_str (got, str, 10, MPC_RNDNN) == -1
|| mpc_cmp (got, expected) != 0)
{
printf ("Error: mpc_set_str o mpc_get_str != Id\n"
"with str=\"%s\"\n", str);
MPC_OUT (expected);
printf (" ");
MPC_OUT (got);
exit (1);
}
mpc_free_str (str);
setlocale (LC_ALL, old_locale);
}
}
#endif /* HAVE_SETLOCALE */
/* the real part has a zero exponent in base ten (fixed in r439) */
mpc_set_prec (expected, 37);
mpc_set_prec (got, 37);
mpc_set_str (expected, "921FC04EDp-35 ", 16, MPFR_RNDN);
str = mpc_get_str (10, 0, expected, MPC_RNDNN);
if (mpc_set_str (got, str, 10, MPC_RNDNN) == -1
|| mpc_cmp (got, expected) != 0)
{
printf ("Error: mpc_set_str o mpc_get_str != Id\n"
"with str=\"%s\"\n", str);
MPC_OUT (expected);
printf (" ");
MPC_OUT (got);
exit (1);
}
mpc_free_str (str);
str = mpc_get_str (1, 0, expected, MPC_RNDNN);
if (str != NULL)
{
printf ("Error: mpc_get_str with base==1 should fail\n");
exit (1);
}
mpc_clear (expected);
mpc_clear (got);
}
int
main (void)
{
test_start ();
check_set ();
check_set_str (1024);
test_end ();
return 0;
}
mpc-1.1.0/tests/tanh.dsc 0000644 0001751 0001751 00000001505 12471661720 012011 0000000 0000000 # Description file for mpc_tanh
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_tanh
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/pow_ui.dsc 0000644 0001751 0001751 00000001626 12471661720 012365 0000000 0000000 # Description file for mpc_pow_ui
#
# Copyright (C) 2008, 2010, 2011, 2012, INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_pow_ui
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
unsigned long int
mpc_rnd_t
mpc-1.1.0/tests/add.dsc 0000644 0001751 0001751 00000001610 12471661720 011604 0000000 0000000 # Description file for mpc_add
#
# Copyright (C) 2008, 2010, 2011, 2012, INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_add
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/tanh.dat 0000644 0001751 0001751 00000006073 12426164730 012014 0000000 0000000 # Data file for mpc_tanh.
#
# Copyright (C) 2008 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# For explanations on the file format, see sin.dat.
# special values (following ISO C99 standard)
0 0 7 -1 7 0 7 -inf 7 -inf N N
0 0 7 -1 7 -0 7 -inf 7 -1 N N
0 0 7 -1 7 -0 7 -inf 7 -0 N N
0 0 7 -1 7 +0 7 -inf 7 +0 N N
0 0 7 -1 7 +0 7 -inf 7 1 N N
0 0 7 -1 7 0 7 -inf 7 +inf N N
0 0 7 -1 7 0 7 -inf 7 NaN N N
0 0 7 NaN 7 NaN 7 -1 7 -inf N N
0 0 7 NaN 7 NaN 7 -1 7 +inf N N
0 0 7 NaN 7 NaN 7 -1 7 NaN N N
0 0 7 NaN 7 NaN 7 -0 7 -inf N N
0 0 7 -0 7 -0 7 -0 7 -0 N N
0 0 7 -0 7 +0 7 -0 7 +0 N N
0 0 7 NaN 7 NaN 7 -0 7 +inf N N
0 0 7 NaN 7 NaN 7 -0 7 NaN N N
0 0 7 NaN 7 NaN 7 +0 7 -inf N N
0 0 7 +0 7 -0 7 +0 7 -0 N N
0 0 7 +0 7 +0 7 +0 7 +0 N N
0 0 7 NaN 7 NaN 7 +0 7 +inf N N
0 0 7 NaN 7 NaN 7 +0 7 NaN N N
0 0 7 NaN 7 NaN 7 1 7 -inf N N
0 0 7 NaN 7 NaN 7 1 7 +inf N N
0 0 7 NaN 7 NaN 7 1 7 NaN N N
0 0 7 1 7 0 7 +inf 7 -inf N N
0 0 7 1 7 -0 7 +inf 7 -1 N N
0 0 7 1 7 -0 7 +inf 7 -0 N N
0 0 7 1 7 +0 7 +inf 7 +0 N N
0 0 7 1 7 +0 7 +inf 7 1 N N
0 0 7 1 7 0 7 +inf 7 +inf N N
0 0 7 1 7 0 7 +inf 7 NaN N N
0 0 7 NaN 7 NaN 7 NaN 7 -inf N N
0 0 7 NaN 7 NaN 7 NaN 7 -1 N N
0 0 7 NaN 7 -0 7 NaN 7 -0 N N
0 0 7 NaN 7 +0 7 NaN 7 +0 N N
0 0 7 NaN 7 NaN 7 NaN 7 1 N N
0 0 7 NaN 7 NaN 7 NaN 7 +inf N N
0 0 7 NaN 7 NaN 7 NaN 7 NaN N N
# purely real argument
- 0 50 -0xc2f7d5a8a79ccp-52 50 -0 7 -1 7 -0 N N
- 0 50 -0xc2f7d5a8a79ccp-52 50 +0 7 -1 7 +0 N N
+ 0 50 0xc2f7d5a8a79ccp-52 50 -0 7 1 7 -0 N N
+ 0 50 0xc2f7d5a8a79ccp-52 50 +0 7 1 7 +0 N N
# purely imaginary argument
0 - 50 -0 50 -0x18eb245cbee3a8p-52 7 -0 7 -1 N N
0 + 50 -0 50 0x18eb245cbee3a8p-52 7 -0 7 1 N N
0 - 50 +0 50 -0x18eb245cbee3a8p-52 7 +0 7 -1 N N
0 + 50 +0 50 0x18eb245cbee3a8p-52 7 +0 7 1 N N
# values with +1 and -1
- - 50 -0x1157bffca4a8cp-48 50 -0x459193d28cfe2p-52 7 -1 7 -1 N N
- + 50 -0x1157bffca4a8cp-48 50 0x459193d28cfe2p-52 7 -1 7 1 N N
+ - 50 0x1157bffca4a8cp-48 50 -0x459193d28cfe2p-52 7 1 7 -1 N N
+ + 50 0x1157bffca4a8cp-48 50 0x459193d28cfe2p-52 7 1 7 1 N N
# IEEE-754 double precision
+ - 53 0x10000000000001p-53 53 0x1FFFFFFFFFFFFFp-53 53 0x1E938CBCEB16DFp-55 53 0x1B1F56FDEEF00Fp-53 N N
mpc-1.1.0/tests/tatanh.c 0000644 0001751 0001751 00000003135 12471661720 012010 0000000 0000000 /* tatanh -- test file for mpc_atanh.
Copyright (C) 2009, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
static void
bug20091120 (void)
{
mpc_t x, y;
mpc_init2 (x, 53);
mpc_init3 (y, 17, 42);
mpc_set_ui_ui (x, 1, 1, MPC_RNDNN);
mpc_atanh (y, x, MPC_RNDNN);
if (mpfr_get_prec (mpc_realref(y)) != 17 ||
mpfr_get_prec (mpc_imagref(y)) != 42)
{
printf ("Error, mpc_atanh changed the precisions!!!\n");
exit (1);
}
mpc_clear (x);
mpc_clear (y);
}
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_atanh (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_atanh (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
bug20091120 ();
data_check_template ("atanh.dsc", "atanh.dat");
tgeneric_template ("atanh.dsc", 2, 512, 5, 128);
test_end ();
return 0;
}
mpc-1.1.0/tests/mpfr_flags.c 0000644 0001751 0001751 00000005723 12471661720 012656 0000000 0000000 /* random.c -- Handle seed for random numbers.
Copyright (C) 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
/* set MPFR flags to random values */
void
set_mpfr_flags (int counter)
{
if (counter & 1)
mpfr_set_underflow ();
else
mpfr_clear_underflow ();
if (counter & 2)
mpfr_set_overflow ();
else
mpfr_clear_overflow ();
/* the divide-by-0 flag was added in MPFR 3.1.0 */
#ifdef mpfr_set_divby0
if (counter & 4)
mpfr_set_divby0 ();
else
mpfr_clear_divby0 ();
#endif
if (counter & 8)
mpfr_set_nanflag ();
else
mpfr_clear_nanflag ();
if (counter & 16)
mpfr_set_inexflag ();
else
mpfr_clear_inexflag ();
if (counter & 32)
mpfr_set_erangeflag ();
else
mpfr_clear_erangeflag ();
}
/* Check MPFR flags: we allow that some flags are set internally by MPC,
for example if MPC does internal computations (using MPFR) which yield
an overflow, even if the final MPC result fits in the exponent range.
However we don't allow MPC to *clear* the MPFR flags */
void
check_mpfr_flags (int counter)
{
int old, neu;
old = (counter & 1) != 0;
neu = mpfr_underflow_p () != 0;
if (old && (neu == 0))
{
printf ("Error, underflow flag has been modified from %d to %d\n",
old, neu);
exit (1);
}
old = (counter & 2) != 0;
neu = mpfr_overflow_p () != 0;
if (old && (neu == 0))
{
printf ("Error, overflow flag has been modified from %d to %d\n",
old, neu);
exit (1);
}
#ifdef mpfr_divby0_p
old = (counter & 4) != 0;
neu = mpfr_divby0_p () != 0;
if (old && (neu == 0))
{
printf ("Error, divby0 flag has been modified from %d to %d\n",
old, neu);
exit (1);
}
#endif
old = (counter & 8) != 0;
neu = mpfr_nanflag_p () != 0;
if (old && (neu == 0))
{
printf ("Error, nanflag flag has been modified from %d to %d\n",
old, neu);
exit (1);
}
old = (counter & 16) != 0;
neu = mpfr_inexflag_p () != 0;
if (old && (neu == 0))
{
printf ("Error, inexflag flag has been modified from %d to %d\n",
old, neu);
exit (1);
}
old = (counter & 32) != 0;
neu = mpfr_erangeflag_p () != 0;
if (old && (neu == 0))
{
printf ("Error, erangeflag flag has been modified from %d to %d\n",
old, neu);
exit (1);
}
}
mpc-1.1.0/tests/fma.dsc 0000644 0001751 0001751 00000001605 12471661720 011623 0000000 0000000 # Description file for mpc_fma
#
# Copyright (C) 2012, INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_fma
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
mpc_srcptr
mpc_srcptr
mpc_rnd_t
mpc-1.1.0/tests/tdiv.c 0000644 0001751 0001751 00000002634 12471661720 011502 0000000 0000000 /* tdiv -- test file for mpc_div.
Copyright (C) 2002, 2008, 2009, 2011, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_div (P[1].mpc, P[2].mpc, P[3].mpc, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_div (P[1].mpc, P[1].mpc, P[3].mpc, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP2 \
P[0].mpc_inex = mpc_div (P[1].mpc, P[2].mpc, P[1].mpc, P[4].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("div.dsc", "div.dat");
tgeneric_template ("div.dsc", 2, 1024, 7, 4096);
test_end ();
return 0;
}
mpc-1.1.0/tests/tatan.c 0000644 0001751 0001751 00000004016 12471661720 011637 0000000 0000000 /* tatan -- test file for mpc_atan.
Copyright (C) 2009, 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#if 0
/* tests intermediate underflow; WONTFIX */
static int
test_underflow (void)
{
mpc_t z;
mpfr_exp_t emin = mpfr_get_emin ();
mpfr_set_emin (-10);
mpc_init2 (z, 21);
mpfr_set_si (mpc_realref(z), -1, MPFR_RNDZ);
mpfr_set_ui_2exp (mpc_imagref(z), 1, 20, MPFR_RNDZ);
mpfr_add_ui (mpc_imagref(z), mpc_imagref(z), 1, MPFR_RNDZ);
mpfr_div_2exp (mpc_imagref(z), mpc_imagref(z), 20, MPFR_RNDZ);
mpc_atan (z, z, MPC_RNDNN);
if (mpfr_cmp_si_2exp (mpc_realref(z), -1066635, 20) != 0 ||
mpfr_cmp_si_2exp (mpc_imagref(z), 1687619, 22))
{
printf ("Error in test_coverage\n");
printf ("expected (-1066635/2^20 1687619/2^22)\n");
printf ("got ");
mpc_out_str (stdout, 10, 20, z, MPC_RNDNN);
printf ("\n");
exit (1);
}
mpc_clear (z);
mpfr_set_emin (emin);
}
#endif
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_atan (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_atan (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("atan.dsc", "atan.dat");
tgeneric_template ("atan.dsc", 2, 512, 5, 128);
test_end ();
return 0;
}
mpc-1.1.0/tests/read_description.c 0000644 0001751 0001751 00000017350 12471661720 014053 0000000 0000000 /* read_description.c -- read parameters from description file
Copyright (C) 2012, 2013, 2014 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include
#include "mpc-tests.h"
static size_t read_keyworddesc (mpc_datafile_context_t* datafile_context,
char **buffer_ptr, size_t buffer_length);
/* tuple to link name with the enum value */
typedef struct {
const char * name; /* type name */
mpc_param_t val; /* type enum */
} param_typeval_t;
/* available types for function description */
static const param_typeval_t sparam_typeval[]= {
{ "int" , NATIVE_INT },
{ "unsigned long int" , NATIVE_UL },
{ "unsigned long" , NATIVE_UL },
{ "long int" , NATIVE_L },
{ "long" , NATIVE_L },
{ "double" , NATIVE_D },
{ "long double" , NATIVE_LD },
{ "double _Complex" , NATIVE_DC },
{ "long double _Complex", NATIVE_LDC },
{ "intmax_t" , NATIVE_IM },
{ "uintmax_t" , NATIVE_UIM },
{ "mpz_ptr" , GMP_Z },
{ "mpz_srcptr" , GMP_Z },
{ "mpq_ptr" , GMP_Q },
{ "mpq_srcptr" , GMP_Q },
{ "mpf_ptr" , GMP_F },
{ "mpf_srcptr" , GMP_F },
{ "mpfr_inex" , MPFR_INEX },
{ "mpfr_ptr" , MPFR },
{ "mpfr_srcptr" , MPFR },
{ "mpfr_rnd_t" , MPFR_RND },
{ "mpc_inex" , MPC_INEX },
{ "mpc_ptr" , MPC },
{ "mpc_srcptr" , MPC },
{ "mpc_rnd_t" , MPC_RND },
{ "mpcc_inex" , MPCC_INEX }
};
/* read primitives */
static size_t
read_keyworddesc (mpc_datafile_context_t* datafile_context,
char **buffer_ptr,
size_t buffer_length)
{
size_t pos;
char *buffer;
pos = 0;
buffer = *buffer_ptr;
while (datafile_context->nextchar != EOF
&& datafile_context->nextchar != '#'
&& datafile_context->nextchar != '\n')
{
if (pos + 1 > buffer_length)
{
if (buffer_length == 0)
buffer_length = pos + 1;
buffer = (char *) realloc (buffer, 2 * buffer_length);
buffer_length *= 2;
if (buffer == NULL)
{
printf ("Cannot allocate memory\n");
exit (1);
}
}
buffer[pos++] = (char) datafile_context->nextchar;
datafile_context->nextchar = getc (datafile_context->fd);
}
while (pos>0 && isspace(buffer[pos-1])) pos--;
if (pos + 1 > buffer_length)
{
buffer = (char *) realloc (buffer, buffer_length + 1);
buffer_length++;
if (buffer == NULL)
{
printf ("Cannot allocate memory\n");
exit (1);
}
}
buffer[pos] = '\0';
*buffer_ptr = buffer;
return buffer_length;
}
/* return the enum associated to name */
static mpc_param_t
description_findtype (const char *name)
{
mpc_param_t r = sparam_typeval[0].val;
size_t s = 0;
const size_t send = sizeof (sparam_typeval) / sizeof (param_typeval_t);
while (s < send && strcmp (sparam_typeval[s].name, name) != 0)
s++;
if (s < send)
r = sparam_typeval[s].val;
else
{
printf ("Error: Unable to find the type '%s'\n",name);
exit (1);
}
return r;
}
/* return the name associated to the enum */
const char*
read_description_findname (mpc_param_t e)
{
const char * name = NULL;
size_t s = 0;
const size_t send = sizeof (sparam_typeval) / sizeof (param_typeval_t);
while (s < send && sparam_typeval[s].val != e)
s++;
if (sname = namestr;
namestr = NULL;
/* read RETURN fields */
tpl_skip_whitespace_comments (&datafile_context);
len = 0;
len = read_keyworddesc (&datafile_context, &buffer, len);
if (buffer == NULL || strcmp (buffer,"RETURN:") != 0)
{
printf ("Error: Unable to read 'RETURN:' in file '%s'\n",
pathname);
exit (1);
}
tpl_skip_whitespace_comments (&datafile_context);
len = read_keyworddesc (&datafile_context, &buffer, len);
if (buffer == NULL)
{
printf ("Error: Unable to read the return type of the function"
" in file '%s'\n", pathname);
exit (1);
}
param->T[nbout++] = description_findtype (buffer);
/* read OUPUT fields */
tpl_skip_whitespace_comments (&datafile_context);
len = read_keyworddesc (&datafile_context, &buffer, len);
if (buffer == NULL || strcmp (buffer,"OUTPUT:")!=0)
{
printf ("Error: Unable to read 'OUTPUT:' in file '%s'\n",
pathname);
exit (1);
}
while (!feof (datafile_context.fd))
{
tpl_skip_whitespace_comments (&datafile_context);
len = read_keyworddesc (&datafile_context, &buffer, len);
if (buffer == NULL)
{
printf ("Error: Unable to read the output type of the function"
" in file '%s'\n", pathname);
exit (1);
}
if (strcmp (buffer, "INPUT:") == 0)
break; /* exit the output loop */
param->T[nbout++] = description_findtype (buffer);
}
/* read INPUT fields */
while (!feof (datafile_context.fd))
{
tpl_skip_whitespace_comments (&datafile_context);
len = read_keyworddesc (&datafile_context, &buffer, len);
if (buffer == NULL)
{
printf ("Error: Unable to read the input type of the function"
" in file '%s'\n", pathname);
exit (1);
}
if (strlen (buffer) == 0 && feof (datafile_context.fd))
break;
param->T[nbout+nbin] = description_findtype (buffer);
if (param->T[nbout+nbin] == MPC_RND || param->T[nbout+nbin] == MPFR_RND)
rnd_mode++;
nbin++;
}
free (buffer);
param->nbout = nbout;
param->nbin = nbin;
param->nbrnd = rnd_mode;
/* duplicate output parameters at the end for the expected values */
for (j = 0; j < param->nbout; j++)
{
MPC_ASSERT (nbout + nbin + j < PARAMETER_ARRAY_SIZE);
param->T[nbout + nbin + j] = param->T[j];
}
close_datafile(&datafile_context);
}
mpc-1.1.0/tests/tdiv_fr.c 0000644 0001751 0001751 00000002376 12471661720 012174 0000000 0000000 /* tdiv_fr.c -- test file for mpc_div_fr.
Copyright (C) 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_div_fr (P[1].mpc, P[2].mpc, P[3].mpfr, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_div_fr (P[1].mpc, P[1].mpc, P[3].mpfr, P[4].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("div_fr.dsc", "div_fr.dat");
tgeneric_template ("div_fr.dsc", 2, 1024, 7, 1024);
test_end ();
return 0;
}
mpc-1.1.0/tests/tasin.c 0000644 0001751 0001751 00000002304 12471661720 011644 0000000 0000000 /* tasin -- test file for mpc_asin.
Copyright (C) 2009, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_asin (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_asin (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("asin.dsc", "asin.dat");
tgeneric_template ("asin.dsc", 2, 512, 7, 7);
test_end ();
return 0;
}
mpc-1.1.0/tests/copy_parameter.c 0000644 0001751 0001751 00000007165 12471661720 013552 0000000 0000000 /* copy_parameter.c -- Copy of an input parameter into a parameter reused for
output.
Copyright (C) 2012, 2013, 2014 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
int
copy_parameter (mpc_fun_param_t *params, int index_dest, int index_src)
{
mpfr_prec_t pre1, pim1;
mpfr_prec_t pre2, pim2;
int index_ref;
if (params->T[index_src] != params->T[index_dest])
{
fprintf (stderr, "copy_parameter: types of parameters don't match.\n");
exit (1);
}
switch (params->T[index_src])
{
case NATIVE_INT:
tpl_copy_int (¶ms->P[index_dest].i, ¶ms->P[index_src].i);
return 0;
case NATIVE_UL:
tpl_copy_ui (¶ms->P[index_dest].ui, ¶ms->P[index_src].ui);
return 0;
case NATIVE_L:
tpl_copy_si (¶ms->P[index_dest].si, ¶ms->P[index_src].si);
return 0;
case NATIVE_D:
tpl_copy_d (¶ms->P[index_dest].d, ¶ms->P[index_src].d);
return 0;
case NATIVE_LD:
/* TODO */
fprintf (stderr, "copy_parameter: type not implemented.\n");
exit (1);
break;
case NATIVE_DC:
case NATIVE_LDC:
#ifdef _Complex_I
/* TODO */
fprintf (stderr, "copy_parameter: type not implemented.\n");
exit (1);
#endif
break;
case NATIVE_IM:
case NATIVE_UIM:
#ifdef _MPC_H_HAVE_INTMAX_T
/* TODO */
fprintf (stderr, "copy_parameter: type not implemented.\n");
exit (1);
#endif
break;
case GMP_Z:
mpz_set (params->P[index_dest].mpz, params->P[index_src].mpz);
return 0;
case GMP_Q:
mpq_set (params->P[index_dest].mpq, params->P[index_src].mpq);
return 0;
case GMP_F:
mpf_set (params->P[index_dest].mpf, params->P[index_src].mpf);
return 0;
case MPFR:
/* need same precision between source, destination, and reference */
pre1 = mpfr_get_prec (params->P[index_dest].mpfr);
pre2 = mpfr_get_prec (params->P[index_src].mpfr);
index_ref = index_dest + params->nbout + params->nbin;
if (pre1 != pre2
|| pre1 != mpfr_get_prec (params->P[index_ref].mpfr))
return -1;
tpl_copy_mpfr (params->P[index_dest].mpfr, params->P[index_src].mpfr);
return 0;
case MPC:
mpc_get_prec2 (&pre1, &pim1, params->P[index_dest].mpc);
/* check same precision between source and destination */
mpc_get_prec2 (&pre2, &pim2, params->P[index_src].mpc);
if (pre1 != pre2 || pim1 != pim2)
return -1;
/* check same precision between source and reference */
index_ref = index_dest + params->nbout + params->nbin;
mpc_get_prec2 (&pre2, &pim2, params->P[index_ref].mpc);
if (pre1 != pre2 || pim1 != pim2)
return -1;
tpl_copy_mpc (params->P[index_dest].mpc, params->P[index_src].mpc);
return 0;
case NATIVE_STRING:
case MPFR_INEX: case MPFR_RND:
case MPC_INEX: case MPC_RND:
case MPCC_INEX:
/* no supported copy */
break;
}
fprintf (stderr, "copy_parameter: unsupported type.\n");
exit (1);
}
mpc-1.1.0/tests/norm.dsc 0000644 0001751 0001751 00000001553 12471661720 012035 0000000 0000000 # Description file for mpc_norm
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
# Description file of the function
NAME:
mpc_norm
RETURN:
mpfr_inex
OUTPUT:
mpfr_ptr
INPUT:
mpc_srcptr
mpfr_rnd_t
mpc-1.1.0/tests/tpow_ld.c 0000644 0001751 0001751 00000002233 12471661720 012177 0000000 0000000 /* tpow_ld -- test file for mpc_pow_ld.
Copyright (C) 2009, 2014 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
int
main (void)
{
mpc_t z;
test_start ();
mpc_init2 (z, 5);
mpc_set_ui_ui (z, 3, 2, MPC_RNDNN);
mpc_pow_ld (z, z, (long double) 3.0, MPC_RNDNN);
if (mpc_cmp_si_si (z, -9, 46) != 0)
{
printf ("Error for mpc_pow_ld (1)\n");
printf ("expected (-9 46)\ngot ");
mpc_out_str (stdout, 10, 0, z, MPC_RNDNN);
printf ("\n");
exit (1);
}
mpc_clear (z);
test_end ();
return 0;
}
mpc-1.1.0/tests/tpl_native.c 0000644 0001751 0001751 00000006735 12471661720 012707 0000000 0000000 /* tpl_mpfr.c -- Helper functions for data with native types.
Copyright (C) 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
/* int */
void
tpl_read_int (mpc_datafile_context_t* datafile_context, int *nread, const char *name)
{
int n = 0;
if (datafile_context->nextchar == EOF)
{
printf ("Error: Unexpected EOF when reading int "
"in file '%s' line %lu\n",
datafile_context->pathname, datafile_context->line_number);
exit (1);
}
ungetc (datafile_context->nextchar, datafile_context->fd);
n = fscanf (datafile_context->fd, "%i", nread);
if (ferror (datafile_context->fd) || n == 0 || n == EOF)
{
printf ("Error: Cannot read %s in file '%s' line %lu\n",
name, datafile_context->pathname, datafile_context->line_number);
exit (1);
}
datafile_context->nextchar = getc (datafile_context->fd);
tpl_skip_whitespace_comments (datafile_context);
}
void
tpl_copy_int (int *dest, const int * const src)
{
*dest = *src;
}
/* unsigned long int */
void
tpl_read_ui (mpc_datafile_context_t* datafile_context, unsigned long int *ui)
{
int n = 0;
if (datafile_context->nextchar == EOF)
{
printf ("Error: Unexpected EOF when reading uint "
"in file '%s' line %lu\n",
datafile_context->pathname, datafile_context->line_number);
exit (1);
}
ungetc (datafile_context->nextchar, datafile_context->fd);
n = fscanf (datafile_context->fd, "%lu", ui);
if (ferror (datafile_context->fd) || n == 0 || n == EOF)
{
printf ("Error: Cannot read uint in file '%s' line %lu\n",
datafile_context->pathname, datafile_context->line_number);
exit (1);
}
datafile_context->nextchar = getc (datafile_context->fd);
tpl_skip_whitespace_comments (datafile_context);
}
void
tpl_copy_ui (unsigned long int *dest, const unsigned long int * const src)
{
*dest = *src;
}
/* long int */
void
tpl_read_si (mpc_datafile_context_t* datafile_context, long int *si)
{
int n = 0;
if (datafile_context->nextchar == EOF)
{
printf ("Error: Unexpected EOF when reading sint "
"in file '%s' line %lu\n",
datafile_context->pathname, datafile_context->line_number);
exit (1);
}
ungetc (datafile_context->nextchar, datafile_context->fd);
n = fscanf (datafile_context->fd, "%li", si);
if (ferror (datafile_context->fd) || n == 0 || n == EOF)
{
printf ("Error: Cannot read sint in file '%s' line %lu\n",
datafile_context->pathname, datafile_context->line_number);
exit (1);
}
datafile_context->nextchar = getc (datafile_context->fd);
tpl_skip_whitespace_comments (datafile_context);
}
void
tpl_copy_si (long int *dest, const long int * const src)
{
*dest = *src;
}
/* double */
void
tpl_copy_d (double *dest, const double * const src)
{
*dest = *src;
}
mpc-1.1.0/tests/mul_2si.dsc 0000644 0001751 0001751 00000001545 12471661720 012435 0000000 0000000 # Description file for mpc_mul_2si
#
# Copyright (C) 2013 INRIA
#
# This file is part of GNU MPC.
#
# GNU MPC 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
#o ption) any later version.
#
# GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
#
NAME:
mpc_mul_2si
RETURN:
mpc_inex
OUTPUT:
mpc_ptr
INPUT:
mpc_srcptr
unsigned long int
mpc_rnd_t
mpc-1.1.0/tests/mpc-tests.h 0000644 0001751 0001751 00000034152 12471661720 012460 0000000 0000000 /* mpc-tests.h -- Tests helper functions.
Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#ifndef __MPC_TESTS_H
#define __MPC_TESTS_H
#include "config.h"
#include
#include
#include
#include "mpc.h"
/* pieces copied from mpc-impl.h */
#define MPC_PREC_RE(x) (mpfr_get_prec(mpc_realref(x)))
#define MPC_PREC_IM(x) (mpfr_get_prec(mpc_imagref(x)))
#define MPC_MAX_PREC(x) MPC_MAX(MPC_PREC_RE(x), MPC_PREC_IM(x))
#define MPC_MAX(h,i) ((h) > (i) ? (h) : (i))
#define MPC_ASSERT(expr) \
do { \
if (!(expr)) \
{ \
fprintf (stderr, "%s:%d: MPC assertion failed: %s\n", \
__FILE__, __LINE__, #expr); \
abort(); \
} \
} while (0)
#if defined (__cplusplus)
extern "C" {
#endif
__MPC_DECLSPEC int mpc_mul_naive (mpc_ptr, mpc_srcptr, mpc_srcptr, mpc_rnd_t);
__MPC_DECLSPEC int mpc_mul_karatsuba (mpc_ptr, mpc_srcptr, mpc_srcptr, mpc_rnd_t);
__MPC_DECLSPEC int mpc_fma_naive (mpc_ptr, mpc_srcptr, mpc_srcptr, mpc_srcptr, mpc_rnd_t);
#if defined (__cplusplus)
}
#endif
/* end pieces copied from mpc-impl.h */
#define MPC_OUT(x) \
do { \
printf (#x "[%lu,%lu]=", (unsigned long int) MPC_PREC_RE (x), \
(unsigned long int) MPC_PREC_IM (x)); \
mpc_out_str (stdout, 2, 0, x, MPC_RNDNN); \
printf ("\n"); \
} while (0)
#define MPFR_OUT(x) \
do { \
printf (#x "[%lu]=", (unsigned long int) mpfr_get_prec (x)); \
mpfr_out_str (stdout, 2, 0, x, MPFR_RNDN); \
printf ("\n"); \
} while (0)
#define MPC_INEX_STR(inex) \
(inex) == 0 ? "(0, 0)" \
: (inex) == 1 ? "(+1, 0)" \
: (inex) == 2 ? "(-1, 0)" \
: (inex) == 4 ? "(0, +1)" \
: (inex) == 5 ? "(+1, +1)" \
: (inex) == 6 ? "(-1, +1)" \
: (inex) == 8 ? "(0, -1)" \
: (inex) == 9 ? "(+1, -1)" \
: (inex) == 10 ? "(-1, -1)" : "unknown"
#define TEST_FAILED(func,op,got,expected,rnd) \
do { \
printf ("%s(op) failed [rnd=%d]\n with", func, rnd); \
MPC_OUT (op); \
printf (" "); \
MPC_OUT (got); \
MPC_OUT (expected); \
exit (1); \
} while (0)
#define QUOTE(X) NAME(X)
#define NAME(X) #X
/** RANDOM FUNCTIONS **/
/* the 3 following functions handle seed for random numbers. Usage:
- add test_start at the beginning of your test function
- use test_default_random (or use your random functions with
gmp_randstate_t rands) in your tests
- add test_end at the end the test function */
extern gmp_randstate_t rands;
extern void test_start (void);
extern void test_end (void);
extern void test_default_random (mpc_ptr, mp_exp_t, mp_exp_t,
unsigned int, unsigned int);
void test_random_si (long int *n, unsigned long emax,
unsigned int negative_probability);
void test_random_d (double *x, unsigned int negative_probability);
void test_random_mpfr (mpfr_ptr x, mpfr_exp_t emin, mpfr_exp_t emax,
unsigned int negative_probability);
void test_random_mpc (mpc_ptr z, mpfr_exp_t emin, mpfr_exp_t emax,
unsigned int negative_probability);
/** COMPARISON FUNCTIONS **/
/* some sign are unspecified in ISO C99, thus we record in struct known_signs_t
whether the sign has to be checked */
typedef struct
{
int re; /* boolean value */
int im; /* boolean value */
} known_signs_t;
/* same_mpfr_value returns 1:
- if got and ref have the same value and known_sign is true,
or
- if they have the same absolute value, got = 0 or got = inf, and known_sign is
false.
returns 0 in other cases.
Unlike mpfr_cmp, same_mpfr_value(got, ref, x) return 1 when got and
ref are both NaNs. */
extern int same_mpfr_value (mpfr_ptr got, mpfr_ptr ref, int known_sign);
extern int same_mpc_value (mpc_ptr got, mpc_ptr ref,
known_signs_t known_signs);
/** READ FILE WITH TEST DATA SET **/
extern FILE * open_data_file (const char *file_name);
extern void close_data_file (FILE *fp);
/* helper file reading functions */
extern void skip_whitespace_comments (FILE *fp);
extern void read_ternary (FILE *fp, int* ternary);
extern void read_mpfr_rounding_mode (FILE *fp, mpfr_rnd_t* rnd);
extern void read_mpc_rounding_mode (FILE *fp, mpc_rnd_t* rnd);
extern mpfr_prec_t read_mpfr_prec (FILE *fp);
extern void read_int (FILE *fp, int *n, const char *name);
extern size_t read_string (FILE *fp, char **buffer_ptr,
size_t buffer_length, const char *name);
extern void read_mpfr (FILE *fp, mpfr_ptr x, int *known_sign);
extern void read_mpc (FILE *fp, mpc_ptr z, known_signs_t *ks);
void set_mpfr_flags (int counter);
void check_mpfr_flags (int counter);
/*
function descriptions
*/
/* type for return, output and input parameters */
typedef enum {
NATIVE_INT, /* int */
NATIVE_UL, /* unsigned long */
NATIVE_L, /* signed long */
NATIVE_D, /* double */
NATIVE_LD, /* long double */
NATIVE_DC, /* double _Complex */
NATIVE_LDC, /* long double _Complex */
NATIVE_IM, /* intmax_t */
NATIVE_UIM, /* uintmax_t */
NATIVE_STRING, /* char* */
GMP_Z, /* mpz_t */
GMP_Q, /* mpq_t */
GMP_F, /* mpf_t */
MPFR_INEX, /* mpfr_inex */
MPFR, /* mpfr_t */
MPFR_RND, /* mpfr_rnd_t */
MPC_INEX, /* mpc_inex */
MPC, /* mpc_t */
MPC_RND, /* mpc_rnd_t */
MPCC_INEX /* mpcc_inex */
} mpc_param_t;
/* additional information for checking mpfr_t result */
typedef struct {
mpfr_t mpfr; /* skip space for the variable */
int known_sign;
} mpfr_data_t;
#define TERNARY_NOT_CHECKED 255
/* special value to indicate that the ternary value is not checked */
#define TERNARY_ERROR 254
/* special value to indicate that an error occurred in an mpc function */
/* mpc nonary value as a pair of ternary value for data from a file */
typedef struct {
int real;
int imag;
} mpc_inex_data_t;
/* additional information for checking mpc_t result */
typedef struct {
mpc_t mpc; /* skip space */
int known_sign_real;
int known_sign_imag;
} mpc_data_t;
/* string buffer information */
typedef struct {
char* string; /* skip space */
int length;
} string_info_t;
/* abstract parameter type
Let consider an abstract parameter p, which is declared as follows:
mpc_operand_t p;
we use the fact that a mpfr_t (respectively mpc_t) value can be accessed as
'p.mpfr' (resp. 'p.mpc') as well as 'p.mpfr_info.mpfr'
(resp. 'p.mpc_info.mpc'), the latter form permitting access to the
'known_sign' field(s).
Similarly, if the abstract parameter represent a string variable, we can
access its value with 'p.string' or 'p.string_info.string' and its size
with 'p.string_info.length'.
The user uses the simple form when adding a test, the second form is used by the
test suite itself when reading reference data and checking result against them.
*/
typedef union {
int i;
unsigned long ui;
signed long si;
double d;
long double ld;
#ifdef _MPC_H_HAVE_INTMAX_T
intmax_t im;
uintmax_t uim;
#endif
#ifdef _Complex_I
double _Complex dc;
long double _Complex ldc;
#endif
char * string;
string_info_t string_info;
mpz_t mpz;
mpq_t mpq;
mpf_t mpf;
mpfr_t mpfr;
mpfr_data_t mpfr_data;
mpfr_rnd_t mpfr_rnd;
int mpfr_inex;
mpc_t mpc;
mpc_data_t mpc_data;
mpc_rnd_t mpc_rnd;
int mpc_inex;
mpc_inex_data_t mpc_inex_data;
int mpcc_inex;
} mpc_operand_t;
#define PARAMETER_ARRAY_SIZE 10
/* function name plus parameters in the following order:
output parameters, input parameters (ending with rounding modes).
The input parameters include one rounding mode per mpfr/mpc
output starting from rnd_index.
For the time being, there may be either one or two rounding modes;
in the latter case, we assume that there are three outputs:
the inexact value and two complex numbers.
*/
typedef struct {
char *name; /* name of the function */
int nbout; /* number of output parameters */
int nbin; /* number of input parameters, including rounding
modes */
int nbrnd; /* number of rounding mode parameters */
mpc_operand_t P[PARAMETER_ARRAY_SIZE]; /* value of parameters */
mpc_param_t T[PARAMETER_ARRAY_SIZE]; /* type of parameters */
} mpc_fun_param_t;
void read_description (mpc_fun_param_t* param, const char *file);
const char* read_description_findname (mpc_param_t e);
/* file functions */
typedef struct {
char *pathname;
FILE *fd;
unsigned long line_number;
unsigned long test_line_number;
int nextchar;
} mpc_datafile_context_t;
void open_datafile (mpc_datafile_context_t* datafile_context,
const char * data_filename);
void close_datafile (mpc_datafile_context_t *dc);
/* data file functions */
void read_line (mpc_datafile_context_t* datafile_context,
mpc_fun_param_t* params);
void check_data (mpc_datafile_context_t* datafile_context,
mpc_fun_param_t* params,
int index_reused_operand);
/* parameters templated functions */
int data_check_template (const char* descr_file, const char * data_file);
void init_parameters (mpc_fun_param_t *params);
void clear_parameters (mpc_fun_param_t *params);
void print_parameter (mpc_fun_param_t *params, int index);
int copy_parameter (mpc_fun_param_t *params,
int index_dest, int index_src);
void tpl_read_int (mpc_datafile_context_t* datafile_context,
int *nread, const char *name);
void tpl_read_ui (mpc_datafile_context_t* datafile_context,
unsigned long int *ui);
void tpl_read_si (mpc_datafile_context_t* datafile_context,
long int *si);
void tpl_read_mpz (mpc_datafile_context_t* datafile_context,
mpz_t z);
void tpl_skip_whitespace_comments (mpc_datafile_context_t* datafile_context);
void tpl_read_ternary (mpc_datafile_context_t* datafile_context,
int* ternary);
void tpl_read_mpfr (mpc_datafile_context_t* datafile_context,
mpfr_ptr x, int* known_sign);
void tpl_read_mpfr_rnd (mpc_datafile_context_t* datafile_context,
mpfr_rnd_t* rnd);
void tpl_read_mpfr_inex (mpc_datafile_context_t* datafile_context,
int *ternary);
void tpl_read_mpc_inex (mpc_datafile_context_t* datafile_context,
mpc_inex_data_t* ternarypair);
void tpl_read_mpc (mpc_datafile_context_t* datafile_context,
mpc_data_t* z);
void tpl_read_mpc_rnd (mpc_datafile_context_t* datafile_context,
mpc_rnd_t* rnd);
int tpl_same_mpz_value (mpz_ptr n1, mpz_ptr n2);
int tpl_same_mpfr_value (mpfr_ptr x1, mpfr_ptr x2, int known_sign);
int tpl_check_mpfr_data (mpfr_t got, mpfr_data_t expected);
int tpl_check_mpc_data (mpc_ptr got, mpc_data_t expected);
void tpl_copy_int (int *dest, const int * const src);
void tpl_copy_ui (unsigned long int *dest,
const unsigned long int * const src);
void tpl_copy_si (long int *dest, const long int * const src);
void tpl_copy_d (double *dest, const double * const src);
void tpl_copy_mpz (mpz_ptr dest, mpz_srcptr src);
void tpl_copy_mpfr (mpfr_ptr dest, mpfr_srcptr src);
void tpl_copy_mpc (mpc_ptr dest, mpc_srcptr src);
int double_rounding (mpc_fun_param_t *params);
/* iterating over rounding modes */
void first_rnd_mode (mpc_fun_param_t *params);
int is_valid_rnd_mode (mpc_fun_param_t *params);
void next_rnd_mode (mpc_fun_param_t *params);
/* parameter precision */
void set_output_precision (mpc_fun_param_t *params, mpfr_prec_t prec);
void set_input_precision (mpc_fun_param_t *params, mpfr_prec_t prec);
void set_reference_precision (mpc_fun_param_t *params, mpfr_prec_t prec);
#endif /* __MPC_TESTS_H */
mpc-1.1.0/tests/read_data.c 0000644 0001751 0001751 00000020462 12471661720 012437 0000000 0000000 /* read_data.c -- Read data file and check function.
Copyright (C) 2008, 2009, 2010, 2011, 2012 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include
#include
#include "mpc-tests.h"
char *pathname;
unsigned long line_number;
/* file name with complete path and currently read line;
kept globally to simplify parameter passing */
unsigned long test_line_number;
/* start line of data test (which may extend over several lines) */
int nextchar;
/* character appearing next in the file, may be EOF */
#define MPC_INEX_CMP(r, i, c) \
(((r) == TERNARY_NOT_CHECKED || (r) == MPC_INEX_RE(c)) \
&& ((i) == TERNARY_NOT_CHECKED || (i) == MPC_INEX_IM (c)))
#define MPFR_INEX_STR(inex) \
(inex) == TERNARY_NOT_CHECKED ? "?" \
: (inex) == +1 ? "+1" \
: (inex) == -1 ? "-1" : "0"
/* file functions */
FILE *
open_data_file (const char *file_name)
{
FILE *fp;
char *src_dir;
char default_srcdir[] = ".";
src_dir = getenv ("srcdir");
if (src_dir == NULL)
src_dir = default_srcdir;
pathname = (char *) malloc ((strlen (src_dir)) + strlen (file_name) + 2);
if (pathname == NULL)
{
printf ("Cannot allocate memory\n");
exit (1);
}
sprintf (pathname, "%s/%s", src_dir, file_name);
fp = fopen (pathname, "r");
if (fp == NULL)
{
fprintf (stderr, "Unable to open %s\n", pathname);
exit (1);
}
return fp;
}
void
close_data_file (FILE *fp)
{
free (pathname);
fclose (fp);
}
/* read primitives */
static void
skip_line (FILE *fp)
/* skips characters until reaching '\n' or EOF; */
/* '\n' is skipped as well */
{
while (nextchar != EOF && nextchar != '\n')
nextchar = getc (fp);
if (nextchar != EOF)
{
line_number ++;
nextchar = getc (fp);
}
}
static void
skip_whitespace (FILE *fp)
/* skips over whitespace if any until reaching EOF */
/* or non-whitespace */
{
while (isspace (nextchar))
{
if (nextchar == '\n')
line_number ++;
nextchar = getc (fp);
}
}
void
skip_whitespace_comments (FILE *fp)
/* skips over all whitespace and comments, if any */
{
skip_whitespace (fp);
while (nextchar == '#') {
skip_line (fp);
if (nextchar != EOF)
skip_whitespace (fp);
}
}
size_t
read_string (FILE *fp, char **buffer_ptr, size_t buffer_length, const char *name)
{
size_t pos;
char *buffer;
pos = 0;
buffer = *buffer_ptr;
if (nextchar == '"')
nextchar = getc (fp);
else
goto error;
while (nextchar != EOF && nextchar != '"')
{
if (nextchar == '\n')
line_number ++;
if (pos + 1 > buffer_length)
{
buffer = (char *) realloc (buffer, 2 * buffer_length);
if (buffer == NULL)
{
printf ("Cannot allocate memory\n");
exit (1);
}
buffer_length *= 2;
}
buffer[pos++] = (char) nextchar;
nextchar = getc (fp);
}
if (nextchar != '"')
goto error;
if (pos + 1 > buffer_length)
{
buffer = (char *) realloc (buffer, buffer_length + 1);
if (buffer == NULL)
{
printf ("Cannot allocate memory\n");
exit (1);
}
buffer_length *= 2;
}
buffer[pos] = '\0';
nextchar = getc (fp);
skip_whitespace_comments (fp);
*buffer_ptr = buffer;
return buffer_length;
error:
printf ("Error: Unable to read %s in file '%s' line '%lu'\n",
name, pathname, line_number);
exit (1);
}
/* All following read routines skip over whitespace and comments; */
/* so after calling them, nextchar is either EOF or the beginning */
/* of a non-comment token. */
void
read_ternary (FILE *fp, int* ternary)
{
switch (nextchar)
{
case '!':
*ternary = TERNARY_ERROR;
break;
case '?':
*ternary = TERNARY_NOT_CHECKED;
break;
case '+':
*ternary = +1;
break;
case '0':
*ternary = 0;
break;
case '-':
*ternary = -1;
break;
default:
printf ("Error: Unexpected ternary value '%c' in file '%s' line %lu\n",
nextchar, pathname, line_number);
exit (1);
}
nextchar = getc (fp);
skip_whitespace_comments (fp);
}
void
read_mpfr_rounding_mode (FILE *fp, mpfr_rnd_t* rnd)
{
switch (nextchar)
{
case 'n': case 'N':
*rnd = MPFR_RNDN;
break;
case 'z': case 'Z':
*rnd = MPFR_RNDZ;
break;
case 'u': case 'U':
*rnd = MPFR_RNDU;
break;
case 'd': case 'D':
*rnd = MPFR_RNDD;
break;
default:
printf ("Error: Unexpected rounding mode '%c' in file '%s' line %lu\n",
nextchar, pathname, line_number);
exit (1);
}
nextchar = getc (fp);
if (nextchar != EOF && !isspace (nextchar)) {
printf ("Error: Rounding mode not followed by white space in file "
"'%s' line %lu\n",
pathname, line_number);
exit (1);
}
skip_whitespace_comments (fp);
}
void
read_mpc_rounding_mode (FILE *fp, mpc_rnd_t* rnd)
{
mpfr_rnd_t re, im;
read_mpfr_rounding_mode (fp, &re);
read_mpfr_rounding_mode (fp, &im);
*rnd = MPC_RND (re, im);
}
void
read_int (FILE *fp, int *nread, const char *name)
{
int n = 0;
if (nextchar == EOF)
{
printf ("Error: Unexpected EOF when reading int "
"in file '%s' line %lu\n",
pathname, line_number);
exit (1);
}
ungetc (nextchar, fp);
n = fscanf (fp, "%i", nread);
if (ferror (fp) || n == 0 || n == EOF)
{
printf ("Error: Cannot read %s in file '%s' line %lu\n",
name, pathname, line_number);
exit (1);
}
nextchar = getc (fp);
skip_whitespace_comments (fp);
}
mpfr_prec_t
read_mpfr_prec (FILE *fp)
{
unsigned long prec;
int n;
if (nextchar == EOF) {
printf ("Error: Unexpected EOF when reading mpfr precision "
"in file '%s' line %lu\n",
pathname, line_number);
exit (1);
}
ungetc (nextchar, fp);
n = fscanf (fp, "%lu", &prec);
if (ferror (fp)) /* then also n == EOF */
perror ("Error when reading mpfr precision");
if (n == 0 || n == EOF || prec < MPFR_PREC_MIN || prec > MPFR_PREC_MAX) {
printf ("Error: Impossible mpfr precision in file '%s' line %lu\n",
pathname, line_number);
exit (1);
}
nextchar = getc (fp);
skip_whitespace_comments (fp);
return (mpfr_prec_t) prec;
}
static void
read_mpfr_mantissa (FILE *fp, mpfr_ptr x)
{
if (nextchar == EOF) {
printf ("Error: Unexpected EOF when reading mpfr mantissa "
"in file '%s' line %lu\n",
pathname, line_number);
exit (1);
}
ungetc (nextchar, fp);
if (mpfr_inp_str (x, fp, 0, MPFR_RNDN) == 0) {
printf ("Error: Impossible to read mpfr mantissa "
"in file '%s' line %lu\n",
pathname, line_number);
exit (1);
}
nextchar = getc (fp);
skip_whitespace_comments (fp);
}
void
read_mpfr (FILE *fp, mpfr_ptr x, int *known_sign)
{
int sign;
mpfr_set_prec (x, read_mpfr_prec (fp));
sign = nextchar;
read_mpfr_mantissa (fp, x);
/* the sign always matters for regular values ('+' is implicit),
but when no sign appears before 0 or Inf in the data file, it means
that only absolute value must be checked. */
if (known_sign != NULL)
*known_sign =
(!mpfr_zero_p (x) && !mpfr_inf_p (x))
|| sign == '+' || sign == '-';
}
void
read_mpc (FILE *fp, mpc_ptr z, known_signs_t *ks)
{
read_mpfr (fp, mpc_realref (z), ks == NULL ? NULL : &ks->re);
read_mpfr (fp, mpc_imagref (z), ks == NULL ? NULL : &ks->im);
}
mpc-1.1.0/tests/tadd_fr.c 0000644 0001751 0001751 00000004142 12471661720 012133 0000000 0000000 /* tadd_fr -- test file for mpc_add_fr.
Copyright (C) 2008, 2010, 2012, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include
#include "mpc-tests.h"
static void
check_ternary_value (mpfr_prec_t prec_max, mpfr_prec_t step)
{
mpfr_prec_t prec;
mpc_t z;
mpfr_t f;
mpc_init2 (z, 2);
mpfr_init (f);
for (prec = 2; prec < prec_max; prec += step)
{
mpc_set_prec (z, prec);
mpfr_set_prec (f, prec);
mpc_set_ui (z, 1, MPC_RNDNN);
mpfr_set_ui (f, 1, MPFR_RNDN);
if (mpc_add_fr (z, z, f, MPC_RNDNZ))
{
printf ("Error in mpc_add_fr: 1+1 should be exact\n");
exit (1);
}
mpc_set_ui (z, 1, MPC_RNDNN);
mpc_mul_2ui (z, z, (unsigned long int) prec, MPC_RNDNN);
if (mpc_add_fr (z, z, f, MPC_RNDNN) == 0)
{
fprintf (stderr, "Error in mpc_add_fr: 2^prec+1 cannot be exact\n");
exit (1);
}
}
mpc_clear (z);
mpfr_clear (f);
}
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_add_fr (P[1].mpc, P[2].mpc, P[3].mpfr, P[4].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_add_fr (P[1].mpc, P[1].mpc, P[3].mpfr, P[4].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
check_ternary_value (1024, 1);
data_check_template ("add_fr.dsc", "add_fr.dat");
tgeneric_template ("add_fr.dsc", 2, 1024, 7, 128);
test_end ();
return 0;
}
mpc-1.1.0/tests/tsinh.c 0000644 0001751 0001751 00000002304 12471661720 011653 0000000 0000000 /* tsinh -- test file for mpc_sinh.
Copyright (C) 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpc_inex = mpc_sinh (P[1].mpc, P[2].mpc, P[3].mpc_rnd)
#define MPC_FUNCTION_CALL_REUSE_OP1 \
P[0].mpc_inex = mpc_sinh (P[1].mpc, P[1].mpc, P[3].mpc_rnd)
#include "data_check.tpl"
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
data_check_template ("sinh.dsc", "sinh.dat");
tgeneric_template ("sinh.dsc", 2, 512, 7, 7);
test_end ();
return 0;
}
mpc-1.1.0/tests/tio_str.c 0000644 0001751 0001751 00000014553 12471661720 012222 0000000 0000000 /* tio_str-- Test file for mpc_inp_str and mpc_out_str.
Copyright (C) 2009, 2011, 2013, 2014 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#ifdef HAVE_UNISTD_H
#ifndef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 1 /* apparently needed on Darwin */
#endif
#include /* for dup, dup2, STDIN_FILENO and STDOUT_FILENO */
#else
#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#endif
extern unsigned long line_number;
/* character appearing next in the file, may be EOF */
extern int nextchar;
extern const char *mpc_rnd_mode[];
static void
check_file (const char* file_name)
{
FILE *fp;
int tmp;
int base;
int inex_re;
int inex_im;
mpc_t expected, got;
mpc_rnd_t rnd = MPC_RNDNN;
int inex = 0, expected_inex;
size_t expected_size, size;
known_signs_t ks = {1, 1};
fp = open_data_file (file_name);
mpc_init2 (expected, 53);
mpc_init2 (got, 53);
/* read data file */
line_number = 1;
nextchar = getc (fp);
skip_whitespace_comments (fp);
while (nextchar != EOF)
{
/* 1. read a line of data: expected result, base, rounding mode */
read_ternary (fp, &inex_re);
read_ternary (fp, &inex_im);
read_mpc (fp, expected, &ks);
if (inex_re == TERNARY_ERROR || inex_im == TERNARY_ERROR)
expected_inex = -1;
else
expected_inex = MPC_INEX (inex_re, inex_im);
read_int (fp, &tmp, "size");
expected_size = (size_t)tmp;
read_int (fp, &base, "base");
read_mpc_rounding_mode (fp, &rnd);
/* 2. read string at the same precision as the expected result */
while (nextchar != '"')
nextchar = getc (fp);
mpfr_set_prec (mpc_realref (got), MPC_PREC_RE (expected));
mpfr_set_prec (mpc_imagref (got), MPC_PREC_IM (expected));
inex = mpc_inp_str (got, fp, &size, base, rnd);
/* 3. compare this result with the expected one */
if (inex != expected_inex || !same_mpc_value (got, expected, ks)
|| size != expected_size)
{
printf ("mpc_inp_str failed (line %lu) with rounding mode %s\n",
line_number, mpc_rnd_mode[rnd]);
if (inex != expected_inex)
printf(" got inexact value: %d\nexpected inexact value: %d\n",
inex, expected_inex);
if (size != expected_size)
printf (" got size: %lu\nexpected size: %lu\n ",
(unsigned long int) size, (unsigned long int) expected_size);
printf (" ");
MPC_OUT (got);
MPC_OUT (expected);
exit (1);
}
while ((nextchar = getc (fp)) != '"');
nextchar = getc (fp);
skip_whitespace_comments (fp);
}
mpc_clear (expected);
mpc_clear (got);
close_data_file (fp);
}
static void
check_io_str (mpc_ptr read_number, mpc_ptr expected)
{
char tmp_file[] = "mpc_test";
FILE *fp;
size_t sz;
if (!(fp = fopen (tmp_file, "w")))
{
printf ("Error: Could not open file %s in write mode\n", tmp_file);
exit (1);
}
mpc_out_str (fp, 10, 0, expected, MPC_RNDNN);
fclose (fp);
if (!(fp = fopen (tmp_file, "r")))
{
printf ("Error: Could not open file %s in read mode\n", tmp_file);
exit (1);
};
if (mpc_inp_str (read_number, fp, &sz, 10, MPC_RNDNN) == -1)
{
printf ("Error: mpc_inp_str cannot correctly re-read number "
"in file %s\n", tmp_file);
exit (1);
}
fclose (fp);
/* mpc_cmp set erange flag when an operand is a NaN */
mpfr_clear_flags ();
if (mpc_cmp (read_number, expected) != 0 || mpfr_erangeflag_p())
{
printf ("Error: inp_str o out_str <> Id\n");
MPC_OUT (read_number);
MPC_OUT (expected);
exit (1);
}
}
#ifndef MPC_NO_STREAM_REDIRECTION
/* test out_str with stream=NULL */
static void
check_stdout (mpc_ptr read_number, mpc_ptr expected)
{
char tmp_file[] = "mpc_test";
int fd;
size_t sz;
fflush (stdout);
fd = dup (STDOUT_FILENO);
if (freopen (tmp_file, "w", stdout) == NULL)
{
printf ("mpc_inp_str cannot redirect stdout\n");
exit (1);
}
mpc_out_str (NULL, 2, 0, expected, MPC_RNDNN);
fflush (stdout);
dup2 (fd, STDOUT_FILENO);
close (fd);
clearerr (stdout);
fflush (stdin);
fd = dup (STDIN_FILENO);
if (freopen (tmp_file, "r", stdin) == NULL)
{
printf ("mpc_inp_str cannot redirect stdout\n");
exit (1);
}
if (mpc_inp_str (read_number, NULL, &sz, 2, MPC_RNDNN) == -1)
{
printf ("mpc_inp_str cannot correctly re-read number "
"in file %s\n", tmp_file);
exit (1);
}
mpfr_clear_flags (); /* mpc_cmp set erange flag when an operand is
a NaN */
if (mpc_cmp (read_number, expected) != 0 || mpfr_erangeflag_p())
{
printf ("mpc_inp_str did not read the number which was written by "
"mpc_out_str\n");
MPC_OUT (read_number);
MPC_OUT (expected);
exit (1);
}
fflush (stdin);
dup2 (fd, STDIN_FILENO);
close (fd);
clearerr (stdin);
}
#endif /* MPC_NO_STREAM_REDIRECTION */
int
main (void)
{
mpc_t z, x;
mpfr_prec_t prec;
test_start ();
mpc_init2 (z, 1000);
mpc_init2 (x, 1000);
check_file ("inp_str.dat");
for (prec = 2; prec <= 1000; prec+=7)
{
mpc_set_prec (z, prec);
mpc_set_prec (x, prec);
mpc_set_si_si (x, 1, 1, MPC_RNDNN);
check_io_str (z, x);
mpc_set_si_si (x, -1, 1, MPC_RNDNN);
check_io_str (z, x);
mpfr_set_inf (mpc_realref(x), -1);
mpfr_set_inf (mpc_imagref(x), +1);
check_io_str (z, x);
test_default_random (x, -1024, 1024, 128, 25);
check_io_str (z, x);
}
#ifndef MPC_NO_STREAM_REDIRECTION
mpc_set_si_si (x, 1, -4, MPC_RNDNN);
mpc_div_ui (x, x, 3, MPC_RNDDU);
check_stdout(z, x);
#endif
mpc_clear (z);
mpc_clear (x);
test_end ();
return 0;
}
mpc-1.1.0/tests/timag.c 0000644 0001751 0001751 00000002010 12471661720 011621 0000000 0000000 /* timag -- test file for mpc_imag.
Copyright (C) 2008, 2013 INRIA
This file is part of GNU MPC.
GNU MPC 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.
GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
*/
#include "mpc-tests.h"
#define MPC_FUNCTION_CALL \
P[0].mpfr_inex = mpc_imag (P[1].mpfr, P[2].mpc, P[3].mpfr_rnd)
#include "tgeneric.tpl"
int
main (void)
{
test_start ();
tgeneric_template ("imag.dsc", 2, 1024, 1, 4096);
test_end ();
return 0;
}
mpc-1.1.0/COPYING.LESSER 0000644 0001751 0001751 00000016743 12426164730 011262 0000000 0000000 GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
mpc-1.1.0/ChangeLog 0000644 0001751 0001751 00000000000 12426164730 010760 0000000 0000000 mpc-1.1.0/NEWS 0000644 0001751 0001751 00000016110 13213755700 007714 0000000 0000000 Changes in version 1.1.0:
- Minimally required library versions: GMP 5.0.0 and MPFR 3.0.0
- Fixed issues with MPFR 4.0.0
- New functions: mpc_cmp_abs, mpc_rootofunity
- Improved speed for corner cases of mpc_asin, mpc_sin, see
http://lists.gforge.inria.fr/pipermail/mpc-discuss/2013-December/001266.html
- Rewrite of the testing framework
- New mpcbench tool, used with "make bench"
- Fixed handling of over- and underflows with directed rounding in the
"other direction" for mpc_cos, mpc_sin, mpc_exp and mpc_pow, see
http://lists.gforge.inria.fr/pipermail/mpc-discuss/2015-March/001336.html
- Fixed a bug in mpc_atan(0,y) with |y| near 1, see
http://lists.gforge.inria.fr/pipermail/mpc-discuss/2017-March/001404.html
Changes in version 1.0.3:
- Fixed mpc_pow, see
http://lists.gforge.inria.fr/pipermail/mpc-discuss/2014-October/001315.html
- #18257: Switched to libtool 2.4.5.
Changes in version 1.0.2:
- Fixed mpc_atan, mpc_atanh for (+-0, +-1), see
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57994#c7
- Fixed mpc_log10 for purely imaginary argument, see
http://lists.gforge.inria.fr/pipermail/mpc-discuss/2012-September/001208.html
Changes in version 1.0.1:
- Switched to automake 1.11.6, see
https://lists.gnu.org/archive/html/automake/2012-07/msg00023.html
- #14669: Fixed extraction of CC from gmp.h
- Fixed case of intermediate zero real or imaginary part in mpc_fma,
found by hydra with GMP_CHECK_RANDOMIZE=1346362345
Changes in version 1.0:
- First release as a GNU package
- License change: LGPLv3+ for code, GFDLv1.3+ (with no invariant sections)
for documentation
- 100% of all lines are covered by tests
- Functions renamed:
mpc_mul_2exp to mpc_mul_2ui, mpc_div_2exp to mpc_div_2ui
- 0^0, which returned (NaN,NaN) previously, now returns (1,+0)
- Removed compatibility with K&R compilers, untestable due to lack of
such compilers
- New functions: mpc_log10, mpc_mul_2si, mpc_div_2si
- Speed-ups:
- mpc_fma
- Bug fixes:
- mpc_div and mpc_norm now return a value indicating the effective
rounding direction, as the other functions
- mpc_mul, mpc_sqr and mpc_norm now return correct results even if there
are over- or underflows during the computation
- mpc_asin, mpc_proj, mpc_sqr: Wrong result when input variable has
infinite part and equals output variable is corrected
- mpc_fr_sub: Wrong return value for imaginary part is corrected
Changes in version 0.9:
- New functions:
- mpc_set_dc, mpc_set_ldc, mpc_get_dc, mpc_get_ldc for converting
between mpc type variables and C variables of type double _Complex
or long double _Complex
- mpc_sin_cos, computing simultaneously the sine and cosine
- Speed-ups:
- mpc_pow_si through binary exponentiation
- mpc_pow_z when the exponent fits in a long
- mpc_tan through the use of mpc_sin_cos
- Bug fixes:
- trigonometric functions: infinite loop due to overflow for large
arguments
- mpc_exp: close to infinite loop for argument close to 0
- mpc_sqrt: close to infinite loop for argument close to 1
- mpc_add_si: replaced macro by function, since the macro evaluated the
same expression twice
- Logging feature for debugging:
./configure --enable-logging
#include "mpc-log.h" instead of #include "mpc.h"
- Minimally required library versions: gmp 4.3.2, mpfr 2.4.2
Changes in version 0.8.2:
- Speed-up of mpc_pow_ui through binary exponentiation
Changes in version 0.8.1:
- Bug fixes:
- mpc_acosh, mpc_asinh, mpc_atanh: swap of precisions between real and
imaginary parts
- mpc_atan: memory leak
- mpc_log: wrong ternary value in data file; masked by bug in mpfr-2.4.1
Changes in version 0.8 ("Dianthus deltoides"):
- New functions:
- mpc_asin, mpc_acos, mpc_atan, mpc_asinh, mpc_acosh, mpc_atanh,
mpc_pow_d, mpc_pow_ld, mpc_pow_si, mpc_pow_ui, mpc_pow_z, mpc_pow_fr
- Bug fixes:
- mpc_ui_div: real divisor
Changes in version 0.7 ("Campanula uniflora"):
- New functions: mpc_pow, mpc_set_nan, mpc_swap
- Bug fixes:
- mpc_log: along branch cut
- mpc_norm: infinite loop in case of overflow
- mpc_ui_div, mpc_div, mpc_fr_div: handling of division by 0 and
infinities following the example code of the C99 standard
- compilation with g++
- Makefile.vc updated (thanks to Mickael Gastineau)
- Minimal gmp version is 4.2
- Changed MPC_SET_X_Y macro
- Functions mpc_random and mpc_random2 removed
Changes in version 0.6 ("Bellis perennis"):
- New functions: mpc_get_str, mpc_set_str, mpc_strtoc, mpc_set_uj,
mpc_set_sj, mpc_set_ld, mpc_set_ld_ld, mpc_set_si_si, mpc_set_uj_uj,
mpc_set_sj_sj, mpc_set_f, mpc_set_f_f, mpc_set_q, mpc_set_q_q, mpc_set_z,
mpc_set_z_z and mpc_free_str
- New macro: MPC_SET_X_Y
- mpc_set_ui_fr removed
- Default precision removed, as well as mpc_init and all mpc_init_set*
combinations; use mpc_init2 or mpc_init3, followed by mpc_set, instead
- mpc_exp, mpc_log, mpc_cos, mpc_sin, mpc_tan, mpc_cosh, mpc_sinh,
mpc_tanh and mpc_sqrt return inexact value
- inp_str returns inexact value and the number of read characters
in an additional parameter
- Get default $CC and $CFLAGS from gmp.h (__GMP_CC / __GMP_CFLAGS,
which are available as of GMP 4.2.3)
- Bug fixes:
- mpc_get_version and MPC_VERSION_STRING agree
- Compilation on i686-pc-cygwin and i686-pc-mingw32 fixed
Changes in version 0.5.2:
- New macros:
- version number: MPC_VERSION_NUM, MPC_VERSION
- Makefile.vc updated (thanks to Mickael Gastineau)
- Compilation on Debian-Gnu-Linux-PowerPC and MacOsX
fixed (thanks to Laurent Fousse and Mickael Gastineau)
Changes in version 0.5.1:
- New functions:
- mpc_set_fr_fr
- mpc_real, mpc_imag
- mpc_arg, mpc_proj
- New macros:
- version number: MPC_VERSION_MAJOR, MPC_VERSION_MINOR,
MPC_VERSION_PATCHLEVEL, MPC_VERSION_STRING
- references to number parts: mpc_realref and mpc_imagref
- Test framework rewritten
- Configure checks for recent gmp (>= 4.2) and mpfr (>= 2.3.1)
libraries
- New configure options: --with-gmp-lib, --with-gmp-include,
--with-mpfr-lib, and --with-mpfr-include
- Export declarations for MSWindows, makefile.vc updated (thanks to
Mickael Gastineau)
- Optimisations:
- cmp_mul_fr, cmp_sin, cmp_cos
- Bug fixes:
- configure looks for gmp first, then for mpfr
- mpc_cos, mpc_div, mpc_div_fr, mpc_fr_sub, mpc_mul_fr, mpc_set_fr,
mpc_sqr
- fix handling of special values: mpc_exp, mpc_log, mpc_mul, mpc_norm,
mpc_sqr, mpc_sqrt
Changes in version 0.5 ("Aconitum neomontanum"):
- Support for autotools
- New functions:
- logarithm
- trigonometric functions: mpc_cos, mpc_tan
- hyperbolic functions: mpc_cosh, mpc_sinh, mpc_tanh
- Bug fixes:
- mpc_sqrt with directed rounding
Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014 INRIA
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without any warranty.
mpc-1.1.0/config.sub 0000555 0001751 0001751 00000106222 12645234050 011200 0000000 0000000 #!/bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2014 Free Software Foundation, Inc.
timestamp='2014-12-03'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program 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
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see .
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
# Please send patches to .
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
# Each package is responsible for reporting which valid configurations
# it does not support. The user should be able to distinguish
# a failure to support a valid configuration from a meaningless
# configuration.
# The goal of this file is to map all the various variations of a given
# machine specification into a single specification in the form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or in some cases, the newer four-part form:
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS
$0 [OPTION] ALIAS
Canonicalize a configuration name.
Operation modes:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
Report bugs and patches to ."
version="\
GNU config.sub ($timestamp)
Copyright 1992-2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit ;;
--version | -v )
echo "$version" ; exit ;;
--help | --h* | -h )
echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
echo "$me: invalid option $1$help"
exit 1 ;;
*local*)
# First pass through any local machine types.
echo $1
exit ;;
* )
break ;;
esac
done
case $# in
0) echo "$me: missing argument$help" >&2
exit 1;;
1) ;;
*) echo "$me: too many arguments$help" >&2
exit 1;;
esac
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
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* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
android-linux)
os=-linux-android
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
then os=`echo $1 | sed 's/.*-/-/'`
else os=; fi
;;
esac
### Let's recognize common machines as not being operating systems so
### that things like config.sub decstation-3100 work. We also
### recognize some manufacturers as not being operating systems, so we
### can provide default operating systems below.
case $os in
-sun*os*)
# Prevent following clause from handling this invalid input.
;;
-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
-bluegene*)
os=-cnk
;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
;;
-scout)
;;
-wrs)
os=-vxworks
basic_machine=$1
;;
-chorusos*)
os=-chorusos
basic_machine=$1
;;
-chorusrdb)
os=-chorusrdb
basic_machine=$1
;;
-hiux*)
os=-hiuxwe2
;;
-sco6)
os=-sco5v6
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
os=-sco3.2v4
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2v[4-9]*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-udk*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-isc)
os=-isc2.2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-clix*)
basic_machine=clipper-intergraph
;;
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-lynx*178)
os=-lynxos178
;;
-lynx*5)
os=-lynxos5
;;
-lynx*)
os=-lynxos
;;
-ptx*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
;;
-windowsnt*)
os=`echo $os | sed -e 's/windowsnt/winnt/'`
;;
-psos*)
os=-psos
;;
-mint | -mint[0-9]*)
basic_machine=m68k-atari
os=-mint
;;
esac
# Decode aliases for certain CPU-COMPANY combinations.
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
| aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
| avr | avr32 \
| be32 | be64 \
| bfin \
| c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| k1om \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
| mips64octeon | mips64octeonel \
| mips64orion | mips64orionel \
| mips64r5900 | mips64r5900el \
| mips64vr | mips64vrel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
| riscv32 | riscv64 \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu \
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| visium \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
c54x)
basic_machine=tic54x-unknown
;;
c55x)
basic_machine=tic55x-unknown
;;
c6x)
basic_machine=tic6x-unknown
;;
leon|leon[3-9])
basic_machine=sparc-$basic_machine
;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
ms1)
basic_machine=mt-unknown
;;
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
xgate)
basic_machine=$basic_machine-unknown
os=-none
;;
xscaleeb)
basic_machine=armeb-unknown
;;
xscaleel)
basic_machine=armel-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
i*86 | x86_64)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
*-*-*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| k1om-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
| microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
| mips64octeon-* | mips64octeonel-* \
| mips64orion-* | mips64orionel-* \
| mips64r5900-* | mips64r5900el-* \
| mips64vr-* | mips64vrel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
| or1k*-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
| tron-* \
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| visium-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-* | z80-*)
;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
basic_machine=$basic_machine-unknown
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
basic_machine=i386-unknown
os=-bsd
;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
basic_machine=m68000-att
;;
3b*)
basic_machine=we32k-att
;;
a29khif)
basic_machine=a29k-amd
os=-udi
;;
abacus)
basic_machine=abacus-unknown
;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
;;
alliant | fx80)
basic_machine=fx80-alliant
;;
altos | altos3068)
basic_machine=m68k-altos
;;
am29k)
basic_machine=a29k-none
os=-bsd
;;
amd64)
basic_machine=x86_64-pc
;;
amd64-*)
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
amdahl)
basic_machine=580-amdahl
os=-sysv
;;
amiga | amiga-*)
basic_machine=m68k-unknown
;;
amigaos | amigados)
basic_machine=m68k-unknown
os=-amigaos
;;
amigaunix | amix)
basic_machine=m68k-unknown
os=-sysv4
;;
apollo68)
basic_machine=m68k-apollo
os=-sysv
;;
apollo68bsd)
basic_machine=m68k-apollo
os=-bsd
;;
aros)
basic_machine=i386-pc
os=-aros
;;
aux)
basic_machine=m68k-apple
os=-aux
;;
balance)
basic_machine=ns32k-sequent
os=-dynix
;;
blackfin)
basic_machine=bfin-unknown
os=-linux
;;
blackfin-*)
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
bluegene*)
basic_machine=powerpc-ibm
os=-cnk
;;
c54x-*)
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c55x-*)
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c6x-*)
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c90)
basic_machine=c90-cray
os=-unicos
;;
cegcc)
basic_machine=arm-unknown
os=-cegcc
;;
convex-c1)
basic_machine=c1-convex
os=-bsd
;;
convex-c2)
basic_machine=c2-convex
os=-bsd
;;
convex-c32)
basic_machine=c32-convex
os=-bsd
;;
convex-c34)
basic_machine=c34-convex
os=-bsd
;;
convex-c38)
basic_machine=c38-convex
os=-bsd
;;
cray | j90)
basic_machine=j90-cray
os=-unicos
;;
craynv)
basic_machine=craynv-cray
os=-unicosmp
;;
cr16 | cr16-*)
basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
basic_machine=m68k-crds
;;
crisv32 | crisv32-* | etraxfs*)
basic_machine=crisv32-axis
;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
crx)
basic_machine=crx-unknown
os=-elf
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
basic_machine=mips-dec
;;
decsystem10* | dec10*)
basic_machine=pdp10-dec
os=-tops10
;;
decsystem20* | dec20*)
basic_machine=pdp10-dec
os=-tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
;;
delta88)
basic_machine=m88k-motorola
os=-sysv3
;;
dicos)
basic_machine=i686-pc
os=-dicos
;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
;;
dpx2* | dpx2*-bull)
basic_machine=m68k-bull
os=-sysv3
;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
;;
elxsi)
basic_machine=elxsi-elxsi
os=-bsd
;;
encore | umax | mmax)
basic_machine=ns32k-encore
;;
es1800 | OSE68k | ose68k | ose | OSE)
basic_machine=m68k-ericsson
os=-ose
;;
fx2800)
basic_machine=i860-alliant
;;
genix)
basic_machine=ns32k-ns
;;
gmicro)
basic_machine=tron-gmicro
os=-sysv
;;
go32)
basic_machine=i386-pc
os=-go32
;;
h3050r* | hiux*)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
h8300hms)
basic_machine=h8300-hitachi
os=-hms
;;
h8300xray)
basic_machine=h8300-hitachi
os=-xray
;;
h8500hms)
basic_machine=h8500-hitachi
os=-hms
;;
harris)
basic_machine=m88k-harris
os=-sysv3
;;
hp300-*)
basic_machine=m68k-hp
;;
hp300bsd)
basic_machine=m68k-hp
os=-bsd
;;
hp300hpux)
basic_machine=m68k-hp
os=-hpux
;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
basic_machine=m68000-hp
;;
hp9k3[2-9][0-9])
basic_machine=m68k-hp
;;
hp9k6[0-9][0-9] | hp6[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hp9k7[0-79][0-9] | hp7[0-79][0-9])
basic_machine=hppa1.1-hp
;;
hp9k78[0-9] | hp78[0-9])
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][13679] | hp8[0-9][13679])
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hppa-next)
os=-nextstep3
;;
hppaosf)
basic_machine=hppa1.1-hp
os=-osf
;;
hppro)
basic_machine=hppa1.1-hp
os=-proelf
;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
i*86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
i*86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
i*86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
i386mach)
basic_machine=i386-mach
os=-mach
;;
i386-vsta | vsta)
basic_machine=i386-unknown
os=-vsta
;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
-irix*)
;;
*)
os=-irix4
;;
esac
;;
isi68 | isi)
basic_machine=m68k-isi
os=-sysv
;;
leon-*|leon[3-9]-*)
basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
;;
m68knommu-*)
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
m88k-omron*)
basic_machine=m88k-omron
;;
magnum | m3230)
basic_machine=mips-mips
os=-sysv
;;
merlin)
basic_machine=ns32k-utek
os=-sysv
;;
microblaze*)
basic_machine=microblaze-xilinx
;;
mingw64)
basic_machine=x86_64-pc
os=-mingw64
;;
mingw32)
basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
basic_machine=arm-unknown
os=-mingw32ce
;;
miniframe)
basic_machine=m68000-convergent
;;
*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
basic_machine=m68k-atari
os=-mint
;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
monitor)
basic_machine=m68k-rom68k
os=-coff
;;
morphos)
basic_machine=powerpc-unknown
os=-morphos
;;
moxiebox)
basic_machine=moxie-unknown
os=-moxiebox
;;
msdos)
basic_machine=i386-pc
os=-msdos
;;
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
basic_machine=i686-pc
os=-msys
;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
nacl)
basic_machine=le32-unknown
os=-nacl
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
;;
netbsd386)
basic_machine=i386-unknown
os=-netbsd
;;
netwinder)
basic_machine=armv4l-rebel
os=-linux
;;
news | news700 | news800 | news900)
basic_machine=m68k-sony
os=-newsos
;;
news1000)
basic_machine=m68030-sony
os=-newsos
;;
news-3600 | risc-news)
basic_machine=mips-sony
os=-newsos
;;
necv70)
basic_machine=v70-nec
os=-sysv
;;
next | m*-next )
basic_machine=m68k-next
case $os in
-nextstep* )
;;
-ns2*)
os=-nextstep2
;;
*)
os=-nextstep3
;;
esac
;;
nh3000)
basic_machine=m68k-harris
os=-cxux
;;
nh[45]000)
basic_machine=m88k-harris
os=-cxux
;;
nindy960)
basic_machine=i960-intel
os=-nindy
;;
mon960)
basic_machine=i960-intel
os=-mon960
;;
nonstopux)
basic_machine=mips-compaq
os=-nonstopux
;;
np1)
basic_machine=np1-gould
;;
neo-tandem)
basic_machine=neo-tandem
;;
nse-tandem)
basic_machine=nse-tandem
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
os=-proelf
;;
openrisc | openrisc-*)
basic_machine=or32-unknown
;;
os400)
basic_machine=powerpc-ibm
os=-os400
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
;;
os68k)
basic_machine=m68k-none
os=-os68k
;;
pa-hitachi)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
paragon)
basic_machine=i860-intel
os=-osf
;;
parisc)
basic_machine=hppa-unknown
os=-linux
;;
parisc-*)
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
pbd)
basic_machine=sparc-tti
;;
pbb)
basic_machine=m68k-tti
;;
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pc98)
basic_machine=i386-pc
;;
pc98-*)
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
pentiumii | pentium2 | pentiumiii | pentium3)
basic_machine=i686-pc
;;
pentium4)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium4-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
;;
power) basic_machine=power-ibm
;;
ppc | ppcbe) basic_machine=powerpc-unknown
;;
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
;;
pw32)
basic_machine=i586-unknown
os=-pw32
;;
rdos | rdos64)
basic_machine=x86_64-pc
os=-rdos
;;
rdos32)
basic_machine=i386-pc
os=-rdos
;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
;;
rm[46]00)
basic_machine=mips-siemens
;;
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
s390 | s390-*)
basic_machine=s390-ibm
;;
s390x | s390x-*)
basic_machine=s390x-ibm
;;
sa29200)
basic_machine=a29k-amd
os=-udi
;;
sb1)
basic_machine=mipsisa64sb1-unknown
;;
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sde)
basic_machine=mipsisa32-sde
os=-elf
;;
sei)
basic_machine=mips-sei
os=-seiux
;;
sequent)
basic_machine=i386-sequent
;;
sh)
basic_machine=sh-hitachi
os=-hms
;;
sh5el)
basic_machine=sh5le-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
sps7)
basic_machine=m68k-bull
os=-sysv2
;;
spur)
basic_machine=spur-unknown
;;
st2000)
basic_machine=m68k-tandem
;;
stratus)
basic_machine=i860-stratus
os=-sysv4
;;
strongarm-* | thumb-*)
basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
sun2)
basic_machine=m68000-sun
;;
sun2os3)
basic_machine=m68000-sun
os=-sunos3
;;
sun2os4)
basic_machine=m68000-sun
os=-sunos4
;;
sun3os3)
basic_machine=m68k-sun
os=-sunos3
;;
sun3os4)
basic_machine=m68k-sun
os=-sunos4
;;
sun4os3)
basic_machine=sparc-sun
os=-sunos3
;;
sun4os4)
basic_machine=sparc-sun
os=-sunos4
;;
sun4sol2)
basic_machine=sparc-sun
os=-solaris2
;;
sun3 | sun3-*)
basic_machine=m68k-sun
;;
sun4)
basic_machine=sparc-sun
;;
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
sv1)
basic_machine=sv1-cray
os=-unicos
;;
symmetry)
basic_machine=i386-sequent
os=-dynix
;;
t3e)
basic_machine=alphaev5-cray
os=-unicos
;;
t90)
basic_machine=t90-cray
os=-unicos
;;
tile*)
basic_machine=$basic_machine-unknown
os=-linux-gnu
;;
tx39)
basic_machine=mipstx39-unknown
;;
tx39el)
basic_machine=mipstx39el-unknown
;;
toad1)
basic_machine=pdp10-xkl
os=-tops20
;;
tower | tower-32)
basic_machine=m68k-ncr
;;
tpf)
basic_machine=s390x-ibm
os=-tpf
;;
udi29k)
basic_machine=a29k-amd
os=-udi
;;
ultra3)
basic_machine=a29k-nyu
os=-sym1
;;
v810 | necv810)
basic_machine=v810-nec
os=-none
;;
vaxv)
basic_machine=vax-dec
os=-sysv
;;
vms)
basic_machine=vax-dec
os=-vms
;;
vpp*|vx|vx-*)
basic_machine=f301-fujitsu
;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
;;
vxworks68)
basic_machine=m68k-wrs
os=-vxworks
;;
vxworks29k)
basic_machine=a29k-wrs
os=-vxworks
;;
w65*)
basic_machine=w65-wdc
os=-none
;;
w89k-*)
basic_machine=hppa1.1-winbond
os=-proelf
;;
xbox)
basic_machine=i686-pc
os=-mingw32
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
xscale-* | xscalee[bl]-*)
basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
;;
ymp)
basic_machine=ymp-cray
os=-unicos
;;
z8k-*-coff)
basic_machine=z8k-unknown
os=-sim
;;
z80-*-coff)
basic_machine=z80-unknown
os=-sim
;;
none)
basic_machine=none-none
os=-none
;;
# Here we handle the default manufacturer of certain CPU types. It is in
# some cases the only manufacturer, in others, it is the most popular.
w89k)
basic_machine=hppa1.1-winbond
;;
op50n)
basic_machine=hppa1.1-oki
;;
op60c)
basic_machine=hppa1.1-oki
;;
romp)
basic_machine=romp-ibm
;;
mmix)
basic_machine=mmix-knuth
;;
rs6000)
basic_machine=rs6000-ibm
;;
vax)
basic_machine=vax-dec
;;
pdp10)
# there are many clones, so DEC is not a safe bet
basic_machine=pdp10-unknown
;;
pdp11)
basic_machine=pdp11-dec
;;
we32k)
basic_machine=we32k-att
;;
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
basic_machine=cydra-cydrome
;;
orion)
basic_machine=orion-highlevel
;;
orion105)
basic_machine=clipper-highlevel
;;
mac | mpw | mac-mpw)
basic_machine=m68k-apple
;;
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
*-unknown)
# Make sure to match an already-canonicalized machine name.
;;
*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
esac
# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
*-digital*)
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
;;
*-commodore*)
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
;;
*)
;;
esac
# Decode manufacturer-specific aliases for certain operating systems.
if [ x"$os" != x"" ]
then
case $os in
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-auroraux)
os=-auroraux
;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
-solaris)
os=-solaris2
;;
-svr4*)
os=-sysv4
;;
-unixware*)
os=-sysv4.2uw
;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
# First accept the basic system types.
# The portable systems comes first.
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -bitrig* | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
case $basic_machine in
x86-* | i*86-*)
;;
*)
os=-nto$os
;;
esac
;;
-nto-qnx*)
;;
-nto*)
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
;;
-linux-dietlibc)
os=-linux-dietlibc
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
-sunos5*)
os=`echo $os | sed -e 's|sunos5|solaris2|'`
;;
-sunos6*)
os=`echo $os | sed -e 's|sunos6|solaris3|'`
;;
-opened*)
os=-openedition
;;
-os400*)
os=-os400
;;
-wince*)
os=-wince
;;
-osfrose*)
os=-osfrose
;;
-osf*)
os=-osf
;;
-utek*)
os=-bsd
;;
-dynix*)
os=-bsd
;;
-acis*)
os=-aos
;;
-atheos*)
os=-atheos
;;
-syllable*)
os=-syllable
;;
-386bsd)
os=-bsd
;;
-ctix* | -uts*)
os=-sysv
;;
-nova*)
os=-rtmk-nova
;;
-ns2 )
os=-nextstep2
;;
-nsk*)
os=-nsk
;;
# Preserve the version number of sinix5.
-sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
;;
-sinix*)
os=-sysv4
;;
-tpf*)
os=-tpf
;;
-triton*)
os=-sysv3
;;
-oss*)
os=-sysv3
;;
-svr4)
os=-sysv4
;;
-svr3)
os=-sysv3
;;
-sysvr4)
os=-sysv4
;;
# This must come after -sysvr4.
-sysv*)
;;
-ose*)
os=-ose
;;
-es1800*)
os=-ose
;;
-xenix)
os=-xenix
;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
;;
-aros*)
os=-aros
;;
-zvmoe)
os=-zvmoe
;;
-dicos*)
os=-dicos
;;
-nacl*)
;;
-none)
;;
*)
# Get rid of the `-' at the beginning of $os.
os=`echo $os | sed 's/[^-]*-//'`
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
exit 1
;;
esac
else
# Here we handle the default operating systems that come with various machines.
# The value should be what the vendor currently ships out the door with their
# machine or put another way, the most popular os provided with the machine.
# Note that if you're going to try to match "-MANUFACTURER" here (say,
# "-sun"), then you have to tell the case statement up towards the top
# that MANUFACTURER isn't an operating system. Otherwise, code above
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.
case $basic_machine in
score-*)
os=-elf
;;
spu-*)
os=-elf
;;
*-acorn)
os=-riscix1.2
;;
arm*-rebel)
os=-linux
;;
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
c8051-*)
os=-elf
;;
hexagon-*)
os=-elf
;;
tic54x-*)
os=-coff
;;
tic55x-*)
os=-coff
;;
tic6x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
;;
pdp11-*)
os=-none
;;
*-dec | vax-*)
os=-ultrix4.2
;;
m68*-apollo)
os=-domain
;;
i386-sun)
os=-sunos4.0.2
;;
m68000-sun)
os=-sunos3
;;
m68*-cisco)
os=-aout
;;
mep-*)
os=-elf
;;
mips*-cisco)
os=-elf
;;
mips*-*)
os=-elf
;;
or32-*)
os=-coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
sparc-* | *-sun)
os=-sunos4.1.1
;;
*-be)
os=-beos
;;
*-haiku)
os=-haiku
;;
*-ibm)
os=-aix
;;
*-knuth)
os=-mmixware
;;
*-wec)
os=-proelf
;;
*-winbond)
os=-proelf
;;
*-oki)
os=-proelf
;;
*-hp)
os=-hpux
;;
*-hitachi)
os=-hiux
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
os=-sysv
;;
*-cbm)
os=-amigaos
;;
*-dg)
os=-dgux
;;
*-dolphin)
os=-sysv3
;;
m68k-ccur)
os=-rtu
;;
m88k-omron*)
os=-luna
;;
*-next )
os=-nextstep
;;
*-sequent)
os=-ptx
;;
*-crds)
os=-unos
;;
*-ns)
os=-genix
;;
i370-*)
os=-mvs
;;
*-next)
os=-nextstep3
;;
*-gould)
os=-sysv
;;
*-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
*-sgi)
os=-irix
;;
*-siemens)
os=-sysv4
;;
*-masscomp)
os=-rtu
;;
f30[01]-fujitsu | f700-fujitsu)
os=-uxpv
;;
*-rom68k)
os=-coff
;;
*-*bug)
os=-coff
;;
*-apple)
os=-macos
;;
*-atari*)
os=-mint
;;
*)
os=-none
;;
esac
fi
# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer. We pick the logical manufacturer.
vendor=unknown
case $basic_machine in
*-unknown)
case $os in
-riscix*)
vendor=acorn
;;
-sunos*)
vendor=sun
;;
-cnk*|-aix*)
vendor=ibm
;;
-beos*)
vendor=be
;;
-hpux*)
vendor=hp
;;
-mpeix*)
vendor=hp
;;
-hiux*)
vendor=hitachi
;;
-unos*)
vendor=crds
;;
-dgux*)
vendor=dg
;;
-luna*)
vendor=omron
;;
-genix*)
vendor=ns
;;
-mvs* | -opened*)
vendor=ibm
;;
-os400*)
vendor=ibm
;;
-ptx*)
vendor=sequent
;;
-tpf*)
vendor=ibm
;;
-vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;
-aux*)
vendor=apple
;;
-hms*)
vendor=hitachi
;;
-mpw* | -macos*)
vendor=apple
;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
vendor=atari
;;
-vos*)
vendor=stratus
;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
esac
echo $basic_machine$os
exit
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
mpc-1.1.0/Makefile.vc 0000644 0001751 0001751 00000037222 13225637521 011276 0000000 0000000 # Makefile for the MPC library (Windows version).
#
# Copyright (C) INRIA - CNRS, 2002, 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2016, 2017
#
# This file is part of the MPC Library.
#
# The MPC 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 2.1 of the License, or (at your
# option) any later version.
#
# The MPC 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 MPC Library; see the file COPYING.LIB. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA.
#
# usage:
# nmake /f Makefile.vc clean
# clean the temporaries objects
#
# nmake /f Makefile.vc STATIC=0|1 GMPDIR=gmpdirectory MPFRDIR=mpfrdirectory
# compile MPC
#
# nmake /f Makefile.vc STATIC=0|1 install GMPDIR=gmpdirectory MPFRDIR=mpfrdirectory DESTDIR=installdirectory
# install MPC to installdirectory
#
# nmake /f Makefile.vc STATIC=0|1 check GMPDIR=gmpdirectory MPFRDIR=mpfrdirectory
# perform tests on MPC
#
# GMPDIR : specify the location where GMP is installed
# MPFRDIR : specify the location where MPFR is installed
# DESTDIR : specify the location where MPC will be installed
# STATIC : specify if a static or dynamic library of MPC will be created
# STATIC=1 : build a static library
# STATIC=0 : build a dynamic library (DLL)
# A dynamic library is created by default if STATIC is omitted (STATIC=0)
# ENABLELOGGING : specify if MPC functions calls are logged
# ENABLELOGGING=1 : MPC functions calls are logged
# ENABLELOGGING=0 : MPC functions calls are not logged (default)
# Functions calls are not logged by default if ENABLELOGGING is omitted (ENABLELOGGING=0)
CPP = cl.exe
CC = cl.exe
CDEFAULTFLAGS=/O2 /GR- /MD /nologo /EHs
VERSION=1.1.0
######################## do not edit below this line ##########################
DIRMPC=.\src
DIRMPCTESTS=.\tests\\
!if "$(STATIC)" == "0"
LIBRARY = libmpc.dll
LINKER = link.exe /DLL
GMPMUSTBEDLL=/D__GMP_LIBGMP_DLL
!else
LIBRARY = libmpc.lib
LINKER = lib.exe
GMPMUSTBEDLL=
!endif
#check for logging. if yes then add logging.c to the library
!if "$(ENABLELOGGING)" == "1"
CPPOBJECTS_LOGGING = $(DIRMPC)\logging.obj
CPPLINKOBJECTS_LOGGING = logging.obj
LIBS_LOGGING = kernel32.lib
!else
CPPOBJECTS_LOGGING =
CPPLINKOBJECTS_LOGGING =
LIBS_LOGGING =
!endif
INCLUDES = /I$(DIRMPC) /I$(GMPDIR)\include /I$(MPFR)\include
CKERNELFLAGS = $(CDEFAULTFLAGS) $(GMPMUSTBEDLL) $(INCLUDES)
CFLAGS = $(CKERNELFLAGS) /D__MPC_WITHIN_MPC /D_GMP_IEEE_FLOATS /DHAVE_CONFIG_H
TESTSSOURCES=$(DIRMPCTESTS)\check_data.c $(DIRMPCTESTS)\clear_parameters.c \
$(DIRMPCTESTS)\close_datafile.c $(DIRMPCTESTS)\comparisons.c $(DIRMPCTESTS)\copy_parameter.c $(DIRMPCTESTS)\double_rounding.c \
$(DIRMPCTESTS)\init_parameters.c $(DIRMPCTESTS)\mpfr_flags.c $(DIRMPCTESTS)\open_datafile.c $(DIRMPCTESTS)\print_parameter.c \
$(DIRMPCTESTS)\random.c $(DIRMPCTESTS)\read_data.c $(DIRMPCTESTS)\read_description.c $(DIRMPCTESTS)\read_line.c $(DIRMPCTESTS)\rounding.c \
$(DIRMPCTESTS)\setprec_parameters.c $(DIRMPCTESTS)\tpl_gmp.c $(DIRMPCTESTS)\tpl_mpc.c $(DIRMPCTESTS)\tpl_mpfr.c $(DIRMPCTESTS)\tpl_native.c
TESTCOMPILE=$(CC) $(CKERNELFLAGS) $(TESTSSOURCES) $(DIRMPCTESTS)
MIDTESTCOMPILE=/link /out:$(DIRMPCTESTS)
ENDTESTCOMPILE=/LIBPATH:"$(DIRMPCTESTS)" libmpc.lib /LIBPATH:"$(GMPDIR)\lib" libmpfr.lib libgmp.lib $(LIBS_LOGGING)
#generate the CPPOBJECTS : goto src and execute
# ls *.c | sed "s/\.c/\.obj/" | awk ' { printf("$(DIRMPC)\\%s \\\n",$1); } '
#generate the CPPLINKOBJECTS : goto src and execute
# ls *.c | sed "s/\.c/\.obj/" | awk ' { printf("%s \\\n",$1); } '
#generate the list for tests : goto tests and execute
# ls t*.c | sed "s/\.c//" | grep -v comparisons | grep -v read_data | grep -v random | awk ' { printf("\t$(TESTCOMPILE)%s.c $(MIDTESTCOMPILE)%s.exe $(ENDTESTCOMPILE)\n\tcd $(DIRMPCTESTS) && %s.exe && cd ..\n",$1,$1,$1,$1); } '
LIBRARYLIB = libmpc.lib
CPPOBJECTS =$(DIRMPC)\abs.obj \
$(DIRMPC)\acos.obj \
$(DIRMPC)\acosh.obj \
$(DIRMPC)\add.obj \
$(DIRMPC)\add_fr.obj \
$(DIRMPC)\add_si.obj \
$(DIRMPC)\add_ui.obj \
$(DIRMPC)\arg.obj \
$(DIRMPC)\asin.obj \
$(DIRMPC)\asinh.obj \
$(DIRMPC)\atan.obj \
$(DIRMPC)\atanh.obj \
$(DIRMPC)\clear.obj \
$(DIRMPC)\cmp.obj \
$(DIRMPC)\cmp_abs.obj \
$(DIRMPC)\cmp_si_si.obj \
$(DIRMPC)\conj.obj \
$(DIRMPC)\cos.obj \
$(DIRMPC)\cosh.obj \
$(DIRMPC)\div.obj \
$(DIRMPC)\div_2ui.obj \
$(DIRMPC)\div_fr.obj \
$(DIRMPC)\div_ui.obj \
$(DIRMPC)\exp.obj \
$(DIRMPC)\fma.obj \
$(DIRMPC)\fr_div.obj \
$(DIRMPC)\fr_sub.obj \
$(DIRMPC)\get_prec.obj \
$(DIRMPC)\get_prec2.obj \
$(DIRMPC)\get_version.obj \
$(DIRMPC)\get_x.obj \
$(DIRMPC)\imag.obj \
$(DIRMPC)\init2.obj \
$(DIRMPC)\init3.obj \
$(DIRMPC)\inp_str.obj \
$(DIRMPC)\log.obj \
$(DIRMPC)\log10.obj \
$(DIRMPC)\mem.obj \
$(DIRMPC)\mul.obj \
$(DIRMPC)\mul_2ui.obj \
$(DIRMPC)\mul_fr.obj \
$(DIRMPC)\mul_i.obj \
$(DIRMPC)\mul_si.obj \
$(DIRMPC)\mul_ui.obj \
$(DIRMPC)\neg.obj \
$(DIRMPC)\norm.obj \
$(DIRMPC)\out_str.obj \
$(DIRMPC)\pow.obj \
$(DIRMPC)\pow_d.obj \
$(DIRMPC)\pow_fr.obj \
$(DIRMPC)\pow_ld.obj \
$(DIRMPC)\pow_si.obj \
$(DIRMPC)\pow_ui.obj \
$(DIRMPC)\pow_z.obj \
$(DIRMPC)\proj.obj \
$(DIRMPC)\real.obj \
$(DIRMPC)\rootofunity.obj \
$(DIRMPC)\set.obj \
$(DIRMPC)\set_prec.obj \
$(DIRMPC)\set_str.obj \
$(DIRMPC)\set_x.obj \
$(DIRMPC)\set_x_x.obj \
$(DIRMPC)\sin.obj \
$(DIRMPC)\sin_cos.obj \
$(DIRMPC)\sinh.obj \
$(DIRMPC)\sqr.obj \
$(DIRMPC)\sqrt.obj \
$(DIRMPC)\strtoc.obj \
$(DIRMPC)\sub.obj \
$(DIRMPC)\sub_fr.obj \
$(DIRMPC)\sub_ui.obj \
$(DIRMPC)\swap.obj \
$(DIRMPC)\tan.obj \
$(DIRMPC)\tanh.obj \
$(DIRMPC)\uceil_log2.obj \
$(DIRMPC)\ui_div.obj \
$(DIRMPC)\ui_ui_sub.obj $(CPPOBJECTS_LOGGING) \
$(DIRMPC)\urandom.obj
CPPLINKOBJECTS = abs.obj \
acos.obj \
acosh.obj \
add.obj \
add_fr.obj \
add_si.obj \
add_ui.obj \
arg.obj \
asin.obj \
asinh.obj \
atan.obj \
atanh.obj \
clear.obj \
cmp.obj \
cmp_abs.obj \
cmp_si_si.obj \
conj.obj \
cos.obj \
cosh.obj \
div.obj \
div_2ui.obj \
div_fr.obj \
div_ui.obj \
exp.obj \
fma.obj \
fr_div.obj \
fr_sub.obj \
get_prec.obj \
get_prec2.obj \
get_version.obj \
get_x.obj \
imag.obj \
init2.obj \
init3.obj \
inp_str.obj \
log.obj \
log10.obj \
mem.obj \
mul.obj \
mul_2ui.obj \
mul_fr.obj \
mul_i.obj \
mul_si.obj \
mul_ui.obj \
neg.obj \
norm.obj \
out_str.obj \
pow.obj \
pow_d.obj \
pow_fr.obj \
pow_ld.obj \
pow_si.obj \
pow_ui.obj \
pow_z.obj \
proj.obj \
real.obj \
rootofunity.obj \
set.obj \
set_prec.obj \
set_str.obj \
set_x.obj \
set_x_x.obj \
sin.obj \
sin_cos.obj \
sinh.obj \
sqr.obj \
sqrt.obj \
strtoc.obj \
sub.obj \
sub_fr.obj \
sub_ui.obj \
swap.obj \
tan.obj \
tanh.obj \
uceil_log2.obj \
ui_div.obj \
ui_ui_sub.obj $(CPPLINKOBJECTS_LOGGING) \
urandom.obj
#
# Link target: automatically builds its object dependencies before
# executing its link command.
#
$(LIBRARY): $(DIRMPC)config.h $(CPPOBJECTS)
$(LINKER) /out:$@ $(CPPLINKOBJECTS) /LIBPATH:"$(GMPDIR)\lib" libmpfr.lib libgmp.lib $(LIBS_LOGGING)
$(DIRMPC)config.h :
echo #define PACKAGE_STRING "mpc" >$(DIRMPC)\config.h
echo #define PACKAGE_VERSION "$(VERSION)" >>$(DIRMPC)\config.h
echo #define STDC_HEADERS 1 >>$(DIRMPC)\config.h
echo #define dlsym(handle, name) GetProcAddress(GetModuleHandle(handle), name) >>$(DIRMPC)\config.h
echo #include "windows.h" >>$(DIRMPC)\config.h
#
# Clean target: "nmake /f Makefile.vc clean" to remove unwanted
# objects and executables.
#
clean:
del *.obj $(CPPLINKOBJECTS) $(LIBRARY) *.tlh $(DIRMPC)config.h *.dll *.lib *.exe
#
# install target: "nmake /f Makefile.vc install DESTDIR=xxx" to perform the installation.
#
install: $(LIBRARY)
-mkdir $(DESTDIR)
-mkdir $(DESTDIR)\include
copy $(DIRMPC)\mpc.h $(DESTDIR)\include
-mkdir $(DESTDIR)\lib
copy $(LIBRARY) $(DESTDIR)\lib
copy $(LIBRARYLIB) $(DESTDIR)\lib
#
# check target: "nmake /f Makefile.vc check GMPDIR=xxx MPFRDIR=xxx" to perform the installation.
#
check : test
test :
-copy $(GMPDIR)\lib\*gmp*.dll $(DIRMPCTESTS)
-copy $(MPFRDIR)\lib\*mpfr*.dll $(DIRMPCTESTS)
copy $(LIBRARY) $(DIRMPCTESTS)
$(TESTCOMPILE)tabs.c $(MIDTESTCOMPILE)tabs.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tabs.exe && cd ..
$(TESTCOMPILE)tacos.c $(MIDTESTCOMPILE)tacos.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tacos.exe && cd ..
$(TESTCOMPILE)tacosh.c $(MIDTESTCOMPILE)tacosh.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tacosh.exe && cd ..
$(TESTCOMPILE)tadd.c $(MIDTESTCOMPILE)tadd.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tadd.exe && cd ..
$(TESTCOMPILE)tadd_fr.c $(MIDTESTCOMPILE)tadd_fr.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tadd_fr.exe && cd ..
$(TESTCOMPILE)tadd_si.c $(MIDTESTCOMPILE)tadd_si.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tadd_si.exe && cd ..
$(TESTCOMPILE)tadd_ui.c $(MIDTESTCOMPILE)tadd_ui.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tadd_ui.exe && cd ..
$(TESTCOMPILE)targ.c $(MIDTESTCOMPILE)targ.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && targ.exe && cd ..
$(TESTCOMPILE)tasin.c $(MIDTESTCOMPILE)tasin.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tasin.exe && cd ..
$(TESTCOMPILE)tasinh.c $(MIDTESTCOMPILE)tasinh.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tasinh.exe && cd ..
$(TESTCOMPILE)tatan.c $(MIDTESTCOMPILE)tatan.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tatan.exe && cd ..
$(TESTCOMPILE)tatanh.c $(MIDTESTCOMPILE)tatanh.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tatanh.exe && cd ..
$(TESTCOMPILE)tcmp_abs.c $(MIDTESTCOMPILE)tcmp_abs.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tcmp_abs.exe && cd ..
$(TESTCOMPILE)tconj.c $(MIDTESTCOMPILE)tconj.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tconj.exe && cd ..
$(TESTCOMPILE)tcos.c $(MIDTESTCOMPILE)tcos.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tcos.exe && cd ..
$(TESTCOMPILE)tcosh.c $(MIDTESTCOMPILE)tcosh.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tcosh.exe && cd ..
$(TESTCOMPILE)tdiv.c $(MIDTESTCOMPILE)tdiv.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tdiv.exe && cd ..
$(TESTCOMPILE)tdiv_2ui.c $(MIDTESTCOMPILE)tdiv_2ui.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tdiv_2ui.exe && cd ..
$(TESTCOMPILE)tdiv_fr.c $(MIDTESTCOMPILE)tdiv_fr.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tdiv_fr.exe && cd ..
$(TESTCOMPILE)tdiv_ui.c $(MIDTESTCOMPILE)tdiv_ui.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tdiv_ui.exe && cd ..
$(TESTCOMPILE)texp.c $(MIDTESTCOMPILE)texp.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && texp.exe && cd ..
$(TESTCOMPILE)tfma.c $(MIDTESTCOMPILE)tfma.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tfma.exe && cd ..
$(TESTCOMPILE)tfr_div.c $(MIDTESTCOMPILE)tfr_div.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tfr_div.exe && cd ..
$(TESTCOMPILE)tfr_sub.c $(MIDTESTCOMPILE)tfr_sub.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tfr_sub.exe && cd ..
$(TESTCOMPILE)tget_version.c $(MIDTESTCOMPILE)tget_version.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tget_version.exe && cd ..
$(TESTCOMPILE)timag.c $(MIDTESTCOMPILE)timag.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && timag.exe && cd ..
$(TESTCOMPILE)tio_str.c $(MIDTESTCOMPILE)tio_str.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tio_str.exe && cd ..
$(TESTCOMPILE)tlog.c $(MIDTESTCOMPILE)tlog.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tlog.exe && cd ..
$(TESTCOMPILE)tlog10.c $(MIDTESTCOMPILE)tlog10.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tlog10.exe && cd ..
$(TESTCOMPILE)tmul.c $(MIDTESTCOMPILE)tmul.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tmul.exe && cd ..
$(TESTCOMPILE)tmul_2si.c $(MIDTESTCOMPILE)tmul_2si.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tmul_2si.exe && cd ..
$(TESTCOMPILE)tmul_2ui.c $(MIDTESTCOMPILE)tmul_2ui.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tmul_2ui.exe && cd ..
$(TESTCOMPILE)tmul_fr.c $(MIDTESTCOMPILE)tmul_fr.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tmul_fr.exe && cd ..
$(TESTCOMPILE)tmul_i.c $(MIDTESTCOMPILE)tmul_i.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tmul_i.exe && cd ..
$(TESTCOMPILE)tmul_si.c $(MIDTESTCOMPILE)tmul_si.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tmul_si.exe && cd ..
$(TESTCOMPILE)tmul_ui.c $(MIDTESTCOMPILE)tmul_ui.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tmul_ui.exe && cd ..
$(TESTCOMPILE)tneg.c $(MIDTESTCOMPILE)tneg.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tneg.exe && cd ..
$(TESTCOMPILE)tnorm.c $(MIDTESTCOMPILE)tnorm.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tnorm.exe && cd ..
$(TESTCOMPILE)tpow.c $(MIDTESTCOMPILE)tpow.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tpow.exe && cd ..
$(TESTCOMPILE)tpow_d.c $(MIDTESTCOMPILE)tpow_d.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tpow_d.exe && cd ..
$(TESTCOMPILE)tpow_fr.c $(MIDTESTCOMPILE)tpow_fr.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tpow_fr.exe && cd ..
$(TESTCOMPILE)tpow_ld.c $(MIDTESTCOMPILE)tpow_ld.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tpow_ld.exe && cd ..
$(TESTCOMPILE)tpow_si.c $(MIDTESTCOMPILE)tpow_si.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tpow_si.exe && cd ..
$(TESTCOMPILE)tpow_ui.c $(MIDTESTCOMPILE)tpow_ui.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tpow_ui.exe && cd ..
$(TESTCOMPILE)tpow_z.c $(MIDTESTCOMPILE)tpow_z.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tpow_z.exe && cd ..
$(TESTCOMPILE)tprec.c $(MIDTESTCOMPILE)tprec.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tprec.exe && cd ..
$(TESTCOMPILE)tproj.c $(MIDTESTCOMPILE)tproj.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tproj.exe && cd ..
$(TESTCOMPILE)treal.c $(MIDTESTCOMPILE)treal.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && treal.exe && cd ..
$(TESTCOMPILE)treimref.c $(MIDTESTCOMPILE)treimref.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && treimref.exe && cd ..
$(TESTCOMPILE)trootofunity.c $(MIDTESTCOMPILE)trootofunity.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && trootofunity.exe && cd ..
$(TESTCOMPILE)tset.c $(MIDTESTCOMPILE)tset.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tset.exe && cd ..
$(TESTCOMPILE)tsin.c $(MIDTESTCOMPILE)tsin.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tsin.exe && cd ..
$(TESTCOMPILE)tsin_cos.c $(MIDTESTCOMPILE)tsin_cos.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tsin_cos.exe && cd ..
$(TESTCOMPILE)tsinh.c $(MIDTESTCOMPILE)tsinh.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tsinh.exe && cd ..
$(TESTCOMPILE)tsqr.c $(MIDTESTCOMPILE)tsqr.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tsqr.exe && cd ..
$(TESTCOMPILE)tsqrt.c $(MIDTESTCOMPILE)tsqrt.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tsqrt.exe && cd ..
$(TESTCOMPILE)tstrtoc.c $(MIDTESTCOMPILE)tstrtoc.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tstrtoc.exe && cd ..
$(TESTCOMPILE)tsub.c $(MIDTESTCOMPILE)tsub.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tsub.exe && cd ..
$(TESTCOMPILE)tsub_fr.c $(MIDTESTCOMPILE)tsub_fr.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tsub_fr.exe && cd ..
$(TESTCOMPILE)tsub_ui.c $(MIDTESTCOMPILE)tsub_ui.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tsub_ui.exe && cd ..
$(TESTCOMPILE)tswap.c $(MIDTESTCOMPILE)tswap.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tswap.exe && cd ..
$(TESTCOMPILE)ttan.c $(MIDTESTCOMPILE)ttan.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && ttan.exe && cd ..
$(TESTCOMPILE)ttanh.c $(MIDTESTCOMPILE)ttanh.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && ttanh.exe && cd ..
$(TESTCOMPILE)tui_div.c $(MIDTESTCOMPILE)tui_div.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tui_div.exe && cd ..
$(TESTCOMPILE)tui_ui_sub.c $(MIDTESTCOMPILE)tui_ui_sub.exe $(ENDTESTCOMPILE)
cd $(DIRMPCTESTS) && tui_ui_sub.exe && cd ..
@echo --------------------------------------------------
@echo All tests passed
@echo --------------------------------------------------
mpc-1.1.0/doc/ 0000755 0001751 0001751 00000000000 13225640275 010046 5 0000000 0000000 mpc-1.1.0/doc/Makefile.am 0000644 0001751 0001751 00000001473 12426164730 012026 0000000 0000000 ## doc/Makefile.am -- Process this file with automake to produce Makefile.in
##
## Copyright (C) 2008 INRIA
##
## This file is part of GNU MPC.
##
## GNU MPC 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.
##
## GNU MPC 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 this program. If not, see http://www.gnu.org/licenses/ .
info_TEXINFOS = mpc.texi
mpc-1.1.0/doc/version.texi 0000644 0001751 0001751 00000000143 13225640274 012343 0000000 0000000 @set UPDATED 11 January 2018
@set UPDATED-MONTH January 2018
@set EDITION 1.1.0
@set VERSION 1.1.0
mpc-1.1.0/doc/texinfo.tex 0000444 0001751 0001751 00001167036 12645234050 012173 0000000 0000000 % texinfo.tex -- TeX macros to handle Texinfo files.
%
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
\def\texinfoversion{2013-02-01.11}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
% 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
%
% This texinfo.tex file is free software: you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
% published by the Free Software Foundation, either version 3 of the
% License, or (at your option) any later version.
%
% This texinfo.tex file 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
% General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program. If not, see .
%
% As a special exception, when this file is read by TeX when processing
% a Texinfo source document, you may use the result without
% restriction. This Exception is an additional permission under section 7
% of the GNU General Public License, version 3 ("GPLv3").
%
% Please try the latest version of texinfo.tex before submitting bug
% reports; you can get the latest version from:
% http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or
% http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or
% http://www.gnu.org/software/texinfo/ (the Texinfo home page)
% The texinfo.tex in any given distribution could well be out
% of date, so if that's what you're using, please check.
%
% Send bug reports to bug-texinfo@gnu.org. Please include including a
% complete document in each bug report with which we can reproduce the
% problem. Patches are, of course, greatly appreciated.
%
% To process a Texinfo manual with TeX, it's most reliable to use the
% texi2dvi shell script that comes with the distribution. For a simple
% manual foo.texi, however, you can get away with this:
% tex foo.texi
% texindex foo.??
% tex foo.texi
% tex foo.texi
% dvips foo.dvi -o # or whatever; this makes foo.ps.
% The extra TeX runs get the cross-reference information correct.
% Sometimes one run after texindex suffices, and sometimes you need more
% than two; texi2dvi does it as many times as necessary.
%
% It is possible to adapt texinfo.tex for other languages, to some
% extent. You can get the existing language-specific files from the
% full Texinfo distribution.
%
% The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
\message{Loading texinfo [version \texinfoversion]:}
% If in a .fmt file, print the version number
% and turn on active characters that we couldn't do earlier because
% they might have appeared in the input file name.
\everyjob{\message{[Texinfo version \texinfoversion]}%
\catcode`+=\active \catcode`\_=\active}
\chardef\other=12
% We never want plain's \outer definition of \+ in Texinfo.
% For @tex, we can use \tabalign.
\let\+ = \relax
% Save some plain tex macros whose names we will redefine.
\let\ptexb=\b
\let\ptexbullet=\bullet
\let\ptexc=\c
\let\ptexcomma=\,
\let\ptexdot=\.
\let\ptexdots=\dots
\let\ptexend=\end
\let\ptexequiv=\equiv
\let\ptexexclam=\!
\let\ptexfootnote=\footnote
\let\ptexgtr=>
\let\ptexhat=^
\let\ptexi=\i
\let\ptexindent=\indent
\let\ptexinsert=\insert
\let\ptexlbrace=\{
\let\ptexless=<
\let\ptexnewwrite\newwrite
\let\ptexnoindent=\noindent
\let\ptexplus=+
\let\ptexraggedright=\raggedright
\let\ptexrbrace=\}
\let\ptexslash=\/
\let\ptexstar=\*
\let\ptext=\t
\let\ptextop=\top
{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode
% If this character appears in an error message or help string, it
% starts a new line in the output.
\newlinechar = `^^J
% Use TeX 3.0's \inputlineno to get the line number, for better error
% messages, but if we're using an old version of TeX, don't do anything.
%
\ifx\inputlineno\thisisundefined
\let\linenumber = \empty % Pre-3.0.
\else
\def\linenumber{l.\the\inputlineno:\space}
\fi
% Set up fixed words for English if not already set.
\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
\ifx\putworderror\undefined \gdef\putworderror{error}\fi
\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
\ifx\putwordin\undefined \gdef\putwordin{in}\fi
\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi
\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
\ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi
\ifx\putwordof\undefined \gdef\putwordof{of}\fi
\ifx\putwordon\undefined \gdef\putwordon{on}\fi
\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi
\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi
\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi
\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi
\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi
\ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi
\ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi
%
\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi
\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi
\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi
\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi
\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi
\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi
\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi
\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi
\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi
\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi
\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi
\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi
%
\ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi
\ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi
\ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi
\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
% Since the category of space is not known, we have to be careful.
\chardef\spacecat = 10
\def\spaceisspace{\catcode`\ =\spacecat}
% sometimes characters are active, so we need control sequences.
\chardef\ampChar = `\&
\chardef\colonChar = `\:
\chardef\commaChar = `\,
\chardef\dashChar = `\-
\chardef\dotChar = `\.
\chardef\exclamChar= `\!
\chardef\hashChar = `\#
\chardef\lquoteChar= `\`
\chardef\questChar = `\?
\chardef\rquoteChar= `\'
\chardef\semiChar = `\;
\chardef\slashChar = `\/
\chardef\underChar = `\_
% Ignore a token.
%
\def\gobble#1{}
% The following is used inside several \edef's.
\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname}
% Hyphenation fixes.
\hyphenation{
Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script
ap-pen-dix bit-map bit-maps
data-base data-bases eshell fall-ing half-way long-est man-u-script
man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm
par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces
spell-ing spell-ings
stand-alone strong-est time-stamp time-stamps which-ever white-space
wide-spread wrap-around
}
% Margin to add to right of even pages, to left of odd pages.
\newdimen\bindingoffset
\newdimen\normaloffset
\newdimen\pagewidth \newdimen\pageheight
% For a final copy, take out the rectangles
% that mark overfull boxes (in case you have decided
% that the text looks ok even though it passes the margin).
%
\def\finalout{\overfullrule=0pt }
% Sometimes it is convenient to have everything in the transcript file
% and nothing on the terminal. We don't just call \tracingall here,
% since that produces some useless output on the terminal. We also make
% some effort to order the tracing commands to reduce output in the log
% file; cf. trace.sty in LaTeX.
%
\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
\def\loggingall{%
\tracingstats2
\tracingpages1
\tracinglostchars2 % 2 gives us more in etex
\tracingparagraphs1
\tracingoutput1
\tracingmacros2
\tracingrestores1
\showboxbreadth\maxdimen \showboxdepth\maxdimen
\ifx\eTeXversion\thisisundefined\else % etex gives us more logging
\tracingscantokens1
\tracingifs1
\tracinggroups1
\tracingnesting2
\tracingassigns1
\fi
\tracingcommands3 % 3 gives us more in etex
\errorcontextlines16
}%
% @errormsg{MSG}. Do the index-like expansions on MSG, but if things
% aren't perfect, it's not the end of the world, being an error message,
% after all.
%
\def\errormsg{\begingroup \indexnofonts \doerrormsg}
\def\doerrormsg#1{\errmessage{#1}}
% add check for \lastpenalty to plain's definitions. If the last thing
% we did was a \nobreak, we don't want to insert more space.
%
\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
\removelastskip\penalty-50\smallskip\fi\fi}
\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
\removelastskip\penalty-100\medskip\fi\fi}
\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
\removelastskip\penalty-200\bigskip\fi\fi}
% Do @cropmarks to get crop marks.
%
\newif\ifcropmarks
\let\cropmarks = \cropmarkstrue
%
% Dimensions to add cropmarks at corners.
% Added by P. A. MacKay, 12 Nov. 1986
%
\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
\newdimen\cornerlong \cornerlong=1pc
\newdimen\cornerthick \cornerthick=.3pt
\newdimen\topandbottommargin \topandbottommargin=.75in
% Output a mark which sets \thischapter, \thissection and \thiscolor.
% We dump everything together because we only have one kind of mark.
% This works because we only use \botmark / \topmark, not \firstmark.
%
% A mark contains a subexpression of the \ifcase ... \fi construct.
% \get*marks macros below extract the needed part using \ifcase.
%
% Another complication is to let the user choose whether \thischapter
% (\thissection) refers to the chapter (section) in effect at the top
% of a page, or that at the bottom of a page. The solution is
% described on page 260 of The TeXbook. It involves outputting two
% marks for the sectioning macros, one before the section break, and
% one after. I won't pretend I can describe this better than DEK...
\def\domark{%
\toks0=\expandafter{\lastchapterdefs}%
\toks2=\expandafter{\lastsectiondefs}%
\toks4=\expandafter{\prevchapterdefs}%
\toks6=\expandafter{\prevsectiondefs}%
\toks8=\expandafter{\lastcolordefs}%
\mark{%
\the\toks0 \the\toks2
\noexpand\or \the\toks4 \the\toks6
\noexpand\else \the\toks8
}%
}
% \topmark doesn't work for the very first chapter (after the title
% page or the contents), so we use \firstmark there -- this gets us
% the mark with the chapter defs, unless the user sneaks in, e.g.,
% @setcolor (or @url, or @link, etc.) between @contents and the very
% first @chapter.
\def\gettopheadingmarks{%
\ifcase0\topmark\fi
\ifx\thischapter\empty \ifcase0\firstmark\fi \fi
}
\def\getbottomheadingmarks{\ifcase1\botmark\fi}
\def\getcolormarks{\ifcase2\topmark\fi}
% Avoid "undefined control sequence" errors.
\def\lastchapterdefs{}
\def\lastsectiondefs{}
\def\prevchapterdefs{}
\def\prevsectiondefs{}
\def\lastcolordefs{}
% Main output routine.
\chardef\PAGE = 255
\output = {\onepageout{\pagecontents\PAGE}}
\newbox\headlinebox
\newbox\footlinebox
% \onepageout takes a vbox as an argument. Note that \pagecontents
% does insertions, but you have to call it yourself.
\def\onepageout#1{%
\ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
%
\ifodd\pageno \advance\hoffset by \bindingoffset
\else \advance\hoffset by -\bindingoffset\fi
%
% Do this outside of the \shipout so @code etc. will be expanded in
% the headline as they should be, not taken literally (outputting ''code).
\ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
\setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
\ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
\setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
%
{%
% Have to do this stuff outside the \shipout because we want it to
% take effect in \write's, yet the group defined by the \vbox ends
% before the \shipout runs.
%
\indexdummies % don't expand commands in the output.
\normalturnoffactive % \ in index entries must not stay \, e.g., if
% the page break happens to be in the middle of an example.
% We don't want .vr (or whatever) entries like this:
% \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
% "\acronym" won't work when it's read back in;
% it needs to be
% {\code {{\tt \backslashcurfont }acronym}
\shipout\vbox{%
% Do this early so pdf references go to the beginning of the page.
\ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
%
\ifcropmarks \vbox to \outervsize\bgroup
\hsize = \outerhsize
\vskip-\topandbottommargin
\vtop to0pt{%
\line{\ewtop\hfil\ewtop}%
\nointerlineskip
\line{%
\vbox{\moveleft\cornerthick\nstop}%
\hfill
\vbox{\moveright\cornerthick\nstop}%
}%
\vss}%
\vskip\topandbottommargin
\line\bgroup
\hfil % center the page within the outer (page) hsize.
\ifodd\pageno\hskip\bindingoffset\fi
\vbox\bgroup
\fi
%
\unvbox\headlinebox
\pagebody{#1}%
\ifdim\ht\footlinebox > 0pt
% Only leave this space if the footline is nonempty.
% (We lessened \vsize for it in \oddfootingyyy.)
% The \baselineskip=24pt in plain's \makefootline has no effect.
\vskip 24pt
\unvbox\footlinebox
\fi
%
\ifcropmarks
\egroup % end of \vbox\bgroup
\hfil\egroup % end of (centering) \line\bgroup
\vskip\topandbottommargin plus1fill minus1fill
\boxmaxdepth = \cornerthick
\vbox to0pt{\vss
\line{%
\vbox{\moveleft\cornerthick\nsbot}%
\hfill
\vbox{\moveright\cornerthick\nsbot}%
}%
\nointerlineskip
\line{\ewbot\hfil\ewbot}%
}%
\egroup % \vbox from first cropmarks clause
\fi
}% end of \shipout\vbox
}% end of group with \indexdummies
\advancepageno
\ifnum\outputpenalty>-20000 \else\dosupereject\fi
}
\newinsert\margin \dimen\margin=\maxdimen
\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
{\catcode`\@ =11
\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
% marginal hacks, juha@viisa.uucp (Juha Takala)
\ifvoid\margin\else % marginal info is present
\rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
\dimen@=\dp#1\relax \unvbox#1\relax
\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
\ifr@ggedbottom \kern-\dimen@ \vfil \fi}
}
% Here are the rules for the cropmarks. Note that they are
% offset so that the space between them is truly \outerhsize or \outervsize
% (P. A. MacKay, 12 November, 1986)
%
\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
\def\nstop{\vbox
{\hrule height\cornerthick depth\cornerlong width\cornerthick}}
\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
\def\nsbot{\vbox
{\hrule height\cornerlong depth\cornerthick width\cornerthick}}
% Parse an argument, then pass it to #1. The argument is the rest of
% the input line (except we remove a trailing comment). #1 should be a
% macro which expects an ordinary undelimited TeX argument.
%
\def\parsearg{\parseargusing{}}
\def\parseargusing#1#2{%
\def\argtorun{#2}%
\begingroup
\obeylines
\spaceisspace
#1%
\parseargline\empty% Insert the \empty token, see \finishparsearg below.
}
{\obeylines %
\gdef\parseargline#1^^M{%
\endgroup % End of the group started in \parsearg.
\argremovecomment #1\comment\ArgTerm%
}%
}
% First remove any @comment, then any @c comment.
\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
% Each occurrence of `\^^M' or `\^^M' is replaced by a single space.
%
% \argremovec might leave us with trailing space, e.g.,
% @end itemize @c foo
% This space token undergoes the same procedure and is eventually removed
% by \finishparsearg.
%
\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M}
\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M}
\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
\def\temp{#3}%
\ifx\temp\empty
% Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
\let\temp\finishparsearg
\else
\let\temp\argcheckspaces
\fi
% Put the space token in:
\temp#1 #3\ArgTerm
}
% If a _delimited_ argument is enclosed in braces, they get stripped; so
% to get _exactly_ the rest of the line, we had to prevent such situation.
% We prepended an \empty token at the very beginning and we expand it now,
% just before passing the control to \argtorun.
% (Similarly, we have to think about #3 of \argcheckspacesY above: it is
% either the null string, or it ends with \^^M---thus there is no danger
% that a pair of braces would be stripped.
%
% But first, we have to remove the trailing space token.
%
\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
% \parseargdef\foo{...}
% is roughly equivalent to
% \def\foo{\parsearg\Xfoo}
% \def\Xfoo#1{...}
%
% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my
% favourite TeX trick. --kasal, 16nov03
\def\parseargdef#1{%
\expandafter \doparseargdef \csname\string#1\endcsname #1%
}
\def\doparseargdef#1#2{%
\def#2{\parsearg#1}%
\def#1##1%
}
% Several utility definitions with active space:
{
\obeyspaces
\gdef\obeyedspace{ }
% Make each space character in the input produce a normal interword
% space in the output. Don't allow a line break at this space, as this
% is used only in environments like @example, where each line of input
% should produce a line of output anyway.
%
\gdef\sepspaces{\obeyspaces\let =\tie}
% If an index command is used in an @example environment, any spaces
% therein should become regular spaces in the raw index file, not the
% expansion of \tie (\leavevmode \penalty \@M \ ).
\gdef\unsepspaces{\let =\space}
}
\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
% Define the framework for environments in texinfo.tex. It's used like this:
%
% \envdef\foo{...}
% \def\Efoo{...}
%
% It's the responsibility of \envdef to insert \begingroup before the
% actual body; @end closes the group after calling \Efoo. \envdef also
% defines \thisenv, so the current environment is known; @end checks
% whether the environment name matches. The \checkenv macro can also be
% used to check whether the current environment is the one expected.
%
% Non-false conditionals (@iftex, @ifset) don't fit into this, so they
% are not treated as environments; they don't open a group. (The
% implementation of @end takes care not to call \endgroup in this
% special case.)
% At run-time, environments start with this:
\def\startenvironment#1{\begingroup\def\thisenv{#1}}
% initialize
\let\thisenv\empty
% ... but they get defined via ``\envdef\foo{...}'':
\long\def\envdef#1#2{\def#1{\startenvironment#1#2}}
\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
% Check whether we're in the right environment:
\def\checkenv#1{%
\def\temp{#1}%
\ifx\thisenv\temp
\else
\badenverr
\fi
}
% Environment mismatch, #1 expected:
\def\badenverr{%
\errhelp = \EMsimple
\errmessage{This command can appear only \inenvironment\temp,
not \inenvironment\thisenv}%
}
\def\inenvironment#1{%
\ifx#1\empty
outside of any environment%
\else
in environment \expandafter\string#1%
\fi
}
% @end foo executes the definition of \Efoo.
% But first, it executes a specialized version of \checkenv
%
\parseargdef\end{%
\if 1\csname iscond.#1\endcsname
\else
% The general wording of \badenverr may not be ideal.
\expandafter\checkenv\csname#1\endcsname
\csname E#1\endcsname
\endgroup
\fi
}
\newhelp\EMsimple{Press RETURN to continue.}
% Be sure we're in horizontal mode when doing a tie, since we make space
% equivalent to this in @example-like environments. Otherwise, a space
% at the beginning of a line will start with \penalty -- and
% since \penalty is valid in vertical mode, we'd end up putting the
% penalty on the vertical list instead of in the new paragraph.
{\catcode`@ = 11
% Avoid using \@M directly, because that causes trouble
% if the definition is written into an index file.
\global\let\tiepenalty = \@M
\gdef\tie{\leavevmode\penalty\tiepenalty\ }
}
% @: forces normal size whitespace following.
\def\:{\spacefactor=1000 }
% @* forces a line break.
\def\*{\unskip\hfil\break\hbox{}\ignorespaces}
% @/ allows a line break.
\let\/=\allowbreak
% @. is an end-of-sentence period.
\def\.{.\spacefactor=\endofsentencespacefactor\space}
% @! is an end-of-sentence bang.
\def\!{!\spacefactor=\endofsentencespacefactor\space}
% @? is an end-of-sentence query.
\def\?{?\spacefactor=\endofsentencespacefactor\space}
% @frenchspacing on|off says whether to put extra space after punctuation.
%
\def\onword{on}
\def\offword{off}
%
\parseargdef\frenchspacing{%
\def\temp{#1}%
\ifx\temp\onword \plainfrenchspacing
\else\ifx\temp\offword \plainnonfrenchspacing
\else
\errhelp = \EMsimple
\errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
\fi\fi
}
% @w prevents a word break. Without the \leavevmode, @w at the
% beginning of a paragraph, when TeX is still in vertical mode, would
% produce a whole line of output instead of starting the paragraph.
\def\w#1{\leavevmode\hbox{#1}}
% @group ... @end group forces ... to be all on one page, by enclosing
% it in a TeX vbox. We use \vtop instead of \vbox to construct the box
% to keep its height that of a normal line. According to the rules for
% \topskip (p.114 of the TeXbook), the glue inserted is
% max (\topskip - \ht (first item), 0). If that height is large,
% therefore, no glue is inserted, and the space between the headline and
% the text is small, which looks bad.
%
% Another complication is that the group might be very large. This can
% cause the glue on the previous page to be unduly stretched, because it
% does not have much material. In this case, it's better to add an
% explicit \vfill so that the extra space is at the bottom. The
% threshold for doing this is if the group is more than \vfilllimit
% percent of a page (\vfilllimit can be changed inside of @tex).
%
\newbox\groupbox
\def\vfilllimit{0.7}
%
\envdef\group{%
\ifnum\catcode`\^^M=\active \else
\errhelp = \groupinvalidhelp
\errmessage{@group invalid in context where filling is enabled}%
\fi
\startsavinginserts
%
\setbox\groupbox = \vtop\bgroup
% Do @comment since we are called inside an environment such as
% @example, where each end-of-line in the input causes an
% end-of-line in the output. We don't want the end-of-line after
% the `@group' to put extra space in the output. Since @group
% should appear on a line by itself (according to the Texinfo
% manual), we don't worry about eating any user text.
\comment
}
%
% The \vtop produces a box with normal height and large depth; thus, TeX puts
% \baselineskip glue before it, and (when the next line of text is done)
% \lineskip glue after it. Thus, space below is not quite equal to space
% above. But it's pretty close.
\def\Egroup{%
% To get correct interline space between the last line of the group
% and the first line afterwards, we have to propagate \prevdepth.
\endgraf % Not \par, as it may have been set to \lisppar.
\global\dimen1 = \prevdepth
\egroup % End the \vtop.
% \dimen0 is the vertical size of the group's box.
\dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox
% \dimen2 is how much space is left on the page (more or less).
\dimen2 = \pageheight \advance\dimen2 by -\pagetotal
% if the group doesn't fit on the current page, and it's a big big
% group, force a page break.
\ifdim \dimen0 > \dimen2
\ifdim \pagetotal < \vfilllimit\pageheight
\page
\fi
\fi
\box\groupbox
\prevdepth = \dimen1
\checkinserts
}
%
% TeX puts in an \escapechar (i.e., `@') at the beginning of the help
% message, so this ends up printing `@group can only ...'.
%
\newhelp\groupinvalidhelp{%
group can only be used in environments such as @example,^^J%
where each line of input produces a line of output.}
% @need space-in-mils
% forces a page break if there is not space-in-mils remaining.
\newdimen\mil \mil=0.001in
\parseargdef\need{%
% Ensure vertical mode, so we don't make a big box in the middle of a
% paragraph.
\par
%
% If the @need value is less than one line space, it's useless.
\dimen0 = #1\mil
\dimen2 = \ht\strutbox
\advance\dimen2 by \dp\strutbox
\ifdim\dimen0 > \dimen2
%
% Do a \strut just to make the height of this box be normal, so the
% normal leading is inserted relative to the preceding line.
% And a page break here is fine.
\vtop to #1\mil{\strut\vfil}%
%
% TeX does not even consider page breaks if a penalty added to the
% main vertical list is 10000 or more. But in order to see if the
% empty box we just added fits on the page, we must make it consider
% page breaks. On the other hand, we don't want to actually break the
% page after the empty box. So we use a penalty of 9999.
%
% There is an extremely small chance that TeX will actually break the
% page at this \penalty, if there are no other feasible breakpoints in
% sight. (If the user is using lots of big @group commands, which
% almost-but-not-quite fill up a page, TeX will have a hard time doing
% good page breaking, for example.) However, I could not construct an
% example where a page broke at this \penalty; if it happens in a real
% document, then we can reconsider our strategy.
\penalty9999
%
% Back up by the size of the box, whether we did a page break or not.
\kern -#1\mil
%
% Do not allow a page break right after this kern.
\nobreak
\fi
}
% @br forces paragraph break (and is undocumented).
\let\br = \par
% @page forces the start of a new page.
%
\def\page{\par\vfill\supereject}
% @exdent text....
% outputs text on separate line in roman font, starting at standard page margin
% This records the amount of indent in the innermost environment.
% That's how much \exdent should take out.
\newskip\exdentamount
% This defn is used inside fill environments such as @defun.
\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}
% This defn is used inside nofill environments such as @example.
\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount
\leftline{\hskip\leftskip{\rm#1}}}}
% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
% paragraph. For more general purposes, use the \margin insertion
% class. WHICH is `l' or `r'. Not documented, written for gawk manual.
%
\newskip\inmarginspacing \inmarginspacing=1cm
\def\strutdepth{\dp\strutbox}
%
\def\doinmargin#1#2{\strut\vadjust{%
\nobreak
\kern-\strutdepth
\vtop to \strutdepth{%
\baselineskip=\strutdepth
\vss
% if you have multiple lines of stuff to put here, you'll need to
% make the vbox yourself of the appropriate size.
\ifx#1l%
\llap{\ignorespaces #2\hskip\inmarginspacing}%
\else
\rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}%
\fi
\null
}%
}}
\def\inleftmargin{\doinmargin l}
\def\inrightmargin{\doinmargin r}
%
% @inmargin{TEXT [, RIGHT-TEXT]}
% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
% else use TEXT for both).
%
\def\inmargin#1{\parseinmargin #1,,\finish}
\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing.
\setbox0 = \hbox{\ignorespaces #2}%
\ifdim\wd0 > 0pt
\def\lefttext{#1}% have both texts
\def\righttext{#2}%
\else
\def\lefttext{#1}% have only one text
\def\righttext{#1}%
\fi
%
\ifodd\pageno
\def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
\else
\def\temp{\inleftmargin\lefttext}%
\fi
\temp
}
% @| inserts a changebar to the left of the current line. It should
% surround any changed text. This approach does *not* work if the
% change spans more than two lines of output. To handle that, we would
% have adopt a much more difficult approach (putting marks into the main
% vertical list for the beginning and end of each change). This command
% is not documented, not supported, and doesn't work.
%
\def\|{%
% \vadjust can only be used in horizontal mode.
\leavevmode
%
% Append this vertical mode material after the current line in the output.
\vadjust{%
% We want to insert a rule with the height and depth of the current
% leading; that is exactly what \strutbox is supposed to record.
\vskip-\baselineskip
%
% \vadjust-items are inserted at the left edge of the type. So
% the \llap here moves out into the left-hand margin.
\llap{%
%
% For a thicker or thinner bar, change the `1pt'.
\vrule height\baselineskip width1pt
%
% This is the space between the bar and the text.
\hskip 12pt
}%
}%
}
% @include FILE -- \input text of FILE.
%
\def\include{\parseargusing\filenamecatcodes\includezzz}
\def\includezzz#1{%
\pushthisfilestack
\def\thisfile{#1}%
{%
\makevalueexpandable % we want to expand any @value in FILE.
\turnoffactive % and allow special characters in the expansion
\indexnofonts % Allow `@@' and other weird things in file names.
\wlog{texinfo.tex: doing @include of #1^^J}%
\edef\temp{\noexpand\input #1 }%
%
% This trickery is to read FILE outside of a group, in case it makes
% definitions, etc.
\expandafter
}\temp
\popthisfilestack
}
\def\filenamecatcodes{%
\catcode`\\=\other
\catcode`~=\other
\catcode`^=\other
\catcode`_=\other
\catcode`|=\other
\catcode`<=\other
\catcode`>=\other
\catcode`+=\other
\catcode`-=\other
\catcode`\`=\other
\catcode`\'=\other
}
\def\pushthisfilestack{%
\expandafter\pushthisfilestackX\popthisfilestack\StackTerm
}
\def\pushthisfilestackX{%
\expandafter\pushthisfilestackY\thisfile\StackTerm
}
\def\pushthisfilestackY #1\StackTerm #2\StackTerm {%
\gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}%
}
\def\popthisfilestack{\errthisfilestackempty}
\def\errthisfilestackempty{\errmessage{Internal error:
the stack of filenames is empty.}}
%
\def\thisfile{}
% @center line
% outputs that line, centered.
%
\parseargdef\center{%
\ifhmode
\let\centersub\centerH
\else
\let\centersub\centerV
\fi
\centersub{\hfil \ignorespaces#1\unskip \hfil}%
\let\centersub\relax % don't let the definition persist, just in case
}
\def\centerH#1{{%
\hfil\break
\advance\hsize by -\leftskip
\advance\hsize by -\rightskip
\line{#1}%
\break
}}
%
\newcount\centerpenalty
\def\centerV#1{%
% The idea here is the same as in \startdefun, \cartouche, etc.: if
% @center is the first thing after a section heading, we need to wipe
% out the negative parskip inserted by \sectionheading, but still
% prevent a page break here.
\centerpenalty = \lastpenalty
\ifnum\centerpenalty>10000 \vskip\parskip \fi
\ifnum\centerpenalty>9999 \penalty\centerpenalty \fi
\line{\kern\leftskip #1\kern\rightskip}%
}
% @sp n outputs n lines of vertical space
%
\parseargdef\sp{\vskip #1\baselineskip}
% @comment ...line which is ignored...
% @c is the same as @comment
% @ignore ... @end ignore is another way to write a comment
%
\def\comment{\begingroup \catcode`\^^M=\other%
\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
\commentxxx}
{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
%
\let\c=\comment
% @paragraphindent NCHARS
% We'll use ems for NCHARS, close enough.
% NCHARS can also be the word `asis' or `none'.
% We cannot feasibly implement @paragraphindent asis, though.
%
\def\asisword{asis} % no translation, these are keywords
\def\noneword{none}
%
\parseargdef\paragraphindent{%
\def\temp{#1}%
\ifx\temp\asisword
\else
\ifx\temp\noneword
\defaultparindent = 0pt
\else
\defaultparindent = #1em
\fi
\fi
\parindent = \defaultparindent
}
% @exampleindent NCHARS
% We'll use ems for NCHARS like @paragraphindent.
% It seems @exampleindent asis isn't necessary, but
% I preserve it to make it similar to @paragraphindent.
\parseargdef\exampleindent{%
\def\temp{#1}%
\ifx\temp\asisword
\else
\ifx\temp\noneword
\lispnarrowing = 0pt
\else
\lispnarrowing = #1em
\fi
\fi
}
% @firstparagraphindent WORD
% If WORD is `none', then suppress indentation of the first paragraph
% after a section heading. If WORD is `insert', then do indent at such
% paragraphs.
%
% The paragraph indentation is suppressed or not by calling
% \suppressfirstparagraphindent, which the sectioning commands do.
% We switch the definition of this back and forth according to WORD.
% By default, we suppress indentation.
%
\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
\def\insertword{insert}
%
\parseargdef\firstparagraphindent{%
\def\temp{#1}%
\ifx\temp\noneword
\let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent
\else\ifx\temp\insertword
\let\suppressfirstparagraphindent = \relax
\else
\errhelp = \EMsimple
\errmessage{Unknown @firstparagraphindent option `\temp'}%
\fi\fi
}
% Here is how we actually suppress indentation. Redefine \everypar to
% \kern backwards by \parindent, and then reset itself to empty.
%
% We also make \indent itself not actually do anything until the next
% paragraph.
%
\gdef\dosuppressfirstparagraphindent{%
\gdef\indent{%
\restorefirstparagraphindent
\indent
}%
\gdef\noindent{%
\restorefirstparagraphindent
\noindent
}%
\global\everypar = {%
\kern -\parindent
\restorefirstparagraphindent
}%
}
\gdef\restorefirstparagraphindent{%
\global \let \indent = \ptexindent
\global \let \noindent = \ptexnoindent
\global \everypar = {}%
}
% @refill is a no-op.
\let\refill=\relax
% If working on a large document in chapters, it is convenient to
% be able to disable indexing, cross-referencing, and contents, for test runs.
% This is done with @novalidate (before @setfilename).
%
\newif\iflinks \linkstrue % by default we want the aux files.
\let\novalidate = \linksfalse
% @setfilename is done at the beginning of every texinfo file.
% So open here the files we need to have open while reading the input.
% This makes it possible to make a .fmt file for texinfo.
\def\setfilename{%
\fixbackslash % Turn off hack to swallow `\input texinfo'.
\iflinks
\tryauxfile
% Open the new aux file. TeX will close it automatically at exit.
\immediate\openout\auxfile=\jobname.aux
\fi % \openindices needs to do some work in any case.
\openindices
\let\setfilename=\comment % Ignore extra @setfilename cmds.
%
% If texinfo.cnf is present on the system, read it.
% Useful for site-wide @afourpaper, etc.
\openin 1 texinfo.cnf
\ifeof 1 \else \input texinfo.cnf \fi
\closein 1
%
\comment % Ignore the actual filename.
}
% Called from \setfilename.
%
\def\openindices{%
\newindex{cp}%
\newcodeindex{fn}%
\newcodeindex{vr}%
\newcodeindex{tp}%
\newcodeindex{ky}%
\newcodeindex{pg}%
}
% @bye.
\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
\message{pdf,}
% adobe `portable' document format
\newcount\tempnum
\newcount\lnkcount
\newtoks\filename
\newcount\filenamelength
\newcount\pgn
\newtoks\toksA
\newtoks\toksB
\newtoks\toksC
\newtoks\toksD
\newbox\boxA
\newcount\countA
\newif\ifpdf
\newif\ifpdfmakepagedest
% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
% can be set). So we test for \relax and 0 as well as being undefined.
\ifx\pdfoutput\thisisundefined
\else
\ifx\pdfoutput\relax
\else
\ifcase\pdfoutput
\else
\pdftrue
\fi
\fi
\fi
% PDF uses PostScript string constants for the names of xref targets,
% for display in the outlines, and in other places. Thus, we have to
% double any backslashes. Otherwise, a name like "\node" will be
% interpreted as a newline (\n), followed by o, d, e. Not good.
%
% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and
% related messages. The final outcome is that it is up to the TeX user
% to double the backslashes and otherwise make the string valid, so
% that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to
% do this reliably, so we use it.
% #1 is a control sequence in which to do the replacements,
% which we \xdef.
\def\txiescapepdf#1{%
\ifx\pdfescapestring\thisisundefined
% No primitive available; should we give a warning or log?
% Many times it won't matter.
\else
% The expandable \pdfescapestring primitive escapes parentheses,
% backslashes, and other special chars.
\xdef#1{\pdfescapestring{#1}}%
\fi
}
\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
with PDF output, and none of those formats could be found. (.eps cannot
be supported due to the design of the PDF format; use regular TeX (DVI
output) for that.)}
\ifpdf
%
% Color manipulation macros based on pdfcolor.tex,
% except using rgb instead of cmyk; the latter is said to render as a
% very dark gray on-screen and a very dark halftone in print, instead
% of actual black.
\def\rgbDarkRed{0.50 0.09 0.12}
\def\rgbBlack{0 0 0}
%
% k sets the color for filling (usual text, etc.);
% K sets the color for stroking (thin rules, e.g., normal _'s).
\def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}}
%
% Set color, and create a mark which defines \thiscolor accordingly,
% so that \makeheadline knows which color to restore.
\def\setcolor#1{%
\xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
\domark
\pdfsetcolor{#1}%
}
%
\def\maincolor{\rgbBlack}
\pdfsetcolor{\maincolor}
\edef\thiscolor{\maincolor}
\def\lastcolordefs{}
%
\def\makefootline{%
\baselineskip24pt
\line{\pdfsetcolor{\maincolor}\the\footline}%
}
%
\def\makeheadline{%
\vbox to 0pt{%
\vskip-22.5pt
\line{%
\vbox to8.5pt{}%
% Extract \thiscolor definition from the marks.
\getcolormarks
% Typeset the headline with \maincolor, then restore the color.
\pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
}%
\vss
}%
\nointerlineskip
}
%
%
\pdfcatalog{/PageMode /UseOutlines}
%
% #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
\def\dopdfimage#1#2#3{%
\def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
\def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
%
% pdftex (and the PDF format) support .pdf, .png, .jpg (among
% others). Let's try in that order, PDF first since if
% someone has a scalable image, presumably better to use that than a
% bitmap.
\let\pdfimgext=\empty
\begingroup
\openin 1 #1.pdf \ifeof 1
\openin 1 #1.PDF \ifeof 1
\openin 1 #1.png \ifeof 1
\openin 1 #1.jpg \ifeof 1
\openin 1 #1.jpeg \ifeof 1
\openin 1 #1.JPG \ifeof 1
\errhelp = \nopdfimagehelp
\errmessage{Could not find image file #1 for pdf}%
\else \gdef\pdfimgext{JPG}%
\fi
\else \gdef\pdfimgext{jpeg}%
\fi
\else \gdef\pdfimgext{jpg}%
\fi
\else \gdef\pdfimgext{png}%
\fi
\else \gdef\pdfimgext{PDF}%
\fi
\else \gdef\pdfimgext{pdf}%
\fi
\closein 1
\endgroup
%
% without \immediate, ancient pdftex seg faults when the same image is
% included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
\ifnum\pdftexversion < 14
\immediate\pdfimage
\else
\immediate\pdfximage
\fi
\ifdim \wd0 >0pt width \pdfimagewidth \fi
\ifdim \wd2 >0pt height \pdfimageheight \fi
\ifnum\pdftexversion<13
#1.\pdfimgext
\else
{#1.\pdfimgext}%
\fi
\ifnum\pdftexversion < 14 \else
\pdfrefximage \pdflastximage
\fi}
%
\def\pdfmkdest#1{{%
% We have to set dummies so commands such as @code, and characters
% such as \, aren't expanded when present in a section title.
\indexnofonts
\turnoffactive
\makevalueexpandable
\def\pdfdestname{#1}%
\txiescapepdf\pdfdestname
\safewhatsit{\pdfdest name{\pdfdestname} xyz}%
}}
%
% used to mark target names; must be expandable.
\def\pdfmkpgn#1{#1}
%
% by default, use a color that is dark enough to print on paper as
% nearly black, but still distinguishable for online viewing.
\def\urlcolor{\rgbDarkRed}
\def\linkcolor{\rgbDarkRed}
\def\endlink{\setcolor{\maincolor}\pdfendlink}
%
% Adding outlines to PDF; macros for calculating structure of outlines
% come from Petr Olsak
\def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
\else \csname#1\endcsname \fi}
\def\advancenumber#1{\tempnum=\expnumber{#1}\relax
\advance\tempnum by 1
\expandafter\xdef\csname#1\endcsname{\the\tempnum}}
%
% #1 is the section text, which is what will be displayed in the
% outline by the pdf viewer. #2 is the pdf expression for the number
% of subentries (or empty, for subsubsections). #3 is the node text,
% which might be empty if this toc entry had no corresponding node.
% #4 is the page number
%
\def\dopdfoutline#1#2#3#4{%
% Generate a link to the node text if that exists; else, use the
% page number. We could generate a destination for the section
% text in the case where a section has no node, but it doesn't
% seem worth the trouble, since most documents are normally structured.
\edef\pdfoutlinedest{#3}%
\ifx\pdfoutlinedest\empty
\def\pdfoutlinedest{#4}%
\else
\txiescapepdf\pdfoutlinedest
\fi
%
% Also escape PDF chars in the display string.
\edef\pdfoutlinetext{#1}%
\txiescapepdf\pdfoutlinetext
%
\pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
}
%
\def\pdfmakeoutlines{%
\begingroup
% Read toc silently, to get counts of subentries for \pdfoutline.
\def\partentry##1##2##3##4{}% ignore parts in the outlines
\def\numchapentry##1##2##3##4{%
\def\thischapnum{##2}%
\def\thissecnum{0}%
\def\thissubsecnum{0}%
}%
\def\numsecentry##1##2##3##4{%
\advancenumber{chap\thischapnum}%
\def\thissecnum{##2}%
\def\thissubsecnum{0}%
}%
\def\numsubsecentry##1##2##3##4{%
\advancenumber{sec\thissecnum}%
\def\thissubsecnum{##2}%
}%
\def\numsubsubsecentry##1##2##3##4{%
\advancenumber{subsec\thissubsecnum}%
}%
\def\thischapnum{0}%
\def\thissecnum{0}%
\def\thissubsecnum{0}%
%
% use \def rather than \let here because we redefine \chapentry et
% al. a second time, below.
\def\appentry{\numchapentry}%
\def\appsecentry{\numsecentry}%
\def\appsubsecentry{\numsubsecentry}%
\def\appsubsubsecentry{\numsubsubsecentry}%
\def\unnchapentry{\numchapentry}%
\def\unnsecentry{\numsecentry}%
\def\unnsubsecentry{\numsubsecentry}%
\def\unnsubsubsecentry{\numsubsubsecentry}%
\readdatafile{toc}%
%
% Read toc second time, this time actually producing the outlines.
% The `-' means take the \expnumber as the absolute number of
% subentries, which we calculated on our first read of the .toc above.
%
% We use the node names as the destinations.
\def\numchapentry##1##2##3##4{%
\dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}%
\def\numsecentry##1##2##3##4{%
\dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}%
\def\numsubsecentry##1##2##3##4{%
\dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}%
\def\numsubsubsecentry##1##2##3##4{% count is always zero
\dopdfoutline{##1}{}{##3}{##4}}%
%
% PDF outlines are displayed using system fonts, instead of
% document fonts. Therefore we cannot use special characters,
% since the encoding is unknown. For example, the eogonek from
% Latin 2 (0xea) gets translated to a | character. Info from
% Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
%
% TODO this right, we have to translate 8-bit characters to
% their "best" equivalent, based on the @documentencoding. Too
% much work for too little return. Just use the ASCII equivalents
% we use for the index sort strings.
%
\indexnofonts
\setupdatafile
% We can have normal brace characters in the PDF outlines, unlike
% Texinfo index files. So set that up.
\def\{{\lbracecharliteral}%
\def\}{\rbracecharliteral}%
\catcode`\\=\active \otherbackslash
\input \tocreadfilename
\endgroup
}
{\catcode`[=1 \catcode`]=2
\catcode`{=\other \catcode`}=\other
\gdef\lbracecharliteral[{]%
\gdef\rbracecharliteral[}]%
]
%
\def\skipspaces#1{\def\PP{#1}\def\D{|}%
\ifx\PP\D\let\nextsp\relax
\else\let\nextsp\skipspaces
\addtokens{\filename}{\PP}%
\advance\filenamelength by 1
\fi
\nextsp}
\def\getfilename#1{%
\filenamelength=0
% If we don't expand the argument now, \skipspaces will get
% snagged on things like "@value{foo}".
\edef\temp{#1}%
\expandafter\skipspaces\temp|\relax
}
\ifnum\pdftexversion < 14
\let \startlink \pdfannotlink
\else
\let \startlink \pdfstartlink
\fi
% make a live url in pdf output.
\def\pdfurl#1{%
\begingroup
% it seems we really need yet another set of dummies; have not
% tried to figure out what each command should do in the context
% of @url. for now, just make @/ a no-op, that's the only one
% people have actually reported a problem with.
%
\normalturnoffactive
\def\@{@}%
\let\/=\empty
\makevalueexpandable
% do we want to go so far as to use \indexnofonts instead of just
% special-casing \var here?
\def\var##1{##1}%
%
\leavevmode\setcolor{\urlcolor}%
\startlink attr{/Border [0 0 0]}%
user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
\endgroup}
\def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
\def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
\def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
\def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
\def\maketoks{%
\expandafter\poptoks\the\toksA|ENDTOKS|\relax
\ifx\first0\adn0
\else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
\else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
\else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
\else
\ifnum0=\countA\else\makelink\fi
\ifx\first.\let\next=\done\else
\let\next=\maketoks
\addtokens{\toksB}{\the\toksD}
\ifx\first,\addtokens{\toksB}{\space}\fi
\fi
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\next}
\def\makelink{\addtokens{\toksB}%
{\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
\def\pdflink#1{%
\startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
\setcolor{\linkcolor}#1\endlink}
\def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
\else
% non-pdf mode
\let\pdfmkdest = \gobble
\let\pdfurl = \gobble
\let\endlink = \relax
\let\setcolor = \gobble
\let\pdfsetcolor = \gobble
\let\pdfmakeoutlines = \relax
\fi % \ifx\pdfoutput
\message{fonts,}
% Change the current font style to #1, remembering it in \curfontstyle.
% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
% italics, not bold italics.
%
\def\setfontstyle#1{%
\def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
\csname ten#1\endcsname % change the current font
}
% Select #1 fonts with the current style.
%
\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname}
\def\rm{\fam=0 \setfontstyle{rm}}
\def\it{\fam=\itfam \setfontstyle{it}}
\def\sl{\fam=\slfam \setfontstyle{sl}}
\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
\def\tt{\fam=\ttfam \setfontstyle{tt}}
% Unfortunately, we have to override this for titles and the like, since
% in those cases "rm" is bold. Sigh.
\def\rmisbold{\rm\def\curfontstyle{bf}}
% Texinfo sort of supports the sans serif font style, which plain TeX does not.
% So we set up a \sf.
\newfam\sffam
\def\sf{\fam=\sffam \setfontstyle{sf}}
\let\li = \sf % Sometimes we call it \li, not \sf.
% We don't need math for this font style.
\def\ttsl{\setfontstyle{ttsl}}
% Set the baselineskip to #1, and the lineskip and strut size
% correspondingly. There is no deep meaning behind these magic numbers
% used as factors; they just match (closely enough) what Knuth defined.
%
\def\lineskipfactor{.08333}
\def\strutheightpercent{.70833}
\def\strutdepthpercent {.29167}
%
% can get a sort of poor man's double spacing by redefining this.
\def\baselinefactor{1}
%
\newdimen\textleading
\def\setleading#1{%
\dimen0 = #1\relax
\normalbaselineskip = \baselinefactor\dimen0
\normallineskip = \lineskipfactor\normalbaselineskip
\normalbaselines
\setbox\strutbox =\hbox{%
\vrule width0pt height\strutheightpercent\baselineskip
depth \strutdepthpercent \baselineskip
}%
}
% PDF CMaps. See also LaTeX's t1.cmap.
%
% do nothing with this by default.
\expandafter\let\csname cmapOT1\endcsname\gobble
\expandafter\let\csname cmapOT1IT\endcsname\gobble
\expandafter\let\csname cmapOT1TT\endcsname\gobble
% if we are producing pdf, and we have \pdffontattr, then define cmaps.
% (\pdffontattr was introduced many years ago, but people still run
% older pdftex's; it's easy to conditionalize, so we do.)
\ifpdf \ifx\pdffontattr\thisisundefined \else
\begingroup
\catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
\catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
%%DocumentNeededResources: ProcSet (CIDInit)
%%IncludeResource: ProcSet (CIDInit)
%%BeginResource: CMap (TeX-OT1-0)
%%Title: (TeX-OT1-0 TeX OT1 0)
%%Version: 1.000
%%EndComments
/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo
<< /Registry (TeX)
/Ordering (OT1)
/Supplement 0
>> def
/CMapName /TeX-OT1-0 def
/CMapType 2 def
1 begincodespacerange
<00> <7F>
endcodespacerange
8 beginbfrange
<00> <01> <0393>
<09> <0A> <03A8>
<23> <26> <0023>
<28> <3B> <0028>
<3F> <5B> <003F>
<5D> <5E> <005D>
<61> <7A> <0061>
<7B> <7C> <2013>
endbfrange
40 beginbfchar
<02> <0398>
<03> <039B>
<04> <039E>
<05> <03A0>
<06> <03A3>
<07> <03D2>
<08> <03A6>
<0B> <00660066>
<0C> <00660069>
<0D> <0066006C>
<0E> <006600660069>
<0F> <00660066006C>
<10> <0131>
<11> <0237>
<12> <0060>
<13> <00B4>
<14> <02C7>
<15> <02D8>
<16> <00AF>
<17> <02DA>
<18> <00B8>
<19> <00DF>
<1A> <00E6>
<1B> <0153>
<1C> <00F8>
<1D> <00C6>
<1E> <0152>
<1F> <00D8>
<21> <0021>
<22> <201D>
<27> <2019>
<3C> <00A1>
<3D> <003D>
<3E> <00BF>
<5C> <201C>
<5F> <02D9>
<60> <2018>
<7D> <02DD>
<7E> <007E>
<7F> <00A8>
endbfchar
endcmap
CMapName currentdict /CMap defineresource pop
end
end
%%EndResource
%%EOF
}\endgroup
\expandafter\edef\csname cmapOT1\endcsname#1{%
\pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
}%
%
% \cmapOT1IT
\begingroup
\catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
\catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
%%DocumentNeededResources: ProcSet (CIDInit)
%%IncludeResource: ProcSet (CIDInit)
%%BeginResource: CMap (TeX-OT1IT-0)
%%Title: (TeX-OT1IT-0 TeX OT1IT 0)
%%Version: 1.000
%%EndComments
/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo
<< /Registry (TeX)
/Ordering (OT1IT)
/Supplement 0
>> def
/CMapName /TeX-OT1IT-0 def
/CMapType 2 def
1 begincodespacerange
<00> <7F>
endcodespacerange
8 beginbfrange
<00> <01> <0393>
<09> <0A> <03A8>
<25> <26> <0025>
<28> <3B> <0028>
<3F> <5B> <003F>
<5D> <5E> <005D>
<61> <7A> <0061>
<7B> <7C> <2013>
endbfrange
42 beginbfchar
<02> <0398>
<03> <039B>
<04> <039E>
<05> <03A0>
<06> <03A3>
<07> <03D2>
<08> <03A6>
<0B> <00660066>
<0C> <00660069>
<0D> <0066006C>
<0E> <006600660069>
<0F> <00660066006C>
<10> <0131>
<11> <0237>
<12> <0060>
<13> <00B4>
<14> <02C7>
<15> <02D8>
<16> <00AF>
<17> <02DA>
<18> <00B8>
<19> <00DF>
<1A> <00E6>
<1B> <0153>
<1C> <00F8>
<1D> <00C6>
<1E> <0152>
<1F> <00D8>
<21> <0021>
<22> <201D>
<23> <0023>
<24> <00A3>
<27> <2019>
<3C> <00A1>
<3D> <003D>
<3E> <00BF>
<5C> <201C>
<5F> <02D9>
<60> <2018>
<7D> <02DD>
<7E> <007E>
<7F> <00A8>
endbfchar
endcmap
CMapName currentdict /CMap defineresource pop
end
end
%%EndResource
%%EOF
}\endgroup
\expandafter\edef\csname cmapOT1IT\endcsname#1{%
\pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
}%
%
% \cmapOT1TT
\begingroup
\catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
\catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
%%DocumentNeededResources: ProcSet (CIDInit)
%%IncludeResource: ProcSet (CIDInit)
%%BeginResource: CMap (TeX-OT1TT-0)
%%Title: (TeX-OT1TT-0 TeX OT1TT 0)
%%Version: 1.000
%%EndComments
/CIDInit /ProcSet findresource begin
12 dict begin
begincmap
/CIDSystemInfo
<< /Registry (TeX)
/Ordering (OT1TT)
/Supplement 0
>> def
/CMapName /TeX-OT1TT-0 def
/CMapType 2 def
1 begincodespacerange
<00> <7F>
endcodespacerange
5 beginbfrange
<00> <01> <0393>
<09> <0A> <03A8>
<21> <26> <0021>
<28> <5F> <0028>
<61> <7E> <0061>
endbfrange
32 beginbfchar
<02> <0398>
<03> <039B>
<04> <039E>
<05> <03A0>
<06> <03A3>
<07> <03D2>
<08> <03A6>
<0B> <2191>
<0C> <2193>
<0D> <0027>
<0E> <00A1>
<0F> <00BF>
<10> <0131>
<11> <0237>
<12> <0060>
<13> <00B4>
<14> <02C7>
<15> <02D8>
<16> <00AF>
<17> <02DA>
<18> <00B8>
<19> <00DF>
<1A> <00E6>
<1B> <0153>
<1C> <00F8>
<1D> <00C6>
<1E> <0152>
<1F> <00D8>
<20> <2423>
<27> <2019>
<60> <2018>
<7F> <00A8>
endbfchar
endcmap
CMapName currentdict /CMap defineresource pop
end
end
%%EndResource
%%EOF
}\endgroup
\expandafter\edef\csname cmapOT1TT\endcsname#1{%
\pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
}%
\fi\fi
% Set the font macro #1 to the font named \fontprefix#2.
% #3 is the font's design size, #4 is a scale factor, #5 is the CMap
% encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit).
% Example:
% #1 = \textrm
% #2 = \rmshape
% #3 = 10
% #4 = \mainmagstep
% #5 = OT1
%
\def\setfont#1#2#3#4#5{%
\font#1=\fontprefix#2#3 scaled #4
\csname cmap#5\endcsname#1%
}
% This is what gets called when #5 of \setfont is empty.
\let\cmap\gobble
%
% (end of cmaps)
% Use cm as the default font prefix.
% To specify the font prefix, you must define \fontprefix
% before you read in texinfo.tex.
\ifx\fontprefix\thisisundefined
\def\fontprefix{cm}
\fi
% Support font families that don't use the same naming scheme as CM.
\def\rmshape{r}
\def\rmbshape{bx} % where the normal face is bold
\def\bfshape{b}
\def\bxshape{bx}
\def\ttshape{tt}
\def\ttbshape{tt}
\def\ttslshape{sltt}
\def\itshape{ti}
\def\itbshape{bxti}
\def\slshape{sl}
\def\slbshape{bxsl}
\def\sfshape{ss}
\def\sfbshape{ss}
\def\scshape{csc}
\def\scbshape{csc}
% Definitions for a main text size of 11pt. (The default in Texinfo.)
%
\def\definetextfontsizexi{%
% Text fonts (11.2pt, magstep1).
\def\textnominalsize{11pt}
\edef\mainmagstep{\magstephalf}
\setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
\setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
\setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
\setfont\textsl\slshape{10}{\mainmagstep}{OT1}
\setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
\setfont\textsc\scshape{10}{\mainmagstep}{OT1}
\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
\font\texti=cmmi10 scaled \mainmagstep
\font\textsy=cmsy10 scaled \mainmagstep
\def\textecsize{1095}
% A few fonts for @defun names and args.
\setfont\defbf\bfshape{10}{\magstep1}{OT1}
\setfont\deftt\ttshape{10}{\magstep1}{OT1TT}
\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT}
\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
% Fonts for indices, footnotes, small examples (9pt).
\def\smallnominalsize{9pt}
\setfont\smallrm\rmshape{9}{1000}{OT1}
\setfont\smalltt\ttshape{9}{1000}{OT1TT}
\setfont\smallbf\bfshape{10}{900}{OT1}
\setfont\smallit\itshape{9}{1000}{OT1IT}
\setfont\smallsl\slshape{9}{1000}{OT1}
\setfont\smallsf\sfshape{9}{1000}{OT1}
\setfont\smallsc\scshape{10}{900}{OT1}
\setfont\smallttsl\ttslshape{10}{900}{OT1TT}
\font\smalli=cmmi9
\font\smallsy=cmsy9
\def\smallecsize{0900}
% Fonts for small examples (8pt).
\def\smallernominalsize{8pt}
\setfont\smallerrm\rmshape{8}{1000}{OT1}
\setfont\smallertt\ttshape{8}{1000}{OT1TT}
\setfont\smallerbf\bfshape{10}{800}{OT1}
\setfont\smallerit\itshape{8}{1000}{OT1IT}
\setfont\smallersl\slshape{8}{1000}{OT1}
\setfont\smallersf\sfshape{8}{1000}{OT1}
\setfont\smallersc\scshape{10}{800}{OT1}
\setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
\font\smalleri=cmmi8
\font\smallersy=cmsy8
\def\smallerecsize{0800}
% Fonts for title page (20.4pt):
\def\titlenominalsize{20pt}
\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
\setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
\setfont\titlesl\slbshape{10}{\magstep4}{OT1}
\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
\setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
\let\titlebf=\titlerm
\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
\font\titlei=cmmi12 scaled \magstep3
\font\titlesy=cmsy10 scaled \magstep4
\def\titleecsize{2074}
% Chapter (and unnumbered) fonts (17.28pt).
\def\chapnominalsize{17pt}
\setfont\chaprm\rmbshape{12}{\magstep2}{OT1}
\setfont\chapit\itbshape{10}{\magstep3}{OT1IT}
\setfont\chapsl\slbshape{10}{\magstep3}{OT1}
\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT}
\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT}
\setfont\chapsf\sfbshape{17}{1000}{OT1}
\let\chapbf=\chaprm
\setfont\chapsc\scbshape{10}{\magstep3}{OT1}
\font\chapi=cmmi12 scaled \magstep2
\font\chapsy=cmsy10 scaled \magstep3
\def\chapecsize{1728}
% Section fonts (14.4pt).
\def\secnominalsize{14pt}
\setfont\secrm\rmbshape{12}{\magstep1}{OT1}
\setfont\secit\itbshape{10}{\magstep2}{OT1IT}
\setfont\secsl\slbshape{10}{\magstep2}{OT1}
\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT}
\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT}
\setfont\secsf\sfbshape{12}{\magstep1}{OT1}
\let\secbf\secrm
\setfont\secsc\scbshape{10}{\magstep2}{OT1}
\font\seci=cmmi12 scaled \magstep1
\font\secsy=cmsy10 scaled \magstep2
\def\sececsize{1440}
% Subsection fonts (13.15pt).
\def\ssecnominalsize{13pt}
\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1}
\setfont\ssecit\itbshape{10}{1315}{OT1IT}
\setfont\ssecsl\slbshape{10}{1315}{OT1}
\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT}
\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT}
\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1}
\let\ssecbf\ssecrm
\setfont\ssecsc\scbshape{10}{1315}{OT1}
\font\sseci=cmmi12 scaled \magstephalf
\font\ssecsy=cmsy10 scaled 1315
\def\ssececsize{1200}
% Reduced fonts for @acro in text (10pt).
\def\reducednominalsize{10pt}
\setfont\reducedrm\rmshape{10}{1000}{OT1}
\setfont\reducedtt\ttshape{10}{1000}{OT1TT}
\setfont\reducedbf\bfshape{10}{1000}{OT1}
\setfont\reducedit\itshape{10}{1000}{OT1IT}
\setfont\reducedsl\slshape{10}{1000}{OT1}
\setfont\reducedsf\sfshape{10}{1000}{OT1}
\setfont\reducedsc\scshape{10}{1000}{OT1}
\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT}
\font\reducedi=cmmi10
\font\reducedsy=cmsy10
\def\reducedecsize{1000}
\textleading = 13.2pt % line spacing for 11pt CM
\textfonts % reset the current fonts
\rm
} % end of 11pt text font size definitions, \definetextfontsizexi
% Definitions to make the main text be 10pt Computer Modern, with
% section, chapter, etc., sizes following suit. This is for the GNU
% Press printing of the Emacs 22 manual. Maybe other manuals in the
% future. Used with @smallbook, which sets the leading to 12pt.
%
\def\definetextfontsizex{%
% Text fonts (10pt).
\def\textnominalsize{10pt}
\edef\mainmagstep{1000}
\setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
\setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
\setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
\setfont\textsl\slshape{10}{\mainmagstep}{OT1}
\setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
\setfont\textsc\scshape{10}{\mainmagstep}{OT1}
\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
\font\texti=cmmi10 scaled \mainmagstep
\font\textsy=cmsy10 scaled \mainmagstep
\def\textecsize{1000}
% A few fonts for @defun names and args.
\setfont\defbf\bfshape{10}{\magstephalf}{OT1}
\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT}
\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT}
\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
% Fonts for indices, footnotes, small examples (9pt).
\def\smallnominalsize{9pt}
\setfont\smallrm\rmshape{9}{1000}{OT1}
\setfont\smalltt\ttshape{9}{1000}{OT1TT}
\setfont\smallbf\bfshape{10}{900}{OT1}
\setfont\smallit\itshape{9}{1000}{OT1IT}
\setfont\smallsl\slshape{9}{1000}{OT1}
\setfont\smallsf\sfshape{9}{1000}{OT1}
\setfont\smallsc\scshape{10}{900}{OT1}
\setfont\smallttsl\ttslshape{10}{900}{OT1TT}
\font\smalli=cmmi9
\font\smallsy=cmsy9
\def\smallecsize{0900}
% Fonts for small examples (8pt).
\def\smallernominalsize{8pt}
\setfont\smallerrm\rmshape{8}{1000}{OT1}
\setfont\smallertt\ttshape{8}{1000}{OT1TT}
\setfont\smallerbf\bfshape{10}{800}{OT1}
\setfont\smallerit\itshape{8}{1000}{OT1IT}
\setfont\smallersl\slshape{8}{1000}{OT1}
\setfont\smallersf\sfshape{8}{1000}{OT1}
\setfont\smallersc\scshape{10}{800}{OT1}
\setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
\font\smalleri=cmmi8
\font\smallersy=cmsy8
\def\smallerecsize{0800}
% Fonts for title page (20.4pt):
\def\titlenominalsize{20pt}
\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
\setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
\setfont\titlesl\slbshape{10}{\magstep4}{OT1}
\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
\setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
\let\titlebf=\titlerm
\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
\font\titlei=cmmi12 scaled \magstep3
\font\titlesy=cmsy10 scaled \magstep4
\def\titleecsize{2074}
% Chapter fonts (14.4pt).
\def\chapnominalsize{14pt}
\setfont\chaprm\rmbshape{12}{\magstep1}{OT1}
\setfont\chapit\itbshape{10}{\magstep2}{OT1IT}
\setfont\chapsl\slbshape{10}{\magstep2}{OT1}
\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT}
\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT}
\setfont\chapsf\sfbshape{12}{\magstep1}{OT1}
\let\chapbf\chaprm
\setfont\chapsc\scbshape{10}{\magstep2}{OT1}
\font\chapi=cmmi12 scaled \magstep1
\font\chapsy=cmsy10 scaled \magstep2
\def\chapecsize{1440}
% Section fonts (12pt).
\def\secnominalsize{12pt}
\setfont\secrm\rmbshape{12}{1000}{OT1}
\setfont\secit\itbshape{10}{\magstep1}{OT1IT}
\setfont\secsl\slbshape{10}{\magstep1}{OT1}
\setfont\sectt\ttbshape{12}{1000}{OT1TT}
\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT}
\setfont\secsf\sfbshape{12}{1000}{OT1}
\let\secbf\secrm
\setfont\secsc\scbshape{10}{\magstep1}{OT1}
\font\seci=cmmi12
\font\secsy=cmsy10 scaled \magstep1
\def\sececsize{1200}
% Subsection fonts (10pt).
\def\ssecnominalsize{10pt}
\setfont\ssecrm\rmbshape{10}{1000}{OT1}
\setfont\ssecit\itbshape{10}{1000}{OT1IT}
\setfont\ssecsl\slbshape{10}{1000}{OT1}
\setfont\ssectt\ttbshape{10}{1000}{OT1TT}
\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT}
\setfont\ssecsf\sfbshape{10}{1000}{OT1}
\let\ssecbf\ssecrm
\setfont\ssecsc\scbshape{10}{1000}{OT1}
\font\sseci=cmmi10
\font\ssecsy=cmsy10
\def\ssececsize{1000}
% Reduced fonts for @acro in text (9pt).
\def\reducednominalsize{9pt}
\setfont\reducedrm\rmshape{9}{1000}{OT1}
\setfont\reducedtt\ttshape{9}{1000}{OT1TT}
\setfont\reducedbf\bfshape{10}{900}{OT1}
\setfont\reducedit\itshape{9}{1000}{OT1IT}
\setfont\reducedsl\slshape{9}{1000}{OT1}
\setfont\reducedsf\sfshape{9}{1000}{OT1}
\setfont\reducedsc\scshape{10}{900}{OT1}
\setfont\reducedttsl\ttslshape{10}{900}{OT1TT}
\font\reducedi=cmmi9
\font\reducedsy=cmsy9
\def\reducedecsize{0900}
\divide\parskip by 2 % reduce space between paragraphs
\textleading = 12pt % line spacing for 10pt CM
\textfonts % reset the current fonts
\rm
} % end of 10pt text font size definitions, \definetextfontsizex
% We provide the user-level command
% @fonttextsize 10
% (or 11) to redefine the text font size. pt is assumed.
%
\def\xiword{11}
\def\xword{10}
\def\xwordpt{10pt}
%
\parseargdef\fonttextsize{%
\def\textsizearg{#1}%
%\wlog{doing @fonttextsize \textsizearg}%
%
% Set \globaldefs so that documents can use this inside @tex, since
% makeinfo 4.8 does not support it, but we need it nonetheless.
%
\begingroup \globaldefs=1
\ifx\textsizearg\xword \definetextfontsizex
\else \ifx\textsizearg\xiword \definetextfontsizexi
\else
\errhelp=\EMsimple
\errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'}
\fi\fi
\endgroup
}
% In order for the font changes to affect most math symbols and letters,
% we have to define the \textfont of the standard families. Since
% texinfo doesn't allow for producing subscripts and superscripts except
% in the main text, we don't bother to reset \scriptfont and
% \scriptscriptfont (which would also require loading a lot more fonts).
%
\def\resetmathfonts{%
\textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
\textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf
\textfont\ttfam=\tentt \textfont\sffam=\tensf
}
% The font-changing commands redefine the meanings of \tenSTYLE, instead
% of just \STYLE. We do this because \STYLE needs to also set the
% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire
% \tenSTYLE to set the current font.
%
% Each font-changing command also sets the names \lsize (one size lower)
% and \lllsize (three sizes lower). These relative commands are used in
% the LaTeX logo and acronyms.
%
% This all needs generalizing, badly.
%
\def\textfonts{%
\let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
\let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
\let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy
\let\tenttsl=\textttsl
\def\curfontsize{text}%
\def\lsize{reduced}\def\lllsize{smaller}%
\resetmathfonts \setleading{\textleading}}
\def\titlefonts{%
\let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
\let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
\let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
\let\tenttsl=\titlettsl
\def\curfontsize{title}%
\def\lsize{chap}\def\lllsize{subsec}%
\resetmathfonts \setleading{27pt}}
\def\titlefont#1{{\titlefonts\rmisbold #1}}
\def\chapfonts{%
\let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
\let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
\let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy
\let\tenttsl=\chapttsl
\def\curfontsize{chap}%
\def\lsize{sec}\def\lllsize{text}%
\resetmathfonts \setleading{19pt}}
\def\secfonts{%
\let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
\let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
\let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy
\let\tenttsl=\secttsl
\def\curfontsize{sec}%
\def\lsize{subsec}\def\lllsize{reduced}%
\resetmathfonts \setleading{16pt}}
\def\subsecfonts{%
\let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
\let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
\let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy
\let\tenttsl=\ssecttsl
\def\curfontsize{ssec}%
\def\lsize{text}\def\lllsize{small}%
\resetmathfonts \setleading{15pt}}
\let\subsubsecfonts = \subsecfonts
\def\reducedfonts{%
\let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl
\let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc
\let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy
\let\tenttsl=\reducedttsl
\def\curfontsize{reduced}%
\def\lsize{small}\def\lllsize{smaller}%
\resetmathfonts \setleading{10.5pt}}
\def\smallfonts{%
\let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl
\let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
\let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
\let\tenttsl=\smallttsl
\def\curfontsize{small}%
\def\lsize{smaller}\def\lllsize{smaller}%
\resetmathfonts \setleading{10.5pt}}
\def\smallerfonts{%
\let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl
\let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
\let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
\let\tenttsl=\smallerttsl
\def\curfontsize{smaller}%
\def\lsize{smaller}\def\lllsize{smaller}%
\resetmathfonts \setleading{9.5pt}}
% Fonts for short table of contents.
\setfont\shortcontrm\rmshape{12}{1000}{OT1}
\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12
\setfont\shortcontsl\slshape{12}{1000}{OT1}
\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
% Define these just so they can be easily changed for other fonts.
\def\angleleft{$\langle$}
\def\angleright{$\rangle$}
% Set the fonts to use with the @small... environments.
\let\smallexamplefonts = \smallfonts
% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample
% can fit this many characters:
% 8.5x11=86 smallbook=72 a4=90 a5=69
% If we use \scriptfonts (8pt), then we can fit this many characters:
% 8.5x11=90+ smallbook=80 a4=90+ a5=77
% For me, subjectively, the few extra characters that fit aren't worth
% the additional smallness of 8pt. So I'm making the default 9pt.
%
% By the way, for comparison, here's what fits with @example (10pt):
% 8.5x11=71 smallbook=60 a4=75 a5=58
% --karl, 24jan03.
% Set up the default fonts, so we can use them for creating boxes.
%
\definetextfontsizexi
\message{markup,}
% Check if we are currently using a typewriter font. Since all the
% Computer Modern typewriter fonts have zero interword stretch (and
% shrink), and it is reasonable to expect all typewriter fonts to have
% this property, we can check that font parameter.
%
\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will
% define and register \INITMACRO to be called on markup style changes.
% \INITMACRO can check \currentmarkupstyle for the innermost
% style and the set of \ifmarkupSTYLE switches for all styles
% currently in effect.
\newif\ifmarkupvar
\newif\ifmarkupsamp
\newif\ifmarkupkey
%\newif\ifmarkupfile % @file == @samp.
%\newif\ifmarkupoption % @option == @samp.
\newif\ifmarkupcode
\newif\ifmarkupkbd
%\newif\ifmarkupenv % @env == @code.
%\newif\ifmarkupcommand % @command == @code.
\newif\ifmarkuptex % @tex (and part of @math, for now).
\newif\ifmarkupexample
\newif\ifmarkupverb
\newif\ifmarkupverbatim
\let\currentmarkupstyle\empty
\def\setupmarkupstyle#1{%
\csname markup#1true\endcsname
\def\currentmarkupstyle{#1}%
\markupstylesetup
}
\let\markupstylesetup\empty
\def\defmarkupstylesetup#1{%
\expandafter\def\expandafter\markupstylesetup
\expandafter{\markupstylesetup #1}%
\def#1%
}
% Markup style setup for left and right quotes.
\defmarkupstylesetup\markupsetuplq{%
\expandafter\let\expandafter \temp
\csname markupsetuplq\currentmarkupstyle\endcsname
\ifx\temp\relax \markupsetuplqdefault \else \temp \fi
}
\defmarkupstylesetup\markupsetuprq{%
\expandafter\let\expandafter \temp
\csname markupsetuprq\currentmarkupstyle\endcsname
\ifx\temp\relax \markupsetuprqdefault \else \temp \fi
}
{
\catcode`\'=\active
\catcode`\`=\active
\gdef\markupsetuplqdefault{\let`\lq}
\gdef\markupsetuprqdefault{\let'\rq}
\gdef\markupsetcodequoteleft{\let`\codequoteleft}
\gdef\markupsetcodequoteright{\let'\codequoteright}
}
\let\markupsetuplqcode \markupsetcodequoteleft
\let\markupsetuprqcode \markupsetcodequoteright
%
\let\markupsetuplqexample \markupsetcodequoteleft
\let\markupsetuprqexample \markupsetcodequoteright
%
\let\markupsetuplqkbd \markupsetcodequoteleft
\let\markupsetuprqkbd \markupsetcodequoteright
%
\let\markupsetuplqsamp \markupsetcodequoteleft
\let\markupsetuprqsamp \markupsetcodequoteright
%
\let\markupsetuplqverb \markupsetcodequoteleft
\let\markupsetuprqverb \markupsetcodequoteright
%
\let\markupsetuplqverbatim \markupsetcodequoteleft
\let\markupsetuprqverbatim \markupsetcodequoteright
% Allow an option to not use regular directed right quote/apostrophe
% (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
% The undirected quote is ugly, so don't make it the default, but it
% works for pasting with more pdf viewers (at least evince), the
% lilypond developers report. xpdf does work with the regular 0x27.
%
\def\codequoteright{%
\expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
\expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
'%
\else \char'15 \fi
\else \char'15 \fi
}
%
% and a similar option for the left quote char vs. a grave accent.
% Modern fonts display ASCII 0x60 as a grave accent, so some people like
% the code environments to do likewise.
%
\def\codequoteleft{%
\expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
\expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
% [Knuth] pp. 380,381,391
% \relax disables Spanish ligatures ?` and !` of \tt font.
\relax`%
\else \char'22 \fi
\else \char'22 \fi
}
% Commands to set the quote options.
%
\parseargdef\codequoteundirected{%
\def\temp{#1}%
\ifx\temp\onword
\expandafter\let\csname SETtxicodequoteundirected\endcsname
= t%
\else\ifx\temp\offword
\expandafter\let\csname SETtxicodequoteundirected\endcsname
= \relax
\else
\errhelp = \EMsimple
\errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
\fi\fi
}
%
\parseargdef\codequotebacktick{%
\def\temp{#1}%
\ifx\temp\onword
\expandafter\let\csname SETtxicodequotebacktick\endcsname
= t%
\else\ifx\temp\offword
\expandafter\let\csname SETtxicodequotebacktick\endcsname
= \relax
\else
\errhelp = \EMsimple
\errmessage{Unknown @codequotebacktick value `\temp', must be on|off}%
\fi\fi
}
% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
\def\noligaturesquoteleft{\relax\lq}
% Count depth in font-changes, for error checks
\newcount\fontdepth \fontdepth=0
% Font commands.
% #1 is the font command (\sl or \it), #2 is the text to slant.
% If we are in a monospaced environment, however, 1) always use \ttsl,
% and 2) do not add an italic correction.
\def\dosmartslant#1#2{%
\ifusingtt
{{\ttsl #2}\let\next=\relax}%
{\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}%
\next
}
\def\smartslanted{\dosmartslant\sl}
\def\smartitalic{\dosmartslant\it}
% Output an italic correction unless \next (presumed to be the following
% character) is such as not to need one.
\def\smartitaliccorrection{%
\ifx\next,%
\else\ifx\next-%
\else\ifx\next.%
\else\ptexslash
\fi\fi\fi
\aftersmartic
}
% Unconditional use \ttsl, and no ic. @var is set to this for defuns.
\def\ttslanted#1{{\ttsl #1}}
% @cite is like \smartslanted except unconditionally use \sl. We never want
% ttsl for book titles, do we?
\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection}
\def\aftersmartic{}
\def\var#1{%
\let\saveaftersmartic = \aftersmartic
\def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}%
\smartslanted{#1}%
}
\let\i=\smartitalic
\let\slanted=\smartslanted
\let\dfn=\smartslanted
\let\emph=\smartitalic
% Explicit font changes: @r, @sc, undocumented @ii.
\def\r#1{{\rm #1}} % roman font
\def\sc#1{{\smallcaps#1}} % smallcaps font
\def\ii#1{{\it #1}} % italic font
% @b, explicit bold. Also @strong.
\def\b#1{{\bf #1}}
\let\strong=\b
% @sansserif, explicit sans.
\def\sansserif#1{{\sf #1}}
% We can't just use \exhyphenpenalty, because that only has effect at
% the end of a paragraph. Restore normal hyphenation at the end of the
% group within which \nohyphenation is presumably called.
%
\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation}
\def\restorehyphenation{\hyphenchar\font = `- }
% Set sfcode to normal for the chars that usually have another value.
% Can't use plain's \frenchspacing because it uses the `\x notation, and
% sometimes \x has an active definition that messes things up.
%
\catcode`@=11
\def\plainfrenchspacing{%
\sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
\sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
\def\endofsentencespacefactor{1000}% for @. and friends
}
\def\plainnonfrenchspacing{%
\sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
\sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
\def\endofsentencespacefactor{3000}% for @. and friends
}
\catcode`@=\other
\def\endofsentencespacefactor{3000}% default
% @t, explicit typewriter.
\def\t#1{%
{\tt \rawbackslash \plainfrenchspacing #1}%
\null
}
% @samp.
\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
% @indicateurl is \samp, that is, with quotes.
\let\indicateurl=\samp
% @code (and similar) prints in typewriter, but with spaces the same
% size as normal in the surrounding text, without hyphenation, etc.
% This is a subroutine for that.
\def\tclose#1{%
{%
% Change normal interword space to be same as for the current font.
\spaceskip = \fontdimen2\font
%
% Switch to typewriter.
\tt
%
% But `\ ' produces the large typewriter interword space.
\def\ {{\spaceskip = 0pt{} }}%
%
% Turn off hyphenation.
\nohyphenation
%
\rawbackslash
\plainfrenchspacing
#1%
}%
\null % reset spacefactor to 1000
}
% We *must* turn on hyphenation at `-' and `_' in @code.
% Otherwise, it is too hard to avoid overfull hboxes
% in the Emacs manual, the Library manual, etc.
%
% Unfortunately, TeX uses one parameter (\hyphenchar) to control
% both hyphenation at - and hyphenation within words.
% We must therefore turn them both off (\tclose does that)
% and arrange explicitly to hyphenate at a dash.
% -- rms.
{
\catcode`\-=\active \catcode`\_=\active
\catcode`\'=\active \catcode`\`=\active
\global\let'=\rq \global\let`=\lq % default definitions
%
\global\def\code{\begingroup
\setupmarkupstyle{code}%
% The following should really be moved into \setupmarkupstyle handlers.
\catcode\dashChar=\active \catcode\underChar=\active
\ifallowcodebreaks
\let-\codedash
\let_\codeunder
\else
\let-\normaldash
\let_\realunder
\fi
\codex
}
}
\def\codex #1{\tclose{#1}\endgroup}
\def\normaldash{-}
\def\codedash{-\discretionary{}{}{}}
\def\codeunder{%
% this is all so @math{@code{var_name}+1} can work. In math mode, _
% is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
% will therefore expand the active definition of _, which is us
% (inside @code that is), therefore an endless loop.
\ifusingtt{\ifmmode
\mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_.
\else\normalunderscore \fi
\discretionary{}{}{}}%
{\_}%
}
% An additional complication: the above will allow breaks after, e.g.,
% each of the four underscores in __typeof__. This is bad.
% @allowcodebreaks provides a document-level way to turn breaking at -
% and _ on and off.
%
\newif\ifallowcodebreaks \allowcodebreakstrue
\def\keywordtrue{true}
\def\keywordfalse{false}
\parseargdef\allowcodebreaks{%
\def\txiarg{#1}%
\ifx\txiarg\keywordtrue
\allowcodebreakstrue
\else\ifx\txiarg\keywordfalse
\allowcodebreaksfalse
\else
\errhelp = \EMsimple
\errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}%
\fi\fi
}
% For @command, @env, @file, @option quotes seem unnecessary,
% so use \code rather than \samp.
\let\command=\code
\let\env=\code
\let\file=\code
\let\option=\code
% @uref (abbreviation for `urlref') takes an optional (comma-separated)
% second argument specifying the text to display and an optional third
% arg as text to display instead of (rather than in addition to) the url
% itself. First (mandatory) arg is the url.
% (This \urefnobreak definition isn't used now, leaving it for a while
% for comparison.)
\def\urefnobreak#1{\dourefnobreak #1,,,\finish}
\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup
\unsepspaces
\pdfurl{#1}%
\setbox0 = \hbox{\ignorespaces #3}%
\ifdim\wd0 > 0pt
\unhbox0 % third arg given, show only that
\else
\setbox0 = \hbox{\ignorespaces #2}%
\ifdim\wd0 > 0pt
\ifpdf
\unhbox0 % PDF: 2nd arg given, show only it
\else
\unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
\fi
\else
\code{#1}% only url given, so show it
\fi
\fi
\endlink
\endgroup}
% This \urefbreak definition is the active one.
\def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
\let\uref=\urefbreak
\def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
\unsepspaces
\pdfurl{#1}%
\setbox0 = \hbox{\ignorespaces #3}%
\ifdim\wd0 > 0pt
\unhbox0 % third arg given, show only that
\else
\setbox0 = \hbox{\ignorespaces #2}%
\ifdim\wd0 > 0pt
\ifpdf
\unhbox0 % PDF: 2nd arg given, show only it
\else
\unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url
\fi
\else
\urefcode{#1}% only url given, so show it
\fi
\fi
\endlink
\endgroup}
% Allow line breaks around only a few characters (only).
\def\urefcatcodes{%
\catcode\ampChar=\active \catcode\dotChar=\active
\catcode\hashChar=\active \catcode\questChar=\active
\catcode\slashChar=\active
}
{
\urefcatcodes
%
\global\def\urefcode{\begingroup
\setupmarkupstyle{code}%
\urefcatcodes
\let&\urefcodeamp
\let.\urefcodedot
\let#\urefcodehash
\let?\urefcodequest
\let/\urefcodeslash
\codex
}
%
% By default, they are just regular characters.
\global\def&{\normalamp}
\global\def.{\normaldot}
\global\def#{\normalhash}
\global\def?{\normalquest}
\global\def/{\normalslash}
}
% we put a little stretch before and after the breakable chars, to help
% line breaking of long url's. The unequal skips make look better in
% cmtt at least, especially for dots.
\def\urefprestretch{\urefprebreak \hskip0pt plus.13em }
\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em }
%
\def\urefcodeamp{\urefprestretch \&\urefpoststretch}
\def\urefcodedot{\urefprestretch .\urefpoststretch}
\def\urefcodehash{\urefprestretch \#\urefpoststretch}
\def\urefcodequest{\urefprestretch ?\urefpoststretch}
\def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
{
\catcode`\/=\active
\global\def\urefcodeslashfinish{%
\urefprestretch \slashChar
% Allow line break only after the final / in a sequence of
% slashes, to avoid line break between the slashes in http://.
\ifx\next/\else \urefpoststretch \fi
}
}
% One more complication: by default we'll break after the special
% characters, but some people like to break before the special chars, so
% allow that. Also allow no breaking at all, for manual control.
%
\parseargdef\urefbreakstyle{%
\def\txiarg{#1}%
\ifx\txiarg\wordnone
\def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak}
\else\ifx\txiarg\wordbefore
\def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak}
\else\ifx\txiarg\wordafter
\def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak}
\else
\errhelp = \EMsimple
\errmessage{Unknown @urefbreakstyle setting `\txiarg'}%
\fi\fi\fi
}
\def\wordafter{after}
\def\wordbefore{before}
\def\wordnone{none}
\urefbreakstyle after
% @url synonym for @uref, since that's how everyone uses it.
%
\let\url=\uref
% rms does not like angle brackets --karl, 17may97.
% So now @email is just like @uref, unless we are pdf.
%
%\def\email#1{\angleleft{\tt #1}\angleright}
\ifpdf
\def\email#1{\doemail#1,,\finish}
\def\doemail#1,#2,#3\finish{\begingroup
\unsepspaces
\pdfurl{mailto:#1}%
\setbox0 = \hbox{\ignorespaces #2}%
\ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
\endlink
\endgroup}
\else
\let\email=\uref
\fi
% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
% `example' (@kbd uses ttsl only inside of @example and friends),
% or `code' (@kbd uses normal tty font always).
\parseargdef\kbdinputstyle{%
\def\txiarg{#1}%
\ifx\txiarg\worddistinct
\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
\else\ifx\txiarg\wordexample
\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
\else\ifx\txiarg\wordcode
\gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
\else
\errhelp = \EMsimple
\errmessage{Unknown @kbdinputstyle setting `\txiarg'}%
\fi\fi\fi
}
\def\worddistinct{distinct}
\def\wordexample{example}
\def\wordcode{code}
% Default is `distinct'.
\kbdinputstyle distinct
% @kbd is like @code, except that if the argument is just one @key command,
% then @kbd has no effect.
\def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}}
\def\xkey{\key}
\def\kbdsub#1#2#3\par{%
\def\one{#1}\def\three{#3}\def\threex{??}%
\ifx\one\xkey\ifx\threex\three \key{#2}%
\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
}
% definition of @key that produces a lozenge. Doesn't adjust to text size.
%\setfont\keyrm\rmshape{8}{1000}{OT1}
%\font\keysy=cmsy9
%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
% \vbox{\hrule\kern-0.4pt
% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
% \kern-0.4pt\hrule}%
% \kern-.06em\raise0.4pt\hbox{\angleright}}}}
% definition of @key with no lozenge. If the current font is already
% monospace, don't change it; that way, we respect @kbdinputstyle. But
% if it isn't monospace, then use \tt.
%
\def\key#1{{\setupmarkupstyle{key}%
\nohyphenation
\ifmonospace\else\tt\fi
#1}\null}
% @clicksequence{File @click{} Open ...}
\def\clicksequence#1{\begingroup #1\endgroup}
% @clickstyle @arrow (by default)
\parseargdef\clickstyle{\def\click{#1}}
\def\click{\arrow}
% Typeset a dimension, e.g., `in' or `pt'. The only reason for the
% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
%
\def\dmn#1{\thinspace #1}
% @l was never documented to mean ``switch to the Lisp font'',
% and it is not used as such in any manual I can find. We need it for
% Polish suppressed-l. --karl, 22sep96.
%\def\l#1{{\li #1}\null}
% @acronym for "FBI", "NATO", and the like.
% We print this one point size smaller, since it's intended for
% all-uppercase.
%
\def\acronym#1{\doacronym #1,,\finish}
\def\doacronym#1,#2,#3\finish{%
{\selectfonts\lsize #1}%
\def\temp{#2}%
\ifx\temp\empty \else
\space ({\unsepspaces \ignorespaces \temp \unskip})%
\fi
\null % reset \spacefactor=1000
}
% @abbr for "Comput. J." and the like.
% No font change, but don't do end-of-sentence spacing.
%
\def\abbr#1{\doabbr #1,,\finish}
\def\doabbr#1,#2,#3\finish{%
{\plainfrenchspacing #1}%
\def\temp{#2}%
\ifx\temp\empty \else
\space ({\unsepspaces \ignorespaces \temp \unskip})%
\fi
\null % reset \spacefactor=1000
}
% @asis just yields its argument. Used with @table, for example.
%
\def\asis#1{#1}
% @math outputs its argument in math mode.
%
% One complication: _ usually means subscripts, but it could also mean
% an actual _ character, as in @math{@var{some_variable} + 1}. So make
% _ active, and distinguish by seeing if the current family is \slfam,
% which is what @var uses.
{
\catcode`\_ = \active
\gdef\mathunderscore{%
\catcode`\_=\active
\def_{\ifnum\fam=\slfam \_\else\sb\fi}%
}
}
% Another complication: we want \\ (and @\) to output a math (or tt) \.
% FYI, plain.tex uses \\ as a temporary control sequence (for no
% particular reason), but this is not advertised and we don't care.
%
% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
%
\def\math{%
\tex
\mathunderscore
\let\\ = \mathbackslash
\mathactive
% make the texinfo accent commands work in math mode
\let\"=\ddot
\let\'=\acute
\let\==\bar
\let\^=\hat
\let\`=\grave
\let\u=\breve
\let\v=\check
\let\~=\tilde
\let\dotaccent=\dot
$\finishmath
}
\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
% Some active characters (such as <) are spaced differently in math.
% We have to reset their definitions in case the @math was an argument
% to a command which sets the catcodes (such as @item or @section).
%
{
\catcode`^ = \active
\catcode`< = \active
\catcode`> = \active
\catcode`+ = \active
\catcode`' = \active
\gdef\mathactive{%
\let^ = \ptexhat
\let< = \ptexless
\let> = \ptexgtr
\let+ = \ptexplus
\let' = \ptexquoteright
}
}
% ctrl is no longer a Texinfo command, but leave this definition for fun.
\def\ctrl #1{{\tt \rawbackslash \hat}#1}
% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
% Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
% except specified as a normal braced arg, so no newlines to worry about.
%
\def\outfmtnametex{tex}
%
\long\def\inlinefmt#1{\doinlinefmt #1,\finish}
\long\def\doinlinefmt#1,#2,\finish{%
\def\inlinefmtname{#1}%
\ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
}
% For raw, must switch into @tex before parsing the argument, to avoid
% setting catcodes prematurely. Doing it this way means that, for
% example, @inlineraw{html, foo{bar} gets a parse error instead of being
% ignored. But this isn't important because if people want a literal
% *right* brace they would have to use a command anyway, so they may as
% well use a command to get a left brace too. We could re-use the
% delimiter character idea from \verb, but it seems like overkill.
%
\long\def\inlineraw{\tex \doinlineraw}
\long\def\doinlineraw#1{\doinlinerawtwo #1,\finish}
\def\doinlinerawtwo#1,#2,\finish{%
\def\inlinerawname{#1}%
\ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi
\endgroup % close group opened by \tex.
}
\message{glyphs,}
% and logos.
% @@ prints an @, as does @atchar{}.
\def\@{\char64 }
\let\atchar=\@
% @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
% Unless we're in typewriter, use \ecfont because the CM text fonts do
% not have braces, and we don't want to switch into math.
\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
\let\{=\mylbrace \let\lbracechar=\{
\let\}=\myrbrace \let\rbracechar=\}
\begingroup
% Definitions to produce \{ and \} commands for indices,
% and @{ and @} for the aux/toc files.
\catcode`\{ = \other \catcode`\} = \other
\catcode`\[ = 1 \catcode`\] = 2
\catcode`\! = 0 \catcode`\\ = \other
!gdef!lbracecmd[\{]%
!gdef!rbracecmd[\}]%
!gdef!lbraceatcmd[@{]%
!gdef!rbraceatcmd[@}]%
!endgroup
% @comma{} to avoid , parsing problems.
\let\comma = ,
% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
\let\, = \ptexc
\let\dotaccent = \ptexdot
\def\ringaccent#1{{\accent23 #1}}
\let\tieaccent = \ptext
\let\ubaraccent = \ptexb
\let\udotaccent = \d
% Other special characters: @questiondown @exclamdown @ordf @ordm
% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
\def\questiondown{?`}
\def\exclamdown{!`}
\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
% Dotless i and dotless j, used for accents.
\def\imacro{i}
\def\jmacro{j}
\def\dotless#1{%
\def\temp{#1}%
\ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
\else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
\else \errmessage{@dotless can be used only with i or j}%
\fi\fi
}
% The \TeX{} logo, as in plain, but resetting the spacing so that a
% period following counts as ending a sentence. (Idea found in latex.)
%
\edef\TeX{\TeX \spacefactor=1000 }
% @LaTeX{} logo. Not quite the same results as the definition in
% latex.ltx, since we use a different font for the raised A; it's most
% convenient for us to use an explicitly smaller font, rather than using
% the \scriptstyle font (since we don't reset \scriptstyle and
% \scriptscriptstyle).
%
\def\LaTeX{%
L\kern-.36em
{\setbox0=\hbox{T}%
\vbox to \ht0{\hbox{%
\ifx\textnominalsize\xwordpt
% for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX.
% Revert to plain's \scriptsize, which is 7pt.
\count255=\the\fam $\fam\count255 \scriptstyle A$%
\else
% For 11pt, we can use our lllsize.
\selectfonts\lllsize A%
\fi
}%
\vss
}}%
\kern-.15em
\TeX
}
% Some math mode symbols.
\def\bullet{$\ptexbullet$}
\def\geq{\ifmmode \ge\else $\ge$\fi}
\def\leq{\ifmmode \le\else $\le$\fi}
\def\minus{\ifmmode -\else $-$\fi}
% @dots{} outputs an ellipsis using the current font.
% We do .5em per period so that it has the same spacing in the cm
% typewriter fonts as three actual period characters; on the other hand,
% in other typewriter fonts three periods are wider than 1.5em. So do
% whichever is larger.
%
\def\dots{%
\leavevmode
\setbox0=\hbox{...}% get width of three periods
\ifdim\wd0 > 1.5em
\dimen0 = \wd0
\else
\dimen0 = 1.5em
\fi
\hbox to \dimen0{%
\hskip 0pt plus.25fil
.\hskip 0pt plus1fil
.\hskip 0pt plus1fil
.\hskip 0pt plus.5fil
}%
}
% @enddots{} is an end-of-sentence ellipsis.
%
\def\enddots{%
\dots
\spacefactor=\endofsentencespacefactor
}
% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
%
% Since these characters are used in examples, they should be an even number of
% \tt widths. Each \tt character is 1en, so two makes it 1em.
%
\def\point{$\star$}
\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
% The @error{} command.
% Adapted from the TeXbook's \boxit.
%
\newbox\errorbox
%
{\tentt \global\dimen0 = 3em}% Width of the box.
\dimen2 = .55pt % Thickness of rules
% The text. (`r' is open on the right, `e' somewhat less so on the left.)
\setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt}
%
\setbox\errorbox=\hbox to \dimen0{\hfil
\hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
\advance\hsize by -2\dimen2 % Rules.
\vbox{%
\hrule height\dimen2
\hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
\vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
\kern3pt\vrule width\dimen2}% Space to right.
\hrule height\dimen2}
\hfil}
%
\def\error{\leavevmode\lower.7ex\copy\errorbox}
% @pounds{} is a sterling sign, which Knuth put in the CM italic font.
%
\def\pounds{{\it\$}}
% @euro{} comes from a separate font, depending on the current style.
% We use the free feym* fonts from the eurosym package by Henrik
% Theiling, which support regular, slanted, bold and bold slanted (and
% "outlined" (blackboard board, sort of) versions, which we don't need).
% It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
%
% Although only regular is the truly official Euro symbol, we ignore
% that. The Euro is designed to be slightly taller than the regular
% font height.
%
% feymr - regular
% feymo - slanted
% feybr - bold
% feybo - bold slanted
%
% There is no good (free) typewriter version, to my knowledge.
% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
% Hmm.
%
% Also doesn't work in math. Do we need to do math with euro symbols?
% Hope not.
%
%
\def\euro{{\eurofont e}}
\def\eurofont{%
% We set the font at each command, rather than predefining it in
% \textfonts and the other font-switching commands, so that
% installations which never need the symbol don't have to have the
% font installed.
%
% There is only one designed size (nominal 10pt), so we always scale
% that to the current nominal size.
%
% By the way, simply using "at 1em" works for cmr10 and the like, but
% does not work for cmbx10 and other extended/shrunken fonts.
%
\def\eurosize{\csname\curfontsize nominalsize\endcsname}%
%
\ifx\curfontstyle\bfstylename
% bold:
\font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize
\else
% regular:
\font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize
\fi
\thiseurofont
}
% Glyphs from the EC fonts. We don't use \let for the aliases, because
% sometimes we redefine the original macro, and the alias should reflect
% the redefinition.
%
% Use LaTeX names for the Icelandic letters.
\def\DH{{\ecfont \char"D0}} % Eth
\def\dh{{\ecfont \char"F0}} % eth
\def\TH{{\ecfont \char"DE}} % Thorn
\def\th{{\ecfont \char"FE}} % thorn
%
\def\guillemetleft{{\ecfont \char"13}}
\def\guillemotleft{\guillemetleft}
\def\guillemetright{{\ecfont \char"14}}
\def\guillemotright{\guillemetright}
\def\guilsinglleft{{\ecfont \char"0E}}
\def\guilsinglright{{\ecfont \char"0F}}
\def\quotedblbase{{\ecfont \char"12}}
\def\quotesinglbase{{\ecfont \char"0D}}
%
% This positioning is not perfect (see the ogonek LaTeX package), but
% we have the precomposed glyphs for the most common cases. We put the
% tests to use those glyphs in the single \ogonek macro so we have fewer
% dummy definitions to worry about for index entries, etc.
%
% ogonek is also used with other letters in Lithuanian (IOU), but using
% the precomposed glyphs for those is not so easy since they aren't in
% the same EC font.
\def\ogonek#1{{%
\def\temp{#1}%
\ifx\temp\macrocharA\Aogonek
\else\ifx\temp\macrochara\aogonek
\else\ifx\temp\macrocharE\Eogonek
\else\ifx\temp\macrochare\eogonek
\else
\ecfont \setbox0=\hbox{#1}%
\ifdim\ht0=1ex\accent"0C #1%
\else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}%
\fi
\fi\fi\fi\fi
}%
}
\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A}
\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a}
\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
%
% Use the ec* fonts (cm-super in outline format) for non-CM glyphs.
\def\ecfont{%
% We can't distinguish serif/sans and italic/slanted, but this
% is used for crude hacks anyway (like adding French and German
% quotes to documents typeset with CM, where we lose kerning), so
% hopefully nobody will notice/care.
\edef\ecsize{\csname\curfontsize ecsize\endcsname}%
\edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
\ifmonospace
% typewriter:
\font\thisecfont = ectt\ecsize \space at \nominalsize
\else
\ifx\curfontstyle\bfstylename
% bold:
\font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
\else
% regular:
\font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
\fi
\fi
\thisecfont
}
% @registeredsymbol - R in a circle. The font for the R should really
% be smaller yet, but lllsize is the best we can do for now.
% Adapted from the plain.tex definition of \copyright.
%
\def\registeredsymbol{%
$^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}%
\hfil\crcr\Orb}}%
}$%
}
% @textdegree - the normal degrees sign.
%
\def\textdegree{$^\circ$}
% Laurent Siebenmann reports \Orb undefined with:
% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
% so we'll define it if necessary.
%
\ifx\Orb\thisisundefined
\def\Orb{\mathhexbox20D}
\fi
% Quotes.
\chardef\quotedblleft="5C
\chardef\quotedblright=`\"
\chardef\quoteleft=`\`
\chardef\quoteright=`\'
\message{page headings,}
\newskip\titlepagetopglue \titlepagetopglue = 1.5in
\newskip\titlepagebottomglue \titlepagebottomglue = 2pc
% First the title page. Must do @settitle before @titlepage.
\newif\ifseenauthor
\newif\iffinishedtitlepage
% Do an implicit @contents or @shortcontents after @end titlepage if the
% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage.
%
\newif\ifsetcontentsaftertitlepage
\let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue
\newif\ifsetshortcontentsaftertitlepage
\let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
\parseargdef\shorttitlepage{%
\begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
\endgroup\page\hbox{}\page}
\envdef\titlepage{%
% Open one extra group, as we want to close it in the middle of \Etitlepage.
\begingroup
\parindent=0pt \textfonts
% Leave some space at the very top of the page.
\vglue\titlepagetopglue
% No rule at page bottom unless we print one at the top with @title.
\finishedtitlepagetrue
%
% Most title ``pages'' are actually two pages long, with space
% at the top of the second. We don't want the ragged left on the second.
\let\oldpage = \page
\def\page{%
\iffinishedtitlepage\else
\finishtitlepage
\fi
\let\page = \oldpage
\page
\null
}%
}
\def\Etitlepage{%
\iffinishedtitlepage\else
\finishtitlepage
\fi
% It is important to do the page break before ending the group,
% because the headline and footline are only empty inside the group.
% If we use the new definition of \page, we always get a blank page
% after the title page, which we certainly don't want.
\oldpage
\endgroup
%
% Need this before the \...aftertitlepage checks so that if they are
% in effect the toc pages will come out with page numbers.
\HEADINGSon
%
% If they want short, they certainly want long too.
\ifsetshortcontentsaftertitlepage
\shortcontents
\contents
\global\let\shortcontents = \relax
\global\let\contents = \relax
\fi
%
\ifsetcontentsaftertitlepage
\contents
\global\let\contents = \relax
\global\let\shortcontents = \relax
\fi
}
\def\finishtitlepage{%
\vskip4pt \hrule height 2pt width \hsize
\vskip\titlepagebottomglue
\finishedtitlepagetrue
}
% Settings used for typesetting titles: no hyphenation, no indentation,
% don't worry much about spacing, ragged right. This should be used
% inside a \vbox, and fonts need to be set appropriately first. Because
% it is always used for titles, nothing else, we call \rmisbold. \par
% should be specified before the end of the \vbox, since a vbox is a group.
%
\def\raggedtitlesettings{%
\rmisbold
\hyphenpenalty=10000
\parindent=0pt
\tolerance=5000
\ptexraggedright
}
% Macros to be used within @titlepage:
\let\subtitlerm=\tenrm
\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
\parseargdef\title{%
\checkenv\titlepage
\vbox{\titlefonts \raggedtitlesettings #1\par}%
% print a rule at the page bottom also.
\finishedtitlepagefalse
\vskip4pt \hrule height 4pt width \hsize \vskip4pt
}
\parseargdef\subtitle{%
\checkenv\titlepage
{\subtitlefont \rightline{#1}}%
}
% @author should come last, but may come many times.
% It can also be used inside @quotation.
%
\parseargdef\author{%
\def\temp{\quotation}%
\ifx\thisenv\temp
\def\quotationauthor{#1}% printed in \Equotation.
\else
\checkenv\titlepage
\ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
{\secfonts\rmisbold \leftline{#1}}%
\fi
}
% Set up page headings and footings.
\let\thispage=\folio
\newtoks\evenheadline % headline on even pages
\newtoks\oddheadline % headline on odd pages
\newtoks\evenfootline % footline on even pages
\newtoks\oddfootline % footline on odd pages
% Now make TeX use those variables
\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
\else \the\evenheadline \fi}}
\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
\else \the\evenfootline \fi}\HEADINGShook}
\let\HEADINGShook=\relax
% Commands to set those variables.
% For example, this is what @headings on does
% @evenheading @thistitle|@thispage|@thischapter
% @oddheading @thischapter|@thispage|@thistitle
% @evenfooting @thisfile||
% @oddfooting ||@thisfile
\def\evenheading{\parsearg\evenheadingxxx}
\def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish}
\def\evenheadingyyy #1\|#2\|#3\|#4\finish{%
\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
\def\oddheading{\parsearg\oddheadingxxx}
\def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish}
\def\oddheadingyyy #1\|#2\|#3\|#4\finish{%
\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
\parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
\def\evenfooting{\parsearg\evenfootingxxx}
\def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish}
\def\evenfootingyyy #1\|#2\|#3\|#4\finish{%
\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
\def\oddfooting{\parsearg\oddfootingxxx}
\def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish}
\def\oddfootingyyy #1\|#2\|#3\|#4\finish{%
\global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}%
%
% Leave some space for the footline. Hopefully ok to assume
% @evenfooting will not be used by itself.
\global\advance\pageheight by -12pt
\global\advance\vsize by -12pt
}
\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
% @evenheadingmarks top \thischapter <- chapter at the top of a page
% @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page
%
% The same set of arguments for:
%
% @oddheadingmarks
% @evenfootingmarks
% @oddfootingmarks
% @everyheadingmarks
% @everyfootingmarks
\def\evenheadingmarks{\headingmarks{even}{heading}}
\def\oddheadingmarks{\headingmarks{odd}{heading}}
\def\evenfootingmarks{\headingmarks{even}{footing}}
\def\oddfootingmarks{\headingmarks{odd}{footing}}
\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1}
\headingmarks{odd}{heading}{#1} }
\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1}
\headingmarks{odd}{footing}{#1} }
% #1 = even/odd, #2 = heading/footing, #3 = top/bottom.
\def\headingmarks#1#2#3 {%
\expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname
\global\expandafter\let\csname get#1#2marks\endcsname \temp
}
\everyheadingmarks bottom
\everyfootingmarks bottom
% @headings double turns headings on for double-sided printing.
% @headings single turns headings on for single-sided printing.
% @headings off turns them off.
% @headings on same as @headings double, retained for compatibility.
% @headings after turns on double-sided headings after this page.
% @headings doubleafter turns on double-sided headings after this page.
% @headings singleafter turns on single-sided headings after this page.
% By default, they are off at the start of a document,
% and turned `on' after @end titlepage.
\def\headings #1 {\csname HEADINGS#1\endcsname}
\def\headingsoff{% non-global headings elimination
\evenheadline={\hfil}\evenfootline={\hfil}%
\oddheadline={\hfil}\oddfootline={\hfil}%
}
\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
\HEADINGSoff % it's the default
% When we turn headings on, set the page number to 1.
% For double-sided printing, put current file name in lower left corner,
% chapter name on inside top of right hand pages, document
% title on inside top of left hand pages, and page numbers on outside top
% edge of all pages.
\def\HEADINGSdouble{%
\global\pageno=1
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\folio\hfil\thistitle}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
\global\let\contentsalignmacro = \chapoddpage
}
\let\contentsalignmacro = \chappager
% For single-sided printing, chapter title goes across top left of page,
% page number on top right.
\def\HEADINGSsingle{%
\global\pageno=1
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\thischapter\hfil\folio}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
\global\let\contentsalignmacro = \chappager
}
\def\HEADINGSon{\HEADINGSdouble}
\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
\let\HEADINGSdoubleafter=\HEADINGSafter
\def\HEADINGSdoublex{%
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\folio\hfil\thistitle}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
\global\let\contentsalignmacro = \chapoddpage
}
\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
\def\HEADINGSsinglex{%
\global\evenfootline={\hfil}
\global\oddfootline={\hfil}
\global\evenheadline={\line{\thischapter\hfil\folio}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
\global\let\contentsalignmacro = \chappager
}
% Subroutines used in generating headings
% This produces Day Month Year style of output.
% Only define if not already defined, in case a txi-??.tex file has set
% up a different format (e.g., txi-cs.tex does this).
\ifx\today\thisisundefined
\def\today{%
\number\day\space
\ifcase\month
\or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
\or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
\or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
\fi
\space\number\year}
\fi
% @settitle line... specifies the title of the document, for headings.
% It generates no output of its own.
\def\thistitle{\putwordNoTitle}
\def\settitle{\parsearg{\gdef\thistitle}}
\message{tables,}
% Tables -- @table, @ftable, @vtable, @item(x).
% default indentation of table text
\newdimen\tableindent \tableindent=.8in
% default indentation of @itemize and @enumerate text
\newdimen\itemindent \itemindent=.3in
% margin between end of table item and start of table text.
\newdimen\itemmargin \itemmargin=.1in
% used internally for \itemindent minus \itemmargin
\newdimen\itemmax
% Note @table, @ftable, and @vtable define @item, @itemx, etc., with
% these defs.
% They also define \itemindex
% to index the item name in whatever manner is desired (perhaps none).
\newif\ifitemxneedsnegativevskip
\def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi}
\def\internalBitem{\smallbreak \parsearg\itemzzz}
\def\internalBitemx{\itemxpar \parsearg\itemzzz}
\def\itemzzz #1{\begingroup %
\advance\hsize by -\rightskip
\advance\hsize by -\tableindent
\setbox0=\hbox{\itemindicate{#1}}%
\itemindex{#1}%
\nobreak % This prevents a break before @itemx.
%
% If the item text does not fit in the space we have, put it on a line
% by itself, and do not allow a page break either before or after that
% line. We do not start a paragraph here because then if the next
% command is, e.g., @kindex, the whatsit would get put into the
% horizontal list on a line by itself, resulting in extra blank space.
\ifdim \wd0>\itemmax
%
% Make this a paragraph so we get the \parskip glue and wrapping,
% but leave it ragged-right.
\begingroup
\advance\leftskip by-\tableindent
\advance\hsize by\tableindent
\advance\rightskip by0pt plus1fil\relax
\leavevmode\unhbox0\par
\endgroup
%
% We're going to be starting a paragraph, but we don't want the
% \parskip glue -- logically it's part of the @item we just started.
\nobreak \vskip-\parskip
%
% Stop a page break at the \parskip glue coming up. However, if
% what follows is an environment such as @example, there will be no
% \parskip glue; then the negative vskip we just inserted would
% cause the example and the item to crash together. So we use this
% bizarre value of 10001 as a signal to \aboveenvbreak to insert
% \parskip glue after all. Section titles are handled this way also.
%
\penalty 10001
\endgroup
\itemxneedsnegativevskipfalse
\else
% The item text fits into the space. Start a paragraph, so that the
% following text (if any) will end up on the same line.
\noindent
% Do this with kerns and \unhbox so that if there is a footnote in
% the item text, it can migrate to the main vertical list and
% eventually be printed.
\nobreak\kern-\tableindent
\dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0
\unhbox0
\nobreak\kern\dimen0
\endgroup
\itemxneedsnegativevskiptrue
\fi
}
\def\item{\errmessage{@item while not in a list environment}}
\def\itemx{\errmessage{@itemx while not in a list environment}}
% @table, @ftable, @vtable.
\envdef\table{%
\let\itemindex\gobble
\tablecheck{table}%
}
\envdef\ftable{%
\def\itemindex ##1{\doind {fn}{\code{##1}}}%
\tablecheck{ftable}%
}
\envdef\vtable{%
\def\itemindex ##1{\doind {vr}{\code{##1}}}%
\tablecheck{vtable}%
}
\def\tablecheck#1{%
\ifnum \the\catcode`\^^M=\active
\endgroup
\errmessage{This command won't work in this context; perhaps the problem is
that we are \inenvironment\thisenv}%
\def\next{\doignore{#1}}%
\else
\let\next\tablex
\fi
\next
}
\def\tablex#1{%
\def\itemindicate{#1}%
\parsearg\tabley
}
\def\tabley#1{%
{%
\makevalueexpandable
\edef\temp{\noexpand\tablez #1\space\space\space}%
\expandafter
}\temp \endtablez
}
\def\tablez #1 #2 #3 #4\endtablez{%
\aboveenvbreak
\ifnum 0#1>0 \advance \leftskip by #1\mil \fi
\ifnum 0#2>0 \tableindent=#2\mil \fi
\ifnum 0#3>0 \advance \rightskip by #3\mil \fi
\itemmax=\tableindent
\advance \itemmax by -\itemmargin
\advance \leftskip by \tableindent
\exdentamount=\tableindent
\parindent = 0pt
\parskip = \smallskipamount
\ifdim \parskip=0pt \parskip=2pt \fi
\let\item = \internalBitem
\let\itemx = \internalBitemx
}
\def\Etable{\endgraf\afterenvbreak}
\let\Eftable\Etable
\let\Evtable\Etable
\let\Eitemize\Etable
\let\Eenumerate\Etable
% This is the counter used by @enumerate, which is really @itemize
\newcount \itemno
\envdef\itemize{\parsearg\doitemize}
\def\doitemize#1{%
\aboveenvbreak
\itemmax=\itemindent
\advance\itemmax by -\itemmargin
\advance\leftskip by \itemindent
\exdentamount=\itemindent
\parindent=0pt
\parskip=\smallskipamount
\ifdim\parskip=0pt \parskip=2pt \fi
%
% Try typesetting the item mark that if the document erroneously says
% something like @itemize @samp (intending @table), there's an error
% right away at the @itemize. It's not the best error message in the
% world, but it's better than leaving it to the @item. This means if
% the user wants an empty mark, they have to say @w{} not just @w.
\def\itemcontents{#1}%
\setbox0 = \hbox{\itemcontents}%
%
% @itemize with no arg is equivalent to @itemize @bullet.
\ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
%
\let\item=\itemizeitem
}
% Definition of @item while inside @itemize and @enumerate.
%
\def\itemizeitem{%
\advance\itemno by 1 % for enumerations
{\let\par=\endgraf \smallbreak}% reasonable place to break
{%
% If the document has an @itemize directly after a section title, a
% \nobreak will be last on the list, and \sectionheading will have
% done a \vskip-\parskip. In that case, we don't want to zero
% parskip, or the item text will crash with the heading. On the
% other hand, when there is normal text preceding the item (as there
% usually is), we do want to zero parskip, or there would be too much
% space. In that case, we won't have a \nobreak before. At least
% that's the theory.
\ifnum\lastpenalty<10000 \parskip=0in \fi
\noindent
\hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
%
\vadjust{\penalty 1200}}% not good to break after first line of item.
\flushcr
}
% \splitoff TOKENS\endmark defines \first to be the first token in
% TOKENS, and \rest to be the remainder.
%
\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
% Allow an optional argument of an uppercase letter, lowercase letter,
% or number, to specify the first label in the enumerated list. No
% argument is the same as `1'.
%
\envparseargdef\enumerate{\enumeratey #1 \endenumeratey}
\def\enumeratey #1 #2\endenumeratey{%
% If we were given no argument, pretend we were given `1'.
\def\thearg{#1}%
\ifx\thearg\empty \def\thearg{1}\fi
%
% Detect if the argument is a single token. If so, it might be a
% letter. Otherwise, the only valid thing it can be is a number.
% (We will always have one token, because of the test we just made.
% This is a good thing, since \splitoff doesn't work given nothing at
% all -- the first parameter is undelimited.)
\expandafter\splitoff\thearg\endmark
\ifx\rest\empty
% Only one token in the argument. It could still be anything.
% A ``lowercase letter'' is one whose \lccode is nonzero.
% An ``uppercase letter'' is one whose \lccode is both nonzero, and
% not equal to itself.
% Otherwise, we assume it's a number.
%
% We need the \relax at the end of the \ifnum lines to stop TeX from
% continuing to look for a .
%
\ifnum\lccode\expandafter`\thearg=0\relax
\numericenumerate % a number (we hope)
\else
% It's a letter.
\ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax
\lowercaseenumerate % lowercase letter
\else
\uppercaseenumerate % uppercase letter
\fi
\fi
\else
% Multiple tokens in the argument. We hope it's a number.
\numericenumerate
\fi
}
% An @enumerate whose labels are integers. The starting integer is
% given in \thearg.
%
\def\numericenumerate{%
\itemno = \thearg
\startenumeration{\the\itemno}%
}
% The starting (lowercase) letter is in \thearg.
\def\lowercaseenumerate{%
\itemno = \expandafter`\thearg
\startenumeration{%
% Be sure we're not beyond the end of the alphabet.
\ifnum\itemno=0
\errmessage{No more lowercase letters in @enumerate; get a bigger
alphabet}%
\fi
\char\lccode\itemno
}%
}
% The starting (uppercase) letter is in \thearg.
\def\uppercaseenumerate{%
\itemno = \expandafter`\thearg
\startenumeration{%
% Be sure we're not beyond the end of the alphabet.
\ifnum\itemno=0
\errmessage{No more uppercase letters in @enumerate; get a bigger
alphabet}
\fi
\char\uccode\itemno
}%
}
% Call \doitemize, adding a period to the first argument and supplying the
% common last two arguments. Also subtract one from the initial value in
% \itemno, since @item increments \itemno.
%
\def\startenumeration#1{%
\advance\itemno by -1
\doitemize{#1.}\flushcr
}
% @alphaenumerate and @capsenumerate are abbreviations for giving an arg
% to @enumerate.
%
\def\alphaenumerate{\enumerate{a}}
\def\capsenumerate{\enumerate{A}}
\def\Ealphaenumerate{\Eenumerate}
\def\Ecapsenumerate{\Eenumerate}
% @multitable macros
% Amy Hendrickson, 8/18/94, 3/6/96
%
% @multitable ... @end multitable will make as many columns as desired.
% Contents of each column will wrap at width given in preamble. Width
% can be specified either with sample text given in a template line,
% or in percent of \hsize, the current width of text on page.
% Table can continue over pages but will only break between lines.
% To make preamble:
%
% Either define widths of columns in terms of percent of \hsize:
% @multitable @columnfractions .25 .3 .45
% @item ...
%
% Numbers following @columnfractions are the percent of the total
% current hsize to be used for each column. You may use as many
% columns as desired.
% Or use a template:
% @multitable {Column 1 template} {Column 2 template} {Column 3 template}
% @item ...
% using the widest term desired in each column.
% Each new table line starts with @item, each subsequent new column
% starts with @tab. Empty columns may be produced by supplying @tab's
% with nothing between them for as many times as empty columns are needed,
% ie, @tab@tab@tab will produce two empty columns.
% @item, @tab do not need to be on their own lines, but it will not hurt
% if they are.
% Sample multitable:
% @multitable {Column 1 template} {Column 2 template} {Column 3 template}
% @item first col stuff @tab second col stuff @tab third col
% @item
% first col stuff
% @tab
% second col stuff
% @tab
% third col
% @item first col stuff @tab second col stuff
% @tab Many paragraphs of text may be used in any column.
%
% They will wrap at the width determined by the template.
% @item@tab@tab This will be in third column.
% @end multitable
% Default dimensions may be reset by user.
% @multitableparskip is vertical space between paragraphs in table.
% @multitableparindent is paragraph indent in table.
% @multitablecolmargin is horizontal space to be left between columns.
% @multitablelinespace is space to leave between table items, baseline
% to baseline.
% 0pt means it depends on current normal line spacing.
%
\newskip\multitableparskip
\newskip\multitableparindent
\newdimen\multitablecolspace
\newskip\multitablelinespace
\multitableparskip=0pt
\multitableparindent=6pt
\multitablecolspace=12pt
\multitablelinespace=0pt
% Macros used to set up halign preamble:
%
\let\endsetuptable\relax
\def\xendsetuptable{\endsetuptable}
\let\columnfractions\relax
\def\xcolumnfractions{\columnfractions}
\newif\ifsetpercent
% #1 is the @columnfraction, usually a decimal number like .5, but might
% be just 1. We just use it, whatever it is.
%
\def\pickupwholefraction#1 {%
\global\advance\colcount by 1
\expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}%
\setuptable
}
\newcount\colcount
\def\setuptable#1{%
\def\firstarg{#1}%
\ifx\firstarg\xendsetuptable
\let\go = \relax
\else
\ifx\firstarg\xcolumnfractions
\global\setpercenttrue
\else
\ifsetpercent
\let\go\pickupwholefraction
\else
\global\advance\colcount by 1
\setbox0=\hbox{#1\unskip\space}% Add a normal word space as a
% separator; typically that is always in the input, anyway.
\expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
\fi
\fi
\ifx\go\pickupwholefraction
% Put the argument back for the \pickupwholefraction call, so
% we'll always have a period there to be parsed.
\def\go{\pickupwholefraction#1}%
\else
\let\go = \setuptable
\fi%
\fi
\go
}
% multitable-only commands.
%
% @headitem starts a heading row, which we typeset in bold.
% Assignments have to be global since we are inside the implicit group
% of an alignment entry. \everycr resets \everytab so we don't have to
% undo it ourselves.
\def\headitemfont{\b}% for people to use in the template row; not changeable
\def\headitem{%
\checkenv\multitable
\crcr
\global\everytab={\bf}% can't use \headitemfont since the parsing differs
\the\everytab % for the first item
}%
%
% A \tab used to include \hskip1sp. But then the space in a template
% line is not enough. That is bad. So let's go back to just `&' until
% we again encounter the problem the 1sp was intended to solve.
% --karl, nathan@acm.org, 20apr99.
\def\tab{\checkenv\multitable &\the\everytab}%
% @multitable ... @end multitable definitions:
%
\newtoks\everytab % insert after every tab.
%
\envdef\multitable{%
\vskip\parskip
\startsavinginserts
%
% @item within a multitable starts a normal row.
% We use \def instead of \let so that if one of the multitable entries
% contains an @itemize, we don't choke on the \item (seen as \crcr aka
% \endtemplate) expanding \doitemize.
\def\item{\crcr}%
%
\tolerance=9500
\hbadness=9500
\setmultitablespacing
\parskip=\multitableparskip
\parindent=\multitableparindent
\overfullrule=0pt
\global\colcount=0
%
\everycr = {%
\noalign{%
\global\everytab={}%
\global\colcount=0 % Reset the column counter.
% Check for saved footnotes, etc.
\checkinserts
% Keeps underfull box messages off when table breaks over pages.
%\filbreak
% Maybe so, but it also creates really weird page breaks when the
% table breaks over pages. Wouldn't \vfil be better? Wait until the
% problem manifests itself, so it can be fixed for real --karl.
}%
}%
%
\parsearg\domultitable
}
\def\domultitable#1{%
% To parse everything between @multitable and @item:
\setuptable#1 \endsetuptable
%
% This preamble sets up a generic column definition, which will
% be used as many times as user calls for columns.
% \vtop will set a single line and will also let text wrap and
% continue for many paragraphs if desired.
\halign\bgroup &%
\global\advance\colcount by 1
\multistrut
\vtop{%
% Use the current \colcount to find the correct column width:
\hsize=\expandafter\csname col\the\colcount\endcsname
%
% In order to keep entries from bumping into each other
% we will add a \leftskip of \multitablecolspace to all columns after
% the first one.
%
% If a template has been used, we will add \multitablecolspace
% to the width of each template entry.
%
% If the user has set preamble in terms of percent of \hsize we will
% use that dimension as the width of the column, and the \leftskip
% will keep entries from bumping into each other. Table will start at
% left margin and final column will justify at right margin.
%
% Make sure we don't inherit \rightskip from the outer environment.
\rightskip=0pt
\ifnum\colcount=1
% The first column will be indented with the surrounding text.
\advance\hsize by\leftskip
\else
\ifsetpercent \else
% If user has not set preamble in terms of percent of \hsize
% we will advance \hsize by \multitablecolspace.
\advance\hsize by \multitablecolspace
\fi
% In either case we will make \leftskip=\multitablecolspace:
\leftskip=\multitablecolspace
\fi
% Ignoring space at the beginning and end avoids an occasional spurious
% blank line, when TeX decides to break the line at the space before the
% box from the multistrut, so the strut ends up on a line by itself.
% For example:
% @multitable @columnfractions .11 .89
% @item @code{#}
% @tab Legal holiday which is valid in major parts of the whole country.
% Is automatically provided with highlighting sequences respectively
% marking characters.
\noindent\ignorespaces##\unskip\multistrut
}\cr
}
\def\Emultitable{%
\crcr
\egroup % end the \halign
\global\setpercentfalse
}
\def\setmultitablespacing{%
\def\multistrut{\strut}% just use the standard line spacing
%
% Compute \multitablelinespace (if not defined by user) for use in
% \multitableparskip calculation. We used define \multistrut based on
% this, but (ironically) that caused the spacing to be off.
% See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100.
\ifdim\multitablelinespace=0pt
\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
\global\advance\multitablelinespace by-\ht0
\fi
% Test to see if parskip is larger than space between lines of
% table. If not, do nothing.
% If so, set to same dimension as multitablelinespace.
\ifdim\multitableparskip>\multitablelinespace
\global\multitableparskip=\multitablelinespace
\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
% than skip between lines in the table.
\fi%
\ifdim\multitableparskip=0pt
\global\multitableparskip=\multitablelinespace
\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
% than skip between lines in the table.
\fi}
\message{conditionals,}
% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext,
% @ifnotxml always succeed. They currently do nothing; we don't
% attempt to check whether the conditionals are properly nested. But we
% have to remember that they are conditionals, so that @end doesn't
% attempt to close an environment group.
%
\def\makecond#1{%
\expandafter\let\csname #1\endcsname = \relax
\expandafter\let\csname iscond.#1\endcsname = 1
}
\makecond{iftex}
\makecond{ifnotdocbook}
\makecond{ifnothtml}
\makecond{ifnotinfo}
\makecond{ifnotplaintext}
\makecond{ifnotxml}
% Ignore @ignore, @ifhtml, @ifinfo, and the like.
%
\def\direntry{\doignore{direntry}}
\def\documentdescription{\doignore{documentdescription}}
\def\docbook{\doignore{docbook}}
\def\html{\doignore{html}}
\def\ifdocbook{\doignore{ifdocbook}}
\def\ifhtml{\doignore{ifhtml}}
\def\ifinfo{\doignore{ifinfo}}
\def\ifnottex{\doignore{ifnottex}}
\def\ifplaintext{\doignore{ifplaintext}}
\def\ifxml{\doignore{ifxml}}
\def\ignore{\doignore{ignore}}
\def\menu{\doignore{menu}}
\def\xml{\doignore{xml}}
% Ignore text until a line `@end #1', keeping track of nested conditionals.
%
% A count to remember the depth of nesting.
\newcount\doignorecount
\def\doignore#1{\begingroup
% Scan in ``verbatim'' mode:
\obeylines
\catcode`\@ = \other
\catcode`\{ = \other
\catcode`\} = \other
%
% Make sure that spaces turn into tokens that match what \doignoretext wants.
\spaceisspace
%
% Count number of #1's that we've seen.
\doignorecount = 0
%
% Swallow text until we reach the matching `@end #1'.
\dodoignore{#1}%
}
{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source.
\obeylines %
%
\gdef\dodoignore#1{%
% #1 contains the command name as a string, e.g., `ifinfo'.
%
% Define a command to find the next `@end #1'.
\long\def\doignoretext##1^^M@end #1{%
\doignoretextyyy##1^^M@#1\_STOP_}%
%
% And this command to find another #1 command, at the beginning of a
% line. (Otherwise, we would consider a line `@c @ifset', for
% example, to count as an @ifset for nesting.)
\long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}%
%
% And now expand that command.
\doignoretext ^^M%
}%
}
\def\doignoreyyy#1{%
\def\temp{#1}%
\ifx\temp\empty % Nothing found.
\let\next\doignoretextzzz
\else % Found a nested condition, ...
\advance\doignorecount by 1
\let\next\doignoretextyyy % ..., look for another.
% If we're here, #1 ends with ^^M\ifinfo (for example).
\fi
\next #1% the token \_STOP_ is present just after this macro.
}
% We have to swallow the remaining "\_STOP_".
%
\def\doignoretextzzz#1{%
\ifnum\doignorecount = 0 % We have just found the outermost @end.
\let\next\enddoignore
\else % Still inside a nested condition.
\advance\doignorecount by -1
\let\next\doignoretext % Look for the next @end.
\fi
\next
}
% Finish off ignored text.
{ \obeylines%
% Ignore anything after the last `@end #1'; this matters in verbatim
% environments, where otherwise the newline after an ignored conditional
% would result in a blank line in the output.
\gdef\enddoignore#1^^M{\endgroup\ignorespaces}%
}
% @set VAR sets the variable VAR to an empty value.
% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
%
% Since we want to separate VAR from REST-OF-LINE (which might be
% empty), we can't just use \parsearg; we have to insert a space of our
% own to delimit the rest of the line, and then take it out again if we
% didn't need it.
% We rely on the fact that \parsearg sets \catcode`\ =10.
%
\parseargdef\set{\setyyy#1 \endsetyyy}
\def\setyyy#1 #2\endsetyyy{%
{%
\makevalueexpandable
\def\temp{#2}%
\edef\next{\gdef\makecsname{SET#1}}%
\ifx\temp\empty
\next{}%
\else
\setzzz#2\endsetzzz
\fi
}%
}
% Remove the trailing space \setxxx inserted.
\def\setzzz#1 \endsetzzz{\next{#1}}
% @clear VAR clears (i.e., unsets) the variable VAR.
%
\parseargdef\clear{%
{%
\makevalueexpandable
\global\expandafter\let\csname SET#1\endcsname=\relax
}%
}
% @value{foo} gets the text saved in variable foo.
\def\value{\begingroup\makevalueexpandable\valuexxx}
\def\valuexxx#1{\expandablevalue{#1}\endgroup}
{
\catcode`\- = \active \catcode`\_ = \active
%
\gdef\makevalueexpandable{%
\let\value = \expandablevalue
% We don't want these characters active, ...
\catcode`\-=\other \catcode`\_=\other
% ..., but we might end up with active ones in the argument if
% we're called from @code, as @code{@value{foo-bar_}}, though.
% So \let them to their normal equivalents.
\let-\normaldash \let_\normalunderscore
}
}
% We have this subroutine so that we can handle at least some @value's
% properly in indexes (we call \makevalueexpandable in \indexdummies).
% The command has to be fully expandable (if the variable is set), since
% the result winds up in the index file. This means that if the
% variable's value contains other Texinfo commands, it's almost certain
% it will fail (although perhaps we could fix that with sufficient work
% to do a one-level expansion on the result, instead of complete).
%
\def\expandablevalue#1{%
\expandafter\ifx\csname SET#1\endcsname\relax
{[No value for ``#1'']}%
\message{Variable `#1', used in @value, is not set.}%
\else
\csname SET#1\endcsname
\fi
}
% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
% with @set.
%
% To get special treatment of `@end ifset,' call \makeond and the redefine.
%
\makecond{ifset}
\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}}
\def\doifset#1#2{%
{%
\makevalueexpandable
\let\next=\empty
\expandafter\ifx\csname SET#2\endcsname\relax
#1% If not set, redefine \next.
\fi
\expandafter
}\next
}
\def\ifsetfail{\doignore{ifset}}
% @ifclear VAR ... @end executes the `...' iff VAR has never been
% defined with @set, or has been undefined with @clear.
%
% The `\else' inside the `\doifset' parameter is a trick to reuse the
% above code: if the variable is not set, do nothing, if it is set,
% then redefine \next to \ifclearfail.
%
\makecond{ifclear}
\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}}
\def\ifclearfail{\doignore{ifclear}}
% @ifcommandisdefined CMD ... @end executes the `...' if CMD (written
% without the @) is in fact defined. We can only feasibly check at the
% TeX level, so something like `mathcode' is going to considered
% defined even though it is not a Texinfo command.
%
\makecond{ifcommanddefined}
\def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}}
%
\def\doifcmddefined#1#2{{%
\makevalueexpandable
\let\next=\empty
\expandafter\ifx\csname #2\endcsname\relax
#1% If not defined, \let\next as above.
\fi
\expandafter
}\next
}
\def\ifcmddefinedfail{\doignore{ifcommanddefined}}
% @ifcommandnotdefined CMD ... handled similar to @ifclear above.
\makecond{ifcommandnotdefined}
\def\ifcommandnotdefined{%
\parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}}
\def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}}
% Set the `txicommandconditionals' variable, so documents have a way to
% test if the @ifcommand...defined conditionals are available.
\set txicommandconditionals
% @dircategory CATEGORY -- specify a category of the dir file
% which this file should belong to. Ignore this in TeX.
\let\dircategory=\comment
% @defininfoenclose.
\let\definfoenclose=\comment
\message{indexing,}
% Index generation facilities
% Define \newwrite to be identical to plain tex's \newwrite
% except not \outer, so it can be used within macros and \if's.
\edef\newwrite{\makecsname{ptexnewwrite}}
% \newindex {foo} defines an index named foo.
% It automatically defines \fooindex such that
% \fooindex ...rest of line... puts an entry in the index foo.
% It also defines \fooindfile to be the number of the output channel for
% the file that accumulates this index. The file's extension is foo.
% The name of an index should be no more than 2 characters long
% for the sake of vms.
%
\def\newindex#1{%
\iflinks
\expandafter\newwrite \csname#1indfile\endcsname
\openout \csname#1indfile\endcsname \jobname.#1 % Open the file
\fi
\expandafter\xdef\csname#1index\endcsname{% % Define @#1index
\noexpand\doindex{#1}}
}
% @defindex foo == \newindex{foo}
%
\def\defindex{\parsearg\newindex}
% Define @defcodeindex, like @defindex except put all entries in @code.
%
\def\defcodeindex{\parsearg\newcodeindex}
%
\def\newcodeindex#1{%
\iflinks
\expandafter\newwrite \csname#1indfile\endcsname
\openout \csname#1indfile\endcsname \jobname.#1
\fi
\expandafter\xdef\csname#1index\endcsname{%
\noexpand\docodeindex{#1}}%
}
% @synindex foo bar makes index foo feed into index bar.
% Do this instead of @defindex foo if you don't want it as a separate index.
%
% @syncodeindex foo bar similar, but put all entries made for index foo
% inside @code.
%
\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
% #3 the target index (bar).
\def\dosynindex#1#2#3{%
% Only do \closeout if we haven't already done it, else we'll end up
% closing the target index.
\expandafter \ifx\csname donesynindex#2\endcsname \relax
% The \closeout helps reduce unnecessary open files; the limit on the
% Acorn RISC OS is a mere 16 files.
\expandafter\closeout\csname#2indfile\endcsname
\expandafter\let\csname donesynindex#2\endcsname = 1
\fi
% redefine \fooindfile:
\expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
\expandafter\let\csname#2indfile\endcsname=\temp
% redefine \fooindex:
\expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}%
}
% Define \doindex, the driver for all \fooindex macros.
% Argument #1 is generated by the calling \fooindex macro,
% and it is "foo", the name of the index.
% \doindex just uses \parsearg; it calls \doind for the actual work.
% This is because \doind is more useful to call from other macros.
% There is also \dosubind {index}{topic}{subtopic}
% which makes an entry in a two-level index such as the operation index.
\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
\def\singleindexer #1{\doind{\indexname}{#1}}
% like the previous two, but they put @code around the argument.
\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
% Take care of Texinfo commands that can appear in an index entry.
% Since there are some commands we want to expand, and others we don't,
% we have to laboriously prevent expansion for those that we don't.
%
\def\indexdummies{%
\escapechar = `\\ % use backslash in output files.
\def\@{@}% change to @@ when we switch to @ as escape char in index files.
\def\ {\realbackslash\space }%
%
% Need these unexpandable (because we define \tt as a dummy)
% definitions when @{ or @} appear in index entry text. Also, more
% complicated, when \tex is in effect and \{ is a \delimiter again.
% We can't use \lbracecmd and \rbracecmd because texindex assumes
% braces and backslashes are used only as delimiters. Perhaps we
% should define @lbrace and @rbrace commands a la @comma.
\def\{{{\tt\char123}}%
\def\}{{\tt\char125}}%
%
% I don't entirely understand this, but when an index entry is
% generated from a macro call, the \endinput which \scanmacro inserts
% causes processing to be prematurely terminated. This is,
% apparently, because \indexsorttmp is fully expanded, and \endinput
% is an expandable command. The redefinition below makes \endinput
% disappear altogether for that purpose -- although logging shows that
% processing continues to some further point. On the other hand, it
% seems \endinput does not hurt in the printed index arg, since that
% is still getting written without apparent harm.
%
% Sample source (mac-idx3.tex, reported by Graham Percival to
% help-texinfo, 22may06):
% @macro funindex {WORD}
% @findex xyz
% @end macro
% ...
% @funindex commtest
%
% The above is not enough to reproduce the bug, but it gives the flavor.
%
% Sample whatsit resulting:
% .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}}
%
% So:
\let\endinput = \empty
%
% Do the redefinitions.
\commondummies
}
% For the aux and toc files, @ is the escape character. So we want to
% redefine everything using @ as the escape character (instead of
% \realbackslash, still used for index files). When everything uses @,
% this will be simpler.
%
\def\atdummies{%
\def\@{@@}%
\def\ {@ }%
\let\{ = \lbraceatcmd
\let\} = \rbraceatcmd
%
% Do the redefinitions.
\commondummies
\otherbackslash
}
% Called from \indexdummies and \atdummies.
%
\def\commondummies{%
%
% \definedummyword defines \#1 as \string\#1\space, thus effectively
% preventing its expansion. This is used only for control words,
% not control letters, because the \space would be incorrect for
% control characters, but is needed to separate the control word
% from whatever follows.
%
% For control letters, we have \definedummyletter, which omits the
% space.
%
% These can be used both for control words that take an argument and
% those that do not. If it is followed by {arg} in the input, then
% that will dutifully get written to the index (or wherever).
%
\def\definedummyword ##1{\def##1{\string##1\space}}%
\def\definedummyletter##1{\def##1{\string##1}}%
\let\definedummyaccent\definedummyletter
%
\commondummiesnofonts
%
\definedummyletter\_%
\definedummyletter\-%
%
% Non-English letters.
\definedummyword\AA
\definedummyword\AE
\definedummyword\DH
\definedummyword\L
\definedummyword\O
\definedummyword\OE
\definedummyword\TH
\definedummyword\aa
\definedummyword\ae
\definedummyword\dh
\definedummyword\exclamdown
\definedummyword\l
\definedummyword\o
\definedummyword\oe
\definedummyword\ordf
\definedummyword\ordm
\definedummyword\questiondown
\definedummyword\ss
\definedummyword\th
%
% Although these internal commands shouldn't show up, sometimes they do.
\definedummyword\bf
\definedummyword\gtr
\definedummyword\hat
\definedummyword\less
\definedummyword\sf
\definedummyword\sl
\definedummyword\tclose
\definedummyword\tt
%
\definedummyword\LaTeX
\definedummyword\TeX
%
% Assorted special characters.
\definedummyword\arrow
\definedummyword\bullet
\definedummyword\comma
\definedummyword\copyright
\definedummyword\registeredsymbol
\definedummyword\dots
\definedummyword\enddots
\definedummyword\entrybreak
\definedummyword\equiv
\definedummyword\error
\definedummyword\euro
\definedummyword\expansion
\definedummyword\geq
\definedummyword\guillemetleft
\definedummyword\guillemetright
\definedummyword\guilsinglleft
\definedummyword\guilsinglright
\definedummyword\lbracechar
\definedummyword\leq
\definedummyword\minus
\definedummyword\ogonek
\definedummyword\pounds
\definedummyword\point
\definedummyword\print
\definedummyword\quotedblbase
\definedummyword\quotedblleft
\definedummyword\quotedblright
\definedummyword\quoteleft
\definedummyword\quoteright
\definedummyword\quotesinglbase
\definedummyword\rbracechar
\definedummyword\result
\definedummyword\textdegree
%
% We want to disable all macros so that they are not expanded by \write.
\macrolist
%
\normalturnoffactive
%
% Handle some cases of @value -- where it does not contain any
% (non-fully-expandable) commands.
\makevalueexpandable
}
% \commondummiesnofonts: common to \commondummies and \indexnofonts.
%
\def\commondummiesnofonts{%
% Control letters and accents.
\definedummyletter\!%
\definedummyaccent\"%
\definedummyaccent\'%
\definedummyletter\*%
\definedummyaccent\,%
\definedummyletter\.%
\definedummyletter\/%
\definedummyletter\:%
\definedummyaccent\=%
\definedummyletter\?%
\definedummyaccent\^%
\definedummyaccent\`%
\definedummyaccent\~%
\definedummyword\u
\definedummyword\v
\definedummyword\H
\definedummyword\dotaccent
\definedummyword\ogonek
\definedummyword\ringaccent
\definedummyword\tieaccent
\definedummyword\ubaraccent
\definedummyword\udotaccent
\definedummyword\dotless
%
% Texinfo font commands.
\definedummyword\b
\definedummyword\i
\definedummyword\r
\definedummyword\sansserif
\definedummyword\sc
\definedummyword\slanted
\definedummyword\t
%
% Commands that take arguments.
\definedummyword\abbr
\definedummyword\acronym
\definedummyword\anchor
\definedummyword\cite
\definedummyword\code
\definedummyword\command
\definedummyword\dfn
\definedummyword\dmn
\definedummyword\email
\definedummyword\emph
\definedummyword\env
\definedummyword\file
\definedummyword\image
\definedummyword\indicateurl
\definedummyword\inforef
\definedummyword\kbd
\definedummyword\key
\definedummyword\math
\definedummyword\option
\definedummyword\pxref
\definedummyword\ref
\definedummyword\samp
\definedummyword\strong
\definedummyword\tie
\definedummyword\uref
\definedummyword\url
\definedummyword\var
\definedummyword\verb
\definedummyword\w
\definedummyword\xref
}
% \indexnofonts is used when outputting the strings to sort the index
% by, and when constructing control sequence names. It eliminates all
% control sequences and just writes whatever the best ASCII sort string
% would be for a given command (usually its argument).
%
\def\indexnofonts{%
% Accent commands should become @asis.
\def\definedummyaccent##1{\let##1\asis}%
% We can just ignore other control letters.
\def\definedummyletter##1{\let##1\empty}%
% All control words become @asis by default; overrides below.
\let\definedummyword\definedummyaccent
%
\commondummiesnofonts
%
% Don't no-op \tt, since it isn't a user-level command
% and is used in the definitions of the active chars like <, >, |, etc.
% Likewise with the other plain tex font commands.
%\let\tt=\asis
%
\def\ { }%
\def\@{@}%
\def\_{\normalunderscore}%
\def\-{}% @- shouldn't affect sorting
%
% Unfortunately, texindex is not prepared to handle braces in the
% content at all. So for index sorting, we map @{ and @} to strings
% starting with |, since that ASCII character is between ASCII { and }.
\def\{{|a}%
\def\lbracechar{|a}%
%
\def\}{|b}%
\def\rbracechar{|b}%
%
% Non-English letters.
\def\AA{AA}%
\def\AE{AE}%
\def\DH{DZZ}%
\def\L{L}%
\def\OE{OE}%
\def\O{O}%
\def\TH{ZZZ}%
\def\aa{aa}%
\def\ae{ae}%
\def\dh{dzz}%
\def\exclamdown{!}%
\def\l{l}%
\def\oe{oe}%
\def\ordf{a}%
\def\ordm{o}%
\def\o{o}%
\def\questiondown{?}%
\def\ss{ss}%
\def\th{zzz}%
%
\def\LaTeX{LaTeX}%
\def\TeX{TeX}%
%
% Assorted special characters.
% (The following {} will end up in the sort string, but that's ok.)
\def\arrow{->}%
\def\bullet{bullet}%
\def\comma{,}%
\def\copyright{copyright}%
\def\dots{...}%
\def\enddots{...}%
\def\equiv{==}%
\def\error{error}%
\def\euro{euro}%
\def\expansion{==>}%
\def\geq{>=}%
\def\guillemetleft{<<}%
\def\guillemetright{>>}%
\def\guilsinglleft{<}%
\def\guilsinglright{>}%
\def\leq{<=}%
\def\minus{-}%
\def\point{.}%
\def\pounds{pounds}%
\def\print{-|}%
\def\quotedblbase{"}%
\def\quotedblleft{"}%
\def\quotedblright{"}%
\def\quoteleft{`}%
\def\quoteright{'}%
\def\quotesinglbase{,}%
\def\registeredsymbol{R}%
\def\result{=>}%
\def\textdegree{o}%
%
\expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax
\else \indexlquoteignore \fi
%
% We need to get rid of all macros, leaving only the arguments (if present).
% Of course this is not nearly correct, but it is the best we can do for now.
% makeinfo does not expand macros in the argument to @deffn, which ends up
% writing an index entry, and texindex isn't prepared for an index sort entry
% that starts with \.
%
% Since macro invocations are followed by braces, we can just redefine them
% to take a single TeX argument. The case of a macro invocation that
% goes to end-of-line is not handled.
%
\macrolist
}
% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us
% ignore left quotes in the sort term.
{\catcode`\`=\active
\gdef\indexlquoteignore{\let`=\empty}}
\let\indexbackslash=0 %overridden during \printindex.
\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
% Most index entries go through here, but \dosubind is the general case.
% #1 is the index name, #2 is the entry text.
\def\doind#1#2{\dosubind{#1}{#2}{}}
% Workhorse for all \fooindexes.
% #1 is name of index, #2 is stuff to put there, #3 is subentry --
% empty if called from \doind, as we usually are (the main exception
% is with most defuns, which call us directly).
%
\def\dosubind#1#2#3{%
\iflinks
{%
% Store the main index entry text (including the third arg).
\toks0 = {#2}%
% If third arg is present, precede it with a space.
\def\thirdarg{#3}%
\ifx\thirdarg\empty \else
\toks0 = \expandafter{\the\toks0 \space #3}%
\fi
%
\edef\writeto{\csname#1indfile\endcsname}%
%
\safewhatsit\dosubindwrite
}%
\fi
}
% Write the entry in \toks0 to the index file:
%
\def\dosubindwrite{%
% Put the index entry in the margin if desired.
\ifx\SETmarginindex\relax\else
\insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}%
\fi
%
% Remember, we are within a group.
\indexdummies % Must do this here, since \bf, etc expand at this stage
\def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now
% so it will be output as is; and it will print as backslash.
%
% Process the index entry with all font commands turned off, to
% get the string to sort by.
{\indexnofonts
\edef\temp{\the\toks0}% need full expansion
\xdef\indexsorttmp{\temp}%
}%
%
% Set up the complete index entry, with both the sort key and
% the original text, including any font commands. We write
% three arguments to \entry to the .?? file (four in the
% subentry case), texindex reduces to two when writing the .??s
% sorted result.
\edef\temp{%
\write\writeto{%
\string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}%
}%
\temp
}
% Take care of unwanted page breaks/skips around a whatsit:
%
% If a skip is the last thing on the list now, preserve it
% by backing up by \lastskip, doing the \write, then inserting
% the skip again. Otherwise, the whatsit generated by the
% \write or \pdfdest will make \lastskip zero. The result is that
% sequences like this:
% @end defun
% @tindex whatever
% @defun ...
% will have extra space inserted, because the \medbreak in the
% start of the @defun won't see the skip inserted by the @end of
% the previous defun.
%
% But don't do any of this if we're not in vertical mode. We
% don't want to do a \vskip and prematurely end a paragraph.
%
% Avoid page breaks due to these extra skips, too.
%
% But wait, there is a catch there:
% We'll have to check whether \lastskip is zero skip. \ifdim is not
% sufficient for this purpose, as it ignores stretch and shrink parts
% of the skip. The only way seems to be to check the textual
% representation of the skip.
%
% The following is almost like \def\zeroskipmacro{0.0pt} except that
% the ``p'' and ``t'' characters have catcode \other, not 11 (letter).
%
\edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname}
%
\newskip\whatsitskip
\newcount\whatsitpenalty
%
% ..., ready, GO:
%
\def\safewhatsit#1{\ifhmode
#1%
\else
% \lastskip and \lastpenalty cannot both be nonzero simultaneously.
\whatsitskip = \lastskip
\edef\lastskipmacro{\the\lastskip}%
\whatsitpenalty = \lastpenalty
%
% If \lastskip is nonzero, that means the last item was a
% skip. And since a skip is discardable, that means this
% -\whatsitskip glue we're inserting is preceded by a
% non-discardable item, therefore it is not a potential
% breakpoint, therefore no \nobreak needed.
\ifx\lastskipmacro\zeroskipmacro
\else
\vskip-\whatsitskip
\fi
%
#1%
%
\ifx\lastskipmacro\zeroskipmacro
% If \lastskip was zero, perhaps the last item was a penalty, and
% perhaps it was >=10000, e.g., a \nobreak. In that case, we want
% to re-insert the same penalty (values >10000 are used for various
% signals); since we just inserted a non-discardable item, any
% following glue (such as a \parskip) would be a breakpoint. For example:
% @deffn deffn-whatever
% @vindex index-whatever
% Description.
% would allow a break between the index-whatever whatsit
% and the "Description." paragraph.
\ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi
\else
% On the other hand, if we had a nonzero \lastskip,
% this make-up glue would be preceded by a non-discardable item
% (the whatsit from the \write), so we must insert a \nobreak.
\nobreak\vskip\whatsitskip
\fi
\fi}
% The index entry written in the file actually looks like
% \entry {sortstring}{page}{topic}
% or
% \entry {sortstring}{page}{topic}{subtopic}
% The texindex program reads in these files and writes files
% containing these kinds of lines:
% \initial {c}
% before the first topic whose initial is c
% \entry {topic}{pagelist}
% for a topic that is used without subtopics
% \primary {topic}
% for the beginning of a topic that is used with subtopics
% \secondary {subtopic}{pagelist}
% for each subtopic.
% Define the user-accessible indexing commands
% @findex, @vindex, @kindex, @cindex.
\def\findex {\fnindex}
\def\kindex {\kyindex}
\def\cindex {\cpindex}
\def\vindex {\vrindex}
\def\tindex {\tpindex}
\def\pindex {\pgindex}
\def\cindexsub {\begingroup\obeylines\cindexsub}
{\obeylines %
\gdef\cindexsub "#1" #2^^M{\endgroup %
\dosubind{cp}{#2}{#1}}}
% Define the macros used in formatting output of the sorted index material.
% @printindex causes a particular index (the ??s file) to get printed.
% It does not print any chapter heading (usually an @unnumbered).
%
\parseargdef\printindex{\begingroup
\dobreak \chapheadingskip{10000}%
%
\smallfonts \rm
\tolerance = 9500
\plainfrenchspacing
\everypar = {}% don't want the \kern\-parindent from indentation suppression.
%
% See if the index file exists and is nonempty.
% Change catcode of @ here so that if the index file contains
% \initial {@}
% as its first line, TeX doesn't complain about mismatched braces
% (because it thinks @} is a control sequence).
\catcode`\@ = 11
\openin 1 \jobname.#1s
\ifeof 1
% \enddoublecolumns gets confused if there is no text in the index,
% and it loses the chapter title and the aux file entries for the
% index. The easiest way to prevent this problem is to make sure
% there is some text.
\putwordIndexNonexistent
\else
%
% If the index file exists but is empty, then \openin leaves \ifeof
% false. We have to make TeX try to read something from the file, so
% it can discover if there is anything in it.
\read 1 to \temp
\ifeof 1
\putwordIndexIsEmpty
\else
% Index files are almost Texinfo source, but we use \ as the escape
% character. It would be better to use @, but that's too big a change
% to make right now.
\def\indexbackslash{\backslashcurfont}%
\catcode`\\ = 0
\escapechar = `\\
\begindoublecolumns
\input \jobname.#1s
\enddoublecolumns
\fi
\fi
\closein 1
\endgroup}
% These macros are used by the sorted index file itself.
% Change them to control the appearance of the index.
\def\initial#1{{%
% Some minor font changes for the special characters.
\let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
%
% Remove any glue we may have, we'll be inserting our own.
\removelastskip
%
% We like breaks before the index initials, so insert a bonus.
\nobreak
\vskip 0pt plus 3\baselineskip
\penalty 0
\vskip 0pt plus -3\baselineskip
%
% Typeset the initial. Making this add up to a whole number of
% baselineskips increases the chance of the dots lining up from column
% to column. It still won't often be perfect, because of the stretch
% we need before each entry, but it's better.
%
% No shrink because it confuses \balancecolumns.
\vskip 1.67\baselineskip plus .5\baselineskip
\leftline{\secbf #1}%
% Do our best not to break after the initial.
\nobreak
\vskip .33\baselineskip plus .1\baselineskip
}}
% \entry typesets a paragraph consisting of the text (#1), dot leaders, and
% then page number (#2) flushed to the right margin. It is used for index
% and table of contents entries. The paragraph is indented by \leftskip.
%
% A straightforward implementation would start like this:
% \def\entry#1#2{...
% But this freezes the catcodes in the argument, and can cause problems to
% @code, which sets - active. This problem was fixed by a kludge---
% ``-'' was active throughout whole index, but this isn't really right.
% The right solution is to prevent \entry from swallowing the whole text.
% --kasal, 21nov03
\def\entry{%
\begingroup
%
% Start a new paragraph if necessary, so our assignments below can't
% affect previous text.
\par
%
% Do not fill out the last line with white space.
\parfillskip = 0in
%
% No extra space above this paragraph.
\parskip = 0in
%
% Do not prefer a separate line ending with a hyphen to fewer lines.
\finalhyphendemerits = 0
%
% \hangindent is only relevant when the entry text and page number
% don't both fit on one line. In that case, bob suggests starting the
% dots pretty far over on the line. Unfortunately, a large
% indentation looks wrong when the entry text itself is broken across
% lines. So we use a small indentation and put up with long leaders.
%
% \hangafter is reset to 1 (which is the value we want) at the start
% of each paragraph, so we need not do anything with that.
\hangindent = 2em
%
% When the entry text needs to be broken, just fill out the first line
% with blank space.
\rightskip = 0pt plus1fil
%
% A bit of stretch before each entry for the benefit of balancing
% columns.
\vskip 0pt plus1pt
%
% When reading the text of entry, convert explicit line breaks
% from @* into spaces. The user might give these in long section
% titles, for instance.
\def\*{\unskip\space\ignorespaces}%
\def\entrybreak{\hfil\break}%
%
% Swallow the left brace of the text (first parameter):
\afterassignment\doentry
\let\temp =
}
\def\entrybreak{\unskip\space\ignorespaces}%
\def\doentry{%
\bgroup % Instead of the swallowed brace.
\noindent
\aftergroup\finishentry
% And now comes the text of the entry.
}
\def\finishentry#1{%
% #1 is the page number.
%
% The following is kludged to not output a line of dots in the index if
% there are no page numbers. The next person who breaks this will be
% cursed by a Unix daemon.
\setbox\boxA = \hbox{#1}%
\ifdim\wd\boxA = 0pt
\ %
\else
%
% If we must, put the page number on a line of its own, and fill out
% this line with blank space. (The \hfil is overwhelmed with the
% fill leaders glue in \indexdotfill if the page number does fit.)
\hfil\penalty50
\null\nobreak\indexdotfill % Have leaders before the page number.
%
% The `\ ' here is removed by the implicit \unskip that TeX does as
% part of (the primitive) \par. Without it, a spurious underfull
% \hbox ensues.
\ifpdf
\pdfgettoks#1.%
\ \the\toksA
\else
\ #1%
\fi
\fi
\par
\endgroup
}
% Like plain.tex's \dotfill, except uses up at least 1 em.
\def\indexdotfill{\cleaders
\hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill}
\def\primary #1{\line{#1\hfil}}
\newskip\secondaryindent \secondaryindent=0.5cm
\def\secondary#1#2{{%
\parfillskip=0in
\parskip=0in
\hangindent=1in
\hangafter=1
\noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
\ifpdf
\pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
\else
#2
\fi
\par
}}
% Define two-column mode, which we use to typeset indexes.
% Adapted from the TeXbook, page 416, which is to say,
% the manmac.tex format used to print the TeXbook itself.
\catcode`\@=11
\newbox\partialpage
\newdimen\doublecolumnhsize
\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
% Grab any single-column material above us.
\output = {%
%
% Here is a possibility not foreseen in manmac: if we accumulate a
% whole lot of material, we might end up calling this \output
% routine twice in a row (see the doublecol-lose test, which is
% essentially a couple of indexes with @setchapternewpage off). In
% that case we just ship out what is in \partialpage with the normal
% output routine. Generally, \partialpage will be empty when this
% runs and this will be a no-op. See the indexspread.tex test case.
\ifvoid\partialpage \else
\onepageout{\pagecontents\partialpage}%
\fi
%
\global\setbox\partialpage = \vbox{%
% Unvbox the main output page.
\unvbox\PAGE
\kern-\topskip \kern\baselineskip
}%
}%
\eject % run that output routine to set \partialpage
%
% Use the double-column output routine for subsequent pages.
\output = {\doublecolumnout}%
%
% Change the page size parameters. We could do this once outside this
% routine, in each of @smallbook, @afourpaper, and the default 8.5x11
% format, but then we repeat the same computation. Repeating a couple
% of assignments once per index is clearly meaningless for the
% execution time, so we may as well do it in one place.
%
% First we halve the line length, less a little for the gutter between
% the columns. We compute the gutter based on the line length, so it
% changes automatically with the paper format. The magic constant
% below is chosen so that the gutter has the same value (well, +-<1pt)
% as it did when we hard-coded it.
%
% We put the result in a separate register, \doublecolumhsize, so we
% can restore it in \pagesofar, after \hsize itself has (potentially)
% been clobbered.
%
\doublecolumnhsize = \hsize
\advance\doublecolumnhsize by -.04154\hsize
\divide\doublecolumnhsize by 2
\hsize = \doublecolumnhsize
%
% Double the \vsize as well. (We don't need a separate register here,
% since nobody clobbers \vsize.)
\vsize = 2\vsize
}
% The double-column output routine for all double-column pages except
% the last.
%
\def\doublecolumnout{%
\splittopskip=\topskip \splitmaxdepth=\maxdepth
% Get the available space for the double columns -- the normal
% (undoubled) page height minus any material left over from the
% previous page.
\dimen@ = \vsize
\divide\dimen@ by 2
\advance\dimen@ by -\ht\partialpage
%
% box0 will be the left-hand column, box2 the right.
\setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
\onepageout\pagesofar
\unvbox255
\penalty\outputpenalty
}
%
% Re-output the contents of the output page -- any previous material,
% followed by the two boxes we just split, in box0 and box2.
\def\pagesofar{%
\unvbox\partialpage
%
\hsize = \doublecolumnhsize
\wd0=\hsize \wd2=\hsize
\hbox to\pagewidth{\box0\hfil\box2}%
}
%
% All done with double columns.
\def\enddoublecolumns{%
% The following penalty ensures that the page builder is exercised
% _before_ we change the output routine. This is necessary in the
% following situation:
%
% The last section of the index consists only of a single entry.
% Before this section, \pagetotal is less than \pagegoal, so no
% break occurs before the last section starts. However, the last
% section, consisting of \initial and the single \entry, does not
% fit on the page and has to be broken off. Without the following
% penalty the page builder will not be exercised until \eject
% below, and by that time we'll already have changed the output
% routine to the \balancecolumns version, so the next-to-last
% double-column page will be processed with \balancecolumns, which
% is wrong: The two columns will go to the main vertical list, with
% the broken-off section in the recent contributions. As soon as
% the output routine finishes, TeX starts reconsidering the page
% break. The two columns and the broken-off section both fit on the
% page, because the two columns now take up only half of the page
% goal. When TeX sees \eject from below which follows the final
% section, it invokes the new output routine that we've set after
% \balancecolumns below; \onepageout will try to fit the two columns
% and the final section into the vbox of \pageheight (see
% \pagebody), causing an overfull box.
%
% Note that glue won't work here, because glue does not exercise the
% page builder, unlike penalties (see The TeXbook, pp. 280-281).
\penalty0
%
\output = {%
% Split the last of the double-column material. Leave it on the
% current page, no automatic page break.
\balancecolumns
%
% If we end up splitting too much material for the current page,
% though, there will be another page break right after this \output
% invocation ends. Having called \balancecolumns once, we do not
% want to call it again. Therefore, reset \output to its normal
% definition right away. (We hope \balancecolumns will never be
% called on to balance too much material, but if it is, this makes
% the output somewhat more palatable.)
\global\output = {\onepageout{\pagecontents\PAGE}}%
}%
\eject
\endgroup % started in \begindoublecolumns
%
% \pagegoal was set to the doubled \vsize above, since we restarted
% the current page. We're now back to normal single-column
% typesetting, so reset \pagegoal to the normal \vsize (after the
% \endgroup where \vsize got restored).
\pagegoal = \vsize
}
%
% Called at the end of the double column material.
\def\balancecolumns{%
\setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
\dimen@ = \ht0
\advance\dimen@ by \topskip
\advance\dimen@ by-\baselineskip
\divide\dimen@ by 2 % target to split to
%debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}%
\splittopskip = \topskip
% Loop until we get a decent breakpoint.
{%
\vbadness = 10000
\loop
\global\setbox3 = \copy0
\global\setbox1 = \vsplit3 to \dimen@
\ifdim\ht3>\dimen@
\global\advance\dimen@ by 1pt
\repeat
}%
%debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}%
\setbox0=\vbox to\dimen@{\unvbox1}%
\setbox2=\vbox to\dimen@{\unvbox3}%
%
\pagesofar
}
\catcode`\@ = \other
\message{sectioning,}
% Chapters, sections, etc.
% Let's start with @part.
\outer\parseargdef\part{\partzzz{#1}}
\def\partzzz#1{%
\chapoddpage
\null
\vskip.3\vsize % move it down on the page a bit
\begingroup
\noindent \titlefonts\rmisbold #1\par % the text
\let\lastnode=\empty % no node to associate with
\writetocentry{part}{#1}{}% but put it in the toc
\headingsoff % no headline or footline on the part page
\chapoddpage
\endgroup
}
% \unnumberedno is an oxymoron. But we count the unnumbered
% sections so that we can refer to them unambiguously in the pdf
% outlines by their "section number". We avoid collisions with chapter
% numbers by starting them at 10000. (If a document ever has 10000
% chapters, we're in trouble anyway, I'm sure.)
\newcount\unnumberedno \unnumberedno = 10000
\newcount\chapno
\newcount\secno \secno=0
\newcount\subsecno \subsecno=0
\newcount\subsubsecno \subsubsecno=0
% This counter is funny since it counts through charcodes of letters A, B, ...
\newcount\appendixno \appendixno = `\@
%
% \def\appendixletter{\char\the\appendixno}
% We do the following ugly conditional instead of the above simple
% construct for the sake of pdftex, which needs the actual
% letter in the expansion, not just typeset.
%
\def\appendixletter{%
\ifnum\appendixno=`A A%
\else\ifnum\appendixno=`B B%
\else\ifnum\appendixno=`C C%
\else\ifnum\appendixno=`D D%
\else\ifnum\appendixno=`E E%
\else\ifnum\appendixno=`F F%
\else\ifnum\appendixno=`G G%
\else\ifnum\appendixno=`H H%
\else\ifnum\appendixno=`I I%
\else\ifnum\appendixno=`J J%
\else\ifnum\appendixno=`K K%
\else\ifnum\appendixno=`L L%
\else\ifnum\appendixno=`M M%
\else\ifnum\appendixno=`N N%
\else\ifnum\appendixno=`O O%
\else\ifnum\appendixno=`P P%
\else\ifnum\appendixno=`Q Q%
\else\ifnum\appendixno=`R R%
\else\ifnum\appendixno=`S S%
\else\ifnum\appendixno=`T T%
\else\ifnum\appendixno=`U U%
\else\ifnum\appendixno=`V V%
\else\ifnum\appendixno=`W W%
\else\ifnum\appendixno=`X X%
\else\ifnum\appendixno=`Y Y%
\else\ifnum\appendixno=`Z Z%
% The \the is necessary, despite appearances, because \appendixletter is
% expanded while writing the .toc file. \char\appendixno is not
% expandable, thus it is written literally, thus all appendixes come out
% with the same letter (or @) in the toc without it.
\else\char\the\appendixno
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
% Each @chapter defines these (using marks) as the number+name, number
% and name of the chapter. Page headings and footings can use
% these. @section does likewise.
\def\thischapter{}
\def\thischapternum{}
\def\thischaptername{}
\def\thissection{}
\def\thissectionnum{}
\def\thissectionname{}
\newcount\absseclevel % used to calculate proper heading level
\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count
% @raisesections: treat @section as chapter, @subsection as section, etc.
\def\raisesections{\global\advance\secbase by -1}
\let\up=\raisesections % original BFox name
% @lowersections: treat @chapter as section, @section as subsection, etc.
\def\lowersections{\global\advance\secbase by 1}
\let\down=\lowersections % original BFox name
% we only have subsub.
\chardef\maxseclevel = 3
%
% A numbered section within an unnumbered changes to unnumbered too.
% To achieve this, remember the "biggest" unnum. sec. we are currently in:
\chardef\unnlevel = \maxseclevel
%
% Trace whether the current chapter is an appendix or not:
% \chapheadtype is "N" or "A", unnumbered chapters are ignored.
\def\chapheadtype{N}
% Choose a heading macro
% #1 is heading type
% #2 is heading level
% #3 is text for heading
\def\genhead#1#2#3{%
% Compute the abs. sec. level:
\absseclevel=#2
\advance\absseclevel by \secbase
% Make sure \absseclevel doesn't fall outside the range:
\ifnum \absseclevel < 0
\absseclevel = 0
\else
\ifnum \absseclevel > 3
\absseclevel = 3
\fi
\fi
% The heading type:
\def\headtype{#1}%
\if \headtype U%
\ifnum \absseclevel < \unnlevel
\chardef\unnlevel = \absseclevel
\fi
\else
% Check for appendix sections:
\ifnum \absseclevel = 0
\edef\chapheadtype{\headtype}%
\else
\if \headtype A\if \chapheadtype N%
\errmessage{@appendix... within a non-appendix chapter}%
\fi\fi
\fi
% Check for numbered within unnumbered:
\ifnum \absseclevel > \unnlevel
\def\headtype{U}%
\else
\chardef\unnlevel = 3
\fi
\fi
% Now print the heading:
\if \headtype U%
\ifcase\absseclevel
\unnumberedzzz{#3}%
\or \unnumberedseczzz{#3}%
\or \unnumberedsubseczzz{#3}%
\or \unnumberedsubsubseczzz{#3}%
\fi
\else
\if \headtype A%
\ifcase\absseclevel
\appendixzzz{#3}%
\or \appendixsectionzzz{#3}%
\or \appendixsubseczzz{#3}%
\or \appendixsubsubseczzz{#3}%
\fi
\else
\ifcase\absseclevel
\chapterzzz{#3}%
\or \seczzz{#3}%
\or \numberedsubseczzz{#3}%
\or \numberedsubsubseczzz{#3}%
\fi
\fi
\fi
\suppressfirstparagraphindent
}
% an interface:
\def\numhead{\genhead N}
\def\apphead{\genhead A}
\def\unnmhead{\genhead U}
% @chapter, @appendix, @unnumbered. Increment top-level counter, reset
% all lower-level sectioning counters to zero.
%
% Also set \chaplevelprefix, which we prepend to @float sequence numbers
% (e.g., figures), q.v. By default (before any chapter), that is empty.
\let\chaplevelprefix = \empty
%
\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz
\def\chapterzzz#1{%
% section resetting is \global in case the chapter is in a group, such
% as an @include file.
\global\secno=0 \global\subsecno=0 \global\subsubsecno=0
\global\advance\chapno by 1
%
% Used for \float.
\gdef\chaplevelprefix{\the\chapno.}%
\resetallfloatnos
%
% \putwordChapter can contain complex things in translations.
\toks0=\expandafter{\putwordChapter}%
\message{\the\toks0 \space \the\chapno}%
%
% Write the actual heading.
\chapmacro{#1}{Ynumbered}{\the\chapno}%
%
% So @section and the like are numbered underneath this chapter.
\global\let\section = \numberedsec
\global\let\subsection = \numberedsubsec
\global\let\subsubsection = \numberedsubsubsec
}
\outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz
%
\def\appendixzzz#1{%
\global\secno=0 \global\subsecno=0 \global\subsubsecno=0
\global\advance\appendixno by 1
\gdef\chaplevelprefix{\appendixletter.}%
\resetallfloatnos
%
% \putwordAppendix can contain complex things in translations.
\toks0=\expandafter{\putwordAppendix}%
\message{\the\toks0 \space \appendixletter}%
%
\chapmacro{#1}{Yappendix}{\appendixletter}%
%
\global\let\section = \appendixsec
\global\let\subsection = \appendixsubsec
\global\let\subsubsection = \appendixsubsubsec
}
% normally unnmhead0 calls unnumberedzzz:
\outer\parseargdef\unnumbered{\unnmhead0{#1}}
\def\unnumberedzzz#1{%
\global\secno=0 \global\subsecno=0 \global\subsubsecno=0
\global\advance\unnumberedno by 1
%
% Since an unnumbered has no number, no prefix for figures.
\global\let\chaplevelprefix = \empty
\resetallfloatnos
%
% This used to be simply \message{#1}, but TeX fully expands the
% argument to \message. Therefore, if #1 contained @-commands, TeX
% expanded them. For example, in `@unnumbered The @cite{Book}', TeX
% expanded @cite (which turns out to cause errors because \cite is meant
% to be executed, not expanded).
%
% Anyway, we don't want the fully-expanded definition of @cite to appear
% as a result of the \message, we just want `@cite' itself. We use
% \the to achieve this: TeX expands \the only once,
% simply yielding the contents of . (We also do this for
% the toc entries.)
\toks0 = {#1}%
\message{(\the\toks0)}%
%
\chapmacro{#1}{Ynothing}{\the\unnumberedno}%
%
\global\let\section = \unnumberedsec
\global\let\subsection = \unnumberedsubsec
\global\let\subsubsection = \unnumberedsubsubsec
}
% @centerchap is like @unnumbered, but the heading is centered.
\outer\parseargdef\centerchap{%
% Well, we could do the following in a group, but that would break
% an assumption that \chapmacro is called at the outermost level.
% Thus we are safer this way: --kasal, 24feb04
\let\centerparametersmaybe = \centerparameters
\unnmhead0{#1}%
\let\centerparametersmaybe = \relax
}
% @top is like @unnumbered.
\let\top\unnumbered
% Sections.
%
\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
\def\seczzz#1{%
\global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
\sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%
}
% normally calls appendixsectionzzz:
\outer\parseargdef\appendixsection{\apphead1{#1}}
\def\appendixsectionzzz#1{%
\global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
\sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%
}
\let\appendixsec\appendixsection
% normally calls unnumberedseczzz:
\outer\parseargdef\unnumberedsec{\unnmhead1{#1}}
\def\unnumberedseczzz#1{%
\global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
\sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%
}
% Subsections.
%
% normally calls numberedsubseczzz:
\outer\parseargdef\numberedsubsec{\numhead2{#1}}
\def\numberedsubseczzz#1{%
\global\subsubsecno=0 \global\advance\subsecno by 1
\sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%
}
% normally calls appendixsubseczzz:
\outer\parseargdef\appendixsubsec{\apphead2{#1}}
\def\appendixsubseczzz#1{%
\global\subsubsecno=0 \global\advance\subsecno by 1
\sectionheading{#1}{subsec}{Yappendix}%
{\appendixletter.\the\secno.\the\subsecno}%
}
% normally calls unnumberedsubseczzz:
\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}}
\def\unnumberedsubseczzz#1{%
\global\subsubsecno=0 \global\advance\subsecno by 1
\sectionheading{#1}{subsec}{Ynothing}%
{\the\unnumberedno.\the\secno.\the\subsecno}%
}
% Subsubsections.
%
% normally numberedsubsubseczzz:
\outer\parseargdef\numberedsubsubsec{\numhead3{#1}}
\def\numberedsubsubseczzz#1{%
\global\advance\subsubsecno by 1
\sectionheading{#1}{subsubsec}{Ynumbered}%
{\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}%
}
% normally appendixsubsubseczzz:
\outer\parseargdef\appendixsubsubsec{\apphead3{#1}}
\def\appendixsubsubseczzz#1{%
\global\advance\subsubsecno by 1
\sectionheading{#1}{subsubsec}{Yappendix}%
{\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}%
}
% normally unnumberedsubsubseczzz:
\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}}
\def\unnumberedsubsubseczzz#1{%
\global\advance\subsubsecno by 1
\sectionheading{#1}{subsubsec}{Ynothing}%
{\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}%
}
% These macros control what the section commands do, according
% to what kind of chapter we are in (ordinary, appendix, or unnumbered).
% Define them by default for a numbered chapter.
\let\section = \numberedsec
\let\subsection = \numberedsubsec
\let\subsubsection = \numberedsubsubsec
% Define @majorheading, @heading and @subheading
\def\majorheading{%
{\advance\chapheadingskip by 10pt \chapbreak }%
\parsearg\chapheadingzzz
}
\def\chapheading{\chapbreak \parsearg\chapheadingzzz}
\def\chapheadingzzz#1{%
\vbox{\chapfonts \raggedtitlesettings #1\par}%
\nobreak\bigskip \nobreak
\suppressfirstparagraphindent
}
% @heading, @subheading, @subsubheading.
\parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{}
\suppressfirstparagraphindent}
\parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{}
\suppressfirstparagraphindent}
\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{}
\suppressfirstparagraphindent}
% These macros generate a chapter, section, etc. heading only
% (including whitespace, linebreaking, etc. around it),
% given all the information in convenient, parsed form.
% Args are the skip and penalty (usually negative)
\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
% Parameter controlling skip before chapter headings (if needed)
\newskip\chapheadingskip
% Define plain chapter starts, and page on/off switching for it.
\def\chapbreak{\dobreak \chapheadingskip {-4000}}
\def\chappager{\par\vfill\supereject}
% Because \domark is called before \chapoddpage, the filler page will
% get the headings for the next chapter, which is wrong. But we don't
% care -- we just disable all headings on the filler page.
\def\chapoddpage{%
\chappager
\ifodd\pageno \else
\begingroup
\headingsoff
\null
\chappager
\endgroup
\fi
}
\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
\def\CHAPPAGoff{%
\global\let\contentsalignmacro = \chappager
\global\let\pchapsepmacro=\chapbreak
\global\let\pagealignmacro=\chappager}
\def\CHAPPAGon{%
\global\let\contentsalignmacro = \chappager
\global\let\pchapsepmacro=\chappager
\global\let\pagealignmacro=\chappager
\global\def\HEADINGSon{\HEADINGSsingle}}
\def\CHAPPAGodd{%
\global\let\contentsalignmacro = \chapoddpage
\global\let\pchapsepmacro=\chapoddpage
\global\let\pagealignmacro=\chapoddpage
\global\def\HEADINGSon{\HEADINGSdouble}}
\CHAPPAGon
% Chapter opening.
%
% #1 is the text, #2 is the section type (Ynumbered, Ynothing,
% Yappendix, Yomitfromtoc), #3 the chapter number.
%
% To test against our argument.
\def\Ynothingkeyword{Ynothing}
\def\Yomitfromtockeyword{Yomitfromtoc}
\def\Yappendixkeyword{Yappendix}
%
\def\chapmacro#1#2#3{%
% Insert the first mark before the heading break (see notes for \domark).
\let\prevchapterdefs=\lastchapterdefs
\let\prevsectiondefs=\lastsectiondefs
\gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}%
\gdef\thissection{}}%
%
\def\temptype{#2}%
\ifx\temptype\Ynothingkeyword
\gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
\gdef\thischapter{\thischaptername}}%
\else\ifx\temptype\Yomitfromtockeyword
\gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
\gdef\thischapter{}}%
\else\ifx\temptype\Yappendixkeyword
\toks0={#1}%
\xdef\lastchapterdefs{%
\gdef\noexpand\thischaptername{\the\toks0}%
\gdef\noexpand\thischapternum{\appendixletter}%
% \noexpand\putwordAppendix avoids expanding indigestible
% commands in some of the translations.
\gdef\noexpand\thischapter{\noexpand\putwordAppendix{}
\noexpand\thischapternum:
\noexpand\thischaptername}%
}%
\else
\toks0={#1}%
\xdef\lastchapterdefs{%
\gdef\noexpand\thischaptername{\the\toks0}%
\gdef\noexpand\thischapternum{\the\chapno}%
% \noexpand\putwordChapter avoids expanding indigestible
% commands in some of the translations.
\gdef\noexpand\thischapter{\noexpand\putwordChapter{}
\noexpand\thischapternum:
\noexpand\thischaptername}%
}%
\fi\fi\fi
%
% Output the mark. Pass it through \safewhatsit, to take care of
% the preceding space.
\safewhatsit\domark
%
% Insert the chapter heading break.
\pchapsepmacro
%
% Now the second mark, after the heading break. No break points
% between here and the heading.
\let\prevchapterdefs=\lastchapterdefs
\let\prevsectiondefs=\lastsectiondefs
\domark
%
{%
\chapfonts \rmisbold
%
% Have to define \lastsection before calling \donoderef, because the
% xref code eventually uses it. On the other hand, it has to be called
% after \pchapsepmacro, or the headline will change too soon.
\gdef\lastsection{#1}%
%
% Only insert the separating space if we have a chapter/appendix
% number, and don't print the unnumbered ``number''.
\ifx\temptype\Ynothingkeyword
\setbox0 = \hbox{}%
\def\toctype{unnchap}%
\else\ifx\temptype\Yomitfromtockeyword
\setbox0 = \hbox{}% contents like unnumbered, but no toc entry
\def\toctype{omit}%
\else\ifx\temptype\Yappendixkeyword
\setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
\def\toctype{app}%
\else
\setbox0 = \hbox{#3\enspace}%
\def\toctype{numchap}%
\fi\fi\fi
%
% Write the toc entry for this chapter. Must come before the
% \donoderef, because we include the current node name in the toc
% entry, and \donoderef resets it to empty.
\writetocentry{\toctype}{#1}{#3}%
%
% For pdftex, we have to write out the node definition (aka, make
% the pdfdest) after any page break, but before the actual text has
% been typeset. If the destination for the pdf outline is after the
% text, then jumping from the outline may wind up with the text not
% being visible, for instance under high magnification.
\donoderef{#2}%
%
% Typeset the actual heading.
\nobreak % Avoid page breaks at the interline glue.
\vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe
\unhbox0 #1\par}%
}%
\nobreak\bigskip % no page break after a chapter title
\nobreak
}
% @centerchap -- centered and unnumbered.
\let\centerparametersmaybe = \relax
\def\centerparameters{%
\advance\rightskip by 3\rightskip
\leftskip = \rightskip
\parfillskip = 0pt
}
% I don't think this chapter style is supported any more, so I'm not
% updating it with the new noderef stuff. We'll see. --karl, 11aug03.
%
\def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
%
\def\unnchfopen #1{%
\chapoddpage
\vbox{\chapfonts \raggedtitlesettings #1\par}%
\nobreak\bigskip\nobreak
}
\def\chfopen #1#2{\chapoddpage {\chapfonts
\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
\par\penalty 5000 %
}
\def\centerchfopen #1{%
\chapoddpage
\vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}%
\nobreak\bigskip \nobreak
}
\def\CHAPFopen{%
\global\let\chapmacro=\chfopen
\global\let\centerchapmacro=\centerchfopen}
% Section titles. These macros combine the section number parts and
% call the generic \sectionheading to do the printing.
%
\newskip\secheadingskip
\def\secheadingbreak{\dobreak \secheadingskip{-1000}}
% Subsection titles.
\newskip\subsecheadingskip
\def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}}
% Subsubsection titles.
\def\subsubsecheadingskip{\subsecheadingskip}
\def\subsubsecheadingbreak{\subsecheadingbreak}
% Print any size, any type, section title.
%
% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is
% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the
% section number.
%
\def\seckeyword{sec}
%
\def\sectionheading#1#2#3#4{%
{%
\checkenv{}% should not be in an environment.
%
% Switch to the right set of fonts.
\csname #2fonts\endcsname \rmisbold
%
\def\sectionlevel{#2}%
\def\temptype{#3}%
%
% Insert first mark before the heading break (see notes for \domark).
\let\prevsectiondefs=\lastsectiondefs
\ifx\temptype\Ynothingkeyword
\ifx\sectionlevel\seckeyword
\gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}%
\gdef\thissection{\thissectionname}}%
\fi
\else\ifx\temptype\Yomitfromtockeyword
% Don't redefine \thissection.
\else\ifx\temptype\Yappendixkeyword
\ifx\sectionlevel\seckeyword
\toks0={#1}%
\xdef\lastsectiondefs{%
\gdef\noexpand\thissectionname{\the\toks0}%
\gdef\noexpand\thissectionnum{#4}%
% \noexpand\putwordSection avoids expanding indigestible
% commands in some of the translations.
\gdef\noexpand\thissection{\noexpand\putwordSection{}
\noexpand\thissectionnum:
\noexpand\thissectionname}%
}%
\fi
\else
\ifx\sectionlevel\seckeyword
\toks0={#1}%
\xdef\lastsectiondefs{%
\gdef\noexpand\thissectionname{\the\toks0}%
\gdef\noexpand\thissectionnum{#4}%
% \noexpand\putwordSection avoids expanding indigestible
% commands in some of the translations.
\gdef\noexpand\thissection{\noexpand\putwordSection{}
\noexpand\thissectionnum:
\noexpand\thissectionname}%
}%
\fi
\fi\fi\fi
%
% Go into vertical mode. Usually we'll already be there, but we
% don't want the following whatsit to end up in a preceding paragraph
% if the document didn't happen to have a blank line.
\par
%
% Output the mark. Pass it through \safewhatsit, to take care of
% the preceding space.
\safewhatsit\domark
%
% Insert space above the heading.
\csname #2headingbreak\endcsname
%
% Now the second mark, after the heading break. No break points
% between here and the heading.
\let\prevsectiondefs=\lastsectiondefs
\domark
%
% Only insert the space after the number if we have a section number.
\ifx\temptype\Ynothingkeyword
\setbox0 = \hbox{}%
\def\toctype{unn}%
\gdef\lastsection{#1}%
\else\ifx\temptype\Yomitfromtockeyword
% for @headings -- no section number, don't include in toc,
% and don't redefine \lastsection.
\setbox0 = \hbox{}%
\def\toctype{omit}%
\let\sectionlevel=\empty
\else\ifx\temptype\Yappendixkeyword
\setbox0 = \hbox{#4\enspace}%
\def\toctype{app}%
\gdef\lastsection{#1}%
\else
\setbox0 = \hbox{#4\enspace}%
\def\toctype{num}%
\gdef\lastsection{#1}%
\fi\fi\fi
%
% Write the toc entry (before \donoderef). See comments in \chapmacro.
\writetocentry{\toctype\sectionlevel}{#1}{#4}%
%
% Write the node reference (= pdf destination for pdftex).
% Again, see comments in \chapmacro.
\donoderef{#3}%
%
% Interline glue will be inserted when the vbox is completed.
% That glue will be a valid breakpoint for the page, since it'll be
% preceded by a whatsit (usually from the \donoderef, or from the
% \writetocentry if there was no node). We don't want to allow that
% break, since then the whatsits could end up on page n while the
% section is on page n+1, thus toc/etc. are wrong. Debian bug 276000.
\nobreak
%
% Output the actual section heading.
\vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
\hangindent=\wd0 % zero if no section number
\unhbox0 #1}%
}%
% Add extra space after the heading -- half of whatever came above it.
% Don't allow stretch, though.
\kern .5 \csname #2headingskip\endcsname
%
% Do not let the kern be a potential breakpoint, as it would be if it
% was followed by glue.
\nobreak
%
% We'll almost certainly start a paragraph next, so don't let that
% glue accumulate. (Not a breakpoint because it's preceded by a
% discardable item.) However, when a paragraph is not started next
% (\startdefun, \cartouche, \center, etc.), this needs to be wiped out
% or the negative glue will cause weirdly wrong output, typically
% obscuring the section heading with something else.
\vskip-\parskip
%
% This is so the last item on the main vertical list is a known
% \penalty > 10000, so \startdefun, etc., can recognize the situation
% and do the needful.
\penalty 10001
}
\message{toc,}
% Table of contents.
\newwrite\tocfile
% Write an entry to the toc file, opening it if necessary.
% Called from @chapter, etc.
%
% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno}
% We append the current node name (if any) and page number as additional
% arguments for the \{chap,sec,...}entry macros which will eventually
% read this. The node name is used in the pdf outlines as the
% destination to jump to.
%
% We open the .toc file for writing here instead of at @setfilename (or
% any other fixed time) so that @contents can be anywhere in the document.
% But if #1 is `omit', then we don't do anything. This is used for the
% table of contents chapter openings themselves.
%
\newif\iftocfileopened
\def\omitkeyword{omit}%
%
\def\writetocentry#1#2#3{%
\edef\writetoctype{#1}%
\ifx\writetoctype\omitkeyword \else
\iftocfileopened\else
\immediate\openout\tocfile = \jobname.toc
\global\tocfileopenedtrue
\fi
%
\iflinks
{\atdummies
\edef\temp{%
\write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}%
\temp
}%
\fi
\fi
%
% Tell \shipout to create a pdf destination on each page, if we're
% writing pdf. These are used in the table of contents. We can't
% just write one on every page because the title pages are numbered
% 1 and 2 (the page numbers aren't printed), and so are the first
% two pages of the document. Thus, we'd have two destinations named
% `1', and two named `2'.
\ifpdf \global\pdfmakepagedesttrue \fi
}
% These characters do not print properly in the Computer Modern roman
% fonts, so we must take special care. This is more or less redundant
% with the Texinfo input format setup at the end of this file.
%
\def\activecatcodes{%
\catcode`\"=\active
\catcode`\$=\active
\catcode`\<=\active
\catcode`\>=\active
\catcode`\\=\active
\catcode`\^=\active
\catcode`\_=\active
\catcode`\|=\active
\catcode`\~=\active
}
% Read the toc file, which is essentially Texinfo input.
\def\readtocfile{%
\setupdatafile
\activecatcodes
\input \tocreadfilename
}
\newskip\contentsrightmargin \contentsrightmargin=1in
\newcount\savepageno
\newcount\lastnegativepageno \lastnegativepageno = -1
% Prepare to read what we've written to \tocfile.
%
\def\startcontents#1{%
% If @setchapternewpage on, and @headings double, the contents should
% start on an odd page, unlike chapters. Thus, we maintain
% \contentsalignmacro in parallel with \pagealignmacro.
% From: Torbjorn Granlund
\contentsalignmacro
\immediate\closeout\tocfile
%
% Don't need to put `Contents' or `Short Contents' in the headline.
% It is abundantly clear what they are.
\chapmacro{#1}{Yomitfromtoc}{}%
%
\savepageno = \pageno
\begingroup % Set up to handle contents files properly.
\raggedbottom % Worry more about breakpoints than the bottom.
\advance\hsize by -\contentsrightmargin % Don't use the full line length.
%
% Roman numerals for page numbers.
\ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
}
% redefined for the two-volume lispref. We always output on
% \jobname.toc even if this is redefined.
%
\def\tocreadfilename{\jobname.toc}
% Normal (long) toc.
%
\def\contents{%
\startcontents{\putwordTOC}%
\openin 1 \tocreadfilename\space
\ifeof 1 \else
\readtocfile
\fi
\vfill \eject
\contentsalignmacro % in case @setchapternewpage odd is in effect
\ifeof 1 \else
\pdfmakeoutlines
\fi
\closein 1
\endgroup
\lastnegativepageno = \pageno
\global\pageno = \savepageno
}
% And just the chapters.
\def\summarycontents{%
\startcontents{\putwordShortTOC}%
%
\let\partentry = \shortpartentry
\let\numchapentry = \shortchapentry
\let\appentry = \shortchapentry
\let\unnchapentry = \shortunnchapentry
% We want a true roman here for the page numbers.
\secfonts
\let\rm=\shortcontrm \let\bf=\shortcontbf
\let\sl=\shortcontsl \let\tt=\shortconttt
\rm
\hyphenpenalty = 10000
\advance\baselineskip by 1pt % Open it up a little.
\def\numsecentry##1##2##3##4{}
\let\appsecentry = \numsecentry
\let\unnsecentry = \numsecentry
\let\numsubsecentry = \numsecentry
\let\appsubsecentry = \numsecentry
\let\unnsubsecentry = \numsecentry
\let\numsubsubsecentry = \numsecentry
\let\appsubsubsecentry = \numsecentry
\let\unnsubsubsecentry = \numsecentry
\openin 1 \tocreadfilename\space
\ifeof 1 \else
\readtocfile
\fi
\closein 1
\vfill \eject
\contentsalignmacro % in case @setchapternewpage odd is in effect
\endgroup
\lastnegativepageno = \pageno
\global\pageno = \savepageno
}
\let\shortcontents = \summarycontents
% Typeset the label for a chapter or appendix for the short contents.
% The arg is, e.g., `A' for an appendix, or `3' for a chapter.
%
\def\shortchaplabel#1{%
% This space should be enough, since a single number is .5em, and the
% widest letter (M) is 1em, at least in the Computer Modern fonts.
% But use \hss just in case.
% (This space doesn't include the extra space that gets added after
% the label; that gets put in by \shortchapentry above.)
%
% We'd like to right-justify chapter numbers, but that looks strange
% with appendix letters. And right-justifying numbers and
% left-justifying letters looks strange when there is less than 10
% chapters. Have to read the whole toc once to know how many chapters
% there are before deciding ...
\hbox to 1em{#1\hss}%
}
% These macros generate individual entries in the table of contents.
% The first argument is the chapter or section name.
% The last argument is the page number.
% The arguments in between are the chapter number, section number, ...
% Parts, in the main contents. Replace the part number, which doesn't
% exist, with an empty box. Let's hope all the numbers have the same width.
% Also ignore the page number, which is conventionally not printed.
\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}}
\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}}
%
% Parts, in the short toc.
\def\shortpartentry#1#2#3#4{%
\penalty-300
\vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip
\shortchapentry{{\bf #1}}{\numeralbox}{}{}%
}
% Chapters, in the main contents.
\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
%
% Chapters, in the short toc.
% See comments in \dochapentry re vbox and related settings.
\def\shortchapentry#1#2#3#4{%
\tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}%
}
% Appendices, in the main contents.
% Need the word Appendix, and a fixed-size box.
%
\def\appendixbox#1{%
% We use M since it's probably the widest letter.
\setbox0 = \hbox{\putwordAppendix{} M}%
\hbox to \wd0{\putwordAppendix{} #1\hss}}
%
\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}}
% Unnumbered chapters.
\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}}
% Sections.
\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}}
\let\appsecentry=\numsecentry
\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}}
% Subsections.
\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}}
\let\appsubsecentry=\numsubsecentry
\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
% And subsubsections.
\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}}
\let\appsubsubsecentry=\numsubsubsecentry
\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}}
% This parameter controls the indentation of the various levels.
% Same as \defaultparindent.
\newdimen\tocindent \tocindent = 15pt
% Now for the actual typesetting. In all these, #1 is the text and #2 is the
% page number.
%
% If the toc has to be broken over pages, we want it to be at chapters
% if at all possible; hence the \penalty.
\def\dochapentry#1#2{%
\penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
\begingroup
\chapentryfonts
\tocentry{#1}{\dopageno\bgroup#2\egroup}%
\endgroup
\nobreak\vskip .25\baselineskip plus.1\baselineskip
}
\def\dosecentry#1#2{\begingroup
\secentryfonts \leftskip=\tocindent
\tocentry{#1}{\dopageno\bgroup#2\egroup}%
\endgroup}
\def\dosubsecentry#1#2{\begingroup
\subsecentryfonts \leftskip=2\tocindent
\tocentry{#1}{\dopageno\bgroup#2\egroup}%
\endgroup}
\def\dosubsubsecentry#1#2{\begingroup
\subsubsecentryfonts \leftskip=3\tocindent
\tocentry{#1}{\dopageno\bgroup#2\egroup}%
\endgroup}
% We use the same \entry macro as for the index entries.
\let\tocentry = \entry
% Space between chapter (or whatever) number and the title.
\def\labelspace{\hskip1em \relax}
\def\dopageno#1{{\rm #1}}
\def\doshortpageno#1{{\rm #1}}
\def\chapentryfonts{\secfonts \rm}
\def\secentryfonts{\textfonts}
\def\subsecentryfonts{\textfonts}
\def\subsubsecentryfonts{\textfonts}
\message{environments,}
% @foo ... @end foo.
% @tex ... @end tex escapes into raw TeX temporarily.
% One exception: @ is still an escape character, so that @end tex works.
% But \@ or @@ will get a plain @ character.
\envdef\tex{%
\setupmarkupstyle{tex}%
\catcode `\\=0 \catcode `\{=1 \catcode `\}=2
\catcode `\$=3 \catcode `\&=4 \catcode `\#=6
\catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
\catcode `\%=14
\catcode `\+=\other
\catcode `\"=\other
\catcode `\|=\other
\catcode `\<=\other
\catcode `\>=\other
\catcode`\`=\other
\catcode`\'=\other
\escapechar=`\\
%
% ' is active in math mode (mathcode"8000). So reset it, and all our
% other math active characters (just in case), to plain's definitions.
\mathactive
%
\let\b=\ptexb
\let\bullet=\ptexbullet
\let\c=\ptexc
\let\,=\ptexcomma
\let\.=\ptexdot
\let\dots=\ptexdots
\let\equiv=\ptexequiv
\let\!=\ptexexclam
\let\i=\ptexi
\let\indent=\ptexindent
\let\noindent=\ptexnoindent
\let\{=\ptexlbrace
\let\+=\tabalign
\let\}=\ptexrbrace
\let\/=\ptexslash
\let\*=\ptexstar
\let\t=\ptext
\expandafter \let\csname top\endcsname=\ptextop % outer
\let\frenchspacing=\plainfrenchspacing
%
\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
\def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
\def\@{@}%
}
% There is no need to define \Etex.
% Define @lisp ... @end lisp.
% @lisp environment forms a group so it can rebind things,
% including the definition of @end lisp (which normally is erroneous).
% Amount to narrow the margins by for @lisp.
\newskip\lispnarrowing \lispnarrowing=0.4in
% This is the definition that ^^M gets inside @lisp, @example, and other
% such environments. \null is better than a space, since it doesn't
% have any width.
\def\lisppar{\null\endgraf}
% This space is always present above and below environments.
\newskip\envskipamount \envskipamount = 0pt
% Make spacing and below environment symmetrical. We use \parskip here
% to help in doing that, since in @example-like environments \parskip
% is reset to zero; thus the \afterenvbreak inserts no space -- but the
% start of the next paragraph will insert \parskip.
%
\def\aboveenvbreak{{%
% =10000 instead of <10000 because of a special case in \itemzzz and
% \sectionheading, q.v.
\ifnum \lastpenalty=10000 \else
\advance\envskipamount by \parskip
\endgraf
\ifdim\lastskip<\envskipamount
\removelastskip
% it's not a good place to break if the last penalty was \nobreak
% or better ...
\ifnum\lastpenalty<10000 \penalty-50 \fi
\vskip\envskipamount
\fi
\fi
}}
\let\afterenvbreak = \aboveenvbreak
% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
% also clear it, so that its embedded environments do the narrowing again.
\let\nonarrowing=\relax
% @cartouche ... @end cartouche: draw rectangle w/rounded corners around
% environment contents.
\font\circle=lcircle10
\newdimen\circthick
\newdimen\cartouter\newdimen\cartinner
\newskip\normbskip\newskip\normpskip\newskip\normlskip
\circthick=\fontdimen8\circle
%
\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
\def\ctr{{\hskip 6pt\circle\char'010}}
\def\cbl{{\circle\char'012\hskip -6pt}}
\def\cbr{{\hskip 6pt\circle\char'011}}
\def\carttop{\hbox to \cartouter{\hskip\lskip
\ctl\leaders\hrule height\circthick\hfil\ctr
\hskip\rskip}}
\def\cartbot{\hbox to \cartouter{\hskip\lskip
\cbl\leaders\hrule height\circthick\hfil\cbr
\hskip\rskip}}
%
\newskip\lskip\newskip\rskip
\envdef\cartouche{%
\ifhmode\par\fi % can't be in the midst of a paragraph.
\startsavinginserts
\lskip=\leftskip \rskip=\rightskip
\leftskip=0pt\rightskip=0pt % we want these *outside*.
\cartinner=\hsize \advance\cartinner by-\lskip
\advance\cartinner by-\rskip
\cartouter=\hsize
\advance\cartouter by 18.4pt % allow for 3pt kerns on either
% side, and for 6pt waste from
% each corner char, and rule thickness
\normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
% Flag to tell @lisp, etc., not to narrow margin.
\let\nonarrowing = t%
%
% If this cartouche directly follows a sectioning command, we need the
% \parskip glue (backspaced over by default) or the cartouche can
% collide with the section heading.
\ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi
%
\vbox\bgroup
\baselineskip=0pt\parskip=0pt\lineskip=0pt
\carttop
\hbox\bgroup
\hskip\lskip
\vrule\kern3pt
\vbox\bgroup
\kern3pt
\hsize=\cartinner
\baselineskip=\normbskip
\lineskip=\normlskip
\parskip=\normpskip
\vskip -\parskip
\comment % For explanation, see the end of def\group.
}
\def\Ecartouche{%
\ifhmode\par\fi
\kern3pt
\egroup
\kern3pt\vrule
\hskip\rskip
\egroup
\cartbot
\egroup
\checkinserts
}
% This macro is called at the beginning of all the @example variants,
% inside a group.
\newdimen\nonfillparindent
\def\nonfillstart{%
\aboveenvbreak
\hfuzz = 12pt % Don't be fussy
\sepspaces % Make spaces be word-separators rather than space tokens.
\let\par = \lisppar % don't ignore blank lines
\obeylines % each line of input is a line of output
\parskip = 0pt
% Turn off paragraph indentation but redefine \indent to emulate
% the normal \indent.
\nonfillparindent=\parindent
\parindent = 0pt
\let\indent\nonfillindent
%
\emergencystretch = 0pt % don't try to avoid overfull boxes
\ifx\nonarrowing\relax
\advance \leftskip by \lispnarrowing
\exdentamount=\lispnarrowing
\else
\let\nonarrowing = \relax
\fi
\let\exdent=\nofillexdent
}
\begingroup
\obeyspaces
% We want to swallow spaces (but not other tokens) after the fake
% @indent in our nonfill-environments, where spaces are normally
% active and set to @tie, resulting in them not being ignored after
% @indent.
\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}%
\gdef\nonfillindentcheck{%
\ifx\temp %
\expandafter\nonfillindentgobble%
\else%
\leavevmode\nonfillindentbox%
\fi%
}%
\endgroup
\def\nonfillindentgobble#1{\nonfillindent}
\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}}
% If you want all examples etc. small: @set dispenvsize small.
% If you want even small examples the full size: @set dispenvsize nosmall.
% This affects the following displayed environments:
% @example, @display, @format, @lisp
%
\def\smallword{small}
\def\nosmallword{nosmall}
\let\SETdispenvsize\relax
\def\setnormaldispenv{%
\ifx\SETdispenvsize\smallword
% end paragraph for sake of leading, in case document has no blank
% line. This is redundant with what happens in \aboveenvbreak, but
% we need to do it before changing the fonts, and it's inconvenient
% to change the fonts afterward.
\ifnum \lastpenalty=10000 \else \endgraf \fi
\smallexamplefonts \rm
\fi
}
\def\setsmalldispenv{%
\ifx\SETdispenvsize\nosmallword
\else
\ifnum \lastpenalty=10000 \else \endgraf \fi
\smallexamplefonts \rm
\fi
}
% We often define two environments, @foo and @smallfoo.
% Let's do it in one command. #1 is the env name, #2 the definition.
\def\makedispenvdef#1#2{%
\expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}%
\expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}%
\expandafter\let\csname E#1\endcsname \afterenvbreak
\expandafter\let\csname Esmall#1\endcsname \afterenvbreak
}
% Define two environment synonyms (#1 and #2) for an environment.
\def\maketwodispenvdef#1#2#3{%
\makedispenvdef{#1}{#3}%
\makedispenvdef{#2}{#3}%
}
%
% @lisp: indented, narrowed, typewriter font;
% @example: same as @lisp.
%
% @smallexample and @smalllisp: use smaller fonts.
% Originally contributed by Pavel@xerox.
%
\maketwodispenvdef{lisp}{example}{%
\nonfillstart
\tt\setupmarkupstyle{example}%
\let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
\gobble % eat return
}
% @display/@smalldisplay: same as @lisp except keep current font.
%
\makedispenvdef{display}{%
\nonfillstart
\gobble
}
% @format/@smallformat: same as @display except don't narrow margins.
%
\makedispenvdef{format}{%
\let\nonarrowing = t%
\nonfillstart
\gobble
}
% @flushleft: same as @format, but doesn't obey \SETdispenvsize.
\envdef\flushleft{%
\let\nonarrowing = t%
\nonfillstart
\gobble
}
\let\Eflushleft = \afterenvbreak
% @flushright.
%
\envdef\flushright{%
\let\nonarrowing = t%
\nonfillstart
\advance\leftskip by 0pt plus 1fill\relax
\gobble
}
\let\Eflushright = \afterenvbreak
% @raggedright does more-or-less normal line breaking but no right
% justification. From plain.tex.
\envdef\raggedright{%
\rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax
}
\let\Eraggedright\par
\envdef\raggedleft{%
\parindent=0pt \leftskip0pt plus2em
\spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
\hbadness=10000 % Last line will usually be underfull, so turn off
% badness reporting.
}
\let\Eraggedleft\par
\envdef\raggedcenter{%
\parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em
\spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
\hbadness=10000 % Last line will usually be underfull, so turn off
% badness reporting.
}
\let\Eraggedcenter\par
% @quotation does normal linebreaking (hence we can't use \nonfillstart)
% and narrows the margins. We keep \parskip nonzero in general, since
% we're doing normal filling. So, when using \aboveenvbreak and
% \afterenvbreak, temporarily make \parskip 0.
%
\makedispenvdef{quotation}{\quotationstart}
%
\def\quotationstart{%
\indentedblockstart % same as \indentedblock, but increase right margin too.
\ifx\nonarrowing\relax
\advance\rightskip by \lispnarrowing
\fi
\parsearg\quotationlabel
}
% We have retained a nonzero parskip for the environment, since we're
% doing normal filling.
%
\def\Equotation{%
\par
\ifx\quotationauthor\thisisundefined\else
% indent a bit.
\leftline{\kern 2\leftskip \sl ---\quotationauthor}%
\fi
{\parskip=0pt \afterenvbreak}%
}
\def\Esmallquotation{\Equotation}
% If we're given an argument, typeset it in bold with a colon after.
\def\quotationlabel#1{%
\def\temp{#1}%
\ifx\temp\empty \else
{\bf #1: }%
\fi
}
% @indentedblock is like @quotation, but indents only on the left and
% has no optional argument.
%
\makedispenvdef{indentedblock}{\indentedblockstart}
%
\def\indentedblockstart{%
{\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
\parindent=0pt
%
% @cartouche defines \nonarrowing to inhibit narrowing at next level down.
\ifx\nonarrowing\relax
\advance\leftskip by \lispnarrowing
\exdentamount = \lispnarrowing
\else
\let\nonarrowing = \relax
\fi
}
% Keep a nonzero parskip for the environment, since we're doing normal filling.
%
\def\Eindentedblock{%
\par
{\parskip=0pt \afterenvbreak}%
}
\def\Esmallindentedblock{\Eindentedblock}
% LaTeX-like @verbatim...@end verbatim and @verb{...}
% If we want to allow any as delimiter,
% we need the curly braces so that makeinfo sees the @verb command, eg:
% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org
%
% [Knuth]: Donald Ervin Knuth, 1996. The TeXbook.
%
% [Knuth] p.344; only we need to do the other characters Texinfo sets
% active too. Otherwise, they get lost as the first character on a
% verbatim line.
\def\dospecials{%
\do\ \do\\\do\{\do\}\do\$\do\&%
\do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~%
\do\<\do\>\do\|\do\@\do+\do\"%
% Don't do the quotes -- if we do, @set txicodequoteundirected and
% @set txicodequotebacktick will not have effect on @verb and
% @verbatim, and ?` and !` ligatures won't get disabled.
%\do\`\do\'%
}
%
% [Knuth] p. 380
\def\uncatcodespecials{%
\def\do##1{\catcode`##1=\other}\dospecials}
%
% Setup for the @verb command.
%
% Eight spaces for a tab
\begingroup
\catcode`\^^I=\active
\gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }}
\endgroup
%
\def\setupverb{%
\tt % easiest (and conventionally used) font for verbatim
\def\par{\leavevmode\endgraf}%
\setupmarkupstyle{verb}%
\tabeightspaces
% Respect line breaks,
% print special symbols as themselves, and
% make each space count
% must do in this order:
\obeylines \uncatcodespecials \sepspaces
}
% Setup for the @verbatim environment
%
% Real tab expansion.
\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
%
% We typeset each line of the verbatim in an \hbox, so we can handle
% tabs. The \global is in case the verbatim line starts with an accent,
% or some other command that starts with a begin-group. Otherwise, the
% entire \verbbox would disappear at the corresponding end-group, before
% it is typeset. Meanwhile, we can't have nested verbatim commands
% (can we?), so the \global won't be overwriting itself.
\newbox\verbbox
\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup}
%
\begingroup
\catcode`\^^I=\active
\gdef\tabexpand{%
\catcode`\^^I=\active
\def^^I{\leavevmode\egroup
\dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab
\divide\dimen\verbbox by\tabw
\multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw
\advance\dimen\verbbox by\tabw % advance to next multiple of \tabw
\wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox
}%
}
\endgroup
% start the verbatim environment.
\def\setupverbatim{%
\let\nonarrowing = t%
\nonfillstart
\tt % easiest (and conventionally used) font for verbatim
% The \leavevmode here is for blank lines. Otherwise, we would
% never \starttabox and the \egroup would end verbatim mode.
\def\par{\leavevmode\egroup\box\verbbox\endgraf}%
\tabexpand
\setupmarkupstyle{verbatim}%
% Respect line breaks,
% print special symbols as themselves, and
% make each space count.
% Must do in this order:
\obeylines \uncatcodespecials \sepspaces
\everypar{\starttabbox}%
}
% Do the @verb magic: verbatim text is quoted by unique
% delimiter characters. Before first delimiter expect a
% right brace, after last delimiter expect closing brace:
%
% \def\doverb'{'#1'}'{#1}
%
% [Knuth] p. 382; only eat outer {}
\begingroup
\catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other
\gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next]
\endgroup
%
\def\verb{\begingroup\setupverb\doverb}
%
%
% Do the @verbatim magic: define the macro \doverbatim so that
% the (first) argument ends when '@end verbatim' is reached, ie:
%
% \def\doverbatim#1@end verbatim{#1}
%
% For Texinfo it's a lot easier than for LaTeX,
% because texinfo's \verbatim doesn't stop at '\end{verbatim}':
% we need not redefine '\', '{' and '}'.
%
% Inspired by LaTeX's verbatim command set [latex.ltx]
%
\begingroup
\catcode`\ =\active
\obeylines %
% ignore everything up to the first ^^M, that's the newline at the end
% of the @verbatim input line itself. Otherwise we get an extra blank
% line in the output.
\xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}%
% We really want {...\end verbatim} in the body of the macro, but
% without the active space; thus we have to use \xdef and \gobble.
\endgroup
%
\envdef\verbatim{%
\setupverbatim\doverbatim
}
\let\Everbatim = \afterenvbreak
% @verbatiminclude FILE - insert text of file in verbatim environment.
%
\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude}
%
\def\doverbatiminclude#1{%
{%
\makevalueexpandable
\setupverbatim
\indexnofonts % Allow `@@' and other weird things in file names.
\wlog{texinfo.tex: doing @verbatiminclude of #1^^J}%
\input #1
\afterenvbreak
}%
}
% @copying ... @end copying.
% Save the text away for @insertcopying later.
%
% We save the uninterpreted tokens, rather than creating a box.
% Saving the text in a box would be much easier, but then all the
% typesetting commands (@smallbook, font changes, etc.) have to be done
% beforehand -- and a) we want @copying to be done first in the source
% file; b) letting users define the frontmatter in as flexible order as
% possible is very desirable.
%
\def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
%
\def\insertcopying{%
\begingroup
\parindent = 0pt % paragraph indentation looks wrong on title page
\scanexp\copyingtext
\endgroup
}
\message{defuns,}
% @defun etc.
\newskip\defbodyindent \defbodyindent=.4in
\newskip\defargsindent \defargsindent=50pt
\newskip\deflastargmargin \deflastargmargin=18pt
\newcount\defunpenalty
% Start the processing of @deffn:
\def\startdefun{%
\ifnum\lastpenalty<10000
\medbreak
\defunpenalty=10003 % Will keep this @deffn together with the
% following @def command, see below.
\else
% If there are two @def commands in a row, we'll have a \nobreak,
% which is there to keep the function description together with its
% header. But if there's nothing but headers, we need to allow a
% break somewhere. Check specifically for penalty 10002, inserted
% by \printdefunline, instead of 10000, since the sectioning
% commands also insert a nobreak penalty, and we don't want to allow
% a break between a section heading and a defun.
%
% As a further refinement, we avoid "club" headers by signalling
% with penalty of 10003 after the very first @deffn in the
% sequence (see above), and penalty of 10002 after any following
% @def command.
\ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi
%
% Similarly, after a section heading, do not allow a break.
% But do insert the glue.
\medskip % preceded by discardable penalty, so not a breakpoint
\fi
%
\parindent=0in
\advance\leftskip by \defbodyindent
\exdentamount=\defbodyindent
}
\def\dodefunx#1{%
% First, check whether we are in the right environment:
\checkenv#1%
%
% As above, allow line break if we have multiple x headers in a row.
% It's not a great place, though.
\ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi
%
% And now, it's time to reuse the body of the original defun:
\expandafter\gobbledefun#1%
}
\def\gobbledefun#1\startdefun{}
% \printdefunline \deffnheader{text}
%
\def\printdefunline#1#2{%
\begingroup
% call \deffnheader:
#1#2 \endheader
% common ending:
\interlinepenalty = 10000
\advance\rightskip by 0pt plus 1fil\relax
\endgraf
\nobreak\vskip -\parskip
\penalty\defunpenalty % signal to \startdefun and \dodefunx
% Some of the @defun-type tags do not enable magic parentheses,
% rendering the following check redundant. But we don't optimize.
\checkparencounts
\endgroup
}
\def\Edefun{\endgraf\medbreak}
% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
% the only thing remaining is to define \deffnheader.
%
\def\makedefun#1{%
\expandafter\let\csname E#1\endcsname = \Edefun
\edef\temp{\noexpand\domakedefun
\makecsname{#1}\makecsname{#1x}\makecsname{#1header}}%
\temp
}
% \domakedefun \deffn \deffnx \deffnheader
%
% Define \deffn and \deffnx, without parameters.
% \deffnheader has to be defined explicitly.
%
\def\domakedefun#1#2#3{%
\envdef#1{%
\startdefun
\doingtypefnfalse % distinguish typed functions from all else
\parseargusing\activeparens{\printdefunline#3}%
}%
\def#2{\dodefunx#1}%
\def#3%
}
\newif\ifdoingtypefn % doing typed function?
\newif\ifrettypeownline % typeset return type on its own line?
% @deftypefnnewline on|off says whether the return type of typed functions
% are printed on their own line. This affects @deftypefn, @deftypefun,
% @deftypeop, and @deftypemethod.
%
\parseargdef\deftypefnnewline{%
\def\temp{#1}%
\ifx\temp\onword
\expandafter\let\csname SETtxideftypefnnl\endcsname
= \empty
\else\ifx\temp\offword
\expandafter\let\csname SETtxideftypefnnl\endcsname
= \relax
\else
\errhelp = \EMsimple
\errmessage{Unknown @txideftypefnnl value `\temp',
must be on|off}%
\fi\fi
}
% Untyped functions:
% @deffn category name args
\makedefun{deffn}{\deffngeneral{}}
% @deffn category class name args
\makedefun{defop}#1 {\defopon{#1\ \putwordon}}
% \defopon {category on}class name args
\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
% \deffngeneral {subind}category name args
%
\def\deffngeneral#1#2 #3 #4\endheader{%
% Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}.
\dosubind{fn}{\code{#3}}{#1}%
\defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
}
% Typed functions:
% @deftypefn category type name args
\makedefun{deftypefn}{\deftypefngeneral{}}
% @deftypeop category class type name args
\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}}
% \deftypeopon {category on}class type name args
\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
% \deftypefngeneral {subind}category type name args
%
\def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
\dosubind{fn}{\code{#4}}{#1}%
\doingtypefntrue
\defname{#2}{#3}{#4}\defunargs{#5\unskip}%
}
% Typed variables:
% @deftypevr category type var args
\makedefun{deftypevr}{\deftypecvgeneral{}}
% @deftypecv category class type var args
\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}}
% \deftypecvof {category of}class type var args
\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} }
% \deftypecvgeneral {subind}category type var args
%
\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{%
\dosubind{vr}{\code{#4}}{#1}%
\defname{#2}{#3}{#4}\defunargs{#5\unskip}%
}
% Untyped variables:
% @defvr category var args
\makedefun{defvr}#1 {\deftypevrheader{#1} {} }
% @defcv category class var args
\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}}
% \defcvof {category of}class var args
\def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
% Types:
% @deftp category name args
\makedefun{deftp}#1 #2 #3\endheader{%
\doind{tp}{\code{#2}}%
\defname{#1}{}{#2}\defunargs{#3\unskip}%
}
% Remaining @defun-like shortcuts:
\makedefun{defun}{\deffnheader{\putwordDeffunc} }
\makedefun{defmac}{\deffnheader{\putwordDefmac} }
\makedefun{defspec}{\deffnheader{\putwordDefspec} }
\makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} }
\makedefun{defvar}{\defvrheader{\putwordDefvar} }
\makedefun{defopt}{\defvrheader{\putwordDefopt} }
\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} }
\makedefun{defmethod}{\defopon\putwordMethodon}
\makedefun{deftypemethod}{\deftypeopon\putwordMethodon}
\makedefun{defivar}{\defcvof\putwordInstanceVariableof}
\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof}
% \defname, which formats the name of the @def (not the args).
% #1 is the category, such as "Function".
% #2 is the return type, if any.
% #3 is the function name.
%
% We are followed by (but not passed) the arguments, if any.
%
\def\defname#1#2#3{%
\par
% Get the values of \leftskip and \rightskip as they were outside the @def...
\advance\leftskip by -\defbodyindent
%
% Determine if we are typesetting the return type of a typed function
% on a line by itself.
\rettypeownlinefalse
\ifdoingtypefn % doing a typed function specifically?
% then check user option for putting return type on its own line:
\expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else
\rettypeownlinetrue
\fi
\fi
%
% How we'll format the category name. Putting it in brackets helps
% distinguish it from the body text that may end up on the next line
% just below it.
\def\temp{#1}%
\setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
%
% Figure out line sizes for the paragraph shape. We'll always have at
% least two.
\tempnum = 2
%
% The first line needs space for \box0; but if \rightskip is nonzero,
% we need only space for the part of \box0 which exceeds it:
\dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip
%
% If doing a return type on its own line, we'll have another line.
\ifrettypeownline
\advance\tempnum by 1
\def\maybeshapeline{0in \hsize}%
\else
\def\maybeshapeline{}%
\fi
%
% The continuations:
\dimen2=\hsize \advance\dimen2 by -\defargsindent
%
% The final paragraph shape:
\parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2
%
% Put the category name at the right margin.
\noindent
\hbox to 0pt{%
\hfil\box0 \kern-\hsize
% \hsize has to be shortened this way:
\kern\leftskip
% Intentionally do not respect \rightskip, since we need the space.
}%
%
% Allow all lines to be underfull without complaint:
\tolerance=10000 \hbadness=10000
\exdentamount=\defbodyindent
{%
% defun fonts. We use typewriter by default (used to be bold) because:
% . we're printing identifiers, they should be in tt in principle.
% . in languages with many accents, such as Czech or French, it's
% common to leave accents off identifiers. The result looks ok in
% tt, but exceedingly strange in rm.
% . we don't want -- and --- to be treated as ligatures.
% . this still does not fix the ?` and !` ligatures, but so far no
% one has made identifiers using them :).
\df \tt
\def\temp{#2}% text of the return type
\ifx\temp\empty\else
\tclose{\temp}% typeset the return type
\ifrettypeownline
% put return type on its own line; prohibit line break following:
\hfil\vadjust{\nobreak}\break
\else
\space % type on same line, so just followed by a space
\fi
\fi % no return type
#3% output function name
}%
{\rm\enskip}% hskip 0.5 em of \tenrm
%
\boldbrax
% arguments will be output next, if any.
}
% Print arguments in slanted roman (not ttsl), inconsistently with using
% tt for the name. This is because literal text is sometimes needed in
% the argument list (groff manual), and ttsl and tt are not very
% distinguishable. Prevent hyphenation at `-' chars.
%
\def\defunargs#1{%
% use sl by default (not ttsl),
% tt for the names.
\df \sl \hyphenchar\font=0
%
% On the other hand, if an argument has two dashes (for instance), we
% want a way to get ttsl. We used to recommend @var for that, so
% leave the code in, but it's strange for @var to lead to typewriter.
% Nowadays we recommend @code, since the difference between a ttsl hyphen
% and a tt hyphen is pretty tiny. @code also disables ?` !`.
\def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
#1%
\sl\hyphenchar\font=45
}
% We want ()&[] to print specially on the defun line.
%
\def\activeparens{%
\catcode`\(=\active \catcode`\)=\active
\catcode`\[=\active \catcode`\]=\active
\catcode`\&=\active
}
% Make control sequences which act like normal parenthesis chars.
\let\lparen = ( \let\rparen = )
% Be sure that we always have a definition for `(', etc. For example,
% if the fn name has parens in it, \boldbrax will not be in effect yet,
% so TeX would otherwise complain about undefined control sequence.
{
\activeparens
\global\let(=\lparen \global\let)=\rparen
\global\let[=\lbrack \global\let]=\rbrack
\global\let& = \&
\gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
\gdef\magicamp{\let&=\amprm}
}
\newcount\parencount
% If we encounter &foo, then turn on ()-hacking afterwards
\newif\ifampseen
\def\amprm#1 {\ampseentrue{\bf\ }}
\def\parenfont{%
\ifampseen
% At the first level, print parens in roman,
% otherwise use the default font.
\ifnum \parencount=1 \rm \fi
\else
% The \sf parens (in \boldbrax) actually are a little bolder than
% the contained text. This is especially needed for [ and ] .
\sf
\fi
}
\def\infirstlevel#1{%
\ifampseen
\ifnum\parencount=1
#1%
\fi
\fi
}
\def\bfafterword#1 {#1 \bf}
\def\opnr{%
\global\advance\parencount by 1
{\parenfont(}%
\infirstlevel \bfafterword
}
\def\clnr{%
{\parenfont)}%
\infirstlevel \sl
\global\advance\parencount by -1
}
\newcount\brackcount
\def\lbrb{%
\global\advance\brackcount by 1
{\bf[}%
}
\def\rbrb{%
{\bf]}%
\global\advance\brackcount by -1
}
\def\checkparencounts{%
\ifnum\parencount=0 \else \badparencount \fi
\ifnum\brackcount=0 \else \badbrackcount \fi
}
% these should not use \errmessage; the glibc manual, at least, actually
% has such constructs (when documenting function pointers).
\def\badparencount{%
\message{Warning: unbalanced parentheses in @def...}%
\global\parencount=0
}
\def\badbrackcount{%
\message{Warning: unbalanced square brackets in @def...}%
\global\brackcount=0
}
\message{macros,}
% @macro.
% To do this right we need a feature of e-TeX, \scantokens,
% which we arrange to emulate with a temporary file in ordinary TeX.
\ifx\eTeXversion\thisisundefined
\newwrite\macscribble
\def\scantokens#1{%
\toks0={#1}%
\immediate\openout\macscribble=\jobname.tmp
\immediate\write\macscribble{\the\toks0}%
\immediate\closeout\macscribble
\input \jobname.tmp
}
\fi
\def\scanmacro#1{\begingroup
\newlinechar`\^^M
\let\xeatspaces\eatspaces
%
% Undo catcode changes of \startcontents and \doprintindex
% When called from @insertcopying or (short)caption, we need active
% backslash to get it printed correctly. Previously, we had
% \catcode`\\=\other instead. We'll see whether a problem appears
% with macro expansion. --kasal, 19aug04
\catcode`\@=0 \catcode`\\=\active \escapechar=`\@
%
% ... and for \example:
\spaceisspace
%
% The \empty here causes a following catcode 5 newline to be eaten as
% part of reading whitespace after a control sequence. It does not
% eat a catcode 13 newline. There's no good way to handle the two
% cases (untried: maybe e-TeX's \everyeof could help, though plain TeX
% would then have different behavior). See the Macro Details node in
% the manual for the workaround we recommend for macros and
% line-oriented commands.
%
\scantokens{#1\empty}%
\endgroup}
\def\scanexp#1{%
\edef\temp{\noexpand\scanmacro{#1}}%
\temp
}
\newcount\paramno % Count of parameters
\newtoks\macname % Macro name
\newif\ifrecursive % Is it recursive?
% List of all defined macros in the form
% \definedummyword\macro1\definedummyword\macro2...
% Currently is also contains all @aliases; the list can be split
% if there is a need.
\def\macrolist{}
% Add the macro to \macrolist
\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
\def\addtomacrolistxxx#1{%
\toks0 = \expandafter{\macrolist\definedummyword#1}%
\xdef\macrolist{\the\toks0}%
}
% Utility routines.
% This does \let #1 = #2, with \csnames; that is,
% \let \csname#1\endcsname = \csname#2\endcsname
% (except of course we have to play expansion games).
%
\def\cslet#1#2{%
\expandafter\let
\csname#1\expandafter\endcsname
\csname#2\endcsname
}
% Trim leading and trailing spaces off a string.
% Concepts from aro-bend problem 15 (see CTAN).
{\catcode`\@=11
\gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }}
\gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@}
\gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @}
\def\unbrace#1{#1}
\unbrace{\gdef\trim@@@ #1 } #2@{#1}
}
% Trim a single trailing ^^M off a string.
{\catcode`\^^M=\other \catcode`\Q=3%
\gdef\eatcr #1{\eatcra #1Q^^MQ}%
\gdef\eatcra#1^^MQ{\eatcrb#1Q}%
\gdef\eatcrb#1Q#2Q{#1}%
}
% Macro bodies are absorbed as an argument in a context where
% all characters are catcode 10, 11 or 12, except \ which is active
% (as in normal texinfo). It is necessary to change the definition of \
% to recognize macro arguments; this is the job of \mbodybackslash.
%
% Non-ASCII encodings make 8-bit characters active, so un-activate
% them to avoid their expansion. Must do this non-globally, to
% confine the change to the current group.
%
% It's necessary to have hard CRs when the macro is executed. This is
% done by making ^^M (\endlinechar) catcode 12 when reading the macro
% body, and then making it the \newlinechar in \scanmacro.
%
\def\scanctxt{% used as subroutine
\catcode`\"=\other
\catcode`\+=\other
\catcode`\<=\other
\catcode`\>=\other
\catcode`\@=\other
\catcode`\^=\other
\catcode`\_=\other
\catcode`\|=\other
\catcode`\~=\other
\ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi
}
\def\scanargctxt{% used for copying and captions, not macros.
\scanctxt
\catcode`\\=\other
\catcode`\^^M=\other
}
\def\macrobodyctxt{% used for @macro definitions
\scanctxt
\catcode`\{=\other
\catcode`\}=\other
\catcode`\^^M=\other
\usembodybackslash
}
\def\macroargctxt{% used when scanning invocations
\scanctxt
\catcode`\\=0
}
% why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes"
% for the single characters \ { }. Thus, we end up with the "commands"
% that would be written @\ @{ @} in a Texinfo document.
%
% We already have @{ and @}. For @\, we define it here, and only for
% this purpose, to produce a typewriter backslash (so, the @\ that we
% define for @math can't be used with @macro calls):
%
\def\\{\normalbackslash}%
%
% We would like to do this for \, too, since that is what makeinfo does.
% But it is not possible, because Texinfo already has a command @, for a
% cedilla accent. Documents must use @comma{} instead.
%
% \anythingelse will almost certainly be an error of some kind.
% \mbodybackslash is the definition of \ in @macro bodies.
% It maps \foo\ => \csname macarg.foo\endcsname => #N
% where N is the macro parameter number.
% We define \csname macarg.\endcsname to be \realbackslash, so
% \\ in macro replacement text gets you a backslash.
%
{\catcode`@=0 @catcode`@\=@active
@gdef@usembodybackslash{@let\=@mbodybackslash}
@gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
}
\expandafter\def\csname macarg.\endcsname{\realbackslash}
\def\margbackslash#1{\char`\#1 }
\def\macro{\recursivefalse\parsearg\macroxxx}
\def\rmacro{\recursivetrue\parsearg\macroxxx}
\def\macroxxx#1{%
\getargs{#1}% now \macname is the macname and \argl the arglist
\ifx\argl\empty % no arguments
\paramno=0\relax
\else
\expandafter\parsemargdef \argl;%
\if\paramno>256\relax
\ifx\eTeXversion\thisisundefined
\errhelp = \EMsimple
\errmessage{You need eTeX to compile a file with macros with more than 256 arguments}
\fi
\fi
\fi
\if1\csname ismacro.\the\macname\endcsname
\message{Warning: redefining \the\macname}%
\else
\expandafter\ifx\csname \the\macname\endcsname \relax
\else \errmessage{Macro name \the\macname\space already defined}\fi
\global\cslet{macsave.\the\macname}{\the\macname}%
\global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
\addtomacrolist{\the\macname}%
\fi
\begingroup \macrobodyctxt
\ifrecursive \expandafter\parsermacbody
\else \expandafter\parsemacbody
\fi}
\parseargdef\unmacro{%
\if1\csname ismacro.#1\endcsname
\global\cslet{#1}{macsave.#1}%
\global\expandafter\let \csname ismacro.#1\endcsname=0%
% Remove the macro name from \macrolist:
\begingroup
\expandafter\let\csname#1\endcsname \relax
\let\definedummyword\unmacrodo
\xdef\macrolist{\macrolist}%
\endgroup
\else
\errmessage{Macro #1 not defined}%
\fi
}
% Called by \do from \dounmacro on each macro. The idea is to omit any
% macro definitions that have been changed to \relax.
%
\def\unmacrodo#1{%
\ifx #1\relax
% remove this
\else
\noexpand\definedummyword \noexpand#1%
\fi
}
% This makes use of the obscure feature that if the last token of a
% is #, then the preceding argument is delimited by
% an opening brace, and that opening brace is not consumed.
\def\getargs#1{\getargsxxx#1{}}
\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
\def\getmacname#1 #2\relax{\macname={#1}}
\def\getmacargs#1{\def\argl{#1}}
% For macro processing make @ a letter so that we can make Texinfo private macro names.
\edef\texiatcatcode{\the\catcode`\@}
\catcode `@=11\relax
% Parse the optional {params} list. Set up \paramno and \paramlist
% so \defmacro knows what to do. Define \macarg.BLAH for each BLAH
% in the params list to some hook where the argument si to be expanded. If
% there are less than 10 arguments that hook is to be replaced by ##N where N
% is the position in that list, that is to say the macro arguments are to be
% defined `a la TeX in the macro body.
%
% That gets used by \mbodybackslash (above).
%
% We need to get `macro parameter char #' into several definitions.
% The technique used is stolen from LaTeX: let \hash be something
% unexpandable, insert that wherever you need a #, and then redefine
% it to # just before using the token list produced.
%
% The same technique is used to protect \eatspaces till just before
% the macro is used.
%
% If there are 10 or more arguments, a different technique is used, where the
% hook remains in the body, and when macro is to be expanded the body is
% processed again to replace the arguments.
%
% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
% argument N value and then \edef the body (nothing else will expand because of
% the catcode regime underwhich the body was input).
%
% If you compile with TeX (not eTeX), and you have macros with 10 or more
% arguments, you need that no macro has more than 256 arguments, otherwise an
% error is produced.
\def\parsemargdef#1;{%
\paramno=0\def\paramlist{}%
\let\hash\relax
\let\xeatspaces\relax
\parsemargdefxxx#1,;,%
% In case that there are 10 or more arguments we parse again the arguments
% list to set new definitions for the \macarg.BLAH macros corresponding to
% each BLAH argument. It was anyhow needed to parse already once this list
% in order to count the arguments, and as macros with at most 9 arguments
% are by far more frequent than macro with 10 or more arguments, defining
% twice the \macarg.BLAH macros does not cost too much processing power.
\ifnum\paramno<10\relax\else
\paramno0\relax
\parsemmanyargdef@@#1,;,% 10 or more arguments
\fi
}
\def\parsemargdefxxx#1,{%
\if#1;\let\next=\relax
\else \let\next=\parsemargdefxxx
\advance\paramno by 1
\expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
{\xeatspaces{\hash\the\paramno}}%
\edef\paramlist{\paramlist\hash\the\paramno,}%
\fi\next}
\def\parsemmanyargdef@@#1,{%
\if#1;\let\next=\relax
\else
\let\next=\parsemmanyargdef@@
\edef\tempb{\eatspaces{#1}}%
\expandafter\def\expandafter\tempa
\expandafter{\csname macarg.\tempb\endcsname}%
% Note that we need some extra \noexpand\noexpand, this is because we
% don't want \the to be expanded in the \parsermacbody as it uses an
% \xdef .
\expandafter\edef\tempa
{\noexpand\noexpand\noexpand\the\toks\the\paramno}%
\advance\paramno by 1\relax
\fi\next}
% These two commands read recursive and nonrecursive macro bodies.
% (They're different since rec and nonrec macros end differently.)
%
\catcode `\@\texiatcatcode
\long\def\parsemacbody#1@end macro%
{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
\long\def\parsermacbody#1@end rmacro%
{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
\catcode `\@=11\relax
\let\endargs@\relax
\let\nil@\relax
\def\nilm@{\nil@}%
\long\def\nillm@{\nil@}%
% This macro is expanded during the Texinfo macro expansion, not during its
% definition. It gets all the arguments values and assigns them to macros
% macarg.ARGNAME
%
% #1 is the macro name
% #2 is the list of argument names
% #3 is the list of argument values
\def\getargvals@#1#2#3{%
\def\macargdeflist@{}%
\def\saveparamlist@{#2}% Need to keep a copy for parameter expansion.
\def\paramlist{#2,\nil@}%
\def\macroname{#1}%
\begingroup
\macroargctxt
\def\argvaluelist{#3,\nil@}%
\def\@tempa{#3}%
\ifx\@tempa\empty
\setemptyargvalues@
\else
\getargvals@@
\fi
}
%
\def\getargvals@@{%
\ifx\paramlist\nilm@
% Some sanity check needed here that \argvaluelist is also empty.
\ifx\argvaluelist\nillm@
\else
\errhelp = \EMsimple
\errmessage{Too many arguments in macro `\macroname'!}%
\fi
\let\next\macargexpandinbody@
\else
\ifx\argvaluelist\nillm@
% No more arguments values passed to macro. Set remaining named-arg
% macros to empty.
\let\next\setemptyargvalues@
\else
% pop current arg name into \@tempb
\def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}%
\expandafter\@tempa\expandafter{\paramlist}%
% pop current argument value into \@tempc
\def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}%
\expandafter\@tempa\expandafter{\argvaluelist}%
% Here \@tempb is the current arg name and \@tempc is the current arg value.
% First place the new argument macro definition into \@tempd
\expandafter\macname\expandafter{\@tempc}%
\expandafter\let\csname macarg.\@tempb\endcsname\relax
\expandafter\def\expandafter\@tempe\expandafter{%
\csname macarg.\@tempb\endcsname}%
\edef\@tempd{\long\def\@tempe{\the\macname}}%
\push@\@tempd\macargdeflist@
\let\next\getargvals@@
\fi
\fi
\next
}
\def\push@#1#2{%
\expandafter\expandafter\expandafter\def
\expandafter\expandafter\expandafter#2%
\expandafter\expandafter\expandafter{%
\expandafter#1#2}%
}
% Replace arguments by their values in the macro body, and place the result
% in macro \@tempa
\def\macvalstoargs@{%
% To do this we use the property that token registers that are \the'ed
% within an \edef expand only once. So we are going to place all argument
% values into respective token registers.
%
% First we save the token context, and initialize argument numbering.
\begingroup
\paramno0\relax
% Then, for each argument number #N, we place the corresponding argument
% value into a new token list register \toks#N
\expandafter\putargsintokens@\saveparamlist@,;,%
% Then, we expand the body so that argument are replaced by their
% values. The trick for values not to be expanded themselves is that they
% are within tokens and that tokens expand only once in an \edef .
\edef\@tempc{\csname mac.\macroname .body\endcsname}%
% Now we restore the token stack pointer to free the token list registers
% which we have used, but we make sure that expanded body is saved after
% group.
\expandafter
\endgroup
\expandafter\def\expandafter\@tempa\expandafter{\@tempc}%
}
\def\macargexpandinbody@{%
%% Define the named-macro outside of this group and then close this group.
\expandafter
\endgroup
\macargdeflist@
% First the replace in body the macro arguments by their values, the result
% is in \@tempa .
\macvalstoargs@
% Then we point at the \norecurse or \gobble (for recursive) macro value
% with \@tempb .
\expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname
% Depending on whether it is recursive or not, we need some tailing
% \egroup .
\ifx\@tempb\gobble
\let\@tempc\relax
\else
\let\@tempc\egroup
\fi
% And now we do the real job:
\edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}%
\@tempd
}
\def\putargsintokens@#1,{%
\if#1;\let\next\relax
\else
\let\next\putargsintokens@
% First we allocate the new token list register, and give it a temporary
% alias \@tempb .
\toksdef\@tempb\the\paramno
% Then we place the argument value into that token list register.
\expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname
\expandafter\@tempb\expandafter{\@tempa}%
\advance\paramno by 1\relax
\fi
\next
}
% Save the token stack pointer into macro #1
\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}}
% Restore the token stack pointer from number in macro #1
\def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax}
% newtoks that can be used non \outer .
\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi}
% Tailing missing arguments are set to empty
\def\setemptyargvalues@{%
\ifx\paramlist\nilm@
\let\next\macargexpandinbody@
\else
\expandafter\setemptyargvaluesparser@\paramlist\endargs@
\let\next\setemptyargvalues@
\fi
\next
}
\def\setemptyargvaluesparser@#1,#2\endargs@{%
\expandafter\def\expandafter\@tempa\expandafter{%
\expandafter\def\csname macarg.#1\endcsname{}}%
\push@\@tempa\macargdeflist@
\def\paramlist{#2}%
}
% #1 is the element target macro
% #2 is the list macro
% #3,#4\endargs@ is the list value
\def\pop@#1#2#3,#4\endargs@{%
\def#1{#3}%
\def#2{#4}%
}
\long\def\longpop@#1#2#3,#4\endargs@{%
\long\def#1{#3}%
\long\def#2{#4}%
}
% This defines a Texinfo @macro. There are eight cases: recursive and
% nonrecursive macros of zero, one, up to nine, and many arguments.
% Much magic with \expandafter here.
% \xdef is used so that macro definitions will survive the file
% they're defined in; @include reads the file inside a group.
%
\def\defmacro{%
\let\hash=##% convert placeholders to macro parameter chars
\ifrecursive
\ifcase\paramno
% 0
\expandafter\xdef\csname\the\macname\endcsname{%
\noexpand\scanmacro{\temp}}%
\or % 1
\expandafter\xdef\csname\the\macname\endcsname{%
\bgroup\noexpand\macroargctxt
\noexpand\braceorline
\expandafter\noexpand\csname\the\macname xxx\endcsname}%
\expandafter\xdef\csname\the\macname xxx\endcsname##1{%
\egroup\noexpand\scanmacro{\temp}}%
\else
\ifnum\paramno<10\relax % at most 9
\expandafter\xdef\csname\the\macname\endcsname{%
\bgroup\noexpand\macroargctxt
\noexpand\csname\the\macname xx\endcsname}%
\expandafter\xdef\csname\the\macname xx\endcsname##1{%
\expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
\expandafter\expandafter
\expandafter\xdef
\expandafter\expandafter
\csname\the\macname xxx\endcsname
\paramlist{\egroup\noexpand\scanmacro{\temp}}%
\else % 10 or more
\expandafter\xdef\csname\the\macname\endcsname{%
\noexpand\getargvals@{\the\macname}{\argl}%
}%
\global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
\global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble
\fi
\fi
\else
\ifcase\paramno
% 0
\expandafter\xdef\csname\the\macname\endcsname{%
\noexpand\norecurse{\the\macname}%
\noexpand\scanmacro{\temp}\egroup}%
\or % 1
\expandafter\xdef\csname\the\macname\endcsname{%
\bgroup\noexpand\macroargctxt
\noexpand\braceorline
\expandafter\noexpand\csname\the\macname xxx\endcsname}%
\expandafter\xdef\csname\the\macname xxx\endcsname##1{%
\egroup
\noexpand\norecurse{\the\macname}%
\noexpand\scanmacro{\temp}\egroup}%
\else % at most 9
\ifnum\paramno<10\relax
\expandafter\xdef\csname\the\macname\endcsname{%
\bgroup\noexpand\macroargctxt
\expandafter\noexpand\csname\the\macname xx\endcsname}%
\expandafter\xdef\csname\the\macname xx\endcsname##1{%
\expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
\expandafter\expandafter
\expandafter\xdef
\expandafter\expandafter
\csname\the\macname xxx\endcsname
\paramlist{%
\egroup
\noexpand\norecurse{\the\macname}%
\noexpand\scanmacro{\temp}\egroup}%
\else % 10 or more:
\expandafter\xdef\csname\the\macname\endcsname{%
\noexpand\getargvals@{\the\macname}{\argl}%
}%
\global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
\global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse
\fi
\fi
\fi}
\catcode `\@\texiatcatcode\relax
\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
% \braceorline decides whether the next nonwhitespace character is a
% {. If so it reads up to the closing }, if not, it reads the whole
% line. Whatever was read is then fed to the next control sequence
% as an argument (by \parsebrace or \parsearg).
%
\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
\def\braceorlinexxx{%
\ifx\nchar\bgroup\else
\expandafter\parsearg
\fi \macnamexxx}
% @alias.
% We need some trickery to remove the optional spaces around the equal
% sign. Make them active and then expand them all to nothing.
%
\def\alias{\parseargusing\obeyspaces\aliasxxx}
\def\aliasxxx #1{\aliasyyy#1\relax}
\def\aliasyyy #1=#2\relax{%
{%
\expandafter\let\obeyedspace=\empty
\addtomacrolist{#1}%
\xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}%
}%
\next
}
\message{cross references,}
\newwrite\auxfile
\newif\ifhavexrefs % True if xref values are known.
\newif\ifwarnedxrefs % True if we warned once that they aren't known.
% @inforef is relatively simple.
\def\inforef #1{\inforefzzz #1,,,,**}
\def\inforefzzz #1,#2,#3,#4**{%
\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
node \samp{\ignorespaces#1{}}}
% @node's only job in TeX is to define \lastnode, which is used in
% cross-references. The @node line might or might not have commas, and
% might or might not have spaces before the first comma, like:
% @node foo , bar , ...
% We don't want such trailing spaces in the node name.
%
\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse}
%
% also remove a trailing comma, in case of something like this:
% @node Help-Cross, , , Cross-refs
\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse}
\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}}
\let\nwnode=\node
\let\lastnode=\empty
% Write a cross-reference definition for the current node. #1 is the
% type (Ynumbered, Yappendix, Ynothing).
%
\def\donoderef#1{%
\ifx\lastnode\empty\else
\setref{\lastnode}{#1}%
\global\let\lastnode=\empty
\fi
}
% @anchor{NAME} -- define xref target at arbitrary point.
%
\newcount\savesfregister
%
\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi}
\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
% anchor), which consists of three parts:
% 1) NAME-title - the current sectioning name taken from \lastsection,
% or the anchor name.
% 2) NAME-snt - section number and type, passed as the SNT arg, or
% empty for anchors.
% 3) NAME-pg - the page number.
%
% This is called from \donoderef, \anchor, and \dofloat. In the case of
% floats, there is an additional part, which is not written here:
% 4) NAME-lof - the text as it should appear in a @listoffloats.
%
\def\setref#1#2{%
\pdfmkdest{#1}%
\iflinks
{%
\atdummies % preserve commands, but don't expand them
\edef\writexrdef##1##2{%
\write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
##1}{##2}}% these are parameters of \writexrdef
}%
\toks0 = \expandafter{\lastsection}%
\immediate \writexrdef{title}{\the\toks0 }%
\immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
\safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout
}%
\fi
}
% @xrefautosectiontitle on|off says whether @section(ing) names are used
% automatically in xrefs, if the third arg is not explicitly specified.
% This was provided as a "secret" @set xref-automatic-section-title
% variable, now it's official.
%
\parseargdef\xrefautomaticsectiontitle{%
\def\temp{#1}%
\ifx\temp\onword
\expandafter\let\csname SETxref-automatic-section-title\endcsname
= \empty
\else\ifx\temp\offword
\expandafter\let\csname SETxref-automatic-section-title\endcsname
= \relax
\else
\errhelp = \EMsimple
\errmessage{Unknown @xrefautomaticsectiontitle value `\temp',
must be on|off}%
\fi\fi
}
%
% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
% the node name, #2 the name of the Info cross-reference, #3 the printed
% node name, #4 the name of the Info file, #5 the name of the printed
% manual. All but the node name can be omitted.
%
\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
\def\ref#1{\xrefX[#1,,,,,,,]}
%
\newbox\toprefbox
\newbox\printedrefnamebox
\newbox\infofilenamebox
\newbox\printedmanualbox
%
\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
\unsepspaces
%
% Get args without leading/trailing spaces.
\def\printedrefname{\ignorespaces #3}%
\setbox\printedrefnamebox = \hbox{\printedrefname\unskip}%
%
\def\infofilename{\ignorespaces #4}%
\setbox\infofilenamebox = \hbox{\infofilename\unskip}%
%
\def\printedmanual{\ignorespaces #5}%
\setbox\printedmanualbox = \hbox{\printedmanual\unskip}%
%
% If the printed reference name (arg #3) was not explicitly given in
% the @xref, figure out what we want to use.
\ifdim \wd\printedrefnamebox = 0pt
% No printed node name was explicitly given.
\expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax
% Not auto section-title: use node name inside the square brackets.
\def\printedrefname{\ignorespaces #1}%
\else
% Auto section-title: use chapter/section title inside
% the square brackets if we have it.
\ifdim \wd\printedmanualbox > 0pt
% It is in another manual, so we don't have it; use node name.
\def\printedrefname{\ignorespaces #1}%
\else
\ifhavexrefs
% We (should) know the real title if we have the xref values.
\def\printedrefname{\refx{#1-title}{}}%
\else
% Otherwise just copy the Info node name.
\def\printedrefname{\ignorespaces #1}%
\fi%
\fi
\fi
\fi
%
% Make link in pdf output.
\ifpdf
{\indexnofonts
\turnoffactive
\makevalueexpandable
% This expands tokens, so do it after making catcode changes, so _
% etc. don't get their TeX definitions. This ignores all spaces in
% #4, including (wrongly) those in the middle of the filename.
\getfilename{#4}%
%
% This (wrongly) does not take account of leading or trailing
% spaces in #1, which should be ignored.
\edef\pdfxrefdest{#1}%
\ifx\pdfxrefdest\empty
\def\pdfxrefdest{Top}% no empty targets
\else
\txiescapepdf\pdfxrefdest % escape PDF special chars
\fi
%
\leavevmode
\startlink attr{/Border [0 0 0]}%
\ifnum\filenamelength>0
goto file{\the\filename.pdf} name{\pdfxrefdest}%
\else
goto name{\pdfmkpgn{\pdfxrefdest}}%
\fi
}%
\setcolor{\linkcolor}%
\fi
%
% Float references are printed completely differently: "Figure 1.2"
% instead of "[somenode], p.3". We distinguish them by the
% LABEL-title being set to a magic string.
{%
% Have to otherify everything special to allow the \csname to
% include an _ in the xref name, etc.
\indexnofonts
\turnoffactive
\expandafter\global\expandafter\let\expandafter\Xthisreftitle
\csname XR#1-title\endcsname
}%
\iffloat\Xthisreftitle
% If the user specified the print name (third arg) to the ref,
% print it instead of our usual "Figure 1.2".
\ifdim\wd\printedrefnamebox = 0pt
\refx{#1-snt}{}%
\else
\printedrefname
\fi
%
% If the user also gave the printed manual name (fifth arg), append
% "in MANUALNAME".
\ifdim \wd\printedmanualbox > 0pt
\space \putwordin{} \cite{\printedmanual}%
\fi
\else
% node/anchor (non-float) references.
%
% If we use \unhbox to print the node names, TeX does not insert
% empty discretionaries after hyphens, which means that it will not
% find a line break at a hyphen in a node names. Since some manuals
% are best written with fairly long node names, containing hyphens,
% this is a loss. Therefore, we give the text of the node name
% again, so it is as if TeX is seeing it for the first time.
%
\ifdim \wd\printedmanualbox > 0pt
% Cross-manual reference with a printed manual name.
%
\crossmanualxref{\cite{\printedmanual\unskip}}%
%
\else\ifdim \wd\infofilenamebox > 0pt
% Cross-manual reference with only an info filename (arg 4), no
% printed manual name (arg 5). This is essentially the same as
% the case above; we output the filename, since we have nothing else.
%
\crossmanualxref{\code{\infofilename\unskip}}%
%
\else
% Reference within this manual.
%
% _ (for example) has to be the character _ for the purposes of the
% control sequence corresponding to the node, but it has to expand
% into the usual \leavevmode...\vrule stuff for purposes of
% printing. So we \turnoffactive for the \refx-snt, back on for the
% printing, back off for the \refx-pg.
{\turnoffactive
% Only output a following space if the -snt ref is nonempty; for
% @unnumbered and @anchor, it won't be.
\setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
\ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
}%
% output the `[mynode]' via the macro below so it can be overridden.
\xrefprintnodename\printedrefname
%
% But we always want a comma and a space:
,\space
%
% output the `page 3'.
\turnoffactive \putwordpage\tie\refx{#1-pg}{}%
\fi\fi
\fi
\endlink
\endgroup}
% Output a cross-manual xref to #1. Used just above (twice).
%
% Only include the text "Section ``foo'' in" if the foo is neither
% missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply
% "see The Foo Manual", the idea being to refer to the whole manual.
%
% But, this being TeX, we can't easily compare our node name against the
% string "Top" while ignoring the possible spaces before and after in
% the input. By adding the arbitrary 7sp below, we make it much less
% likely that a real node name would have the same width as "Top" (e.g.,
% in a monospaced font). Hopefully it will never happen in practice.
%
% For the same basic reason, we retypeset the "Top" at every
% reference, since the current font is indeterminate.
%
\def\crossmanualxref#1{%
\setbox\toprefbox = \hbox{Top\kern7sp}%
\setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
\ifdim \wd2 > 7sp % nonempty?
\ifdim \wd2 = \wd\toprefbox \else % same as Top?
\putwordSection{} ``\printedrefname'' \putwordin{}\space
\fi
\fi
#1%
}
% This macro is called from \xrefX for the `[nodename]' part of xref
% output. It's a separate macro only so it can be changed more easily,
% since square brackets don't work well in some documents. Particularly
% one that Bob is working on :).
%
\def\xrefprintnodename#1{[#1]}
% Things referred to by \setref.
%
\def\Ynothing{}
\def\Yomitfromtoc{}
\def\Ynumbered{%
\ifnum\secno=0
\putwordChapter@tie \the\chapno
\else \ifnum\subsecno=0
\putwordSection@tie \the\chapno.\the\secno
\else \ifnum\subsubsecno=0
\putwordSection@tie \the\chapno.\the\secno.\the\subsecno
\else
\putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno
\fi\fi\fi
}
\def\Yappendix{%
\ifnum\secno=0
\putwordAppendix@tie @char\the\appendixno{}%
\else \ifnum\subsecno=0
\putwordSection@tie @char\the\appendixno.\the\secno
\else \ifnum\subsubsecno=0
\putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno
\else
\putwordSection@tie
@char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno
\fi\fi\fi
}
% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
% If its value is nonempty, SUFFIX is output afterward.
%
\def\refx#1#2{%
{%
\indexnofonts
\otherbackslash
\expandafter\global\expandafter\let\expandafter\thisrefX
\csname XR#1\endcsname
}%
\ifx\thisrefX\relax
% If not defined, say something at least.
\angleleft un\-de\-fined\angleright
\iflinks
\ifhavexrefs
{\toks0 = {#1}% avoid expansion of possibly-complex value
\message{\linenumber Undefined cross reference `\the\toks0'.}}%
\else
\ifwarnedxrefs\else
\global\warnedxrefstrue
\message{Cross reference values unknown; you must run TeX again.}%
\fi
\fi
\fi
\else
% It's defined, so just use it.
\thisrefX
\fi
#2% Output the suffix in any case.
}
% This is the macro invoked by entries in the aux file. Usually it's
% just a \def (we prepend XR to the control sequence name to avoid
% collisions). But if this is a float type, we have more work to do.
%
\def\xrdef#1#2{%
{% The node name might contain 8-bit characters, which in our current
% implementation are changed to commands like @'e. Don't let these
% mess up the control sequence name.
\indexnofonts
\turnoffactive
\xdef\safexrefname{#1}%
}%
%
\expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref
%
% Was that xref control sequence that we just defined for a float?
\expandafter\iffloat\csname XR\safexrefname\endcsname
% it was a float, and we have the (safe) float type in \iffloattype.
\expandafter\let\expandafter\floatlist
\csname floatlist\iffloattype\endcsname
%
% Is this the first time we've seen this float type?
\expandafter\ifx\floatlist\relax
\toks0 = {\do}% yes, so just \do
\else
% had it before, so preserve previous elements in list.
\toks0 = \expandafter{\floatlist\do}%
\fi
%
% Remember this xref in the control sequence \floatlistFLOATTYPE,
% for later use in \listoffloats.
\expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0
{\safexrefname}}%
\fi
}
% Read the last existing aux file, if any. No error if none exists.
%
\def\tryauxfile{%
\openin 1 \jobname.aux
\ifeof 1 \else
\readdatafile{aux}%
\global\havexrefstrue
\fi
\closein 1
}
\def\setupdatafile{%
\catcode`\^^@=\other
\catcode`\^^A=\other
\catcode`\^^B=\other
\catcode`\^^C=\other
\catcode`\^^D=\other
\catcode`\^^E=\other
\catcode`\^^F=\other
\catcode`\^^G=\other
\catcode`\^^H=\other
\catcode`\^^K=\other
\catcode`\^^L=\other
\catcode`\^^N=\other
\catcode`\^^P=\other
\catcode`\^^Q=\other
\catcode`\^^R=\other
\catcode`\^^S=\other
\catcode`\^^T=\other
\catcode`\^^U=\other
\catcode`\^^V=\other
\catcode`\^^W=\other
\catcode`\^^X=\other
\catcode`\^^Z=\other
\catcode`\^^[=\other
\catcode`\^^\=\other
\catcode`\^^]=\other
\catcode`\^^^=\other
\catcode`\^^_=\other
% It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc.
% in xref tags, i.e., node names. But since ^^e4 notation isn't
% supported in the main text, it doesn't seem desirable. Furthermore,
% that is not enough: for node names that actually contain a ^
% character, we would end up writing a line like this: 'xrdef {'hat
% b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
% argument, and \hat is not an expandable control sequence. It could
% all be worked out, but why? Either we support ^^ or we don't.
%
% The other change necessary for this was to define \auxhat:
% \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
% and then to call \auxhat in \setq.
%
\catcode`\^=\other
%
% Special characters. Should be turned off anyway, but...
\catcode`\~=\other
\catcode`\[=\other
\catcode`\]=\other
\catcode`\"=\other
\catcode`\_=\other
\catcode`\|=\other
\catcode`\<=\other
\catcode`\>=\other
\catcode`\$=\other
\catcode`\#=\other
\catcode`\&=\other
\catcode`\%=\other
\catcode`+=\other % avoid \+ for paranoia even though we've turned it off
%
% This is to support \ in node names and titles, since the \
% characters end up in a \csname. It's easier than
% leaving it active and making its active definition an actual \
% character. What I don't understand is why it works in the *value*
% of the xrdef. Seems like it should be a catcode12 \, and that
% should not typeset properly. But it works, so I'm moving on for
% now. --karl, 15jan04.
\catcode`\\=\other
%
% Make the characters 128-255 be printing characters.
{%
\count1=128
\def\loop{%
\catcode\count1=\other
\advance\count1 by 1
\ifnum \count1<256 \loop \fi
}%
}%
%
% @ is our escape character in .aux files, and we need braces.
\catcode`\{=1
\catcode`\}=2
\catcode`\@=0
}
\def\readdatafile#1{%
\begingroup
\setupdatafile
\input\jobname.#1
\endgroup}
\message{insertions,}
% including footnotes.
\newcount \footnoteno
% The trailing space in the following definition for supereject is
% vital for proper filling; pages come out unaligned when you do a
% pagealignmacro call if that space before the closing brace is
% removed. (Generally, numeric constants should always be followed by a
% space to prevent strange expansion errors.)
\def\supereject{\par\penalty -20000\footnoteno =0 }
% @footnotestyle is meaningful for Info output only.
\let\footnotestyle=\comment
{\catcode `\@=11
%
% Auto-number footnotes. Otherwise like plain.
\gdef\footnote{%
\let\indent=\ptexindent
\let\noindent=\ptexnoindent
\global\advance\footnoteno by \@ne
\edef\thisfootno{$^{\the\footnoteno}$}%
%
% In case the footnote comes at the end of a sentence, preserve the
% extra spacing after we do the footnote number.
\let\@sf\empty
\ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi
%
% Remove inadvertent blank space before typesetting the footnote number.
\unskip
\thisfootno\@sf
\dofootnote
}%
% Don't bother with the trickery in plain.tex to not require the
% footnote text as a parameter. Our footnotes don't need to be so general.
%
% Oh yes, they do; otherwise, @ifset (and anything else that uses
% \parseargline) fails inside footnotes because the tokens are fixed when
% the footnote is read. --karl, 16nov96.
%
\gdef\dofootnote{%
\insert\footins\bgroup
% We want to typeset this text as a normal paragraph, even if the
% footnote reference occurs in (for example) a display environment.
% So reset some parameters.
\hsize=\pagewidth
\interlinepenalty\interfootnotelinepenalty
\splittopskip\ht\strutbox % top baseline for broken footnotes
\splitmaxdepth\dp\strutbox
\floatingpenalty\@MM
\leftskip\z@skip
\rightskip\z@skip
\spaceskip\z@skip
\xspaceskip\z@skip
\parindent\defaultparindent
%
\smallfonts \rm
%
% Because we use hanging indentation in footnotes, a @noindent appears
% to exdent this text, so make it be a no-op. makeinfo does not use
% hanging indentation so @noindent can still be needed within footnote
% text after an @example or the like (not that this is good style).
\let\noindent = \relax
%
% Hang the footnote text off the number. Use \everypar in case the
% footnote extends for more than one paragraph.
\everypar = {\hang}%
\textindent{\thisfootno}%
%
% Don't crash into the line above the footnote text. Since this
% expands into a box, it must come within the paragraph, lest it
% provide a place where TeX can split the footnote.
\footstrut
%
% Invoke rest of plain TeX footnote routine.
\futurelet\next\fo@t
}
}%end \catcode `\@=11
% In case a @footnote appears in a vbox, save the footnote text and create
% the real \insert just after the vbox finished. Otherwise, the insertion
% would be lost.
% Similarly, if a @footnote appears inside an alignment, save the footnote
% text to a box and make the \insert when a row of the table is finished.
% And the same can be done for other insert classes. --kasal, 16nov03.
% Replace the \insert primitive by a cheating macro.
% Deeper inside, just make sure that the saved insertions are not spilled
% out prematurely.
%
\def\startsavinginserts{%
\ifx \insert\ptexinsert
\let\insert\saveinsert
\else
\let\checkinserts\relax
\fi
}
% This \insert replacement works for both \insert\footins{foo} and
% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}.
%
\def\saveinsert#1{%
\edef\next{\noexpand\savetobox \makeSAVEname#1}%
\afterassignment\next
% swallow the left brace
\let\temp =
}
\def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}}
\def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1}
\def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi}
\def\placesaveins#1{%
\ptexinsert \csname\expandafter\gobblesave\string#1\endcsname
{\box#1}%
}
% eat @SAVE -- beware, all of them have catcode \other:
{
\def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-)
\gdef\gobblesave @SAVE{}
}
% initialization:
\def\newsaveins #1{%
\edef\next{\noexpand\newsaveinsX \makeSAVEname#1}%
\next
}
\def\newsaveinsX #1{%
\csname newbox\endcsname #1%
\expandafter\def\expandafter\checkinserts\expandafter{\checkinserts
\checksaveins #1}%
}
% initialize:
\let\checkinserts\empty
\newsaveins\footins
\newsaveins\margin
% @image. We use the macros from epsf.tex to support this.
% If epsf.tex is not installed and @image is used, we complain.
%
% Check for and read epsf.tex up front. If we read it only at @image
% time, we might be inside a group, and then its definitions would get
% undone and the next image would fail.
\openin 1 = epsf.tex
\ifeof 1 \else
% Do not bother showing banner with epsf.tex v2.7k (available in
% doc/epsf.tex and on ctan).
\def\epsfannounce{\toks0 = }%
\input epsf.tex
\fi
\closein 1
%
% We will only complain once about lack of epsf.tex.
\newif\ifwarnednoepsf
\newhelp\noepsfhelp{epsf.tex must be installed for images to
work. It is also included in the Texinfo distribution, or you can get
it from ftp://tug.org/tex/epsf.tex.}
%
\def\image#1{%
\ifx\epsfbox\thisisundefined
\ifwarnednoepsf \else
\errhelp = \noepsfhelp
\errmessage{epsf.tex not found, images will be ignored}%
\global\warnednoepsftrue
\fi
\else
\imagexxx #1,,,,,\finish
\fi
}
%
% Arguments to @image:
% #1 is (mandatory) image filename; we tack on .eps extension.
% #2 is (optional) width, #3 is (optional) height.
% #4 is (ignored optional) html alt text.
% #5 is (ignored optional) extension.
% #6 is just the usual extra ignored arg for parsing stuff.
\newif\ifimagevmode
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
\catcode`\^^M = 5 % in case we're inside an example
\normalturnoffactive % allow _ et al. in names
% If the image is by itself, center it.
\ifvmode
\imagevmodetrue
\else \ifx\centersub\centerV
% for @center @image, we need a vbox so we can have our vertical space
\imagevmodetrue
\vbox\bgroup % vbox has better behavior than vtop herev
\fi\fi
%
\ifimagevmode
\nobreak\medskip
% Usually we'll have text after the image which will insert
% \parskip glue, so insert it here too to equalize the space
% above and below.
\nobreak\vskip\parskip
\nobreak
\fi
%
% Leave vertical mode so that indentation from an enclosing
% environment such as @quotation is respected.
% However, if we're at the top level, we don't want the
% normal paragraph indentation.
% On the other hand, if we are in the case of @center @image, we don't
% want to start a paragraph, which will create a hsize-width box and
% eradicate the centering.
\ifx\centersub\centerV\else \noindent \fi
%
% Output the image.
\ifpdf
\dopdfimage{#1}{#2}{#3}%
\else
% \epsfbox itself resets \epsf?size at each figure.
\setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
\setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
\epsfbox{#1.eps}%
\fi
%
\ifimagevmode
\medskip % space after a standalone image
\fi
\ifx\centersub\centerV \egroup \fi
\endgroup}
% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables,
% etc. We don't actually implement floating yet, we always include the
% float "here". But it seemed the best name for the future.
%
\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish}
% There may be a space before second and/or third parameter; delete it.
\def\eatcommaspace#1, {#1,}
% #1 is the optional FLOATTYPE, the text label for this float, typically
% "Figure", "Table", "Example", etc. Can't contain commas. If omitted,
% this float will not be numbered and cannot be referred to.
%
% #2 is the optional xref label. Also must be present for the float to
% be referable.
%
% #3 is the optional positioning argument; for now, it is ignored. It
% will somehow specify the positions allowed to float to (here, top, bottom).
%
% We keep a separate counter for each FLOATTYPE, which we reset at each
% chapter-level command.
\let\resetallfloatnos=\empty
%
\def\dofloat#1,#2,#3,#4\finish{%
\let\thiscaption=\empty
\let\thisshortcaption=\empty
%
% don't lose footnotes inside @float.
%
% BEWARE: when the floats start float, we have to issue warning whenever an
% insert appears inside a float which could possibly float. --kasal, 26may04
%
\startsavinginserts
%
% We can't be used inside a paragraph.
\par
%
\vtop\bgroup
\def\floattype{#1}%
\def\floatlabel{#2}%
\def\floatloc{#3}% we do nothing with this yet.
%
\ifx\floattype\empty
\let\safefloattype=\empty
\else
{%
% the floattype might have accents or other special characters,
% but we need to use it in a control sequence name.
\indexnofonts
\turnoffactive
\xdef\safefloattype{\floattype}%
}%
\fi
%
% If label is given but no type, we handle that as the empty type.
\ifx\floatlabel\empty \else
% We want each FLOATTYPE to be numbered separately (Figure 1,
% Table 1, Figure 2, ...). (And if no label, no number.)
%
\expandafter\getfloatno\csname\safefloattype floatno\endcsname
\global\advance\floatno by 1
%
{%
% This magic value for \lastsection is output by \setref as the
% XREFLABEL-title value. \xrefX uses it to distinguish float
% labels (which have a completely different output format) from
% node and anchor labels. And \xrdef uses it to construct the
% lists of floats.
%
\edef\lastsection{\floatmagic=\safefloattype}%
\setref{\floatlabel}{Yfloat}%
}%
\fi
%
% start with \parskip glue, I guess.
\vskip\parskip
%
% Don't suppress indentation if a float happens to start a section.
\restorefirstparagraphindent
}
% we have these possibilities:
% @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap
% @float Foo,lbl & no caption: Foo 1.1
% @float Foo & @caption{Cap}: Foo: Cap
% @float Foo & no caption: Foo
% @float ,lbl & Caption{Cap}: 1.1: Cap
% @float ,lbl & no caption: 1.1
% @float & @caption{Cap}: Cap
% @float & no caption:
%
\def\Efloat{%
\let\floatident = \empty
%
% In all cases, if we have a float type, it comes first.
\ifx\floattype\empty \else \def\floatident{\floattype}\fi
%
% If we have an xref label, the number comes next.
\ifx\floatlabel\empty \else
\ifx\floattype\empty \else % if also had float type, need tie first.
\appendtomacro\floatident{\tie}%
\fi
% the number.
\appendtomacro\floatident{\chaplevelprefix\the\floatno}%
\fi
%
% Start the printed caption with what we've constructed in
% \floatident, but keep it separate; we need \floatident again.
\let\captionline = \floatident
%
\ifx\thiscaption\empty \else
\ifx\floatident\empty \else
\appendtomacro\captionline{: }% had ident, so need a colon between
\fi
%
% caption text.
\appendtomacro\captionline{\scanexp\thiscaption}%
\fi
%
% If we have anything to print, print it, with space before.
% Eventually this needs to become an \insert.
\ifx\captionline\empty \else
\vskip.5\parskip
\captionline
%
% Space below caption.
\vskip\parskip
\fi
%
% If have an xref label, write the list of floats info. Do this
% after the caption, to avoid chance of it being a breakpoint.
\ifx\floatlabel\empty \else
% Write the text that goes in the lof to the aux file as
% \floatlabel-lof. Besides \floatident, we include the short
% caption if specified, else the full caption if specified, else nothing.
{%
\atdummies
%
% since we read the caption text in the macro world, where ^^M
% is turned into a normal character, we have to scan it back, so
% we don't write the literal three characters "^^M" into the aux file.
\scanexp{%
\xdef\noexpand\gtemp{%
\ifx\thisshortcaption\empty
\thiscaption
\else
\thisshortcaption
\fi
}%
}%
\immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident
\ifx\gtemp\empty \else : \gtemp \fi}}%
}%
\fi
\egroup % end of \vtop
%
% place the captured inserts
%
% BEWARE: when the floats start floating, we have to issue warning
% whenever an insert appears inside a float which could possibly
% float. --kasal, 26may04
%
\checkinserts
}
% Append the tokens #2 to the definition of macro #1, not expanding either.
%
\def\appendtomacro#1#2{%
\expandafter\def\expandafter#1\expandafter{#1#2}%
}
% @caption, @shortcaption
%
\def\caption{\docaption\thiscaption}
\def\shortcaption{\docaption\thisshortcaption}
\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption}
\def\defcaption#1#2{\egroup \def#1{#2}}
% The parameter is the control sequence identifying the counter we are
% going to use. Create it if it doesn't exist and assign it to \floatno.
\def\getfloatno#1{%
\ifx#1\relax
% Haven't seen this figure type before.
\csname newcount\endcsname #1%
%
% Remember to reset this floatno at the next chap.
\expandafter\gdef\expandafter\resetallfloatnos
\expandafter{\resetallfloatnos #1=0 }%
\fi
\let\floatno#1%
}
% \setref calls this to get the XREFLABEL-snt value. We want an @xref
% to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we
% first read the @float command.
%
\def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}%
% Magic string used for the XREFLABEL-title value, so \xrefX can
% distinguish floats from other xref types.
\def\floatmagic{!!float!!}
% #1 is the control sequence we are passed; we expand into a conditional
% which is true if #1 represents a float ref. That is, the magic
% \lastsection value which we \setref above.
%
\def\iffloat#1{\expandafter\doiffloat#1==\finish}
%
% #1 is (maybe) the \floatmagic string. If so, #2 will be the
% (safe) float type for this float. We set \iffloattype to #2.
%
\def\doiffloat#1=#2=#3\finish{%
\def\temp{#1}%
\def\iffloattype{#2}%
\ifx\temp\floatmagic
}
% @listoffloats FLOATTYPE - print a list of floats like a table of contents.
%
\parseargdef\listoffloats{%
\def\floattype{#1}% floattype
{%
% the floattype might have accents or other special characters,
% but we need to use it in a control sequence name.
\indexnofonts
\turnoffactive
\xdef\safefloattype{\floattype}%
}%
%
% \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE.
\expandafter\ifx\csname floatlist\safefloattype\endcsname \relax
\ifhavexrefs
% if the user said @listoffloats foo but never @float foo.
\message{\linenumber No `\safefloattype' floats to list.}%
\fi
\else
\begingroup
\leftskip=\tocindent % indent these entries like a toc
\let\do=\listoffloatsdo
\csname floatlist\safefloattype\endcsname
\endgroup
\fi
}
% This is called on each entry in a list of floats. We're passed the
% xref label, in the form LABEL-title, which is how we save it in the
% aux file. We strip off the -title and look up \XRLABEL-lof, which
% has the text we're supposed to typeset here.
%
% Figures without xref labels will not be included in the list (since
% they won't appear in the aux file).
%
\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish}
\def\listoffloatsdoentry#1-title\finish{{%
% Can't fully expand XR#1-lof because it can contain anything. Just
% pass the control sequence. On the other hand, XR#1-pg is just the
% page number, and we want to fully expand that so we can get a link
% in pdf output.
\toksA = \expandafter{\csname XR#1-lof\endcsname}%
%
% use the same \entry macro we use to generate the TOC and index.
\edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}%
\writeentry
}}
\message{localization,}
% For single-language documents, @documentlanguage is usually given very
% early, just after @documentencoding. Single argument is the language
% (de) or locale (de_DE) abbreviation.
%
{
\catcode`\_ = \active
\globaldefs=1
\parseargdef\documentlanguage{\begingroup
\let_=\normalunderscore % normal _ character for filenames
\tex % read txi-??.tex file in plain TeX.
% Read the file by the name they passed if it exists.
\openin 1 txi-#1.tex
\ifeof 1
\documentlanguagetrywithoutunderscore{#1_\finish}%
\else
\globaldefs = 1 % everything in the txi-LL files needs to persist
\input txi-#1.tex
\fi
\closein 1
\endgroup % end raw TeX
\endgroup}
%
% If they passed de_DE, and txi-de_DE.tex doesn't exist,
% try txi-de.tex.
%
\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{%
\openin 1 txi-#1.tex
\ifeof 1
\errhelp = \nolanghelp
\errmessage{Cannot read language file txi-#1.tex}%
\else
\globaldefs = 1 % everything in the txi-LL files needs to persist
\input txi-#1.tex
\fi
\closein 1
}
}% end of special _ catcode
%
\newhelp\nolanghelp{The given language definition file cannot be found or
is empty. Maybe you need to install it? Putting it in the current
directory should work if nowhere else does.}
% This macro is called from txi-??.tex files; the first argument is the
% \language name to set (without the "\lang@" prefix), the second and
% third args are \{left,right}hyphenmin.
%
% The language names to pass are determined when the format is built.
% See the etex.log file created at that time, e.g.,
% /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log.
%
% With TeX Live 2008, etex now includes hyphenation patterns for all
% available languages. This means we can support hyphenation in
% Texinfo, at least to some extent. (This still doesn't solve the
% accented characters problem.)
%
\catcode`@=11
\def\txisetlanguage#1#2#3{%
% do not set the language if the name is undefined in the current TeX.
\expandafter\ifx\csname lang@#1\endcsname \relax
\message{no patterns for #1}%
\else
\global\language = \csname lang@#1\endcsname
\fi
% but there is no harm in adjusting the hyphenmin values regardless.
\global\lefthyphenmin = #2\relax
\global\righthyphenmin = #3\relax
}
% Helpers for encodings.
% Set the catcode of characters 128 through 255 to the specified number.
%
\def\setnonasciicharscatcode#1{%
\count255=128
\loop\ifnum\count255<256
\global\catcode\count255=#1\relax
\advance\count255 by 1
\repeat
}
\def\setnonasciicharscatcodenonglobal#1{%
\count255=128
\loop\ifnum\count255<256
\catcode\count255=#1\relax
\advance\count255 by 1
\repeat
}
% @documentencoding sets the definition of non-ASCII characters
% according to the specified encoding.
%
\parseargdef\documentencoding{%
% Encoding being declared for the document.
\def\declaredencoding{\csname #1.enc\endcsname}%
%
% Supported encodings: names converted to tokens in order to be able
% to compare them with \ifx.
\def\ascii{\csname US-ASCII.enc\endcsname}%
\def\latnine{\csname ISO-8859-15.enc\endcsname}%
\def\latone{\csname ISO-8859-1.enc\endcsname}%
\def\lattwo{\csname ISO-8859-2.enc\endcsname}%
\def\utfeight{\csname UTF-8.enc\endcsname}%
%
\ifx \declaredencoding \ascii
\asciichardefs
%
\else \ifx \declaredencoding \lattwo
\setnonasciicharscatcode\active
\lattwochardefs
%
\else \ifx \declaredencoding \latone
\setnonasciicharscatcode\active
\latonechardefs
%
\else \ifx \declaredencoding \latnine
\setnonasciicharscatcode\active
\latninechardefs
%
\else \ifx \declaredencoding \utfeight
\setnonasciicharscatcode\active
\utfeightchardefs
%
\else
\message{Unknown document encoding #1, ignoring.}%
%
\fi % utfeight
\fi % latnine
\fi % latone
\fi % lattwo
\fi % ascii
}
% A message to be logged when using a character that isn't available
% the default font encoding (OT1).
%
\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}}
% Take account of \c (plain) vs. \, (Texinfo) difference.
\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi}
% First, make active non-ASCII characters in order for them to be
% correctly categorized when TeX reads the replacement text of
% macros containing the character definitions.
\setnonasciicharscatcode\active
%
% Latin1 (ISO-8859-1) character definitions.
\def\latonechardefs{%
\gdef^^a0{\tie}
\gdef^^a1{\exclamdown}
\gdef^^a2{\missingcharmsg{CENT SIGN}}
\gdef^^a3{{\pounds}}
\gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
\gdef^^a5{\missingcharmsg{YEN SIGN}}
\gdef^^a6{\missingcharmsg{BROKEN BAR}}
\gdef^^a7{\S}
\gdef^^a8{\"{}}
\gdef^^a9{\copyright}
\gdef^^aa{\ordf}
\gdef^^ab{\guillemetleft}
\gdef^^ac{$\lnot$}
\gdef^^ad{\-}
\gdef^^ae{\registeredsymbol}
\gdef^^af{\={}}
%
\gdef^^b0{\textdegree}
\gdef^^b1{$\pm$}
\gdef^^b2{$^2$}
\gdef^^b3{$^3$}
\gdef^^b4{\'{}}
\gdef^^b5{$\mu$}
\gdef^^b6{\P}
%
\gdef^^b7{$^.$}
\gdef^^b8{\cedilla\ }
\gdef^^b9{$^1$}
\gdef^^ba{\ordm}
%
\gdef^^bb{\guillemetright}
\gdef^^bc{$1\over4$}
\gdef^^bd{$1\over2$}
\gdef^^be{$3\over4$}
\gdef^^bf{\questiondown}
%
\gdef^^c0{\`A}
\gdef^^c1{\'A}
\gdef^^c2{\^A}
\gdef^^c3{\~A}
\gdef^^c4{\"A}
\gdef^^c5{\ringaccent A}
\gdef^^c6{\AE}
\gdef^^c7{\cedilla C}
\gdef^^c8{\`E}
\gdef^^c9{\'E}
\gdef^^ca{\^E}
\gdef^^cb{\"E}
\gdef^^cc{\`I}
\gdef^^cd{\'I}
\gdef^^ce{\^I}
\gdef^^cf{\"I}
%
\gdef^^d0{\DH}
\gdef^^d1{\~N}
\gdef^^d2{\`O}
\gdef^^d3{\'O}
\gdef^^d4{\^O}
\gdef^^d5{\~O}
\gdef^^d6{\"O}
\gdef^^d7{$\times$}
\gdef^^d8{\O}
\gdef^^d9{\`U}
\gdef^^da{\'U}
\gdef^^db{\^U}
\gdef^^dc{\"U}
\gdef^^dd{\'Y}
\gdef^^de{\TH}
\gdef^^df{\ss}
%
\gdef^^e0{\`a}
\gdef^^e1{\'a}
\gdef^^e2{\^a}
\gdef^^e3{\~a}
\gdef^^e4{\"a}
\gdef^^e5{\ringaccent a}
\gdef^^e6{\ae}
\gdef^^e7{\cedilla c}
\gdef^^e8{\`e}
\gdef^^e9{\'e}
\gdef^^ea{\^e}
\gdef^^eb{\"e}
\gdef^^ec{\`{\dotless i}}
\gdef^^ed{\'{\dotless i}}
\gdef^^ee{\^{\dotless i}}
\gdef^^ef{\"{\dotless i}}
%
\gdef^^f0{\dh}
\gdef^^f1{\~n}
\gdef^^f2{\`o}
\gdef^^f3{\'o}
\gdef^^f4{\^o}
\gdef^^f5{\~o}
\gdef^^f6{\"o}
\gdef^^f7{$\div$}
\gdef^^f8{\o}
\gdef^^f9{\`u}
\gdef^^fa{\'u}
\gdef^^fb{\^u}
\gdef^^fc{\"u}
\gdef^^fd{\'y}
\gdef^^fe{\th}
\gdef^^ff{\"y}
}
% Latin9 (ISO-8859-15) encoding character definitions.
\def\latninechardefs{%
% Encoding is almost identical to Latin1.
\latonechardefs
%
\gdef^^a4{\euro}
\gdef^^a6{\v S}
\gdef^^a8{\v s}
\gdef^^b4{\v Z}
\gdef^^b8{\v z}
\gdef^^bc{\OE}
\gdef^^bd{\oe}
\gdef^^be{\"Y}
}
% Latin2 (ISO-8859-2) character definitions.
\def\lattwochardefs{%
\gdef^^a0{\tie}
\gdef^^a1{\ogonek{A}}
\gdef^^a2{\u{}}
\gdef^^a3{\L}
\gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
\gdef^^a5{\v L}
\gdef^^a6{\'S}
\gdef^^a7{\S}
\gdef^^a8{\"{}}
\gdef^^a9{\v S}
\gdef^^aa{\cedilla S}
\gdef^^ab{\v T}
\gdef^^ac{\'Z}
\gdef^^ad{\-}
\gdef^^ae{\v Z}
\gdef^^af{\dotaccent Z}
%
\gdef^^b0{\textdegree}
\gdef^^b1{\ogonek{a}}
\gdef^^b2{\ogonek{ }}
\gdef^^b3{\l}
\gdef^^b4{\'{}}
\gdef^^b5{\v l}
\gdef^^b6{\'s}
\gdef^^b7{\v{}}
\gdef^^b8{\cedilla\ }
\gdef^^b9{\v s}
\gdef^^ba{\cedilla s}
\gdef^^bb{\v t}
\gdef^^bc{\'z}
\gdef^^bd{\H{}}
\gdef^^be{\v z}
\gdef^^bf{\dotaccent z}
%
\gdef^^c0{\'R}
\gdef^^c1{\'A}
\gdef^^c2{\^A}
\gdef^^c3{\u A}
\gdef^^c4{\"A}
\gdef^^c5{\'L}
\gdef^^c6{\'C}
\gdef^^c7{\cedilla C}
\gdef^^c8{\v C}
\gdef^^c9{\'E}
\gdef^^ca{\ogonek{E}}
\gdef^^cb{\"E}
\gdef^^cc{\v E}
\gdef^^cd{\'I}
\gdef^^ce{\^I}
\gdef^^cf{\v D}
%
\gdef^^d0{\DH}
\gdef^^d1{\'N}
\gdef^^d2{\v N}
\gdef^^d3{\'O}
\gdef^^d4{\^O}
\gdef^^d5{\H O}
\gdef^^d6{\"O}
\gdef^^d7{$\times$}
\gdef^^d8{\v R}
\gdef^^d9{\ringaccent U}
\gdef^^da{\'U}
\gdef^^db{\H U}
\gdef^^dc{\"U}
\gdef^^dd{\'Y}
\gdef^^de{\cedilla T}
\gdef^^df{\ss}
%
\gdef^^e0{\'r}
\gdef^^e1{\'a}
\gdef^^e2{\^a}
\gdef^^e3{\u a}
\gdef^^e4{\"a}
\gdef^^e5{\'l}
\gdef^^e6{\'c}
\gdef^^e7{\cedilla c}
\gdef^^e8{\v c}
\gdef^^e9{\'e}
\gdef^^ea{\ogonek{e}}
\gdef^^eb{\"e}
\gdef^^ec{\v e}
\gdef^^ed{\'{\dotless{i}}}
\gdef^^ee{\^{\dotless{i}}}
\gdef^^ef{\v d}
%
\gdef^^f0{\dh}
\gdef^^f1{\'n}
\gdef^^f2{\v n}
\gdef^^f3{\'o}
\gdef^^f4{\^o}
\gdef^^f5{\H o}
\gdef^^f6{\"o}
\gdef^^f7{$\div$}
\gdef^^f8{\v r}
\gdef^^f9{\ringaccent u}
\gdef^^fa{\'u}
\gdef^^fb{\H u}
\gdef^^fc{\"u}
\gdef^^fd{\'y}
\gdef^^fe{\cedilla t}
\gdef^^ff{\dotaccent{}}
}
% UTF-8 character definitions.
%
% This code to support UTF-8 is based on LaTeX's utf8.def, with some
% changes for Texinfo conventions. It is included here under the GPL by
% permission from Frank Mittelbach and the LaTeX team.
%
\newcount\countUTFx
\newcount\countUTFy
\newcount\countUTFz
\gdef\UTFviiiTwoOctets#1#2{\expandafter
\UTFviiiDefined\csname u8:#1\string #2\endcsname}
%
\gdef\UTFviiiThreeOctets#1#2#3{\expandafter
\UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname}
%
\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter
\UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname}
\gdef\UTFviiiDefined#1{%
\ifx #1\relax
\message{\linenumber Unicode char \string #1 not defined for Texinfo}%
\else
\expandafter #1%
\fi
}
\begingroup
\catcode`\~13
\catcode`\"12
\def\UTFviiiLoop{%
\global\catcode\countUTFx\active
\uccode`\~\countUTFx
\uppercase\expandafter{\UTFviiiTmp}%
\advance\countUTFx by 1
\ifnum\countUTFx < \countUTFy
\expandafter\UTFviiiLoop
\fi}
\countUTFx = "C2
\countUTFy = "E0
\def\UTFviiiTmp{%
\xdef~{\noexpand\UTFviiiTwoOctets\string~}}
\UTFviiiLoop
\countUTFx = "E0
\countUTFy = "F0
\def\UTFviiiTmp{%
\xdef~{\noexpand\UTFviiiThreeOctets\string~}}
\UTFviiiLoop
\countUTFx = "F0
\countUTFy = "F4
\def\UTFviiiTmp{%
\xdef~{\noexpand\UTFviiiFourOctets\string~}}
\UTFviiiLoop
\endgroup
\begingroup
\catcode`\"=12
\catcode`\<=12
\catcode`\.=12
\catcode`\,=12
\catcode`\;=12
\catcode`\!=12
\catcode`\~=13
\gdef\DeclareUnicodeCharacter#1#2{%
\countUTFz = "#1\relax
%\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
\begingroup
\parseXMLCharref
\def\UTFviiiTwoOctets##1##2{%
\csname u8:##1\string ##2\endcsname}%
\def\UTFviiiThreeOctets##1##2##3{%
\csname u8:##1\string ##2\string ##3\endcsname}%
\def\UTFviiiFourOctets##1##2##3##4{%
\csname u8:##1\string ##2\string ##3\string ##4\endcsname}%
\expandafter\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter
\gdef\UTFviiiTmp{#2}%
\endgroup}
\gdef\parseXMLCharref{%
\ifnum\countUTFz < "A0\relax
\errhelp = \EMsimple
\errmessage{Cannot define Unicode char value < 00A0}%
\else\ifnum\countUTFz < "800\relax
\parseUTFviiiA,%
\parseUTFviiiB C\UTFviiiTwoOctets.,%
\else\ifnum\countUTFz < "10000\relax
\parseUTFviiiA;%
\parseUTFviiiA,%
\parseUTFviiiB E\UTFviiiThreeOctets.{,;}%
\else
\parseUTFviiiA;%
\parseUTFviiiA,%
\parseUTFviiiA!%
\parseUTFviiiB F\UTFviiiFourOctets.{!,;}%
\fi\fi\fi
}
\gdef\parseUTFviiiA#1{%
\countUTFx = \countUTFz
\divide\countUTFz by 64
\countUTFy = \countUTFz
\multiply\countUTFz by 64
\advance\countUTFx by -\countUTFz
\advance\countUTFx by 128
\uccode `#1\countUTFx
\countUTFz = \countUTFy}
\gdef\parseUTFviiiB#1#2#3#4{%
\advance\countUTFz by "#10\relax
\uccode `#3\countUTFz
\uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
\endgroup
\def\utfeightchardefs{%
\DeclareUnicodeCharacter{00A0}{\tie}
\DeclareUnicodeCharacter{00A1}{\exclamdown}
\DeclareUnicodeCharacter{00A3}{\pounds}
\DeclareUnicodeCharacter{00A8}{\"{ }}
\DeclareUnicodeCharacter{00A9}{\copyright}
\DeclareUnicodeCharacter{00AA}{\ordf}
\DeclareUnicodeCharacter{00AB}{\guillemetleft}
\DeclareUnicodeCharacter{00AD}{\-}
\DeclareUnicodeCharacter{00AE}{\registeredsymbol}
\DeclareUnicodeCharacter{00AF}{\={ }}
\DeclareUnicodeCharacter{00B0}{\ringaccent{ }}
\DeclareUnicodeCharacter{00B4}{\'{ }}
\DeclareUnicodeCharacter{00B8}{\cedilla{ }}
\DeclareUnicodeCharacter{00BA}{\ordm}
\DeclareUnicodeCharacter{00BB}{\guillemetright}
\DeclareUnicodeCharacter{00BF}{\questiondown}
\DeclareUnicodeCharacter{00C0}{\`A}
\DeclareUnicodeCharacter{00C1}{\'A}
\DeclareUnicodeCharacter{00C2}{\^A}
\DeclareUnicodeCharacter{00C3}{\~A}
\DeclareUnicodeCharacter{00C4}{\"A}
\DeclareUnicodeCharacter{00C5}{\AA}
\DeclareUnicodeCharacter{00C6}{\AE}
\DeclareUnicodeCharacter{00C7}{\cedilla{C}}
\DeclareUnicodeCharacter{00C8}{\`E}
\DeclareUnicodeCharacter{00C9}{\'E}
\DeclareUnicodeCharacter{00CA}{\^E}
\DeclareUnicodeCharacter{00CB}{\"E}
\DeclareUnicodeCharacter{00CC}{\`I}
\DeclareUnicodeCharacter{00CD}{\'I}
\DeclareUnicodeCharacter{00CE}{\^I}
\DeclareUnicodeCharacter{00CF}{\"I}
\DeclareUnicodeCharacter{00D0}{\DH}
\DeclareUnicodeCharacter{00D1}{\~N}
\DeclareUnicodeCharacter{00D2}{\`O}
\DeclareUnicodeCharacter{00D3}{\'O}
\DeclareUnicodeCharacter{00D4}{\^O}
\DeclareUnicodeCharacter{00D5}{\~O}
\DeclareUnicodeCharacter{00D6}{\"O}
\DeclareUnicodeCharacter{00D8}{\O}
\DeclareUnicodeCharacter{00D9}{\`U}
\DeclareUnicodeCharacter{00DA}{\'U}
\DeclareUnicodeCharacter{00DB}{\^U}
\DeclareUnicodeCharacter{00DC}{\"U}
\DeclareUnicodeCharacter{00DD}{\'Y}
\DeclareUnicodeCharacter{00DE}{\TH}
\DeclareUnicodeCharacter{00DF}{\ss}
\DeclareUnicodeCharacter{00E0}{\`a}
\DeclareUnicodeCharacter{00E1}{\'a}
\DeclareUnicodeCharacter{00E2}{\^a}
\DeclareUnicodeCharacter{00E3}{\~a}
\DeclareUnicodeCharacter{00E4}{\"a}
\DeclareUnicodeCharacter{00E5}{\aa}
\DeclareUnicodeCharacter{00E6}{\ae}
\DeclareUnicodeCharacter{00E7}{\cedilla{c}}
\DeclareUnicodeCharacter{00E8}{\`e}
\DeclareUnicodeCharacter{00E9}{\'e}
\DeclareUnicodeCharacter{00EA}{\^e}
\DeclareUnicodeCharacter{00EB}{\"e}
\DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}
\DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}
\DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}
\DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}
\DeclareUnicodeCharacter{00F0}{\dh}
\DeclareUnicodeCharacter{00F1}{\~n}
\DeclareUnicodeCharacter{00F2}{\`o}
\DeclareUnicodeCharacter{00F3}{\'o}
\DeclareUnicodeCharacter{00F4}{\^o}
\DeclareUnicodeCharacter{00F5}{\~o}
\DeclareUnicodeCharacter{00F6}{\"o}
\DeclareUnicodeCharacter{00F8}{\o}
\DeclareUnicodeCharacter{00F9}{\`u}
\DeclareUnicodeCharacter{00FA}{\'u}
\DeclareUnicodeCharacter{00FB}{\^u}
\DeclareUnicodeCharacter{00FC}{\"u}
\DeclareUnicodeCharacter{00FD}{\'y}
\DeclareUnicodeCharacter{00FE}{\th}
\DeclareUnicodeCharacter{00FF}{\"y}
\DeclareUnicodeCharacter{0100}{\=A}
\DeclareUnicodeCharacter{0101}{\=a}
\DeclareUnicodeCharacter{0102}{\u{A}}
\DeclareUnicodeCharacter{0103}{\u{a}}
\DeclareUnicodeCharacter{0104}{\ogonek{A}}
\DeclareUnicodeCharacter{0105}{\ogonek{a}}
\DeclareUnicodeCharacter{0106}{\'C}
\DeclareUnicodeCharacter{0107}{\'c}
\DeclareUnicodeCharacter{0108}{\^C}
\DeclareUnicodeCharacter{0109}{\^c}
\DeclareUnicodeCharacter{0118}{\ogonek{E}}
\DeclareUnicodeCharacter{0119}{\ogonek{e}}
\DeclareUnicodeCharacter{010A}{\dotaccent{C}}
\DeclareUnicodeCharacter{010B}{\dotaccent{c}}
\DeclareUnicodeCharacter{010C}{\v{C}}
\DeclareUnicodeCharacter{010D}{\v{c}}
\DeclareUnicodeCharacter{010E}{\v{D}}
\DeclareUnicodeCharacter{0112}{\=E}
\DeclareUnicodeCharacter{0113}{\=e}
\DeclareUnicodeCharacter{0114}{\u{E}}
\DeclareUnicodeCharacter{0115}{\u{e}}
\DeclareUnicodeCharacter{0116}{\dotaccent{E}}
\DeclareUnicodeCharacter{0117}{\dotaccent{e}}
\DeclareUnicodeCharacter{011A}{\v{E}}
\DeclareUnicodeCharacter{011B}{\v{e}}
\DeclareUnicodeCharacter{011C}{\^G}
\DeclareUnicodeCharacter{011D}{\^g}
\DeclareUnicodeCharacter{011E}{\u{G}}
\DeclareUnicodeCharacter{011F}{\u{g}}
\DeclareUnicodeCharacter{0120}{\dotaccent{G}}
\DeclareUnicodeCharacter{0121}{\dotaccent{g}}
\DeclareUnicodeCharacter{0124}{\^H}
\DeclareUnicodeCharacter{0125}{\^h}
\DeclareUnicodeCharacter{0128}{\~I}
\DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}
\DeclareUnicodeCharacter{012A}{\=I}
\DeclareUnicodeCharacter{012B}{\={\dotless{i}}}
\DeclareUnicodeCharacter{012C}{\u{I}}
\DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}
\DeclareUnicodeCharacter{0130}{\dotaccent{I}}
\DeclareUnicodeCharacter{0131}{\dotless{i}}
\DeclareUnicodeCharacter{0132}{IJ}
\DeclareUnicodeCharacter{0133}{ij}
\DeclareUnicodeCharacter{0134}{\^J}
\DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}
\DeclareUnicodeCharacter{0139}{\'L}
\DeclareUnicodeCharacter{013A}{\'l}
\DeclareUnicodeCharacter{0141}{\L}
\DeclareUnicodeCharacter{0142}{\l}
\DeclareUnicodeCharacter{0143}{\'N}
\DeclareUnicodeCharacter{0144}{\'n}
\DeclareUnicodeCharacter{0147}{\v{N}}
\DeclareUnicodeCharacter{0148}{\v{n}}
\DeclareUnicodeCharacter{014C}{\=O}
\DeclareUnicodeCharacter{014D}{\=o}
\DeclareUnicodeCharacter{014E}{\u{O}}
\DeclareUnicodeCharacter{014F}{\u{o}}
\DeclareUnicodeCharacter{0150}{\H{O}}
\DeclareUnicodeCharacter{0151}{\H{o}}
\DeclareUnicodeCharacter{0152}{\OE}
\DeclareUnicodeCharacter{0153}{\oe}
\DeclareUnicodeCharacter{0154}{\'R}
\DeclareUnicodeCharacter{0155}{\'r}
\DeclareUnicodeCharacter{0158}{\v{R}}
\DeclareUnicodeCharacter{0159}{\v{r}}
\DeclareUnicodeCharacter{015A}{\'S}
\DeclareUnicodeCharacter{015B}{\'s}
\DeclareUnicodeCharacter{015C}{\^S}
\DeclareUnicodeCharacter{015D}{\^s}
\DeclareUnicodeCharacter{015E}{\cedilla{S}}
\DeclareUnicodeCharacter{015F}{\cedilla{s}}
\DeclareUnicodeCharacter{0160}{\v{S}}
\DeclareUnicodeCharacter{0161}{\v{s}}
\DeclareUnicodeCharacter{0162}{\cedilla{t}}
\DeclareUnicodeCharacter{0163}{\cedilla{T}}
\DeclareUnicodeCharacter{0164}{\v{T}}
\DeclareUnicodeCharacter{0168}{\~U}
\DeclareUnicodeCharacter{0169}{\~u}
\DeclareUnicodeCharacter{016A}{\=U}
\DeclareUnicodeCharacter{016B}{\=u}
\DeclareUnicodeCharacter{016C}{\u{U}}
\DeclareUnicodeCharacter{016D}{\u{u}}
\DeclareUnicodeCharacter{016E}{\ringaccent{U}}
\DeclareUnicodeCharacter{016F}{\ringaccent{u}}
\DeclareUnicodeCharacter{0170}{\H{U}}
\DeclareUnicodeCharacter{0171}{\H{u}}
\DeclareUnicodeCharacter{0174}{\^W}
\DeclareUnicodeCharacter{0175}{\^w}
\DeclareUnicodeCharacter{0176}{\^Y}
\DeclareUnicodeCharacter{0177}{\^y}
\DeclareUnicodeCharacter{0178}{\"Y}
\DeclareUnicodeCharacter{0179}{\'Z}
\DeclareUnicodeCharacter{017A}{\'z}
\DeclareUnicodeCharacter{017B}{\dotaccent{Z}}
\DeclareUnicodeCharacter{017C}{\dotaccent{z}}
\DeclareUnicodeCharacter{017D}{\v{Z}}
\DeclareUnicodeCharacter{017E}{\v{z}}
\DeclareUnicodeCharacter{01C4}{D\v{Z}}
\DeclareUnicodeCharacter{01C5}{D\v{z}}
\DeclareUnicodeCharacter{01C6}{d\v{z}}
\DeclareUnicodeCharacter{01C7}{LJ}
\DeclareUnicodeCharacter{01C8}{Lj}
\DeclareUnicodeCharacter{01C9}{lj}
\DeclareUnicodeCharacter{01CA}{NJ}
\DeclareUnicodeCharacter{01CB}{Nj}
\DeclareUnicodeCharacter{01CC}{nj}
\DeclareUnicodeCharacter{01CD}{\v{A}}
\DeclareUnicodeCharacter{01CE}{\v{a}}
\DeclareUnicodeCharacter{01CF}{\v{I}}
\DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}
\DeclareUnicodeCharacter{01D1}{\v{O}}
\DeclareUnicodeCharacter{01D2}{\v{o}}
\DeclareUnicodeCharacter{01D3}{\v{U}}
\DeclareUnicodeCharacter{01D4}{\v{u}}
\DeclareUnicodeCharacter{01E2}{\={\AE}}
\DeclareUnicodeCharacter{01E3}{\={\ae}}
\DeclareUnicodeCharacter{01E6}{\v{G}}
\DeclareUnicodeCharacter{01E7}{\v{g}}
\DeclareUnicodeCharacter{01E8}{\v{K}}
\DeclareUnicodeCharacter{01E9}{\v{k}}
\DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}
\DeclareUnicodeCharacter{01F1}{DZ}
\DeclareUnicodeCharacter{01F2}{Dz}
\DeclareUnicodeCharacter{01F3}{dz}
\DeclareUnicodeCharacter{01F4}{\'G}
\DeclareUnicodeCharacter{01F5}{\'g}
\DeclareUnicodeCharacter{01F8}{\`N}
\DeclareUnicodeCharacter{01F9}{\`n}
\DeclareUnicodeCharacter{01FC}{\'{\AE}}
\DeclareUnicodeCharacter{01FD}{\'{\ae}}
\DeclareUnicodeCharacter{01FE}{\'{\O}}
\DeclareUnicodeCharacter{01FF}{\'{\o}}
\DeclareUnicodeCharacter{021E}{\v{H}}
\DeclareUnicodeCharacter{021F}{\v{h}}
\DeclareUnicodeCharacter{0226}{\dotaccent{A}}
\DeclareUnicodeCharacter{0227}{\dotaccent{a}}
\DeclareUnicodeCharacter{0228}{\cedilla{E}}
\DeclareUnicodeCharacter{0229}{\cedilla{e}}
\DeclareUnicodeCharacter{022E}{\dotaccent{O}}
\DeclareUnicodeCharacter{022F}{\dotaccent{o}}
\DeclareUnicodeCharacter{0232}{\=Y}
\DeclareUnicodeCharacter{0233}{\=y}
\DeclareUnicodeCharacter{0237}{\dotless{j}}
\DeclareUnicodeCharacter{02DB}{\ogonek{ }}
\DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
\DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
\DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
\DeclareUnicodeCharacter{1E05}{\udotaccent{b}}
\DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}
\DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}
\DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}
\DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}
\DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}
\DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}
\DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}
\DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}
\DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}
\DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}
\DeclareUnicodeCharacter{1E20}{\=G}
\DeclareUnicodeCharacter{1E21}{\=g}
\DeclareUnicodeCharacter{1E22}{\dotaccent{H}}
\DeclareUnicodeCharacter{1E23}{\dotaccent{h}}
\DeclareUnicodeCharacter{1E24}{\udotaccent{H}}
\DeclareUnicodeCharacter{1E25}{\udotaccent{h}}
\DeclareUnicodeCharacter{1E26}{\"H}
\DeclareUnicodeCharacter{1E27}{\"h}
\DeclareUnicodeCharacter{1E30}{\'K}
\DeclareUnicodeCharacter{1E31}{\'k}
\DeclareUnicodeCharacter{1E32}{\udotaccent{K}}
\DeclareUnicodeCharacter{1E33}{\udotaccent{k}}
\DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}
\DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}
\DeclareUnicodeCharacter{1E36}{\udotaccent{L}}
\DeclareUnicodeCharacter{1E37}{\udotaccent{l}}
\DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}
\DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}
\DeclareUnicodeCharacter{1E3E}{\'M}
\DeclareUnicodeCharacter{1E3F}{\'m}
\DeclareUnicodeCharacter{1E40}{\dotaccent{M}}
\DeclareUnicodeCharacter{1E41}{\dotaccent{m}}
\DeclareUnicodeCharacter{1E42}{\udotaccent{M}}
\DeclareUnicodeCharacter{1E43}{\udotaccent{m}}
\DeclareUnicodeCharacter{1E44}{\dotaccent{N}}
\DeclareUnicodeCharacter{1E45}{\dotaccent{n}}
\DeclareUnicodeCharacter{1E46}{\udotaccent{N}}
\DeclareUnicodeCharacter{1E47}{\udotaccent{n}}
\DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}
\DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}
\DeclareUnicodeCharacter{1E54}{\'P}
\DeclareUnicodeCharacter{1E55}{\'p}
\DeclareUnicodeCharacter{1E56}{\dotaccent{P}}
\DeclareUnicodeCharacter{1E57}{\dotaccent{p}}
\DeclareUnicodeCharacter{1E58}{\dotaccent{R}}
\DeclareUnicodeCharacter{1E59}{\dotaccent{r}}
\DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}
\DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}
\DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}
\DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}
\DeclareUnicodeCharacter{1E60}{\dotaccent{S}}
\DeclareUnicodeCharacter{1E61}{\dotaccent{s}}
\DeclareUnicodeCharacter{1E62}{\udotaccent{S}}
\DeclareUnicodeCharacter{1E63}{\udotaccent{s}}
\DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}
\DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}
\DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}
\DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}
\DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}
\DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}
\DeclareUnicodeCharacter{1E7C}{\~V}
\DeclareUnicodeCharacter{1E7D}{\~v}
\DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}
\DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}
\DeclareUnicodeCharacter{1E80}{\`W}
\DeclareUnicodeCharacter{1E81}{\`w}
\DeclareUnicodeCharacter{1E82}{\'W}
\DeclareUnicodeCharacter{1E83}{\'w}
\DeclareUnicodeCharacter{1E84}{\"W}
\DeclareUnicodeCharacter{1E85}{\"w}
\DeclareUnicodeCharacter{1E86}{\dotaccent{W}}
\DeclareUnicodeCharacter{1E87}{\dotaccent{w}}
\DeclareUnicodeCharacter{1E88}{\udotaccent{W}}
\DeclareUnicodeCharacter{1E89}{\udotaccent{w}}
\DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}
\DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}
\DeclareUnicodeCharacter{1E8C}{\"X}
\DeclareUnicodeCharacter{1E8D}{\"x}
\DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}
\DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}
\DeclareUnicodeCharacter{1E90}{\^Z}
\DeclareUnicodeCharacter{1E91}{\^z}
\DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}
\DeclareUnicodeCharacter{1E93}{\udotaccent{z}}
\DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}
\DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}
\DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}
\DeclareUnicodeCharacter{1E97}{\"t}
\DeclareUnicodeCharacter{1E98}{\ringaccent{w}}
\DeclareUnicodeCharacter{1E99}{\ringaccent{y}}
\DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}
\DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}
\DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}
\DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}
\DeclareUnicodeCharacter{1EBC}{\~E}
\DeclareUnicodeCharacter{1EBD}{\~e}
\DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}
\DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}
\DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}
\DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}
\DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}
\DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}
\DeclareUnicodeCharacter{1EF2}{\`Y}
\DeclareUnicodeCharacter{1EF3}{\`y}
\DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}
\DeclareUnicodeCharacter{1EF8}{\~Y}
\DeclareUnicodeCharacter{1EF9}{\~y}
\DeclareUnicodeCharacter{2013}{--}
\DeclareUnicodeCharacter{2014}{---}
\DeclareUnicodeCharacter{2018}{\quoteleft}
\DeclareUnicodeCharacter{2019}{\quoteright}
\DeclareUnicodeCharacter{201A}{\quotesinglbase}
\DeclareUnicodeCharacter{201C}{\quotedblleft}
\DeclareUnicodeCharacter{201D}{\quotedblright}
\DeclareUnicodeCharacter{201E}{\quotedblbase}
\DeclareUnicodeCharacter{2022}{\bullet}
\DeclareUnicodeCharacter{2026}{\dots}
\DeclareUnicodeCharacter{2039}{\guilsinglleft}
\DeclareUnicodeCharacter{203A}{\guilsinglright}
\DeclareUnicodeCharacter{20AC}{\euro}
\DeclareUnicodeCharacter{2192}{\expansion}
\DeclareUnicodeCharacter{21D2}{\result}
\DeclareUnicodeCharacter{2212}{\minus}
\DeclareUnicodeCharacter{2217}{\point}
\DeclareUnicodeCharacter{2261}{\equiv}
}% end of \utfeightchardefs
% US-ASCII character definitions.
\def\asciichardefs{% nothing need be done
\relax
}
% Make non-ASCII characters printable again for compatibility with
% existing Texinfo documents that may use them, even without declaring a
% document encoding.
%
\setnonasciicharscatcode \other
\message{formatting,}
\newdimen\defaultparindent \defaultparindent = 15pt
\chapheadingskip = 15pt plus 4pt minus 2pt
\secheadingskip = 12pt plus 3pt minus 2pt
\subsecheadingskip = 9pt plus 2pt minus 2pt
% Prevent underfull vbox error messages.
\vbadness = 10000
% Don't be very finicky about underfull hboxes, either.
\hbadness = 6666
% Following George Bush, get rid of widows and orphans.
\widowpenalty=10000
\clubpenalty=10000
% Use TeX 3.0's \emergencystretch to help line breaking, but if we're
% using an old version of TeX, don't do anything. We want the amount of
% stretch added to depend on the line length, hence the dependence on
% \hsize. We call this whenever the paper size is set.
%
\def\setemergencystretch{%
\ifx\emergencystretch\thisisundefined
% Allow us to assign to \emergencystretch anyway.
\def\emergencystretch{\dimen0}%
\else
\emergencystretch = .15\hsize
\fi
}
% Parameters in order: 1) textheight; 2) textwidth;
% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
% 7) physical page height; 8) physical page width.
%
% We also call \setleading{\textleading}, so the caller should define
% \textleading. The caller should also set \parskip.
%
\def\internalpagesizes#1#2#3#4#5#6#7#8{%
\voffset = #3\relax
\topskip = #6\relax
\splittopskip = \topskip
%
\vsize = #1\relax
\advance\vsize by \topskip
\outervsize = \vsize
\advance\outervsize by 2\topandbottommargin
\pageheight = \vsize
%
\hsize = #2\relax
\outerhsize = \hsize
\advance\outerhsize by 0.5in
\pagewidth = \hsize
%
\normaloffset = #4\relax
\bindingoffset = #5\relax
%
\ifpdf
\pdfpageheight #7\relax
\pdfpagewidth #8\relax
% if we don't reset these, they will remain at "1 true in" of
% whatever layout pdftex was dumped with.
\pdfhorigin = 1 true in
\pdfvorigin = 1 true in
\fi
%
\setleading{\textleading}
%
\parindent = \defaultparindent
\setemergencystretch
}
% @letterpaper (the default).
\def\letterpaper{{\globaldefs = 1
\parskip = 3pt plus 2pt minus 1pt
\textleading = 13.2pt
%
% If page is nothing but text, make it come out even.
\internalpagesizes{607.2pt}{6in}% that's 46 lines
{\voffset}{.25in}%
{\bindingoffset}{36pt}%
{11in}{8.5in}%
}}
% Use @smallbook to reset parameters for 7x9.25 trim size.
\def\smallbook{{\globaldefs = 1
\parskip = 2pt plus 1pt
\textleading = 12pt
%
\internalpagesizes{7.5in}{5in}%
{-.2in}{0in}%
{\bindingoffset}{16pt}%
{9.25in}{7in}%
%
\lispnarrowing = 0.3in
\tolerance = 700
\hfuzz = 1pt
\contentsrightmargin = 0pt
\defbodyindent = .5cm
}}
% Use @smallerbook to reset parameters for 6x9 trim size.
% (Just testing, parameters still in flux.)
\def\smallerbook{{\globaldefs = 1
\parskip = 1.5pt plus 1pt
\textleading = 12pt
%
\internalpagesizes{7.4in}{4.8in}%
{-.2in}{-.4in}%
{0pt}{14pt}%
{9in}{6in}%
%
\lispnarrowing = 0.25in
\tolerance = 700
\hfuzz = 1pt
\contentsrightmargin = 0pt
\defbodyindent = .4cm
}}
% Use @afourpaper to print on European A4 paper.
\def\afourpaper{{\globaldefs = 1
\parskip = 3pt plus 2pt minus 1pt
\textleading = 13.2pt
%
% Double-side printing via postscript on Laserjet 4050
% prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
% To change the settings for a different printer or situation, adjust
% \normaloffset until the front-side and back-side texts align. Then
% do the same for \bindingoffset. You can set these for testing in
% your texinfo source file like this:
% @tex
% \global\normaloffset = -6mm
% \global\bindingoffset = 10mm
% @end tex
\internalpagesizes{673.2pt}{160mm}% that's 51 lines
{\voffset}{\hoffset}%
{\bindingoffset}{44pt}%
{297mm}{210mm}%
%
\tolerance = 700
\hfuzz = 1pt
\contentsrightmargin = 0pt
\defbodyindent = 5mm
}}
% Use @afivepaper to print on European A5 paper.
% From romildo@urano.iceb.ufop.br, 2 July 2000.
% He also recommends making @example and @lisp be small.
\def\afivepaper{{\globaldefs = 1
\parskip = 2pt plus 1pt minus 0.1pt
\textleading = 12.5pt
%
\internalpagesizes{160mm}{120mm}%
{\voffset}{\hoffset}%
{\bindingoffset}{8pt}%
{210mm}{148mm}%
%
\lispnarrowing = 0.2in
\tolerance = 800
\hfuzz = 1.2pt
\contentsrightmargin = 0pt
\defbodyindent = 2mm
\tableindent = 12mm
}}
% A specific text layout, 24x15cm overall, intended for A4 paper.
\def\afourlatex{{\globaldefs = 1
\afourpaper
\internalpagesizes{237mm}{150mm}%
{\voffset}{4.6mm}%
{\bindingoffset}{7mm}%
{297mm}{210mm}%
%
% Must explicitly reset to 0 because we call \afourpaper.
\globaldefs = 0
}}
% Use @afourwide to print on A4 paper in landscape format.
\def\afourwide{{\globaldefs = 1
\afourpaper
\internalpagesizes{241mm}{165mm}%
{\voffset}{-2.95mm}%
{\bindingoffset}{7mm}%
{297mm}{210mm}%
\globaldefs = 0
}}
% @pagesizes TEXTHEIGHT[,TEXTWIDTH]
% Perhaps we should allow setting the margins, \topskip, \parskip,
% and/or leading, also. Or perhaps we should compute them somehow.
%
\parseargdef\pagesizes{\pagesizesyyy #1,,\finish}
\def\pagesizesyyy#1,#2,#3\finish{{%
\setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi
\globaldefs = 1
%
\parskip = 3pt plus 2pt minus 1pt
\setleading{\textleading}%
%
\dimen0 = #1\relax
\advance\dimen0 by \voffset
%
\dimen2 = \hsize
\advance\dimen2 by \normaloffset
%
\internalpagesizes{#1}{\hsize}%
{\voffset}{\normaloffset}%
{\bindingoffset}{44pt}%
{\dimen0}{\dimen2}%
}}
% Set default to letter.
%
\letterpaper
\message{and turning on texinfo input format.}
\def^^L{\par} % remove \outer, so ^L can appear in an @comment
% DEL is a comment character, in case @c does not suffice.
\catcode`\^^? = 14
% Define macros to output various characters with catcode for normal text.
\catcode`\"=\other \def\normaldoublequote{"}
\catcode`\$=\other \def\normaldollar{$}%$ font-lock fix
\catcode`\+=\other \def\normalplus{+}
\catcode`\<=\other \def\normalless{<}
\catcode`\>=\other \def\normalgreater{>}
\catcode`\^=\other \def\normalcaret{^}
\catcode`\_=\other \def\normalunderscore{_}
\catcode`\|=\other \def\normalverticalbar{|}
\catcode`\~=\other \def\normaltilde{~}
% This macro is used to make a character print one way in \tt
% (where it can probably be output as-is), and another way in other fonts,
% where something hairier probably needs to be done.
%
% #1 is what to print if we are indeed using \tt; #2 is what to print
% otherwise. Since all the Computer Modern typewriter fonts have zero
% interword stretch (and shrink), and it is reasonable to expect all
% typewriter fonts to have this, we can check that font parameter.
%
\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
% Same as above, but check for italic font. Actually this also catches
% non-italic slanted fonts since it is impossible to distinguish them from
% italic fonts. But since this is only used by $ and it uses \sl anyway
% this is not a problem.
\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
% Turn off all special characters except @
% (and those which the user can use as if they were ordinary).
% Most of these we simply print from the \tt font, but for some, we can
% use math or other variants that look better in normal text.
\catcode`\"=\active
\def\activedoublequote{{\tt\char34}}
\let"=\activedoublequote
\catcode`\~=\active
\def~{{\tt\char126}}
\chardef\hat=`\^
\catcode`\^=\active
\def^{{\tt \hat}}
\catcode`\_=\active
\def_{\ifusingtt\normalunderscore\_}
\let\realunder=_
% Subroutine for the previous macro.
\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
\catcode`\|=\active
\def|{{\tt\char124}}
\chardef \less=`\<
\catcode`\<=\active
\def<{{\tt \less}}
\chardef \gtr=`\>
\catcode`\>=\active
\def>{{\tt \gtr}}
\catcode`\+=\active
\def+{{\tt \char 43}}
\catcode`\$=\active
\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
% If a .fmt file is being used, characters that might appear in a file
% name cannot be active until we have parsed the command line.
% So turn them off again, and have \everyjob (or @setfilename) turn them on.
% \otherifyactive is called near the end of this file.
\def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
% Used sometimes to turn off (effectively) the active characters even after
% parsing them.
\def\turnoffactive{%
\normalturnoffactive
\otherbackslash
}
\catcode`\@=0
% \backslashcurfont outputs one backslash character in current font,
% as in \char`\\.
\global\chardef\backslashcurfont=`\\
\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work
% \realbackslash is an actual character `\' with catcode other, and
% \doublebackslash is two of them (for the pdf outlines).
{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
% In texinfo, backslash is an active character; it prints the backslash
% in fixed width font.
\catcode`\\=\active % @ for escape char from now on.
% The story here is that in math mode, the \char of \backslashcurfont
% ends up printing the roman \ from the math symbol font (because \char
% in math mode uses the \mathcode, and plain.tex sets
% \mathcode`\\="026E). It seems better for @backslashchar{} to always
% print a typewriter backslash, hence we use an explicit \mathchar,
% which is the decimal equivalent of "715c (class 7, e.g., use \fam;
% ignored family value; char position "5C). We can't use " for the
% usual hex value because it has already been made active.
@def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
@let@backslashchar = @normalbackslash % @backslashchar{} is for user documents.
% On startup, @fixbackslash assigns:
% @let \ = @normalbackslash
% \rawbackslash defines an active \ to do \backslashcurfont.
% \otherbackslash defines an active \ to be a literal `\' character with
% catcode other. We switch back and forth between these.
@gdef@rawbackslash{@let\=@backslashcurfont}
@gdef@otherbackslash{@let\=@realbackslash}
% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
% the literal character `\'. Also revert - to its normal character, in
% case the active - from code has slipped in.
%
{@catcode`- = @active
@gdef@normalturnoffactive{%
@let-=@normaldash
@let"=@normaldoublequote
@let$=@normaldollar %$ font-lock fix
@let+=@normalplus
@let<=@normalless
@let>=@normalgreater
@let\=@normalbackslash
@let^=@normalcaret
@let_=@normalunderscore
@let|=@normalverticalbar
@let~=@normaltilde
@markupsetuplqdefault
@markupsetuprqdefault
@unsepspaces
}
}
% Make _ and + \other characters, temporarily.
% This is canceled by @fixbackslash.
@otherifyactive
% If a .fmt file is being used, we don't want the `\input texinfo' to show up.
% That is what \eatinput is for; after that, the `\' should revert to printing
% a backslash.
%
@gdef@eatinput input texinfo{@fixbackslash}
@global@let\ = @eatinput
% On the other hand, perhaps the file did not have a `\input texinfo'. Then
% the first `\' in the file would cause an error. This macro tries to fix
% that, assuming it is called before the first `\' could plausibly occur.
% Also turn back on active characters that might appear in the input
% file name, in case not using a pre-dumped format.
%
@gdef@fixbackslash{%
@ifx\@eatinput @let\ = @normalbackslash @fi
@catcode`+=@active
@catcode`@_=@active
}
% Say @foo, not \foo, in error messages.
@escapechar = `@@
% These (along with & and #) are made active for url-breaking, so need
% active definitions as the normal characters.
@def@normaldot{.}
@def@normalquest{?}
@def@normalslash{/}
% These look ok in all fonts, so just make them not special.
% @hashchar{} gets its own user-level command, because of #line.
@catcode`@& = @other @def@normalamp{&}
@catcode`@# = @other @def@normalhash{#}
@catcode`@% = @other @def@normalpercent{%}
@let @hashchar = @normalhash
@c Finally, make ` and ' active, so that txicodequoteundirected and
@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we
@c don't make ` and ' active, @code will not get them as active chars.
@c Do this last of all since we use ` in the previous @catcode assignments.
@catcode`@'=@active
@catcode`@`=@active
@markupsetuplqdefault
@markupsetuprqdefault
@c Local variables:
@c eval: (add-hook 'write-file-hooks 'time-stamp)
@c page-delimiter: "^\\\\message"
@c time-stamp-start: "def\\\\texinfoversion{"
@c time-stamp-format: "%:y-%02m-%02d.%02H"
@c time-stamp-end: "}"
@c End:
@c vim:sw=2:
@ignore
arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
@end ignore
mpc-1.1.0/doc/fdl-1.3.texi 0000644 0001751 0001751 00000055606 12426164730 011740 0000000 0000000 @c The GNU Free Documentation License.
@center Version 1.3, 3 November 2008
@c This file is intended to be included within another document,
@c hence no sectioning command or @node.
@display
Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
@uref{http://fsf.org/}
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@end display
@enumerate 0
@item
PREAMBLE
The purpose of this License is to make a manual, textbook, or other
functional and useful document @dfn{free} in the sense of freedom: to
assure everyone the effective freedom to copy and redistribute it,
with or without modifying it, either commercially or noncommercially.
Secondarily, this License preserves for the author and publisher a way
to get credit for their work, while not being considered responsible
for modifications made by others.
This License is a kind of ``copyleft'', which means that derivative
works of the document must themselves be free in the same sense. It
complements the GNU General Public License, which is a copyleft
license designed for free software.
We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does. But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.
@item
APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work, in any medium, that
contains a notice placed by the copyright holder saying it can be
distributed under the terms of this License. Such a notice grants a
world-wide, royalty-free license, unlimited in duration, to use that
work under the conditions stated herein. The ``Document'', below,
refers to any such manual or work. Any member of the public is a
licensee, and is addressed as ``you''. You accept the license if you
copy, modify or distribute the work in a way requiring permission
under copyright law.
A ``Modified Version'' of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
A ``Secondary Section'' is a named appendix or a front-matter section
of the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall
subject (or to related matters) and contains nothing that could fall
directly within that overall subject. (Thus, if the Document is in
part a textbook of mathematics, a Secondary Section may not explain
any mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.
The ``Invariant Sections'' are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License. If a
section does not fit the above definition of Secondary then it is not
allowed to be designated as Invariant. The Document may contain zero
Invariant Sections. If the Document does not identify any Invariant
Sections then there are none.
The ``Cover Texts'' are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License. A Front-Cover Text may
be at most 5 words, and a Back-Cover Text may be at most 25 words.
A ``Transparent'' copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
format whose markup, or absence of markup, has been arranged to thwart
or discourage subsequent modification by readers is not Transparent.
An image format is not Transparent if used for any substantial amount
of text. A copy that is not ``Transparent'' is called ``Opaque''.
Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, La@TeX{} input
format, SGML or XML using a publicly available
DTD, and standard-conforming simple HTML,
PostScript or PDF designed for human modification. Examples
of transparent image formats include PNG, XCF and
JPG. Opaque formats include proprietary formats that can be
read and edited only by proprietary word processors, SGML or
XML for which the DTD and/or processing tools are
not generally available, and the machine-generated HTML,
PostScript or PDF produced by some word processors for
output purposes only.
The ``Title Page'' means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page. For works in
formats which do not have any title page as such, ``Title Page'' means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.
The ``publisher'' means any person or entity that distributes copies
of the Document to the public.
A section ``Entitled XYZ'' means a named subunit of the Document whose
title either is precisely XYZ or contains XYZ in parentheses following
text that translates XYZ in another language. (Here XYZ stands for a
specific section name mentioned below, such as ``Acknowledgements'',
``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
of such a section when you modify the Document means that it remains a
section ``Entitled XYZ'' according to this definition.
The Document may include Warranty Disclaimers next to the notice which
states that this License applies to the Document. These Warranty
Disclaimers are considered to be included by reference in this
License, but only as regards disclaiming warranties: any other
implication that these Warranty Disclaimers may have is void and has
no effect on the meaning of this License.
@item
VERBATIM COPYING
You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and
you may publicly display copies.
@item
COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have
printed covers) of the Document, numbering more than 100, and the
Document's license notice requires Cover Texts, you must enclose the
copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
the full title with all words of the title equally prominent and
visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.
If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a computer-network location from which the general network-using
public has access to download using public-standard network protocols
a complete Transparent copy of the Document, free of added material.
If you use the latter option, you must take reasonably prudent steps,
when you begin distribution of Opaque copies in quantity, to ensure
that this Transparent copy will remain thus accessible at the stated
location until at least one year after the last time you distribute an
Opaque copy (directly or through your agents or retailers) of that
edition to the public.
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
@item
MODIFICATIONS
You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it. In addition, you must do these things in the Modified Version:
@enumerate A
@item
Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions
(which should, if there were any, be listed in the History section
of the Document). You may use the same title as a previous version
if the original publisher of that version gives permission.
@item
List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified
Version, together with at least five of the principal authors of the
Document (all of its principal authors, if it has fewer than five),
unless they release you from this requirement.
@item
State on the Title page the name of the publisher of the
Modified Version, as the publisher.
@item
Preserve all the copyright notices of the Document.
@item
Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.
@item
Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the
terms of this License, in the form shown in the Addendum below.
@item
Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document's license notice.
@item
Include an unaltered copy of this License.
@item
Preserve the section Entitled ``History'', Preserve its Title, and add
to it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
there is no section Entitled ``History'' in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.
@item
Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise
the network locations given in the Document for previous versions
it was based on. These may be placed in the ``History'' section.
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.
@item
For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
the Title of the section, and preserve in the section all the
substance and tone of each of the contributor acknowledgements and/or
dedications given therein.
@item
Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
or the equivalent are not considered part of the section titles.
@item
Delete any section Entitled ``Endorsements''. Such a section
may not be included in the Modified Version.
@item
Do not retitle any existing section to be Entitled ``Endorsements'' or
to conflict in title with any Invariant Section.
@item
Preserve any Warranty Disclaimers.
@end enumerate
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.
You may add a section Entitled ``Endorsements'', provided it contains
nothing but endorsements of your Modified Version by various
parties---for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
@item
COMBINING DOCUMENTS
You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections Entitled ``History''
in the various original documents, forming one section Entitled
``History''; likewise combine any sections Entitled ``Acknowledgements'',
and any sections Entitled ``Dedications''. You must delete all
sections Entitled ``Endorsements.''
@item
COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in
the collection, provided that you follow the rules of this License for
verbatim copying of each of the documents in all other respects.
You may extract a single document from such a collection, and distribute
it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all
other respects regarding verbatim copying of that document.
@item
AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, is called an ``aggregate'' if the copyright
resulting from the compilation is not used to limit the legal rights
of the compilation's users beyond what the individual works permit.
When the Document is included in an aggregate, this License does not
apply to the other works in the aggregate which are not themselves
derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one half of
the entire aggregate, the Document's Cover Texts may be placed on
covers that bracket the Document within the aggregate, or the
electronic equivalent of covers if the Document is in electronic form.
Otherwise they must appear on printed covers that bracket the whole
aggregate.
@item
TRANSLATION
Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section 4.
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
translation of this License, and all the license notices in the
Document, and any Warranty Disclaimers, provided that you also include
the original English version of this License and the original versions
of those notices and disclaimers. In case of a disagreement between
the translation and the original version of this License or a notice
or disclaimer, the original version will prevail.
If a section in the Document is Entitled ``Acknowledgements'',
``Dedications'', or ``History'', the requirement (section 4) to Preserve
its Title (section 1) will typically require changing the actual
title.
@item
TERMINATION
You may not copy, modify, sublicense, or distribute the Document
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense, or distribute it is void, and
will automatically terminate your rights under this License.
However, if you cease all violation of this License, then your license
from a particular copyright holder is reinstated (a) provisionally,
unless and until the copyright holder explicitly and finally
terminates your license, and (b) permanently, if the copyright holder
fails to notify you of the violation by some reasonable means prior to
60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, receipt of a copy of some or all of the same material does
not give you any rights to use it.
@item
FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
@uref{http://www.gnu.org/copyleft/}.
Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
License ``or any later version'' applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation. If the Document
specifies that a proxy can decide which future versions of this
License can be used, that proxy's public statement of acceptance of a
version permanently authorizes you to choose that version for the
Document.
@item
RELICENSING
``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
World Wide Web server that publishes copyrightable works and also
provides prominent facilities for anybody to edit those works. A
public wiki that anybody can edit is an example of such a server. A
``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
site means any set of copyrightable works thus published on the MMC
site.
``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
license published by Creative Commons Corporation, a not-for-profit
corporation with a principal place of business in San Francisco,
California, as well as future copyleft versions of that license
published by that same organization.
``Incorporate'' means to publish or republish a Document, in whole or
in part, as part of another Document.
An MMC is ``eligible for relicensing'' if it is licensed under this
License, and if all works that were first published under this License
somewhere other than this MMC, and subsequently incorporated in whole
or in part into the MMC, (1) had no cover texts or invariant sections,
and (2) were thus incorporated prior to November 1, 2008.
The operator of an MMC Site may republish an MMC contained in the site
under CC-BY-SA on the same site at any time before August 1, 2009,
provided the MMC is eligible for relicensing.
@end enumerate
@page
@heading ADDENDUM: How to use this License for your documents
To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:
@smallexample
@group
Copyright (C) @var{year} @var{your name}.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts. A copy of the license is included in the section entitled ``GNU
Free Documentation License''.
@end group
@end smallexample
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
replace the ``with@dots{}Texts.'' line with this:
@smallexample
@group
with the Invariant Sections being @var{list their titles}, with
the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
being @var{list}.
@end group
@end smallexample
If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.
@c Local Variables:
@c ispell-local-pdict: "ispell-dict"
@c End:
mpc-1.1.0/doc/stamp-vti 0000644 0001751 0001751 00000000143 13225640274 011632 0000000 0000000 @set UPDATED 11 January 2018
@set UPDATED-MONTH January 2018
@set EDITION 1.1.0
@set VERSION 1.1.0
mpc-1.1.0/doc/mdate-sh 0000555 0001751 0001751 00000013637 12645234050 011421 0000000 0000000 #!/bin/sh
# Get modification time of a file or directory and pretty-print it.
scriptversion=2010-08-21.06; # UTC
# Copyright (C) 1995-2014 Free Software Foundation, Inc.
# written by Ulrich Drepper , June 1995
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to or send patches to
# .
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
fi
case $1 in
'')
echo "$0: No file. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: mdate-sh [--help] [--version] FILE
Pretty-print the modification day of FILE, in the format:
1 January 1970
Report bugs to .
EOF
exit $?
;;
-v | --v*)
echo "mdate-sh $scriptversion"
exit $?
;;
esac
error ()
{
echo "$0: $1" >&2
exit 1
}
# Prevent date giving response in another language.
LANG=C
export LANG
LC_ALL=C
export LC_ALL
LC_TIME=C
export LC_TIME
# GNU ls changes its time format in response to the TIME_STYLE
# variable. Since we cannot assume 'unset' works, revert this
# variable to its documented default.
if test "${TIME_STYLE+set}" = set; then
TIME_STYLE=posix-long-iso
export TIME_STYLE
fi
save_arg1=$1
# Find out how to get the extended ls output of a file or directory.
if ls -L /dev/null 1>/dev/null 2>&1; then
ls_command='ls -L -l -d'
else
ls_command='ls -l -d'
fi
# Avoid user/group names that might have spaces, when possible.
if ls -n /dev/null 1>/dev/null 2>&1; then
ls_command="$ls_command -n"
fi
# A 'ls -l' line looks as follows on OS/2.
# drwxrwx--- 0 Aug 11 2001 foo
# This differs from Unix, which adds ownership information.
# drwxrwx--- 2 root root 4096 Aug 11 2001 foo
#
# To find the date, we split the line on spaces and iterate on words
# until we find a month. This cannot work with files whose owner is a
# user named "Jan", or "Feb", etc. However, it's unlikely that '/'
# will be owned by a user whose name is a month. So we first look at
# the extended ls output of the root directory to decide how many
# words should be skipped to get the date.
# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
set x`$ls_command /`
# Find which argument is the month.
month=
command=
until test $month
do
test $# -gt 0 || error "failed parsing '$ls_command /' output"
shift
# Add another shift to the command.
command="$command shift;"
case $1 in
Jan) month=January; nummonth=1;;
Feb) month=February; nummonth=2;;
Mar) month=March; nummonth=3;;
Apr) month=April; nummonth=4;;
May) month=May; nummonth=5;;
Jun) month=June; nummonth=6;;
Jul) month=July; nummonth=7;;
Aug) month=August; nummonth=8;;
Sep) month=September; nummonth=9;;
Oct) month=October; nummonth=10;;
Nov) month=November; nummonth=11;;
Dec) month=December; nummonth=12;;
esac
done
test -n "$month" || error "failed parsing '$ls_command /' output"
# Get the extended ls output of the file or directory.
set dummy x`eval "$ls_command \"\\\$save_arg1\""`
# Remove all preceding arguments
eval $command
# Because of the dummy argument above, month is in $2.
#
# On a POSIX system, we should have
#
# $# = 5
# $1 = file size
# $2 = month
# $3 = day
# $4 = year or time
# $5 = filename
#
# On Darwin 7.7.0 and 7.6.0, we have
#
# $# = 4
# $1 = day
# $2 = month
# $3 = year or time
# $4 = filename
# Get the month.
case $2 in
Jan) month=January; nummonth=1;;
Feb) month=February; nummonth=2;;
Mar) month=March; nummonth=3;;
Apr) month=April; nummonth=4;;
May) month=May; nummonth=5;;
Jun) month=June; nummonth=6;;
Jul) month=July; nummonth=7;;
Aug) month=August; nummonth=8;;
Sep) month=September; nummonth=9;;
Oct) month=October; nummonth=10;;
Nov) month=November; nummonth=11;;
Dec) month=December; nummonth=12;;
esac
case $3 in
???*) day=$1;;
*) day=$3; shift;;
esac
# Here we have to deal with the problem that the ls output gives either
# the time of day or the year.
case $3 in
*:*) set `date`; eval year=\$$#
case $2 in
Jan) nummonthtod=1;;
Feb) nummonthtod=2;;
Mar) nummonthtod=3;;
Apr) nummonthtod=4;;
May) nummonthtod=5;;
Jun) nummonthtod=6;;
Jul) nummonthtod=7;;
Aug) nummonthtod=8;;
Sep) nummonthtod=9;;
Oct) nummonthtod=10;;
Nov) nummonthtod=11;;
Dec) nummonthtod=12;;
esac
# For the first six month of the year the time notation can also
# be used for files modified in the last year.
if (expr $nummonth \> $nummonthtod) > /dev/null;
then
year=`expr $year - 1`
fi;;
*) year=$3;;
esac
# The result.
echo $day $month $year
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
mpc-1.1.0/doc/mpc.info 0000644 0001751 0001751 00000254702 13225640275 011434 0000000 0000000 This is mpc.info, produced by makeinfo version 6.5 from mpc.texi.
This manual is for GNU MPC, a library for multiple precision complex
arithmetic, version 1.1.0 of January 2018.
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013, 2016 INRIA
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
Version 1.3 or any later version published by the Free Software
Foundation; with no Invariant Sections. A copy of the license is
included in the section entitled "GNU Free Documentation License."
INFO-DIR-SECTION GNU Packages
START-INFO-DIR-ENTRY
* mpc: (mpc)Multiple Precision Complex Library.
END-INFO-DIR-ENTRY
File: mpc.info, Node: Top, Next: Copying, Up: (dir)
GNU MPC
*******
This manual documents how to install and use the GNU Multiple Precision
Complex Library, version 1.1.0
* Menu:
* Copying:: GNU MPC Copying Conditions (LGPL).
* Introduction to GNU MPC:: Brief introduction to GNU MPC.
* Installing GNU MPC:: How to configure and compile the GNU MPC library.
* Reporting Bugs:: How to usefully report bugs.
* GNU MPC Basics:: What every GNU MPC user should know.
* Complex Functions:: Functions for arithmetic on complex numbers.
* References::
* Concept Index::
* Function Index::
* GNU Free Documentation License::
File: mpc.info, Node: Copying, Next: Introduction to GNU MPC, Prev: Top, Up: Top
GNU MPC Copying Conditions
**************************
GNU MPC 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.
GNU MPC 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 this program. If not, see
.
File: mpc.info, Node: Introduction to GNU MPC, Next: Installing GNU MPC, Prev: Copying, Up: Top
1 Introduction to GNU MPC
*************************
GNU MPC is a portable library written in C for arbitrary precision
arithmetic on complex numbers providing correct rounding. It implements
a multiprecision equivalent of the C99 standard. It builds upon the GNU
MP and the GNU MPFR libraries.
1.1 How to use this Manual
==========================
Everyone should read *note GNU MPC Basics::. If you need to install the
library yourself, you need to read *note Installing GNU MPC::, too.
The remainder of the manual can be used for later reference, although
it is probably a good idea to skim through it.
File: mpc.info, Node: Installing GNU MPC, Next: Reporting Bugs, Prev: Introduction to GNU MPC, Up: Top
2 Installing GNU MPC
********************
To build GNU MPC, you first have to install GNU MP (version 5.0.0 or
higher) and GNU MPFR (version 3.0.0 or higher) on your computer. You
need a C compiler; GCC version 4.4 or higher is recommended, since GNU
MPC may trigger a bug in previous versions, see the thread at
.
And you need a standard Unix 'make' program, plus some other standard
Unix utility programs.
Here are the steps needed to install the library on Unix systems:
1. 'tar xzf mpc-1.1.0.tar.gz'
2. 'cd mpc-1.1.0'
3. './configure'
if GMP and GNU MPFR are installed into standard directories, that
is, directories that are searched by default by the compiler and
the linking tools.
'./configure --with-gmp='
is used to indicate a different location where GMP is installed.
Alternatively, you can specify directly GMP include and GMP lib
directories with './configure --with-gmp-lib=
--with-gmp-include='.
'./configure --with-mpfr='
is used to indicate a different location where GNU MPFR is
installed. Alternatively, you can specify directly GNU MPFR
include and GNU MPFR lib directories with './configure
--with-mpf-lib=
--with-mpfr-include='.
Another useful parameter is '--prefix', which can be used to
specify an alternative installation location instead of
'/usr/local'; see 'make install' below.
To enable checking for memory leaks using 'valgrind' during 'make
check', add the parameter '--enable-valgrind-tests'.
If for debugging purposes you wish to log calls to GNU MPC
functions from within your code, add the parameter
'--enable-logging'. In your code, replace the inclusion of 'mpc.h'
by 'mpc-log.h' and link the executable dynamically. Then all calls
to functions with only complex arguments are printed to 'stderr' in
the following form: First, the function name is given, followed by
its type such as 'c_cc', meaning that the function has one complex
result (one 'c' in front of the '_'), computed from two complex
arguments (two 'c' after the '_'). Then, the precisions of the
real and the imaginary part of the first result is given, followed
by the second one and so on. Finally, for each argument, the
precisions of its real and imaginary part are specified and the
argument itself is printed in hexadecimal via the function
'mpc_out_str' (*note String and Stream Input and Output::). The
option requires a dynamic library, so it may not be combined with
'--disable-shared'.
Use './configure --help' for an exhaustive list of parameters.
4. 'make'
This compiles GNU MPC in the working directory.
5. 'make check'
This will make sure GNU MPC was built correctly.
If you get error messages, please report them to
'mpc-discuss@lists.gforge.inria.fr' (*Note Reporting Bugs::, for
information on what to include in useful bug reports).
6. 'make install'
This will copy the file 'mpc.h' to the directory
'/usr/local/include', the file 'libmpc.a' to the directory
'/usr/local/lib', and the file 'mpc.info' to the directory
'/usr/local/share/info' (or if you passed the '--prefix' option to
'configure', using the prefix directory given as argument to
'--prefix' instead of '/usr/local'). Note: you need write
permissions on these directories.
2.1 Other 'make' Targets
========================
There are some other useful make targets:
* 'info'
Create an info version of the manual, in 'mpc.info'.
* 'pdf'
Create a PDF version of the manual, in 'doc/mpc.pdf'.
* 'dvi'
Create a DVI version of the manual, in 'doc/mpc.dvi'.
* 'ps'
Create a Postscript version of the manual, in 'doc/mpc.ps'.
* 'html'
Create an HTML version of the manual, in several pages in the
directory 'doc/mpc.html'; if you want only one output HTML file,
then type 'makeinfo --html --no-split mpc.texi' instead.
* 'clean'
Delete all object files and archive files, but not the
configuration files.
* 'distclean'
Delete all files not included in the distribution.
* 'uninstall'
Delete all files copied by 'make install'.
2.2 Known Build Problems
========================
On AIX, if GMP was built with the 64-bit ABI, before building and
testing GNU MPC, it might be necessary to set the 'OBJECT_MODE'
environment variable to 64 by, e.g.,
'export OBJECT_MODE=64'
This has been tested with the C compiler IBM XL C/C++ Enterprise
Edition V8.0 for AIX, version: 08.00.0000.0021, GMP 4.2.4 and GNU MPFR
2.4.1.
Please report any other problems you encounter to
'mpc-discuss@lists.gforge.inria.fr'. *Note Reporting Bugs::.
File: mpc.info, Node: Reporting Bugs, Next: GNU MPC Basics, Prev: Installing GNU MPC, Up: Top
3 Reporting Bugs
****************
If you think you have found a bug in the GNU MPC library, please
investigate and report it. We have made this library available to you,
and it is not to ask too much from you, to ask you to report the bugs
that you find.
There are a few things you should think about when you put your bug
report together.
You have to send us a test case that makes it possible for us to
reproduce the bug. Include instructions on how to run the test case.
You also have to explain what is wrong; if you get a crash, or if the
results printed are incorrect and in that case, in what way.
Please include compiler version information in your bug report. This
can be extracted using 'gcc -v', or 'cc -V' on some machines. Also,
include the output from 'uname -a'.
If your bug report is good, we will do our best to help you to get a
corrected version of the library; if the bug report is poor, we will not
do anything about it (aside of chiding you to send better bug reports).
Send your bug report to: 'mpc-discuss@lists.gforge.inria.fr'.
If you think something in this manual is unclear, or downright
incorrect, or if the language needs to be improved, please send a note
to the same address.
File: mpc.info, Node: GNU MPC Basics, Next: Complex Functions, Prev: Reporting Bugs, Up: Top
4 GNU MPC Basics
****************
All declarations needed to use GNU MPC are collected in the include file
'mpc.h'. It is designed to work with both C and C++ compilers. You
should include that file in any program using the GNU MPC library by
adding the line
#include "mpc.h"
4.1 Nomenclature and Types
==========================
"Complex number" or "Complex" for short, is a pair of two arbitrary
precision floating-point numbers (for the real and imaginary parts).
The C data type for such objects is 'mpc_t'.
The "Precision" is the number of bits used to represent the mantissa of
the real and imaginary parts; the corresponding C data type is
'mpfr_prec_t'. For more details on the allowed precision range, *note
(mpfr.info)Nomenclature and Types::.
The "rounding mode" specifies the way to round the result of a complex
operation, in case the exact result can not be represented exactly in
the destination mantissa; the corresponding C data type is 'mpc_rnd_t'.
A complex rounding mode is a pair of two rounding modes: one for the
real part, one for the imaginary part.
4.2 Function Classes
====================
There is only one class of functions in the GNU MPC library, namely
functions for complex arithmetic. The function names begin with 'mpc_'.
The associated type is 'mpc_t'.
4.3 GNU MPC Variable Conventions
================================
As a general rule, all GNU MPC functions expect output arguments before
input arguments. This notation is based on an analogy with the
assignment operator.
GNU MPC allows you to use the same variable for both input and output
in the same expression. For example, the main function for
floating-point multiplication, 'mpc_mul', can be used like this:
'mpc_mul (x, x, x, rnd_mode)'. This computes the square of X with
rounding mode 'rnd_mode' and puts the result back in X.
Before you can assign to an GNU MPC variable, you need to initialise
it by calling one of the special initialization functions. When you are
done with a variable, you need to clear it out, using one of the
functions for that purpose.
A variable should only be initialised once, or at least cleared out
between each initialization. After a variable has been initialised, it
may be assigned to any number of times.
For efficiency reasons, avoid to initialise and clear out a variable
in loops. Instead, initialise it before entering the loop, and clear it
out after the loop has exited.
You do not need to be concerned about allocating additional space for
GNU MPC variables, since each of its real and imaginary part has a
mantissa of fixed size. Hence unless you change its precision, or clear
and reinitialise it, a complex variable will have the same allocated
space during all its life.
4.4 Rounding Modes
==================
A complex rounding mode is of the form 'MPC_RNDxy' where 'x' and 'y' are
one of 'N' (to nearest), 'Z' (towards zero), 'U' (towards plus
infinity), 'D' (towards minus infinity). The first letter refers to the
rounding mode for the real part, and the second one for the imaginary
part. For example 'MPC_RNDZU' indicates to round the real part towards
zero, and the imaginary part towards plus infinity.
The 'round to nearest' mode works as in the IEEE P754 standard: in
case the number to be rounded lies exactly in the middle of two
representable numbers, it is rounded to the one with the least
significant bit set to zero. For example, the number 5, which is
represented by (101) in binary, is rounded to (100)=4 with a precision
of two bits, and not to (110)=6.
4.5 Return Value
================
Most GNU MPC functions have a return value of type 'int', which is used
to indicate the position of the rounded real and imaginary parts with
respect to the exact (infinite precision) values. If this integer is
'i', the macros 'MPC_INEX_RE(i)' and 'MPC_INEX_IM(i)' give 0 if the
corresponding rounded value is exact, a negative value if the rounded
value is less than the exact one, and a positive value if it is greater
than the exact one. Similarly, functions computing a result of type
'mpfr_t' return an integer that is 0, positive or negative depending on
whether the rounded value is the same, larger or smaller then the exact
result.
Some functions, such as 'mpc_sin_cos', compute two complex results;
the macros 'MPC_INEX1(i)' and 'MPC_INEX2(i)', applied to the return
value 'i' of such a function, yield the exactness value corresponding to
the first or the second computed value, respectively.
4.6 Branch Cuts And Special Values
==================================
Some complex functions have branch cuts, across which the function is
discontinous. In GNU MPC, the branch cuts chosen are the same as those
specified for the corresponding functions in the ISO C99 standard.
Likewise, when evaluated at a point whose real or imaginary part is
either infinite or a NaN or a signed zero, a function returns the same
value as those specified for the corresponding function in the ISO C99
standard.
File: mpc.info, Node: Complex Functions, Next: References, Prev: GNU MPC Basics, Up: Top
5 Complex Functions
*******************
The complex functions expect arguments of type 'mpc_t'.
The GNU MPC floating-point functions have an interface that is
similar to the GNU MP integer functions. The function prefix for
operations on complex numbers is 'mpc_'.
The precision of a computation is defined as follows: Compute the
requested operation exactly (with "infinite precision"), and round the
result to the destination variable precision with the given rounding
mode.
The GNU MPC complex functions are intended to be a smooth extension
of the IEEE P754 arithmetic. The results obtained on one computer
should not differ from the results obtained on a computer with a
different word size.
* Menu:
* Initializing Complex Numbers::
* Assigning Complex Numbers::
* Converting Complex Numbers::
* String and Stream Input and Output::
* Complex Comparison::
* Projection & Decomposing::
* Basic Arithmetic::
* Power Functions and Logarithm::
* Trigonometric Functions::
* Miscellaneous Complex Functions::
* Advanced Functions::
* Internals::
File: mpc.info, Node: Initializing Complex Numbers, Next: Assigning Complex Numbers, Up: Complex Functions
5.1 Initialization Functions
============================
An 'mpc_t' object must be initialised before storing the first value in
it. The functions 'mpc_init2' and 'mpc_init3' are used for that
purpose.
-- Function: void mpc_init2 (mpc_t Z, mpfr_prec_t PREC)
Initialise Z to precision PREC bits and set its real and imaginary
parts to NaN. Normally, a variable should be initialised once only
or at least be cleared, using 'mpc_clear', between initializations.
-- Function: void mpc_init3 (mpc_t Z, mpfr_prec_t PREC_R, mpfr_prec_t
PREC_I)
Initialise Z with the precision of its real part being PREC_R bits
and the precision of its imaginary part being PREC_I bits, and set
the real and imaginary parts to NaN.
-- Function: void mpc_clear (mpc_t Z)
Free the space occupied by Z. Make sure to call this function for
all 'mpc_t' variables when you are done with them.
Here is an example on how to initialise complex variables:
{
mpc_t x, y;
mpc_init2 (x, 256); /* precision _exactly_ 256 bits */
mpc_init3 (y, 100, 50); /* 100/50 bits for the real/imaginary part */
...
mpc_clear (x);
mpc_clear (y);
}
The following function is useful for changing the precision during a
calculation. A typical use would be for adjusting the precision
gradually in iterative algorithms like Newton-Raphson, making the
computation precision closely match the actual accurate part of the
numbers.
-- Function: void mpc_set_prec (mpc_t X, mpfr_prec_t PREC)
Reset the precision of X to be *exactly* PREC bits, and set its
real/imaginary parts to NaN. The previous value stored in X is
lost. It is equivalent to a call to 'mpc_clear(x)' followed by a
call to 'mpc_init2(x, prec)', but more efficient as no allocation
is done in case the current allocated space for the mantissa of X
is sufficient.
-- Function: mpfr_prec_t mpc_get_prec (mpc_t X)
If the real and imaginary part of X have the same precision, it is
returned, otherwise, 0 is returned.
-- Function: void mpc_get_prec2 (mpfr_prec_t* PR, mpfr_prec_t* PI,
mpc_t X)
Returns the precision of the real part of X via PR and of its
imaginary part via PI.
File: mpc.info, Node: Assigning Complex Numbers, Next: Converting Complex Numbers, Prev: Initializing Complex Numbers, Up: Complex Functions
5.2 Assignment Functions
========================
These functions assign new values to already initialised complex numbers
(*note Initializing Complex Numbers::). When using any functions with
'intmax_t' or 'uintmax_t' parameters, you must include '' or
'' _before_ 'mpc.h', to allow 'mpc.h' to define prototypes
for these functions. Similarly, functions with parameters of type
'complex' or 'long complex' are defined only if '' is
included _before_ 'mpc.h'. If you need assignment functions that are
not in the current API, you can define them using the 'MPC_SET_X_Y'
macro (*note Advanced Functions::).
-- Function: int mpc_set (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
Set the value of ROP from OP, rounded to the precision of ROP with
the given rounding mode RND.
-- Function: int mpc_set_ui (mpc_t ROP, unsigned long int OP, mpc_rnd_t
RND)
-- Function: int mpc_set_si (mpc_t ROP, long int OP, mpc_rnd_t RND)
-- Function: int mpc_set_uj (mpc_t ROP, uintmax_t OP, mpc_rnd_t RND)
-- Function: int mpc_set_sj (mpc_t ROP, intmax_t OP, mpc_rnd_t RND)
-- Function: int mpc_set_d (mpc_t ROP, double OP, mpc_rnd_t RND)
-- Function: int mpc_set_ld (mpc_t ROP, long double OP, mpc_rnd_t RND)
-- Function: int mpc_set_dc (mpc_t ROP, double _Complex OP, mpc_rnd_t
RND)
-- Function: int mpc_set_ldc (mpc_t ROP, long double _Complex OP,
mpc_rnd_t RND)
-- Function: int mpc_set_z (mpc_t ROP, mpz_t OP mpc_rnd_t RND)
-- Function: int mpc_set_q (mpc_t ROP, mpq_t OP mpc_rnd_t RND)
-- Function: int mpc_set_f (mpc_t ROP, mpf_t OP mpc_rnd_t RND)
-- Function: int mpc_set_fr (mpc_t ROP, mpfr_t OP, mpc_rnd_t RND)
Set the value of ROP from OP, rounded to the precision of ROP with
the given rounding mode RND. The argument OP is interpreted as
real, so the imaginary part of ROP is set to zero with a positive
sign. Please note that even a 'long int' may have to be rounded,
if the destination precision is less than the machine word width.
For 'mpc_set_d', be careful that the input number OP may not be
exactly representable as a double-precision number (this happens
for 0.1 for instance), in which case it is first rounded by the C
compiler to a double-precision number, and then only to a complex
number.
-- Function: int mpc_set_ui_ui (mpc_t ROP, unsigned long int OP1,
unsigned long int OP2, mpc_rnd_t RND)
-- Function: int mpc_set_si_si (mpc_t ROP, long int OP1, long int OP2,
mpc_rnd_t RND)
-- Function: int mpc_set_uj_uj (mpc_t ROP, uintmax_t OP1, uintmax_t
OP2, mpc_rnd_t RND)
-- Function: int mpc_set_sj_sj (mpc_t ROP, intmax_t OP1, intmax_t OP2,
mpc_rnd_t RND)
-- Function: int mpc_set_d_d (mpc_t ROP, double OP1, double OP2,
mpc_rnd_t RND)
-- Function: int mpc_set_ld_ld (mpc_t ROP, long double OP1, long double
OP2, mpc_rnd_t RND)
-- Function: int mpc_set_z_z (mpc_t ROP, mpz_t OP1, mpz_t OP2,
mpc_rnd_t RND)
-- Function: int mpc_set_q_q (mpc_t ROP, mpq_t OP1, mpq_t OP2,
mpc_rnd_t RND)
-- Function: int mpc_set_f_f (mpc_t ROP, mpf_t OP1, mpf_t OP2,
mpc_rnd_t RND)
-- Function: int mpc_set_fr_fr (mpc_t ROP, mpfr_t OP1, mpfr_t OP2,
mpc_rnd_t RND)
Set the real part of ROP from OP1, and its imaginary part from OP2,
according to the rounding mode RND.
Beware that the behaviour of 'mpc_set_fr_fr' is undefined if OP1 or
OP2 is a pointer to the real or imaginary part of ROP. To exchange
the real and the imaginary part of a complex number, either use
'mpfr_swap (mpc_realref (rop), mpc_imagref (rop))', which also
exchanges the precisions of the two parts; or use a temporary
variable.
For functions assigning complex variables from strings or input
streams, *note String and Stream Input and Output::.
-- Function: void mpc_set_nan (mpc_t ROP)
Set ROP to Nan+i*NaN.
-- Function: void mpc_swap (mpc_t OP1, mpc_t OP2)
Swap the values of OP1 and OP2 efficiently. Warning: The
precisions are exchanged, too; in case these are different,
'mpc_swap' is thus not equivalent to three 'mpc_set' calls using a
third auxiliary variable.
File: mpc.info, Node: Converting Complex Numbers, Next: String and Stream Input and Output, Prev: Assigning Complex Numbers, Up: Complex Functions
5.3 Conversion Functions
========================
The following functions are available only if '' is included
_before_ 'mpc.h'.
-- Function: double _Complex mpc_get_dc (mpc_t OP, mpc_rnd_t RND)
-- Function: long double _Complex mpc_get_ldc (mpc_t OP, mpc_rnd_t RND)
Convert OP to a C complex number, using the rounding mode RND.
For functions converting complex variables to strings or stream
output, *note String and Stream Input and Output::.
File: mpc.info, Node: String and Stream Input and Output, Next: Complex Comparison, Prev: Converting Complex Numbers, Up: Complex Functions
5.4 String and Stream Input and Output
======================================
-- Function: int mpc_strtoc (mpc_t ROP, const char *NPTR, char
**ENDPTR, int BASE, mpc_rnd_t RND)
Read a complex number from a string NPTR in base BASE, rounded to
the precision of ROP with the given rounding mode RND. The BASE
must be either 0 or a number from 2 to 36 (otherwise the behaviour
is undefined). If NPTR starts with valid data, the result is
stored in ROP, the usual inexact value is returned (*note Return
Value: return-value.) and, if ENDPTR is not the null pointer,
*ENDPTR points to the character just after the valid data.
Otherwise, ROP is set to 'NaN + i * NaN', -1 is returned and, if
ENDPTR is not the null pointer, the value of NPTR is stored in the
location referenced by ENDPTR.
The expected form of a complex number string is either a real
number (an optional leading whitespace, an optional sign followed
by a floating-point number), or a pair of real numbers in
parentheses separated by whitespace. If a real number is read, the
missing imaginary part is set to +0. The form of a floating-point
number depends on the base and is described in the documentation of
'mpfr_strtofr' (*note (mpfr.info)Assignment Functions::). For
instance, '"3.1415926"', '"(1.25e+7 +.17)"', '"(@nan@ 2)"' and
'"(-0 -7)"' are valid strings for BASE = 10. If BASE = 0, then a
prefix may be used to indicate the base in which the floating-point
number is written. Use prefix '0b' for binary numbers, prefix '0x'
for hexadecimal numbers, and no prefix for decimal numbers. The
real and imaginary part may then be written in different bases.
For instance, '"(1.024e+3 +2.05e+3)"' and '"(0b1p+10 +0x802)"' are
valid strings for 'base'=0 and represent the same value.
-- Function: int mpc_set_str (mpc_t ROP, const char *S, int BASE,
mpc_rnd_t rnd)
Set ROP to the value of the string S in base BASE, rounded to the
precision of ROP with the given rounding mode RND. See the
documentation of 'mpc_strtoc' for a detailed description of the
valid string formats. Contrarily to 'mpc_strtoc', 'mpc_set_str'
requires the _whole_ string to represent a valid complex number
(potentially followed by additional white space). This function
returns the usual inexact value (*note Return Value: return-value.)
if the entire string up to the final null character is a valid
number in base BASE; otherwise it returns -1, and ROP is set to
NaN+i*NaN.
-- Function: char * mpc_get_str (int B, size_t N, mpc_t OP, mpc_rnd_t
RND)
Convert OP to a string containing its real and imaginary parts,
separated by a space and enclosed in a pair of parentheses. The
numbers are written in base B (which may vary from 2 to 36) and
rounded according to RND. The number of significant digits, at
least 2, is given by N. It is also possible to let N be zero, in
which case the number of digits is chosen large enough so that
re-reading the printed value with the same precision, assuming both
output and input use rounding to nearest, will recover the original
value of OP. Note that 'mpc_get_str' uses the decimal point of the
current locale if available, and '.' otherwise.
The string is generated using the current memory allocation
function ('malloc' by default, unless it has been modified using
the custom memory allocation interface of 'gmp'); once it is not
needed any more, it should be freed by calling 'mpc_free_str'.
-- Function: void mpc_free_str (char *STR)
Free the string STR, which needs to have been allocated by a call
to 'mpc_get_str'.
The following two functions read numbers from input streams and write
them to output streams. When using any of these functions, you need to
include 'stdio.h' _before_ 'mpc.h'.
-- Function: int mpc_inp_str (mpc_t ROP, FILE *STREAM, size_t *READ,
int BASE, mpc_rnd_t RND)
Input a string in base BASE in the same format as for 'mpc_strtoc'
from stdio stream STREAM, rounded according to RND, and put the
read complex number into ROP. If STREAM is the null pointer, ROP
is read from 'stdin'. Return the usual inexact value; if an error
occurs, set ROP to 'NaN + i * NaN' and return -1. If READ is not
the null pointer, it is set to the number of read characters.
Unlike 'mpc_strtoc', the function 'mpc_inp_str' does not possess
perfect knowledge of the string to transform and has to read it
character by character, so it behaves slightly differently: It
tries to read a string describing a complex number and processes
this string through a call to 'mpc_set_str'. Precisely, after
skipping optional whitespace, a minimal string is read according to
the regular expression 'mpfr | '(' \s* mpfr \s+ mpfr \s* ')'',
where '\s' denotes a whitespace, and 'mpfr' is either a string
containing neither whitespaces nor parentheses, or
'nan(n-char-sequence)' or '@nan@(n-char-sequence)' (regardless of
capitalisation) with 'n-char-sequence' a string of ascii letters,
digits or ''_''.
For instance, upon input of '"nan(13 1)"', the function
'mpc_inp_str' starts to recognise a value of NaN followed by an
n-char-sequence indicated by the opening parenthesis; as soon as
the space is reached, it becomes clear that the expression in
parentheses is not an n-char-sequence, and the error flag -1 is
returned after 6 characters have been consumed from the stream (the
whitespace itself remaining in the stream). The function
'mpc_strtoc', on the other hand, may track back when reaching the
whitespace; it treats the string as the two successive complex
numbers 'NaN + i * 0' and '13 + i'. It is thus recommended to have
a whitespace follow each floating point number to avoid this
problem.
-- Function: size_t mpc_out_str (FILE *STREAM, int BASE, size_t
N_DIGITS, mpc_t OP, mpc_rnd_t RND)
Output OP on stdio stream STREAM in base BASE, rounded according to
RND, in the same format as for 'mpc_strtoc' If STREAM is the null
pointer, ROP is written to 'stdout'.
Return the number of characters written.
File: mpc.info, Node: Complex Comparison, Next: Projection & Decomposing, Prev: String and Stream Input and Output, Up: Complex Functions
5.5 Comparison Functions
========================
-- Function: int mpc_cmp (mpc_t OP1, mpc_t OP2)
-- Function: int mpc_cmp_si_si (mpc_t OP1, long int OP2R, long int
OP2I)
-- Macro: int mpc_cmp_si (mpc_t OP1, long int OP2)
Compare OP1 and OP2, where in the case of 'mpc_cmp_si_si', OP2 is
taken to be OP2R + i OP2I. The return value C can be decomposed
into 'x = MPC_INEX_RE(c)' and 'y = MPC_INEX_IM(c)', such that X is
positive if the real part of OP1 is greater than that of OP2, zero
if both real parts are equal, and negative if the real part of OP1
is less than that of OP2, and likewise for Y. Both OP1 and OP2 are
considered to their full own precision, which may differ. It is
not allowed that one of the operands has a NaN (Not-a-Number) part.
The storage of the return value is such that equality can be simply
checked with 'mpc_cmp (op1, op2) == 0'.
-- Function: int mpc_cmp_abs (mpc_t OP1, mpc_t OP2)
Compare the absolute values of OP1 and OP2. The return value is 0
if both are the same (including infinity), positive if the absolute
value of OP1 is greater than that of OP2, and negative if it is
smaller. If OP1 or OP2 has a real or imaginary part which is NaN,
the function behaves like 'mpfr_cmp' on two real numbers of which
at least one is NaN.
File: mpc.info, Node: Projection & Decomposing, Next: Basic Arithmetic, Prev: Complex Comparison, Up: Complex Functions
5.6 Projection and Decomposing Functions
========================================
-- Function: int mpc_real (mpfr_t ROP, mpc_t OP, mpfr_rnd_t RND)
Set ROP to the value of the real part of OP rounded in the
direction RND.
-- Function: int mpc_imag (mpfr_t ROP, mpc_t OP, mpfr_rnd_t RND)
Set ROP to the value of the imaginary part of OP rounded in the
direction RND.
-- Macro: mpfr_t mpc_realref (mpc_t OP)
-- Macro: mpfr_t mpc_imagref (mpc_t OP)
Return a reference to the real part and imaginary part of OP,
respectively. The 'mpfr' functions can be used on the result of
these macros (note that the 'mpfr_t' type is itself a pointer).
-- Function: int mpc_arg (mpfr_t ROP, mpc_t OP, mpfr_rnd_t RND)
Set ROP to the argument of OP, with a branch cut along the negative
real axis.
-- Function: int mpc_proj (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
Compute a projection of OP onto the Riemann sphere. Set ROP to OP
rounded in the direction RND, except when at least one part of OP
is infinite (even if the other part is a NaN) in which case the
real part of ROP is set to plus infinity and its imaginary part to
a signed zero with the same sign as the imaginary part of OP.
File: mpc.info, Node: Basic Arithmetic, Next: Power Functions and Logarithm, Prev: Projection & Decomposing, Up: Complex Functions
5.7 Basic Arithmetic Functions
==============================
All the following functions are designed in such a way that, when
working with real numbers instead of complex numbers, their complexity
should essentially be the same as with the GNU MPFR library, with only a
marginal overhead due to the GNU MPC layer.
-- Function: int mpc_add (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_rnd_t
RND)
-- Function: int mpc_add_ui (mpc_t ROP, mpc_t OP1, unsigned long int
OP2, mpc_rnd_t RND)
-- Function: int mpc_add_fr (mpc_t ROP, mpc_t OP1, mpfr_t OP2,
mpc_rnd_t RND)
Set ROP to OP1 + OP2 rounded according to RND.
-- Function: int mpc_sub (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_rnd_t
RND)
-- Function: int mpc_sub_fr (mpc_t ROP, mpc_t OP1, mpfr_t OP2,
mpc_rnd_t RND)
-- Function: int mpc_fr_sub (mpc_t ROP, mpfr_t OP1, mpc_t OP2,
mpc_rnd_t RND)
-- Function: int mpc_sub_ui (mpc_t ROP, mpc_t OP1, unsigned long int
OP2, mpc_rnd_t RND)
-- Macro: int mpc_ui_sub (mpc_t ROP, unsigned long int OP1, mpc_t OP2,
mpc_rnd_t RND)
-- Function: int mpc_ui_ui_sub (mpc_t ROP, unsigned long int RE1,
unsigned long int IM1, mpc_t OP2, mpc_rnd_t RND)
Set ROP to OP1 - OP2 rounded according to RND. For
'mpc_ui_ui_sub', OP1 is RE1 + IM1.
-- Function: int mpc_neg (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
Set ROP to -OP rounded according to RND. Just changes the sign if
ROP and OP are the same variable.
-- Function: int mpc_mul (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_rnd_t
RND)
-- Function: int mpc_mul_ui (mpc_t ROP, mpc_t OP1, unsigned long int
OP2, mpc_rnd_t RND)
-- Function: int mpc_mul_si (mpc_t ROP, mpc_t OP1, long int OP2,
mpc_rnd_t RND)
-- Function: int mpc_mul_fr (mpc_t ROP, mpc_t OP1, mpfr_t OP2,
mpc_rnd_t RND)
Set ROP to OP1 times OP2 rounded according to RND. Note: for
'mpc_mul', in case OP1 and OP2 have the same value, use 'mpc_sqr'
for better efficiency.
-- Function: int mpc_mul_i (mpc_t ROP, mpc_t OP, int SGN, mpc_rnd_t
RND)
Set ROP to OP times the imaginary unit i if SGN is non-negative,
set ROP to OP times -i otherwise, in both cases rounded according
to RND.
-- Function: int mpc_sqr (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
Set ROP to the square of OP rounded according to RND.
-- Function: int mpc_fma (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_t OP3,
mpc_rnd_t RND)
Set ROP to OP1*OP2+OP3, rounded according to RND, with only one
final rounding.
-- Function: int mpc_div (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_rnd_t
RND)
-- Function: int mpc_div_ui (mpc_t ROP, mpc_t OP1, unsigned long int
OP2, mpc_rnd_t RND)
-- Function: int mpc_div_fr (mpc_t ROP, mpc_t OP1, mpfr_t OP2,
mpc_rnd_t RND)
-- Function: int mpc_ui_div (mpc_t ROP, unsigned long int OP1, mpc_t
OP2, mpc_rnd_t RND)
-- Function: int mpc_fr_div (mpc_t ROP, mpfr_t OP1, mpc_t OP2,
mpc_rnd_t RND)
Set ROP to OP1/OP2 rounded according to RND.
-- Function: int mpc_conj (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
Set ROP to the conjugate of OP rounded according to RND. Just
changes the sign of the imaginary part if ROP and OP are the same
variable.
-- Function: int mpc_abs (mpfr_t ROP, mpc_t OP, mpfr_rnd_t RND)
Set the floating-point number ROP to the absolute value of OP,
rounded in the direction RND.
-- Function: int mpc_norm (mpfr_t ROP, mpc_t OP, mpfr_rnd_t RND)
Set the floating-point number ROP to the norm of OP (i.e., the
square of its absolute value), rounded in the direction RND.
-- Function: int mpc_mul_2ui (mpc_t ROP, mpc_t OP1, unsigned long int
OP2, mpc_rnd_t RND)
-- Function: int mpc_mul_2si (mpc_t ROP, mpc_t OP1, long int OP2,
mpc_rnd_t RND)
Set ROP to OP1 times 2 raised to OP2 rounded according to RND.
Just modifies the exponents of the real and imaginary parts by OP2
when ROP and OP1 are identical.
-- Function: int mpc_div_2ui (mpc_t ROP, mpc_t OP1, unsigned long int
OP2, mpc_rnd_t RND)
-- Function: int mpc_div_2si (mpc_t ROP, mpc_t OP1, long int OP2,
mpc_rnd_t RND)
Set ROP to OP1 divided by 2 raised to OP2 rounded according to RND.
Just modifies the exponents of the real and imaginary parts by OP2
when ROP and OP1 are identical.
File: mpc.info, Node: Power Functions and Logarithm, Next: Trigonometric Functions, Prev: Basic Arithmetic, Up: Complex Functions
5.8 Power Functions and Logarithm
=================================
-- Function: int mpc_sqrt (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
Set ROP to the square root of OP rounded according to RND. The
returned value ROP has a non-negative real part, and if its real
part is zero, a non-negative imaginary part.
-- Function: int mpc_pow (mpc_t ROP, mpc_t OP1, mpc_t OP2, mpc_rnd_t
RND)
-- Function: int mpc_pow_d (mpc_t ROP, mpc_t OP1, double OP2, mpc_rnd_t
RND)
-- Function: int mpc_pow_ld (mpc_t ROP, mpc_t OP1, long double OP2,
mpc_rnd_t RND)
-- Function: int mpc_pow_si (mpc_t ROP, mpc_t OP1, long OP2, mpc_rnd_t
RND)
-- Function: int mpc_pow_ui (mpc_t ROP, mpc_t OP1, unsigned long OP2,
mpc_rnd_t RND)
-- Function: int mpc_pow_z (mpc_t ROP, mpc_t OP1, mpz_t OP2, mpc_rnd_t
RND)
-- Function: int mpc_pow_fr (mpc_t ROP, mpc_t OP1, mpfr_t OP2,
mpc_rnd_t RND)
Set ROP to OP1 raised to the power OP2, rounded according to RND.
For 'mpc_pow_d', 'mpc_pow_ld', 'mpc_pow_si', 'mpc_pow_ui',
'mpc_pow_z' and 'mpc_pow_fr', the imaginary part of OP2 is
considered as +0. When both OP1 and OP2 are zero, the result has
real part 1, and imaginary part 0, with sign being the opposite of
that of OP2.
-- Function: int mpc_exp (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
Set ROP to the exponential of OP, rounded according to RND with the
precision of ROP.
-- Function: int mpc_log (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
-- Function: int mpc_log10 (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
Set ROP to the natural and base-10 logarithm of OP respectively,
rounded according to RND with the precision of ROP. The principal
branch is chosen, with the branch cut on the negative real axis, so
that the imaginary part of the result lies in ]-\pi , \pi] and
]-\pi/log(10) , \pi/log(10)] respectively.
-- Function: int mpc_rootofunity (mpc_t ROP, unsigned long int N,
unsigned long int K, mpc_rnd_t RND)
Set ROP to the standard primitive N-th root of unity raised to the
power K, that is, \exp (2 \pi i k / n), rounded according to RND
with the precision of ROP.
File: mpc.info, Node: Trigonometric Functions, Next: Miscellaneous Complex Functions, Prev: Power Functions and Logarithm, Up: Complex Functions
5.9 Trigonometric Functions
===========================
-- Function: int mpc_sin (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
Set ROP to the sine of OP, rounded according to RND with the
precision of ROP.
-- Function: int mpc_cos (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
Set ROP to the cosine of OP, rounded according to RND with the
precision of ROP.
-- Function: int mpc_sin_cos (mpc_t ROP_SIN, mpc_t ROP_COS, mpc_t OP,
mpc_rnd_t RND_SIN, mpc_rnd_t RND_COS)
Set ROP_SIN to the sine of OP, rounded according to RND_SIN with
the precision of ROP_SIN, and ROP_COS to the cosine of OP, rounded
according to RND_COS with the precision of ROP_COS.
-- Function: int mpc_tan (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
Set ROP to the tangent of OP, rounded according to RND with the
precision of ROP.
-- Function: int mpc_sinh (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
Set ROP to the hyperbolic sine of OP, rounded according to RND with
the precision of ROP.
-- Function: int mpc_cosh (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
Set ROP to the hyperbolic cosine of OP, rounded according to RND
with the precision of ROP.
-- Function: int mpc_tanh (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
Set ROP to the hyperbolic tangent of OP, rounded according to RND
with the precision of ROP.
-- Function: int mpc_asin (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
-- Function: int mpc_acos (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
-- Function: int mpc_atan (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
Set ROP to the inverse sine, inverse cosine, inverse tangent of OP,
rounded according to RND with the precision of ROP.
-- Function: int mpc_asinh (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
-- Function: int mpc_acosh (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
-- Function: int mpc_atanh (mpc_t ROP, mpc_t OP, mpc_rnd_t RND)
Set ROP to the inverse hyperbolic sine, inverse hyperbolic cosine,
inverse hyperbolic tangent of OP, rounded according to RND with the
precision of ROP. The branch cut of MPC_ACOSH is (-\infty, 1).
File: mpc.info, Node: Miscellaneous Complex Functions, Next: Advanced Functions, Prev: Trigonometric Functions, Up: Complex Functions
5.10 Miscellaneous Functions
============================
-- Function: int mpc_urandom (mpc_t ROP, gmp_randstate_t STATE)
Generate a uniformly distributed random complex in the unit square
[0, 1] x [0, 1]. Return 0, unless an exponent in the real or
imaginary part is not in the current exponent range, in which case
that part is set to NaN and a zero value is returned. The second
argument is a 'gmp_randstate_t' structure which should be created
using the GMP 'rand_init' function, see the GMP manual.
-- Function: const char * mpc_get_version (void)
Return the GNU MPC version, as a null-terminated string.
-- Macro: MPC_VERSION
-- Macro: MPC_VERSION_MAJOR
-- Macro: MPC_VERSION_MINOR
-- Macro: MPC_VERSION_PATCHLEVEL
-- Macro: MPC_VERSION_STRING
'MPC_VERSION' is the version of GNU MPC as a preprocessing
constant. 'MPC_VERSION_MAJOR', 'MPC_VERSION_MINOR' and
'MPC_VERSION_PATCHLEVEL' are respectively the major, minor and
patch level of GNU MPC version, as preprocessing constants.
'MPC_VERSION_STRING' is the version as a string constant, which can
be compared to the result of 'mpc_get_version' to check at run time
the header file and library used match:
if (strcmp (mpc_get_version (), MPC_VERSION_STRING))
fprintf (stderr, "Warning: header and library do not match\n");
Note: Obtaining different strings is not necessarily an error, as
in general, a program compiled with some old GNU MPC version can be
dynamically linked with a newer GNU MPC library version (if allowed
by the library versioning system).
-- Macro: long MPC_VERSION_NUM (MAJOR, MINOR, PATCHLEVEL)
Create an integer in the same format as used by 'MPC_VERSION' from
the given MAJOR, MINOR and PATCHLEVEL. Here is an example of how
to check the GNU MPC version at compile time:
#if (!defined(MPC_VERSION) || (MPC_VERSION.
* Guillaume Hanrot, Vincent Lefe`vre, Patrick Pe'lissier, Paul
Zimmermann et al. 'mpfr' - A library for multiple-precision
floating-point computations with exact rounding. Version 2.4.1,
.
* IEEE standard for binary floating-point arithmetic, Technical
Report ANSI-IEEE Standard 754-1985, New York, 1985. Approved March
21, 1985: IEEE Standards Board; approved July 26, 1985: American
National Standards Institute, 18 pages.
* Donald E. Knuth, "The Art of Computer Programming", vol 2,
"Seminumerical Algorithms", 2nd edition, Addison-Wesley, 1981.
* ISO/IEC 9899:1999, Programming languages — C.
File: mpc.info, Node: Concept Index, Next: Function Index, Prev: References, Up: Top
Concept Index
*************
[index ]
* Menu:
* Arithmetic functions: Basic Arithmetic. (line 6)
* Comparison functions: Complex Comparison. (line 6)
* Complex arithmetic functions: Basic Arithmetic. (line 6)
* Complex assignment functions: Assigning Complex Numbers.
(line 6)
* Complex comparisons functions: Complex Comparison. (line 6)
* Complex functions: Complex Functions. (line 6)
* Complex number: GNU MPC Basics. (line 15)
* Conditions for copying GNU MPC: Copying. (line 6)
* Conversion functions: Converting Complex Numbers.
(line 6)
* Copying conditions: Copying. (line 6)
* Installation: Installing GNU MPC. (line 6)
* Logarithm: Power Functions and Logarithm.
(line 6)
* Miscellaneous complex functions: Miscellaneous Complex Functions.
(line 6)
* mpc.h: GNU MPC Basics. (line 6)
* Power functions: Power Functions and Logarithm.
(line 6)
* Precision: GNU MPC Basics. (line 19)
* Projection and Decomposing Functions: Projection & Decomposing.
(line 6)
* Reporting bugs: Reporting Bugs. (line 6)
* Rounding Mode: GNU MPC Basics. (line 24)
* String and stream input and output: String and Stream Input and Output.
(line 6)
* Trigonometric functions: Trigonometric Functions.
(line 6)
* User-defined precision: Complex Functions. (line 12)
File: mpc.info, Node: Function Index, Next: GNU Free Documentation License, Prev: Concept Index, Up: Top
Function Index
**************
[index ]
* Menu:
* _Complex: Converting Complex Numbers.
(line 9)
* mpc_abs: Basic Arithmetic. (line 81)
* mpc_acos: Trigonometric Functions.
(line 37)
* mpc_acosh: Trigonometric Functions.
(line 43)
* mpc_add: Basic Arithmetic. (line 11)
* mpc_add_fr: Basic Arithmetic. (line 15)
* mpc_add_ui: Basic Arithmetic. (line 13)
* mpc_arg: Projection & Decomposing.
(line 20)
* mpc_asin: Trigonometric Functions.
(line 36)
* mpc_asinh: Trigonometric Functions.
(line 42)
* mpc_atan: Trigonometric Functions.
(line 38)
* mpc_atanh: Trigonometric Functions.
(line 44)
* mpc_clear: Initializing Complex Numbers.
(line 21)
* mpc_cmp: Complex Comparison. (line 6)
* mpc_cmp_abs: Complex Comparison. (line 23)
* mpc_cmp_si: Complex Comparison. (line 9)
* mpc_cmp_si_si: Complex Comparison. (line 7)
* mpc_conj: Basic Arithmetic. (line 76)
* mpc_cos: Trigonometric Functions.
(line 10)
* mpc_cosh: Trigonometric Functions.
(line 28)
* mpc_div: Basic Arithmetic. (line 64)
* mpc_div_2si: Basic Arithmetic. (line 99)
* mpc_div_2ui: Basic Arithmetic. (line 97)
* mpc_div_fr: Basic Arithmetic. (line 68)
* mpc_div_ui: Basic Arithmetic. (line 66)
* mpc_exp: Power Functions and Logarithm.
(line 32)
* mpc_fma: Basic Arithmetic. (line 59)
* mpc_free_str: String and Stream Input and Output.
(line 66)
* mpc_fr_div: Basic Arithmetic. (line 72)
* mpc_fr_sub: Basic Arithmetic. (line 23)
* mpc_get_ldc: Converting Complex Numbers.
(line 10)
* mpc_get_prec: Initializing Complex Numbers.
(line 49)
* mpc_get_prec2: Initializing Complex Numbers.
(line 53)
* mpc_get_str: String and Stream Input and Output.
(line 48)
* mpc_get_version: Miscellaneous Complex Functions.
(line 14)
* mpc_imag: Projection & Decomposing.
(line 10)
* mpc_imagref: Projection & Decomposing.
(line 15)
* mpc_init2: Initializing Complex Numbers.
(line 10)
* mpc_init3: Initializing Complex Numbers.
(line 15)
* mpc_inp_str: String and Stream Input and Output.
(line 74)
* mpc_log: Power Functions and Logarithm.
(line 36)
* mpc_log10: Power Functions and Logarithm.
(line 37)
* mpc_mul: Basic Arithmetic. (line 38)
* mpc_mul_2si: Basic Arithmetic. (line 91)
* mpc_mul_2ui: Basic Arithmetic. (line 89)
* mpc_mul_fr: Basic Arithmetic. (line 44)
* mpc_mul_i: Basic Arithmetic. (line 50)
* mpc_mul_si: Basic Arithmetic. (line 42)
* mpc_mul_ui: Basic Arithmetic. (line 40)
* mpc_neg: Basic Arithmetic. (line 34)
* mpc_norm: Basic Arithmetic. (line 85)
* mpc_out_str: String and Stream Input and Output.
(line 109)
* mpc_pow: Power Functions and Logarithm.
(line 11)
* mpc_pow_d: Power Functions and Logarithm.
(line 13)
* mpc_pow_fr: Power Functions and Logarithm.
(line 23)
* mpc_pow_ld: Power Functions and Logarithm.
(line 15)
* mpc_pow_si: Power Functions and Logarithm.
(line 17)
* mpc_pow_ui: Power Functions and Logarithm.
(line 19)
* mpc_pow_z: Power Functions and Logarithm.
(line 21)
* mpc_proj: Projection & Decomposing.
(line 24)
* mpc_real: Projection & Decomposing.
(line 6)
* mpc_realref: Projection & Decomposing.
(line 14)
* mpc_rnd_t: GNU MPC Basics. (line 24)
* mpc_rootofunity: Power Functions and Logarithm.
(line 44)
* mpc_set: Assigning Complex Numbers.
(line 16)
* mpc_set_d: Assigning Complex Numbers.
(line 25)
* mpc_set_dc: Assigning Complex Numbers.
(line 27)
* mpc_set_d_d: Assigning Complex Numbers.
(line 54)
* mpc_set_f: Assigning Complex Numbers.
(line 33)
* mpc_set_fr: Assigning Complex Numbers.
(line 34)
* mpc_set_fr_fr: Assigning Complex Numbers.
(line 64)
* mpc_set_f_f: Assigning Complex Numbers.
(line 62)
* mpc_set_ld: Assigning Complex Numbers.
(line 26)
* mpc_set_ldc: Assigning Complex Numbers.
(line 29)
* mpc_set_ld_ld: Assigning Complex Numbers.
(line 56)
* mpc_set_nan: Assigning Complex Numbers.
(line 79)
* mpc_set_prec: Initializing Complex Numbers.
(line 41)
* mpc_set_q: Assigning Complex Numbers.
(line 32)
* mpc_set_q_q: Assigning Complex Numbers.
(line 60)
* mpc_set_si: Assigning Complex Numbers.
(line 22)
* mpc_set_si_si: Assigning Complex Numbers.
(line 48)
* mpc_set_sj: Assigning Complex Numbers.
(line 24)
* mpc_set_sj_sj: Assigning Complex Numbers.
(line 52)
* mpc_set_str: String and Stream Input and Output.
(line 35)
* mpc_set_ui: Assigning Complex Numbers.
(line 20)
* mpc_set_ui_ui: Assigning Complex Numbers.
(line 46)
* mpc_set_uj: Assigning Complex Numbers.
(line 23)
* mpc_set_uj_uj: Assigning Complex Numbers.
(line 50)
* MPC_SET_X_Y: Advanced Functions. (line 6)
* mpc_set_z: Assigning Complex Numbers.
(line 31)
* mpc_set_z_z: Assigning Complex Numbers.
(line 58)
* mpc_sin: Trigonometric Functions.
(line 6)
* mpc_sinh: Trigonometric Functions.
(line 24)
* mpc_sin_cos: Trigonometric Functions.
(line 14)
* mpc_sqr: Basic Arithmetic. (line 56)
* mpc_sqrt: Power Functions and Logarithm.
(line 6)
* mpc_strtoc: String and Stream Input and Output.
(line 6)
* mpc_sub: Basic Arithmetic. (line 19)
* mpc_sub_fr: Basic Arithmetic. (line 21)
* mpc_sub_ui: Basic Arithmetic. (line 25)
* mpc_swap: Assigning Complex Numbers.
(line 82)
* mpc_t: GNU MPC Basics. (line 15)
* mpc_tan: Trigonometric Functions.
(line 20)
* mpc_tanh: Trigonometric Functions.
(line 32)
* mpc_ui_div: Basic Arithmetic. (line 70)
* mpc_ui_sub: Basic Arithmetic. (line 27)
* mpc_ui_ui_sub: Basic Arithmetic. (line 29)
* mpc_urandom: Miscellaneous Complex Functions.
(line 6)
* MPC_VERSION: Miscellaneous Complex Functions.
(line 17)
* MPC_VERSION_MAJOR: Miscellaneous Complex Functions.
(line 18)
* MPC_VERSION_MINOR: Miscellaneous Complex Functions.
(line 19)
* MPC_VERSION_NUM: Miscellaneous Complex Functions.
(line 36)
* MPC_VERSION_PATCHLEVEL: Miscellaneous Complex Functions.
(line 20)
* MPC_VERSION_STRING: Miscellaneous Complex Functions.
(line 21)
* mpfr_prec_t: GNU MPC Basics. (line 19)
File: mpc.info, Node: GNU Free Documentation License, Prev: Function Index, Up: Top
Appendix A GNU Free Documentation License
*****************************************
Version 1.3, 3 November 2008
Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
0. PREAMBLE
The purpose of this License is to make a manual, textbook, or other
functional and useful document "free" in the sense of freedom: to
assure everyone the effective freedom to copy and redistribute it,
with or without modifying it, either commercially or
noncommercially. Secondarily, this License preserves for the
author and publisher a way to get credit for their work, while not
being considered responsible for modifications made by others.
This License is a kind of "copyleft", which means that derivative
works of the document must themselves be free in the same sense.
It complements the GNU General Public License, which is a copyleft
license designed for free software.
We have designed this License in order to use it for manuals for
free software, because free software needs free documentation: a
free program should come with manuals providing the same freedoms
that the software does. But this License is not limited to
software manuals; it can be used for any textual work, regardless
of subject matter or whether it is published as a printed book. We
recommend this License principally for works whose purpose is
instruction or reference.
1. APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work, in any medium,
that contains a notice placed by the copyright holder saying it can
be distributed under the terms of this License. Such a notice
grants a world-wide, royalty-free license, unlimited in duration,
to use that work under the conditions stated herein. The
"Document", below, refers to any such manual or work. Any member
of the public is a licensee, and is addressed as "you". You accept
the license if you copy, modify or distribute the work in a way
requiring permission under copyright law.
A "Modified Version" of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
A "Secondary Section" is a named appendix or a front-matter section
of the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall
subject (or to related matters) and contains nothing that could
fall directly within that overall subject. (Thus, if the Document
is in part a textbook of mathematics, a Secondary Section may not
explain any mathematics.) The relationship could be a matter of
historical connection with the subject or with related matters, or
of legal, commercial, philosophical, ethical or political position
regarding them.
The "Invariant Sections" are certain Secondary Sections whose
titles are designated, as being those of Invariant Sections, in the
notice that says that the Document is released under this License.
If a section does not fit the above definition of Secondary then it
is not allowed to be designated as Invariant. The Document may
contain zero Invariant Sections. If the Document does not identify
any Invariant Sections then there are none.
The "Cover Texts" are certain short passages of text that are
listed, as Front-Cover Texts or Back-Cover Texts, in the notice
that says that the Document is released under this License. A
Front-Cover Text may be at most 5 words, and a Back-Cover Text may
be at most 25 words.
A "Transparent" copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images composed
of pixels) generic paint programs or (for drawings) some widely
available drawing editor, and that is suitable for input to text
formatters or for automatic translation to a variety of formats
suitable for input to text formatters. A copy made in an otherwise
Transparent file format whose markup, or absence of markup, has
been arranged to thwart or discourage subsequent modification by
readers is not Transparent. An image format is not Transparent if
used for any substantial amount of text. A copy that is not
"Transparent" is called "Opaque".
Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format,
SGML or XML using a publicly available DTD, and standard-conforming
simple HTML, PostScript or PDF designed for human modification.
Examples of transparent image formats include PNG, XCF and JPG.
Opaque formats include proprietary formats that can be read and
edited only by proprietary word processors, SGML or XML for which
the DTD and/or processing tools are not generally available, and
the machine-generated HTML, PostScript or PDF produced by some word
processors for output purposes only.
The "Title Page" means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the
material this License requires to appear in the title page. For
works in formats which do not have any title page as such, "Title
Page" means the text near the most prominent appearance of the
work's title, preceding the beginning of the body of the text.
The "publisher" means any person or entity that distributes copies
of the Document to the public.
A section "Entitled XYZ" means a named subunit of the Document
whose title either is precisely XYZ or contains XYZ in parentheses
following text that translates XYZ in another language. (Here XYZ
stands for a specific section name mentioned below, such as
"Acknowledgements", "Dedications", "Endorsements", or "History".)
To "Preserve the Title" of such a section when you modify the
Document means that it remains a section "Entitled XYZ" according
to this definition.
The Document may include Warranty Disclaimers next to the notice
which states that this License applies to the Document. These
Warranty Disclaimers are considered to be included by reference in
this License, but only as regards disclaiming warranties: any other
implication that these Warranty Disclaimers may have is void and
has no effect on the meaning of this License.
2. VERBATIM COPYING
You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License
applies to the Document are reproduced in all copies, and that you
add no other conditions whatsoever to those of this License. You
may not use technical measures to obstruct or control the reading
or further copying of the copies you make or distribute. However,
you may accept compensation in exchange for copies. If you
distribute a large enough number of copies you must also follow the
conditions in section 3.
You may also lend copies, under the same conditions stated above,
and you may publicly display copies.
3. COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly
have printed covers) of the Document, numbering more than 100, and
the Document's license notice requires Cover Texts, you must
enclose the copies in covers that carry, clearly and legibly, all
these Cover Texts: Front-Cover Texts on the front cover, and
Back-Cover Texts on the back cover. Both covers must also clearly
and legibly identify you as the publisher of these copies. The
front cover must present the full title with all words of the title
equally prominent and visible. You may add other material on the
covers in addition. Copying with changes limited to the covers, as
long as they preserve the title of the Document and satisfy these
conditions, can be treated as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto
adjacent pages.
If you publish or distribute Opaque copies of the Document
numbering more than 100, you must either include a machine-readable
Transparent copy along with each Opaque copy, or state in or with
each Opaque copy a computer-network location from which the general
network-using public has access to download using public-standard
network protocols a complete Transparent copy of the Document, free
of added material. If you use the latter option, you must take
reasonably prudent steps, when you begin distribution of Opaque
copies in quantity, to ensure that this Transparent copy will
remain thus accessible at the stated location until at least one
year after the last time you distribute an Opaque copy (directly or
through your agents or retailers) of that edition to the public.
It is requested, but not required, that you contact the authors of
the Document well before redistributing any large number of copies,
to give them a chance to provide you with an updated version of the
Document.
4. MODIFICATIONS
You may copy and distribute a Modified Version of the Document
under the conditions of sections 2 and 3 above, provided that you
release the Modified Version under precisely this License, with the
Modified Version filling the role of the Document, thus licensing
distribution and modification of the Modified Version to whoever
possesses a copy of it. In addition, you must do these things in
the Modified Version:
A. Use in the Title Page (and on the covers, if any) a title
distinct from that of the Document, and from those of previous
versions (which should, if there were any, be listed in the
History section of the Document). You may use the same title
as a previous version if the original publisher of that
version gives permission.
B. List on the Title Page, as authors, one or more persons or
entities responsible for authorship of the modifications in
the Modified Version, together with at least five of the
principal authors of the Document (all of its principal
authors, if it has fewer than five), unless they release you
from this requirement.
C. State on the Title page the name of the publisher of the
Modified Version, as the publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.
F. Include, immediately after the copyright notices, a license
notice giving the public permission to use the Modified
Version under the terms of this License, in the form shown in
the Addendum below.
G. Preserve in that license notice the full lists of Invariant
Sections and required Cover Texts given in the Document's
license notice.
H. Include an unaltered copy of this License.
I. Preserve the section Entitled "History", Preserve its Title,
and add to it an item stating at least the title, year, new
authors, and publisher of the Modified Version as given on the
Title Page. If there is no section Entitled "History" in the
Document, create one stating the title, year, authors, and
publisher of the Document as given on its Title Page, then add
an item describing the Modified Version as stated in the
previous sentence.
J. Preserve the network location, if any, given in the Document
for public access to a Transparent copy of the Document, and
likewise the network locations given in the Document for
previous versions it was based on. These may be placed in the
"History" section. You may omit a network location for a work
that was published at least four years before the Document
itself, or if the original publisher of the version it refers
to gives permission.
K. For any section Entitled "Acknowledgements" or "Dedications",
Preserve the Title of the section, and preserve in the section
all the substance and tone of each of the contributor
acknowledgements and/or dedications given therein.
L. Preserve all the Invariant Sections of the Document, unaltered
in their text and in their titles. Section numbers or the
equivalent are not considered part of the section titles.
M. Delete any section Entitled "Endorsements". Such a section
may not be included in the Modified Version.
N. Do not retitle any existing section to be Entitled
"Endorsements" or to conflict in title with any Invariant
Section.
O. Preserve any Warranty Disclaimers.
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no
material copied from the Document, you may at your option designate
some or all of these sections as invariant. To do this, add their
titles to the list of Invariant Sections in the Modified Version's
license notice. These titles must be distinct from any other
section titles.
You may add a section Entitled "Endorsements", provided it contains
nothing but endorsements of your Modified Version by various
parties--for example, statements of peer review or that the text
has been approved by an organization as the authoritative
definition of a standard.
You may add a passage of up to five words as a Front-Cover Text,
and a passage of up to 25 words as a Back-Cover Text, to the end of
the list of Cover Texts in the Modified Version. Only one passage
of Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity. If the Document
already includes a cover text for the same cover, previously added
by you or by arrangement made by the same entity you are acting on
behalf of, you may not add another; but you may replace the old
one, on explicit permission from the previous publisher that added
the old one.
The author(s) and publisher(s) of the Document do not by this
License give permission to use their names for publicity for or to
assert or imply endorsement of any Modified Version.
5. COMBINING DOCUMENTS
You may combine the Document with other documents released under
this License, under the terms defined in section 4 above for
modified versions, provided that you include in the combination all
of the Invariant Sections of all of the original documents,
unmodified, and list them all as Invariant Sections of your
combined work in its license notice, and that you preserve all
their Warranty Disclaimers.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name
but different contents, make the title of each such section unique
by adding at the end of it, in parentheses, the name of the
original author or publisher of that section if known, or else a
unique number. Make the same adjustment to the section titles in
the list of Invariant Sections in the license notice of the
combined work.
In the combination, you must combine any sections Entitled
"History" in the various original documents, forming one section
Entitled "History"; likewise combine any sections Entitled
"Acknowledgements", and any sections Entitled "Dedications". You
must delete all sections Entitled "Endorsements."
6. COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other
documents released under this License, and replace the individual
copies of this License in the various documents with a single copy
that is included in the collection, provided that you follow the
rules of this License for verbatim copying of each of the documents
in all other respects.
You may extract a single document from such a collection, and
distribute it individually under this License, provided you insert
a copy of this License into the extracted document, and follow this
License in all other respects regarding verbatim copying of that
document.
7. AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other
separate and independent documents or works, in or on a volume of a
storage or distribution medium, is called an "aggregate" if the
copyright resulting from the compilation is not used to limit the
legal rights of the compilation's users beyond what the individual
works permit. When the Document is included in an aggregate, this
License does not apply to the other works in the aggregate which
are not themselves derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one half
of the entire aggregate, the Document's Cover Texts may be placed
on covers that bracket the Document within the aggregate, or the
electronic equivalent of covers if the Document is in electronic
form. Otherwise they must appear on printed covers that bracket
the whole aggregate.
8. TRANSLATION
Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section
4. Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
translation of this License, and all the license notices in the
Document, and any Warranty Disclaimers, provided that you also
include the original English version of this License and the
original versions of those notices and disclaimers. In case of a
disagreement between the translation and the original version of
this License or a notice or disclaimer, the original version will
prevail.
If a section in the Document is Entitled "Acknowledgements",
"Dedications", or "History", the requirement (section 4) to
Preserve its Title (section 1) will typically require changing the
actual title.
9. TERMINATION
You may not copy, modify, sublicense, or distribute the Document
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense, or distribute it is void,
and will automatically terminate your rights under this License.
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the
copyright holder fails to notify you of the violation by some
reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from
that copyright holder, and you cure the violation prior to 30 days
after your receipt of the notice.
Termination of your rights under this section does not terminate
the licenses of parties who have received copies or rights from you
under this License. If your rights have been terminated and not
permanently reinstated, receipt of a copy of some or all of the
same material does not give you any rights to use it.
10. FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions of
the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
.
Each version of the License is given a distinguishing version
number. If the Document specifies that a particular numbered
version of this License "or any later version" applies to it, you
have the option of following the terms and conditions either of
that specified version or of any later version that has been
published (not as a draft) by the Free Software Foundation. If the
Document does not specify a version number of this License, you may
choose any version ever published (not as a draft) by the Free
Software Foundation. If the Document specifies that a proxy can
decide which future versions of this License can be used, that
proxy's public statement of acceptance of a version permanently
authorizes you to choose that version for the Document.
11. RELICENSING
"Massive Multiauthor Collaboration Site" (or "MMC Site") means any
World Wide Web server that publishes copyrightable works and also
provides prominent facilities for anybody to edit those works. A
public wiki that anybody can edit is an example of such a server.
A "Massive Multiauthor Collaboration" (or "MMC") contained in the
site means any set of copyrightable works thus published on the MMC
site.
"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
license published by Creative Commons Corporation, a not-for-profit
corporation with a principal place of business in San Francisco,
California, as well as future copyleft versions of that license
published by that same organization.
"Incorporate" means to publish or republish a Document, in whole or
in part, as part of another Document.
An MMC is "eligible for relicensing" if it is licensed under this
License, and if all works that were first published under this
License somewhere other than this MMC, and subsequently
incorporated in whole or in part into the MMC, (1) had no cover
texts or invariant sections, and (2) were thus incorporated prior
to November 1, 2008.
The operator of an MMC Site may republish an MMC contained in the
site under CC-BY-SA on the same site at any time before August 1,
2009, provided the MMC is eligible for relicensing.
ADDENDUM: How to use this License for your documents
====================================================
To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and license
notices just after the title page:
Copyright (C) YEAR YOUR NAME.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts. A copy of the license is included in the section entitled ``GNU
Free Documentation License''.
If you have Invariant Sections, Front-Cover Texts and Back-Cover
Texts, replace the "with...Texts." line with this:
with the Invariant Sections being LIST THEIR TITLES, with
the Front-Cover Texts being LIST, and with the Back-Cover Texts
being LIST.
If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of free
software license, such as the GNU General Public License, to permit
their use in free software.
Tag Table:
Node: Top747
Node: Copying1454
Node: Introduction to GNU MPC2226
Node: Installing GNU MPC2945
Node: Reporting Bugs8030
Node: GNU MPC Basics9374
Ref: return-value13051
Node: Complex Functions14502
Node: Initializing Complex Numbers15662
Node: Assigning Complex Numbers18049
Node: Converting Complex Numbers22449
Node: String and Stream Input and Output23074
Node: Complex Comparison29630
Node: Projection & Decomposing31143
Node: Basic Arithmetic32520
Node: Power Functions and Logarithm37093
Node: Trigonometric Functions39448
Node: Miscellaneous Complex Functions41673
Node: Advanced Functions43849
Node: Internals44922
Node: References45373
Node: Concept Index46276
Node: Function Index48590
Node: GNU Free Documentation License62592
End Tag Table
mpc-1.1.0/doc/Makefile.in 0000644 0001751 0001751 00000060716 13225640263 012042 0000000 0000000 # Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
sane_makeflags=$$MFLAGS; \
else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
-[dEDm]) skip_next=yes;; \
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = doc
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c_check_flag.m4 \
$(top_srcdir)/m4/ax_gcc_option.m4 \
$(top_srcdir)/m4/ax_gcc_version.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/m4/mpc.m4 $(top_srcdir)/m4/valgrind-tests.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/version.texi \
$(srcdir)/stamp-vti $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
AM_V_DVIPS = $(am__v_DVIPS_@AM_V@)
am__v_DVIPS_ = $(am__v_DVIPS_@AM_DEFAULT_V@)
am__v_DVIPS_0 = @echo " DVIPS " $@;
am__v_DVIPS_1 =
AM_V_MAKEINFO = $(am__v_MAKEINFO_@AM_V@)
am__v_MAKEINFO_ = $(am__v_MAKEINFO_@AM_DEFAULT_V@)
am__v_MAKEINFO_0 = @echo " MAKEINFO" $@;
am__v_MAKEINFO_1 =
AM_V_INFOHTML = $(am__v_INFOHTML_@AM_V@)
am__v_INFOHTML_ = $(am__v_INFOHTML_@AM_DEFAULT_V@)
am__v_INFOHTML_0 = @echo " INFOHTML" $@;
am__v_INFOHTML_1 =
AM_V_TEXI2DVI = $(am__v_TEXI2DVI_@AM_V@)
am__v_TEXI2DVI_ = $(am__v_TEXI2DVI_@AM_DEFAULT_V@)
am__v_TEXI2DVI_0 = @echo " TEXI2DVI" $@;
am__v_TEXI2DVI_1 =
AM_V_TEXI2PDF = $(am__v_TEXI2PDF_@AM_V@)
am__v_TEXI2PDF_ = $(am__v_TEXI2PDF_@AM_DEFAULT_V@)
am__v_TEXI2PDF_0 = @echo " TEXI2PDF" $@;
am__v_TEXI2PDF_1 =
AM_V_texinfo = $(am__v_texinfo_@AM_V@)
am__v_texinfo_ = $(am__v_texinfo_@AM_DEFAULT_V@)
am__v_texinfo_0 = -q
am__v_texinfo_1 =
AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
am__v_texidevnull_0 = > /dev/null
am__v_texidevnull_1 =
INFO_DEPS = $(srcdir)/mpc.info
am__TEXINFO_TEX_DIR = $(srcdir)
DVIS = mpc.dvi
PDFS = mpc.pdf
PSS = mpc.ps
HTMLS = mpc.html
TEXINFOS = mpc.texi
TEXI2DVI = texi2dvi
TEXI2PDF = $(TEXI2DVI) --pdf --batch
MAKEINFOHTML = $(MAKEINFO) --html
AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
DVIPS = dvips
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__installdirs = "$(DESTDIR)$(infodir)"
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
am__DIST_COMMON = $(srcdir)/Makefile.in mdate-sh texinfo.tex
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GCC_VERSION = @GCC_VERSION@
GITVERSION = @GITVERSION@
GREP = @GREP@
HASGIT = @HASGIT@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MPC_LDFLAGS = @MPC_LDFLAGS@
MPC_LOG_H = @MPC_LOG_H@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VALGRIND = @VALGRIND@
VALGRIND_OPTS = @VALGRIND_OPTS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
info_TEXINFOS = mpc.texi
all: all-am
.SUFFIXES:
.SUFFIXES: .dvi .html .info .pdf .ps .texi
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu doc/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
.texi.info:
$(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \
am__cwd=`pwd` && $(am__cd) $(srcdir) && \
rm -rf $$backupdir && mkdir $$backupdir && \
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
done; \
else :; fi && \
cd "$$am__cwd"; \
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-o $@ $<; \
then \
rc=0; \
$(am__cd) $(srcdir); \
else \
rc=$$?; \
$(am__cd) $(srcdir) && \
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
fi; \
rm -rf $$backupdir; exit $$rc
.texi.dvi:
$(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
$(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \
$<
.texi.pdf:
$(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
$(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \
$<
.texi.html:
$(AM_V_MAKEINFO)rm -rf $(@:.html=.htp)
$(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-o $(@:.html=.htp) $<; \
then \
rm -rf $@ && mv $(@:.html=.htp) $@; \
else \
rm -rf $(@:.html=.htp); exit 1; \
fi
$(srcdir)/mpc.info: mpc.texi $(srcdir)/version.texi
mpc.dvi: mpc.texi $(srcdir)/version.texi
mpc.pdf: mpc.texi $(srcdir)/version.texi
mpc.html: mpc.texi $(srcdir)/version.texi
$(srcdir)/version.texi: @MAINTAINER_MODE_TRUE@ $(srcdir)/stamp-vti
$(srcdir)/stamp-vti: mpc.texi $(top_srcdir)/configure
@(dir=.; test -f ./mpc.texi || dir=$(srcdir); \
set `$(SHELL) $(srcdir)/mdate-sh $$dir/mpc.texi`; \
echo "@set UPDATED $$1 $$2 $$3"; \
echo "@set UPDATED-MONTH $$2 $$3"; \
echo "@set EDITION $(VERSION)"; \
echo "@set VERSION $(VERSION)") > vti.tmp$$$$ && \
(cmp -s vti.tmp$$$$ $(srcdir)/version.texi \
|| (echo "Updating $(srcdir)/version.texi" && \
cp vti.tmp$$$$ $(srcdir)/version.texi.tmp$$$$ && \
mv $(srcdir)/version.texi.tmp$$$$ $(srcdir)/version.texi)) && \
rm -f vti.tmp$$$$ $(srcdir)/version.texi.$$$$
@cp $(srcdir)/version.texi $@
mostlyclean-vti:
-rm -f vti.tmp* $(srcdir)/version.texi.tmp*
maintainer-clean-vti:
@MAINTAINER_MODE_TRUE@ -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
.dvi.ps:
$(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
$(DVIPS) $(AM_V_texinfo) -o $@ $<
uninstall-dvi-am:
@$(NORMAL_UNINSTALL)
@list='$(DVIS)'; test -n "$(dvidir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
rm -f "$(DESTDIR)$(dvidir)/$$f"; \
done
uninstall-html-am:
@$(NORMAL_UNINSTALL)
@list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
done
uninstall-info-am:
@$(PRE_UNINSTALL)
@if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
done; \
else :; fi
@$(NORMAL_UNINSTALL)
@list='$(INFO_DEPS)'; \
for file in $$list; do \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
(if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
else :; fi); \
done
uninstall-pdf-am:
@$(NORMAL_UNINSTALL)
@list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
done
uninstall-ps-am:
@$(NORMAL_UNINSTALL)
@list='$(PSS)'; test -n "$(psdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
rm -f "$(DESTDIR)$(psdir)/$$f"; \
done
dist-info: $(INFO_DEPS)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
list='$(INFO_DEPS)'; \
for base in $$list; do \
case $$base in \
$(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
esac; \
if test -f $$base; then d=.; else d=$(srcdir); fi; \
base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
if test -f $$file; then \
relfile=`expr "$$file" : "$$d/\(.*\)"`; \
test -f "$(distdir)/$$relfile" || \
cp -p $$file "$(distdir)/$$relfile"; \
else :; fi; \
done; \
done
mostlyclean-aminfo:
-rm -rf mpc.t2d mpc.t2p
clean-aminfo:
-test -z "mpc.dvi mpc.pdf mpc.ps mpc.html" \
|| rm -rf mpc.dvi mpc.pdf mpc.ps mpc.html
maintainer-clean-aminfo:
@list='$(INFO_DEPS)'; for i in $$list; do \
i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
done
tags TAGS:
ctags CTAGS:
cscope cscopelist:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-info
check-am: all-am
check: check-am
all-am: Makefile $(INFO_DEPS)
installdirs:
for dir in "$(DESTDIR)$(infodir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am: $(DVIS)
html: html-am
html-am: $(HTMLS)
info: info-am
info-am: $(INFO_DEPS)
install-data-am: install-info-am
install-dvi: install-dvi-am
install-dvi-am: $(DVIS)
@$(NORMAL_INSTALL)
@list='$(DVIS)'; test -n "$(dvidir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \
$(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
done
install-exec-am:
install-html: install-html-am
install-html-am: $(HTMLS)
@$(NORMAL_INSTALL)
@list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
$(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
$(am__strip_dir) \
d2=$$d$$p; \
if test -d "$$d2"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
$(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \
$(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
else \
list2="$$list2 $$d2"; \
fi; \
done; \
test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
done; }
install-info: install-info-am
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
$(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
fi; \
for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
esac; \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
$$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
if test -f $$ifile; then \
echo "$$ifile"; \
else : ; fi; \
done; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
@$(POST_INSTALL)
@if $(am__can_run_installinfo); then \
list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
for file in $$list; do \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
done; \
else : ; fi
install-man:
install-pdf: install-pdf-am
install-pdf-am: $(PDFS)
@$(NORMAL_INSTALL)
@list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
install-ps: install-ps-am
install-ps-am: $(PSS)
@$(NORMAL_INSTALL)
@list='$(PSS)'; test -n "$(psdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
maintainer-clean-generic maintainer-clean-vti
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \
mostlyclean-libtool mostlyclean-vti
pdf: pdf-am
pdf-am: $(PDFS)
ps: ps-am
ps-am: $(PSS)
uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
uninstall-pdf-am uninstall-ps-am
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-aminfo clean-generic \
clean-libtool cscopelist-am ctags-am dist-info distclean \
distclean-generic distclean-libtool distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-aminfo maintainer-clean-generic \
maintainer-clean-vti mostlyclean mostlyclean-aminfo \
mostlyclean-generic mostlyclean-libtool mostlyclean-vti pdf \
pdf-am ps ps-am tags-am uninstall uninstall-am \
uninstall-dvi-am uninstall-html-am uninstall-info-am \
uninstall-pdf-am uninstall-ps-am
.PRECIOUS: Makefile
# 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.
.NOEXPORT:
mpc-1.1.0/doc/mpc.texi 0000644 0001751 0001751 00000140227 13225640270 011441 0000000 0000000 \input texinfo
@setfilename mpc.info
@include version.texi
@settitle GNU MPC @value{VERSION}
@synindex tp fn
@set MINGMP 5.0.0
@set MINMPFR 3.0.0
@set AUTHORS Andreas Enge, Philippe Th@'eveny, Paul Zimmermann
@copying
This manual is for GNU MPC, a library for multiple precision complex arithmetic,
version @value{VERSION} of @value{UPDATED-MONTH}.
Copyright @copyright{} 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2016 INRIA
@quotation
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections. A copy of the license is included in the section
entitled ``GNU Free Documentation License.''
@end quotation
@end copying
@iftex
@afourpaper
@end iftex
@tex
\global\parindent=0pt
\global\parskip=8pt
\global\baselineskip=13pt
@end tex
@dircategory GNU Packages
@direntry
* mpc: (mpc)Multiple Precision Complex Library.
@end direntry
@titlepage
@title GNU MPC
@subtitle The GNU Multiple Precision Complex Library
@subtitle Edition @value{VERSION}
@subtitle @value{UPDATED-MONTH}
@author @value{AUTHORS}
@page
@vskip 0pt plus 1filll
@insertcopying
@end titlepage
@ifnottex
@node Top
@top GNU MPC
This manual documents how to install and use the GNU Multiple Precision
Complex Library, version @value{VERSION}
@end ifnottex
@menu
* Copying:: GNU MPC Copying Conditions (LGPL).
* Introduction to GNU MPC:: Brief introduction to GNU MPC.
* Installing GNU MPC:: How to configure and compile the GNU MPC library.
* Reporting Bugs:: How to usefully report bugs.
* GNU MPC Basics:: What every GNU MPC user should know.
* Complex Functions:: Functions for arithmetic on complex numbers.
* References::
* Concept Index::
* Function Index::
* GNU Free Documentation License::
@end menu
@c @times{} made available as a "x" in info and html (already works in tex).
@ifnottex
@macro times
x
@end macro
@end ifnottex
@node Copying
@unnumbered GNU MPC Copying Conditions
@cindex Copying conditions
@cindex Conditions for copying GNU MPC
GNU MPC 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.
GNU MPC 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 this program. If not, see @uref{http://www.gnu.org/licenses/}.
@node Introduction to GNU MPC
@chapter Introduction to GNU MPC
GNU MPC is a portable library written in C for arbitrary precision arithmetic
on complex numbers providing correct rounding. It implements a multiprecision
equivalent of the C99 standard.
It builds upon the GNU MP and the GNU MPFR libraries.
@section How to use this Manual
Everyone should read @ref{GNU MPC Basics}. If you need to install the library
yourself, you need to read @ref{Installing GNU MPC}, too.
The remainder of the manual can be used for later reference, although it is
probably a good idea to skim through it.
@node Installing GNU MPC
@chapter Installing GNU MPC
@cindex Installation
To build GNU MPC, you first have to install GNU MP (version @value{MINGMP} or higher) and
GNU MPFR (version @value{MINMPFR} or higher) on your computer. You need a C compiler;
GCC version 4.4 or higher is recommended, since GNU MPC may trigger a bug in previous
versions, see the thread at
@uref{http://lists.gforge.inria.fr/pipermail/mpc-discuss/2011-February/000823.html}.
And you need a
standard Unix @samp{make} program, plus some other standard Unix utility
programs.
Here are the steps needed to install the library on Unix systems:
@enumerate
@item
@samp{tar xzf mpc-@value{VERSION}.tar.gz}
@item
@samp{cd mpc-@value{VERSION}}
@item
@samp{./configure}
if GMP and GNU MPFR are installed into standard directories, that is, directories
that are searched by default by the compiler and the linking tools.
@samp{./configure --with-gmp=}
is used to indicate a different location where GMP is
installed. Alternatively, you can specify directly GMP include and GMP lib
directories with @samp{./configure --with-gmp-lib=
--with-gmp-include=}.
@samp{./configure --with-mpfr=}
is used to indicate a different location where GNU MPFR is
installed. Alternatively, you can specify directly GNU MPFR include and GNU MPFR lib
directories with @samp{./configure --with-mpf-lib=
--with-mpfr-include=}.
Another useful parameter is @samp{--prefix}, which can be used to
specify an alternative installation location instead of
@file{/usr/local}; see @samp{make install} below.
To enable checking for memory leaks using @command{valgrind} during
@code{make check}, add the parameter @code{--enable-valgrind-tests}.
If for debugging purposes you wish to log calls to GNU MPC functions from
within your code, add the parameter @samp{--enable-logging}.
In your code, replace the inclusion of @file{mpc.h} by @file{mpc-log.h}
and link the executable dynamically.
Then all calls to functions with only complex arguments are printed to
@file{stderr} in the following form: First, the function name is given,
followed by its type such as @samp{c_cc}, meaning that the function has
one complex result (one @samp{c} in front of the @samp{_}), computed from
two complex arguments (two @samp{c} after the @samp{_}). Then, the
precisions of the real and the imaginary part of the first result is given,
followed by the second one and so on. Finally, for each argument, the
precisions of its real and imaginary part are specified and the argument
itself is printed in hexadecimal via the function
@code{mpc_out_str}
(@pxref{String and Stream Input and Output}).
The option requires a dynamic library, so it may not be combined with
@code{--disable-shared}.
Use @samp{./configure --help} for an exhaustive list of parameters.
@item
@samp{make}
This compiles GNU MPC in the working directory.
@item
@samp{make check}
This will make sure GNU MPC was built correctly.
If you get error messages, please report them to
@samp{mpc-discuss@@lists.gforge.inria.fr} (@xref{Reporting Bugs}, for
information on what to include in useful bug reports).
@item
@samp{make install}
This will copy the file @file{mpc.h} to the directory
@file{/usr/local/include}, the file @file{libmpc.a} to the directory
@file{/usr/local/lib}, and the file @file{mpc.info} to the directory
@file{/usr/local/share/info} (or if you passed the @samp{--prefix} option to
@file{configure}, using the prefix directory given as argument to
@samp{--prefix} instead of @file{/usr/local}). Note: you need write permissions
on these directories.
@end enumerate
@section Other `make' Targets
There are some other useful make targets:
@itemize @bullet
@item
@samp{info}
Create an info version of the manual, in @file{mpc.info}.
@item
@samp{pdf}
Create a PDF version of the manual, in @file{doc/mpc.pdf}.
@item
@samp{dvi}
Create a DVI version of the manual, in @file{doc/mpc.dvi}.
@item
@samp{ps}
Create a Postscript version of the manual, in @file{doc/mpc.ps}.
@item
@samp{html}
Create an HTML version of the manual, in several pages in the
directory @file{doc/mpc.html}; if you want only one output HTML file,
then type @samp{makeinfo --html --no-split mpc.texi} instead.
@item
@samp{clean}
Delete all object files and archive files, but not the configuration files.
@item
@samp{distclean}
Delete all files not included in the distribution.
@item
@samp{uninstall}
Delete all files copied by @samp{make install}.
@end itemize
@section Known Build Problems
On AIX, if GMP was built with the 64-bit ABI, before building and testing GNU MPC,
it might be necessary to set the @samp{OBJECT_MODE} environment variable to 64
by, e.g.,
@samp{export OBJECT_MODE=64}
This has been tested with the C compiler IBM XL C/C++ Enterprise Edition
V8.0 for AIX, version: 08.00.0000.0021, GMP 4.2.4 and GNU MPFR 2.4.1.
Please report any other problems you encounter to
@samp{mpc-discuss@@lists.gforge.inria.fr}.
@xref{Reporting Bugs}.
@node Reporting Bugs
@chapter Reporting Bugs
@cindex Reporting bugs
If you think you have found a bug in the GNU MPC library,
please investigate
and report it. We have made this library available to you, and it is not to ask
too much from you, to ask you to report the bugs that you find.
There are a few things you should think about when you put your bug report
together.
You have to send us a test case that makes it possible for us to reproduce the
bug. Include instructions on how to run the test case.
You also have to explain what is wrong; if you get a crash, or if the results
printed are incorrect and in that case, in what way.
Please include compiler version information in your bug report.
This can be extracted using @samp{gcc -v},
or @samp{cc -V} on some machines.
Also, include the output from @samp{uname -a}.
If your bug report is good, we will do our best to help you to get a corrected
version of the library; if the bug report is poor, we will not do anything about
it (aside of chiding you to send better bug reports).
Send your bug report to: @samp{mpc-discuss@@lists.gforge.inria.fr}.
If you think something in this manual is unclear, or downright incorrect, or if
the language needs to be improved, please send a note to the same address.
@node GNU MPC Basics
@chapter GNU MPC Basics
@cindex @file{mpc.h}
All declarations needed to use GNU MPC are collected in the include file
@file{mpc.h}. It is designed to work with both C and C++ compilers.
You should include that file in any program using the GNU MPC library
by adding the line
@example
#include "mpc.h"
@end example
@section Nomenclature and Types
@cindex Complex number
@tindex @code{mpc_t}
@noindent
@dfn{Complex number} or @dfn{Complex} for short, is a pair of two
arbitrary precision floating-point numbers (for the real and imaginary parts).
The C data type for such objects is @code{mpc_t}.
@cindex Precision
@tindex @code{mpfr_prec_t}
@noindent
The @dfn{Precision} is the number of bits used to represent the mantissa
of the real and imaginary parts;
the corresponding C data type is @code{mpfr_prec_t}.
For more details on the allowed precision range,
@ifinfo
@pxref{Nomenclature and Types,,, mpfr.info,GNU MPFR}.
@end ifinfo
@ifnotinfo
see Section ``Nomenclature and Types'' in @cite{GNU MPFR}.
@end ifnotinfo
@cindex Rounding Mode
@tindex @code{mpc_rnd_t}
@noindent
The @dfn{rounding mode} specifies the way to round the result of a
complex operation, in case the exact result can not be represented
exactly in the destination mantissa;
the corresponding C data type is @code{mpc_rnd_t}.
A complex rounding mode is a pair of two rounding modes: one for the real
part, one for the imaginary part.
@section Function Classes
There is only one class of functions in the GNU MPC library, namely functions for
complex arithmetic. The function names begin with @code{mpc_}. The
associated type is @code{mpc_t}.
@section GNU MPC Variable Conventions
As a general rule, all GNU MPC functions expect output arguments before input
arguments. This notation is based on an analogy with the assignment operator.
GNU MPC allows you to use the same variable for both input and output in the same
expression. For example, the main function for floating-point multiplication,
@code{mpc_mul}, can be used like this: @code{mpc_mul (x, x, x, rnd_mode)}.
This
computes the square of @var{x} with rounding mode @code{rnd_mode}
and puts the result back in @var{x}.
Before you can assign to an GNU MPC variable, you need to initialise it by calling
one of the special initialization functions. When you are done with a
variable, you need to clear it out, using one of the functions for that
purpose.
A variable should only be initialised once, or at least cleared out between
each initialization. After a variable has been initialised, it may be
assigned to any number of times.
For efficiency reasons, avoid to initialise and clear out a variable in loops.
Instead, initialise it before entering the loop, and clear it out after the
loop has exited.
You do not need to be concerned about allocating additional space for GNU MPC
variables, since each of its real and imaginary part
has a mantissa of fixed size.
Hence unless you change its precision, or clear and reinitialise it,
a complex variable will have the same allocated space during all its
life.
@section Rounding Modes
A complex rounding mode is of the form @code{MPC_RNDxy} where
@code{x} and @code{y} are one of @code{N} (to nearest), @code{Z} (towards
zero), @code{U} (towards plus infinity), @code{D} (towards minus infinity).
The first letter refers to the rounding mode for the real part,
and the second one for the imaginary part.
For example @code{MPC_RNDZU} indicates to round the real part towards zero,
and the imaginary part towards plus infinity.
The @samp{round to nearest} mode works as in the IEEE P754 standard: in case
the number to be rounded lies exactly in the middle of two representable
numbers, it is rounded to the one with the least significant bit set to zero.
For example, the number 5, which is represented by (101) in binary, is rounded
to (100)=4 with a precision of two bits, and not to (110)=6.
@anchor{return-value}
@section Return Value
Most GNU MPC functions have a return value of type @code{int}, which is used
to indicate the position of the rounded real and imaginary parts with respect
to the exact (infinite precision) values.
If this integer is @code{i}, the macros @code{MPC_INEX_RE(i)} and
@code{MPC_INEX_IM(i)} give 0 if the corresponding rounded value is exact,
a negative value if the rounded value is less than the exact one,
and a positive value if it is greater than the exact one.
Similarly, functions computing a result of type @code{mpfr_t}
return an integer that is 0, positive or negative depending on
whether the rounded value is the same, larger or smaller then
the exact result.
Some functions, such as @code{mpc_sin_cos}, compute two complex results;
the macros @code{MPC_INEX1(i)} and @code{MPC_INEX2(i)}, applied to
the return value @code{i} of such a function, yield the exactness value
corresponding to the first or the second computed value, respectively.
@section Branch Cuts And Special Values
Some complex functions have branch cuts, across which the function is
discontinous. In GNU MPC, the branch cuts chosen are the same as those
specified for the corresponding functions in the ISO C99 standard.
Likewise, when evaluated at a point whose real or imaginary part is
either infinite or a NaN or a signed zero, a function returns the same
value as those specified for the corresponding function in the ISO C99
standard.
@node Complex Functions
@chapter Complex Functions
@cindex Complex functions
The complex functions expect arguments of type @code{mpc_t}.
The GNU MPC floating-point functions have an interface that is similar to the
GNU MP
integer functions. The function prefix for operations on complex numbers is
@code{mpc_}.
@cindex User-defined precision
The precision of a computation is defined as follows: Compute the requested
operation exactly (with ``infinite precision''), and round the result to
the destination variable precision with the given rounding mode.
The GNU MPC complex functions are intended to be a smooth extension
of the IEEE P754 arithmetic. The results obtained on one
computer should not differ from the results obtained on a computer with a
different word size.
@menu
* Initializing Complex Numbers::
* Assigning Complex Numbers::
* Converting Complex Numbers::
* String and Stream Input and Output::
* Complex Comparison::
* Projection & Decomposing::
* Basic Arithmetic::
* Power Functions and Logarithm::
* Trigonometric Functions::
* Miscellaneous Complex Functions::
* Advanced Functions::
* Internals::
@end menu
@node Initializing Complex Numbers
@section Initialization Functions
An @code{mpc_t} object must be initialised before storing the first value in
it. The functions @code{mpc_init2} and @code{mpc_init3}
are used for that purpose.
@deftypefun void mpc_init2 (mpc_t @var{z}, mpfr_prec_t @var{prec})
Initialise @var{z} to precision @var{prec} bits
and set its real and imaginary parts to NaN.
Normally, a variable should be initialised once only
or at least be cleared, using @code{mpc_clear}, between initializations.
@end deftypefun
@deftypefun void mpc_init3 (mpc_t @var{z}, mpfr_prec_t @var{prec_r}, mpfr_prec_t @var{prec_i})
Initialise @var{z} with the precision of its real part being
@var{prec_r} bits and the precision of its imaginary part being
@var{prec_i} bits, and set the real and imaginary parts to NaN.
@end deftypefun
@deftypefun void mpc_clear (mpc_t @var{z})
Free the space occupied by @var{z}. Make sure to call this function for all
@code{mpc_t} variables when you are done with them.
@end deftypefun
@need 2000
Here is an example on how to initialise complex variables:
@example
@{
mpc_t x, y;
mpc_init2 (x, 256); /* precision @emph{exactly} 256 bits */
mpc_init3 (y, 100, 50); /* 100/50 bits for the real/imaginary part */
@dots{}
mpc_clear (x);
mpc_clear (y);
@}
@end example
The following function is useful for changing the precision during a
calculation. A typical use would be for adjusting the precision gradually in
iterative algorithms like Newton-Raphson, making the computation precision
closely match the actual accurate part of the numbers.
@deftypefun void mpc_set_prec (mpc_t @var{x}, mpfr_prec_t @var{prec})
Reset the precision of @var{x} to be @strong{exactly} @var{prec} bits,
and set its real/imaginary parts to NaN.
The previous value stored in @var{x} is lost. It is equivalent to
a call to @code{mpc_clear(x)} followed by a call to
@code{mpc_init2(x, prec)}, but more efficient as no allocation is done in
case the current allocated space for the mantissa of @var{x} is sufficient.
@end deftypefun
@deftypefun mpfr_prec_t mpc_get_prec (mpc_t @var{x})
If the real and imaginary part of @var{x} have the same precision, it is returned,
otherwise, 0 is returned.
@end deftypefun
@deftypefun void mpc_get_prec2 (mpfr_prec_t* @var{pr}, mpfr_prec_t* @var{pi}, mpc_t @var{x})
Returns the precision of the real part of @var{x} via @var{pr} and of its imaginary part
via @var{pi}.
@end deftypefun
@node Assigning Complex Numbers
@section Assignment Functions
@cindex Complex assignment functions
These functions assign new values to already initialised complex numbers
(@pxref{Initializing Complex Numbers}).
When using any functions with @code{intmax_t} or @code{uintmax_t}
parameters, you must include
@code{} or @code{} @emph{before} @file{mpc.h}, to allow
@file{mpc.h} to define prototypes for these functions.
Similarly, functions with parameters of type @code{complex} or
@code{long complex} are defined only if @code{} is included
@emph{before} @file{mpc.h}.
If you need assignment functions that are not in the current API, you can
define them using the @code{MPC_SET_X_Y} macro (@pxref{Advanced Functions}).
@deftypefun int mpc_set (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
Set the value of @var{rop} from @var{op}, rounded to the precision of @var{rop}
with the given rounding mode @var{rnd}.
@end deftypefun
@deftypefun int mpc_set_ui (mpc_t @var{rop}, unsigned long int @var{op}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_set_si (mpc_t @var{rop}, long int @var{op}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_set_uj (mpc_t @var{rop}, uintmax_t @var{op}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_set_sj (mpc_t @var{rop}, intmax_t @var{op}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_set_d (mpc_t @var{rop}, double @var{op}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_set_ld (mpc_t @var{rop}, long double @var{op}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_set_dc (mpc_t @var{rop}, double _Complex @var{op}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_set_ldc (mpc_t @var{rop}, long double _Complex @var{op}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_set_z (mpc_t @var{rop}, mpz_t @var{op} mpc_rnd_t @var{rnd})
@deftypefunx int mpc_set_q (mpc_t @var{rop}, mpq_t @var{op} mpc_rnd_t @var{rnd})
@deftypefunx int mpc_set_f (mpc_t @var{rop}, mpf_t @var{op} mpc_rnd_t @var{rnd})
@deftypefunx int mpc_set_fr (mpc_t @var{rop}, mpfr_t @var{op}, mpc_rnd_t @var{rnd})
Set the value of @var{rop} from @var{op}, rounded to the precision of
@var{rop} with the given rounding mode @var{rnd}.
The argument @var{op} is interpreted as real, so the imaginary part of
@var{rop} is set to zero with a positive sign.
Please note that even a @code{long int} may have to be rounded, if the
destination precision is less than the machine word width.
For @code{mpc_set_d}, be careful that the input number @var{op} may not be
exactly representable as a double-precision number (this happens for 0.1 for
instance), in which case it is first rounded by the C compiler to a
double-precision number, and then only to a complex number.
@end deftypefun
@deftypefun int mpc_set_ui_ui (mpc_t @var{rop}, unsigned long int @var{op1}, unsigned long int @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_set_si_si (mpc_t @var{rop}, long int @var{op1}, long int @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_set_uj_uj (mpc_t @var{rop}, uintmax_t @var{op1}, uintmax_t @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_set_sj_sj (mpc_t @var{rop}, intmax_t @var{op1}, intmax_t @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_set_d_d (mpc_t @var{rop}, double @var{op1}, double @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_set_ld_ld (mpc_t @var{rop}, long double @var{op1}, long double @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_set_z_z (mpc_t @var{rop}, mpz_t @var{op1}, mpz_t @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_set_q_q (mpc_t @var{rop}, mpq_t @var{op1}, mpq_t @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_set_f_f (mpc_t @var{rop}, mpf_t @var{op1}, mpf_t @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_set_fr_fr (mpc_t @var{rop}, mpfr_t @var{op1}, mpfr_t @var{op2}, mpc_rnd_t @var{rnd})
Set the real part of @var{rop} from @var{op1}, and its imaginary part from
@var{op2}, according to the rounding mode @var{rnd}.
Beware that the behaviour of @code{mpc_set_fr_fr} is undefined if @var{op1}
or @var{op2} is a pointer to the real or imaginary part of @var{rop}.
To exchange the real and the imaginary part of a complex number, either use
@code{mpfr_swap (mpc_realref (rop), mpc_imagref (rop))}, which also exchanges
the precisions of the two parts; or use a temporary variable.
@end deftypefun
For functions assigning complex variables from strings or input streams,
@pxref{String and Stream Input and Output}.
@deftypefun void mpc_set_nan (mpc_t @var{rop})
Set @var{rop} to Nan+i*NaN.
@end deftypefun
@deftypefun void mpc_swap (mpc_t @var{op1}, mpc_t @var{op2})
Swap the values of @var{op1} and @var{op2} efficiently. Warning: The
precisions are exchanged, too; in case these are different,
@code{mpc_swap} is thus not equivalent to three @code{mpc_set} calls using a
third auxiliary variable.
@end deftypefun
@node Converting Complex Numbers
@section Conversion Functions
@cindex Conversion functions
The following functions are available only if @code{}
is included @emph{before} @file{mpc.h}.
@deftypefun double _Complex mpc_get_dc (mpc_t @var{op}, mpc_rnd_t @var{rnd})
@deftypefunx {long double _Complex} mpc_get_ldc (mpc_t @var{op}, mpc_rnd_t @var{rnd})
Convert @var{op} to a C complex number, using the rounding mode @var{rnd}.
@end deftypefun
For functions converting complex variables to strings or stream output,
@pxref{String and Stream Input and Output}.
@node String and Stream Input and Output
@section String and Stream Input and Output
@cindex String and stream input and output
@deftypefun int mpc_strtoc (mpc_t @var{rop}, const char *@var{nptr}, char **@var{endptr}, int @var{base}, mpc_rnd_t @var{rnd})
Read a complex number from a string @var{nptr} in base @var{base}, rounded to
the precision of @var{rop} with the given rounding mode @var{rnd}.
The @var{base} must be either 0 or a number from 2 to 36 (otherwise the
behaviour is undefined).
If @var{nptr} starts with valid data, the result is stored in @var{rop},
the usual inexact value is returned (@pxref{return-value,, Return
Value}) and, if @var{endptr} is not the null pointer,
@var{*endptr} points to the character just after the valid data.
Otherwise, @var{rop} is set to @code{NaN + i * NaN}, -1 is returned and,
if @var{endptr} is not the null pointer,
the value of @var{nptr} is stored in the location referenced by
@var{endptr}.
The expected form of a complex number string is either a real number (an
optional leading whitespace, an optional sign followed by a floating-point
number), or a pair of real numbers in parentheses separated by whitespace. If
a real number is read, the missing imaginary part is set to +0.
The form of a floating-point number depends on the base and is described
in the documentation of @code{mpfr_strtofr}
@ifinfo
(@pxref{Assignment Functions,,, mpfr.info,GNU MPFR}).
@end ifinfo
@ifnotinfo
in the GNU MPFR manual.
@end ifnotinfo
For instance, @code{"3.1415926"}, @code{"(1.25e+7 +.17)"}, @code{"(@@nan@@
2)"} and @code{"(-0 -7)"} are valid strings for @var{base} = 10.
If @var{base} = 0, then a prefix may be used to indicate the base in which the
floating-point number is written. Use prefix '0b' for binary numbers, prefix
'0x' for hexadecimal numbers, and no prefix for decimal numbers.
The real and imaginary part may then be written in different bases.
For instance, @code{"(1.024e+3 +2.05e+3)"} and @code{"(0b1p+10 +0x802)"} are
valid strings for @code{base}=0 and represent the same value.
@end deftypefun
@deftypefun int mpc_set_str (mpc_t @var{rop}, const char *@var{s}, int @var{base}, mpc_rnd_t rnd)
Set @var{rop} to the value of the string @var{s} in base @var{base}, rounded
to the precision of @var{rop} with the given rounding mode @var{rnd}.
See the documentation of @code{mpc_strtoc} for a detailed description of the
valid string formats.
Contrarily to @code{mpc_strtoc}, @code{mpc_set_str} requires the @emph{whole}
string to represent a valid complex number (potentially followed by
additional white space).
This function returns the usual inexact value (@pxref{return-value,, Return
Value}) if the entire string up to the final null character is a valid number
in base @var{base}; otherwise it returns @minus{}1, and @var{rop} is set to
NaN+i*NaN.
@end deftypefun
@deftypefun {char *} mpc_get_str (int @var{b}, size_t @var{n}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
Convert @var{op} to a string containing its real and imaginary parts,
separated by a space and enclosed in a pair of parentheses.
The numbers are written in base @var{b} (which may vary from 2 to 36) and
rounded according to @var{rnd}. The number of significant digits, at least 2,
is given by @var{n}. It is also possible to let
@var{n} be zero, in which case the number of digits is chosen large
enough so that re-reading the printed value with the same precision, assuming
both output and input use rounding to nearest, will recover the original value
of @var{op}.
Note that @code{mpc_get_str} uses the decimal point of the current locale
if available, and @samp{.} otherwise.
The string is generated using the current memory allocation function
(@code{malloc} by default, unless it has been modified using the custom
memory allocation interface of @code{gmp}); once it is not needed any more,
it should be freed by calling @code{mpc_free_str}.
@end deftypefun
@deftypefun {void} mpc_free_str (char *@var{str})
Free the string @var{str}, which needs to have been allocated by
a call to @code{mpc_get_str}.
@end deftypefun
The following two functions read numbers from input streams and write
them to output streams.
When using any of these functions, you need to include @file{stdio.h}
@emph{before} @file{mpc.h}.
@deftypefun int mpc_inp_str (mpc_t @var{rop}, FILE *@var{stream}, size_t *@var{read}, int @var{base}, mpc_rnd_t @var{rnd})
Input a string in base @var{base} in the same format as for @code{mpc_strtoc}
from stdio stream @var{stream}, rounded according to @var{rnd}, and put the
read complex number into @var{rop}.
If @var{stream} is the null pointer, @var{rop} is read from @code{stdin}.
Return the usual inexact value; if an error occurs, set @var{rop} to @code{NaN
+ i * NaN} and return -1.
If @var{read} is not the null pointer, it is set to the number of read
characters.
Unlike @code{mpc_strtoc}, the function @code{mpc_inp_str} does not possess
perfect knowledge of the string to transform and has to read it
character by character, so it behaves slightly differently: It tries
to read a string describing a complex number and processes this string
through a call to @code{mpc_set_str}. Precisely, after skipping optional
whitespace, a minimal string is read according to the regular expression
@code{mpfr | '(' \s* mpfr \s+ mpfr \s* ')'}, where @code{\s} denotes a whitespace,
and @code{mpfr} is either a string containing neither whitespaces nor
parentheses, or @code{nan(n-char-sequence)} or @code{@@nan@@(n-char-sequence)}
(regardless of capitalisation) with @code{n-char-sequence} a string
of ascii letters, digits or @code{'_'}.
For instance, upon input of @code{"nan(13 1)"}, the function
@code{mpc_inp_str} starts to recognise a value of NaN followed by an
n-char-sequence indicated by the opening parenthesis; as soon as the
space is reached, it becomes clear that the expression in parentheses
is not an n-char-sequence, and the error flag -1 is returned after 6
characters have been consumed from the stream (the whitespace itself
remaining in the stream).
The function @code{mpc_strtoc}, on the other hand, may track back
when reaching the whitespace; it treats the string as the two successive
complex numbers @code{NaN + i * 0} and @code{13 + i}.
It is thus recommended to have a whitespace follow each floating point number
to avoid this problem.
@end deftypefun
@deftypefun size_t mpc_out_str (FILE *@var{stream}, int @var{base}, size_t @var{n_digits}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
Output @var{op} on stdio stream @var{stream} in
base @var{base}, rounded according to @var{rnd}, in the same format
as for @code{mpc_strtoc}
If @var{stream} is the null pointer, @var{rop} is written to @code{stdout}.
Return the number of characters written.
@end deftypefun
@node Complex Comparison
@section Comparison Functions
@cindex Complex comparisons functions
@cindex Comparison functions
@deftypefn Function int mpc_cmp (mpc_t @var{op1}, mpc_t @var{op2})
@deftypefnx Function int mpc_cmp_si_si (mpc_t @var{op1}, long int @var{op2r}, long int @var{op2i})
@deftypefnx Macro int mpc_cmp_si (mpc_t @var{op1}, long int @var{op2})
Compare @var{op1} and @var{op2}, where in the case of @code{mpc_cmp_si_si},
@var{op2} is taken to be @var{op2r} + i @var{op2i}.
The return value @var{c} can be decomposed into @code{x = MPC_INEX_RE(c)}
and @code{y = MPC_INEX_IM(c)}, such that @var{x} is
positive if the real part of @var{op1} is greater than that of @var{op2},
zero if both real parts are equal, and negative if the real part of @var{op1}
is less than that of @var{op2}, and likewise for @var{y}.
Both @var{op1} and @var{op2} are considered to their full own precision,
which may differ.
It is not allowed that one of the operands has a NaN (Not-a-Number) part.
The storage of the return value is such that equality can be simply checked
with @code{mpc_cmp (op1, op2) == 0}.
@end deftypefn
@deftypefn Function int mpc_cmp_abs (mpc_t @var{op1}, mpc_t @var{op2})
Compare the absolute values of @var{op1} and @var{op2}.
The return value is 0 if both are the same (including infinity),
positive if the absolute value of @var{op1} is greater than that of @var{op2},
and negative if it is smaller.
If @var{op1} or @var{op2} has a real or imaginary part which is NaN,
the function behaves like @code{mpfr_cmp} on two real numbers of which at least
one is NaN.
@end deftypefn
@node Projection & Decomposing
@section Projection and Decomposing Functions
@cindex Projection and Decomposing Functions
@deftypefn Function int mpc_real (mpfr_t @var{rop}, mpc_t @var{op}, mpfr_rnd_t @var{rnd})
Set @var{rop} to the value of the real part of @var{op} rounded
in the direction @var{rnd}.
@end deftypefn
@deftypefn Function int mpc_imag (mpfr_t @var{rop}, mpc_t @var{op}, mpfr_rnd_t @var{rnd})
Set @var{rop} to the value of the imaginary part of @var{op} rounded in the
direction @var{rnd}.
@end deftypefn
@deftypefn Macro mpfr_t mpc_realref (mpc_t @var{op})
@deftypefnx Macro mpfr_t mpc_imagref (mpc_t @var{op})
Return a reference to the real part and imaginary part of @var{op},
respectively. The @code{mpfr} functions can be used on the result of these
macros (note that the @code{mpfr_t} type is itself a pointer).
@end deftypefn
@deftypefn Function int mpc_arg (mpfr_t @var{rop}, mpc_t @var{op}, mpfr_rnd_t @var{rnd})
Set @var{rop} to the argument of @var{op}, with a branch cut along the
negative real axis.
@end deftypefn
@deftypefn Function int mpc_proj (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
Compute a projection of @var{op} onto the Riemann sphere. Set @var{rop} to
@var{op} rounded in the direction @var{rnd}, except when at least one part of
@var{op} is infinite (even if the other part is a NaN) in which case the real
part of @var{rop} is set to plus infinity and its imaginary part to a signed
zero with the same sign as the imaginary part of @var{op}.
@end deftypefn
@node Basic Arithmetic
@section Basic Arithmetic Functions
@cindex Complex arithmetic functions
@cindex Arithmetic functions
All the following functions are designed in such a way that, when working
with real numbers instead of complex numbers, their complexity should
essentially be the same as with the GNU MPFR library, with only a marginal
overhead due to the GNU MPC layer.
@deftypefun int mpc_add (mpc_t @var{rop}, mpc_t @var{op1}, mpc_t @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_add_ui (mpc_t @var{rop}, mpc_t @var{op1}, unsigned long int @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_add_fr (mpc_t @var{rop}, mpc_t @var{op1}, mpfr_t @var{op2}, mpc_rnd_t @var{rnd})
Set @var{rop} to @var{op1} @math{+} @var{op2} rounded according to @var{rnd}.
@end deftypefun
@deftypefn Function int mpc_sub (mpc_t @var{rop}, mpc_t @var{op1}, mpc_t @var{op2}, mpc_rnd_t @var{rnd})
@deftypefnx Function int mpc_sub_fr (mpc_t @var{rop}, mpc_t @var{op1}, mpfr_t @var{op2}, mpc_rnd_t @var{rnd})
@deftypefnx Function int mpc_fr_sub (mpc_t @var{rop}, mpfr_t @var{op1}, mpc_t @var{op2}, mpc_rnd_t @var{rnd})
@deftypefnx Function int mpc_sub_ui (mpc_t @var{rop}, mpc_t @var{op1}, unsigned long int @var{op2}, mpc_rnd_t @var{rnd})
@deftypefnx Macro int mpc_ui_sub (mpc_t @var{rop}, unsigned long int @var{op1}, mpc_t @var{op2}, mpc_rnd_t @var{rnd})
@deftypefnx Function int mpc_ui_ui_sub (mpc_t @var{rop}, unsigned long int @var{re1}, unsigned long int @var{im1}, mpc_t @var{op2}, mpc_rnd_t @var{rnd})
Set @var{rop} to @var{op1} @minus{} @var{op2} rounded according to @var{rnd}.
For @code{mpc_ui_ui_sub}, @var{op1} is @var{re1} + @var{im1}.
@end deftypefn
@deftypefun int mpc_neg (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
Set @var{rop} to @minus{}@var{op} rounded according to @var{rnd}.
Just changes the sign if @var{rop} and @var{op} are the same variable.
@end deftypefun
@deftypefun int mpc_mul (mpc_t @var{rop}, mpc_t @var{op1}, mpc_t @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_mul_ui (mpc_t @var{rop}, mpc_t @var{op1}, unsigned long int @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_mul_si (mpc_t @var{rop}, mpc_t @var{op1}, long int @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_mul_fr (mpc_t @var{rop}, mpc_t @var{op1}, mpfr_t @var{op2}, mpc_rnd_t @var{rnd})
Set @var{rop} to @var{op1} times @var{op2} rounded according to @var{rnd}.
Note: for @code{mpc_mul}, in case @var{op1} and @var{op2} have the same value,
use @code{mpc_sqr} for better efficiency.
@end deftypefun
@deftypefun int mpc_mul_i (mpc_t @var{rop}, mpc_t @var{op}, int @var{sgn}, mpc_rnd_t @var{rnd})
Set @var{rop} to @var{op} times the imaginary unit i if @var{sgn} is
non-negative, set @var{rop} to @var{op} times -i otherwise,
in both cases rounded according to @var{rnd}.
@end deftypefun
@deftypefun int mpc_sqr (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
Set @var{rop} to the square of @var{op} rounded according to @var{rnd}.
@end deftypefun
@deftypefun int mpc_fma (mpc_t @var{rop}, mpc_t @var{op1}, mpc_t @var{op2}, mpc_t @var{op3}, mpc_rnd_t @var{rnd})
Set @var{rop} to @var{op1}*@var{op2}+@var{op3},
rounded according to @var{rnd}, with only one final rounding.
@end deftypefun
@deftypefun int mpc_div (mpc_t @var{rop}, mpc_t @var{op1}, mpc_t @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_div_ui (mpc_t @var{rop}, mpc_t @var{op1}, unsigned long int @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_div_fr (mpc_t @var{rop}, mpc_t @var{op1}, mpfr_t @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_ui_div (mpc_t @var{rop}, unsigned long int @var{op1}, mpc_t @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_fr_div (mpc_t @var{rop}, mpfr_t @var{op1}, mpc_t @var{op2}, mpc_rnd_t @var{rnd})
Set @var{rop} to @var{op1}/@var{op2} rounded according to @var{rnd}.
@end deftypefun
@deftypefun int mpc_conj (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
Set @var{rop} to the conjugate of @var{op} rounded according to @var{rnd}.
Just changes the sign of the imaginary part
if @var{rop} and @var{op} are the same variable.
@end deftypefun
@deftypefun int mpc_abs (mpfr_t @var{rop}, mpc_t @var{op}, mpfr_rnd_t @var{rnd})
Set the floating-point number @var{rop} to the absolute value of @var{op},
rounded in the direction @var{rnd}.
@end deftypefun
@deftypefun int mpc_norm (mpfr_t @var{rop}, mpc_t @var{op}, mpfr_rnd_t @var{rnd})
Set the floating-point number @var{rop} to the norm of @var{op}
(i.e., the square of its absolute value),
rounded in the direction @var{rnd}.
@end deftypefun
@deftypefun int mpc_mul_2ui (mpc_t @var{rop}, mpc_t @var{op1}, unsigned long int @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_mul_2si (mpc_t @var{rop}, mpc_t @var{op1}, long int @var{op2}, mpc_rnd_t @var{rnd})
Set @var{rop} to @var{op1} times 2 raised to @var{op2}
rounded according to @var{rnd}. Just modifies the exponents
of the real and imaginary parts by @var{op2}
when @var{rop} and @var{op1} are identical.
@end deftypefun
@deftypefun int mpc_div_2ui (mpc_t @var{rop}, mpc_t @var{op1}, unsigned long int @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_div_2si (mpc_t @var{rop}, mpc_t @var{op1}, long int @var{op2}, mpc_rnd_t @var{rnd})
Set @var{rop} to @var{op1} divided by 2 raised to @var{op2}
rounded according to @var{rnd}. Just modifies the exponents
of the real and imaginary parts by @var{op2}
when @var{rop} and @var{op1} are identical.
@end deftypefun
@node Power Functions and Logarithm
@section Power Functions and Logarithm
@cindex Power functions
@cindex Logarithm
@deftypefun int mpc_sqrt (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
Set @var{rop} to the square root of @var{op} rounded according to @var{rnd}.
The returned value @var{rop} has a non-negative real part, and if its real
part is zero, a non-negative imaginary part.
@end deftypefun
@deftypefun int mpc_pow (mpc_t @var{rop}, mpc_t @var{op1}, mpc_t @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_pow_d (mpc_t @var{rop}, mpc_t @var{op1}, double @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_pow_ld (mpc_t @var{rop}, mpc_t @var{op1}, long double @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_pow_si (mpc_t @var{rop}, mpc_t @var{op1}, long @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_pow_ui (mpc_t @var{rop}, mpc_t @var{op1}, unsigned long @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_pow_z (mpc_t @var{rop}, mpc_t @var{op1}, mpz_t @var{op2}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_pow_fr (mpc_t @var{rop}, mpc_t @var{op1}, mpfr_t @var{op2}, mpc_rnd_t @var{rnd})
Set @var{rop} to @var{op1} raised to the power @var{op2}, rounded according
to @var{rnd}.
For @code{mpc_pow_d}, @code{mpc_pow_ld}, @code{mpc_pow_si}, @code{mpc_pow_ui},
@code{mpc_pow_z} and @code{mpc_pow_fr},
the imaginary part of @var{op2} is considered as +0.
When both @var{op1} and @var{op2} are zero, the result has real part 1,
and imaginary part 0, with sign being the opposite of that of @var{op2}.
@end deftypefun
@deftypefun int mpc_exp (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
Set @var{rop} to the exponential of @var{op},
rounded according to @var{rnd} with the precision of @var{rop}.
@end deftypefun
@deftypefun int mpc_log (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_log10 (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
Set @var{rop} to the natural and base-10 logarithm of @var{op} respectively,
rounded according to @var{rnd} with the precision of @var{rop}.
The principal branch is chosen, with the branch cut on the negative real axis,
so that the imaginary part of the result lies in
@math{]-\pi , \pi]} and @math{]-\pi/log(10) , \pi/log(10)]} respectively.
@end deftypefun
@deftypefun int mpc_rootofunity (mpc_t @var{rop}, unsigned long int @var{n}, unsigned long int @var{k}, mpc_rnd_t @var{rnd})
Set @var{rop} to the standard primitive @var{n}-th root of unity raised to the power @var{k}, that is,
@math{\exp (2 \pi i k / n)},
rounded according to @var{rnd} with the precision of @var{rop}.
@end deftypefun
@node Trigonometric Functions
@section Trigonometric Functions
@cindex Trigonometric functions
@deftypefun int mpc_sin (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
Set @var{rop} to the sine of @var{op},
rounded according to @var{rnd} with the precision of @var{rop}.
@end deftypefun
@deftypefun int mpc_cos (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
Set @var{rop} to the cosine of @var{op},
rounded according to @var{rnd} with the precision of @var{rop}.
@end deftypefun
@deftypefun int mpc_sin_cos (mpc_t @var{rop_sin}, mpc_t @var{rop_cos}, mpc_t @var{op}, mpc_rnd_t @var{rnd_sin}, mpc_rnd_t @var{rnd_cos})
Set @var{rop_sin} to the sine of @var{op},
rounded according to @var{rnd_sin} with the precision of @var{rop_sin},
and @var{rop_cos} to the cosine of @var{op},
rounded according to @var{rnd_cos} with the precision of @var{rop_cos}.
@end deftypefun
@deftypefun int mpc_tan (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
Set @var{rop} to the tangent of @var{op},
rounded according to @var{rnd} with the precision of @var{rop}.
@end deftypefun
@deftypefun int mpc_sinh (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
Set @var{rop} to the hyperbolic sine of @var{op},
rounded according to @var{rnd} with the precision of @var{rop}.
@end deftypefun
@deftypefun int mpc_cosh (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
Set @var{rop} to the hyperbolic cosine of @var{op},
rounded according to @var{rnd} with the precision of @var{rop}.
@end deftypefun
@deftypefun int mpc_tanh (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
Set @var{rop} to the hyperbolic tangent of @var{op},
rounded according to @var{rnd} with the precision of @var{rop}.
@end deftypefun
@deftypefun int mpc_asin (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_acos (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_atan (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
Set @var{rop} to the inverse sine, inverse cosine, inverse tangent of @var{op},
rounded according to @var{rnd} with the precision of @var{rop}.
@end deftypefun
@deftypefun int mpc_asinh (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_acosh (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
@deftypefunx int mpc_atanh (mpc_t @var{rop}, mpc_t @var{op}, mpc_rnd_t @var{rnd})
Set @var{rop} to the inverse hyperbolic sine, inverse hyperbolic cosine,
inverse hyperbolic tangent of @var{op},
rounded according to @var{rnd} with the precision of @var{rop}.
The branch cut of @var{mpc_acosh} is @math{(-\infty, 1)}.
@end deftypefun
@node Miscellaneous Complex Functions
@section Miscellaneous Functions
@cindex Miscellaneous complex functions
@deftypefun int mpc_urandom (mpc_t @var{rop}, gmp_randstate_t @var{state})
Generate a uniformly distributed random complex in the unit square @math{[0,
1] @times [0, 1]}. Return 0, unless an exponent in the real or imaginary part
is not in the current exponent range, in which case that part is set to NaN
and a zero value is returned. The second argument is a @code{gmp_randstate_t}
structure which should be created using the GMP @code{rand_init} function, see
the GMP manual.
@end deftypefun
@deftypefun {const char *} mpc_get_version (void)
Return the GNU MPC version, as a null-terminated string.
@end deftypefun
@defmac MPC_VERSION
@defmacx MPC_VERSION_MAJOR
@defmacx MPC_VERSION_MINOR
@defmacx MPC_VERSION_PATCHLEVEL
@defmacx MPC_VERSION_STRING
@code{MPC_VERSION} is the version of GNU MPC as a preprocessing constant.
@code{MPC_VERSION_MAJOR}, @code{MPC_VERSION_MINOR} and
@code{MPC_VERSION_PATCHLEVEL} are respectively the major, minor and
patch level of GNU MPC version, as preprocessing constants.
@code{MPC_VERSION_STRING} is the version as a string constant, which
can be compared to the result of @code{mpc_get_version} to check at
run time the header file and library used match:
@example
if (strcmp (mpc_get_version (), MPC_VERSION_STRING))
fprintf (stderr, "Warning: header and library do not match\n");
@end example
Note: Obtaining different strings is not necessarily an error, as in
general, a program compiled with some old GNU MPC version can be
dynamically linked with a newer GNU MPC library version (if allowed by the
library versioning system).
@end defmac
@deftypefn Macro long MPC_VERSION_NUM (@var{major}, @var{minor}, @var{patchlevel})
Create an integer in the same format as used by @code{MPC_VERSION} from the
given @var{major}, @var{minor} and @var{patchlevel}.
Here is an example of how to check the GNU MPC version at compile time:
@example
#if (!defined(MPC_VERSION) || (MPC_VERSION