I am too lazy for a detailed discussion of all the changes.
Many identifiers got their `cl_' stripped off. Ok, this is a
clumpsy CVS log-entry. Promise: more will soon go into the
file ChangeLog. I apologize for the inconvenience. :-(
(standalone)
Include files
- include/
+ include/cln/
Sample programs
examples/
You need GNU make. On HP-UX, you also need GNU sed.
Known to work with:
- - Linux/x86, gcc-2.7.0, gcc-2.7.2, gcc-2.8.0, egcs-1.1, gcc-2.95
- - Solaris 2.4 (sparc), gcc-2.7.0, gcc-2.7.2, egcs-1.1, gcc-2.95
+ - Linux/x86, gcc-2.8.0, egcs-1.1, gcc-2.95.x
+ - Solaris 2.4 (sparc), egcs-1.1, gcc-2.95
- OSF/1 V4.0 (alpha), egcs-1.1, gcc-2.95
- Irix 5.3, CC 4
-The "make" step takes about 4 hours, on a 486 DX / 33 MHz / 8 MB.
-
-On Linux, g++ needs 15 MB to compile the tests. So better have
-17 MB swap space and 1 MB room in $TMPDIR.
-
-If you use gcc and g++ version 2.7.x, don't add -O2 to the CXXFLAGS, because
-"g++ -O" generates better code for libcln.a than "g++ -O2".
+The "make" step takes about 1 hour, on a P-II / 400 MHz / 64 MB.
If you use g++ version 2.8.x or egcs-2.91.x (a.k.a. egcs-1.1) or gcc-2.95.x,
I recommend adding "-fno-exceptions" to the CXXFLAGS. This will likely
configures : $(CONFIGURES)
configure : configure.in $(AUTOCONF_FILES)
- autoconf/autoconf -m autoconf
+ ./autoconf/autoconf -m autoconf
# # ACLOCAL = /home/bruno/clisp/src/autoconf/aclocal.m4
# # ACSELECT = /home/bruno/clisp/src/autoconf/acselect
prefix = @prefix@
local_prefix = /usr/local
exec_prefix = @exec_prefix@
+bindir = @bindir@
datadir = @datadir@
libdir = @libdir@
includedir = @includedir@
CFLAGS = @CFLAGS@
RM = rm -f
@SET_MAKE@
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+UNINSTALL_PROGRAM = @UNINSTALL_PROGRAM@
#### End of system configuration section. ####
install : force
cd @subdir@; $(MAKE) install
+ if [ ! -d $(bindir) ] ; then mkdir $(bindir) ; fi
+ $(INSTALL_PROGRAM) cln-config $(bindir)/cln-config
installdirs : force
cd @subdir@; $(MAKE) installdirs
+ if [ ! -d $(bindir) ] ; then mkdir $(bindir) ; fi
uninstall : force
cd @subdir@; $(MAKE) uninstall
+ $(RM) $(bindir)/cln-config
check : force
cd @subdir@; $(MAKE) check
distclean : force
cd @subdir@; if test -f Makefile; then $(MAKE) distclean; fi
$(RM) config.status config.log config.cache Makefile
+ $(RM) cln-config
$(RM) libtool
- $(RM) include/cl_config.h include/cl_intparam.h include/cl_floatparam.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/float/cl_float_config.h src/timing/cl_t_config.h
+ $(RM) include/cln/config.h include/cln/intparam.h include/cln/floatparam.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/float/cl_float_config.h src/timing/cl_t_config.h
maintainer-clean : force
cd @subdir@; if test -f Makefile; then $(MAKE) maintainer-clean; fi
$(RM) config.status config.log config.cache Makefile
+ $(RM) cln-config
$(RM) libtool
- $(RM) include/cl_config.h include/cl_intparam.h include/cl_floatparam.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/float/cl_float_config.h src/timing/cl_t_config.h
+ $(RM) include/cln/config.h include/cln/intparam.h include/cln/floatparam.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/float/cl_float_config.h src/timing/cl_t_config.h
force :
-
2000-06-xx, version 1.1.0
=========================
+Functional changes
+------------------
+
+* ISO/IEC 14882 fashion adjustments:
+ Put everything into namespace cln. All funcamental data types still
+ carry their old names. Other non-macro identifiers are now written as
+ cln::foo instead of cl_foo, except where the cl_ comes from a data type
+ (as in cl_I_to_int()). Headers are installed into a separate
+ directory, #include <cln/foo.h> instead of <cl_foo.h>. Applications
+ must be manually ported to the new style. We apologizes for the
+ inconvenience.
+
Implementation changes
----------------------
* Adjusted several break-even points to make better use of a faster libgmp and
better match present-day CPUs.
+* Fix compilation errors with gcc-2.96.
+
2000-01-13, version 1.0.3
=========================
Features:
- Rich set of number classes:
- Integer (unlimited precision), rational,
- short float, single float, double float,
- long float (unlimited precision), complex,
- modular integer, univariate polynomial.
+ Integer (unlimited precision), rational, short float,
+ single float, double float, long float (unlimited
+ precision), complex, modular integer, univariate polynomial.
- Elementary, logical, transcendental functions.
- C++ as implementation language brings
- efficiency,
Requires: C++ compiler g++.
The following C++ features are used:
-classes, member functions,
-overloading of functions and operators,
-constructors and destructors, inline, const,
-multiple inheritance, templates.
+classes, member functions, overloading of functions and operators,
+constructors and destructors, inline, const, multiple inheritance,
+templates and namespaces.
The following C++ features are not used:
-new, delete, virtual inheritance,
-exceptions.
+new, delete, virtual inheritance, exceptions.
Homepage: http://clisp.cons.org/~haible/packages-cln.html
-
cl_cv_new_gmp_h="yes", cl_cv_new_gmp_h="no")
])])dnl
-# Does libgmp feature 3.0 functionality?
+# Does libgmp provide some functionality introduced in version 3.0?
AC_DEFUN(CL_GMP_CHECK,
[AC_CACHE_CHECK([for working libgmp], cl_cv_new_libgmp, [
SAVELIBS=$LIBS
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.
-version='2000-05-30'
+version='2000-07-27'
# 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
# object file format.
# Determine the machine/vendor (is the vendor relevant).
case "${UNAME_MACHINE}" in
- amiga) machine=m68k-cbm ;;
+ amiga) machine=m68k-unknown ;;
arm32) machine=arm-unknown ;;
atari*) machine=m68k-atari ;;
sun3*) machine=m68k-sun ;;
echo alpha-dec-winnt3.5
exit 0 ;;
Amiga*:UNIX_System_V:4.0:*)
- echo m68k-cbm-sysv4
+ echo m68k-unknown-sysv4
exit 0;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
*:GNU:*:*)
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit 0 ;;
*:Linux:*:*)
# The BFD linker knows what the default object file format is, so
exit 0
;;
elf_i?86)
- echo "${UNAME_MACHINE}-pc-linux"
- exit 0
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
;;
i?86coff)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
EOF
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
+ test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
fi ;;
# 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.
DS/*:UNIX_System_V:*:*)
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
exit 0 ;;
+ *: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 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.
-version='2000-05-30'
+version='2000-08-07'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-# Written by Per Bothner <bothner@cygnus.com>.
# Please send patches to <config-patches@gnu.org>.
#
# Configuration subroutine to validate and canonicalize a configuration type.
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple)
+ -apple | -axis)
os=
basic_machine=$1
;;
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
- | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
+ | arme[lb] | armv* | pyramid | mn10200 | mn10300 | tron | a29k \
| 580 | i960 | h8300 \
| x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
| hppa64 \
| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
| alphaev6[78] \
- | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
+ | we32k | ns16k | clipper | i370 | sh | sh[34] \
+ | powerpc | powerpcle \
| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
| mips64vr5000 | miprs64vr5000el | mcore \
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
- | thumb | d10v | fr30 | avr)
+ | thumb | d10v | d30v | fr30 | avr)
basic_machine=$basic_machine-unknown
;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
;;
# 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[34567]86)
+ i[234567]86)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
;;
# Recognize the basic CPU types with company name.
# FIXME: clean up the formatting here.
- vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
+ vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
| f301-* | armv*-* | s390-* | sv1-* | t3e-* \
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
- | bs2000-*)
+ | bs2000-* | tic54x-* | c54x-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
os=-sysv
;;
amiga | amiga-*)
- basic_machine=m68k-cbm
+ basic_machine=m68k-unknown
;;
amigaos | amigados)
- basic_machine=m68k-cbm
+ basic_machine=m68k-unknown
os=-amigaos
;;
amigaunix | amix)
- basic_machine=m68k-cbm
+ basic_machine=m68k-unknown
os=-sysv4
;;
apollo68)
crds | unos)
basic_machine=m68k-crds
;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
da30 | da30-*)
basic_machine=m68k-da30
;;
pentium | p5 | k5 | k6 | nexen)
basic_machine=i586-pc
;;
- pentiumpro | p6 | 6x86)
+ pentiumpro | p6 | 6x86 | athlon)
basic_machine=i686-pc
;;
pentiumii | pentium2)
pentium-* | p5-* | k5-* | k6-* | nexen-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- pentiumpro-* | p6-* | 6x86-*)
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-*)
basic_machine=t3e-cray
os=-unicos
;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
tx39)
basic_machine=mipstx39-unknown
;;
we32k)
basic_machine=we32k-att
;;
+ sh3 | sh4)
+ base_machine=sh-unknown
+ ;;
sparc | sparcv9)
basic_machine=sparc-sun
;;
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit*)
+ | -openstep* | -oskit* | -conix*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
// Benchmarks from the LiDIA home page
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_float.h>
-#include <cl_float_io.h>
-#include <cl_real.h>
-#include <cl_real_io.h>
-#include <cl_complex.h>
-#include <cl_complex_io.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/float.h>
+#include <cln/float_io.h>
+#include <cln/real.h>
+#include <cln/real_io.h>
+#include <cln/complex.h>
+#include <cln/complex_io.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
// Timings on Linux i486 33 MHz, 1000 decimal places = 104 32-bit words.
// Function LiDIA Pari CLISP CLN
if (argc < 1)
exit(1);
- fprint(cl_stderr, "Number of repetitions: ");
- fprintdecimal(cl_stderr, repetitions);
- fprint(cl_stderr, "\n");
+ fprint(stderr, "Number of repetitions: ");
+ fprintdecimal(stderr, repetitions);
+ fprint(stderr, "\n");
- cl_float_format_t prec = cl_float_format(1000);
+ float_format_t prec = float_format(1000);
- fprint(cl_stderr, "pi\n");
+ fprint(stderr, "pi\n");
{ cl_F p;
- { CL_TIMING; p = cl_pi(prec); }
+ { CL_TIMING; p = pi(prec); }
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
- { cl_F p = cl_pi(prec); }
+ { cl_F p = pi(prec); }
}
cout << p << endl << endl;
}
- fprint(cl_stderr, "gamma\n");
+ fprint(stderr, "gamma\n");
{ cl_F p;
- { CL_TIMING; p = cl_eulerconst(prec); }
+ { CL_TIMING; p = eulerconst(prec); }
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
- { cl_F p = cl_eulerconst(prec); }
+ { cl_F p = eulerconst(prec); }
}
cout << p << endl << endl;
}
- fprint(cl_stderr, "e\n");
- { cl_F p = cl_exp1(prec);
+ fprint(stderr, "e\n");
+ { cl_F p = exp1(prec);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
- { cl_F p = cl_exp1(prec); }
+ { cl_F p = exp1(prec); }
}
cout << p << endl << endl;
}
- fprint(cl_stderr, "sqrt(3)\n");
+ fprint(stderr, "sqrt(3)\n");
{ cl_R p = sqrt(cl_float(3,prec));
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << p << endl << endl;
}
- fprint(cl_stderr, "exp(log(2))\n");
+ fprint(stderr, "exp(log(2))\n");
{ cl_N p = exp(log(cl_float(2,prec)));
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << p << endl << endl;
}
- fprint(cl_stderr, "log(exp(2))\n");
+ fprint(stderr, "log(exp(2))\n");
{ cl_N p = log(exp(cl_float(2,prec)));
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << p << endl << endl;
}
- fprint(cl_stderr, "sin(pi/3)\n");
- { cl_R p = sin(cl_pi(prec)/3);
+ fprint(stderr, "sin(pi/3)\n");
+ { cl_R p = sin(pi(prec)/3);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
- { cl_R p = sin(cl_pi(prec)/3); }
+ { cl_R p = sin(pi(prec)/3); }
}
cout << p << endl << endl;
}
- fprint(cl_stderr, "cos(pi/3)\n");
- { cl_R p = cos(cl_pi(prec)/3);
+ fprint(stderr, "cos(pi/3)\n");
+ { cl_R p = cos(pi(prec)/3);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
- { cl_R p = cos(cl_pi(prec)/3); }
+ { cl_R p = cos(pi(prec)/3); }
}
cout << p << endl << endl;
}
- fprint(cl_stderr, "arcsin(sqrt(3)/2)\n");
+ fprint(stderr, "arcsin(sqrt(3)/2)\n");
{ cl_N p = asin(sqrt(cl_float(3,prec))/2);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << p << endl << endl;
}
- fprint(cl_stderr, "arccos(sqrt(3)/2)\n");
+ fprint(stderr, "arccos(sqrt(3)/2)\n");
{ cl_N p = acos(sqrt(cl_float(3,prec))/2);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << p << endl << endl;
}
- fprint(cl_stderr, "sinh(log(2))\n");
+ fprint(stderr, "sinh(log(2))\n");
{ cl_N p = sinh(log(cl_float(2,prec)));
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << p << endl << endl;
}
- fprint(cl_stderr, "cosh(log(2))\n");
+ fprint(stderr, "cosh(log(2))\n");
{ cl_N p = cosh(log(cl_float(2,prec)));
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << p << endl << endl;
}
- fprint(cl_stderr, "arsinh(pi)\n");
- { cl_N p = asinh(cl_pi(prec));
+ fprint(stderr, "arsinh(pi)\n");
+ { cl_N p = asinh(pi(prec));
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
- { cl_N p = asinh(cl_pi(prec)); }
+ { cl_N p = asinh(pi(prec)); }
}
cout << p << endl << endl;
}
- fprint(cl_stderr, "arcosh(pi)\n");
- { cl_N p = acosh(cl_pi(prec));
+ fprint(stderr, "arcosh(pi)\n");
+ { cl_N p = acosh(pi(prec));
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
- { cl_N p = acosh(cl_pi(prec)); }
+ { cl_N p = acosh(pi(prec)); }
}
cout << p << endl << endl;
}
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_integer_io.h>
-#include <cl_float.h>
-#include <cl_real.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/integer_io.h>
+#include <cln/float.h>
+#include <cln/real.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
+
+using namespace std;
+using namespace cln;
int main (int argc, char * argv[])
{
}
if (argc < 1)
exit(1);
+
+ stderr << "Number of digits: " << digits << endl;
+ stderr << "Number of repetitions: " << repetitions << endl;
- fprint(cl_stderr, "Number of digits: ");
- fprintdecimal(cl_stderr, digits);
- fprint(cl_stderr, "\n");
- fprint(cl_stderr, "Number of repetitions: ");
- fprintdecimal(cl_stderr, repetitions);
- fprint(cl_stderr, "\n");
-
- cl_float_format_t prec = cl_float_format(digits);
- cl_float_format_t prec2 = cl_float_format(digits*2);
+ float_format_t prec = float_format(digits);
+ float_format_t prec2 = float_format(digits*2);
cl_I pow = expt_pos(10,digits);
cl_I x1 = floor1((sqrt(cl_float(5,prec2))+1)/2 * expt_pos(pow,2));
cl_I x2 = floor1(sqrt(cl_float(3,prec)) * pow);
cl_I x3 = pow+1;
- fprint(cl_stderr, "multiplication\n");
+ stderr << "multiplication" << endl;
{ cl_I r = x1*x2;
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << r << endl << endl;
}
- fprint(cl_stderr, "division\n");
+ stderr << "division" << endl;
{ cl_I_div_t qr = floor2(x1,x2);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << qr.quotient << endl << qr.remainder << endl << endl;
}
- fprint(cl_stderr, "isqrt\n");
+ stderr << "isqrt" << endl;
{ cl_I r = isqrt(x3);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << r << endl << endl;
}
- fprint(cl_stderr, "gcd\n");
+ stderr << "gcd" << endl;
{ cl_I r = gcd(x1,x2);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
+
+using namespace std;
+using namespace cln;
int main (int argc, char * argv[])
{
if (argc < 1)
exit(1);
- fprint(cl_stderr, "Limit: ");
- fprintdecimal(cl_stderr, limit);
- fprint(cl_stderr, "\n");
- fprint(cl_stderr, "Number of repetitions: ");
- fprintdecimal(cl_stderr, repetitions);
- fprint(cl_stderr, "\n");
+ stderr << "Limit: " << limit << endl;
+ stderr << "Number of repetitions: " << repetitions << endl;
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_float.h>
-#include <cl_float_io.h>
-#include <cl_real.h>
-#include <cl_real_io.h>
-#include <cl_complex.h>
-#include <cl_complex_io.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/float.h>
+#include <cln/float_io.h>
+#include <cln/real.h>
+#include <cln/real_io.h>
+#include <cln/complex.h>
+#include <cln/complex_io.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
+
+using namespace std;
+using namespace cln;
int main (int argc, char * argv[])
{
if (argc < 1)
exit(1);
- fprint(cl_stderr, "Number of digits: ");
- fprintdecimal(cl_stderr, digits);
- fprint(cl_stderr, "\n");
- fprint(cl_stderr, "Number of repetitions (except for pi,euler,e): ");
- fprintdecimal(cl_stderr, repetitions);
- fprint(cl_stderr, "\n");
+ stderr << "Number of digits: " << digits << endl;
+ stderr << "Number of repetitions (except for pi,euler,e): " << repetitions << endl;
- cl_float_format_t prec = cl_float_format(digits);
+ float_format_t prec = float_format(digits);
cl_F x1 = sqrt(cl_float(2,prec));
cl_F x2 = sqrt(cl_float(3,prec));
cl_F x3 = The(cl_F)(log(cl_float(2,prec)));
- fprint(cl_stderr, "multiplication\n");
+ stderr << "multiplication" << endl;
{ cl_F r = x1*x2;
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << r << endl << endl;
}
- fprint(cl_stderr, "sqrt\n");
+ stderr << "sqrt" << endl;
{ cl_F r = sqrt(x3);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << r << endl << endl;
}
- fprint(cl_stderr, "pi\n");
+ stderr << "pi" << endl;
{ cl_F r;
- { CL_TIMING; r = cl_pi(prec); }
+ { CL_TIMING; r = pi(prec); }
cout << r << endl << endl;
}
- fprint(cl_stderr, "eulerconst\n");
+ stderr << "eulerconst" << endl;
{ cl_F r;
- { CL_TIMING; r = cl_eulerconst(prec); }
+ { CL_TIMING; r = eulerconst(prec); }
cout << r << endl << endl;
}
- fprint(cl_stderr, "e\n");
+ stderr << "e" << endl;
{ cl_F r;
- { CL_TIMING; r = cl_exp1(prec); }
+ { CL_TIMING; r = exp1(prec); }
cout << r << endl << endl;
}
- fprint(cl_stderr, "exp\n");
+ stderr << "exp" << endl;
{ cl_F r = exp(-x1);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << r << endl << endl;
}
- fprint(cl_stderr, "log\n");
+ stderr << "log" << endl;
{ cl_N r = log(x2);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << r << endl << endl;
}
- fprint(cl_stderr, "sin\n");
+ stderr << "sin" << endl;
{ cl_R r = sin(5*x1);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << r << endl << endl;
}
- fprint(cl_stderr, "cos\n");
+ stderr << "cos" << endl;
{ cl_R r = cos(5*x1);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << r << endl << endl;
}
- fprint(cl_stderr, "asin\n");
+ stderr << "asin" << endl;
{ cl_N r = asin(x3);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << r << endl << endl;
}
- fprint(cl_stderr, "acos\n");
+ stderr << "acos" << endl;
{ cl_N r = acos(x3);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << r << endl << endl;
}
- fprint(cl_stderr, "atan\n");
+ stderr << "atan" << endl;
{ cl_F r = atan(x3);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << r << endl << endl;
}
- fprint(cl_stderr, "sinh\n");
+ stderr << "sinh" << endl;
{ cl_F r = sinh(x2);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << r << endl << endl;
}
- fprint(cl_stderr, "cosh\n");
+ stderr << "cosh" << endl;
{ cl_F r = cosh(x2);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << r << endl << endl;
}
- fprint(cl_stderr, "asinh\n");
+ stderr << "asinh" << endl;
{ cl_N r = asinh(x3);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << r << endl << endl;
}
- fprint(cl_stderr, "acosh\n");
+ stderr << "acosh" << endl;
{ cl_N r = acosh(1+x3);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << r << endl << endl;
}
- fprint(cl_stderr, "atanh\n");
+ stderr << "atanh" << endl;
{ cl_N r = atanh(x3);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
--- /dev/null
+#!/bin/sh
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec_prefix_set=no
+
+usage="\
+Usage: cln-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cppflags]"
+
+if test $# -eq 0; then
+ echo "${usage}" 1>&2
+ exit 1
+fi
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ --prefix=*)
+ prefix=$optarg
+ if test $exec_prefix_set = no ; then
+ exec_prefix=$optarg
+ fi
+ ;;
+ --prefix)
+ echo $prefix
+ ;;
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ exec_prefix_set=yes
+ ;;
+ --exec-prefix)
+ echo $exec_prefix
+ ;;
+ --version)
+ echo @CL_VERSION@
+ ;;
+ --cppflags)
+ if test @includedir@ != /usr/include ; then
+ includes=-I@includedir@
+ fi
+ echo $includes @CPPFLAGS@
+ ;;
+ --libs)
+ libdirs=-L@libdir@
+ echo $libdirs -lcln @LIBS@
+ ;;
+ *)
+ echo "${usage}" 1>&2
+ exit 1
+ ;;
+ esac
+ shift
+done
ac_help="$ac_help
--with-gnu-ld assume the C compiler uses GNU ld [default=no]"
ac_help="$ac_help
- --with-gmp use external fast low-level functions from GNU gmp3.
+ --with-gmp use external fast low-level functions from GNU MP 3.
[default=yes]"
# Initialize some variables set by options.
#endif
EOF
+ LIBS=-lm
PACKAGE=cln
-# Check whether --enable-shared or --disable-shared was given.
+ # Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
p=${PACKAGE-default}
if test "$ac_cv_prog_gcc" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1374: checking for ld used by GCC" >&5
+echo "configure:1375: checking for ld used by GCC" >&5
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
# Accept absolute paths.
esac
elif test "$with_gnu_ld" = yes; then
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1392: checking for GNU ld" >&5
+echo "configure:1393: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1395: checking for non-GNU ld" >&5
+echo "configure:1396: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1431: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1432: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1446: checking for BSD-compatible nm" >&5
+echo "configure:1447: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1483: checking whether ln -s works" >&5
+echo "configure:1484: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$host" in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 1519 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 1520 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
LD="${LD-ld} -32"
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+
CL_CURRENT=1
CL_REVISION=0
CL_AGE=0
-CL_VERSION=1
+CL_VERSION_MAJOR=1
CL_VERSION_MINOR=1
CL_VERSION_PATCHLEVEL=0
cat >> confdefs.h <<EOF
-#define CL_VERSION $CL_VERSION
+#define CL_VERSION_MAJOR $CL_VERSION_MAJOR
EOF
cat >> confdefs.h <<EOF
#define CL_VERSION_PATCHLEVEL $CL_VERSION_PATCHLEVEL
EOF
+CL_VERSION=$CL_VERSION_MAJOR.$CL_VERSION_MINOR.$CL_VERSION_PATCHLEVEL
+cat >> confdefs.h <<EOF
+#define CL_VERSION $CL_VERSION
+EOF
+
- ac_ext=C
+
+ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking for bool type""... $ac_c" 1>&6
-echo "configure:1587: checking for bool type" >&5
+echo "configure:1595: checking for bool type" >&5
if eval "test \"`echo '$''{'cl_cv_cplusplus_bool'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1593 "configure"
+#line 1601 "configure"
#include "confdefs.h"
int main() {
bool x;
; return 0; }
EOF
-if { (eval echo configure:1600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cl_cv_cplusplus_bool=yes
else
echo $ac_n "checking for long long type""... $ac_c" 1>&6
-echo "configure:1634: checking for long long type" >&5
+echo "configure:1642: checking for long long type" >&5
if eval "test \"`echo '$''{'cl_cv_c_longlong'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cl_cv_c_longlong="guessing no"
else
cat > conftest.$ac_ext <<EOF
-#line 1643 "configure"
+#line 1651 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit(int);
}
}
EOF
-if { (eval echo configure:1667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cl_cv_c_longlong=yes
else
esac
echo $ac_n "checking for long double type""... $ac_c" 1>&6
-echo "configure:1700: checking for long double type" >&5
+echo "configure:1708: checking for long double type" >&5
if eval "test \"`echo '$''{'cl_cv_c_longdouble'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cl_cv_c_longdouble="guessing no"
else
cat > conftest.$ac_ext <<EOF
-#line 1709 "configure"
+#line 1717 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit(int);
int main()
{ long double x = 2.7182818284590452354L; x = x*x; exit (x==0.0L); }
EOF
-if { (eval echo configure:1717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cl_cv_c_longdouble=yes
else
esac
echo $ac_n "checking for working template<>""... $ac_c" 1>&6
-echo "configure:1750: checking for working template<>" >&5
+echo "configure:1758: checking for working template<>" >&5
if eval "test \"`echo '$''{'cl_cv_c_templatenull'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1756 "configure"
+#line 1764 "configure"
#include "confdefs.h"
template <class T> class c {}; template <> class c<int> { int x; };
int main() {
; return 0; }
EOF
-if { (eval echo configure:1763: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cl_cv_c_templatenull=yes
else
if test -n "$GCC"; then
echo $ac_n "checking for the global constructors function prefix""... $ac_c" 1>&6
-echo "configure:1787: checking for the global constructors function prefix" >&5
+echo "configure:1795: checking for the global constructors function prefix" >&5
if eval "test \"`echo '$''{'cl_cv_cplusplus_ctorprefix'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
foo foobar;
EOF
# look for the assembly language name in the .s file
-{ ac_try='${CXX-g++} $CXXFLAGS -S conftest.cc'; { (eval echo configure:1797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } >/dev/null 2>&1
+{ ac_try='${CXX-g++} $CXXFLAGS -S conftest.cc'; { (eval echo configure:1805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } >/dev/null 2>&1
if grep '_GLOBAL_\$I\$foobar' conftest.s >/dev/null ; then
cl_cv_cplusplus_ctorprefix='_GLOBAL_$I$'
else
EOF
echo $ac_n "checking whether the global constructors function need to be exported""... $ac_c" 1>&6
-echo "configure:1827: checking whether the global constructors function need to be exported" >&5
+echo "configure:1835: checking whether the global constructors function need to be exported" >&5
if eval "test \"`echo '$''{'cl_cv_cplusplus_ctorexport'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
extern "C" void ctor (void) __asm__ (ASM_UNDERSCORE_PREFIX CL_GLOBAL_CONSTRUCTOR_PREFIX "foobar");
int main() { ctor(); return 0; }
EOF
-if { ac_try='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest1.cc conftest2.cc $LIBS 1>&5'; { (eval echo configure:1848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } >/dev/null 2>&1 && test -s conftest${ac_exeext}; then
+if { ac_try='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest1.cc conftest2.cc $LIBS 1>&5'; { (eval echo configure:1856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } >/dev/null 2>&1 && test -s conftest${ac_exeext}; then
cl_cv_cplusplus_ctorexport=no
else
cl_cv_cplusplus_ctorexport=yes
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1870: checking for $ac_hdr" >&5
+echo "configure:1878: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1875 "configure"
+#line 1883 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1910: checking for working alloca.h" >&5
+echo "configure:1918: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'cl_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1916 "configure"
+#line 1924 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = (char *) alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:1923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cl_cv_header_alloca_h=yes
else
#endif
"
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1965: checking for alloca" >&5
+echo "configure:1973: checking for alloca" >&5
if eval "test \"`echo '$''{'cl_cv_func_alloca'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1971 "configure"
+#line 1979 "configure"
#include "confdefs.h"
$decl
int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:1978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cl_cv_func_alloca=yes
else
fi
echo $ac_n "checking for fpu_control_t""... $ac_c" 1>&6
-echo "configure:2010: checking for fpu_control_t" >&5
+echo "configure:2018: checking for fpu_control_t" >&5
if eval "test \"`echo '$''{'cl_cv_type_fpu_control_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2016 "configure"
+#line 2024 "configure"
#include "confdefs.h"
#include <fpu_control.h>
int main() {
fpu_control_t x;
; return 0; }
EOF
-if { (eval echo configure:2023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cl_cv_type_fpu_control_t=yes
else
fi
echo $ac_n "checking for __setfpucw""... $ac_c" 1>&6
-echo "configure:2045: checking for __setfpucw" >&5
+echo "configure:2053: checking for __setfpucw" >&5
if eval "test \"`echo '$''{'cl_cv_func_setfpucw'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2051 "configure"
+#line 2059 "configure"
#include "confdefs.h"
#include <fpu_control.h>
int main() {
__setfpucw(_FPU_IEEE);
; return 0; }
EOF
-if { (eval echo configure:2058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cl_cv_func_setfpucw=yes
else
for ac_func in gettimeofday
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2084: checking for $ac_func" >&5
+echo "configure:2092: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2089 "configure"
+#line 2097 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
done
if test $ac_cv_func_gettimeofday = yes; then
echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6
-echo "configure:2140: checking for gettimeofday declaration" >&5
+echo "configure:2148: checking for gettimeofday declaration" >&5
if eval "test \"`echo '$''{'cl_cv_proto_gettimeofday'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2146 "configure"
+#line 2154 "configure"
#include "confdefs.h"
#include <sys/types.h>
; return 0; }
EOF
-if { (eval echo configure:2167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cl_cv_proto_gettimeofday_dots=no
cl_cv_proto_gettimeofday_arg2="struct timezone *"
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 2176 "configure"
+#line 2184 "configure"
#include "confdefs.h"
#include <sys/types.h>
; return 0; }
EOF
-if { (eval echo configure:2197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cl_cv_proto_gettimeofday_dots=no
cl_cv_proto_gettimeofday_arg2="void *"
for ac_func in ftime
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2238: checking for $ac_func" >&5
+echo "configure:2246: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2243 "configure"
+#line 2251 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
if test $ac_cv_func_gettimeofday = no -a $ac_cv_func_ftime = no; then
echo $ac_n "checking for times""... $ac_c" 1>&6
-echo "configure:2295: checking for times" >&5
+echo "configure:2303: checking for times" >&5
if eval "test \"`echo '$''{'ac_cv_func_times'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2300 "configure"
+#line 2308 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char times(); below. */
; return 0; }
EOF
-if { (eval echo configure:2326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_times=yes"
else
fi
if test -z "$no_times"; then
echo $ac_n "checking for times return value""... $ac_c" 1>&6
-echo "configure:2347: checking for times return value" >&5
+echo "configure:2355: checking for times return value" >&5
if eval "test \"`echo '$''{'cl_cv_func_times_return'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cl_cv_func_times_return="guessing no"
else
cat > conftest.$ac_ext <<EOF
-#line 2356 "configure"
+#line 2364 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit(int);
exit(!((ticks >= CLK_TCK/2) && (ticks <= 3*CLK_TCK/2)));
}
EOF
-if { (eval echo configure:2382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cl_cv_func_times_return=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2420: checking for $ac_hdr" >&5
+echo "configure:2428: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2425 "configure"
+#line 2433 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
done
if test $ac_cv_header_sys_resource_h = yes; then
echo $ac_n "checking for getrusage""... $ac_c" 1>&6
-echo "configure:2457: checking for getrusage" >&5
+echo "configure:2465: checking for getrusage" >&5
if eval "test \"`echo '$''{'cl_cv_func_getrusage'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2463 "configure"
+#line 2471 "configure"
#include "confdefs.h"
#include <sys/types.h> /* NetBSD 1.0 needs this */
#include <sys/time.h>
struct rusage x; int y = RUSAGE_SELF; getrusage(y,&x); x.ru_utime.tv_sec;
; return 0; }
EOF
-if { (eval echo configure:2472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cl_cv_func_getrusage=yes
else
fi
if test $cl_cv_func_getrusage = yes; then
echo $ac_n "checking for getrusage declaration""... $ac_c" 1>&6
-echo "configure:2494: checking for getrusage declaration" >&5
+echo "configure:2502: checking for getrusage declaration" >&5
if eval "test \"`echo '$''{'cl_cv_proto_getrusage'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2500 "configure"
+#line 2508 "configure"
#include "confdefs.h"
#include <stdlib.h>
; return 0; }
EOF
-if { (eval echo configure:2526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cl_cv_proto_getrusage_arg1="int"
else
fi
echo $ac_n "checking for perror declaration""... $ac_c" 1>&6
-echo "configure:2553: checking for perror declaration" >&5
+echo "configure:2561: checking for perror declaration" >&5
if eval "test \"`echo '$''{'cl_cv_proto_perror'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2559 "configure"
+#line 2567 "configure"
#include "confdefs.h"
/* Some systems declare perror() in <errno.h>, some in <stdio.h>, some don't
; return 0; }
EOF
-if { (eval echo configure:2575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cl_cv_proto_perror=no
else
fi
echo $ac_n "checking whether characters are unsigned""... $ac_c" 1>&6
-echo "configure:2597: checking whether characters are unsigned" >&5
+echo "configure:2605: checking whether characters are unsigned" >&5
if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test $ac_cv_prog_gcc = yes; then
# GCC predefines this symbol on systems where it applies.
cat > conftest.$ac_ext <<EOF
-#line 2605 "configure"
+#line 2613 "configure"
#include "confdefs.h"
#ifdef __CHAR_UNSIGNED__
yes
ac_cv_c_char_unsigned="guessing no"
else
cat > conftest.$ac_ext <<EOF
-#line 2627 "configure"
+#line 2635 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit(int);
volatile char c = 255; exit(c < 0);
}
EOF
-if { (eval echo configure:2640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_char_unsigned=yes
else
test -d 'include' || mkdir 'include'
cl_machine_file_c=${srcdir}/autoconf/intparam.c
-cl_machine_file_h=include/cl_intparam.h
+cl_machine_file_h=include/cln/intparam.h
if test $cross_compiling = no; then
if test -z "$cl_cv_file_intparam_h"; then
echo "checking for integer types and behaviour" 1>&6
-echo "configure:2681: checking for integer types and behaviour" >&5
+echo "configure:2689: checking for integer types and behaviour" >&5
cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
EOF
# target 80386. Strip "-O".
CC=`echo "$CC " | sed -e 's/-O //g'`
fi
-{ (eval echo configure:2692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
+{ (eval echo configure:2700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
CC="$ORIGCC"
if test -s conftest; then
echo "creating $cl_machine_file_h"
fi
cl_machine_file_c=${srcdir}/autoconf/floatparam.c
-cl_machine_file_h=include/cl_floatparam.h
+cl_machine_file_h=include/cln/floatparam.h
if test $cross_compiling = no; then
if test -z "$cl_cv_file_floatparam_h"; then
echo "checking for floating-point types and behaviour" 1>&6
-echo "configure:2719: checking for floating-point types and behaviour" >&5
+echo "configure:2727: checking for floating-point types and behaviour" >&5
cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
EOF
# target 80386. Strip "-O".
CC=`echo "$CC " | sed -e 's/-O //g'`
fi
-{ (eval echo configure:2730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
+{ (eval echo configure:2738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
CC="$ORIGCC"
if test -s conftest; then
echo "creating $cl_machine_file_h"
fi
if test "$with_gmp" = yes; then
-echo $ac_n "checking for recent enough gmp.h""... $ac_c" 1>&6
-echo "configure:2762: checking for recent enough gmp.h" >&5
+ echo $ac_n "checking for recent enough gmp.h""... $ac_c" 1>&6
+echo "configure:2770: checking for recent enough gmp.h" >&5
if eval "test \"`echo '$''{'cl_cv_new_gmp_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2768 "configure"
+#line 2776 "configure"
#include "confdefs.h"
#include <gmp.h>
#if !defined(__GNU_MP_VERSION) || (__GNU_MP_VERSION < 3)
#endif
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
fi
echo "$ac_t""$cl_cv_new_gmp_h" 1>&6
-if test "$cl_cv_new_gmp_h" = no; then with_gmp="no"; fi
-if test "$with_gmp" = yes; then
-echo $ac_n "checking for working libgmp""... $ac_c" 1>&6
-echo "configure:2795: checking for working libgmp" >&5
+ if test "$cl_cv_new_gmp_h" = no; then with_gmp="no"; fi
+ if test "$with_gmp" = yes; then
+ echo $ac_n "checking for working libgmp""... $ac_c" 1>&6
+echo "configure:2803: checking for working libgmp" >&5
if eval "test \"`echo '$''{'cl_cv_new_libgmp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
SAVELIBS=$LIBS
LIBS="$LIBS -lgmp"
cat > conftest.$ac_ext <<EOF
-#line 2803 "configure"
+#line 2811 "configure"
#include "confdefs.h"
#include <gmp.h>
int main() {
mpn_divexact_by3(0,0,0)
; return 0; }
EOF
-if { (eval echo configure:2810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cl_cv_new_libgmp="yes"
else
fi
echo "$ac_t""$cl_cv_new_libgmp" 1>&6
-if test "$cl_cv_new_libgmp" = no; then with_gmp="no"; fi
-fi
+ if test "$cl_cv_new_libgmp" = no; then with_gmp="no"; fi
+ fi
fi
if test "$with_gmp" = yes; then
cat >> confdefs.h <<\EOF
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='$(prefix)'
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
ac_given_srcdir=$srcdir
-trap 'rm -fr `echo "Makefile src/Makefile tests/Makefile benchmarks/Makefile examples/Makefile doc/Makefile include/cl_config.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/float/cl_float_config.h src/timing/cl_t_config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile src/Makefile tests/Makefile benchmarks/Makefile examples/Makefile doc/Makefile cln-config include/cln/config.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/float/cl_float_config.h src/timing/cl_t_config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
s%@CL_CURRENT@%$CL_CURRENT%g
s%@CL_REVISION@%$CL_REVISION%g
s%@CL_AGE@%$CL_AGE%g
+s%@CL_VERSION@%$CL_VERSION%g
s%@ALLOCA@%$ALLOCA%g
CEOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile tests/Makefile benchmarks/Makefile examples/Makefile doc/Makefile"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile tests/Makefile benchmarks/Makefile examples/Makefile doc/Makefile cln-config"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="include/cl_config.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/float/cl_float_config.h src/timing/cl_t_config.h"
+ CONFIG_HEADERS="include/cln/config.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/float/cl_float_config.h src/timing/cl_t_config.h"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
EOF
cat >> $CONFIG_STATUS <<\EOF
-
+chmod +x cln-config
exit 0
EOF
chmod +x $CONFIG_STATUS
dnl configure.in ---<autoconf>--->> configure
dnl
dnl configure ---<sh>--->> config.status
-dnl --->> include/cl_config.h
+dnl --->> include/cln/config.h
+dnl cln-config.in --->> cln-config
dnl Makefile.in --->> Makefile
dnl src/Makefile.in --->> src/Makefile
dnl
dnl
dnl
AC_INIT(src/integer/gcd/cl_I_gcd.cc)
-AC_CONFIG_HEADER(include/cl_config.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/float/cl_float_config.h src/timing/cl_t_config.h)
+AC_CONFIG_HEADER(include/cln/config.h src/base/cl_base_config.h src/base/cl_gmpconfig.h src/float/cl_float_config.h src/timing/cl_t_config.h)
AC_PROG_MAKE_SET
dnl This piece of sed script replaces every line containing '@subdir@'
dnl by several consecutive lines, each referencing one subdir.
dnl
dnl check for build configuration
dnl
+LIBS=-lm
+ dnl libcln depends on libm
PACKAGE=cln
+ dnl libtool wants PACKAGE
AM_PROG_LIBTOOL
+ dnl sets variable LIBTOOL
+
dnl Libtool's library version information for CLN.
dnl (Not to be confused with CLN's release version.)
dnl Making new releases:
AC_SUBST(CL_REVISION)
AC_SUBST(CL_AGE)
dnl release version
-CL_VERSION=1
+CL_VERSION_MAJOR=1
CL_VERSION_MINOR=1
CL_VERSION_PATCHLEVEL=0
-dnl release version for cl_config.h, so it can be tested by the preprocessor
-AC_DEFINE_UNQUOTED(CL_VERSION, $CL_VERSION)
+dnl release version for cln/config.h, so it can be tested by the preprocessor
+AC_DEFINE_UNQUOTED(CL_VERSION_MAJOR, $CL_VERSION_MAJOR)
AC_DEFINE_UNQUOTED(CL_VERSION_MINOR, $CL_VERSION_MINOR)
AC_DEFINE_UNQUOTED(CL_VERSION_PATCHLEVEL, $CL_VERSION_PATCHLEVEL)
+dnl concateneted release version
+CL_VERSION=$CL_VERSION_MAJOR.$CL_VERSION_MINOR.$CL_VERSION_PATCHLEVEL
+AC_DEFINE_UNQUOTED(CL_VERSION, $CL_VERSION)
+AC_SUBST(CL_VERSION)
- dnl sets variable LIBTOOL
dnl
dnl checks for compiler characteristics
dnl
CL_CHAR_UNSIGNED
dnl DEFS __CHAR_UNSIGNED__ if char is unsigned
test -d 'include' || mkdir 'include'
-CL_MACHINE([integer types and behaviour],${srcdir}/autoconf/intparam.c,include/cl_intparam.h,cl_cv_file_intparam_h)
- dnl builds include/cl_intparam.h
-CL_MACHINE([floating-point types and behaviour],${srcdir}/autoconf/floatparam.c,include/cl_floatparam.h,cl_cv_file_floatparam_h)
- dnl builds include/cl_floatparam.h
+CL_MACHINE([integer types and behaviour],${srcdir}/autoconf/intparam.c,include/cln/intparam.h,cl_cv_file_intparam_h)
+ dnl builds include/cln/intparam.h
+CL_MACHINE([floating-point types and behaviour],${srcdir}/autoconf/floatparam.c,include/cln/floatparam.h,cl_cv_file_floatparam_h)
+ dnl builds include/cln/floatparam.h
dnl
dnl interfacing to GNU gmp (must be at least version 3)
dnl
cp "$srcdir/$f" "$f"
fi
done
-AC_OUTPUT(Makefile src/Makefile tests/Makefile benchmarks/Makefile examples/Makefile doc/Makefile)
+AC_OUTPUT([Makefile src/Makefile tests/Makefile benchmarks/Makefile examples/Makefile doc/Makefile cln-config], [chmod +x cln-config])
<HTML>
<HEAD>
-<!-- Created by texi2html 1.56k from cln.texi on 2 June 2000 -->
+<!-- Created by texi2html 1.56k from cln.texi on 28 August 2000 -->
<TITLE>CLN, a Class Library for Numbers</TITLE>
</HEAD>
<LI><A NAME="TOC64" HREF="cln.html#SEC64">11. Using the library</A>
<UL>
<LI><A NAME="TOC65" HREF="cln.html#SEC65">11.1 Compiler options</A>
-<LI><A NAME="TOC66" HREF="cln.html#SEC66">11.2 Include files</A>
-<LI><A NAME="TOC67" HREF="cln.html#SEC67">11.3 An Example</A>
-<LI><A NAME="TOC68" HREF="cln.html#SEC68">11.4 Debugging support</A>
+<LI><A NAME="TOC66" HREF="cln.html#SEC66">11.2 Compatibility to old CLN versions</A>
+<LI><A NAME="TOC67" HREF="cln.html#SEC67">11.3 Include files</A>
+<LI><A NAME="TOC68" HREF="cln.html#SEC68">11.4 An Example</A>
+<LI><A NAME="TOC69" HREF="cln.html#SEC69">11.5 Debugging support</A>
</UL>
-<LI><A NAME="TOC69" HREF="cln.html#SEC69">12. Customizing</A>
+<LI><A NAME="TOC70" HREF="cln.html#SEC70">12. Customizing</A>
<UL>
-<LI><A NAME="TOC70" HREF="cln.html#SEC70">12.1 Error handling</A>
-<LI><A NAME="TOC71" HREF="cln.html#SEC71">12.2 Floating-point underflow</A>
-<LI><A NAME="TOC72" HREF="cln.html#SEC72">12.3 Customizing I/O</A>
-<LI><A NAME="TOC73" HREF="cln.html#SEC73">12.4 Customizing the memory allocator</A>
+<LI><A NAME="TOC71" HREF="cln.html#SEC71">12.1 Error handling</A>
+<LI><A NAME="TOC72" HREF="cln.html#SEC72">12.2 Floating-point underflow</A>
+<LI><A NAME="TOC73" HREF="cln.html#SEC73">12.3 Customizing I/O</A>
+<LI><A NAME="TOC74" HREF="cln.html#SEC74">12.4 Customizing the memory allocator</A>
</UL>
-<LI><A NAME="TOC74" HREF="cln.html#SEC74">Index</A>
+<LI><A NAME="TOC75" HREF="cln.html#SEC75">Index</A>
</UL>
<P><HR><P>
<LI>
The library provides hooks for memory allocation and exceptions.
+<LI>
+
+<A NAME="IDX3"></A>
+All non-macro identifiers are hidden in namespace <CODE>cln</CODE> in
+order to avoid name clashes.
</UL>
<P>
To build CLN, you need a C++ compiler.
-Actually, you need GNU <CODE>g++ 2.7.0</CODE> or newer.
-On HPPA, you need GNU <CODE>g++ 2.8.0</CODE> or newer.
+Actually, you need GNU <CODE>g++ 2.90</CODE> or newer, the EGCS compilers will
+do.
I recommend GNU <CODE>g++ 2.95</CODE> or newer.
<P>
The following C++ features are used:
-classes, member functions,
-overloading of functions and operators,
-constructors and destructors, inline, const,
-multiple inheritance, templates.
+classes, member functions, overloading of functions and operators,
+constructors and destructors, inline, const, multiple inheritance,
+templates and namespaces.
<P>
The following C++ features are not used:
-<CODE>new</CODE>, <CODE>delete</CODE>, virtual inheritance,
-exceptions.
+<CODE>new</CODE>, <CODE>delete</CODE>, virtual inheritance, exceptions.
<P>
<H3><A NAME="SEC5" HREF="cln.html#TOC5">2.1.2 Make utility</A></H3>
<P>
-<A NAME="IDX3"></A>
+<A NAME="IDX4"></A>
<P>
<H3><A NAME="SEC6" HREF="cln.html#TOC6">2.1.3 Sed utility</A></H3>
<P>
-<A NAME="IDX4"></A>
+<A NAME="IDX5"></A>
<P>
<PRE>
$ CC="gcc" CFLAGS="-O" CXX="g++" CXXFLAGS="-O" ./configure
-$ CC="gcc -V 2.7.2" CFLAGS="-O -g" \
- CXX="g++ -V 2.7.2" CXXFLAGS="-O -g" ./configure
-$ CC="gcc -V 2.8.1" CFLAGS="-O -fno-exceptions" \
- CXX="g++ -V 2.8.1" CXXFLAGS="-O -fno-exceptions" ./configure
-$ CC="gcc -V egcs-2.91.60" CFLAGS="-O2 -fno-exceptions" \
- CXX="g++ -V egcs-2.91.60" CFLAGS="-O2 -fno-exceptions" ./configure
+$ CC="gcc -V egcs-2.91.60" CFLAGS="-O -g" \
+ CXX="g++ -V egcs-2.91.60" CXXFLAGS="-O -g" ./configure
+$ CC="gcc -V 2.95.2" CFLAGS="-O2 -fno-exceptions" \
+ CXX="g++ -V 2.95.2" CFLAGS="-O2 -fno-exceptions" ./configure
</PRE>
<P>
<P>
-On Linux, <CODE>g++</CODE> needs 15 MB to compile the tests. So you should better
-have 17 MB swap space and 1 MB room in $TMPDIR.
-
-
-<P>
-If you use <CODE>g++</CODE> version 2.7.x, don't add <SAMP>`-O2'</SAMP> to the CXXFLAGS,
-because <SAMP>`g++ -O'</SAMP> generates better code for CLN than <SAMP>`g++ -O2'</SAMP>.
+Currently CLN works only with the GNU <CODE>g++</CODE> compiler, and only in
+optimizing mode. So you should specify at least <CODE>-O</CODE> in the CXXFLAGS,
+or no CXXFLAGS at all. (If CXXFLAGS is not set, CLN will use <CODE>-O</CODE>.)
<P>
<H3><A NAME="SEC8" HREF="cln.html#TOC8">2.2.1 Using the GNU MP Library</A></H3>
<P>
-<A NAME="IDX5"></A>
+<A NAME="IDX6"></A>
<P>
<H2><A NAME="SEC9" HREF="cln.html#TOC9">2.3 Installing the library</A></H2>
<P>
-<A NAME="IDX6"></A>
+<A NAME="IDX7"></A>
<P>
<PRE>
Number
- cl_number
- <cl_number.h>
+ cl_number
+ <cln/number.h>
|
|
Real or complex number
cl_N
- <cl_complex.h>
+ <cln/complex.h>
|
|
Real number
cl_R
- <cl_real.h>
+ <cln/real.h>
|
+-------------------+-------------------+
| |
Rational number Floating-point number
cl_RA cl_F
-<cl_rational.h> <cl_float.h>
+<cln/rational.h> <cln/float.h>
| |
- | +-------------+-------------+-------------+
- Integer | | | |
- cl_I Short-Float Single-Float Double-Float Long-Float
- <cl_integer.h> cl_SF cl_FF cl_DF cl_LF
- <cl_sfloat.h> <cl_ffloat.h> <cl_dfloat.h> <cl_lfloat.h>
+ | +--------------+--------------+--------------+
+ Integer | | | |
+ cl_I Short-Float Single-Float Double-Float Long-Float
+<cln/integer.h> cl_SF cl_FF cl_DF cl_LF
+ <cln/sfloat.h> <cln/ffloat.h> <cln/dfloat.h> <cln/lfloat.h>
</PRE>
<P>
-<A NAME="IDX7"></A>
<A NAME="IDX8"></A>
+<A NAME="IDX9"></A>
The base class <CODE>cl_number</CODE> is an abstract base class.
It is not useful to declare a variable of this type except if you want
to completely disable compile-time type checking and use run-time type
<P>
-<A NAME="IDX9"></A>
<A NAME="IDX10"></A>
<A NAME="IDX11"></A>
+<A NAME="IDX12"></A>
The class <CODE>cl_N</CODE> comprises real and complex numbers. There is
no special class for complex numbers since complex numbers with imaginary
part <CODE>0</CODE> are automatically converted to real numbers.
<P>
-<A NAME="IDX12"></A>
+<A NAME="IDX13"></A>
The class <CODE>cl_R</CODE> comprises real numbers of different kinds. It is an
abstract class.
<P>
-<A NAME="IDX13"></A>
<A NAME="IDX14"></A>
<A NAME="IDX15"></A>
+<A NAME="IDX16"></A>
The class <CODE>cl_RA</CODE> comprises exact real numbers: rational numbers, including
integers. There is no special class for non-integral rational numbers
since rational numbers with denominator <CODE>1</CODE> are automatically converted
<P>
-<A NAME="IDX16"></A>
+<A NAME="IDX17"></A>
The class <CODE>cl_F</CODE> implements floating-point approximations to real numbers.
It is an abstract class.
<H2><A NAME="SEC12" HREF="cln.html#TOC12">3.1 Exact numbers</A></H2>
<P>
-<A NAME="IDX17"></A>
+<A NAME="IDX18"></A>
<P>
<H2><A NAME="SEC13" HREF="cln.html#TOC13">3.2 Floating-point numbers</A></H2>
<P>
-<A NAME="IDX18"></A>
+<A NAME="IDX19"></A>
<P>
<P>
-<A NAME="IDX19"></A>
+<A NAME="IDX20"></A>
The elementary operations (<CODE>+</CODE>, <CODE>-</CODE>, <CODE>*</CODE>, <CODE>/</CODE>, ...)
only return approximate results. For example, the value of the expression
<CODE>(cl_F) 0.3 + (cl_F) 0.4</CODE> prints as <SAMP>`0.70000005'</SAMP>, not as
<UL>
<LI>
-<A NAME="IDX20"></A>
+<A NAME="IDX21"></A>
Short floats, type <CODE>cl_SF</CODE>.
They have 1 sign bit, 8 exponent bits (including the exponent's sign),
and 17 mantissa bits (including the "hidden" bit).
<LI>
-<A NAME="IDX21"></A>
+<A NAME="IDX22"></A>
Single floats, type <CODE>cl_FF</CODE>.
They have 1 sign bit, 8 exponent bits (including the exponent's sign),
and 24 mantissa bits (including the "hidden" bit).
<LI>
-<A NAME="IDX22"></A>
+<A NAME="IDX23"></A>
Double floats, type <CODE>cl_DF</CODE>.
They have 1 sign bit, 11 exponent bits (including the exponent's sign),
and 53 mantissa bits (including the "hidden" bit).
<LI>
-<A NAME="IDX23"></A>
+<A NAME="IDX24"></A>
Long floats, type <CODE>cl_LF</CODE>.
They have 1 sign bit, 32 exponent bits (including the exponent's sign),
and n mantissa bits (including the "hidden" bit), where n >= 64.
<P>
-<A NAME="IDX24"></A>
+<A NAME="IDX25"></A>
As a user of CLN, you can forget about the differences between the
four floating-point types and just declare all your floating-point
variables as being of type <CODE>cl_F</CODE>. This has the advantage that
<H2><A NAME="SEC14" HREF="cln.html#TOC14">3.3 Complex numbers</A></H2>
<P>
-<A NAME="IDX25"></A>
+<A NAME="IDX26"></A>
<P>
<H2><A NAME="SEC15" HREF="cln.html#TOC15">3.4 Conversions</A></H2>
<P>
-<A NAME="IDX26"></A>
+<A NAME="IDX27"></A>
<P>
<CODE>cl_R</CODE>, <CODE>cl_N</CODE>.
The easiest way to specify a value which is outside of the range of the
C++ built-in types is therefore to specify it as a string, like this:
-<A NAME="IDX27"></A>
+<A NAME="IDX28"></A>
<PRE>
cl_I order_of_rubiks_cube_group = "43252003274489856000";
<DT><CODE>int cl_I_to_int (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX28"></A>
+<A NAME="IDX29"></A>
<DT><CODE>unsigned int cl_I_to_uint (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX29"></A>
+<A NAME="IDX30"></A>
<DT><CODE>long cl_I_to_long (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX30"></A>
+<A NAME="IDX31"></A>
<DT><CODE>unsigned long cl_I_to_ulong (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX31"></A>
+<A NAME="IDX32"></A>
Returns <CODE>x</CODE> as element of the C type <VAR>ctype</VAR>. If <CODE>x</CODE> is not
representable in the range of <VAR>ctype</VAR>, a runtime error occurs.
</DL>
<DL COMPACT>
-<DT><CODE>float cl_float_approx (const <VAR>type</VAR>& x)</CODE>
-<DD>
-<A NAME="IDX32"></A>
-<DT><CODE>double cl_double_approx (const <VAR>type</VAR>& x)</CODE>
+<DT><CODE>float float_approx (const <VAR>type</VAR>& x)</CODE>
<DD>
<A NAME="IDX33"></A>
+<DT><CODE>double double_approx (const <VAR>type</VAR>& x)</CODE>
+<DD>
+<A NAME="IDX34"></A>
Returns an approximation of <CODE>x</CODE> of C type <VAR>ctype</VAR>.
If <CODE>abs(x)</CODE> is too close to 0 (underflow), 0 is returned.
If <CODE>abs(x)</CODE> is too large (overflow), an IEEE infinity is returned.
C++ terminology) are not provided. Instead, you can assert and check
that a value belongs to a certain subclass, and return it as element of that
class, using the <SAMP>`As'</SAMP> and <SAMP>`The'</SAMP> macros.
-<A NAME="IDX34"></A>
+<A NAME="IDX35"></A>
<CODE>As(<VAR>type</VAR>)(<VAR>value</VAR>)</CODE> checks that <VAR>value</VAR> belongs to
<VAR>type</VAR> and returns it as such.
-<A NAME="IDX35"></A>
+<A NAME="IDX36"></A>
<CODE>The(<VAR>type</VAR>)(<VAR>value</VAR>)</CODE> assumes that <VAR>value</VAR> belongs to
<VAR>type</VAR> and returns it as such. It is your responsibility to ensure
that this assumption is valid.
<P>
Each of the number classes declares its mathematical operations in the
corresponding include file. For example, if your code operates with
-objects of type <CODE>cl_I</CODE>, it should <CODE>#include <cl_integer.h></CODE>.
+objects of type <CODE>cl_I</CODE>, it should <CODE>#include <cln/integer.h></CODE>.
<DT><CODE><VAR>type</VAR> operator + (const <VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX36"></A>
+<A NAME="IDX37"></A>
Addition.
<DT><CODE><VAR>type</VAR> operator - (const <VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX37"></A>
+<A NAME="IDX38"></A>
Subtraction.
<DT><CODE><VAR>type</VAR> operator - (const <VAR>type</VAR>&)</CODE>
<DT><CODE><VAR>type</VAR> plus1 (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX38"></A>
+<A NAME="IDX39"></A>
Returns <CODE>x + 1</CODE>.
<DT><CODE><VAR>type</VAR> minus1 (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX39"></A>
+<A NAME="IDX40"></A>
Returns <CODE>x - 1</CODE>.
<DT><CODE><VAR>type</VAR> operator * (const <VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX40"></A>
+<A NAME="IDX41"></A>
Multiplication.
<DT><CODE><VAR>type</VAR> square (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX41"></A>
+<A NAME="IDX42"></A>
Returns <CODE>x * x</CODE>.
</DL>
<DT><CODE><VAR>type</VAR> operator / (const <VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX42"></A>
+<A NAME="IDX43"></A>
Division.
<DT><CODE><VAR>type</VAR> recip (const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX43"></A>
+<A NAME="IDX44"></A>
Returns the reciprocal of the argument.
</DL>
<DT><CODE>cl_I exquo (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX44"></A>
+<A NAME="IDX45"></A>
Checks that <CODE>y</CODE> divides <CODE>x</CODE>, and returns the quotient <CODE>x</CODE>/<CODE>y</CODE>.
</DL>
<DT><CODE>cl_I expt_pos (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX45"></A>
+<A NAME="IDX46"></A>
<DT><CODE>cl_RA expt_pos (const cl_RA& x, const cl_I& y)</CODE>
<DD>
<CODE>y</CODE> must be > 0. Returns <CODE>x^y</CODE>.
<DT><CODE>cl_RA expt (const cl_RA& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX46"></A>
+<A NAME="IDX47"></A>
<DT><CODE>cl_R expt (const cl_R& x, const cl_I& y)</CODE>
<DD>
<DT><CODE>cl_N expt (const cl_N& x, const cl_I& y)</CODE>
<DT><CODE><VAR>type</VAR> abs (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX47"></A>
+<A NAME="IDX48"></A>
Returns the absolute value of <CODE>x</CODE>.
This is <CODE>x</CODE> if <CODE>x >= 0</CODE>, and <CODE>-x</CODE> if <CODE>x <= 0</CODE>.
</DL>
<DT><CODE><VAR>type</VAR> signum (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX48"></A>
+<A NAME="IDX49"></A>
Returns the sign of <CODE>x</CODE>, in the same number format as <CODE>x</CODE>.
This is defined as <CODE>x / abs(x)</CODE> if <CODE>x</CODE> is non-zero, and
<CODE>x</CODE> if <CODE>x</CODE> is zero. If <CODE>x</CODE> is real, the value is either
<DT><CODE>cl_I numerator (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX49"></A>
+<A NAME="IDX50"></A>
Returns the numerator of <CODE>x</CODE>.
<DT><CODE>cl_I denominator (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX50"></A>
+<A NAME="IDX51"></A>
Returns the denominator of <CODE>x</CODE>.
</DL>
<DT><CODE>cl_N complex (const cl_R& a, const cl_R& b)</CODE>
<DD>
-<A NAME="IDX51"></A>
+<A NAME="IDX52"></A>
Returns the complex number <CODE>a+bi</CODE>, that is, the complex number with
real part <CODE>a</CODE> and imaginary part <CODE>b</CODE>.
</DL>
<DT><CODE>cl_R realpart (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX52"></A>
+<A NAME="IDX53"></A>
Returns the real part of <CODE>x</CODE>.
<DT><CODE>cl_R imagpart (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX53"></A>
+<A NAME="IDX54"></A>
Returns the imaginary part of <CODE>x</CODE>.
<DT><CODE><VAR>type</VAR> conjugate (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX54"></A>
+<A NAME="IDX55"></A>
Returns the complex conjugate of <CODE>x</CODE>.
</DL>
<H2><A NAME="SEC25" HREF="cln.html#TOC25">4.5 Comparisons</A></H2>
<P>
-<A NAME="IDX55"></A>
+<A NAME="IDX56"></A>
<P>
<DT><CODE>bool operator == (const <VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX56"></A>
+<A NAME="IDX57"></A>
<DT><CODE>bool operator != (const <VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX57"></A>
+<A NAME="IDX58"></A>
Comparison, as in C and C++.
-<DT><CODE>uint32 cl_equal_hashcode (const <VAR>type</VAR>&)</CODE>
+<DT><CODE>uint32 equal_hashcode (const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX58"></A>
+<A NAME="IDX59"></A>
Returns a 32-bit hash code that is the same for any two numbers which are
the same according to <CODE>==</CODE>. This hash code depends on the number's value,
not its type or precision.
<DT><CODE>cl_boolean zerop (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX59"></A>
+<A NAME="IDX60"></A>
Compare against zero: <CODE>x == 0</CODE>
</DL>
<DL COMPACT>
-<DT><CODE>cl_signean cl_compare (const <VAR>type</VAR>& x, const <VAR>type</VAR>& y)</CODE>
+<DT><CODE>cl_signean compare (const <VAR>type</VAR>& x, const <VAR>type</VAR>& y)</CODE>
<DD>
-<A NAME="IDX60"></A>
+<A NAME="IDX61"></A>
Compares <CODE>x</CODE> and <CODE>y</CODE>. Returns +1 if <CODE>x</CODE>><CODE>y</CODE>,
-1 if <CODE>x</CODE><<CODE>y</CODE>, 0 if <CODE>x</CODE>=<CODE>y</CODE>.
<DT><CODE>bool operator <= (const <VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX61"></A>
+<A NAME="IDX62"></A>
<DT><CODE>bool operator < (const <VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX62"></A>
+<A NAME="IDX63"></A>
<DT><CODE>bool operator >= (const <VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX63"></A>
+<A NAME="IDX64"></A>
<DT><CODE>bool operator > (const <VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX64"></A>
+<A NAME="IDX65"></A>
Comparison, as in C and C++.
<DT><CODE>cl_boolean minusp (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX65"></A>
+<A NAME="IDX66"></A>
Compare against zero: <CODE>x < 0</CODE>
<DT><CODE>cl_boolean plusp (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX66"></A>
+<A NAME="IDX67"></A>
Compare against zero: <CODE>x > 0</CODE>
<DT><CODE><VAR>type</VAR> max (const <VAR>type</VAR>& x, const <VAR>type</VAR>& y)</CODE>
<DD>
-<A NAME="IDX67"></A>
+<A NAME="IDX68"></A>
Return the maximum of <CODE>x</CODE> and <CODE>y</CODE>.
<DT><CODE><VAR>type</VAR> min (const <VAR>type</VAR>& x, const <VAR>type</VAR>& y)</CODE>
<DD>
-<A NAME="IDX68"></A>
+<A NAME="IDX69"></A>
Return the minimum of <CODE>x</CODE> and <CODE>y</CODE>.
</DL>
<H2><A NAME="SEC26" HREF="cln.html#TOC26">4.6 Rounding functions</A></H2>
<P>
-<A NAME="IDX69"></A>
+<A NAME="IDX70"></A>
<P>
<DT><CODE>cl_I floor1 (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX70"></A>
+<A NAME="IDX71"></A>
Returns <CODE>floor(x)</CODE>.
<DT><CODE>cl_I ceiling1 (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX71"></A>
+<A NAME="IDX72"></A>
Returns <CODE>ceiling(x)</CODE>.
<DT><CODE>cl_I truncate1 (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX72"></A>
+<A NAME="IDX73"></A>
Returns <CODE>truncate(x)</CODE>.
<DT><CODE>cl_I round1 (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX73"></A>
+<A NAME="IDX74"></A>
Returns <CODE>round(x)</CODE>.
</DL>
<DD>
<DT><CODE><VAR>type</VAR>_div_t floor2 (const <VAR>type</VAR>& x, const <VAR>type</VAR>& y)</CODE>
<DD>
-<A NAME="IDX74"></A>
+<A NAME="IDX75"></A>
<DT><CODE><VAR>type</VAR>_div_t ceiling2 (const <VAR>type</VAR>& x, const <VAR>type</VAR>& y)</CODE>
<DD>
-<A NAME="IDX75"></A>
+<A NAME="IDX76"></A>
<DT><CODE><VAR>type</VAR>_div_t truncate2 (const <VAR>type</VAR>& x, const <VAR>type</VAR>& y)</CODE>
<DD>
-<A NAME="IDX76"></A>
+<A NAME="IDX77"></A>
<DT><CODE><VAR>type</VAR>_div_t round2 (const <VAR>type</VAR>& x, const <VAR>type</VAR>& y)</CODE>
<DD>
-<A NAME="IDX77"></A>
+<A NAME="IDX78"></A>
</DL>
<P>
<DT><CODE><VAR>type</VAR> ffloor (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX78"></A>
+<A NAME="IDX79"></A>
<DT><CODE><VAR>type</VAR> fceiling (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX79"></A>
+<A NAME="IDX80"></A>
<DT><CODE><VAR>type</VAR> ftruncate (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX80"></A>
+<A NAME="IDX81"></A>
<DT><CODE><VAR>type</VAR> fround (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX81"></A>
+<A NAME="IDX82"></A>
</DL>
<P>
Each of the classes
<CODE>cl_F</CODE>, <CODE>cl_SF</CODE>, <CODE>cl_FF</CODE>, <CODE>cl_DF</CODE>, <CODE>cl_LF</CODE>
defines the following operations:
-<A NAME="IDX82"></A>
<A NAME="IDX83"></A>
<A NAME="IDX84"></A>
<A NAME="IDX85"></A>
<A NAME="IDX86"></A>
+<A NAME="IDX87"></A>
<DL COMPACT>
<DD>
<DT><CODE><VAR>type</VAR>_fdiv_t ffloor2 (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX87"></A>
+<A NAME="IDX88"></A>
<DT><CODE><VAR>type</VAR>_fdiv_t fceiling2 (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX88"></A>
+<A NAME="IDX89"></A>
<DT><CODE><VAR>type</VAR>_fdiv_t ftruncate2 (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX89"></A>
+<A NAME="IDX90"></A>
<DT><CODE><VAR>type</VAR>_fdiv_t fround2 (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX90"></A>
+<A NAME="IDX91"></A>
</DL>
<P>
and similarly for class <CODE>cl_R</CODE>, but with quotient type <CODE>cl_F</CODE>.
-<A NAME="IDX91"></A>
+<A NAME="IDX92"></A>
<P>
<DT><CODE><VAR>type</VAR> mod (const <VAR>type</VAR>& x, const <VAR>type</VAR>& y)</CODE>
<DD>
-<A NAME="IDX92"></A>
+<A NAME="IDX93"></A>
<DT><CODE><VAR>type</VAR> rem (const <VAR>type</VAR>& x, const <VAR>type</VAR>& y)</CODE>
<DD>
-<A NAME="IDX93"></A>
+<A NAME="IDX94"></A>
</DL>
<DT><CODE><VAR>type</VAR> sqrt (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX94"></A>
+<A NAME="IDX95"></A>
<CODE>x</CODE> must be >= 0. This function returns the square root of <CODE>x</CODE>,
normalized to be >= 0. If <CODE>x</CODE> is the square of a rational number,
<CODE>sqrt(x)</CODE> will be a rational number, else it will return a
<DT><CODE>cl_boolean sqrtp (const <VAR>type</VAR>& x, <VAR>type</VAR>* root)</CODE>
<DD>
-<A NAME="IDX95"></A>
+<A NAME="IDX96"></A>
This tests whether <CODE>x</CODE> is a perfect square. If so, it returns true
and the exact square root in <CODE>*root</CODE>, else it returns false.
</DL>
<DT><CODE>cl_boolean isqrt (const <VAR>type</VAR>& x, <VAR>type</VAR>* root)</CODE>
<DD>
-<A NAME="IDX96"></A>
+<A NAME="IDX97"></A>
<CODE>x</CODE> should be >= 0. This function sets <CODE>*root</CODE> to
<CODE>floor(sqrt(x))</CODE> and returns the same value as <CODE>sqrtp</CODE>:
the boolean value <CODE>(expt(*root,2) == x)</CODE>.
<DT><CODE>cl_boolean rootp (const <VAR>type</VAR>& x, const cl_I& n, <VAR>type</VAR>* root)</CODE>
<DD>
-<A NAME="IDX97"></A>
+<A NAME="IDX98"></A>
<CODE>x</CODE> must be >= 0. <CODE>n</CODE> must be > 0.
This tests whether <CODE>x</CODE> is an <CODE>n</CODE>th power of a rational number.
If so, it returns true and the exact root in <CODE>*root</CODE>, else it returns
<DT><CODE>cl_N sqrt (const cl_N& z)</CODE>
<DD>
-<A NAME="IDX98"></A>
+<A NAME="IDX99"></A>
Returns the square root of <CODE>z</CODE>, as defined by the formula
<CODE>sqrt(z) = exp(log(z)/2)</CODE>. Conversion to a floating-point type
or to a complex number are done if necessary. The range of the result is the
<H2><A NAME="SEC28" HREF="cln.html#TOC28">4.8 Transcendental functions</A></H2>
<P>
-<A NAME="IDX99"></A>
+<A NAME="IDX100"></A>
<P>
<DT><CODE>cl_R exp (const cl_R& x)</CODE>
<DD>
-<A NAME="IDX100"></A>
+<A NAME="IDX101"></A>
<DT><CODE>cl_N exp (const cl_N& x)</CODE>
<DD>
Returns the exponential function of <CODE>x</CODE>. This is <CODE>e^x</CODE> where
<DT><CODE>cl_R ln (const cl_R& x)</CODE>
<DD>
-<A NAME="IDX101"></A>
+<A NAME="IDX102"></A>
<CODE>x</CODE> must be > 0. Returns the (natural) logarithm of x.
<DT><CODE>cl_N log (const cl_N& x)</CODE>
<DD>
-<A NAME="IDX102"></A>
+<A NAME="IDX103"></A>
Returns the (natural) logarithm of x. If <CODE>x</CODE> is real and positive,
this is <CODE>ln(x)</CODE>. In general, <CODE>log(x) = log(abs(x)) + i*phase(x)</CODE>.
The range of the result is the strip in the complex plane
<DT><CODE>cl_R phase (const cl_N& x)</CODE>
<DD>
-<A NAME="IDX103"></A>
+<A NAME="IDX104"></A>
Returns the angle part of <CODE>x</CODE> in its polar representation as a
complex number. That is, <CODE>phase(x) = atan(realpart(x),imagpart(x))</CODE>.
This is also the imaginary part of <CODE>log(x)</CODE>.
<DT><CODE>cl_N expt (const cl_N& x, const cl_N& y)</CODE>
<DD>
-<A NAME="IDX104"></A>
+<A NAME="IDX105"></A>
Exponentiation: Returns <CODE>x^y = exp(y*log(x))</CODE>.
</DL>
<DL COMPACT>
-<DT><CODE>cl_F cl_exp1 (cl_float_format_t f)</CODE>
+<DT><CODE>cl_F exp1 (cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX105"></A>
+<A NAME="IDX106"></A>
Returns e as a float of format <CODE>f</CODE>.
-<DT><CODE>cl_F cl_exp1 (const cl_F& y)</CODE>
+<DT><CODE>cl_F exp1 (const cl_F& y)</CODE>
<DD>
Returns e in the float format of <CODE>y</CODE>.
-<DT><CODE>cl_F cl_exp1 (void)</CODE>
+<DT><CODE>cl_F exp1 (void)</CODE>
<DD>
-Returns e as a float of format <CODE>cl_default_float_format</CODE>.
+Returns e as a float of format <CODE>default_float_format</CODE>.
</DL>
<DT><CODE>cl_R sin (const cl_R& x)</CODE>
<DD>
-<A NAME="IDX106"></A>
+<A NAME="IDX107"></A>
Returns <CODE>sin(x)</CODE>. The range of the result is the interval
<CODE>-1 <= sin(x) <= 1</CODE>.
<DT><CODE>cl_R cos (const cl_R& x)</CODE>
<DD>
-<A NAME="IDX107"></A>
+<A NAME="IDX108"></A>
Returns <CODE>cos(x)</CODE>. The range of the result is the interval
<CODE>-1 <= cos(x) <= 1</CODE>.
<DD>
Returns <CODE>cos(z)</CODE>. The range of the result is the entire complex plane.
-<DT><CODE>struct cl_cos_sin_t { cl_R cos; cl_R sin; };</CODE>
+<DT><CODE>struct cos_sin_t { cl_R cos; cl_R sin; };</CODE>
<DD>
-<A NAME="IDX108"></A>
-<DT><CODE>cl_cos_sin_t cl_cos_sin (const cl_R& x)</CODE>
+<A NAME="IDX109"></A>
+<DT><CODE>cos_sin_t cos_sin (const cl_R& x)</CODE>
<DD>
Returns both <CODE>sin(x)</CODE> and <CODE>cos(x)</CODE>. This is more efficient than
-<A NAME="IDX109"></A>
+<A NAME="IDX110"></A>
computing them separately. The relation <CODE>cos^2 + sin^2 = 1</CODE> will
hold only approximately.
<DT><CODE>cl_R tan (const cl_R& x)</CODE>
<DD>
-<A NAME="IDX110"></A>
+<A NAME="IDX111"></A>
<DT><CODE>cl_N tan (const cl_N& x)</CODE>
<DD>
Returns <CODE>tan(x) = sin(x)/cos(x)</CODE>.
<DT><CODE>cl_N cis (const cl_R& x)</CODE>
<DD>
-<A NAME="IDX111"></A>
+<A NAME="IDX112"></A>
<DT><CODE>cl_N cis (const cl_N& x)</CODE>
<DD>
Returns <CODE>exp(i*x)</CODE>. The name <SAMP>`cis'</SAMP> means "cos + i sin", because
<CODE>e^(i*x) = cos(x) + i*sin(x)</CODE>.
-<A NAME="IDX112"></A>
<A NAME="IDX113"></A>
+<A NAME="IDX114"></A>
<DT><CODE>cl_N asin (const cl_N& z)</CODE>
<DD>
Returns <CODE>arcsin(z)</CODE>. This is defined as
<DT><CODE>cl_N acos (const cl_N& z)</CODE>
<DD>
-<A NAME="IDX114"></A>
+<A NAME="IDX115"></A>
Returns <CODE>arccos(z)</CODE>. This is defined as
<CODE>arccos(z) = pi/2 - arcsin(z) = log(z+i*sqrt(1-z^2))/i</CODE>
and satisfies <CODE>arccos(-z) = pi - arccos(z)</CODE>.
with <CODE>realpart = 0</CODE> and <CODE>imagpart < 0</CODE> and the numbers
with <CODE>realpart = pi</CODE> and <CODE>imagpart > 0</CODE>.
-<A NAME="IDX115"></A>
<A NAME="IDX116"></A>
+<A NAME="IDX117"></A>
<DT><CODE>cl_R atan (const cl_R& x, const cl_R& y)</CODE>
<DD>
Returns the angle of the polar representation of the complex number
</DL>
<P>
-<A NAME="IDX117"></A>
<A NAME="IDX118"></A>
+<A NAME="IDX119"></A>
Archimedes' constant pi = 3.14... is returned by the following functions:
<DL COMPACT>
-<DT><CODE>cl_F cl_pi (cl_float_format_t f)</CODE>
+<DT><CODE>cl_F pi (cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX119"></A>
+<A NAME="IDX120"></A>
Returns pi as a float of format <CODE>f</CODE>.
-<DT><CODE>cl_F cl_pi (const cl_F& y)</CODE>
+<DT><CODE>cl_F pi (const cl_F& y)</CODE>
<DD>
Returns pi in the float format of <CODE>y</CODE>.
-<DT><CODE>cl_F cl_pi (void)</CODE>
+<DT><CODE>cl_F pi (void)</CODE>
<DD>
-Returns pi as a float of format <CODE>cl_default_float_format</CODE>.
+Returns pi as a float of format <CODE>default_float_format</CODE>.
</DL>
<DT><CODE>cl_R sinh (const cl_R& x)</CODE>
<DD>
-<A NAME="IDX120"></A>
+<A NAME="IDX121"></A>
Returns <CODE>sinh(x)</CODE>.
<DT><CODE>cl_N sinh (const cl_N& z)</CODE>
<DT><CODE>cl_R cosh (const cl_R& x)</CODE>
<DD>
-<A NAME="IDX121"></A>
+<A NAME="IDX122"></A>
Returns <CODE>cosh(x)</CODE>. The range of the result is the interval
<CODE>cosh(x) >= 1</CODE>.
<DD>
Returns <CODE>cosh(z)</CODE>. The range of the result is the entire complex plane.
-<DT><CODE>struct cl_cosh_sinh_t { cl_R cosh; cl_R sinh; };</CODE>
-<DD>
-<A NAME="IDX122"></A>
-<DT><CODE>cl_cosh_sinh_t cl_cosh_sinh (const cl_R& x)</CODE>
+<DT><CODE>struct cosh_sinh_t { cl_R cosh; cl_R sinh; };</CODE>
<DD>
<A NAME="IDX123"></A>
+<DT><CODE>cosh_sinh_t cosh_sinh (const cl_R& x)</CODE>
+<DD>
+<A NAME="IDX124"></A>
Returns both <CODE>sinh(x)</CODE> and <CODE>cosh(x)</CODE>. This is more efficient than
computing them separately. The relation <CODE>cosh^2 - sinh^2 = 1</CODE> will
hold only approximately.
<DT><CODE>cl_R tanh (const cl_R& x)</CODE>
<DD>
-<A NAME="IDX124"></A>
+<A NAME="IDX125"></A>
<DT><CODE>cl_N tanh (const cl_N& x)</CODE>
<DD>
Returns <CODE>tanh(x) = sinh(x)/cosh(x)</CODE>.
<DT><CODE>cl_N asinh (const cl_N& z)</CODE>
<DD>
-<A NAME="IDX125"></A>
+<A NAME="IDX126"></A>
Returns <CODE>arsinh(z)</CODE>. This is defined as
<CODE>arsinh(z) = log(z+sqrt(1+z^2))</CODE> and satisfies
<CODE>arsinh(-z) = -arsinh(z)</CODE>.
<DT><CODE>cl_N acosh (const cl_N& z)</CODE>
<DD>
-<A NAME="IDX126"></A>
+<A NAME="IDX127"></A>
Returns <CODE>arcosh(z)</CODE>. This is defined as
<CODE>arcosh(z) = 2*log(sqrt((z+1)/2)+sqrt((z-1)/2))</CODE>.
The range of the result is the half-strip in the complex domain
<DT><CODE>cl_N atanh (const cl_N& z)</CODE>
<DD>
-<A NAME="IDX127"></A>
+<A NAME="IDX128"></A>
Returns <CODE>artanh(z)</CODE>. This is defined as
<CODE>artanh(z) = (log(1+z)-log(1-z)) / 2</CODE> and satisfies
<CODE>artanh(-z) = -artanh(z)</CODE>. The range of the result is
<H3><A NAME="SEC32" HREF="cln.html#TOC32">4.8.4 Euler gamma</A></H3>
<P>
-<A NAME="IDX128"></A>
+<A NAME="IDX129"></A>
<P>
<DL COMPACT>
-<DT><CODE>cl_F cl_eulerconst (cl_float_format_t f)</CODE>
+<DT><CODE>cl_F eulerconst (cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX129"></A>
+<A NAME="IDX130"></A>
Returns Euler's constant as a float of format <CODE>f</CODE>.
-<DT><CODE>cl_F cl_eulerconst (const cl_F& y)</CODE>
+<DT><CODE>cl_F eulerconst (const cl_F& y)</CODE>
<DD>
Returns Euler's constant in the float format of <CODE>y</CODE>.
-<DT><CODE>cl_F cl_eulerconst (void)</CODE>
+<DT><CODE>cl_F eulerconst (void)</CODE>
<DD>
-Returns Euler's constant as a float of format <CODE>cl_default_float_format</CODE>.
+Returns Euler's constant as a float of format <CODE>default_float_format</CODE>.
</DL>
<P>
Catalan's constant G = 0.915... is returned by the following functions:
-<A NAME="IDX130"></A>
+<A NAME="IDX131"></A>
<DL COMPACT>
-<DT><CODE>cl_F cl_catalanconst (cl_float_format_t f)</CODE>
+<DT><CODE>cl_F catalanconst (cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX131"></A>
+<A NAME="IDX132"></A>
Returns Catalan's constant as a float of format <CODE>f</CODE>.
-<DT><CODE>cl_F cl_catalanconst (const cl_F& y)</CODE>
+<DT><CODE>cl_F catalanconst (const cl_F& y)</CODE>
<DD>
Returns Catalan's constant in the float format of <CODE>y</CODE>.
-<DT><CODE>cl_F cl_catalanconst (void)</CODE>
+<DT><CODE>cl_F catalanconst (void)</CODE>
<DD>
-Returns Catalan's constant as a float of format <CODE>cl_default_float_format</CODE>.
+Returns Catalan's constant as a float of format <CODE>default_float_format</CODE>.
</DL>
<H3><A NAME="SEC33" HREF="cln.html#TOC33">4.8.5 Riemann zeta</A></H3>
<P>
-<A NAME="IDX132"></A>
+<A NAME="IDX133"></A>
<P>
<DL COMPACT>
-<DT><CODE>cl_F cl_zeta (int s, cl_float_format_t f)</CODE>
+<DT><CODE>cl_F zeta (int s, cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX133"></A>
+<A NAME="IDX134"></A>
Returns Riemann's zeta function at <CODE>s</CODE> as a float of format <CODE>f</CODE>.
-<DT><CODE>cl_F cl_zeta (int s, const cl_F& y)</CODE>
+<DT><CODE>cl_F zeta (int s, const cl_F& y)</CODE>
<DD>
Returns Riemann's zeta function at <CODE>s</CODE> in the float format of <CODE>y</CODE>.
-<DT><CODE>cl_F cl_zeta (int s)</CODE>
+<DT><CODE>cl_F zeta (int s)</CODE>
<DD>
Returns Riemann's zeta function at <CODE>s</CODE> as a float of format
-<CODE>cl_default_float_format</CODE>.
+<CODE>default_float_format</CODE>.
</DL>
<DT><CODE>cl_I lognot (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX134"></A>
+<A NAME="IDX135"></A>
<DT><CODE>cl_I operator ~ (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX135"></A>
+<A NAME="IDX136"></A>
Logical not, like <CODE>~x</CODE> in C. This is the same as <CODE>-1-x</CODE>.
<DT><CODE>cl_I logand (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX136"></A>
+<A NAME="IDX137"></A>
<DT><CODE>cl_I operator & (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX137"></A>
+<A NAME="IDX138"></A>
Logical and, like <CODE>x & y</CODE> in C.
<DT><CODE>cl_I logior (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX138"></A>
+<A NAME="IDX139"></A>
<DT><CODE>cl_I operator | (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX139"></A>
+<A NAME="IDX140"></A>
Logical (inclusive) or, like <CODE>x | y</CODE> in C.
<DT><CODE>cl_I logxor (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX140"></A>
+<A NAME="IDX141"></A>
<DT><CODE>cl_I operator ^ (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX141"></A>
+<A NAME="IDX142"></A>
Exclusive or, like <CODE>x ^ y</CODE> in C.
<DT><CODE>cl_I logeqv (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX142"></A>
+<A NAME="IDX143"></A>
Bitwise equivalence, like <CODE>~(x ^ y)</CODE> in C.
<DT><CODE>cl_I lognand (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX143"></A>
+<A NAME="IDX144"></A>
Bitwise not and, like <CODE>~(x & y)</CODE> in C.
<DT><CODE>cl_I lognor (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX144"></A>
+<A NAME="IDX145"></A>
Bitwise not or, like <CODE>~(x | y)</CODE> in C.
<DT><CODE>cl_I logandc1 (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX145"></A>
+<A NAME="IDX146"></A>
Logical and, complementing the first argument, like <CODE>~x & y</CODE> in C.
<DT><CODE>cl_I logandc2 (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX146"></A>
+<A NAME="IDX147"></A>
Logical and, complementing the second argument, like <CODE>x & ~y</CODE> in C.
<DT><CODE>cl_I logorc1 (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX147"></A>
+<A NAME="IDX148"></A>
Logical or, complementing the first argument, like <CODE>~x | y</CODE> in C.
<DT><CODE>cl_I logorc2 (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX148"></A>
+<A NAME="IDX149"></A>
Logical or, complementing the second argument, like <CODE>x | ~y</CODE> in C.
</DL>
<DT><CODE>cl_I boole (cl_boole op, const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX149"></A>
+<A NAME="IDX150"></A>
</DL>
<P>
where <CODE>op</CODE> must have one of the 16 values (each one stands for a function
<CODE>boole_and</CODE>, <CODE>boole_ior</CODE>, <CODE>boole_xor</CODE>, <CODE>boole_eqv</CODE>,
<CODE>boole_nand</CODE>, <CODE>boole_nor</CODE>, <CODE>boole_andc1</CODE>, <CODE>boole_andc2</CODE>,
<CODE>boole_orc1</CODE>, <CODE>boole_orc2</CODE>.
-<A NAME="IDX150"></A>
<A NAME="IDX151"></A>
<A NAME="IDX152"></A>
<A NAME="IDX153"></A>
<A NAME="IDX162"></A>
<A NAME="IDX163"></A>
<A NAME="IDX164"></A>
+<A NAME="IDX165"></A>
<P>
<DT><CODE>cl_boolean logtest (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX165"></A>
+<A NAME="IDX166"></A>
Returns true if some bit is set in both <CODE>x</CODE> and <CODE>y</CODE>, i.e. if
<CODE>logand(x,y) != 0</CODE>.
<DT><CODE>cl_boolean logbitp (const cl_I& n, const cl_I& x)</CODE>
<DD>
-<A NAME="IDX166"></A>
+<A NAME="IDX167"></A>
Returns true if the <CODE>n</CODE>th bit (from the right) of <CODE>x</CODE> is set.
Bit 0 is the least significant bit.
<DT><CODE>uintL logcount (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX167"></A>
+<A NAME="IDX168"></A>
Returns the number of one bits in <CODE>x</CODE>, if <CODE>x</CODE> >= 0, or
the number of zero bits in <CODE>x</CODE>, if <CODE>x</CODE> < 0.
</DL>
</PRE>
<P>
-<A NAME="IDX168"></A>
+<A NAME="IDX169"></A>
represents the bit interval containing the bits
<CODE>position</CODE>...<CODE>position+size-1</CODE> of an integer.
The constructor <CODE>cl_byte(size,position)</CODE> constructs a <CODE>cl_byte</CODE>.
<DT><CODE>cl_I ldb (const cl_I& n, const cl_byte& b)</CODE>
<DD>
-<A NAME="IDX169"></A>
+<A NAME="IDX170"></A>
extracts the bits of <CODE>n</CODE> described by the bit interval <CODE>b</CODE>
and returns them as a nonnegative integer with <CODE>b.size</CODE> bits.
<DT><CODE>cl_boolean ldb_test (const cl_I& n, const cl_byte& b)</CODE>
<DD>
-<A NAME="IDX170"></A>
+<A NAME="IDX171"></A>
Returns true if some bit described by the bit interval <CODE>b</CODE> is set in
<CODE>n</CODE>.
<DT><CODE>cl_I dpb (const cl_I& newbyte, const cl_I& n, const cl_byte& b)</CODE>
<DD>
-<A NAME="IDX171"></A>
+<A NAME="IDX172"></A>
Returns <CODE>n</CODE>, with the bits described by the bit interval <CODE>b</CODE>
replaced by <CODE>newbyte</CODE>. Only the lowest <CODE>b.size</CODE> bits of
<CODE>newbyte</CODE> are relevant.
<DT><CODE>cl_I mask_field (const cl_I& n, const cl_byte& b)</CODE>
<DD>
-<A NAME="IDX172"></A>
+<A NAME="IDX173"></A>
returns an integer with the bits described by the bit interval <CODE>b</CODE>
copied from the corresponding bits in <CODE>n</CODE>, the other bits zero.
<DT><CODE>cl_I deposit_field (const cl_I& newbyte, const cl_I& n, const cl_byte& b)</CODE>
<DD>
-<A NAME="IDX173"></A>
+<A NAME="IDX174"></A>
returns an integer where the bits described by the bit interval <CODE>b</CODE>
come from <CODE>newbyte</CODE> and the other bits come from <CODE>n</CODE>.
</DL>
<DT><CODE>cl_boolean oddp (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX174"></A>
+<A NAME="IDX175"></A>
Returns true if the least significant bit of <CODE>x</CODE> is 1. Equivalent to
<CODE>mod(x,2) != 0</CODE>.
<DT><CODE>cl_boolean evenp (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX175"></A>
+<A NAME="IDX176"></A>
Returns true if the least significant bit of <CODE>x</CODE> is 0. Equivalent to
<CODE>mod(x,2) == 0</CODE>.
<DT><CODE>cl_I operator << (const cl_I& x, const cl_I& n)</CODE>
<DD>
-<A NAME="IDX176"></A>
+<A NAME="IDX177"></A>
Shifts <CODE>x</CODE> by <CODE>n</CODE> bits to the left. <CODE>n</CODE> should be >=0.
Equivalent to <CODE>x * expt(2,n)</CODE>.
<DT><CODE>cl_I operator >> (const cl_I& x, const cl_I& n)</CODE>
<DD>
-<A NAME="IDX177"></A>
+<A NAME="IDX178"></A>
Shifts <CODE>x</CODE> by <CODE>n</CODE> bits to the right. <CODE>n</CODE> should be >=0.
Bits shifted out to the right are thrown away.
Equivalent to <CODE>floor(x / expt(2,n))</CODE>.
<DT><CODE>cl_I ash (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX178"></A>
+<A NAME="IDX179"></A>
Shifts <CODE>x</CODE> by <CODE>y</CODE> bits to the left (if <CODE>y</CODE>>=0) or
by <CODE>-y</CODE> bits to the right (if <CODE>y</CODE><=0). In other words, this
returns <CODE>floor(x * expt(2,y))</CODE>.
<DT><CODE>uintL integer_length (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX179"></A>
+<A NAME="IDX180"></A>
Returns the number of bits (excluding the sign bit) needed to represent <CODE>x</CODE>
in two's complement notation. This is the smallest n >= 0 such that
-2^n <= x < 2^n. If x > 0, this is the unique n > 0 such that
<DT><CODE>uintL ord2 (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX180"></A>
+<A NAME="IDX181"></A>
<CODE>x</CODE> must be non-zero. This function returns the number of 0 bits at the
right of <CODE>x</CODE> in two's complement notation. This is the largest n >= 0
such that 2^n divides <CODE>x</CODE>.
<DT><CODE>uintL power2p (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX181"></A>
+<A NAME="IDX182"></A>
<CODE>x</CODE> must be > 0. This function checks whether <CODE>x</CODE> is a power of 2.
If <CODE>x</CODE> = 2^(n-1), it returns n. Else it returns 0.
(See also the function <CODE>logp</CODE>.)
<DT><CODE>uint32 gcd (uint32 a, uint32 b)</CODE>
<DD>
-<A NAME="IDX182"></A>
+<A NAME="IDX183"></A>
<DT><CODE>cl_I gcd (const cl_I& a, const cl_I& b)</CODE>
<DD>
This function returns the greatest common divisor of <CODE>a</CODE> and <CODE>b</CODE>,
<DT><CODE>cl_I xgcd (const cl_I& a, const cl_I& b, cl_I* u, cl_I* v)</CODE>
<DD>
-<A NAME="IDX183"></A>
+<A NAME="IDX184"></A>
This function ("extended gcd") returns the greatest common divisor <CODE>g</CODE> of
<CODE>a</CODE> and <CODE>b</CODE> and at the same time the representation of <CODE>g</CODE>
as an integral linear combination of <CODE>a</CODE> and <CODE>b</CODE>:
<DT><CODE>cl_I lcm (const cl_I& a, const cl_I& b)</CODE>
<DD>
-<A NAME="IDX184"></A>
+<A NAME="IDX185"></A>
This function returns the least common multiple of <CODE>a</CODE> and <CODE>b</CODE>,
normalized to be >= 0.
<DT><CODE>cl_boolean logp (const cl_I& a, const cl_I& b, cl_RA* l)</CODE>
<DD>
-<A NAME="IDX185"></A>
+<A NAME="IDX186"></A>
<DT><CODE>cl_boolean logp (const cl_RA& a, const cl_RA& b, cl_RA* l)</CODE>
<DD>
<CODE>a</CODE> must be > 0. <CODE>b</CODE> must be >0 and != 1. If log(a,b) is
<DT><CODE>cl_I factorial (uintL n)</CODE>
<DD>
-<A NAME="IDX186"></A>
+<A NAME="IDX187"></A>
<CODE>n</CODE> must be a small integer >= 0. This function returns the factorial
<CODE>n</CODE>! = <CODE>1*2*...*n</CODE>.
<DT><CODE>cl_I doublefactorial (uintL n)</CODE>
<DD>
-<A NAME="IDX187"></A>
+<A NAME="IDX188"></A>
<CODE>n</CODE> must be a small integer >= 0. This function returns the
doublefactorial <CODE>n</CODE>!! = <CODE>1*3*...*n</CODE> or
<CODE>n</CODE>!! = <CODE>2*4*...*n</CODE>, respectively.
<DT><CODE>cl_I binomial (uintL n, uintL k)</CODE>
<DD>
-<A NAME="IDX188"></A>
+<A NAME="IDX189"></A>
<CODE>n</CODE> and <CODE>k</CODE> must be small integers >= 0. This function returns the
binomial coefficient
(<CODE>n</CODE> choose <CODE>k</CODE>) = <CODE>n</CODE>! / <CODE>k</CODE>! <CODE>(n-k)</CODE>!
<DT><CODE><VAR>type</VAR> scale_float (const <VAR>type</VAR>& x, sintL delta)</CODE>
<DD>
-<A NAME="IDX189"></A>
+<A NAME="IDX190"></A>
<DT><CODE><VAR>type</VAR> scale_float (const <VAR>type</VAR>& x, const cl_I& delta)</CODE>
<DD>
Returns <CODE>x*2^delta</CODE>. This is more efficient than an explicit multiplication
<DT><CODE>sintL float_exponent (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX190"></A>
+<A NAME="IDX191"></A>
Returns the exponent <CODE>e</CODE> of <CODE>x</CODE>.
For <CODE>x = 0.0</CODE>, this is 0. For <CODE>x</CODE> non-zero, this is the unique
integer with <CODE>2^(e-1) <= abs(x) < 2^e</CODE>.
<DT><CODE>sintL float_radix (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX191"></A>
+<A NAME="IDX192"></A>
Returns the base of the floating-point representation. This is always <CODE>2</CODE>.
<DT><CODE><VAR>type</VAR> float_sign (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX192"></A>
+<A NAME="IDX193"></A>
Returns the sign <CODE>s</CODE> of <CODE>x</CODE> as a float. The value is 1 for
<CODE>x</CODE> >= 0, -1 for <CODE>x</CODE> < 0.
<DT><CODE>uintL float_digits (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX193"></A>
+<A NAME="IDX194"></A>
Returns the number of mantissa bits in the floating-point representation
of <CODE>x</CODE>, including the hidden bit. The value only depends on the type
of <CODE>x</CODE>, not on its value.
<DT><CODE>uintL float_precision (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX194"></A>
+<A NAME="IDX195"></A>
Returns the number of significant mantissa bits in the floating-point
representation of <CODE>x</CODE>. Since denormalized numbers are not supported,
this is the same as <CODE>float_digits(x)</CODE> if <CODE>x</CODE> is non-zero, and
<P>
The complete internal representation of a float is encoded in the type
-<A NAME="IDX195"></A>
<A NAME="IDX196"></A>
<A NAME="IDX197"></A>
<A NAME="IDX198"></A>
<A NAME="IDX199"></A>
-<CODE>cl_decoded_float</CODE> (or <CODE>cl_decoded_sfloat</CODE>, <CODE>cl_decoded_ffloat</CODE>,
-<CODE>cl_decoded_dfloat</CODE>, <CODE>cl_decoded_lfloat</CODE>, respectively), defined by
+<A NAME="IDX200"></A>
+<CODE>decoded_float</CODE> (or <CODE>decoded_sfloat</CODE>, <CODE>decoded_ffloat</CODE>,
+<CODE>decoded_dfloat</CODE>, <CODE>decoded_lfloat</CODE>, respectively), defined by
<PRE>
-struct cl_decoded_<VAR>type</VAR>float {
+struct decoded_<VAR>type</VAR>float {
<VAR>type</VAR> mantissa; cl_I exponent; <VAR>type</VAR> sign;
};
</PRE>
<DL COMPACT>
-<DT><CODE>cl_decoded_<VAR>type</VAR>float decode_float (const <VAR>type</VAR>& x)</CODE>
+<DT><CODE>decoded_<VAR>type</VAR>float decode_float (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX200"></A>
+<A NAME="IDX201"></A>
For <CODE>x</CODE> non-zero, this returns <CODE>(-1)^s</CODE>, <CODE>e</CODE>, <CODE>m</CODE> with
<CODE>x = (-1)^s * 2^e * m</CODE> and <CODE>0.5 <= m < 1.0</CODE>. For <CODE>x</CODE> = 0,
it returns <CODE>(-1)^s</CODE>=1, <CODE>e</CODE>=0, <CODE>m</CODE>=0.
<P>
A complete decoding in terms of integers is provided as type
+<A NAME="IDX202"></A>
<PRE>
-<A NAME="IDX201"></A>struct cl_idecoded_float {
+struct cl_idecoded_float {
cl_I mantissa; cl_I exponent; cl_I sign;
};
</PRE>
<DT><CODE>cl_idecoded_float integer_decode_float (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX202"></A>
+<A NAME="IDX203"></A>
For <CODE>x</CODE> non-zero, this returns <CODE>(-1)^s</CODE>, <CODE>e</CODE>, <CODE>m</CODE> with
<CODE>x = (-1)^s * 2^e * m</CODE> and <CODE>m</CODE> an integer with <CODE>float_digits(x)</CODE>
bits. For <CODE>x</CODE> = 0, it returns <CODE>(-1)^s</CODE>=1, <CODE>e</CODE>=0, <CODE>m</CODE>=0.
<DT><CODE>cl_F float_sign (const cl_F& x, const cl_F& y)</CODE>
<DD>
-<A NAME="IDX203"></A>
+<A NAME="IDX204"></A>
This returns a floating point number whose precision and absolute value
is that of <CODE>y</CODE> and whose sign is that of <CODE>x</CODE>. If <CODE>x</CODE> is
zero, it is treated as positive. Same for <CODE>y</CODE>.
<H2><A NAME="SEC39" HREF="cln.html#TOC39">4.11 Conversion functions</A></H2>
<P>
-<A NAME="IDX204"></A>
+<A NAME="IDX205"></A>
<P>
The type <CODE>cl_float_format_t</CODE> describes a floating-point format.
-<A NAME="IDX205"></A>
+<A NAME="IDX206"></A>
<DL COMPACT>
<DT><CODE>cl_float_format_t cl_float_format (uintL n)</CODE>
<DD>
-<A NAME="IDX206"></A>
+<A NAME="IDX207"></A>
Returns the smallest float format which guarantees at least <CODE>n</CODE>
decimal digits in the mantissa (after the decimal point).
<DD>
Returns the floating point format of <CODE>x</CODE>.
-<DT><CODE>cl_float_format_t cl_default_float_format</CODE>
+<DT><CODE>cl_float_format_t default_float_format</CODE>
<DD>
-<A NAME="IDX207"></A>
+<A NAME="IDX208"></A>
Global variable: the default float format used when converting rational numbers
to floats.
</DL>
<DT><CODE>cl_F cl_float (const <VAR>type</VAR>&x, cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX208"></A>
+<A NAME="IDX209"></A>
Returns <CODE>x</CODE> as a float of format <CODE>f</CODE>.
<DT><CODE>cl_F cl_float (const <VAR>type</VAR>&x, const cl_F& y)</CODE>
<DD>
Returns <CODE>x</CODE> in the float format of <CODE>y</CODE>.
<DT><CODE>cl_F cl_float (const <VAR>type</VAR>&x)</CODE>
<DD>
-Returns <CODE>x</CODE> as a float of format <CODE>cl_default_float_format</CODE> if
+Returns <CODE>x</CODE> as a float of format <CODE>default_float_format</CODE> if
it is an exact number, or <CODE>x</CODE> itself if it is already a float.
</DL>
<DT><CODE>cl_F most_positive_float (cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX209"></A>
+<A NAME="IDX210"></A>
Returns the largest (most positive) floating point number in float format <CODE>f</CODE>.
<DT><CODE>cl_F most_negative_float (cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX210"></A>
+<A NAME="IDX211"></A>
Returns the smallest (most negative) floating point number in float format <CODE>f</CODE>.
<DT><CODE>cl_F least_positive_float (cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX211"></A>
+<A NAME="IDX212"></A>
Returns the least positive floating point number (i.e. > 0 but closest to 0)
in float format <CODE>f</CODE>.
<DT><CODE>cl_F least_negative_float (cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX212"></A>
+<A NAME="IDX213"></A>
Returns the least negative floating point number (i.e. < 0 but closest to 0)
in float format <CODE>f</CODE>.
<DT><CODE>cl_F float_epsilon (cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX213"></A>
+<A NAME="IDX214"></A>
Returns the smallest floating point number e > 0 such that <CODE>1+e != 1</CODE>.
<DT><CODE>cl_F float_negative_epsilon (cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX214"></A>
+<A NAME="IDX215"></A>
Returns the smallest floating point number e > 0 such that <CODE>1-e != 1</CODE>.
</DL>
<DT><CODE>cl_RA rational (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX215"></A>
+<A NAME="IDX216"></A>
Returns the value of <CODE>x</CODE> as an exact number. If <CODE>x</CODE> is already
an exact number, this is <CODE>x</CODE>. If <CODE>x</CODE> is a floating-point number,
the value is a rational number whose denominator is a power of 2.
<DT><CODE>cl_RA rationalize (const cl_R& x)</CODE>
<DD>
-<A NAME="IDX216"></A>
+<A NAME="IDX217"></A>
If <CODE>x</CODE> is a floating-point number, it actually represents an interval
of real numbers, and this function returns the rational number with
smallest denominator (and smallest numerator, in magnitude)
<P>
A random generator is a machine which produces (pseudo-)random numbers.
-The include file <CODE><cl_random.h></CODE> defines a class <CODE>cl_random_state</CODE>
+The include file <CODE><cln/random.h></CODE> defines a class <CODE>random_state</CODE>
which contains the state of a random generator. If you make a copy
of the random number generator, the original one and the copy will produce
the same sequence of random numbers.
<P>
The global variable
-<A NAME="IDX217"></A>
<A NAME="IDX218"></A>
+<A NAME="IDX219"></A>
<PRE>
-cl_random_state cl_default_random_state
+random_state default_random_state
</PRE>
<P>
contains a default random number generator. It is used when the functions
-below are called without <CODE>cl_random_state</CODE> argument.
+below are called without <CODE>random_state</CODE> argument.
<DL COMPACT>
-<DT><CODE>uint32 random32 (cl_random_state& randomstate)</CODE>
+<DT><CODE>uint32 random32 (random_state& randomstate)</CODE>
<DD>
<DT><CODE>uint32 random32 ()</CODE>
<DD>
-<A NAME="IDX219"></A>
+<A NAME="IDX220"></A>
Returns a random unsigned 32-bit number. All bits are equally random.
-<DT><CODE>cl_I random_I (cl_random_state& randomstate, const cl_I& n)</CODE>
+<DT><CODE>cl_I random_I (random_state& randomstate, const cl_I& n)</CODE>
<DD>
<DT><CODE>cl_I random_I (const cl_I& n)</CODE>
<DD>
-<A NAME="IDX220"></A>
+<A NAME="IDX221"></A>
<CODE>n</CODE> must be an integer > 0. This function returns a random integer <CODE>x</CODE>
in the range <CODE>0 <= x < n</CODE>.
-<DT><CODE>cl_F random_F (cl_random_state& randomstate, const cl_F& n)</CODE>
+<DT><CODE>cl_F random_F (random_state& randomstate, const cl_F& n)</CODE>
<DD>
<DT><CODE>cl_F random_F (const cl_F& n)</CODE>
<DD>
-<A NAME="IDX221"></A>
+<A NAME="IDX222"></A>
<CODE>n</CODE> must be a float > 0. This function returns a random floating-point
number of the same format as <CODE>n</CODE> in the range <CODE>0 <= x < n</CODE>.
-<DT><CODE>cl_R random_R (cl_random_state& randomstate, const cl_R& n)</CODE>
+<DT><CODE>cl_R random_R (random_state& randomstate, const cl_R& n)</CODE>
<DD>
<DT><CODE>cl_R random_R (const cl_R& n)</CODE>
<DD>
-<A NAME="IDX222"></A>
+<A NAME="IDX223"></A>
Behaves like <CODE>random_I</CODE> if <CODE>n</CODE> is an integer and like <CODE>random_F</CODE>
if <CODE>n</CODE> is a float.
</DL>
<H2><A NAME="SEC43" HREF="cln.html#TOC43">4.13 Obfuscating operators</A></H2>
<P>
-<A NAME="IDX223"></A>
+<A NAME="IDX224"></A>
<P>
</PRE>
<P>
-<A NAME="IDX224"></A>
+<A NAME="IDX225"></A>
to the beginning of your source files, before the inclusion of any CLN
include files. This flag will enable the following operators:
<DT><CODE><VAR>type</VAR>& operator += (<VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX225"></A>
+<A NAME="IDX226"></A>
<DT><CODE><VAR>type</VAR>& operator -= (<VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX226"></A>
+<A NAME="IDX227"></A>
<DT><CODE><VAR>type</VAR>& operator *= (<VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX227"></A>
+<A NAME="IDX228"></A>
<DT><CODE><VAR>type</VAR>& operator /= (<VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX228"></A>
+<A NAME="IDX229"></A>
</DL>
<P>
<DD>
<DT><CODE><VAR>type</VAR>& operator &= (<VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX229"></A>
+<A NAME="IDX230"></A>
<DT><CODE><VAR>type</VAR>& operator |= (<VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX230"></A>
+<A NAME="IDX231"></A>
<DT><CODE><VAR>type</VAR>& operator ^= (<VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX231"></A>
+<A NAME="IDX232"></A>
<DT><CODE><VAR>type</VAR>& operator <<= (<VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX232"></A>
+<A NAME="IDX233"></A>
<DT><CODE><VAR>type</VAR>& operator >>= (<VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX233"></A>
+<A NAME="IDX234"></A>
</DL>
<P>
<DT><CODE><VAR>type</VAR>& operator ++ (<VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX234"></A>
+<A NAME="IDX235"></A>
The prefix operator <CODE>++x</CODE>.
<DT><CODE>void operator ++ (<VAR>type</VAR>& x, int)</CODE>
<DT><CODE><VAR>type</VAR>& operator -- (<VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX235"></A>
+<A NAME="IDX236"></A>
The prefix operator <CODE>--x</CODE>.
<DT><CODE>void operator -- (<VAR>type</VAR>& x, int)</CODE>
<H1><A NAME="SEC44" HREF="cln.html#TOC44">5. Input/Output</A></H1>
<P>
-<A NAME="IDX236"></A>
+<A NAME="IDX237"></A>
<H2><A NAME="SEC45" HREF="cln.html#TOC45">5.1 Internal and printed representation</A></H2>
<P>
-<A NAME="IDX237"></A>
+<A NAME="IDX238"></A>
<P>
<P>
Converting an internal to an external representation is called "printing",
-<A NAME="IDX238"></A>
-converting an external to an internal representation is called "reading".
<A NAME="IDX239"></A>
+converting an external to an internal representation is called "reading".
+<A NAME="IDX240"></A>
In CLN, it is always true that conversion of an internal to an external
representation and then back to an internal representation will yield the
same internal representation. Symbolically: <CODE>read(print(x)) == x</CODE>.
<H2><A NAME="SEC46" HREF="cln.html#TOC46">5.2 Input functions</A></H2>
<P>
-Including <CODE><cl_io.h></CODE> defines a type <CODE>cl_istream</CODE>, which is
-the type of the first argument to all input functions. Unless you build
-and use CLN with the macro CL_IO_STDIO being defined, <CODE>cl_istream</CODE>
-is the same as <CODE>istream&</CODE>.
+Including <CODE><cln/io.h></CODE> defines a type <CODE>cl_istream</CODE>, which is
+the type of the first argument to all input functions. <CODE>cl_istream</CODE>
+is the same as <CODE>std::istream&</CODE>.
<P>
<UL>
<LI>
-<CODE>cl_istream cl_stdin</CODE>
+<CODE>cl_istream stdin</CODE>
</UL>
<P>
<P>
Each of the classes <CODE>cl_N</CODE>, <CODE>cl_R</CODE>, <CODE>cl_RA</CODE>, <CODE>cl_I</CODE>,
<CODE>cl_F</CODE>, <CODE>cl_SF</CODE>, <CODE>cl_FF</CODE>, <CODE>cl_DF</CODE>, <CODE>cl_LF</CODE>
-defines, in <CODE><cl_<VAR>type</VAR>_io.h></CODE>, the following input function:
+defines, in <CODE><cln/<VAR>type</VAR>_io.h></CODE>, the following input function:
<DL COMPACT>
</DL>
<P>
-The most flexible input functions, defined in <CODE><cl_<VAR>type</VAR>_io.h></CODE>,
+The most flexible input functions, defined in <CODE><cln/<VAR>type</VAR>_io.h></CODE>,
are the following:
<H2><A NAME="SEC47" HREF="cln.html#TOC47">5.3 Output functions</A></H2>
<P>
-Including <CODE><cl_io.h></CODE> defines a type <CODE>cl_ostream</CODE>, which is
-the type of the first argument to all output functions. Unless you build
-and use CLN with the macro CL_IO_STDIO being defined, <CODE>cl_ostream</CODE>
-is the same as <CODE>ostream&</CODE>.
+Including <CODE><cln/io.h></CODE> defines a type <CODE>cl_ostream</CODE>, which is
+the type of the first argument to all output functions. <CODE>cl_ostream</CODE>
+is the same as <CODE>std::ostream&</CODE>.
<P>
<UL>
<LI>
-<CODE>cl_ostream cl_stdout</CODE>
+<CODE>cl_ostream stdout</CODE>
</UL>
<P>
<UL>
<LI>
-<CODE>cl_ostream cl_stderr</CODE>
+<CODE>cl_ostream stderr</CODE>
</UL>
<P>
<P>
Each of the classes <CODE>cl_N</CODE>, <CODE>cl_R</CODE>, <CODE>cl_RA</CODE>, <CODE>cl_I</CODE>,
<CODE>cl_F</CODE>, <CODE>cl_SF</CODE>, <CODE>cl_FF</CODE>, <CODE>cl_DF</CODE>, <CODE>cl_LF</CODE>
-defines, in <CODE><cl_<VAR>type</VAR>_io.h></CODE>, the following output functions:
+defines, in <CODE><cln/<VAR>type</VAR>_io.h></CODE>, the following output functions:
<DL COMPACT>
<DT><CODE>cl_ostream operator<< (cl_ostream stream, const <VAR>type</VAR>& x)</CODE>
<DD>
Prints the number <CODE>x</CODE> on the <CODE>stream</CODE>. The output may depend
-on the global printer settings in the variable <CODE>cl_default_print_flags</CODE>.
+on the global printer settings in the variable <CODE>default_print_flags</CODE>.
The <CODE>ostream</CODE> flags and settings (flags, width and locale) are
ignored.
</DL>
<P>
-The most flexible output function, defined in <CODE><cl_<VAR>type</VAR>_io.h></CODE>,
+The most flexible output function, defined in <CODE><cln/<VAR>type</VAR>_io.h></CODE>,
are the following:
<PRE>
</DL>
<P>
-The global variable <CODE>cl_default_print_flags</CODE> contains the default values,
+The global variable <CODE>default_print_flags</CODE> contains the default values,
used by the function <CODE>fprint</CODE>.
<PRE>
Ring
cl_ring
- <cl_ring.h>
+ <cln/ring.h>
</PRE>
<P>
<DT><CODE>void R->fprint (cl_ostream stream, const cl_ring_element& x)</CODE>
<DD>
+<A NAME="IDX241"></A>
<DT><CODE>cl_boolean R->equal (const cl_ring_element& x, const cl_ring_element& y)</CODE>
<DD>
+<A NAME="IDX242"></A>
<DT><CODE>cl_ring_element R->zero ()</CODE>
<DD>
+<A NAME="IDX243"></A>
<DT><CODE>cl_boolean R->zerop (const cl_ring_element& x)</CODE>
<DD>
+<A NAME="IDX244"></A>
<DT><CODE>cl_ring_element R->plus (const cl_ring_element& x, const cl_ring_element& y)</CODE>
<DD>
+<A NAME="IDX245"></A>
<DT><CODE>cl_ring_element R->minus (const cl_ring_element& x, const cl_ring_element& y)</CODE>
<DD>
+<A NAME="IDX246"></A>
<DT><CODE>cl_ring_element R->uminus (const cl_ring_element& x)</CODE>
<DD>
+<A NAME="IDX247"></A>
<DT><CODE>cl_ring_element R->one ()</CODE>
<DD>
+<A NAME="IDX248"></A>
<DT><CODE>cl_ring_element R->canonhom (const cl_I& x)</CODE>
<DD>
+<A NAME="IDX249"></A>
<DT><CODE>cl_ring_element R->mul (const cl_ring_element& x, const cl_ring_element& y)</CODE>
<DD>
+<A NAME="IDX250"></A>
<DT><CODE>cl_ring_element R->square (const cl_ring_element& x)</CODE>
<DD>
+<A NAME="IDX251"></A>
<DT><CODE>cl_ring_element R->expt_pos (const cl_ring_element& x, const cl_I& y)</CODE>
<DD>
+<A NAME="IDX252"></A>
</DL>
<P>
<DT><CODE>cl_boolean instanceof (const cl_number& x, const cl_number_ring& R)</CODE>
<DD>
-<A NAME="IDX240"></A>
+<A NAME="IDX253"></A>
Tests whether the given number is an element of the number ring R.
</DL>
<H1><A NAME="SEC49" HREF="cln.html#TOC49">7. Modular integers</A></H1>
<P>
-<A NAME="IDX241"></A>
+<A NAME="IDX254"></A>
<H2><A NAME="SEC50" HREF="cln.html#TOC50">7.1 Modular integer rings</A></H2>
<P>
-<A NAME="IDX242"></A>
+<A NAME="IDX255"></A>
<P>
<PRE>
Ring
cl_ring
- <cl_ring.h>
+ <cln/ring.h>
|
|
Modular integer ring
cl_modint_ring
- <cl_modinteger.h>
+ <cln/modinteger.h>
</PRE>
<P>
-<A NAME="IDX243"></A>
+<A NAME="IDX256"></A>
<P>
<PRE>
Modular integer
cl_MI
- <cl_modinteger.h>
+ <cln/modinteger.h>
</PRE>
<P>
<DL COMPACT>
-<DT><CODE>cl_modint_ring cl_find_modint_ring (const cl_I& N)</CODE>
+<DT><CODE>cl_modint_ring find_modint_ring (const cl_I& N)</CODE>
<DD>
-<A NAME="IDX244"></A>
+<A NAME="IDX257"></A>
This function returns the modular ring <SAMP>`Z/NZ'</SAMP>. It takes care
of finding out about special cases of <CODE>N</CODE>, like powers of two
and odd numbers for which Montgomery multiplication will be a win,
-<A NAME="IDX245"></A>
+<A NAME="IDX258"></A>
and precomputes any necessary auxiliary data for computing modulo <CODE>N</CODE>.
There is a cache table of rings, indexed by <CODE>N</CODE> (or, more precisely,
by <CODE>abs(N)</CODE>). This ensures that the precomputation costs are reduced
<DT><CODE>bool operator== (const cl_modint_ring&, const cl_modint_ring&)</CODE>
<DD>
-<A NAME="IDX246"></A>
+<A NAME="IDX259"></A>
<DT><CODE>bool operator!= (const cl_modint_ring&, const cl_modint_ring&)</CODE>
<DD>
-<A NAME="IDX247"></A>
+<A NAME="IDX260"></A>
These compare two modular integer rings for equality. Two different calls
-to <CODE>cl_find_modint_ring</CODE> with the same argument necessarily return the
+to <CODE>find_modint_ring</CODE> with the same argument necessarily return the
same ring because it is memoized in the cache table.
</DL>
<DT><CODE>cl_I R->modulus</CODE>
<DD>
-<A NAME="IDX248"></A>
+<A NAME="IDX261"></A>
This is the ring's modulus, normalized to be nonnegative: <CODE>abs(N)</CODE>.
<DT><CODE>cl_MI R->zero()</CODE>
<DD>
-<A NAME="IDX249"></A>
+<A NAME="IDX262"></A>
This returns <CODE>0 mod N</CODE>.
<DT><CODE>cl_MI R->one()</CODE>
<DD>
-<A NAME="IDX250"></A>
+<A NAME="IDX263"></A>
This returns <CODE>1 mod N</CODE>.
<DT><CODE>cl_MI R->canonhom (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX251"></A>
+<A NAME="IDX264"></A>
This returns <CODE>x mod N</CODE>.
<DT><CODE>cl_I R->retract (const cl_MI& x)</CODE>
<DD>
-<A NAME="IDX252"></A>
+<A NAME="IDX265"></A>
This is a partial inverse function to <CODE>R->canonhom</CODE>. It returns the
standard representative (<CODE>>=0</CODE>, <CODE><N</CODE>) of <CODE>x</CODE>.
-<DT><CODE>cl_MI R->random(cl_random_state& randomstate)</CODE>
+<DT><CODE>cl_MI R->random(random_state& randomstate)</CODE>
<DD>
<DT><CODE>cl_MI R->random()</CODE>
<DD>
-<A NAME="IDX253"></A>
+<A NAME="IDX266"></A>
This returns a random integer modulo <CODE>N</CODE>.
</DL>
<DT><CODE>cl_modint_ring x.ring ()</CODE>
<DD>
-<A NAME="IDX254"></A>
+<A NAME="IDX267"></A>
Returns the ring to which the modular integer <CODE>x</CODE> belongs.
<DT><CODE>cl_MI operator+ (const cl_MI&, const cl_MI&)</CODE>
<DD>
-<A NAME="IDX255"></A>
+<A NAME="IDX268"></A>
Returns the sum of two modular integers. One of the arguments may also
be a plain integer.
<DT><CODE>cl_MI operator- (const cl_MI&, const cl_MI&)</CODE>
<DD>
-<A NAME="IDX256"></A>
+<A NAME="IDX269"></A>
Returns the difference of two modular integers. One of the arguments may also
be a plain integer.
<DT><CODE>cl_MI operator* (const cl_MI&, const cl_MI&)</CODE>
<DD>
-<A NAME="IDX257"></A>
+<A NAME="IDX270"></A>
Returns the product of two modular integers. One of the arguments may also
be a plain integer.
<DT><CODE>cl_MI square (const cl_MI&)</CODE>
<DD>
-<A NAME="IDX258"></A>
+<A NAME="IDX271"></A>
Returns the square of a modular integer.
<DT><CODE>cl_MI recip (const cl_MI& x)</CODE>
<DD>
-<A NAME="IDX259"></A>
+<A NAME="IDX272"></A>
Returns the reciprocal <CODE>x^-1</CODE> of a modular integer <CODE>x</CODE>. <CODE>x</CODE>
must be coprime to the modulus, otherwise an error message is issued.
<DT><CODE>cl_MI div (const cl_MI& x, const cl_MI& y)</CODE>
<DD>
-<A NAME="IDX260"></A>
+<A NAME="IDX273"></A>
Returns the quotient <CODE>x*y^-1</CODE> of two modular integers <CODE>x</CODE>, <CODE>y</CODE>.
<CODE>y</CODE> must be coprime to the modulus, otherwise an error message is issued.
<DT><CODE>cl_MI expt_pos (const cl_MI& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX261"></A>
+<A NAME="IDX274"></A>
<CODE>y</CODE> must be > 0. Returns <CODE>x^y</CODE>.
<DT><CODE>cl_MI expt (const cl_MI& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX262"></A>
+<A NAME="IDX275"></A>
Returns <CODE>x^y</CODE>. If <CODE>y</CODE> is negative, <CODE>x</CODE> must be coprime to the
modulus, else an error message is issued.
<DT><CODE>cl_MI operator<< (const cl_MI& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX263"></A>
+<A NAME="IDX276"></A>
Returns <CODE>x*2^y</CODE>.
<DT><CODE>cl_MI operator>> (const cl_MI& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX264"></A>
+<A NAME="IDX277"></A>
Returns <CODE>x*2^-y</CODE>. When <CODE>y</CODE> is positive, the modulus must be odd,
or an error message is issued.
<DT><CODE>bool operator== (const cl_MI&, const cl_MI&)</CODE>
<DD>
-<A NAME="IDX265"></A>
+<A NAME="IDX278"></A>
<DT><CODE>bool operator!= (const cl_MI&, const cl_MI&)</CODE>
<DD>
-<A NAME="IDX266"></A>
+<A NAME="IDX279"></A>
Compares two modular integers, belonging to the same modular integer ring,
for equality.
<DT><CODE>cl_boolean zerop (const cl_MI& x)</CODE>
<DD>
-<A NAME="IDX267"></A>
+<A NAME="IDX280"></A>
Returns true if <CODE>x</CODE> is <CODE>0 mod N</CODE>.
</DL>
<DT><CODE>void fprint (cl_ostream stream, const cl_MI& x)</CODE>
<DD>
-<A NAME="IDX268"></A>
+<A NAME="IDX281"></A>
<DT><CODE>cl_ostream operator<< (cl_ostream stream, const cl_MI& x)</CODE>
<DD>
-<A NAME="IDX269"></A>
+<A NAME="IDX282"></A>
Prints the modular integer <CODE>x</CODE> on the <CODE>stream</CODE>. The output may depend
-on the global printer settings in the variable <CODE>cl_default_print_flags</CODE>.
+on the global printer settings in the variable <CODE>default_print_flags</CODE>.
</DL>
<H1><A NAME="SEC52" HREF="cln.html#TOC52">8. Symbolic data types</A></H1>
<P>
-<A NAME="IDX270"></A>
+<A NAME="IDX283"></A>
<P>
<H2><A NAME="SEC53" HREF="cln.html#TOC53">8.1 Strings</A></H2>
<P>
-<A NAME="IDX271"></A>
+<A NAME="IDX284"></A>
+<A NAME="IDX285"></A>
<P>
<PRE>
String
cl_string
- <cl_string.h>
+ <cln/string.h>
</PRE>
<P>
<DT><CODE>cl_string (const char * s)</CODE>
<DD>
-<A NAME="IDX272"></A>
Returns an immutable copy of the (zero-terminated) C string <CODE>s</CODE>.
<DT><CODE>cl_string (const char * ptr, unsigned long len)</CODE>
<DT><CODE>s.length()</CODE>
<DD>
-<A NAME="IDX273"></A>
+<A NAME="IDX286"></A>
<DT><CODE>strlen(s)</CODE>
<DD>
-<A NAME="IDX274"></A>
+<A NAME="IDX287"></A>
Returns the length of the string <CODE>s</CODE>.
<DT><CODE>s[i]</CODE>
<DD>
-<A NAME="IDX275"></A>
+<A NAME="IDX288"></A>
Returns the <CODE>i</CODE>th character of the string <CODE>s</CODE>.
<CODE>i</CODE> must be in the range <CODE>0 <= i < s.length()</CODE>.
<DT><CODE>bool equal (const cl_string& s1, const cl_string& s2)</CODE>
<DD>
-<A NAME="IDX276"></A>
+<A NAME="IDX289"></A>
Compares two strings for equality. One of the arguments may also be a
plain <CODE>const char *</CODE>.
</DL>
<H2><A NAME="SEC54" HREF="cln.html#TOC54">8.2 Symbols</A></H2>
<P>
-<A NAME="IDX277"></A>
+<A NAME="IDX290"></A>
+<A NAME="IDX291"></A>
<P>
<DT><CODE>cl_symbol (const cl_string& s)</CODE>
<DD>
-<A NAME="IDX278"></A>
Looks up or creates a new symbol with a given name.
</DL>
<DT><CODE>bool equal (const cl_symbol& sym1, const cl_symbol& sym2)</CODE>
<DD>
-<A NAME="IDX279"></A>
+<A NAME="IDX292"></A>
Compares two symbols for equality. This is very fast.
</DL>
<H1><A NAME="SEC55" HREF="cln.html#TOC55">9. Univariate polynomials</A></H1>
<P>
-<A NAME="IDX280"></A>
-<A NAME="IDX281"></A>
+<A NAME="IDX293"></A>
+<A NAME="IDX294"></A>
<P>
CLN implements univariate polynomials (polynomials in one variable) over an
arbitrary ring. The indeterminate variable may be either unnamed (and will be
-printed according to <CODE>cl_default_print_flags.univpoly_varname</CODE>, which
+printed according to <CODE>default_print_flags.univpoly_varname</CODE>, which
defaults to <SAMP>`x'</SAMP>) or carry a given name. The base ring and the
indeterminate are explicitly part of every polynomial. CLN doesn't allow you to
(accidentally) mix elements of different polynomial rings, e.g.
<PRE>
Ring
cl_ring
- <cl_ring.h>
+ <cln/ring.h>
|
|
Univariate polynomial ring
cl_univpoly_ring
- <cl_univpoly.h>
+ <cln/univpoly.h>
|
+----------------+-------------------+
| | |
Complex polynomial ring | Modular integer polynomial ring
cl_univpoly_complex_ring | cl_univpoly_modint_ring
- <cl_univpoly_complex.h> | <cl_univpoly_modint.h>
+ <cln/univpoly_complex.h> | <cln/univpoly_modint.h>
|
+----------------+
| |
Real polynomial ring |
cl_univpoly_real_ring |
- <cl_univpoly_real.h> |
+ <cln/univpoly_real.h> |
|
+----------------+
| |
Rational polynomial ring |
cl_univpoly_rational_ring |
- <cl_univpoly_rational.h> |
+ <cln/univpoly_rational.h> |
|
+----------------+
|
Integer polynomial ring
cl_univpoly_integer_ring
- <cl_univpoly_integer.h>
+ <cln/univpoly_integer.h>
</PRE>
<P>
<PRE>
Univariate polynomial
cl_UP
- <cl_univpoly.h>
+ <cln/univpoly.h>
|
+----------------+-------------------+
| | |
Complex polynomial | Modular integer polynomial
cl_UP_N | cl_UP_MI
- <cl_univpoly_complex.h> | <cl_univpoly_modint.h>
+ <cln/univpoly_complex.h> | <cln/univpoly_modint.h>
|
+----------------+
| |
Real polynomial |
cl_UP_R |
- <cl_univpoly_real.h> |
+ <cln/univpoly_real.h> |
|
+----------------+
| |
Rational polynomial |
cl_UP_RA |
- <cl_univpoly_rational.h> |
+ <cln/univpoly_rational.h> |
|
+----------------+
|
Integer polynomial
cl_UP_I
- <cl_univpoly_integer.h>
+ <cln/univpoly_integer.h>
</PRE>
<P>
<DL COMPACT>
-<DT><CODE>cl_univpoly_ring cl_find_univpoly_ring (const cl_ring& R)</CODE>
+<DT><CODE>cl_univpoly_ring find_univpoly_ring (const cl_ring& R)</CODE>
<DD>
-<DT><CODE>cl_univpoly_ring cl_find_univpoly_ring (const cl_ring& R, const cl_symbol& varname)</CODE>
+<DT><CODE>cl_univpoly_ring find_univpoly_ring (const cl_ring& R, const cl_symbol& varname)</CODE>
<DD>
This function returns the polynomial ring <SAMP>`R[X]'</SAMP>, unnamed or named.
<CODE>R</CODE> may be an arbitrary ring. This function takes care of finding out
This ensures that two calls of this function with the same arguments will
return the same polynomial ring.
-<DT><CODE>cl_univpoly_complex_ring cl_find_univpoly_ring (const cl_complex_ring& R)</CODE>
+<DT><CODE>cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& R)</CODE>
<DD>
-<A NAME="IDX282"></A>
-<DT><CODE>cl_univpoly_complex_ring cl_find_univpoly_ring (const cl_complex_ring& R, const cl_symbol& varname)</CODE>
+<A NAME="IDX295"></A>
+<DT><CODE>cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& R, const cl_symbol& varname)</CODE>
<DD>
-<DT><CODE>cl_univpoly_real_ring cl_find_univpoly_ring (const cl_real_ring& R)</CODE>
+<DT><CODE>cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& R)</CODE>
<DD>
-<DT><CODE>cl_univpoly_real_ring cl_find_univpoly_ring (const cl_real_ring& R, const cl_symbol& varname)</CODE>
+<DT><CODE>cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& R, const cl_symbol& varname)</CODE>
<DD>
-<DT><CODE>cl_univpoly_rational_ring cl_find_univpoly_ring (const cl_rational_ring& R)</CODE>
+<DT><CODE>cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& R)</CODE>
<DD>
-<DT><CODE>cl_univpoly_rational_ring cl_find_univpoly_ring (const cl_rational_ring& R, const cl_symbol& varname)</CODE>
+<DT><CODE>cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& R, const cl_symbol& varname)</CODE>
<DD>
-<DT><CODE>cl_univpoly_integer_ring cl_find_univpoly_ring (const cl_integer_ring& R)</CODE>
+<DT><CODE>cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& R)</CODE>
<DD>
-<DT><CODE>cl_univpoly_integer_ring cl_find_univpoly_ring (const cl_integer_ring& R, const cl_symbol& varname)</CODE>
+<DT><CODE>cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& R, const cl_symbol& varname)</CODE>
<DD>
-<DT><CODE>cl_univpoly_modint_ring cl_find_univpoly_ring (const cl_modint_ring& R)</CODE>
+<DT><CODE>cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& R)</CODE>
<DD>
-<DT><CODE>cl_univpoly_modint_ring cl_find_univpoly_ring (const cl_modint_ring& R, const cl_symbol& varname)</CODE>
+<DT><CODE>cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& R, const cl_symbol& varname)</CODE>
<DD>
-These functions are equivalent to the general <CODE>cl_find_univpoly_ring</CODE>,
+These functions are equivalent to the general <CODE>find_univpoly_ring</CODE>,
only the return type is more specific, according to the base ring's type.
</DL>
<DT><CODE>cl_ring R->basering()</CODE>
<DD>
-<A NAME="IDX283"></A>
-This returns the base ring, as passed to <SAMP>`cl_find_univpoly_ring'</SAMP>.
+<A NAME="IDX296"></A>
+This returns the base ring, as passed to <SAMP>`find_univpoly_ring'</SAMP>.
<DT><CODE>cl_UP R->zero()</CODE>
<DD>
-<A NAME="IDX284"></A>
+<A NAME="IDX297"></A>
This returns <CODE>0 in R</CODE>, a polynomial of degree -1.
<DT><CODE>cl_UP R->one()</CODE>
<DD>
-<A NAME="IDX285"></A>
+<A NAME="IDX298"></A>
This returns <CODE>1 in R</CODE>, a polynomial of degree <= 0.
<DT><CODE>cl_UP R->canonhom (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX286"></A>
+<A NAME="IDX299"></A>
This returns <CODE>x in R</CODE>, a polynomial of degree <= 0.
<DT><CODE>cl_UP R->monomial (const cl_ring_element& x, uintL e)</CODE>
<DD>
-<A NAME="IDX287"></A>
+<A NAME="IDX300"></A>
This returns a sparse polynomial: <CODE>x * X^e</CODE>, where <CODE>X</CODE> is the
indeterminate.
<DT><CODE>cl_UP R->create (sintL degree)</CODE>
<DD>
-<A NAME="IDX288"></A>
+<A NAME="IDX301"></A>
Creates a new polynomial with a given degree. The zero polynomial has degree
<CODE>-1</CODE>. After creating the polynomial, you should put in the coefficients,
using the <CODE>set_coeff</CODE> member function, and then call the <CODE>finalize</CODE>
<DT><CODE>void set_coeff (cl_UP& x, uintL index, const cl_ring_element& y)</CODE>
<DD>
-<A NAME="IDX289"></A>
+<A NAME="IDX302"></A>
This changes the coefficient of <CODE>X^index</CODE> in <CODE>x</CODE> to be <CODE>y</CODE>.
After changing a polynomial and before applying any "normal" operation on it,
you should call its <CODE>finalize</CODE> member function.
<DT><CODE>void finalize (cl_UP& x)</CODE>
<DD>
-<A NAME="IDX290"></A>
+<A NAME="IDX303"></A>
This function marks the endpoint of destructive modifications of a polynomial.
It normalizes the internal representation so that subsequent computations have
less overhead. Doing normal computations on unnormalized polynomials may
<DT><CODE>cl_univpoly_ring x.ring ()</CODE>
<DD>
-<A NAME="IDX291"></A>
+<A NAME="IDX304"></A>
Returns the ring to which the univariate polynomial <CODE>x</CODE> belongs.
<DT><CODE>cl_UP operator+ (const cl_UP&, const cl_UP&)</CODE>
<DD>
-<A NAME="IDX292"></A>
+<A NAME="IDX305"></A>
Returns the sum of two univariate polynomials.
<DT><CODE>cl_UP operator- (const cl_UP&, const cl_UP&)</CODE>
<DD>
-<A NAME="IDX293"></A>
+<A NAME="IDX306"></A>
Returns the difference of two univariate polynomials.
<DT><CODE>cl_UP operator- (const cl_UP&)</CODE>
<DT><CODE>cl_UP operator* (const cl_UP&, const cl_UP&)</CODE>
<DD>
-<A NAME="IDX294"></A>
+<A NAME="IDX307"></A>
Returns the product of two univariate polynomials. One of the arguments may
also be a plain integer or an element of the base ring.
<DT><CODE>cl_UP square (const cl_UP&)</CODE>
<DD>
-<A NAME="IDX295"></A>
+<A NAME="IDX308"></A>
Returns the square of a univariate polynomial.
<DT><CODE>cl_UP expt_pos (const cl_UP& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX296"></A>
+<A NAME="IDX309"></A>
<CODE>y</CODE> must be > 0. Returns <CODE>x^y</CODE>.
<DT><CODE>bool operator== (const cl_UP&, const cl_UP&)</CODE>
<DD>
-<A NAME="IDX297"></A>
+<A NAME="IDX310"></A>
<DT><CODE>bool operator!= (const cl_UP&, const cl_UP&)</CODE>
<DD>
-<A NAME="IDX298"></A>
+<A NAME="IDX311"></A>
Compares two univariate polynomials, belonging to the same univariate
polynomial ring, for equality.
<DT><CODE>cl_boolean zerop (const cl_UP& x)</CODE>
<DD>
-<A NAME="IDX299"></A>
+<A NAME="IDX312"></A>
Returns true if <CODE>x</CODE> is <CODE>0 in R</CODE>.
<DT><CODE>sintL degree (const cl_UP& x)</CODE>
<DD>
-<A NAME="IDX300"></A>
+<A NAME="IDX313"></A>
Returns the degree of the polynomial. The zero polynomial has degree <CODE>-1</CODE>.
<DT><CODE>cl_ring_element coeff (const cl_UP& x, uintL index)</CODE>
<DD>
-<A NAME="IDX301"></A>
+<A NAME="IDX314"></A>
Returns the coefficient of <CODE>X^index</CODE> in the polynomial <CODE>x</CODE>.
<DT><CODE>cl_ring_element x (const cl_ring_element& y)</CODE>
<DD>
-<A NAME="IDX302"></A>
+<A NAME="IDX315"></A>
Evaluation: If <CODE>x</CODE> is a polynomial and <CODE>y</CODE> belongs to the base ring,
then <SAMP>`x(y)'</SAMP> returns the value of the substitution of <CODE>y</CODE> into
<CODE>x</CODE>.
<DT><CODE>cl_UP deriv (const cl_UP& x)</CODE>
<DD>
-<A NAME="IDX303"></A>
+<A NAME="IDX316"></A>
Returns the derivative of the polynomial <CODE>x</CODE> with respect to the
indeterminate <CODE>X</CODE>.
</DL>
<DT><CODE>void fprint (cl_ostream stream, const cl_UP& x)</CODE>
<DD>
-<A NAME="IDX304"></A>
+<A NAME="IDX317"></A>
<DT><CODE>cl_ostream operator<< (cl_ostream stream, const cl_UP& x)</CODE>
<DD>
-<A NAME="IDX305"></A>
+<A NAME="IDX318"></A>
Prints the univariate polynomial <CODE>x</CODE> on the <CODE>stream</CODE>. The output may
depend on the global printer settings in the variable
-<CODE>cl_default_print_flags</CODE>.
+<CODE>default_print_flags</CODE>.
</DL>
<DL COMPACT>
-<DT><CODE>cl_UP_I cl_tschebychev (sintL n)</CODE>
+<DT><CODE>cl_UP_I tschebychev (sintL n)</CODE>
<DD>
-<A NAME="IDX306"></A>
-<A NAME="IDX307"></A>
-Returns the n-th Tchebychev polynomial (n >= 0).
+<A NAME="IDX319"></A>
+<A NAME="IDX320"></A>
+Returns the n-th Chebyshev polynomial (n >= 0).
-<DT><CODE>cl_UP_I cl_hermite (sintL n)</CODE>
+<DT><CODE>cl_UP_I hermite (sintL n)</CODE>
<DD>
-<A NAME="IDX308"></A>
-<A NAME="IDX309"></A>
+<A NAME="IDX321"></A>
+<A NAME="IDX322"></A>
Returns the n-th Hermite polynomial (n >= 0).
-<DT><CODE>cl_UP_RA cl_legendre (sintL n)</CODE>
+<DT><CODE>cl_UP_RA legendre (sintL n)</CODE>
<DD>
-<A NAME="IDX310"></A>
-<A NAME="IDX311"></A>
+<A NAME="IDX323"></A>
+<A NAME="IDX324"></A>
Returns the n-th Legendre polynomial (n >= 0).
-<DT><CODE>cl_UP_I cl_laguerre (sintL n)</CODE>
+<DT><CODE>cl_UP_I laguerre (sintL n)</CODE>
<DD>
-<A NAME="IDX312"></A>
-<A NAME="IDX313"></A>
+<A NAME="IDX325"></A>
+<A NAME="IDX326"></A>
Returns the n-th Laguerre polynomial (n >= 0).
</DL>
<H2><A NAME="SEC60" HREF="cln.html#TOC60">10.1 Why C++ ?</A></H2>
<P>
-<A NAME="IDX314"></A>
+<A NAME="IDX327"></A>
<P>
<LI>
-<A NAME="IDX315"></A>
+<A NAME="IDX328"></A>
Portability: It runs on all platforms supporting a C++ compiler. Because
of the availability of GNU C++, this includes all currently used 32-bit and
64-bit platforms, independently of the quality of the vendor's C++ compiler.
it.
<LI>
-<A NAME="IDX316"></A>
-<A NAME="IDX317"></A>
+<A NAME="IDX329"></A>
+<A NAME="IDX330"></A>
Garbage collection: A reference counting mechanism makes sure that any
number object's storage is freed immediately when the last reference to the
object is gone.
For very large numbers (more than 12000 decimal digits), CLN uses
Schönhage-Strassen
-<A NAME="IDX318"></A>
+<A NAME="IDX331"></A>
multiplication, which is an asymptotically optimal multiplication
algorithm.
<LI>
<H2><A NAME="SEC63" HREF="cln.html#TOC63">10.4 Garbage collection</A></H2>
<P>
-<A NAME="IDX319"></A>
+<A NAME="IDX332"></A>
<P>
<H2><A NAME="SEC65" HREF="cln.html#TOC65">11.1 Compiler options</A></H2>
<P>
-<A NAME="IDX320"></A>
+<A NAME="IDX333"></A>
<P>
-<H2><A NAME="SEC66" HREF="cln.html#TOC66">11.2 Include files</A></H2>
+<H2><A NAME="SEC66" HREF="cln.html#TOC66">11.2 Compatibility to old CLN versions</A></H2>
<P>
-<A NAME="IDX321"></A>
-<A NAME="IDX322"></A>
+<A NAME="IDX334"></A>
+<A NAME="IDX335"></A>
+
+
+<P>
+As of CLN version 1.1 all non-macro identifiers were hidden in namespace
+<CODE>cln</CODE> in order to avoid potential name clashes with other C++
+libraries. If you have an old application, you will have to manually
+port it to the new scheme. The following principles will help during
+the transition:
+
+<UL>
+<LI>
+
+All headers are now in a separate subdirectory. Instead of including
+<CODE>cl_</CODE><VAR>something</VAR><CODE>.h</CODE>, include
+<CODE>cln/</CODE><VAR>something</VAR><CODE>.h</CODE> now.
+<LI>
+
+All public identifiers (typenames and functions) have lost their
+<CODE>cl_</CODE> prefix. Exceptions are all the typenames of number types,
+(cl_N, cl_I, cl_MI, ...), rings, symbolic types (cl_string,
+cl_symbol) and polynomials (cl_UP_<VAR>type</VAR>). (This is because their
+names would not be mnemonic enough once the namespace <CODE>cln</CODE> is
+imported. Even in a namespace we favor <CODE>cl_N</CODE> over <CODE>N</CODE>.)
+<LI>
+
+All public <EM>functions</EM> that had by a <CODE>cl_</CODE> in their name still
+carry that <CODE>cl_</CODE> if it is intrinsic part of a typename (as in
+<CODE>cl_I_to_int ()</CODE>).
+</UL>
+
+<P>
+When developing other libraries, please keep in mind not to import the
+namespace <CODE>cln</CODE> in one of your public header files by saying
+<CODE>using namespace cln;</CODE>. This would propagate to other applications
+and can cause name clashes there.
+
+
+
+
+<H2><A NAME="SEC67" HREF="cln.html#TOC67">11.3 Include files</A></H2>
+<P>
+<A NAME="IDX336"></A>
+<A NAME="IDX337"></A>
<P>
<DL COMPACT>
-<DT><CODE><cl_object.h></CODE>
+<DT><CODE><cln/object.h></CODE>
<DD>
General definitions, reference counting, garbage collection.
-<DT><CODE><cl_number.h></CODE>
+<DT><CODE><cln/number.h></CODE>
<DD>
The class cl_number.
-<DT><CODE><cl_complex.h></CODE>
+<DT><CODE><cln/complex.h></CODE>
<DD>
Functions for class cl_N, the complex numbers.
-<DT><CODE><cl_real.h></CODE>
+<DT><CODE><cln/real.h></CODE>
<DD>
Functions for class cl_R, the real numbers.
-<DT><CODE><cl_float.h></CODE>
+<DT><CODE><cln/float.h></CODE>
<DD>
Functions for class cl_F, the floats.
-<DT><CODE><cl_sfloat.h></CODE>
+<DT><CODE><cln/sfloat.h></CODE>
<DD>
Functions for class cl_SF, the short-floats.
-<DT><CODE><cl_ffloat.h></CODE>
+<DT><CODE><cln/ffloat.h></CODE>
<DD>
Functions for class cl_FF, the single-floats.
-<DT><CODE><cl_dfloat.h></CODE>
+<DT><CODE><cln/dfloat.h></CODE>
<DD>
Functions for class cl_DF, the double-floats.
-<DT><CODE><cl_lfloat.h></CODE>
+<DT><CODE><cln/lfloat.h></CODE>
<DD>
Functions for class cl_LF, the long-floats.
-<DT><CODE><cl_rational.h></CODE>
+<DT><CODE><cln/rational.h></CODE>
<DD>
Functions for class cl_RA, the rational numbers.
-<DT><CODE><cl_integer.h></CODE>
+<DT><CODE><cln/integer.h></CODE>
<DD>
Functions for class cl_I, the integers.
-<DT><CODE><cl_io.h></CODE>
+<DT><CODE><cln/io.h></CODE>
<DD>
Input/Output.
-<DT><CODE><cl_complex_io.h></CODE>
+<DT><CODE><cln/complex_io.h></CODE>
<DD>
Input/Output for class cl_N, the complex numbers.
-<DT><CODE><cl_real_io.h></CODE>
+<DT><CODE><cln/real_io.h></CODE>
<DD>
Input/Output for class cl_R, the real numbers.
-<DT><CODE><cl_float_io.h></CODE>
+<DT><CODE><cln/float_io.h></CODE>
<DD>
Input/Output for class cl_F, the floats.
-<DT><CODE><cl_sfloat_io.h></CODE>
+<DT><CODE><cln/sfloat_io.h></CODE>
<DD>
Input/Output for class cl_SF, the short-floats.
-<DT><CODE><cl_ffloat_io.h></CODE>
+<DT><CODE><cln/ffloat_io.h></CODE>
<DD>
Input/Output for class cl_FF, the single-floats.
-<DT><CODE><cl_dfloat_io.h></CODE>
+<DT><CODE><cln/dfloat_io.h></CODE>
<DD>
Input/Output for class cl_DF, the double-floats.
-<DT><CODE><cl_lfloat_io.h></CODE>
+<DT><CODE><cln/lfloat_io.h></CODE>
<DD>
Input/Output for class cl_LF, the long-floats.
-<DT><CODE><cl_rational_io.h></CODE>
+<DT><CODE><cln/rational_io.h></CODE>
<DD>
Input/Output for class cl_RA, the rational numbers.
-<DT><CODE><cl_integer_io.h></CODE>
+<DT><CODE><cln/integer_io.h></CODE>
<DD>
Input/Output for class cl_I, the integers.
-<DT><CODE><cl_input.h></CODE>
+<DT><CODE><cln/input.h></CODE>
<DD>
Flags for customizing input operations.
-<DT><CODE><cl_output.h></CODE>
+<DT><CODE><cln/output.h></CODE>
<DD>
Flags for customizing output operations.
-<DT><CODE><cl_malloc.h></CODE>
+<DT><CODE><cln/malloc.h></CODE>
<DD>
-<CODE>cl_malloc_hook</CODE>, <CODE>cl_free_hook</CODE>.
-<DT><CODE><cl_abort.h></CODE>
+<CODE>malloc_hook</CODE>, <CODE>free_hook</CODE>.
+<DT><CODE><cln/abort.h></CODE>
<DD>
<CODE>cl_abort</CODE>.
-<DT><CODE><cl_condition.h></CODE>
+<DT><CODE><cln/condition.h></CODE>
<DD>
Conditions/exceptions.
-<DT><CODE><cl_string.h></CODE>
+<DT><CODE><cln/string.h></CODE>
<DD>
Strings.
-<DT><CODE><cl_symbol.h></CODE>
+<DT><CODE><cln/symbol.h></CODE>
<DD>
Symbols.
-<DT><CODE><cl_proplist.h></CODE>
+<DT><CODE><cln/proplist.h></CODE>
<DD>
Property lists.
-<DT><CODE><cl_ring.h></CODE>
+<DT><CODE><cln/ring.h></CODE>
<DD>
General rings.
-<DT><CODE><cl_null_ring.h></CODE>
+<DT><CODE><cln/null_ring.h></CODE>
<DD>
The null ring.
-<DT><CODE><cl_complex_ring.h></CODE>
+<DT><CODE><cln/complex_ring.h></CODE>
<DD>
The ring of complex numbers.
-<DT><CODE><cl_real_ring.h></CODE>
+<DT><CODE><cln/real_ring.h></CODE>
<DD>
The ring of real numbers.
-<DT><CODE><cl_rational_ring.h></CODE>
+<DT><CODE><cln/rational_ring.h></CODE>
<DD>
The ring of rational numbers.
-<DT><CODE><cl_integer_ring.h></CODE>
+<DT><CODE><cln/integer_ring.h></CODE>
<DD>
The ring of integers.
-<DT><CODE><cl_numtheory.h></CODE>
+<DT><CODE><cln/numtheory.h></CODE>
<DD>
Number threory functions.
-<DT><CODE><cl_modinteger.h></CODE>
+<DT><CODE><cln/modinteger.h></CODE>
<DD>
Modular integers.
-<DT><CODE><cl_V.h></CODE>
+<DT><CODE><cln/V.h></CODE>
<DD>
Vectors.
-<DT><CODE><cl_GV.h></CODE>
+<DT><CODE><cln/GV.h></CODE>
<DD>
General vectors.
-<DT><CODE><cl_GV_number.h></CODE>
+<DT><CODE><cln/GV_number.h></CODE>
<DD>
General vectors over cl_number.
-<DT><CODE><cl_GV_complex.h></CODE>
+<DT><CODE><cln/GV_complex.h></CODE>
<DD>
General vectors over cl_N.
-<DT><CODE><cl_GV_real.h></CODE>
+<DT><CODE><cln/GV_real.h></CODE>
<DD>
General vectors over cl_R.
-<DT><CODE><cl_GV_rational.h></CODE>
+<DT><CODE><cln/GV_rational.h></CODE>
<DD>
General vectors over cl_RA.
-<DT><CODE><cl_GV_integer.h></CODE>
+<DT><CODE><cln/GV_integer.h></CODE>
<DD>
General vectors over cl_I.
-<DT><CODE><cl_GV_modinteger.h></CODE>
+<DT><CODE><cln/GV_modinteger.h></CODE>
<DD>
General vectors of modular integers.
-<DT><CODE><cl_SV.h></CODE>
+<DT><CODE><cln/SV.h></CODE>
<DD>
Simple vectors.
-<DT><CODE><cl_SV_number.h></CODE>
+<DT><CODE><cln/SV_number.h></CODE>
<DD>
Simple vectors over cl_number.
-<DT><CODE><cl_SV_complex.h></CODE>
+<DT><CODE><cln/SV_complex.h></CODE>
<DD>
Simple vectors over cl_N.
-<DT><CODE><cl_SV_real.h></CODE>
+<DT><CODE><cln/SV_real.h></CODE>
<DD>
Simple vectors over cl_R.
-<DT><CODE><cl_SV_rational.h></CODE>
+<DT><CODE><cln/SV_rational.h></CODE>
<DD>
Simple vectors over cl_RA.
-<DT><CODE><cl_SV_integer.h></CODE>
+<DT><CODE><cln/SV_integer.h></CODE>
<DD>
Simple vectors over cl_I.
-<DT><CODE><cl_SV_ringelt.h></CODE>
+<DT><CODE><cln/SV_ringelt.h></CODE>
<DD>
Simple vectors of general ring elements.
-<DT><CODE><cl_univpoly.h></CODE>
+<DT><CODE><cln/univpoly.h></CODE>
<DD>
Univariate polynomials.
-<DT><CODE><cl_univpoly_integer.h></CODE>
+<DT><CODE><cln/univpoly_integer.h></CODE>
<DD>
Univariate polynomials over the integers.
-<DT><CODE><cl_univpoly_rational.h></CODE>
+<DT><CODE><cln/univpoly_rational.h></CODE>
<DD>
Univariate polynomials over the rational numbers.
-<DT><CODE><cl_univpoly_real.h></CODE>
+<DT><CODE><cln/univpoly_real.h></CODE>
<DD>
Univariate polynomials over the real numbers.
-<DT><CODE><cl_univpoly_complex.h></CODE>
+<DT><CODE><cln/univpoly_complex.h></CODE>
<DD>
Univariate polynomials over the complex numbers.
-<DT><CODE><cl_univpoly_modint.h></CODE>
+<DT><CODE><cln/univpoly_modint.h></CODE>
<DD>
Univariate polynomials over modular integer rings.
-<DT><CODE><cl_timing.h></CODE>
+<DT><CODE><cln/timing.h></CODE>
<DD>
Timing facilities.
-<DT><CODE><cln.h></CODE>
+<DT><CODE><cln/cln.h></CODE>
<DD>
Includes all of the above.
</DL>
-<H2><A NAME="SEC67" HREF="cln.html#TOC67">11.3 An Example</A></H2>
+<H2><A NAME="SEC68" HREF="cln.html#TOC68">11.4 An Example</A></H2>
<P>
A function which computes the nth Fibonacci number can be written as follows.
-<A NAME="IDX323"></A>
+<A NAME="IDX338"></A>
<PRE>
-#include <cl_integer.h>
-#include <cl_real.h>
+#include <cln/integer.h>
+#include <cln/real.h>
+using namespace cln;
// Returns F_n, computed as the nearest integer to
// ((1+sqrt(5))/2)^n/sqrt(5). Assume n>=0.
<P>
-The include file <CODE><cl_integer.h></CODE> is necessary because the type
-<CODE>cl_I</CODE> is used in the function, and the include file <CODE><cl_real.h></CODE>
+The include file <CODE><cln/integer.h></CODE> is necessary because the type
+<CODE>cl_I</CODE> is used in the function, and the include file <CODE><cln/real.h></CODE>
is needed for the type <CODE>cl_R</CODE> and the floating point number functions.
-The order of the include files does not matter.
+The order of the include files does not matter. In order not to write out
+<CODE>cln::</CODE><VAR>foo</VAR> we can safely import the whole namespace <CODE>cln</CODE>.
<P>
-<H2><A NAME="SEC68" HREF="cln.html#TOC68">11.4 Debugging support</A></H2>
+<H2><A NAME="SEC69" HREF="cln.html#TOC69">11.5 Debugging support</A></H2>
<P>
-<A NAME="IDX324"></A>
+<A NAME="IDX339"></A>
<P>
for printing number objects. In order to get this function, you have
to define the macro <SAMP>`CL_DEBUG'</SAMP> and then include all the header files
for which you want <CODE>cl_print</CODE> debugging support. For example:
-<A NAME="IDX325"></A>
+<A NAME="IDX340"></A>
<PRE>
#define CL_DEBUG
-#include <cl_string.h>
+#include <cln/string.h>
</PRE>
Now, if you have in your program a variable <CODE>cl_string s</CODE>, and
<CODE>debug_print()</CODE> on all CLN types. The same macro <SAMP>`CL_DEBUG'</SAMP>
is needed for this member function to be implemented. Under <CODE>gdb</CODE>,
you call it like this:
-<A NAME="IDX326"></A>
+<A NAME="IDX341"></A>
<PRE>
(gdb) print s
-<H1><A NAME="SEC69" HREF="cln.html#TOC69">12. Customizing</A></H1>
+<H1><A NAME="SEC70" HREF="cln.html#TOC70">12. Customizing</A></H1>
<P>
-<A NAME="IDX327"></A>
+<A NAME="IDX342"></A>
-<H2><A NAME="SEC70" HREF="cln.html#TOC70">12.1 Error handling</A></H2>
+<H2><A NAME="SEC71" HREF="cln.html#TOC71">12.1 Error handling</A></H2>
<P>
When a fatal error occurs, an error message is output to the standard error
yourself, with the prototype
<PRE>
-#include <cl_abort.h>
+#include <cln/abort.h>
void cl_abort (void);
</PRE>
<P>
-<A NAME="IDX328"></A>
+<A NAME="IDX343"></A>
This function must not return control to its caller.
-<H2><A NAME="SEC71" HREF="cln.html#TOC71">12.2 Floating-point underflow</A></H2>
+<H2><A NAME="SEC72" HREF="cln.html#TOC72">12.2 Floating-point underflow</A></H2>
<P>
-<A NAME="IDX329"></A>
+<A NAME="IDX344"></A>
<P>
-<H2><A NAME="SEC72" HREF="cln.html#TOC72">12.3 Customizing I/O</A></H2>
+<H2><A NAME="SEC73" HREF="cln.html#TOC73">12.3 Customizing I/O</A></H2>
<P>
The output of the function <CODE>fprint</CODE> may be customized by changing the
-value of the global variable <CODE>cl_default_print_flags</CODE>.
-<A NAME="IDX330"></A>
+value of the global variable <CODE>default_print_flags</CODE>.
+<A NAME="IDX345"></A>
-<H2><A NAME="SEC73" HREF="cln.html#TOC73">12.4 Customizing the memory allocator</A></H2>
+<H2><A NAME="SEC74" HREF="cln.html#TOC74">12.4 Customizing the memory allocator</A></H2>
<P>
Every memory allocation of CLN is done through the function pointer
-<CODE>cl_malloc_hook</CODE>. Freeing of this memory is done through the function
-pointer <CODE>cl_free_hook</CODE>. The default versions of these functions,
+<CODE>malloc_hook</CODE>. Freeing of this memory is done through the function
+pointer <CODE>free_hook</CODE>. The default versions of these functions,
provided in the library, call <CODE>malloc</CODE> and <CODE>free</CODE> and check
the <CODE>malloc</CODE> result against <CODE>NULL</CODE>.
If you want to provide another memory allocator, you need to define
-the variables <CODE>cl_malloc_hook</CODE> and <CODE>cl_free_hook</CODE> yourself,
+the variables <CODE>malloc_hook</CODE> and <CODE>free_hook</CODE> yourself,
like this:
<PRE>
-#include <cl_malloc.h>
-void* (*cl_malloc_hook) (size_t size) = ...;
-void (*cl_free_hook) (void* ptr) = ...;
+#include <cln/malloc.h>
+namespace cln {
+ void* (*malloc_hook) (size_t size) = ...;
+ void (*free_hook) (void* ptr) = ...;
+}
</PRE>
<P>
-<A NAME="IDX331"></A>
-<A NAME="IDX332"></A>
+<A NAME="IDX346"></A>
+<A NAME="IDX347"></A>
The <CODE>cl_malloc_hook</CODE> function must not return a <CODE>NULL</CODE> pointer.
-<H1><A NAME="SEC74" HREF="cln.html#TOC74">Index</A></H1>
+<H1><A NAME="SEC75" HREF="cln.html#TOC75">Index</A></H1>
<P>
Jump to:
<P><HR><P>
-This document was generated on 2 June 2000 using
+This document was generated on 28 August 2000 using
<A HREF="http://wwwinfo.cern.ch/dis/texi2html/">texi2html</A> 1.56k.
</BODY>
</HTML>
Using the library
* Compiler options::
+* Compatibility to old CLN versions::
* Include files::
* An Example::
* Debugging support::
* The library provides hooks for memory allocation and exceptions.
+ * All non-macro identifiers are hidden in namespace `cln' in order
+ to avoid name clashes.
+
\1f
File: cln.info, Node: Installation, Next: Ordinary number types, Prev: Introduction, Up: Top
------------
To build CLN, you need a C++ compiler. Actually, you need GNU `g++
-2.7.0' or newer. On HPPA, you need GNU `g++ 2.8.0' or newer. I
-recommend GNU `g++ 2.95' or newer.
+2.90' or newer, the EGCS compilers will do. I recommend GNU `g++ 2.95'
+or newer.
The following C++ features are used: classes, member functions,
overloading of functions and operators, constructors and destructors,
-inline, const, multiple inheritance, templates.
+inline, const, multiple inheritance, templates and namespaces.
The following C++ features are not used: `new', `delete', virtual
inheritance, exceptions.
Examples:
$ CC="gcc" CFLAGS="-O" CXX="g++" CXXFLAGS="-O" ./configure
- $ CC="gcc -V 2.7.2" CFLAGS="-O -g" \
- CXX="g++ -V 2.7.2" CXXFLAGS="-O -g" ./configure
- $ CC="gcc -V 2.8.1" CFLAGS="-O -fno-exceptions" \
- CXX="g++ -V 2.8.1" CXXFLAGS="-O -fno-exceptions" ./configure
- $ CC="gcc -V egcs-2.91.60" CFLAGS="-O2 -fno-exceptions" \
- CXX="g++ -V egcs-2.91.60" CFLAGS="-O2 -fno-exceptions" ./configure
+ $ CC="gcc -V egcs-2.91.60" CFLAGS="-O -g" \
+ CXX="g++ -V egcs-2.91.60" CXXFLAGS="-O -g" ./configure
+ $ CC="gcc -V 2.95.2" CFLAGS="-O2 -fno-exceptions" \
+ CXX="g++ -V 2.95.2" CFLAGS="-O2 -fno-exceptions" ./configure
Note that for these environment variables to take effect, you have to
set them (assuming a Bourne-compatible shell) on the same line as the
`configure'. In a `csh' shell, you have to use the `setenv' command for
setting each of the environment variables.
-On Linux, `g++' needs 15 MB to compile the tests. So you should better
-have 17 MB swap space and 1 MB room in $TMPDIR.
-
-If you use `g++' version 2.7.x, don't add `-O2' to the CXXFLAGS,
-because `g++ -O' generates better code for CLN than `g++ -O2'.
+Currently CLN works only with the GNU `g++' compiler, and only in
+optimizing mode. So you should specify at least `-O' in the CXXFLAGS,
+or no CXXFLAGS at all. (If CXXFLAGS is not set, CLN will use `-O'.)
If you use `g++' version 2.8.x or egcs-2.91.x (a.k.a. egcs-1.1) or
gcc-2.95.x, I recommend adding `-fno-exceptions' to the CXXFLAGS. This
CLN implements the following class hierarchy:
Number
- cl_number
- <cl_number.h>
+ cl_number
+ <cln/number.h>
|
|
Real or complex number
cl_N
- <cl_complex.h>
+ <cln/complex.h>
|
|
Real number
cl_R
- <cl_real.h>
+ <cln/real.h>
|
+-------------------+-------------------+
| |
Rational number Floating-point number
cl_RA cl_F
- <cl_rational.h> <cl_float.h>
+ <cln/rational.h> <cln/float.h>
| |
- | +-------------+-------------+-------------+
- Integer | | | |
- cl_I Short-Float Single-Float Double-Float Long-Float
- <cl_integer.h> cl_SF cl_FF cl_DF cl_LF
- <cl_sfloat.h> <cl_ffloat.h> <cl_dfloat.h> <cl_lfloat.h>
+ | +--------------+--------------+--------------+
+ Integer | | | |
+ cl_I Short-Float Single-Float Double-Float Long-Float
+ <cln/integer.h> cl_SF cl_FF cl_DF cl_LF
+ <cln/sfloat.h> <cln/ffloat.h> <cln/dfloat.h> <cln/lfloat.h>
The base class `cl_number' is an abstract base class. It is not useful
to declare a variable of this type except if you want to completely
`cl_DF', `cl_LF', `cl_F' and `cl_R' to the C built-in types `float' and
`double' are provided through the functions
-`float cl_float_approx (const TYPE& x)'
-`double cl_double_approx (const TYPE& x)'
+`float float_approx (const TYPE& x)'
+`double double_approx (const TYPE& x)'
Returns an approximation of `x' of C type CTYPE. If `abs(x)' is
too close to 0 (underflow), 0 is returned. If `abs(x)' is too
large (overflow), an IEEE infinity is returned.
Each of the number classes declares its mathematical operations in the
corresponding include file. For example, if your code operates with
-objects of type `cl_I', it should `#include <cl_integer.h>'.
+objects of type `cl_I', it should `#include <cln/integer.h>'.
* Menu:
`bool operator != (const TYPE&, const TYPE&)'
Comparison, as in C and C++.
-`uint32 cl_equal_hashcode (const TYPE&)'
+`uint32 equal_hashcode (const TYPE&)'
Returns a 32-bit hash code that is the same for any two numbers
which are the same according to `=='. This hash code depends on
the number's value, not its type or precision.
Each of the classes `cl_R', `cl_RA', `cl_I', `cl_F', `cl_SF', `cl_FF',
`cl_DF', `cl_LF' defines the following operations:
-`cl_signean cl_compare (const TYPE& x, const TYPE& y)'
+`cl_signean compare (const TYPE& x, const TYPE& y)'
Compares `x' and `y'. Returns +1 if `x'>`y', -1 if `x'<`y', 0 if
`x'=`y'.
The constant e = exp(1) = 2.71828... is returned by the following
functions:
-`cl_F cl_exp1 (cl_float_format_t f)'
+`cl_F exp1 (cl_float_format_t f)'
Returns e as a float of format `f'.
-`cl_F cl_exp1 (const cl_F& y)'
+`cl_F exp1 (const cl_F& y)'
Returns e in the float format of `y'.
-`cl_F cl_exp1 (void)'
- Returns e as a float of format `cl_default_float_format'.
+`cl_F exp1 (void)'
+ Returns e as a float of format `default_float_format'.
\1f
File: cln.info, Node: Trigonometric functions, Next: Hyperbolic functions, Prev: Exponential and logarithmic functions, Up: Transcendental functions
Returns `cos(z)'. The range of the result is the entire complex
plane.
-`struct cl_cos_sin_t { cl_R cos; cl_R sin; };'
-`cl_cos_sin_t cl_cos_sin (const cl_R& x)'
+`struct cos_sin_t { cl_R cos; cl_R sin; };'
+`cos_sin_t cos_sin (const cl_R& x)'
Returns both `sin(x)' and `cos(x)'. This is more efficient than
computing them separately. The relation `cos^2 + sin^2 = 1' will
hold only approximately.
Archimedes' constant pi = 3.14... is returned by the following
functions:
-`cl_F cl_pi (cl_float_format_t f)'
+`cl_F pi (cl_float_format_t f)'
Returns pi as a float of format `f'.
-`cl_F cl_pi (const cl_F& y)'
+`cl_F pi (const cl_F& y)'
Returns pi in the float format of `y'.
-`cl_F cl_pi (void)'
- Returns pi as a float of format `cl_default_float_format'.
+`cl_F pi (void)'
+ Returns pi as a float of format `default_float_format'.
\1f
File: cln.info, Node: Hyperbolic functions, Next: Euler gamma, Prev: Trigonometric functions, Up: Transcendental functions
Returns `cosh(z)'. The range of the result is the entire complex
plane.
-`struct cl_cosh_sinh_t { cl_R cosh; cl_R sinh; };'
-`cl_cosh_sinh_t cl_cosh_sinh (const cl_R& x)'
+`struct cosh_sinh_t { cl_R cosh; cl_R sinh; };'
+`cosh_sinh_t cosh_sinh (const cl_R& x)'
Returns both `sinh(x)' and `cosh(x)'. This is more efficient than
computing them separately. The relation `cosh^2 - sinh^2 = 1' will
hold only approximately.
Euler's constant C = 0.577... is returned by the following functions:
-`cl_F cl_eulerconst (cl_float_format_t f)'
+`cl_F eulerconst (cl_float_format_t f)'
Returns Euler's constant as a float of format `f'.
-`cl_F cl_eulerconst (const cl_F& y)'
+`cl_F eulerconst (const cl_F& y)'
Returns Euler's constant in the float format of `y'.
-`cl_F cl_eulerconst (void)'
+`cl_F eulerconst (void)'
Returns Euler's constant as a float of format
- `cl_default_float_format'.
+ `default_float_format'.
Catalan's constant G = 0.915... is returned by the following functions:
-`cl_F cl_catalanconst (cl_float_format_t f)'
+`cl_F catalanconst (cl_float_format_t f)'
Returns Catalan's constant as a float of format `f'.
-`cl_F cl_catalanconst (const cl_F& y)'
+`cl_F catalanconst (const cl_F& y)'
Returns Catalan's constant in the float format of `y'.
-`cl_F cl_catalanconst (void)'
+`cl_F catalanconst (void)'
Returns Catalan's constant as a float of format
- `cl_default_float_format'.
+ `default_float_format'.
\1f
File: cln.info, Node: Riemann zeta, Prev: Euler gamma, Up: Transcendental functions
Riemann's zeta function at an integral point `s>1' is returned by the
following functions:
-`cl_F cl_zeta (int s, cl_float_format_t f)'
+`cl_F zeta (int s, cl_float_format_t f)'
Returns Riemann's zeta function at `s' as a float of format `f'.
-`cl_F cl_zeta (int s, const cl_F& y)'
+`cl_F zeta (int s, const cl_F& y)'
Returns Riemann's zeta function at `s' in the float format of `y'.
-`cl_F cl_zeta (int s)'
+`cl_F zeta (int s)'
Returns Riemann's zeta function at `s' as a float of format
- `cl_default_float_format'.
+ `default_float_format'.
\1f
File: cln.info, Node: Functions on integers, Next: Functions on floating-point numbers, Prev: Transcendental functions, Up: Functions on numbers
non-zero, and 0 if `x' = 0.
The complete internal representation of a float is encoded in the type
-`cl_decoded_float' (or `cl_decoded_sfloat', `cl_decoded_ffloat',
-`cl_decoded_dfloat', `cl_decoded_lfloat', respectively), defined by
- struct cl_decoded_TYPEfloat {
+`decoded_float' (or `decoded_sfloat', `decoded_ffloat',
+`decoded_dfloat', `decoded_lfloat', respectively), defined by
+ struct decoded_TYPEfloat {
TYPE mantissa; cl_I exponent; TYPE sign;
};
and returned by the function
-`cl_decoded_TYPEfloat decode_float (const TYPE& x)'
+`decoded_TYPEfloat decode_float (const TYPE& x)'
For `x' non-zero, this returns `(-1)^s', `e', `m' with `x = (-1)^s
* 2^e * m' and `0.5 <= m < 1.0'. For `x' = 0, it returns
`(-1)^s'=1, `e'=0, `m'=0. `e' is the same as returned by the
`cl_float_format_t cl_float_format (const cl_F& x)'
Returns the floating point format of `x'.
-`cl_float_format_t cl_default_float_format'
+`cl_float_format_t default_float_format'
Global variable: the default float format used when converting
rational numbers to floats.
Returns `x' in the float format of `y'.
`cl_F cl_float (const TYPE&x)'
- Returns `x' as a float of format `cl_default_float_format' if it
- is an exact number, or `x' itself if it is already a float.
+ Returns `x' as a float of format `default_float_format' if it is
+ an exact number, or `x' itself if it is already a float.
Of course, converting a number to a float can lose precision.
========================
A random generator is a machine which produces (pseudo-)random numbers.
-The include file `<cl_random.h>' defines a class `cl_random_state'
-which contains the state of a random generator. If you make a copy of
-the random number generator, the original one and the copy will produce
-the same sequence of random numbers.
+The include file `<cln/random.h>' defines a class `random_state' which
+contains the state of a random generator. If you make a copy of the
+random number generator, the original one and the copy will produce the
+same sequence of random numbers.
The following functions return (pseudo-)random numbers in different
formats. Calling one of these modifies the state of the random number
generator in a complicated but deterministic way.
The global variable
- cl_random_state cl_default_random_state
+ random_state default_random_state
contains a default random number generator. It is used when the
-functions below are called without `cl_random_state' argument.
+functions below are called without `random_state' argument.
-`uint32 random32 (cl_random_state& randomstate)'
+`uint32 random32 (random_state& randomstate)'
`uint32 random32 ()'
Returns a random unsigned 32-bit number. All bits are equally
random.
-`cl_I random_I (cl_random_state& randomstate, const cl_I& n)'
+`cl_I random_I (random_state& randomstate, const cl_I& n)'
`cl_I random_I (const cl_I& n)'
`n' must be an integer > 0. This function returns a random integer
`x' in the range `0 <= x < n'.
-`cl_F random_F (cl_random_state& randomstate, const cl_F& n)'
+`cl_F random_F (random_state& randomstate, const cl_F& n)'
`cl_F random_F (const cl_F& n)'
`n' must be a float > 0. This function returns a random
floating-point number of the same format as `n' in the range `0 <=
x < n'.
-`cl_R random_R (cl_random_state& randomstate, const cl_R& n)'
+`cl_R random_R (random_state& randomstate, const cl_R& n)'
`cl_R random_R (const cl_R& n)'
Behaves like `random_I' if `n' is an integer and like `random_F'
if `n' is a float.
Input functions
===============
-Including `<cl_io.h>' defines a type `cl_istream', which is the type of
-the first argument to all input functions. Unless you build and use CLN
-with the macro CL_IO_STDIO being defined, `cl_istream' is the same as
-`istream&'.
+Including `<cln/io.h>' defines a type `cl_istream', which is the type
+of the first argument to all input functions. `cl_istream' is the same
+as `std::istream&'.
The variable
- `cl_istream cl_stdin'
+ `cl_istream stdin'
contains the standard input stream.
These are the simple input functions:
`freadchar' operation on `stream'.
Each of the classes `cl_N', `cl_R', `cl_RA', `cl_I', `cl_F', `cl_SF',
-`cl_FF', `cl_DF', `cl_LF' defines, in `<cl_TYPE_io.h>', the following
+`cl_FF', `cl_DF', `cl_LF' defines, in `<cln/TYPE_io.h>', the following
input function:
`cl_istream operator>> (cl_istream stream, TYPE& result)'
Reads a number from `stream' and stores it in the `result'.
-The most flexible input functions, defined in `<cl_TYPE_io.h>', are the
-following:
+The most flexible input functions, defined in `<cln/TYPE_io.h>', are
+the following:
`cl_N read_complex (cl_istream stream, const cl_read_flags& flags)'
`cl_R read_real (cl_istream stream, const cl_read_flags& flags)'
Output functions
================
-Including `<cl_io.h>' defines a type `cl_ostream', which is the type of
-the first argument to all output functions. Unless you build and use
-CLN with the macro CL_IO_STDIO being defined, `cl_ostream' is the same
-as `ostream&'.
+Including `<cln/io.h>' defines a type `cl_ostream', which is the type
+of the first argument to all output functions. `cl_ostream' is the same
+as `std::ostream&'.
The variable
- `cl_ostream cl_stdout'
+ `cl_ostream stdout'
contains the standard output stream.
The variable
- `cl_ostream cl_stderr'
+ `cl_ostream stderr'
contains the standard error output stream.
These are the simple output functions:
the `stream'.
Each of the classes `cl_N', `cl_R', `cl_RA', `cl_I', `cl_F', `cl_SF',
-`cl_FF', `cl_DF', `cl_LF' defines, in `<cl_TYPE_io.h>', the following
+`cl_FF', `cl_DF', `cl_LF' defines, in `<cln/TYPE_io.h>', the following
output functions:
`void fprint (cl_ostream stream, const TYPE& x)'
`cl_ostream operator<< (cl_ostream stream, const TYPE& x)'
Prints the number `x' on the `stream'. The output may depend on
- the global printer settings in the variable
- `cl_default_print_flags'. The `ostream' flags and settings
- (flags, width and locale) are ignored.
+ the global printer settings in the variable `default_print_flags'.
+ The `ostream' flags and settings (flags, width and locale) are
+ ignored.
-The most flexible output function, defined in `<cl_TYPE_io.h>', are the
-following:
+The most flexible output function, defined in `<cln/TYPE_io.h>', are
+the following:
void print_complex (cl_ostream stream, const cl_print_flags& flags,
const cl_N& z);
void print_real (cl_ostream stream, const cl_print_flags& flags,
Univariate polynomials with no explicit indeterminate name will be
printed using this variable name. Default is `"x"'.
-The global variable `cl_default_print_flags' contains the default
-values, used by the function `fprint'.
+The global variable `default_print_flags' contains the default values,
+used by the function `fprint'.
\1f
File: cln.info, Node: Rings, Next: Modular integers, Prev: Input/Output, Up: Top
Ring
cl_ring
- <cl_ring.h>
+ <cln/ring.h>
Rings can be compared for equality:
Ring
cl_ring
- <cl_ring.h>
+ <cln/ring.h>
|
|
Modular integer ring
cl_modint_ring
- <cl_modinteger.h>
+ <cln/modinteger.h>
and the class of all modular integers (elements of modular integer
rings) is
Modular integer
cl_MI
- <cl_modinteger.h>
+ <cln/modinteger.h>
Modular integer rings are constructed using the function
-`cl_modint_ring cl_find_modint_ring (const cl_I& N)'
+`cl_modint_ring find_modint_ring (const cl_I& N)'
This function returns the modular ring `Z/NZ'. It takes care of
finding out about special cases of `N', like powers of two and odd
numbers for which Montgomery multiplication will be a win, and
`bool operator== (const cl_modint_ring&, const cl_modint_ring&)'
`bool operator!= (const cl_modint_ring&, const cl_modint_ring&)'
These compare two modular integer rings for equality. Two
- different calls to `cl_find_modint_ring' with the same argument
+ different calls to `find_modint_ring' with the same argument
necessarily return the same ring because it is memoized in the
cache table.
This is a partial inverse function to `R->canonhom'. It returns the
standard representative (`>=0', `<N') of `x'.
-`cl_MI R->random(cl_random_state& randomstate)'
+`cl_MI R->random(random_state& randomstate)'
`cl_MI R->random()'
This returns a random integer modulo `N'.
`cl_ostream operator<< (cl_ostream stream, const cl_MI& x)'
Prints the modular integer `x' on the `stream'. The output may
depend on the global printer settings in the variable
- `cl_default_print_flags'.
+ `default_print_flags'.
\1f
File: cln.info, Node: Symbolic data types, Next: Univariate polynomials, Prev: Modular integers, Up: Top
String
cl_string
- <cl_string.h>
+ <cln/string.h>
implements immutable strings.
CLN implements univariate polynomials (polynomials in one variable)
over an arbitrary ring. The indeterminate variable may be either
unnamed (and will be printed according to
-`cl_default_print_flags.univpoly_varname', which defaults to `x') or
-carry a given name. The base ring and the indeterminate are explicitly
-part of every polynomial. CLN doesn't allow you to (accidentally) mix
+`default_print_flags.univpoly_varname', which defaults to `x') or carry
+a given name. The base ring and the indeterminate are explicitly part
+of every polynomial. CLN doesn't allow you to (accidentally) mix
elements of different polynomial rings, e.g. `(a^2+1) * (b^3-1)' will
result in a runtime error. (Ideally this should return a multivariate
polynomial, but they are not yet implemented in CLN.)
Ring
cl_ring
- <cl_ring.h>
+ <cln/ring.h>
|
|
Univariate polynomial ring
cl_univpoly_ring
- <cl_univpoly.h>
+ <cln/univpoly.h>
|
+----------------+-------------------+
| | |
Complex polynomial ring | Modular integer polynomial ring
cl_univpoly_complex_ring | cl_univpoly_modint_ring
- <cl_univpoly_complex.h> | <cl_univpoly_modint.h>
+ <cln/univpoly_complex.h> | <cln/univpoly_modint.h>
|
+----------------+
| |
Real polynomial ring |
cl_univpoly_real_ring |
- <cl_univpoly_real.h> |
+ <cln/univpoly_real.h> |
|
+----------------+
| |
Rational polynomial ring |
cl_univpoly_rational_ring |
- <cl_univpoly_rational.h> |
+ <cln/univpoly_rational.h> |
|
+----------------+
|
Integer polynomial ring
cl_univpoly_integer_ring
- <cl_univpoly_integer.h>
+ <cln/univpoly_integer.h>
and the corresponding classes of univariate polynomials are
Univariate polynomial
cl_UP
- <cl_univpoly.h>
+ <cln/univpoly.h>
|
+----------------+-------------------+
| | |
Complex polynomial | Modular integer polynomial
cl_UP_N | cl_UP_MI
- <cl_univpoly_complex.h> | <cl_univpoly_modint.h>
+ <cln/univpoly_complex.h> | <cln/univpoly_modint.h>
|
+----------------+
| |
Real polynomial |
cl_UP_R |
- <cl_univpoly_real.h> |
+ <cln/univpoly_real.h> |
|
+----------------+
| |
Rational polynomial |
cl_UP_RA |
- <cl_univpoly_rational.h> |
+ <cln/univpoly_rational.h> |
|
+----------------+
|
Integer polynomial
cl_UP_I
- <cl_univpoly_integer.h>
+ <cln/univpoly_integer.h>
Univariate polynomial rings are constructed using the functions
-`cl_univpoly_ring cl_find_univpoly_ring (const cl_ring& R)'
-`cl_univpoly_ring cl_find_univpoly_ring (const cl_ring& R, const cl_symbol& varname)'
+`cl_univpoly_ring find_univpoly_ring (const cl_ring& R)'
+`cl_univpoly_ring find_univpoly_ring (const cl_ring& R, const cl_symbol& varname)'
This function returns the polynomial ring `R[X]', unnamed or named.
`R' may be an arbitrary ring. This function takes care of finding
out about special cases of `R', such as the rings of complex
and `varname'. This ensures that two calls of this function with
the same arguments will return the same polynomial ring.
-`cl_univpoly_complex_ring cl_find_univpoly_ring (const cl_complex_ring& R)'
-`cl_univpoly_complex_ring cl_find_univpoly_ring (const cl_complex_ring& R, const cl_symbol& varname)'
-`cl_univpoly_real_ring cl_find_univpoly_ring (const cl_real_ring& R)'
-`cl_univpoly_real_ring cl_find_univpoly_ring (const cl_real_ring& R, const cl_symbol& varname)'
-`cl_univpoly_rational_ring cl_find_univpoly_ring (const cl_rational_ring& R)'
-`cl_univpoly_rational_ring cl_find_univpoly_ring (const cl_rational_ring& R, const cl_symbol& varname)'
-`cl_univpoly_integer_ring cl_find_univpoly_ring (const cl_integer_ring& R)'
-`cl_univpoly_integer_ring cl_find_univpoly_ring (const cl_integer_ring& R, const cl_symbol& varname)'
-`cl_univpoly_modint_ring cl_find_univpoly_ring (const cl_modint_ring& R)'
-`cl_univpoly_modint_ring cl_find_univpoly_ring (const cl_modint_ring& R, const cl_symbol& varname)'
- These functions are equivalent to the general
- `cl_find_univpoly_ring', only the return type is more specific,
- according to the base ring's type.
+`cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& R)'
+`cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& R, const cl_symbol& varname)'
+`cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& R)'
+`cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& R, const cl_symbol& varname)'
+`cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& R)'
+`cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& R, const cl_symbol& varname)'
+`cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& R)'
+`cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& R, const cl_symbol& varname)'
+`cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& R)'
+`cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& R, const cl_symbol& varname)'
+ These functions are equivalent to the general `find_univpoly_ring',
+ only the return type is more specific, according to the base
+ ring's type.
\1f
File: cln.info, Node: Functions on univariate polynomials, Next: Special polynomials, Prev: Univariate polynomial rings, Up: Univariate polynomials
used.
`cl_ring R->basering()'
- This returns the base ring, as passed to `cl_find_univpoly_ring'.
+ This returns the base ring, as passed to `find_univpoly_ring'.
`cl_UP R->zero()'
This returns `0 in R', a polynomial of degree -1.
`cl_ostream operator<< (cl_ostream stream, const cl_UP& x)'
Prints the univariate polynomial `x' on the `stream'. The output
may depend on the global printer settings in the variable
- `cl_default_print_flags'.
+ `default_print_flags'.
\1f
File: cln.info, Node: Special polynomials, Prev: Functions on univariate polynomials, Up: Univariate polynomials
The following functions return special polynomials.
-`cl_UP_I cl_tschebychev (sintL n)'
- Returns the n-th Tchebychev polynomial (n >= 0).
+`cl_UP_I tschebychev (sintL n)'
+ Returns the n-th Chebyshev polynomial (n >= 0).
-`cl_UP_I cl_hermite (sintL n)'
+`cl_UP_I hermite (sintL n)'
Returns the n-th Hermite polynomial (n >= 0).
-`cl_UP_RA cl_legendre (sintL n)'
+`cl_UP_RA legendre (sintL n)'
Returns the n-th Legendre polynomial (n >= 0).
-`cl_UP_I cl_laguerre (sintL n)'
+`cl_UP_I laguerre (sintL n)'
Returns the n-th Laguerre polynomial (n >= 0).
Information how to derive the differential equation satisfied by each
* Menu:
* Compiler options::
+* Compatibility to old CLN versions::
* Include files::
* An Example::
* Debugging support::
\1f
-File: cln.info, Node: Compiler options, Next: Include files, Prev: Using the library, Up: Using the library
+File: cln.info, Node: Compiler options, Next: Compatibility to old CLN versions, Prev: Using the library, Up: Using the library
Compiler options
================
application it is sufficient to give the flag `-lcln'.
\1f
-File: cln.info, Node: Include files, Next: An Example, Prev: Compiler options, Up: Using the library
+File: cln.info, Node: Compatibility to old CLN versions, Next: Include files, Prev: Compiler options, Up: Using the library
+
+Compatibility to old CLN versions
+=================================
+
+As of CLN version 1.1 all non-macro identifiers were hidden in namespace
+`cln' in order to avoid potential name clashes with other C++
+libraries. If you have an old application, you will have to manually
+port it to the new scheme. The following principles will help during
+the transition:
+ * All headers are now in a separate subdirectory. Instead of
+ including `cl_'SOMETHING`.h', include `cln/'SOMETHING`.h' now.
+
+ * All public identifiers (typenames and functions) have lost their
+ `cl_' prefix. Exceptions are all the typenames of number types,
+ (cl_N, cl_I, cl_MI, ...), rings, symbolic types (cl_string,
+ cl_symbol) and polynomials (cl_UP_TYPE). (This is because their
+ names would not be mnemonic enough once the namespace `cln' is
+ imported. Even in a namespace we favor `cl_N' over `N'.)
+
+ * All public _functions_ that had by a `cl_' in their name still
+ carry that `cl_' if it is intrinsic part of a typename (as in
+ `cl_I_to_int ()').
+When developing other libraries, please keep in mind not to import the
+namespace `cln' in one of your public header files by saying `using
+namespace cln;'. This would propagate to other applications and can
+cause name clashes there.
+
+\1f
+File: cln.info, Node: Include files, Next: An Example, Prev: Compatibility to old CLN versions, Up: Using the library
Include files
=============
Here is a summary of the include files and their contents.
-`<cl_object.h>'
+`<cln/object.h>'
General definitions, reference counting, garbage collection.
-`<cl_number.h>'
+`<cln/number.h>'
The class cl_number.
-`<cl_complex.h>'
+`<cln/complex.h>'
Functions for class cl_N, the complex numbers.
-`<cl_real.h>'
+`<cln/real.h>'
Functions for class cl_R, the real numbers.
-`<cl_float.h>'
+`<cln/float.h>'
Functions for class cl_F, the floats.
-`<cl_sfloat.h>'
+`<cln/sfloat.h>'
Functions for class cl_SF, the short-floats.
-`<cl_ffloat.h>'
+`<cln/ffloat.h>'
Functions for class cl_FF, the single-floats.
-`<cl_dfloat.h>'
+`<cln/dfloat.h>'
Functions for class cl_DF, the double-floats.
-`<cl_lfloat.h>'
+`<cln/lfloat.h>'
Functions for class cl_LF, the long-floats.
-`<cl_rational.h>'
+`<cln/rational.h>'
Functions for class cl_RA, the rational numbers.
-`<cl_integer.h>'
+`<cln/integer.h>'
Functions for class cl_I, the integers.
-`<cl_io.h>'
+`<cln/io.h>'
Input/Output.
-`<cl_complex_io.h>'
+`<cln/complex_io.h>'
Input/Output for class cl_N, the complex numbers.
-`<cl_real_io.h>'
+`<cln/real_io.h>'
Input/Output for class cl_R, the real numbers.
-`<cl_float_io.h>'
+`<cln/float_io.h>'
Input/Output for class cl_F, the floats.
-`<cl_sfloat_io.h>'
+`<cln/sfloat_io.h>'
Input/Output for class cl_SF, the short-floats.
-`<cl_ffloat_io.h>'
+`<cln/ffloat_io.h>'
Input/Output for class cl_FF, the single-floats.
-`<cl_dfloat_io.h>'
+`<cln/dfloat_io.h>'
Input/Output for class cl_DF, the double-floats.
-`<cl_lfloat_io.h>'
+`<cln/lfloat_io.h>'
Input/Output for class cl_LF, the long-floats.
-`<cl_rational_io.h>'
+`<cln/rational_io.h>'
Input/Output for class cl_RA, the rational numbers.
-`<cl_integer_io.h>'
+`<cln/integer_io.h>'
Input/Output for class cl_I, the integers.
-`<cl_input.h>'
+`<cln/input.h>'
Flags for customizing input operations.
-`<cl_output.h>'
+`<cln/output.h>'
Flags for customizing output operations.
-`<cl_malloc.h>'
- `cl_malloc_hook', `cl_free_hook'.
+`<cln/malloc.h>'
+ `malloc_hook', `free_hook'.
-`<cl_abort.h>'
+`<cln/abort.h>'
`cl_abort'.
-`<cl_condition.h>'
+`<cln/condition.h>'
Conditions/exceptions.
-`<cl_string.h>'
+`<cln/string.h>'
Strings.
-`<cl_symbol.h>'
+`<cln/symbol.h>'
Symbols.
-`<cl_proplist.h>'
+`<cln/proplist.h>'
Property lists.
-`<cl_ring.h>'
+`<cln/ring.h>'
General rings.
-`<cl_null_ring.h>'
+`<cln/null_ring.h>'
The null ring.
-`<cl_complex_ring.h>'
+`<cln/complex_ring.h>'
The ring of complex numbers.
-`<cl_real_ring.h>'
+`<cln/real_ring.h>'
The ring of real numbers.
-`<cl_rational_ring.h>'
+`<cln/rational_ring.h>'
The ring of rational numbers.
-`<cl_integer_ring.h>'
+`<cln/integer_ring.h>'
The ring of integers.
-`<cl_numtheory.h>'
+`<cln/numtheory.h>'
Number threory functions.
-`<cl_modinteger.h>'
+`<cln/modinteger.h>'
Modular integers.
-`<cl_V.h>'
+`<cln/V.h>'
Vectors.
-`<cl_GV.h>'
+`<cln/GV.h>'
General vectors.
-`<cl_GV_number.h>'
+`<cln/GV_number.h>'
General vectors over cl_number.
-`<cl_GV_complex.h>'
+`<cln/GV_complex.h>'
General vectors over cl_N.
-`<cl_GV_real.h>'
+`<cln/GV_real.h>'
General vectors over cl_R.
-`<cl_GV_rational.h>'
+`<cln/GV_rational.h>'
General vectors over cl_RA.
-`<cl_GV_integer.h>'
+`<cln/GV_integer.h>'
General vectors over cl_I.
-`<cl_GV_modinteger.h>'
+`<cln/GV_modinteger.h>'
General vectors of modular integers.
-`<cl_SV.h>'
+`<cln/SV.h>'
Simple vectors.
-`<cl_SV_number.h>'
+`<cln/SV_number.h>'
Simple vectors over cl_number.
-`<cl_SV_complex.h>'
+`<cln/SV_complex.h>'
Simple vectors over cl_N.
-`<cl_SV_real.h>'
+`<cln/SV_real.h>'
Simple vectors over cl_R.
-`<cl_SV_rational.h>'
+`<cln/SV_rational.h>'
Simple vectors over cl_RA.
-`<cl_SV_integer.h>'
+`<cln/SV_integer.h>'
Simple vectors over cl_I.
-`<cl_SV_ringelt.h>'
+`<cln/SV_ringelt.h>'
Simple vectors of general ring elements.
-`<cl_univpoly.h>'
+`<cln/univpoly.h>'
Univariate polynomials.
-`<cl_univpoly_integer.h>'
+`<cln/univpoly_integer.h>'
Univariate polynomials over the integers.
-`<cl_univpoly_rational.h>'
+`<cln/univpoly_rational.h>'
Univariate polynomials over the rational numbers.
-`<cl_univpoly_real.h>'
+`<cln/univpoly_real.h>'
Univariate polynomials over the real numbers.
-`<cl_univpoly_complex.h>'
+`<cln/univpoly_complex.h>'
Univariate polynomials over the complex numbers.
-`<cl_univpoly_modint.h>'
+`<cln/univpoly_modint.h>'
Univariate polynomials over modular integer rings.
-`<cl_timing.h>'
+`<cln/timing.h>'
Timing facilities.
-`<cln.h>'
+`<cln/cln.h>'
Includes all of the above.
\1f
A function which computes the nth Fibonacci number can be written as
follows.
- #include <cl_integer.h>
- #include <cl_real.h>
+ #include <cln/integer.h>
+ #include <cln/real.h>
+ using namespace cln;
// Returns F_n, computed as the nearest integer to
// ((1+sqrt(5))/2)^n/sqrt(5). Assume n>=0.
Let's explain what is going on in detail.
-The include file `<cl_integer.h>' is necessary because the type `cl_I'
-is used in the function, and the include file `<cl_real.h>' is needed
+The include file `<cln/integer.h>' is necessary because the type `cl_I'
+is used in the function, and the include file `<cln/real.h>' is needed
for the type `cl_R' and the floating point number functions. The order
-of the include files does not matter.
+of the include files does not matter. In order not to write out
+`cln::'FOO we can safely import the whole namespace `cln'.
Then comes the function declaration. The argument is an `int', the
result an integer. The return type is defined as `const cl_I', not
to define the macro `CL_DEBUG' and then include all the header
files for which you want `cl_print' debugging support. For example:
#define CL_DEBUG
- #include <cl_string.h>
+ #include <cln/string.h>
Now, if you have in your program a variable `cl_string s', and
inspect it under `gdb', the output may look like this:
(gdb) print s
version of this function (provided in the library) terminates the
application. To catch such a fatal error, you need to define the
function `cl_abort' yourself, with the prototype
- #include <cl_abort.h>
+ #include <cln/abort.h>
void cl_abort (void);
This function must not return control to its caller.
===============
The output of the function `fprint' may be customized by changing the
-value of the global variable `cl_default_print_flags'.
+value of the global variable `default_print_flags'.
\1f
File: cln.info, Node: Customizing the memory allocator, Prev: Customizing I/O, Up: Customizing
================================
Every memory allocation of CLN is done through the function pointer
-`cl_malloc_hook'. Freeing of this memory is done through the function
-pointer `cl_free_hook'. The default versions of these functions,
-provided in the library, call `malloc' and `free' and check the
-`malloc' result against `NULL'. If you want to provide another memory
-allocator, you need to define the variables `cl_malloc_hook' and
-`cl_free_hook' yourself, like this:
- #include <cl_malloc.h>
- void* (*cl_malloc_hook) (size_t size) = ...;
- void (*cl_free_hook) (void* ptr) = ...;
+`malloc_hook'. Freeing of this memory is done through the function
+pointer `free_hook'. The default versions of these functions, provided
+in the library, call `malloc' and `free' and check the `malloc' result
+against `NULL'. If you want to provide another memory allocator, you
+need to define the variables `malloc_hook' and `free_hook' yourself,
+like this:
+ #include <cln/malloc.h>
+ namespace cln {
+ void* (*malloc_hook) (size_t size) = ...;
+ void (*free_hook) (void* ptr) = ...;
+ }
The `cl_malloc_hook' function must not return a `NULL' pointer.
It is not possible to change the memory allocator at runtime, because
* boole_set: Logical functions.
* boole_xor: Logical functions.
* canonhom () <1>: Functions on univariate polynomials.
-* canonhom (): Functions on modular integers.
+* canonhom () <2>: Functions on modular integers.
+* canonhom (): Rings.
* Catalan's constant: Euler gamma.
+* catalanconst (): Euler gamma.
* ceiling1 (): Rounding functions.
* ceiling2 (): Rounding functions.
+* Chebyshev polynomial: Special polynomials.
* cis (): Trigonometric functions.
* cl_abort (): Error handling.
* cl_byte: Logical functions.
-* cl_catalanconst (): Euler gamma.
-* cl_compare (): Comparisons.
-* cl_cos_sin (): Trigonometric functions.
-* cl_cos_sin_t: Trigonometric functions.
-* cl_cosh_sinh (): Hyperbolic functions.
-* cl_cosh_sinh_t: Hyperbolic functions.
* CL_DEBUG: Debugging support.
-* cl_decoded_dfloat: Functions on floating-point numbers.
-* cl_decoded_ffloat: Functions on floating-point numbers.
-* cl_decoded_float: Functions on floating-point numbers.
-* cl_decoded_lfloat: Functions on floating-point numbers.
-* cl_decoded_sfloat: Functions on floating-point numbers.
-* cl_default_float_format: Conversion to floating-point numbers.
-* cl_default_print_flags: Customizing I/O.
-* cl_default_random_state: Random number generators.
* cl_DF: Floating-point numbers.
* cl_DF_fdiv_t: Rounding functions.
-* cl_double_approx (): Conversions.
-* cl_equal_hashcode (): Comparisons.
-* cl_eulerconst (): Euler gamma.
* cl_F <1>: Floating-point numbers.
* cl_F: Ordinary number types.
* cl_F_fdiv_t: Rounding functions.
* cl_FF: Floating-point numbers.
* cl_FF_fdiv_t: Rounding functions.
-* cl_find_modint_ring (): Modular integer rings.
-* cl_find_univpoly_ring (): Univariate polynomial rings.
* cl_float (): Conversion to floating-point numbers.
-* cl_float_approx (): Conversions.
* cl_float_format (): Conversion to floating-point numbers.
* cl_float_format_t: Conversion to floating-point numbers.
-* cl_free_hook (): Customizing the memory allocator.
-* cl_hermite (): Special polynomials.
* cl_I_to_int (): Conversions.
* cl_I_to_long (): Conversions.
* cl_I_to_uint (): Conversions.
* cl_I_to_ulong (): Conversions.
* cl_idecoded_float: Functions on floating-point numbers.
-* cl_laguerre (): Special polynomials.
-* cl_legendre (): Special polynomials.
* cl_LF: Floating-point numbers.
* cl_LF_fdiv_t: Rounding functions.
-* cl_malloc_hook (): Customizing the memory allocator.
* cl_modint_ring: Modular integer rings.
* cl_N: Ordinary number types.
* cl_number: Ordinary number types.
-* cl_pi (): Trigonometric functions.
* cl_R: Ordinary number types.
* cl_R_fdiv_t: Rounding functions.
* cl_RA: Ordinary number types.
-* cl_random_state: Random number generators.
* cl_SF: Floating-point numbers.
* cl_SF_fdiv_t: Rounding functions.
-* cl_string (): Strings.
-* cl_symbol (): Symbols.
-* cl_tschebychev (): Special polynomials.
-* cl_zeta (): Riemann zeta.
+* cl_string: Strings.
+* cl_symbol: Symbols.
* coeff (): Functions on univariate polynomials.
+* compare (): Comparisons.
* comparison: Comparisons.
+* compatibility: Compatibility to old CLN versions.
* compiler options: Compiler options.
* complex (): Elementary complex functions.
* complex number <1>: Complex numbers.
* conversion <1>: Conversion functions.
* conversion: Conversions.
* cos (): Trigonometric functions.
+* cos_sin (): Trigonometric functions.
+* cos_sin_t: Trigonometric functions.
* cosh (): Hyperbolic functions.
+* cosh_sinh (): Hyperbolic functions.
+* cosh_sinh_t: Hyperbolic functions.
* create (): Functions on univariate polynomials.
* customizing: Customizing.
* debug_print (): Debugging support.
* debugging: Debugging support.
* decode_float (): Functions on floating-point numbers.
+* decoded_dfloat: Functions on floating-point numbers.
+* decoded_ffloat: Functions on floating-point numbers.
+* decoded_float: Functions on floating-point numbers.
+* decoded_lfloat: Functions on floating-point numbers.
+* decoded_sfloat: Functions on floating-point numbers.
+* default_float_format: Conversion to floating-point numbers.
+* default_print_flags: Customizing I/O.
+* default_random_state: Random number generators.
* degree (): Functions on univariate polynomials.
* denominator (): Elementary rational functions.
* deposit_field (): Logical functions.
* deriv (): Functions on univariate polynomials.
* div (): Functions on modular integers.
+* double_approx (): Conversions.
* doublefactorial (): Combinatorial functions.
* dpb (): Logical functions.
* equal () <1>: Symbols.
-* equal (): Strings.
+* equal () <2>: Strings.
+* equal (): Rings.
+* equal_hashcode (): Comparisons.
* Euler's constant: Euler gamma.
+* eulerconst (): Euler gamma.
* evenp (): Logical functions.
* exact number: Exact numbers.
* exp (): Exponential and logarithmic functions.
* expt (): Elementary functions.
* expt_pos () <1>: Functions on univariate polynomials.
* expt_pos () <2>: Functions on modular integers.
+* expt_pos () <3>: Rings.
* expt_pos (): Elementary functions.
* exquo (): Elementary functions.
* factorial (): Combinatorial functions.
* ffloor2 (): Rounding functions.
* Fibonacci number: An Example.
* finalize (): Functions on univariate polynomials.
+* find_modint_ring (): Modular integer rings.
+* find_univpoly_ring (): Univariate polynomial rings.
+* float_approx (): Conversions.
* float_digits (): Functions on floating-point numbers.
* float_epsilon (): Conversion to floating-point numbers.
* float_exponent (): Functions on floating-point numbers.
* floor1 (): Rounding functions.
* floor2 (): Rounding functions.
* fprint () <1>: Functions on univariate polynomials.
-* fprint (): Functions on modular integers.
+* fprint () <2>: Functions on modular integers.
+* fprint (): Rings.
+* free_hook (): Customizing the memory allocator.
* fround (): Rounding functions.
* fround2 (): Rounding functions.
* ftruncate (): Rounding functions.
* GMP <1>: Using the GNU MP Library.
* GMP: Introduction.
* header files: Include files.
+* hermite (): Special polynomials.
* Hermite polynomial: Special polynomials.
* imagpart (): Elementary complex functions.
* include files: Include files.
* integer_decode_float (): Functions on floating-point numbers.
* integer_length (): Logical functions.
* isqrt (): Roots.
+* laguerre (): Special polynomials.
* Laguerre polynomial: Special polynomials.
* lcm (): Number theoretic functions.
* ldb (): Logical functions.
* least_negative_float (): Conversion to floating-point numbers.
* least_positive_float (): Conversion to floating-point numbers.
* Legende polynomial: Special polynomials.
+* legendre (): Special polynomials.
* length (): Strings.
* ln (): Exponential and logarithmic functions.
* log (): Exponential and logarithmic functions.
* logtest (): Logical functions.
* logxor (): Logical functions.
* make: Make utility.
+* malloc_hook (): Customizing the memory allocator.
* mask_field (): Logical functions.
* max (): Comparisons.
* min (): Comparisons.
+* minus (): Rings.
* minus1 (): Elementary functions.
* minusp (): Comparisons.
* mod (): Rounding functions.
* Montgomery multiplication: Modular integer rings.
* most_negative_float (): Conversion to floating-point numbers.
* most_positive_float (): Conversion to floating-point numbers.
+* mul (): Rings.
+* namespace <1>: Compatibility to old CLN versions.
+* namespace: Introduction.
* numerator (): Elementary rational functions.
* oddp (): Logical functions.
* one () <1>: Functions on univariate polynomials.
-* one (): Functions on modular integers.
+* one () <2>: Functions on modular integers.
+* one (): Rings.
* operator != () <1>: Functions on univariate polynomials.
* operator != () <2>: Functions on modular integers.
* operator != () <3>: Modular integer rings.
* ord2 (): Logical functions.
* phase (): Exponential and logarithmic functions.
* pi: Trigonometric functions.
+* pi (): Trigonometric functions.
+* plus (): Rings.
* plus1 (): Elementary functions.
* plusp (): Comparisons.
* polynomial: Univariate polynomials.
* random_F (): Random number generators.
* random_I (): Random number generators.
* random_R (): Random number generators.
+* random_state: Random number generators.
* rational (): Conversion to rational numbers.
* rational number: Ordinary number types.
* rationalize (): Conversion to rational numbers.
* sqrtp (): Roots.
* square () <1>: Functions on univariate polynomials.
* square () <2>: Functions on modular integers.
+* square () <3>: Rings.
* square (): Elementary functions.
* string: Strings.
* strlen (): Strings.
* transcendental functions: Transcendental functions.
* truncate1 (): Rounding functions.
* truncate2 (): Rounding functions.
-* Tschebychev polynomial: Special polynomials.
+* tschebychev (): Special polynomials.
+* uminus (): Rings.
* underflow: Floating-point underflow.
* univariate polynomial: Univariate polynomials.
* WANT_OBFUSCATING_OPERATORS: Obfuscating operators.
* xgcd (): Number theoretic functions.
* zero () <1>: Functions on univariate polynomials.
-* zero (): Functions on modular integers.
+* zero () <2>: Functions on modular integers.
+* zero (): Rings.
* zerop () <1>: Functions on univariate polynomials.
* zerop () <2>: Functions on modular integers.
+* zerop () <3>: Rings.
* zerop (): Comparisons.
+* zeta (): Riemann zeta.
\1f
Tag Table:
Node: Top\7f931
-Node: Introduction\7f3153
-Node: Installation\7f5675
-Node: Prerequisites\7f5969
-Node: C++ compiler\7f6167
-Node: Make utility\7f6882
-Node: Sed utility\7f7068
-Node: Building the library\7f7388
-Node: Using the GNU MP Library\7f10776
-Node: Installing the library\7f11652
-Node: Cleaning up\7f12375
-Node: Ordinary number types\7f12700
-Node: Exact numbers\7f15047
-Node: Floating-point numbers\7f16212
-Node: Complex numbers\7f19791
-Node: Conversions\7f20288
-Node: Functions on numbers\7f23754
-Node: Constructing numbers\7f24457
-Node: Constructing integers\7f24829
-Node: Constructing rational numbers\7f25119
-Node: Constructing floating-point numbers\7f25594
-Node: Constructing complex numbers\7f26714
-Node: Elementary functions\7f27078
-Node: Elementary rational functions\7f29547
-Node: Elementary complex functions\7f30119
-Node: Comparisons\7f30947
-Node: Rounding functions\7f32846
-Node: Roots\7f38623
-Node: Transcendental functions\7f40504
-Node: Exponential and logarithmic functions\7f41060
-Node: Trigonometric functions\7f43077
-Node: Hyperbolic functions\7f46428
-Node: Euler gamma\7f48501
-Node: Riemann zeta\7f49417
-Node: Functions on integers\7f49973
-Node: Logical functions\7f50261
-Node: Number theoretic functions\7f56214
-Node: Combinatorial functions\7f57581
-Node: Functions on floating-point numbers\7f58259
-Node: Conversion functions\7f61490
-Node: Conversion to floating-point numbers\7f61770
-Node: Conversion to rational numbers\7f63993
-Node: Random number generators\7f65047
-Node: Obfuscating operators\7f66721
-Node: Input/Output\7f68451
-Node: Internal and printed representation\7f68661
-Node: Input functions\7f71203
-Node: Output functions\7f75754
-Node: Rings\7f79490
-Node: Modular integers\7f81414
-Node: Modular integer rings\7f81614
-Node: Functions on modular integers\7f83704
-Node: Symbolic data types\7f86714
-Node: Strings\7f86977
-Node: Symbols\7f88042
-Node: Univariate polynomials\7f88944
-Node: Univariate polynomial rings\7f89202
-Node: Functions on univariate polynomials\7f94156
-Node: Special polynomials\7f97937
-Node: Internals\7f98657
-Node: Why C++ ?\7f98871
-Node: Memory efficiency\7f100371
-Node: Speed efficiency\7f101069
-Node: Garbage collection\7f102153
-Node: Using the library\7f102980
-Node: Compiler options\7f103514
-Node: Include files\7f104432
-Node: An Example\7f108073
-Node: Debugging support\7f111223
-Node: Customizing\7f113573
-Node: Error handling\7f113801
-Node: Floating-point underflow\7f114375
-Node: Customizing I/O\7f115014
-Node: Customizing the memory allocator\7f115307
-Node: Index\7f116264
+Node: Introduction\7f3191
+Node: Installation\7f5812
+Node: Prerequisites\7f6106
+Node: C++ compiler\7f6304
+Node: Make utility\7f7016
+Node: Sed utility\7f7202
+Node: Building the library\7f7522
+Node: Using the GNU MP Library\7f10745
+Node: Installing the library\7f11621
+Node: Cleaning up\7f12344
+Node: Ordinary number types\7f12669
+Node: Exact numbers\7f15022
+Node: Floating-point numbers\7f16187
+Node: Complex numbers\7f19766
+Node: Conversions\7f20263
+Node: Functions on numbers\7f23723
+Node: Constructing numbers\7f24427
+Node: Constructing integers\7f24799
+Node: Constructing rational numbers\7f25089
+Node: Constructing floating-point numbers\7f25564
+Node: Constructing complex numbers\7f26684
+Node: Elementary functions\7f27048
+Node: Elementary rational functions\7f29517
+Node: Elementary complex functions\7f30089
+Node: Comparisons\7f30917
+Node: Rounding functions\7f32810
+Node: Roots\7f38587
+Node: Transcendental functions\7f40468
+Node: Exponential and logarithmic functions\7f41024
+Node: Trigonometric functions\7f43029
+Node: Hyperbolic functions\7f46359
+Node: Euler gamma\7f48423
+Node: Riemann zeta\7f49315
+Node: Functions on integers\7f49859
+Node: Logical functions\7f50147
+Node: Number theoretic functions\7f56100
+Node: Combinatorial functions\7f57467
+Node: Functions on floating-point numbers\7f58145
+Node: Conversion functions\7f61355
+Node: Conversion to floating-point numbers\7f61635
+Node: Conversion to rational numbers\7f63852
+Node: Random number generators\7f64906
+Node: Obfuscating operators\7f66557
+Node: Input/Output\7f68287
+Node: Internal and printed representation\7f68497
+Node: Input functions\7f71039
+Node: Output functions\7f75524
+Node: Rings\7f79184
+Node: Modular integers\7f81108
+Node: Modular integer rings\7f81308
+Node: Functions on modular integers\7f83393
+Node: Symbolic data types\7f86397
+Node: Strings\7f86660
+Node: Symbols\7f87725
+Node: Univariate polynomials\7f88627
+Node: Univariate polynomial rings\7f88885
+Node: Functions on univariate polynomials\7f93801
+Node: Special polynomials\7f97576
+Node: Internals\7f98283
+Node: Why C++ ?\7f98497
+Node: Memory efficiency\7f99997
+Node: Speed efficiency\7f100695
+Node: Garbage collection\7f101779
+Node: Using the library\7f102606
+Node: Compiler options\7f103178
+Node: Compatibility to old CLN versions\7f104116
+Node: Include files\7f105537
+Node: An Example\7f109252
+Node: Debugging support\7f112518
+Node: Customizing\7f114869
+Node: Error handling\7f115097
+Node: Floating-point underflow\7f115672
+Node: Customizing I/O\7f116311
+Node: Customizing the memory allocator\7f116601
+Node: Index\7f117585
\1f
End Tag Table
%!PS-Adobe-2.0
%%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software
%%Title: cln.dvi
-%%Pages: 59
+%%Pages: 60
%%PageOrder: Ascend
%%BoundingBox: 0 0 596 842
%%EndComments
%DVIPSCommandLine: /usr/local/teTeX/bin/ix86-linux-libc6/dvips -D600 -o
%+ cln.ps cln.dvi
%DVIPSParameters: dpi=600, compressed
-%DVIPSSource: TeX output 2000.06.02:1711
+%DVIPSSource: TeX output 2000.08.28:2345
%%BeginProcSet: texc.pro
%!
/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
%%EndProcSet
TeXDict begin 39158280 55380996 1000 600 600 (cln.dvi)
@start
-%DVIPSBitmapFont: Fa cmti10 10.95 1
-/Fa 1 47 df<120FEA1F80EA3FC0127F12FFA3EA7F801300123C0A0A77891C>46
-D E
-%EndDVIPSBitmapFont
-%DVIPSBitmapFont: Fb cmbxti10 14.4 1
-/Fb 1 47 df<13FCEA03FF481380121F4813C0A25AA2B5FCA31480A26C13005B6C5AEA1F
+%DVIPSBitmapFont: Fa cmbxti10 14.4 1
+/Fa 1 47 df<13FCEA03FF481380121F4813C0A25AA2B5FCA31480A26C13005B6C5AEA1F
F0EA07C0121271912B>46 D E
%EndDVIPSBitmapFont
-%DVIPSBitmapFont: Fc cmr9 9 55
-/Fc 55 128 df<EC1FE0ECFFFC903803F01E90380FC00390391F000780013EEB0FC0017E
+%DVIPSBitmapFont: Fb cmr9 9 54
+/Fb 54 128 df<EC1FE0ECFFFC903803F01E90380FC00390391F000780013EEB0FC0017E
131F5BA24848EB0F80ED070092C7FCA9ED0FC0B7FCA23901F8001F150FB3A8486CEB1FE0
267FFFC1B5FCA228357FB42B>12 D<EC1FF891B512C0903803F00FEB0FC090381F001F13
3E137E49130FA2485AACB7FCA23901F8000FB3A9486CEB1FE0267FFFE3B5FCA228357FB4
07390380038F48C712CF000E147F4880003C80A24880A200F880A3817EA27E007E91C7FC
127F13C0EA3FF013FF6C13F06C13FF6C14C06C80C614F8013F7F01037FEB003FEC03FF14
00ED3F80151F16C0150F124000C01407A47E1680A27EED0F007E6C141E6C141C00F35CD8
-F1E013F039E0FC03E039C01FFF80D903FEC7FC22377CB42B>I<007FB712FEA29039800F
-F8013B7C0007F0003E0078161E0070160EA200601606A200E01607A2481603A6C71500B3
-ADEC1FFC011FB512FCA230337DB237>I<EB7F803803FFF0380F80FC381C003E001F7F48
-6C6C7E81A26C486C7E120EC7FCA4EB01FF131FEBFF873803F807EA07E0EA0F80EA1F0012
-3E127E16C05AA3140FA2007E131BA26C903871F180390FC1E1FF2607FF8013003900FE00
-3C22237DA126>97 D<EA03F012FFA212071203AFEC3F80ECFFE09038F3C0F89038F7003C
-01FC7F497FED07804914C0ED03E0A216F01501A216F8A816F0A2150316E0A2ED07C06D14
-80ED0F0001EC131E01C65B90388381F8903801FFE0C76CC7FC25357EB32B>I<EB0FF0EB
-3FFE9038F80F803901E001C03803C0073907800FE0EA0F005A48EB07C0003EEB0380007E
-90C7FCA2127CA212FCA8127C127EA2003E1430A26C14607E6D13C03907C001803903E003
-003800F81EEB7FFCEB0FE01C237DA122>I<153FEC0FFFA2EC007F81AFEB07F0EB3FFCEB
-FC0F3901E003BF4848C6B4FC48487F48C7FC4880123EA2127E127CA212FCA8127CA2127E
-123EA27E6C5C6C6C5B3903C001BF3A01E0033F802600F81E13FCEB3FFCD90FE013002635
-7DB32B>I<EB0FE0EB7FFCEBF83E3801E00F3903C0078039078003C0390F0001E05A003E
-14F01400127E007C14F8A212FCA2B6FCA200FCC8FCA5127C127EA2003E1418121E001F14
-307E6C6C13606C6C13C03901E001803900FC0F00EB3FFEEB07F01D237EA122>I<EB01FC
-EB07FEEB1F0790383E0F8090387C1FC013F8A20001EB0F809038F00700000390C7FCACB5
-12F0A2D803F0C7FCB3A9487E387FFFE0A21A357FB417>I<151F90391FC07F8090397FF1
-E3C09038F07B833903C01E039039800E01800007010FC7FC000F80EB00074880A66C5CEB
-800F000791C7FC0003130E6D5AEBF07838067FF0380E1FC090C9FCA5EA0F80EBFFFE6CEB
-FFC06C14F06C80000780390F0001FE001EEB007F48141F007C158048140FA5007CEC1F00
-A26C143E6C5C390FC001F83903F007E0C6B51280D91FFCC7FC22337EA126>I<EA03F012
-FFA212071203AFEC1FC0EC7FF09038F1E0F89038F3807C9038F6007E01FC133E153F5BA3
-5BB3A2486CEB7F80B538C7FFFCA226347EB32B>I<EA0780EA0FC0EA1FE0A4EA0FC0EA07
-80C7FCAAEA07E012FFA2120F1207B3A8EA0FF0B5FCA210337EB215>I<EA03F012FFA212
-071203B0913803FFE0A20200130015FC15F05D4A5A4AC7FC14065C14385C14F0EBF1F813
-F3EBFEFCEBFC7EEBF03E80816E7E1407816E7E1401816E7E8181486C1480B500C313F0A2
-24347EB329>107 D<EA07E012FFA2120F1207B3B3A9EA0FF0B5FCA210347EB315>I<2703
-F01FE013FF00FF90267FF80313C0913AE07C0703E03C07F3803E1C01F02803F7003F387F
-01F690381F300001FC02E07F495CA3495CB3A2486C496C487EB53BC7FFFE3FFFF0A23C21
-7EA041>I<3903F01FC000FFEB7FF09038F1E0F83907F3807C3903F6007E01FC133E153F
-5BA35BB3A2486CEB7F80B538C7FFFCA226217EA02B>I<EB07F0EB3FFE9038F80F803901
-E003C048486C7E48486C7E48C7127848147C001E143C003E143EA24880A300FC1580A800
-7C1500A2007E5C003E143EA26C5CA26C6C5B6C6C485A6C6C485A3900F80F80D93FFEC7FC
-EB07F021237EA126>I<3903F03F8000FFEBFFE09038F3C0F83907F7003CD803FC7F497F
-168049EB07C016E0150316F0A2150116F8A816F01503A216E0150716C06DEB0F80ED1F00
-6D131E01F6137C9038F381F89038F1FFE0D9F07FC7FC91C8FCAB487EB512C0A225307EA0
-2B>I<3803E07C00FF13FF9038E18F803907E31FC0EA03E613ECEC0F809038F8070091C7
-FCA35BB3487EB512E0A21A217FA01E>114 D<EBFF06000713CE380F00FE001C133E4813
-1E48130EA200F01306A37E6C90C7FCEA7F8013FC383FFFC06C7F6C13F86C7FC67FEB0FFF
-1300EC3F800040130F12C014077EA36C14006C5B140E00FE5B38E7807838C1FFE038C07F
-8019237EA11E>I<1330A51370A313F0A2120112031207121FB512FEA23803F000B01403
-A81201EBF8061200140CEB7E1CEB1FF8EB07E0182F7FAD1E>I<D803F0133F00FFEB0FFF
-A20007EB007F000380B3A35DA212015D9038F801BF00000103138090397E073FFCEB1FFC
-D907F8130026227EA02B>I<B5EBFFF0A2D80FF0EB3FC06C48EB0F00150E6C6C130CA26D
-131C00011418A26C6C5BA26D1370017E1360137F6D5BA290381F8180A214C3010F90C7FC
-A2EB07E6A214FE6D5AA26D5AA36D5AA2146024217E9F29>I<B53A1FFF81FFF0A23C0FF8
-03FC003F806C486C48EB1F0000030100141E170C816C6C017C5BA26D017E1338000002FE
-1330A290267E01FF5B159F168090263F030F5BA216C0903A1F8607C180A202C613E39026
-0FCC0390C7FCA2D907FC13F6ECF80116FE6D486C5AA36D481378A36D48133034217F9F37
->I<B53801FFF8A23A07FC007F800003EC7E000001143800005C017E1360017F13E09038
-3F81C090381F8380D90FC3C7FCEB07E614FE6D5A6D5A6D7E80805B9038039F809038071F
-C09038060FE0EB0C0790381C03F0496C7E01707FEB6000D801E0137E0003147FD80FF0EB
-FF8026FFFC0313FCA226207F9F29>I<3A7FFF807FF8A23A07F8001FE00003EC0F80ED07
-0000011406A26C6C5BA26D131C017E1318A26D5BA2EC8070011F1360ECC0E0010F5BA290
-3807E180A214F3010390C7FC14FBEB01FEA26D5AA31478A21430A25CA214E05CA2495A12
-78D8FC03C8FCA21306130EEA701CEA7838EA1FF0EA0FC025307F9F29>I<003FB512F0A2
-90380007E0003CEB0FC00038131F0030EB3F8000701400147E006013FE5C495A1303C648
-5A5C495A131F495A91C7FC017E133013FE485A5B485A000714705B48481360001F14E048
-5AEB0003007E130FB6FCA21C207E9F22>I<001C1370003E13F8387F01FC00FF13FEA200
-7F13FC383E00F8001C1370170879B226>127 D E
+F1E013F039E0FC03E039C01FFF80D903FEC7FC22377CB42B>I<EB7F803803FFF0380F80
+FC381C003E001F7F486C6C7E81A26C486C7E120EC7FCA4EB01FF131FEBFF873803F807EA
+07E0EA0F80EA1F00123E127E16C05AA3140FA2007E131BA26C903871F180390FC1E1FF26
+07FF8013003900FE003C22237DA126>97 D<EA03F012FFA212071203AFEC3F80ECFFE090
+38F3C0F89038F7003C01FC7F497FED07804914C0ED03E0A216F01501A216F8A816F0A215
+0316E0A2ED07C06D1480ED0F0001EC131E01C65B90388381F8903801FFE0C76CC7FC2535
+7EB32B>I<EB0FF0EB3FFE9038F80F803901E001C03803C0073907800FE0EA0F005A48EB
+07C0003EEB0380007E90C7FCA2127CA212FCA8127C127EA2003E1430A26C14607E6D13C0
+3907C001803903E003003800F81EEB7FFCEB0FE01C237DA122>I<153FEC0FFFA2EC007F
+81AFEB07F0EB3FFCEBFC0F3901E003BF4848C6B4FC48487F48C7FC4880123EA2127E127C
+A212FCA8127CA2127E123EA27E6C5C6C6C5B3903C001BF3A01E0033F802600F81E13FCEB
+3FFCD90FE0130026357DB32B>I<EB0FE0EB7FFCEBF83E3801E00F3903C0078039078003
+C0390F0001E05A003E14F01400127E007C14F8A212FCA2B6FCA200FCC8FCA5127C127EA2
+003E1418121E001F14307E6C6C13606C6C13C03901E001803900FC0F00EB3FFEEB07F01D
+237EA122>I<EB01FCEB07FEEB1F0790383E0F8090387C1FC013F8A20001EB0F809038F0
+0700000390C7FCACB512F0A2D803F0C7FCB3A9487E387FFFE0A21A357FB417>I<151F90
+391FC07F8090397FF1E3C09038F07B833903C01E039039800E01800007010FC7FC000F80
+EB00074880A66C5CEB800F000791C7FC0003130E6D5AEBF07838067FF0380E1FC090C9FC
+A5EA0F80EBFFFE6CEBFFC06C14F06C80000780390F0001FE001EEB007F48141F007C1580
+48140FA5007CEC1F00A26C143E6C5C390FC001F83903F007E0C6B51280D91FFCC7FC2233
+7EA126>I<EA03F012FFA212071203AFEC1FC0EC7FF09038F1E0F89038F3807C9038F600
+7E01FC133E153F5BA35BB3A2486CEB7F80B538C7FFFCA226347EB32B>I<EA0780EA0FC0
+EA1FE0A4EA0FC0EA0780C7FCAAEA07E012FFA2120F1207B3A8EA0FF0B5FCA210337EB215
+>I<EA03F012FFA212071203B0913803FFE0A20200130015FC15F05D4A5A4AC7FC14065C
+14385C14F0EBF1F813F3EBFEFCEBFC7EEBF03E80816E7E1407816E7E1401816E7E818148
+6C1480B500C313F0A224347EB329>107 D<EA07E012FFA2120F1207B3B3A9EA0FF0B5FC
+A210347EB315>I<2703F01FE013FF00FF90267FF80313C0913AE07C0703E03C07F3803E
+1C01F02803F7003F387F01F690381F300001FC02E07F495CA3495CB3A2486C496C487EB5
+3BC7FFFE3FFFF0A23C217EA041>I<3903F01FC000FFEB7FF09038F1E0F83907F3807C39
+03F6007E01FC133E153F5BA35BB3A2486CEB7F80B538C7FFFCA226217EA02B>I<EB07F0
+EB3FFE9038F80F803901E003C048486C7E48486C7E48C7127848147C001E143C003E143E
+A24880A300FC1580A8007C1500A2007E5C003E143EA26C5CA26C6C5B6C6C485A6C6C485A
+3900F80F80D93FFEC7FCEB07F021237EA126>I<3903F03F8000FFEBFFE09038F3C0F839
+07F7003CD803FC7F497F168049EB07C016E0150316F0A2150116F8A816F01503A216E015
+0716C06DEB0F80ED1F006D131E01F6137C9038F381F89038F1FFE0D9F07FC7FC91C8FCAB
+487EB512C0A225307EA02B>I<3803E07C00FF13FF9038E18F803907E31FC0EA03E613EC
+EC0F809038F8070091C7FCA35BB3487EB512E0A21A217FA01E>114
+D<EBFF06000713CE380F00FE001C133E48131E48130EA200F01306A37E6C90C7FCEA7F80
+13FC383FFFC06C7F6C13F86C7FC67FEB0FFF1300EC3F800040130F12C014077EA36C1400
+6C5B140E00FE5B38E7807838C1FFE038C07F8019237EA11E>I<1330A51370A313F0A212
+0112031207121FB512FEA23803F000B01403A81201EBF8061200140CEB7E1CEB1FF8EB07
+E0182F7FAD1E>I<D803F0133F00FFEB0FFFA20007EB007F000380B3A35DA212015D9038
+F801BF00000103138090397E073FFCEB1FFCD907F8130026227EA02B>I<B5EBFFF0A2D8
+0FF0EB3FC06C48EB0F00150E6C6C130CA26D131C00011418A26C6C5BA26D1370017E1360
+137F6D5BA290381F8180A214C3010F90C7FCA2EB07E6A214FE6D5AA26D5AA36D5AA21460
+24217E9F29>I<B53A1FFF81FFF0A23C0FF803FC003F806C486C48EB1F0000030100141E
+170C816C6C017C5BA26D017E1338000002FE1330A290267E01FF5B159F168090263F030F
+5BA216C0903A1F8607C180A202C613E390260FCC0390C7FCA2D907FC13F6ECF80116FE6D
+486C5AA36D481378A36D48133034217F9F37>I<B53801FFF8A23A07FC007F800003EC7E
+000001143800005C017E1360017F13E090383F81C090381F8380D90FC3C7FCEB07E614FE
+6D5A6D5A6D7E80805B9038039F809038071FC09038060FE0EB0C0790381C03F0496C7E01
+707FEB6000D801E0137E0003147FD80FF0EBFF8026FFFC0313FCA226207F9F29>I<3A7F
+FF807FF8A23A07F8001FE00003EC0F80ED070000011406A26C6C5BA26D131C017E1318A2
+6D5BA2EC8070011F1360ECC0E0010F5BA2903807E180A214F3010390C7FC14FBEB01FEA2
+6D5AA31478A21430A25CA214E05CA2495A1278D8FC03C8FCA21306130EEA701CEA7838EA
+1FF0EA0FC025307F9F29>I<003FB512F0A290380007E0003CEB0FC00038131F0030EB3F
+8000701400147E006013FE5C495A1303C6485A5C495A131F495A91C7FC017E133013FE48
+5A5B485A000714705B48481360001F14E0485AEB0003007E130FB6FCA21C207E9F22>I<
+001C1370003E13F8387F01FC00FF13FEA2007F13FC383E00F8001C1370170879B226>
+127 D E
%EndDVIPSBitmapFont
-%DVIPSBitmapFont: Fd cmti9 9 1
-/Fd 1 47 df<121C123E127F12FFA212FE127C12380808778718>46
+%DVIPSBitmapFont: Fc cmti9 9 1
+/Fc 1 47 df<121C123E127F12FFA212FE127C12380808778718>46
D E
%EndDVIPSBitmapFont
-%DVIPSBitmapFont: Fe cmtt9 9 63
-/Fe 63 127 df<123C127E12FFAF127EAE123C1200A7123C127E12FFA4127E123C082F71
+%DVIPSBitmapFont: Fd cmtt9 9 63
+/Fd 63 127 df<123C127E12FFAF127EAE123C1200A7123C127E12FFA4127E123C082F71
AE27>33 D<131FEB7FC0497E5A80EA03F1EBE1F8EA07E013C0A513C15C9039C3F1FF80D9
E3E113C03803E7E3EBEFC1D9FF811380EDF800EC01F0EA01FEEBFC0301F85B00031307D8
07FC5B120F381FFE0FD83FBE5BEB3F1FD87E1F90C7FC149F38FC0FBF14FE1307ECFC0201
C0000F130F381FFE1F393FFF7F80397FBFFF0038FE1FFE486C5A00F813F0387003C01A0A
7AAD27>126 D E
%EndDVIPSBitmapFont
+%DVIPSBitmapFont: Fe cmti10 10.95 9
+/Fe 9 118 df<120FEA1F80EA3FC0127F12FFA3EA7F801300123C0A0A77891C>46
+D<EC1FC0ECFFF0903803F038903807C00C90381F000E013E130749131F49133F0001147F
+485A49137E0007147C484813381500121F5B123FA248C8FCA412FEA65A1502007C140712
+7E150E003E141C15786C14F06CEB03E03907800F803903E07E003801FFF838003FC02029
+77A72A>99 D<167C4BB4FC923803C38092380781C0ED0F03ED1F0FA2ED3E1FA292387E0F
+80EE070093C7FC5DA54A5AA54A5AA30103B512F0825E90260007E0C7FCA44A5AA54A5AA5
+4AC8FCA5147EA55CA5495AA5495AA45C1307A25CA2130F001C5B127E91C9FCEAFE1F131E
+12FC485AEA70386C5AEA1FE0EA0F802A5383BF1C>102 D<14E0EB01F0EB03F8A214F014
+E0EB01C090C7FCAE13F8EA03FCEA070EEA0E0F001C138012181238EA301F1270A2126038
+E03F00A2137E12C012005BA3485AA3485AA2485AA21430380FC070A3381F80E0A214C013
+01A2EB03801400EA0F06130EEA07F8EA01F0153E78BC1C>105 D<D803E0137F3A07F003
+FFC03A0C380781E03A1C3C1E00F026383E387F5CD93FE07F00705BA25C4848C7FCA2137E
+A24848495A1200A34848495AA34B5A485AA24B5AA24848156092381F80E0A3484890383F
+01C0A21780ED3E03485AEE07001606ED1E0E48C75B6CEC0FF8000EEC03E02B2978A733>
+110 D<EC1FC0ECFFF8903803F07C903807C01E90381F000F013E148049EB07C05B120148
+4814E05B1207485A16F0121F5B123F16E048C7120FA400FEEC1FC0A3ED3F80A216004814
+7EA2007C5C007E5C4A5A003E13035D6C495A6C011FC7FC3807803E3803C0F86CB45A3800
+3F80242977A72E>I<EC7F80903801FFE0903807C0F090380F0038011E131C49130C017C
+130E0178133E01F8137EA20001147C15781510150013FEEBFFC014FC6C13FF6D13806D13
+C06D13E07F010013F0140F14071403A2121C003E1301127F00FEEB03E0A24814C0481307
+006014800070EB0F000030131E001C5B380F01F83807FFE0C690C7FC1F297AA725>115
+D<EB01C0EB03E014F0EB07E0A4EB0FC0A4EB1F80A4EB3F00A3007FB5FCB6FC7E38007E00
+A25BA4485AA4485AA4485AA4485AA4381F800C141CA21438EA3F0014301470146014E0EB
+01C0001F1380EB0300EA0F0EEA07FCEA01F0183A78B81E>I<13F8D803FC1438D8070E14
+7CD80E0F14FC001C7F121800384A5AEA301F1270A200604A5A38E03F00A2137E00C04A5A
+12005BA24B5A485AA34848495AA4484890383F01801603A392387E0700A315FE0003150E
+EC01BE00019038033E1C9038F0061E2600F81C5B90393FF80FF090390FE003E0292978A7
+31>I E
+%EndDVIPSBitmapFont
%DVIPSBitmapFont: Ff cmmi10 10.95 2
/Ff 2 80 df<49B592B512F082A290C76D913807FE00DA01BFED01F0705D039F6F5AA291
26031FF04A5A150F82150702066D4AC7FC1503A26F7E020C16068281834A017F5CA2707E
1307A514C0A3130F1480A4EB1F00A3133EA2133C137C1378A25BA2485AA2485A5B120790
C7FC120E5AA25A5A5A124014627C8226>I E
%EndDVIPSBitmapFont
-%DVIPSBitmapFont: Fl cmsl10 10.95 20
-/Fl 20 122 df<EC7FC0903803FFF890380F807E90381C001F01306D7E01786D7E13FC6D
+%DVIPSBitmapFont: Fl cmsl10 10.95 22
+/Fl 22 122 df<EC7FC0903803FFF890380F807E90381C001F01306D7E01786D7E13FC6D
800001140382A26C5A137890C7FC4B5AA3EC01FF147F903803FF0790391FF00FC0EB7F80
EBFE00EA03F8485A485A4848495A485A17C048C7FCA2153F00FEED0180157FA2007F14DF
9139019F03006CEB031F3A1F800E0F86260FE03C13FC3A03FFF007F83A007FC003E02A2A
D90FF0EBC0002C407ABE33>I<EC3FE0903801FFF8903807E07E90380F801F90393F000F
80017E14C0491307484814E0485A0007EC03F05B120F485AA2123F5BA2007F140790B6FC
16E048C9FCA97E168015017EED03006C7E000F14066C6C131C6C6C5B6C6C13E03900FC07
-C0D93FFFC7FCEB07F8242A7BA828>I<177C913907F803FE91393FFE0F8F9139FC0F9C1F
-903901F007F0903A03E003E01ED907C0EBF00C90260F80011300011F80133F14004980A3
-01FE495AA3017E5C15075E013E5C013F495A6D49C7FCEC803E903837C0FC903861FFF090
-38607F8001E0C9FC5B1201A47F7F6CB512F8EDFF806D14E06D8090B67E3A03E0000FFCD8
-0F80EB00FE48C8127E003E81123C007C815AA4163EA25E00785D007C4A5A6C4A5A6CEC0F
-C0D807C0013FC7FC3903F801FC39007FFFF0010F90C8FC303D7FA82D>103
-D<147814FCEB01FE130314FFEB07FE130314FCEB01F8EB00F01400ACEB07F03801FFE0A3
-EA001F130FA214C0A6EB1F80A6EB3F00A6137EA65BA5EA03FE387FFFE0A2B5FC183E7DBD
-19>105 D<147EEB3FFEA3130113005CA6495AA6495AA6494890B5FC17FE5D9238007FE0
+C0D93FFFC7FCEB07F8242A7BA828>I<ED0FE0ED7FF8EDF81C913803E03E913807C07E91
+380F80FF4A5A4A13FE143E027E137C4A1300A3495AA6495AA60007B512F8A3260007E0C7
+FCA3495AA6495AA649C8FCA6137EA65BA5EA03FE387FFFFCB5FCA228407DBF1C>I<177C
+913907F803FE91393FFE0F8F9139FC0F9C1F903901F007F0903A03E003E01ED907C0EBF0
+0C90260F80011300011F80133F14004980A301FE495AA3017E5C15075E013E5C013F495A
+6D49C7FCEC803E903837C0FC903861FFF09038607F8001E0C9FC5B1201A47F7F6CB512F8
+EDFF806D14E06D8090B67E3A03E0000FFCD80F80EB00FE48C8127E003E81123C007C815A
+A4163EA25E00785D007C4A5A6C4A5A6CEC0FC0D807C0013FC7FC3903F801FC39007FFFF0
+010F90C8FC303D7FA82D>I<147EEB3FFEA3130113005CA6495AA6495AA5ED0FF0903907
+E07FFCEDF03E9138E1801F9139E7000F8014EE02F814C0EB0FD814F05CA25CA2011FEC1F
+805CA549C7EA3F00A6017E147EA6495CA400011401486C497EB500F0B512F0A32C3F7CBE
+33>I<147814FCEB01FE130314FFEB07FE130314FCEB01F8EB00F01400ACEB07F03801FF
+E0A3EA001F130FA214C0A6EB1F80A6EB3F00A6137EA65BA5EA03FE387FFFE0A2B5FC183E
+7DBD19>I<147EEB3FFEA3130113005CA6495AA6495AA6494890B5FC17FE5D9238007FE0
EE3F00163C49485B16E04B5A4BC7FC1506151C90381F80305DEC81C0EC83E0EC87F0149F
90383F31F81461ECC0FCEC807C90383E007E153E49133F8182150F826F7E5B6F7EA26F7E
00014A7E486C497EB539E01FFFF017E05D303F7EBE30>107 D<147EEB1FFE133FA21301
484A141F5A92C8123F4849157F484915FF485E4A14074849021F13C0484BB5FCBAFCA47E
3C407CBF48>I E
%EndDVIPSBitmapFont
-%DVIPSBitmapFont: Fp cmtt10 10.95 85
-/Fp 85 127 df<121C127FA2EAFF80B2EA7F00B1123EC7FCA9121C127FA2EAFF80A3EA7F
+%DVIPSBitmapFont: Fp cmtt10 10.95 86
+/Fp 86 127 df<121C127FA2EAFF80B2EA7F00B1123EC7FCA9121C127FA2EAFF80A3EA7F
00A2121C09396DB830>33 D<003C131E00FEEB3F80A26C137FA248133FB3007E1400007C
7F003C131E191B75B830>I<903903800380496C487E496C487EA8011F131F02C05BA400
3FB612FE4881B81280A36C16006C5D3A003F803F80017F137F020090C7FCA9495B495B00
03A416F8A37E127E007F1407A26C6C130F6C6C131F6D137F390FF801FF6CB6FC15FD6C14
F9C614F36D13C390390FFE03F090C7FCA2150716E0150F16C0151F121E003FEC3F80486C
EB7F005D4A5A4A5AEB000F393FC03FF890B55A6C5C6C14806C91C7FC000113F838003FC0
-253A7BB830>I<EA0380EA0FE0EA1FF0EA3FF8A5EA1FF0EA0FE0EA0380C7FCB1EA0780EA
-0FE0EA1FF0123F13F8A4121F120F12071201120313F0A21207EA0FE0121FEA7FC0EAFF80
-13005A127C12380D3470A630>59 D<16E0ED01F0ED07F8150F153FEDFFF04A13E0020713
-C04A1300EC3FFEEC7FF8903801FFE0495B010F90C7FC495AEB7FF8495A000313C0485BD8
-1FFEC8FC485AEA7FF0485A138013E06C7EEA3FFC6C7E3807FF806C7FC613F06D7EEB1FFE
-6D7E010313C06D7F9038007FF8EC3FFEEC0FFF6E13C0020113E06E13F0ED3FF8150F1507
-ED01F0ED00E0252F7BB230>I<003FB612FE4881B81280A36C16006C5DCBFCA7003FB612
-FE4881B81280A36C16006C5D29157DA530>I<1238127CB4FC7F13E0EA7FF86C7E6CB4FC
-00077F6C13E0C67FEB3FFC6D7E903807FF806D7F010013F06E7EEC1FFE6E7E020313C06E
-13E09138007FF0ED3FF8150F153FED7FF0913801FFE04A13C0020F13004A5AEC7FF84A5A
-010313C0495BD91FFEC7FC495AEBFFF000035B481380001F90C8FCEA3FFC485AEAFFE013
-8090C9FC127C1238252F7BB230>I<EC1FE0ECFFF8010313FE010F7F4914804914C09039
-7FE01FE09038FF800F3A01FE0007F0484813039039F801F9F83907E007FF000F131F4948
-13FCEA1F80495A48EBFF0F003EEBFC03903901F801FE007EEBF000EA7C034A137EA2EAFC
-0712F84A133EA86E137E12FCD87C03147CA26E13FCD87E0114F8003EEBF801903900FC03
-F0003FEBFF0F6C90387FFFE06D6C13C0EA0FC06D6C13800007903807FE003903F801F86D
-C7127C6C6C14FE3900FF800390387FE00F6DB512FC6D14F86D14E0010314C00100EBFE00
-EC1FF0273A7CB830>64 D<EC3F804A7EA44A7EA214FBA201017FA214F1A201037FA414E0
-01077FA490380FC07EA4011F137F4A7EA449486C7EA4498091B5FCA490B67EA29038FC00
-07A2000181491303A3000381491301A2D87FFF90381FFFC06E5AB515E0A26C16C04A7E2B
-397EB830>I<007FB512F0B612FE6F7E82826C813A03F0001FF815076F7E150115008216
-7EA516FE5E15015E15074B5AED7FE090B65A5E4BC7FC6F7E16E0829039F0000FF8ED03FC
-ED00FE167E167F82A2EE1F80A6163F17005EA2ED01FE1503ED0FFC007FB65AB7FC16E05E
-93C7FC6C14FC29387EB730>I<91383F801C903901FFF03E0107EBFC7E011F13FE4913FF
-4914FE9038FFC07F48EB001F4848130F49130748481303484813015B48481300A2485A16
-7E90C8FC5A127E163C160012FEA25AAA7EA2127EA2163C007F157E7E7FA26C7E16FE6C6C
-14FC6D13016C6C14F86C6C13036DEB07F06C6C130F6C9038C03FE06DB512C06D14806D14
-00010713FC010113F09038003F80273A7CB830>I<007FB512E015FCB67E6F7E6C81823A
-03F0007FF0ED1FF815076F7E6F7E1500167FA2EE3F80A2161F17C0A2160FA317E01607AB
-160F17C0A3161F1780163FA2EE7F00A216FE15014B5A1507ED1FF8ED7FF0007FB65A5EB7
-5A93C7FC6C14FC15E02B387FB730>I<007FB612FEB8FCA47ED803F0C7123FA8161E93C7
-FCA4157815FCA490B5FCA6EBF000A4157892C8FCA5EE0780EE0FC0A9007FB7FCB8FCA46C
-16802A387DB730>I<007FB7128017C0B8FCA27EA2D801F8C7120FA8EE078093C7FCA515
-1E153FA490B6FCA69038F8003FA4151E92C8FCAE387FFFF080B5FCA27E5C2A387EB730>
-I<027F1370903903FFC0F8010F13F1013F13FD4913FF90B6FC4813C0EC003FD803FC131F
-4848130F5B484813075B001F14035B123F90C71201A25A127E6F5A93C7FC12FE5AA992B5
-FC17805C7E007E7F1700ED01F8127F6C1403A27F121F6D1307120F7F6C6C130F6D131F6C
-6C133F6CB4137FEC80FF6C90B5FC6D13FD6D13F9010F13F10103EBC0F0D9007EC8FC293A
-7DB830>I<3B7FFF803FFFC0B56C4813E0A46C496C13C03B03F00001F800B290B6FCA690
-38F00001B3A23B7FFF803FFFC0B56C4813E0A46C496C13C02B387EB730>I<007FB512FE
-B7FCA46C14FE390007E000B3B3A8007FB512FEB7FCA46C14FE203878B730>I<387FFFF8
-B5FC80A25C7ED801F8C9FCB3B0160FEE1F80A9007FB7FCB8FCA46C160029387DB730>76
-D<D87FF0EC7FF06D14FF00FF16F86D5B007F16F0A2D807DE903803DF00A301DF130701CF
-149FA2EC800FA201C7141FECC01FA201C3131EECE03EA201C1133CECF07CA39038C0F8F8
-A3EC78F0147DA2EC3DE0143FA2EC1FC0A2EC0F80EC070091C7FCADD87FFC903801FFF0A2
-486C4913F8A26C486D13F0A22D387FB730>I<D87FF890381FFFC0486C4913E0A27FA26C
-6C6D13C0D803EF903800F800A28013E7A28013E380A213E180A213E080A2147CA380A214
-1E141FA2801580A2EC07C0A3EC03E0A2140115F0A2140015F8A21578157C153CA2153E15
-1EA2D87FFF131FB5EA800FA21507A26C496C5A2B387EB730>I<90383FFFE048B512FC00
-0714FF4815804815C04815E09038F0007F01C0131F4848EB0FF090C71207A2007E1403A3
-00FE15F8481401B3A96C1403A2007E15F0A3007F1407A26D130F6C6CEB1FE001F813FF90
-B6FC6C15C06C15806C1500000114FCD8003F13E0253A7BB830>I<007FB512E0B612FC15
-FF16C016E06C15F03903F0003FED0FF8ED03FC1501ED00FEA2167E167F163FA6167F167E
-16FEA2ED01FC1503ED0FF8ED3FF090B6FC16E016C0160015FC15E001F0C8FCB0387FFF80
-B57EA46C5B28387DB730>I<007FB5FCB612E015F815FE816C812603F0017F6E6C7E151F
-6F7E15071503821501A515035E1507150F4B5A157F4A485A90B65A93C7FC5D5D8181D9F0
-017FEC007FED1FC0150F821507A917F0EEE1F8A316F13A7FFF8003F3B500C0EBFFF0A26F
-13E0816C49EB7FC0C9EA1F002D397EB730>82 D<90390FF801C090397FFF03E048B512C3
-4814F74814FF5A381FF007383FE001903880007F48C7123F007E141F12FE48140FA21507
-A46CEC03C0007E91C7FC127F6C7E13E0EA1FF86CB47E6C13F86CEBFF806C14F0D8003F13
-FC01077F9038007FFF020713809138007FC0153FED0FE0ED07F01503A216F80078140112
-FCA56C140316F06C14077F6DEB0FE001F0EB3FC001FE13FF90B61280160000FD5CD8F87F
-13F8011F13E0D870011380253A7BB830>I<007FB712C0B812E0A53AFC001F8007A80078
-ED03C0C791C7FCB3B1010FB5FC4980A46D91C7FC2B387EB730>I<3B7FFF800FFFF0B56C
-4813F8A46C496C13F0D803F0C7EA7E00B3B16D14FE00015DA26D1301A26C6C495AA2017F
-495A90393FC01FE0ECF07F6DB55A6D5C6D91C7FC6D5B010013F8EC1FC02D397FB730>I<
-D87FFE90380FFFC0B54913E0A46C486D13C0D807E0903800FC00A26D130100035DA36D13
-0300015DA36D130700005DA36D130F017E5CA3017F131F6D5CA3EC803F011F91C7FCA490
-380FC07EA46D6C5AA4903803F1F8A401015B14FBA301005B14FFA36E5AA36E5A2B397EB7
-30>I<D87FF8ECFFF0486C4913F8A46C486D13F0001FC8EA07C06C6CEC0F80A76D141F00
-071600A73A03E01FC03EEC3FE0A4EC7DF0A30001153C01F0147CECF8F8A59038F1F07C00
-001578A201F914F8A2ECE03CA201FB133E017B5CECC01EA4017F131FEC800FA2013F5CA2
-EC0007011E6D5A2D397FB730>I<3A3FFF807FFE92B5FC487FA26C5B6F5A3A00FC001FC0
-6D5C017E133F017F91C7FC6D5BEC807E011F13FE6E5AEB0FE15DEB07F35DEB03FF5D7F6D
-5BA26E5AA26EC8FCA24A7EA24A7EA2497FA2903803FBF014F3903807F1F814E190380FE0
-FC14C0011F137EEC807F013F7F02007F49131F017E8001FE130F49800001140749801503
-D87FFF90381FFFC05DB5008014E0A26C010014C0812B387EB730>I<003FB612FC4815FE
-A416FC007EC71201ED03F8ED07F0A2ED0FE0ED1FC0A2ED3F80003CEC7F00C8FC15FE4A5A
-5D14034A5A4A5AA24A5A4A5AA24AC7FC14FEA2495A495AA2495A495AA2495A495A91C8FC
-5B13FE4848143C167E485A485AA2485A485AA2485A48C8FC90B612FEB7FCA46C15FC2738
-7CB730>90 D<007FB5FCB61280A4150000FCC8FCB3B3B3A5B6FC1580A46C140019476DBE
-30>I<1238127C12FEA27E7E7F123F7F121F7F120FA27F12077F12037F12017F12007F7F
-80133F80131FA280130F801307801303801301801300808081143F81141FA281140F8114
-0781140381140181140081811680153FA216C0151F16E0150F16F0150716F81503A2ED01
-F0ED00E025477BBE30>I<007FB5FCB61280A47EC7121FB3B3B3A5007FB5FCB6FCA46C14
-0019477DBE30>I<1307EB1FC0497EEBFFF8000313FE000FEBFF80D81FFD13C0D87FF813
-F039FFE03FF8EB800FEB0007007CEB01F00070EB00701D0D77B730>I<003FB612E04815
-F0B712F8A36C15F06C15E025077B7D30>I<EB3FF03801FFFE0007EBFFC0488048804880
-9038C00FFCEC03FE1400157F6C487F0006C77FC8121FA4EC1FFF0103B5FC133F90B6FC12
-03000FEBFC1F381FFE00EA3FF013C048C7FC12FE5AA4153F7E007F14FF6D5A263FE00FEB
-FF806CB712C0A26C14EF6C14870001D9FC00138026003FE090C7FC2A2A7BA830>97
-D<EA7FF87F12FFA2127FA21200AAEC03F8EC1FFF027F13C091B57E90B612F8A29138F80F
-FC9138E003FE4AC67E4A7F91C7EA3F8049141F17C049140FA217E0A21607A7160FA26D15
-C0161FA26DEC3F80167F6EEBFF006E485AECE0039138F80FFC91B55A01FD5C01FC5C6E13
-809026781FFEC7FC90380007F02B397FB730>I<49B47E010F13F0013F13FC497F48B6FC
-4815803907FE007F13F8485A485A49EB3F004848130C90C9FC5A127EA212FE5AA87E127E
-A2127FED07806C6CEB0FC07F6C6C131F6C6C148001FC133F6CB4EBFF006C90B5FC6C5C6C
-5C013F13F0010F13C0D901FEC7FC222A79A830>I<913803FFC0825CA280A2EC0007AAEB
-01FC90380FFF87013F13E790B512F74814FF5A3807FE03380FF80049137F4848133F4848
-131F49130F48C7FC1507127E12FEA25AA77E150F127EA2007F141F7E6D133F6C6C137F6D
-13FF380FF8012607FE07EBFFC06CB7FC6C02F713E06C14E76D01C713C0011F1303D903F8
-C8FC2B397DB730>I<EB01FE90380FFFC0013F13F090B57E488048803907FE01FFD9F800
-13804848133F4848EB1FC049130F484814E090C712075A127E16F000FE14035AB7FCA516
-E000FCC9FC7E127E127FA26C6CEB01E06DEB03F0121F01F013076C6CEB0FE0D807FE131F
-3A03FF807FC06C90B512806C15006D5B011F5B010713F0010090C7FC242A7BA830>I<15
-7F913803FFE0020F13F0143F4A13F8A2ECFF07EB01FE9138FC03F0903903F800C04A1300
-A8007FB612C0B712E0A46C15C0260003F0C7FCB3A9003FB6FCA2481580A26C1500A22539
-7DB830>I<D903FC137F903A0FFF03FFC0013F13CF90B712E05A5AD9FE07EB07C03B07F8
-01FE0380D9F00090C7FC4848137F497F001F8149131FA66D133F000F92C7FC6D5B6C6C13
-FEEBF8013903FE07FC90B55A5A5D4814C0018F90C8FCEB83FC0180C9FCA27F12077F6CB5
-12F015FF4815E0488148813A3FC0000FFC49EB00FE007EC8127F007C8100FC8117804815
-0FA46C151F007EED3F00007F5D6C6C14FE01E01303D81FFEEB3FFC6CB65A6C5D000115C0
-6C6C91C7FC011F13FC010113C02B3E7DA730>I<EA7FF87F12FFA2127FA21200AAEC03F8
-EC1FFF027F7F91B57E01FD8090B6FC9138F80FF0ECE0074A6C7E1480EC0001A25BA25BB3
-A23B7FFFF83FFFF05DB500FC14F8A26C01F814F0812D387FB730>I<EB01C0EB07F0A249
-7EA36D5AA2EB01C090C9FCA9383FFFF0487FA47EEA0001B3A9007FB6128016C0B7FCA27E
-1680223979B830>I<EC01C0EC07F0A2EC0FF8A3EC07F0A2EC01C091C7FCA990387FFFF0
-90B512F8A47FEB0001B3B3A5140315F0007E130715E0B4130FEC1FC0147F90B512806C14
-005C6C5B000F13F0000113801D4E7CB830>I<EA7FF0487EA4127F1200AB0203B512805C
-17C0A21780809139001FC0004B5A03FFC7FC4A5A4A5A4A5AEC0FE04A5A4A5A4AC8FC5C01
-F97F01FB7F90B57E14E7ECC3F0EC81F8EC00FC5B49137E497F6F7EA26F7E6F7E6F7EA23B
-7FFFF01FFFE0B56C5A17F0A217E06C497E2C387EB730>I<387FFFF0B57EA47EEA0001B3
-B3A8007FB612E0B712F0A46C15E024387AB730>I<903901F001F03A7F8FFC0FFC3AFFDF
-FE1FFE90B5487E92B51280A23A7FFE1FFE1F3B07FC0FFC0FC001F813F89039F007F00701
-E013E0A401C013C0B3A23B7FFC1FFC1FFC3BFFFE3FFE3FFEA43B7FFC1FFC1FFC2F2880A7
-30>I<EC03F8397FF81FFFD9FC7F7F00FF90B57E01FD806CB6FC9138F80FF0C6EBE0074A
-6C7E1480EC0001A25BA25BB3A23B7FFFF83FFFF05DB500FC14F8A26C01F814F0812D287F
-A730>I<EB01FC90380FFF80013F13E090B512F8488048803907FE03FF260FF800138049
-137FD81FC0EB1FC0A24848EB0FE090C712074815F0007E1403A200FE15F8481401A86C14
-03007E15F0A2007F1407A26C6CEB0FE06D131F6C6CEB3FC06D137F6C6CEBFF802607FE03
-13006CB55A6C5C6C5C013F13E0010F1380D903FEC7FC252A7BA830>I<EC03F8397FF81F
-FFD9FC7F13C000FF90B57E90B612F87E9138F80FFCC69038E003FE4AC67E4A7F91C7EA3F
-8049141F17C049140FA217E0A21607A7160FA26D15C0161FA26DEC3F80167F6EEBFF006E
-485AECE0039138F80FFC91B55A01FD5C01FC5C6E1380DA1FFEC7FCEC07F091C9FCAD387F
-FFF8A2B57EA26C5BA22B3C7FA730>I<903901FC01E090390FFF83F0013F13E390B512F3
-4814FB4814FF481301380FF80049133F4848131F4848130F5B48C71207A2127E150312FE
-5AA77E1507127E127F150F6C7E151F6C6C133F6D137FD80FF813FF3807FE036CB6FC6C14
-FB6C14F36D13C3011F1303EB03F890C7FCAD4AB512E04A14F0A46E14E02C3C7CA730>I<
-ED0FF0D87FFFEB7FFEB50081B5FC1487028F1480149F6C9038BFF07F39001FFFC0923800
-3F004A130C4A90C7FC5C5C5CA25CA45CAF007FB512FCB6FC81A25D7E29287DA730>I<90
-381FFC0E90B5129F000714FF5A5A5A387FE007EB800100FEC77E5A81A37E007F141E01C0
-90C7FCEA3FF8381FFFE06C13FF000314C0C614F0010F13FC9038007FFEEC03FFEC007F00
-78EC3F8000FC141FED0FC0A27EA27E151F01C0EB3F806D137F9039F803FF0090B6FC5D5D
-00F814F0013F13C0267007FEC7FC222A79A830>I<EB0780497EAA007FB612E0B712F0A4
-6C15E026000FC0C7FCB2167816FCA5ECE001ED03F8903807F0079138FC0FF06DB512E07F
-16C06D1400EC3FFCEC07F026337EB130>I<D87FF8EBFFF06D8000FF5BA2007F7FA20000
-1401B3A41503A21507150F6D131F903A7F807FFFF091B6FC6D15F8A26D01F913F0010713
-E0010090C8FC2D287FA630>I<3B7FFF803FFFC0B56C4813E0A46C496C13C03B01F00001
-F000A26D130300005DA2017C495AA36D495AA36D49C7FCA390380F803EA36D6C5AA2ECE0
-FC01035BA214F101015BA214FB01005BA214FF6E5AA3021FC8FC2B277EA630>I<3B7FFF
-800FFFF06E5AB515F8A26C16F04A7ED807C0C7EA1F00A26D5C0003153EA56D147E000115
-7CEC0FC0EC1FE0EC3FF0A32600F87F5BEC7DF8147CA214FC01786D5AA290387CF87C137D
-157D14F0013DEB3DE0013F133FA2ECE01FA2011F5C6D486C5A2D277FA630>I<263FFFC0
-B5FC48168014E1A214C06C16003A007E001F806D49C7FCEB1F80157E6D6C5A6D6C5AEB03
-F1903801F3F0ECFFE06D5B147F6E5A92C8FCA2814A7E4A7EEB01F3ECF1F0903803E0F849
-487E010F137C49487EEC003F496D7E017E6D7E4913073B7FFF803FFF806E4813C0B5FCA2
-7E4A6C13802A277EA630>I<3B7FFF803FFFC06E4813E0B5FCA27E4A6C13C03B01F80001
-F000120015036D5C137C4B5A7FA2013F495A7FA26E48C7FC130F14C00107133EA214E001
-035BA2EB01F05DA2EB00F85D1479147D5D143FA26E5AA36E5AA2141F92C8FCA25C143EA2
-147E147C120F486C5AEA3FC113C3EB07F0495A13FF6C5B5C6C90C9FCEA07FCEA01F02B3C
-7EA630>I<003FB612FC4815FEA416FC007EC7EA07F8ED0FF0ED1FE0ED3FC0ED7F80003C
-ECFF00C7485AEC07FC4A5A4A5A4A5A4A5A4A5A4990C7FC495A495A495A495A495A495A49
-C7121E4848143F485A485A485A485A485A48B7FCB8FCA46C15FE28277DA630>I<ED1FF0
-EDFFF814075C143F16F091387FE00092C7FC14FE5CB3A21301495A130F383FFFF0485BB5
-5A91C8FC14C06C7F6C7F38000FF813036D7E1300B3A280147F15E091383FFFF016F8140F
-801400ED1FF025477BBE30>I<1238127C12FEB3B3B3AD127C123807476CBE30>I<EA7FC0
-EAFFFCEBFF808014F07E38001FF813036D7E1300B3A280147F15C091383FFFE06E13F06E
-13F81403140F4A13F04A13E091387FC00092C7FC14FE5CB3A21301495A131F387FFFF0B5
-FC14C05C01FCC8FCEA7FC025477BBE30>I<01781338D803FE137C3907FF80FE001F13C1
-48EBE7FC4813FF01CF13F8D8FF0713F0486C13C0D87C0013800038EB3C001F0B78B730>
-I E
+253A7BB830>I<120EEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA0E00C7FCB1120EEA3F80
+EA7FC0EAFFE0A5EA7FC0EA3F80EA0E000B276EA630>I<EA0380EA0FE0EA1FF0EA3FF8A5
+EA1FF0EA0FE0EA0380C7FCB1EA0780EA0FE0EA1FF0123F13F8A4121F120F120712011203
+13F0A21207EA0FE0121FEA7FC0EAFF8013005A127C12380D3470A630>I<16E0ED01F0ED
+07F8150F153FEDFFF04A13E0020713C04A1300EC3FFEEC7FF8903801FFE0495B010F90C7
+FC495AEB7FF8495A000313C0485BD81FFEC8FC485AEA7FF0485A138013E06C7EEA3FFC6C
+7E3807FF806C7FC613F06D7EEB1FFE6D7E010313C06D7F9038007FF8EC3FFEEC0FFF6E13
+C0020113E06E13F0ED3FF8150F1507ED01F0ED00E0252F7BB230>I<003FB612FE4881B8
+1280A36C16006C5DCBFCA7003FB612FE4881B81280A36C16006C5D29157DA530>I<1238
+127CB4FC7F13E0EA7FF86C7E6CB4FC00077F6C13E0C67FEB3FFC6D7E903807FF806D7F01
+0013F06E7EEC1FFE6E7E020313C06E13E09138007FF0ED3FF8150F153FED7FF0913801FF
+E04A13C0020F13004A5AEC7FF84A5A010313C0495BD91FFEC7FC495AEBFFF000035B4813
+80001F90C8FCEA3FFC485AEAFFE0138090C9FC127C1238252F7BB230>I<EC1FE0ECFFF8
+010313FE010F7F4914804914C090397FE01FE09038FF800F3A01FE0007F0484813039039
+F801F9F83907E007FF000F131F494813FCEA1F80495A48EBFF0F003EEBFC03903901F801
+FE007EEBF000EA7C034A137EA2EAFC0712F84A133EA86E137E12FCD87C03147CA26E13FC
+D87E0114F8003EEBF801903900FC03F0003FEBFF0F6C90387FFFE06D6C13C0EA0FC06D6C
+13800007903807FE003903F801F86DC7127C6C6C14FE3900FF800390387FE00F6DB512FC
+6D14F86D14E0010314C00100EBFE00EC1FF0273A7CB830>64 D<EC3F804A7EA44A7EA214
+FBA201017FA214F1A201037FA414E001077FA490380FC07EA4011F137F4A7EA449486C7E
+A4498091B5FCA490B67EA29038FC0007A2000181491303A3000381491301A2D87FFF9038
+1FFFC06E5AB515E0A26C16C04A7E2B397EB830>I<007FB512F0B612FE6F7E82826C813A
+03F0001FF815076F7E1501150082167EA516FE5E15015E15074B5AED7FE090B65A5E4BC7
+FC6F7E16E0829039F0000FF8ED03FCED00FE167E167F82A2EE1F80A6163F17005EA2ED01
+FE1503ED0FFC007FB65AB7FC16E05E93C7FC6C14FC29387EB730>I<91383F801C903901
+FFF03E0107EBFC7E011F13FE4913FF4914FE9038FFC07F48EB001F4848130F4913074848
+1303484813015B48481300A2485A167E90C8FC5A127E163C160012FEA25AAA7EA2127EA2
+163C007F157E7E7FA26C7E16FE6C6C14FC6D13016C6C14F86C6C13036DEB07F06C6C130F
+6C9038C03FE06DB512C06D14806D1400010713FC010113F09038003F80273A7CB830>I<
+007FB512E015FCB67E6F7E6C81823A03F0007FF0ED1FF815076F7E6F7E1500167FA2EE3F
+80A2161F17C0A2160FA317E01607AB160F17C0A3161F1780163FA2EE7F00A216FE15014B
+5A1507ED1FF8ED7FF0007FB65A5EB75A93C7FC6C14FC15E02B387FB730>I<007FB612FE
+B8FCA47ED803F0C7123FA8161E93C7FCA4157815FCA490B5FCA6EBF000A4157892C8FCA5
+EE0780EE0FC0A9007FB7FCB8FCA46C16802A387DB730>I<007FB7128017C0B8FCA27EA2
+D801F8C7120FA8EE078093C7FCA5151E153FA490B6FCA69038F8003FA4151E92C8FCAE38
+7FFFF080B5FCA27E5C2A387EB730>I<027F1370903903FFC0F8010F13F1013F13FD4913
+FF90B6FC4813C0EC003FD803FC131F4848130F5B484813075B001F14035B123F90C71201
+A25A127E6F5A93C7FC12FE5AA992B5FC17805C7E007E7F1700ED01F8127F6C1403A27F12
+1F6D1307120F7F6C6C130F6D131F6C6C133F6CB4137FEC80FF6C90B5FC6D13FD6D13F901
+0F13F10103EBC0F0D9007EC8FC293A7DB830>I<3B7FFF803FFFC0B56C4813E0A46C496C
+13C03B03F00001F800B290B6FCA69038F00001B3A23B7FFF803FFFC0B56C4813E0A46C49
+6C13C02B387EB730>I<007FB512FEB7FCA46C14FE390007E000B3B3A8007FB512FEB7FC
+A46C14FE203878B730>I<387FFFF8B5FC80A25C7ED801F8C9FCB3B0160FEE1F80A9007F
+B7FCB8FCA46C160029387DB730>76 D<D87FF0EC7FF06D14FF00FF16F86D5B007F16F0A2
+D807DE903803DF00A301DF130701CF149FA2EC800FA201C7141FECC01FA201C3131EECE0
+3EA201C1133CECF07CA39038C0F8F8A3EC78F0147DA2EC3DE0143FA2EC1FC0A2EC0F80EC
+070091C7FCADD87FFC903801FFF0A2486C4913F8A26C486D13F0A22D387FB730>I<D87F
+F890381FFFC0486C4913E0A27FA26C6C6D13C0D803EF903800F800A28013E7A28013E380
+A213E180A213E080A2147CA380A2141E141FA2801580A2EC07C0A3EC03E0A2140115F0A2
+140015F8A21578157C153CA2153E151EA2D87FFF131FB5EA800FA21507A26C496C5A2B38
+7EB730>I<90383FFFE048B512FC000714FF4815804815C04815E09038F0007F01C0131F
+4848EB0FF090C71207A2007E1403A300FE15F8481401B3A96C1403A2007E15F0A3007F14
+07A26D130F6C6CEB1FE001F813FF90B6FC6C15C06C15806C1500000114FCD8003F13E025
+3A7BB830>I<007FB512E0B612FC15FF16C016E06C15F03903F0003FED0FF8ED03FC1501
+ED00FEA2167E167F163FA6167F167E16FEA2ED01FC1503ED0FF8ED3FF090B6FC16E016C0
+160015FC15E001F0C8FCB0387FFF80B57EA46C5B28387DB730>I<007FB5FCB612E015F8
+15FE816C812603F0017F6E6C7E151F6F7E15071503821501A515035E1507150F4B5A157F
+4A485A90B65A93C7FC5D5D8181D9F0017FEC007FED1FC0150F821507A917F0EEE1F8A316
+F13A7FFF8003F3B500C0EBFFF0A26F13E0816C49EB7FC0C9EA1F002D397EB730>82
+D<90390FF801C090397FFF03E048B512C34814F74814FF5A381FF007383FE00190388000
+7F48C7123F007E141F12FE48140FA21507A46CEC03C0007E91C7FC127F6C7E13E0EA1FF8
+6CB47E6C13F86CEBFF806C14F0D8003F13FC01077F9038007FFF020713809138007FC015
+3FED0FE0ED07F01503A216F80078140112FCA56C140316F06C14077F6DEB0FE001F0EB3F
+C001FE13FF90B61280160000FD5CD8F87F13F8011F13E0D870011380253A7BB830>I<00
+7FB712C0B812E0A53AFC001F8007A80078ED03C0C791C7FCB3B1010FB5FC4980A46D91C7
+FC2B387EB730>I<3B7FFF800FFFF0B56C4813F8A46C496C13F0D803F0C7EA7E00B3B16D
+14FE00015DA26D1301A26C6C495AA2017F495A90393FC01FE0ECF07F6DB55A6D5C6D91C7
+FC6D5B010013F8EC1FC02D397FB730>I<D87FFE90380FFFC0B54913E0A46C486D13C0D8
+07E0903800FC00A26D130100035DA36D130300015DA36D130700005DA36D130F017E5CA3
+017F131F6D5CA3EC803F011F91C7FCA490380FC07EA46D6C5AA4903803F1F8A401015B14
+FBA301005B14FFA36E5AA36E5A2B397EB730>I<D87FF8ECFFF0486C4913F8A46C486D13
+F0001FC8EA07C06C6CEC0F80A76D141F00071600A73A03E01FC03EEC3FE0A4EC7DF0A300
+01153C01F0147CECF8F8A59038F1F07C00001578A201F914F8A2ECE03CA201FB133E017B
+5CECC01EA4017F131FEC800FA2013F5CA2EC0007011E6D5A2D397FB730>I<3A3FFF807F
+FE92B5FC487FA26C5B6F5A3A00FC001FC06D5C017E133F017F91C7FC6D5BEC807E011F13
+FE6E5AEB0FE15DEB07F35DEB03FF5D7F6D5BA26E5AA26EC8FCA24A7EA24A7EA2497FA290
+3803FBF014F3903807F1F814E190380FE0FC14C0011F137EEC807F013F7F02007F49131F
+017E8001FE130F49800001140749801503D87FFF90381FFFC05DB5008014E0A26C010014
+C0812B387EB730>I<003FB612FC4815FEA416FC007EC71201ED03F8ED07F0A2ED0FE0ED
+1FC0A2ED3F80003CEC7F00C8FC15FE4A5A5D14034A5A4A5AA24A5A4A5AA24AC7FC14FEA2
+495A495AA2495A495AA2495A495A91C8FC5B13FE4848143C167E485A485AA2485A485AA2
+485A48C8FC90B612FEB7FCA46C15FC27387CB730>90 D<007FB5FCB61280A4150000FCC8
+FCB3B3B3A5B6FC1580A46C140019476DBE30>I<1238127C12FEA27E7E7F123F7F121F7F
+120FA27F12077F12037F12017F12007F7F80133F80131FA280130F801307801303801301
+801300808081143F81141FA281140F81140781140381140181140081811680153FA216C0
+151F16E0150F16F0150716F81503A2ED01F0ED00E025477BBE30>I<007FB5FCB61280A4
+7EC7121FB3B3B3A5007FB5FCB6FCA46C140019477DBE30>I<1307EB1FC0497EEBFFF800
+0313FE000FEBFF80D81FFD13C0D87FF813F039FFE03FF8EB800FEB0007007CEB01F00070
+EB00701D0D77B730>I<003FB612E04815F0B712F8A36C15F06C15E025077B7D30>I<EB3F
+F03801FFFE0007EBFFC04880488048809038C00FFCEC03FE1400157F6C487F0006C77FC8
+121FA4EC1FFF0103B5FC133F90B6FC1203000FEBFC1F381FFE00EA3FF013C048C7FC12FE
+5AA4153F7E007F14FF6D5A263FE00FEBFF806CB712C0A26C14EF6C14870001D9FC001380
+26003FE090C7FC2A2A7BA830>97 D<EA7FF87F12FFA2127FA21200AAEC03F8EC1FFF027F
+13C091B57E90B612F8A29138F80FFC9138E003FE4AC67E4A7F91C7EA3F8049141F17C049
+140FA217E0A21607A7160FA26D15C0161FA26DEC3F80167F6EEBFF006E485AECE0039138
+F80FFC91B55A01FD5C01FC5C6E13809026781FFEC7FC90380007F02B397FB730>I<49B4
+7E010F13F0013F13FC497F48B6FC4815803907FE007F13F8485A485A49EB3F004848130C
+90C9FC5A127EA212FE5AA87E127EA2127FED07806C6CEB0FC07F6C6C131F6C6C148001FC
+133F6CB4EBFF006C90B5FC6C5C6C5C013F13F0010F13C0D901FEC7FC222A79A830>I<91
+3803FFC0825CA280A2EC0007AAEB01FC90380FFF87013F13E790B512F74814FF5A3807FE
+03380FF80049137F4848133F4848131F49130F48C7FC1507127E12FEA25AA77E150F127E
+A2007F141F7E6D133F6C6C137F6D13FF380FF8012607FE07EBFFC06CB7FC6C02F713E06C
+14E76D01C713C0011F1303D903F8C8FC2B397DB730>I<EB01FE90380FFFC0013F13F090
+B57E488048803907FE01FFD9F80013804848133F4848EB1FC049130F484814E090C71207
+5A127E16F000FE14035AB7FCA516E000FCC9FC7E127E127FA26C6CEB01E06DEB03F0121F
+01F013076C6CEB0FE0D807FE131F3A03FF807FC06C90B512806C15006D5B011F5B010713
+F0010090C7FC242A7BA830>I<157F913803FFE0020F13F0143F4A13F8A2ECFF07EB01FE
+9138FC03F0903903F800C04A1300A8007FB612C0B712E0A46C15C0260003F0C7FCB3A900
+3FB6FCA2481580A26C1500A225397DB830>I<D903FC137F903A0FFF03FFC0013F13CF90
+B712E05A5AD9FE07EB07C03B07F801FE0380D9F00090C7FC4848137F497F001F8149131F
+A66D133F000F92C7FC6D5B6C6C13FEEBF8013903FE07FC90B55A5A5D4814C0018F90C8FC
+EB83FC0180C9FCA27F12077F6CB512F015FF4815E0488148813A3FC0000FFC49EB00FE00
+7EC8127F007C8100FC81178048150FA46C151F007EED3F00007F5D6C6C14FE01E01303D8
+1FFEEB3FFC6CB65A6C5D000115C06C6C91C7FC011F13FC010113C02B3E7DA730>I<EA7F
+F87F12FFA2127FA21200AAEC03F8EC1FFF027F7F91B57E01FD8090B6FC9138F80FF0ECE0
+074A6C7E1480EC0001A25BA25BB3A23B7FFFF83FFFF05DB500FC14F8A26C01F814F0812D
+387FB730>I<EB01C0EB07F0A2497EA36D5AA2EB01C090C9FCA9383FFFF0487FA47EEA00
+01B3A9007FB6128016C0B7FCA27E1680223979B830>I<EC01C0EC07F0A2EC0FF8A3EC07
+F0A2EC01C091C7FCA990387FFFF090B512F8A47FEB0001B3B3A5140315F0007E130715E0
+B4130FEC1FC0147F90B512806C14005C6C5B000F13F0000113801D4E7CB830>I<EA7FF0
+487EA4127F1200AB0203B512805C17C0A21780809139001FC0004B5A03FFC7FC4A5A4A5A
+4A5AEC0FE04A5A4A5A4AC8FC5C01F97F01FB7F90B57E14E7ECC3F0EC81F8EC00FC5B4913
+7E497F6F7EA26F7E6F7E6F7EA23B7FFFF01FFFE0B56C5A17F0A217E06C497E2C387EB730
+>I<387FFFF0B57EA47EEA0001B3B3A8007FB612E0B712F0A46C15E024387AB730>I<9039
+01F001F03A7F8FFC0FFC3AFFDFFE1FFE90B5487E92B51280A23A7FFE1FFE1F3B07FC0FFC
+0FC001F813F89039F007F00701E013E0A401C013C0B3A23B7FFC1FFC1FFC3BFFFE3FFE3F
+FEA43B7FFC1FFC1FFC2F2880A730>I<EC03F8397FF81FFFD9FC7F7F00FF90B57E01FD80
+6CB6FC9138F80FF0C6EBE0074A6C7E1480EC0001A25BA25BB3A23B7FFFF83FFFF05DB500
+FC14F8A26C01F814F0812D287FA730>I<EB01FC90380FFF80013F13E090B512F8488048
+803907FE03FF260FF800138049137FD81FC0EB1FC0A24848EB0FE090C712074815F0007E
+1403A200FE15F8481401A86C1403007E15F0A2007F1407A26C6CEB0FE06D131F6C6CEB3F
+C06D137F6C6CEBFF802607FE0313006CB55A6C5C6C5C013F13E0010F1380D903FEC7FC25
+2A7BA830>I<EC03F8397FF81FFFD9FC7F13C000FF90B57E90B612F87E9138F80FFCC690
+38E003FE4AC67E4A7F91C7EA3F8049141F17C049140FA217E0A21607A7160FA26D15C016
+1FA26DEC3F80167F6EEBFF006E485AECE0039138F80FFC91B55A01FD5C01FC5C6E1380DA
+1FFEC7FCEC07F091C9FCAD387FFFF8A2B57EA26C5BA22B3C7FA730>I<903901FC01E090
+390FFF83F0013F13E390B512F34814FB4814FF481301380FF80049133F4848131F484813
+0F5B48C71207A2127E150312FE5AA77E1507127E127F150F6C7E151F6C6C133F6D137FD8
+0FF813FF3807FE036CB6FC6C14FB6C14F36D13C3011F1303EB03F890C7FCAD4AB512E04A
+14F0A46E14E02C3C7CA730>I<ED0FF0D87FFFEB7FFEB50081B5FC1487028F1480149F6C
+9038BFF07F39001FFFC09238003F004A130C4A90C7FC5C5C5CA25CA45CAF007FB512FCB6
+FC81A25D7E29287DA730>I<90381FFC0E90B5129F000714FF5A5A5A387FE007EB800100
+FEC77E5A81A37E007F141E01C090C7FCEA3FF8381FFFE06C13FF000314C0C614F0010F13
+FC9038007FFEEC03FFEC007F0078EC3F8000FC141FED0FC0A27EA27E151F01C0EB3F806D
+137F9039F803FF0090B6FC5D5D00F814F0013F13C0267007FEC7FC222A79A830>I<EB07
+80497EAA007FB612E0B712F0A46C15E026000FC0C7FCB2167816FCA5ECE001ED03F89038
+07F0079138FC0FF06DB512E07F16C06D1400EC3FFCEC07F026337EB130>I<D87FF8EBFF
+F06D8000FF5BA2007F7FA200001401B3A41503A21507150F6D131F903A7F807FFFF091B6
+FC6D15F8A26D01F913F0010713E0010090C8FC2D287FA630>I<3B7FFF803FFFC0B56C48
+13E0A46C496C13C03B01F00001F000A26D130300005DA2017C495AA36D495AA36D49C7FC
+A390380F803EA36D6C5AA2ECE0FC01035BA214F101015BA214FB01005BA214FF6E5AA302
+1FC8FC2B277EA630>I<3B7FFF800FFFF06E5AB515F8A26C16F04A7ED807C0C7EA1F00A2
+6D5C0003153EA56D147E0001157CEC0FC0EC1FE0EC3FF0A32600F87F5BEC7DF8147CA214
+FC01786D5AA290387CF87C137D157D14F0013DEB3DE0013F133FA2ECE01FA2011F5C6D48
+6C5A2D277FA630>I<263FFFC0B5FC48168014E1A214C06C16003A007E001F806D49C7FC
+EB1F80157E6D6C5A6D6C5AEB03F1903801F3F0ECFFE06D5B147F6E5A92C8FCA2814A7E4A
+7EEB01F3ECF1F0903803E0F849487E010F137C49487EEC003F496D7E017E6D7E4913073B
+7FFF803FFF806E4813C0B5FCA27E4A6C13802A277EA630>I<3B7FFF803FFFC06E4813E0
+B5FCA27E4A6C13C03B01F80001F000120015036D5C137C4B5A7FA2013F495A7FA26E48C7
+FC130F14C00107133EA214E001035BA2EB01F05DA2EB00F85D1479147D5D143FA26E5AA3
+6E5AA2141F92C8FCA25C143EA2147E147C120F486C5AEA3FC113C3EB07F0495A13FF6C5B
+5C6C90C9FCEA07FCEA01F02B3C7EA630>I<003FB612FC4815FEA416FC007EC7EA07F8ED
+0FF0ED1FE0ED3FC0ED7F80003CECFF00C7485AEC07FC4A5A4A5A4A5A4A5A4A5A4990C7FC
+495A495A495A495A495A495A49C7121E4848143F485A485A485A485A485A48B7FCB8FCA4
+6C15FE28277DA630>I<ED1FF0EDFFF814075C143F16F091387FE00092C7FC14FE5CB3A2
+1301495A130F383FFFF0485BB55A91C8FC14C06C7F6C7F38000FF813036D7E1300B3A280
+147F15E091383FFFF016F8140F801400ED1FF025477BBE30>I<1238127C12FEB3B3B3AD
+127C123807476CBE30>I<EA7FC0EAFFFCEBFF808014F07E38001FF813036D7E1300B3A2
+80147F15C091383FFFE06E13F06E13F81403140F4A13F04A13E091387FC00092C7FC14FE
+5CB3A21301495A131F387FFFF0B5FC14C05C01FCC8FCEA7FC025477BBE30>I<01781338
+D803FE137C3907FF80FE001F13C148EBE7FC4813FF01CF13F8D8FF0713F0486C13C0D87C
+0013800038EB3C001F0B78B730>I E
%EndDVIPSBitmapFont
%DVIPSBitmapFont: Fq cmsy10 10.95 3
/Fq 3 16 df<007FB812F8B912FCA26C17F83604789847>0 D<EE3FFC0307B512E0033F
6C1500A26C5C6C5C6C5C6C5C6C5C6C5C013F90C7FCEB07F822227BA72D>15
D E
%EndDVIPSBitmapFont
-%DVIPSBitmapFont: Fr cmr10 10.95 82
-/Fr 82 128 df<DA03FFEB0FE0021F9038C07FF8913AFE00F1F81CD901F890383BE03ED9
+%DVIPSBitmapFont: Fr cmr10 10.95 81
+/Fr 81 128 df<DA03FFEB0FE0021F9038C07FF8913AFE00F1F81CD901F890383BE03ED9
07E090387FC07F49489038FF80FF49485AD93F005C013E167E017E163C6F48130049147E
AEB91280A3D800FCC7007EC7FCB3AE486C14FF277FFFF83F13FFA338407FBF35>11
D<EC03FC91383FFF809138FE03C0903901F00060D907E07FD90F8013F84948487E491303
7F80AAEA3F00AA121EAB120CA5C7FCA9121E123FEA7F80EAFFC0A4EA7F80EA3F00121E0A
4179C019>33 D<001E130F003FEB1F80397F803FC039FFC07FE0A201E013F0A2007F133F
393F601FB0001EEB0F3000001300A5491360A3484813C0A23903000180A20006EB0300A2
-481306485B485B002013101C1C7DBE2D>I<14E0A4EB07FC90383FFF804913E03901F8E3
-F03903E0E078D80780131CD80F007F001E8081481580007C14011278ED06C000F8140F15
-1F153FA36CEC1F80ED0F0092C7FC127E127FA2EA3FC013E0EA1FFE13FF6C13FC6C13FF6C
-14C06C806C6C7F011F7F01037F01007F14E7ECE1FFECE07FED3F80151FA2ED0FC0121812
-3C007E1407B4FCA35A5A00C015801260150F16006C5C151E6C5C121C6C14F8390780E1F0
-3903F0EFE0C6B51280D93FFEC7FCEB0FF8EB00E0A422497BC32D>36
-D<121E123FEA7F80EAFFC0A213E0A2127FEA3F60121E1200A513C0A3EA0180A2EA0300A2
-1206A25A5A5A12200B1C79BE19>39 D<1430147014E0EB01C0EB0380EB0700130EA25B5B
-1378137013F05B1201485AA2485AA348C7FCA35A121EA2123EA2123CA2127CA5127812F8
-B21278127CA5123CA2123EA2121EA2121F7EA36C7EA36C7EA26C7E12007F137013781338
-7F7FA27FEB0380EB01C0EB00E014701430145A77C323>I<7E7E7E12707E7E7EA27E6C7E
-7F12017F12007F1378A27FA37FA3131F7FA21480A21307A214C0A5130314E0B214C01307
-A51480A2130FA21400A25B131EA35BA35BA25B5B12015B12035B48C7FC120EA25A5A5A5A
-5A5A135A7AC323>I<EB03C0A2805CA600F0140F00FC143F00FE147F00FF14FF393FC3C3
-FC390FE187F03903F18FC03900FDBF00EB3FFCEB0FF0EB03C0EB0FF0EB3FFCEBFDBF3903
-F18FC0390FE187F0393FC3C3FC39FF03C0FF00FE147F00FC143F00F0140F00001400A680
-5CA220277AC32D>I<121E123FEA7F80EAFFC0A213E0A2127FEA3F60121E1200A513C0A3
-EA0180A2EA0300A21206A25A5A5A12200B1C798919>44 D<B512FEA517057F951E>I<12
-1E123FEA7F80EAFFC0A4EA7F80EA3F00121E0A0A798919>I<ED0180ED03C0A215071680
-A2150F1600A25D151EA2153E153CA2157C157815F85DA214015DA214035DA214075DA214
-0F92C7FCA25C141EA2143E143CA2147C1478A214F85CA213015C13035CA213075CA2130F
-91C8FCA25B131EA2133E133CA2137C1378A213F85BA212015BA212035BA212075B120F90
-C9FCA25A121EA2123E123CA2127C1278A212F85AA21260225B7BC32D>I<EB01FE90380F
-FFC090383F03F090387C00F849137C48487F48487F4848EB0F80A2000F15C04848EB07E0
-A3003F15F0A290C712034815F8A64815FCB3A26C15F8A56C6CEB07F0A3001F15E0A36C6C
-EB0FC0A26C6CEB1F80000315006C6C133E6C6C5B017C5B90383F03F090380FFFC0D901FE
-C7FC263F7DBC2D>I<14C013031307131F137FEA07FFB5FC139FEAF81F1200B3B3ACEB7F
-F0B612F8A31D3D78BC2D>I<EB07FC90383FFF8090B512E03901F01FF039038003FC4848
-6C7E000C6D7E48EC7F8012380030EC3FC012700060EC1FE0A212FE6C15F07F150FA36CC7
-FC003E141F121CC813E0A3ED3FC0A2ED7F8016005D5D4A5A5D4A5A4A5A4A5A5D4AC7FC14
-3E5C14F0495A5C495A49C8FC010E14305B5B5B4914605B485A48C8FC000615E0000FB6FC
-5A5A4815C0B7FCA3243D7CBC2D>I<EB07FC90383FFF809038F80FE03901C003F848C66C
-7E00066D7E48147F481580EA1F80486C14C06D133FA46C5A6C48137F6CC71380C8FCA216
-005D5D5D4A5A5D4A5AEC0FC0023FC7FCEB1FFCECFF809038000FE0EC03F0EC01FC6E7E15
-7F1680153F16C0A2ED1FE0A216F0A2120C123F487E487EA316E05B153F6CC713C012606C
-EC7F80003815006C14FE6C495A3907C003F83903F80FF0C6B55A013F1380D907FCC7FC24
-3F7CBC2D>I<150EA2151E153EA2157E15FEA214011403157E1406140E140C1418143814
-30146014E014C0EB0180130314001306130E130C5B133813305B13E05B485A120390C7FC
-1206120E120C5A123812305A12E0B8FCA3C8EAFE00AC4A7E49B6FCA3283E7EBD2D>I<00
-021403D807C0130F01F813FE90B55A5D5D5D158092C7FC38063FF890C9FCADEB01FE9038
-0FFF8090383E03E090387001F09038C00078D80780137C90C77E153F0002EC1F80C8FC16
-C0A2ED0FE0A316F0A4123E127F5A7FA290C713E0A248141F006015C0A200701580003014
-3F003815000018147E000E5C6C495A3903C003F03901F00FE06CB55A013F90C7FCEB07F8
-243F7CBC2D>I<EC1FE0ECFFF8903803F01C903807800690381F0003013EEB018049130F
-49EB1FC04848133FA2485A120749EB1F80000FEC0F0092C7FC485AA2123FA348C9FCA2EB
-01FE903807FF8090380E03E039FF1800F049137849137C8149133FED1F80A24914C0150F
-16E0A290C7FC16F0A47EA57E7F16E0A2121FED1FC0120F6D14800007EC3F007F0003147E
-6C6C137C6C6C485A90387E07F090383FFFC0010F5BD903FCC7FC243F7CBC2D>I<123012
-38123E003FB612FCA316F84815F0A216E00070C812C00060EC0180A2ED030015065A5D5D
-A2C85A5D15E05D4A5A140392C7FC1406A2140E5CA2143C14381478A214F85CA21301A213
-03A3495AA4130FA6131FA96D5A6D5A26407BBD2D>I<EB03FC90381FFF8090383C03E090
-38E000F04848133C48C77E4880120EED07805AED03C0A2123CA3123EA2003FEC07807FD8
-1FE014006D5B6C6C131E01FE131C6C6C5B6CEBC0F06CEBE1E06CEBFF806D48C7FC6D7E01
-0F7F15E0497F017813FC9038E03FFE48486C7E3803800748486C1380000E010013C0001E
-147F48EC1FE00038140F00781407ED03F0481401A31500A416E01278ED01C07EED03807E
-6CEC07006C6C131ED803E0137C3901FC03F039007FFFE0011F1380D903FCC7FC243F7CBC
-2D>I<EB03FCEB1FFF90383E07C09038F801E048486C7E484813784848137C000F805B00
-1F80123F168048C7FC16C0A248140F16E0A616F0A47E151FA27E7F001F143FA26C7E0007
-146F6C6C13CF12013900F0018F90397C070FE0EB1FFEEB07F890C7FCA2ED1FC0A31680A2
-ED3F00120F486C133E486C137E157C15FC5D49485A6C48485A0018495A000E495A2607C0
-7FC7FC3803FFFC6C5B38003FC0243F7CBC2D>I<121E123FEA7F80EAFFC0A4EA7F80EA3F
-00121EC7FCB3121E123FEA7F80EAFFC0A4EA7F80EA3F00121E0A2779A619>I<007FB912
-E0BA12F0A26C18E0CDFCAE007FB912E0BA12F0A26C18E03C167BA147>61
-D<EB1FF890B5FC3903E01FC039070007F0000CEB01F84814FC4813004814FE127C00FE14
-FF7EA4127E003C14FEC7120115FC140315F8EC07E0EC0FC0EC1F801500143E143C5C1470
-14F05C495AA35C1303A291C7FCA990C8FCA9EB0780497E497E497EA46D5A6D5A6D5A2040
-7BBF2B>63 D<1507A34B7EA34B7EA24B7EA34B7E156FA2EDEFF815C7A291380187FC1583
-A291380303FE1501A291380600FFA34A6D7EA34A6D7EA34A6D7EA20270800260130FA202
-E0804A1307A201018191B6FCA2498191C71201A201068182A2496F7EA3496F7EA3496F7E
-A21370717E13F0486C82D80FFEED3FFCB500E0010FB512F8A33D417DC044>65
-D<B712FCEEFF8017F00001903980000FF86C6CC7EA03FEEE00FFEF7F80EF3FC018E0171F
-18F0170F18F8A31707170FA318F0171F18E0173F18C0EF7F80EFFF00EE03FCEE0FF8EE7F
-E091B6C7FC17E091C7EA03FCEE00FEEF7F80EF3FC0EF1FE0EF0FF018F8170718FC1703A2
-18FEA718FC1707A2EF0FF8EF1FF0A2EF3FE0EFFFC04C138048486C90380FFE00B85A17E0
-94C7FC373E7DBD40>I<DB3FF01306913803FFFE020F9038FF800E913A3FF007E01E9139
-FF8000F0D901FCC7EA383ED907F0EC0C7E494814064948EC03FE4948140149C9FC13FE48
-48167E0003173E5B4848161E120FA24848160EA2123F5B1806127FA349160012FFAC127F
-7F1806A2123FA27F121F180C6C7EA2000717186C7E6D1638000117306C6C1660137F6D6C
-15C06D6CEC01806D6CEC03006D6C140ED901FC5C6DB46C13F891393FF007F0020FB512C0
-020391C7FC9138003FF037427BBF42>I<B712FCEEFF8017E000019039C0001FF86C6C48
-EB03FEEE00FFEF3F80717E717E717E717E717EA2717E84841980183F19C0A3F01FE0A519
-F0AB19E0A4183F19C0A21980187FA2190018FEA24D5A4D5A17074D5A4D5A4D5A05FFC7FC
-EE03FE48486CEB1FF8B85A178004FCC8FC3C3E7DBD45>I<B912E0A3000101C0C7FC6C6C
-48141FEF07F01703170117001870A31830A418181618A41800A21638A2167816F8150391
-B5FCA3EC8003150016781638A21618A21806A3180C93C7FCA4181C1818A21838A21878A2
-18F0170117031707171F48486CEB01FFB912E0A3373E7DBD3E>I<B91280A300019038C0
-00036C6C48EB003FEF1FC017071703A21701A31700A41860A21630A31800A31670A216F0
-1501150791B5FCA3EC8007150115001670A21630A693C8FCAF3801FFE0B612F0A3333E7D
-BD3B>I<DB3FF0130C913803FFFE021F9038FF801C913A7FE00FC03C9139FF0001E0D903
-FC903800787CD907F0EC1CFC4948140ED91F80140749C8120349150113FE484815004848
-167CA24848163C120FA24848161CA2123F5B180C127FA25B95C7FC12FFAB041FB512F012
-7FA26D9139000FFE00EF03FC123FA27F121FA26C7EA212076C7E7F12016C7E137F6D6C14
-076D7E6D6C140C6D6CEC1C7CD903FC1438D900FFECF03C913A7FF007E01C021FB5EA800C
-020349C8FC9138003FF03C427BBF47>I<B6D8C01FB512F8A3000101E0C7383FFC002600
-7F80EC0FF0B3A691B7FCA30280C7120FB3A92601FFE0EC3FFCB6D8C01FB512F8A33D3E7D
-BD44>I<B612F0A3C6EBF000EB3FC0B3B3B2EBFFF0B612F0A31C3E7EBD21>I<B600C09038
-1FFFFCA3000101E0C70007138026007F80913801FC0018F06018804DC7FC17065F5F5F5F
-5F4C5A4CC8FC16065E5E5E5E5E4B5A15074B7E4B7E153FED6FF0EDCFF8EC818791388303
-FC02867FEC8C0191389800FF02B08002E0137F4A6D7E4A80161F707E831607707E831601
-707E84177F717E717E84170F717E841703844D7E2601FFE04A13C0B600C090B6FCA3403E
-7DBD47>75 D<B612F8A3000101E0C9FC38007F80B3B0EF0180A517031800A45FA35FA25F
-5F5F17FE160348486C133FB8FCA3313E7DBD39>I<B56C93387FFFC06E93B5FCA20001F1
-E00026006FE0923801BF80A3D967F0ED033FA2D963F81506A3D961FC150CA3D960FE1518
-A2027F1530A36E6C1460A26E6C14C0A36E6CEB0180A36E6CEB0300A26E6C1306A36E6C5B
-A36E6C5BA2037F5BA36F6C5AA36F6C5AA292380FE180A3DB07F3C7FCA2ED03FEA36F5AA2
-13F0486C6D5AD807FEEFFFE0B500F00170017FEBFFC0A34A3E7CBD53>I<B56C91387FFF
-F880A2C66C6C020313006EEC00FC016F1678D967F81530801363EB61FE8001607F147F6E
-7E81141F6E7E8114076E7E8114016E7E82157F6F7E82151F6F7E826F7E15036F7E8281EE
-7F8017C0163FEE1FE017F0160FEE07F817FC1603EE01FE17FF82EF7FB018F0173F171F17
-0FA217071703A201F01501486C1500EA07FEB500F015701830A23D3E7DBD44>I<ED7FE0
-913807FFFE91391FC03F8091397E0007E0D901F8EB01F8D907F0EB00FED90FC0143F4948
-6E7E49C86C7E017E6F7E01FE8248486F7E49150100038348486F7EA24848167FA2001F18
-80A24848EE3FC0A3007F18E049161FA300FF18F0AC007F18E06D163FA4003F18C06D167F
-001F1880A26D16FF000F1800A26C6C4B5A00035F6D150300015F6C6C4B5A017F4B5A6D6C
-4A5A6D6C4A5A6D6C4AC7FC6D6C14FED901F8EB01F8D9007EEB07E091391FC03F80912607
-FFFEC8FC9138007FE03C427BBF47>I<B712F8EEFF8017E000019039C0001FF86C6C48EB
-03FC707EEE007FEF3F8018C0EF1FE0A218F0170F18F8A818F0171F18E0A2EF3FC01880EF
-7F00EE01FEEE07FCEE3FF091B612C04CC7FC0280C9FCB3A73801FFE0B612C0A3353E7DBD
-3E>I<B712C016FCEEFF8000019039C0007FE06C6C48EB0FF0EE03FC707E707E717E717E
-A284171F84A760173F6060177F4DC7FCEE01FC4C5AEE0FE0EEFF8091B500FCC8FC5E9138
-8000FFEE3F80EE0FE0707E707E707EA283160083A684A61906A2EF7FC0A2053F130C3801
-FFE0B600C0EB1FE0050F1318943803F870CA3801FFE09438003F803F407DBD43>82
-D<D907FC131890381FFF80017FEBE0383A01FC03F0783903F0007CD807C0EB1EF8484813
-0748C712031501123E15005A1678A200FC1538A46C1518A37E6C6C14007F6C7E13F86CB4
-7E14F86CEBFF806C14F06C14FC6C14FF6C6C14806D14C0010714E0D9007F13F0020713F8
-EC007FED0FFC1507ED01FEA21500167F124012C0163FA47EA2163E7E167E6C157C7E16F8
-B4EC01F0D8FB8014E0D8F9E0EB03C0D8F0F8EB0F8090397F803F0039E01FFFFED8C00713
-F89038007FC028427BBF33>I<003FB91280A3903AE0007FE00090C76C48131F007EEF0F
-C0007C17070078170300701701A300601700A5481860A5C81600B3B14B7E4B7E0107B612
-FEA33B3D7DBC42>I<B600C090387FFFF8A3000101E0C70003130026007F80EC00FC1878
-1830B3B3A4013F5EA280011F16E060130F6E4A5A010715036D6C92C7FC6E14060101150E
-6D6C5C027F147891391F8001F091390FF00FC00203B55A020049C8FCED1FF03D407DBD44
->I<B6913807FFFEA3000301E0020013E0C60180ED3F80F01F00017F160E180C6E151C01
-3F1618A26D6C5DA280010F5EA26E15E001075EA26D6C4A5AA28001014BC7FCA26E5C6D15
-0681027F5CA26F131C023F1418A26F1338021F143081020F5CA26F13E002075CA26E6C48
-5AA215FE020149C8FCA26F5A6E1306A2ED7F8CA216CCED3FD8A216F86F5AA26F5AA36F5A
-A36F5AA23F407EBD44>I<B500FE017FB5D88003B5FCA3000301C0010101E0C7EA7FF86C
-90C849EC0FC07148EC07806C1B00716C806E60017F1906717E6E180E013F190C4D7E8001
-1F614D7E17676D6C60EFE7FC17C36D6C6084EE01816D6C60A24CC67E6D6C4D5AA20406EB
-7F806E17036D96C7FC4CEB3FC003805E027F17064CEB1FE003C0160E023F170C4CEB0FF0
-15E0021F5F047014F804601307DA0FF05E04E014FC4C1303DA07F85E19FEDBF9801301DA
-03FD5EA203FFC812FF6E5FA24B157F020094C8FCA24B81A2037C153E0378151EA2033815
-1C0330150C58407EBD5D>I<007FB5D8C003B512E0A3C66C48C7387FFC00D93FF8EC1FE0
-6D48EC0F806D6C92C7FC170E6D6C140C6D6C5C17386D6C14306D6D5B17E06E6C5B023F49
-5AEDE003DA1FF090C8FC020F1306EDF80E6E6C5A1618913803FE386E6C5A16606E13E06F
-5AA26F7E6F7EA26F7E4B7EA2ED33FEED71FF156103C07F0201137F03807F4A486C7E5C02
-066D7E4A6D7E141C02186D7E4A6D7E147002606D7E4A6D7F13014A6E7E49C86C7E5B0106
-6F7E010E6F7E133F496C812607FFC0EC3FFFB500F80103B512FEA33F3E7EBD44>I<B66C
-49B51280A3000101F0C8383FF8006C6C48ED1FC0013F70C7FC180E6D6C150C181C6D6C15
-186D6C153818306D6C5D6E15E06D5E6D6D1301606E6C49C8FC6E6C5B17066E6C130E170C
-6E6C5B6E7E5F6E6C13706F13606E14E06E6D5AEE8180ED7FC3DB3FE3C9FC16E7ED1FF616
-FC150F6F5AB3A4ED1FFC020FB512FCA3413E7FBD44>I<EAFFFCA4EAF000B3B3B3B3ABEA
-FFFCA40E5B77C319>91 D<6D1340000114C039030001800006EB0300481306A2485BA248
-5BA2485BA3485BA500CFEB678039DF806FC039FFC07FE001E013F0A2007F133FA2393FC0
-1FE0391F800FC0390F0007801C1C73BE2D>I<EAFFFCA4EA003CB3B3B3B3ABEAFFFCA40E
-5B7FC319>I<13801201EA030012065AA25AA25AA25AA35AA512CFEADF80EAFFC013E0A2
-127FA2EA3FC0EA1F80EA0F000B1C7ABE19>96 D<EB0FF8EB7FFE3901F01F8039038003E0
-39060001F0390F8000F86D7F486C137C157EA2816C5A6C5AC8FCA4EC0FFF0103B5FC9038
-1FFC3FEB7F803801FC00EA03F0485A485A485A123F48C7FCEE018012FEA3157FA3007F14
-DFEC019F3B3F80038F83003A1FC0070FC73A07F01C07FE3A01FFF803FC3A003FE001F029
-2A7DA82D>I<EA01F812FFA3120712031201B1EC07F8EC3FFF9138780FC09138C003E090
-39F98001F001FBC77E01FE147C498049143F1780161F17C0A2EE0FE0A317F0A917E0A216
-1F17C0A21780163F6D1500167E01F6147C5E01E3495A9039C1C007E09039C0F01F809026
-803FFEC7FCC7EA0FF02C407DBE33>I<49B4FC010F13E090383F00F8017C131C49130648
-48131F48485B0007EC7F80485A121F5B003FEC3F00151E007F91C7FC90C9FCA35AA97EA2
-7F123F16C0121F6DEB0180120F6C6CEB0300A26C6C13066C6C5BD8007C133890383F01F0
-90380FFFC0D901FEC7FC222A7DA828>I<ED03F815FFA3150715031501B114FF010713C1
-90381F80F190387E003901F8130D48481307485A0007140348481301121F5B123FA2127F
-90C7FCA25AA97EA36C7EA2121F7F000F140312076C6C13076C6CEB0DFC6C6CEB19FE017C
-903871FFF090383F01E190380FFF81903A01FE01F8002C407DBE33>I<EB01FE90380FFF
-C090383F03F090387C00F801F0137C00038049133F48487F000F1580485AED0FC0123FA2
-48C713E0A35AA290B6FCA290C9FCA67EA27F123F1660121F6D14C0120F6C6CEB01801203
-6C6CEB03006C6C130E017E5B90381F80F0903807FFE0010090C7FC232A7EA828>I<EC1F
-C0ECFFF0903803F038903807C07C90380F80FEEB1F01133F133E90387E00FC1578491300
-AFB6FCA3D800FCC7FCB3AE487E387FFFFEA31F407EBF1C>I<167C903903F801FF90391F
-FF0787903A7E0FCE0F809038F803F83901F001F03B03E000F8070000076EC7FCA2484813
-7EA2001F147FA6000F147EA26C6C5BA200035C6C6C485A6D485A39037E0FC0D91FFFC8FC
-380703F80006CAFCA2120EA2120F7E7F7F6CB512F015FE6C6E7E6C15E00003813A07C000
-1FF848C7EA03FC001E140048157E007C153E0078153F00F881A50078151E007C153E6C5D
-001E15786C5DD807C0EB03E0D803F0EB0FC0D800FE017FC7FC90383FFFFC010313C0293D
-7EA82D>I<EA01F812FFA3120712031201B1EC03F8EC1FFF91383C0F8091386007C04A6C
-7ED9F9807FEBFB0001FE1301825BA35BB3A6486C497EB500F0B512F0A32C3F7CBE33>I<
-EA01E0487E487E487EA46C5A6C5A6C5AC8FCACEA01F8127FA3120712031201B3AC487EB5
-12E0A3133E7DBD19>I<14F0EB01F8EB03FCEB07FEA4EB03FCEB01F8EB00F01400AC14FE
-137FA313011300147EB3B3A6123C007E137CB413FC14F8A2EB01F0007E13E0383803C038
-1E0780380FFF00EA01FC175184BD1C>I<EA01F812FFA3120712031201B292387FFF80A3
-92381FF800ED0FE01680030EC7FC5D5D15605D4A5A4AC8FC140E5C143E147FECDF80EBF9
-8F9038FB0FC09038FE07E0EBFC0301F07F6E7E140081157E8181826F7E1507826F7E8248
-6CEB07FEB539E03FFFE0A32B3F7EBE30>I<EA01F812FFA3120712031201B3B3B1487EB5
-12F0A3143F7DBE19>I<2703F003FCEB01FE00FF903B0FFF8007FFC0913B3C0FC01E07E0
-913B7003E03801F00007903BC001F06000F82603F1806D487F2601F300EBF98001F6D900
-FBC7127C04FF147E01FC5CA3495CB3A6486C496C14FFB528F07FFFF83F13FCA346287CA7
-4D>I<3903F003F800FFEB1FFF91383C0F8091386007C00007496C7E2603F1807F3801F3
-0001F613018213FCA35BB3A6486C497EB500F0B512F0A32C287CA733>I<14FF010713E0
-90381F81F890387E007E01F8131F4848EB0F804848EB07C04848EB03E0000F15F04848EB
-01F8A2003F15FCA248C812FEA44815FFA96C15FEA36C6CEB01FCA3001F15F86C6CEB03F0
-A26C6CEB07E06C6CEB0FC06C6CEB1F80D8007EEB7E0090383F81FC90380FFFF0010090C7
-FC282A7EA82D>I<3901F807F800FFEB3FFF9138781FC09138C007E03A07F98001F02603
-FB007FD801FE6D7E49147E49147FEE3F80A2EE1FC0A217E0A2160F17F0A917E0161FA217
-C0A2EE3F80A26DEC7F00167E6D5C4B5A01FB495A9039F9C007E09039F8F01F80DA3FFEC7
-FCEC0FF091C9FCAD487EB512F0A32C3A7DA733>I<02FF13180107EBC03890381F80E090
-397E0030784913184848130C4848EB06F8485A000F1403485AA248481301A2127FA290C7
-FC5AA97E7FA2123FA26C7E15036C7E000714076C7E6C6C130D00001419017E137190383F
-81E190380FFF81903801FE0190C7FCAD4B7E92B512F0A32C3A7DA730>I<3903F007E000
-FFEB1FF0EC7878ECE0FC3907F181FE12033801F3019038F600FCA2153001FC1300A35BB3
-A5487EB512FCA31F287EA724>I<90387FC0603901FFF8E03807C03D380E000748130348
-1301481300A212F01560A27EA27E007F140013C0EA3FFE381FFFE06C13FC6C7F6C7FC614
-80010F13C09038007FE0EC0FF00040130300C0EB01F814007E1578A37E15707E15E07E6C
-EB01C000F3EB038039E1E01F0038C0FFFCEB1FE01D2A7DA824>I<1318A61338A41378A2
-13F8A2120112031207001FB512C0B6FCA2D801F8C7FCB3A21560A9000014C07F137CEC01
-80133E90381F8700EB07FEEB01F81B397EB723>I<D801F8EB03F800FF14FFA300071407
-0003140300011401B3A61503A300001407A2017CEB0DFCED19FE6D903831FFF090381F80
-E1903807FFC10100903801F8002C297CA733>I<B539C007FFE0A32707FC000113006C48
-EB007C0001157816707F00001560A2017E5CA2017F13016D5CA26D6C48C7FCA26E5A010F
-1306A26D6C5AA2ECF01C01031318A26D6C5AA2ECFC7001001360A2EC7EC0A2147F6E5AA2
-6EC8FCA3140EA22B287EA630>I<B53BC3FFFE01FFF8A33D0FFC001FE0007FC0D803F06D
-48EB1F800307EC0E007F00016F130CA26D161C00004A6C1318150D017E5EED1DF815186D
-5EED307CA2D91F80017E5BED603EA2D90FC090383F0180EDC01FA2D907E00283C7FC9138
-E1800F02F11487010315C69138F3000702FB14CE6DB414EC4A1303010015F8A24A130102
-7C5C02781300A202385C023014603D287EA642>I<3B7FFFC00FFFE0A3000390390007FE
-00C648EB03F0017E6D5A6DEB03801480011F49C7FC90380FC00E903807E00C6E5A903803
-F83801015B6D6C5AEC7EC0EC7F80143F141F6E7E81141FEC3BF0EC71F8ECE1FC14C09038
-01807E01037FD907007F01066D7E49130F496D7E01386D7E017880EA01F8D80FFCEB07FE
-B590381FFFF8A32D277FA630>I<B539C007FFE0A32707FC000113006C48EB007C000115
-7816706C6C1460A27F017E5CA26D495AA2EC8003011F91C7FCA290380FC006A2ECE00E01
-07130CA26D6C5AA2ECF8380101133014FC01005BA2EC7EC0A2147F6E5AA26EC8FCA3140E
-A2140CA2141C1418A25CA2147000381360007C13E000FE5B13015C49C9FCEA7C07EA700E
-EA383CEA1FF8EA07E02B3A7EA630>I<001FB61280A29039E0003F0090C7127E001E14FE
-001C495A5D0018495A003813075D0030495A141F4A5A92C7FC147EC712FE495A5C495A13
-075C495A011FEB0180EB3F801400137E13FE485A491303485A000715005B48485B001F5C
-485A90C7123F007E49B4FCB7FCA221277EA628>I<001C130E007EEB1F80007F133F39FF
-807FC0A3397F003F80007E131F001CEB0E001A0977BD2D>127 D
-E
+481306485B485B002013101C1C7DBE2D>I<121E123FEA7F80EAFFC0A213E0A2127FEA3F
+60121E1200A513C0A3EA0180A2EA0300A21206A25A5A5A12200B1C79BE19>39
+D<1430147014E0EB01C0EB0380EB0700130EA25B5B1378137013F05B1201485AA2485AA3
+48C7FCA35A121EA2123EA2123CA2127CA5127812F8B21278127CA5123CA2123EA2121EA2
+121F7EA36C7EA36C7EA26C7E12007F1370137813387F7FA27FEB0380EB01C0EB00E01470
+1430145A77C323>I<7E7E7E12707E7E7EA27E6C7E7F12017F12007F1378A27FA37FA313
+1F7FA21480A21307A214C0A5130314E0B214C01307A51480A2130FA21400A25B131EA35B
+A35BA25B5B12015B12035B48C7FC120EA25A5A5A5A5A5A135A7AC323>I<EB03C0A2805C
+A600F0140F00FC143F00FE147F00FF14FF393FC3C3FC390FE187F03903F18FC03900FDBF
+00EB3FFCEB0FF0EB03C0EB0FF0EB3FFCEBFDBF3903F18FC0390FE187F0393FC3C3FC39FF
+03C0FF00FE147F00FC143F00F0140F00001400A6805CA220277AC32D>I<121E123FEA7F
+80EAFFC0A213E0A2127FEA3F60121E1200A513C0A3EA0180A2EA0300A21206A25A5A5A12
+200B1C798919>44 D<B512FEA517057F951E>I<121E123FEA7F80EAFFC0A4EA7F80EA3F
+00121E0A0A798919>I<ED0180ED03C0A215071680A2150F1600A25D151EA2153E153CA2
+157C157815F85DA214015DA214035DA214075DA2140F92C7FCA25C141EA2143E143CA214
+7C1478A214F85CA213015C13035CA213075CA2130F91C8FCA25B131EA2133E133CA2137C
+1378A213F85BA212015BA212035BA212075B120F90C9FCA25A121EA2123E123CA2127C12
+78A212F85AA21260225B7BC32D>I<EB01FE90380FFFC090383F03F090387C00F849137C
+48487F48487F4848EB0F80A2000F15C04848EB07E0A3003F15F0A290C712034815F8A648
+15FCB3A26C15F8A56C6CEB07F0A3001F15E0A36C6CEB0FC0A26C6CEB1F80000315006C6C
+133E6C6C5B017C5B90383F03F090380FFFC0D901FEC7FC263F7DBC2D>I<14C013031307
+131F137FEA07FFB5FC139FEAF81F1200B3B3ACEB7FF0B612F8A31D3D78BC2D>I<EB07FC
+90383FFF8090B512E03901F01FF039038003FC48486C7E000C6D7E48EC7F8012380030EC
+3FC012700060EC1FE0A212FE6C15F07F150FA36CC7FC003E141F121CC813E0A3ED3FC0A2
+ED7F8016005D5D4A5A5D4A5A4A5A4A5A5D4AC7FC143E5C14F0495A5C495A49C8FC010E14
+305B5B5B4914605B485A48C8FC000615E0000FB6FC5A5A4815C0B7FCA3243D7CBC2D>I<
+EB07FC90383FFF809038F80FE03901C003F848C66C7E00066D7E48147F481580EA1F8048
+6C14C06D133FA46C5A6C48137F6CC71380C8FCA216005D5D5D4A5A5D4A5AEC0FC0023FC7
+FCEB1FFCECFF809038000FE0EC03F0EC01FC6E7E157F1680153F16C0A2ED1FE0A216F0A2
+120C123F487E487EA316E05B153F6CC713C012606CEC7F80003815006C14FE6C495A3907
+C003F83903F80FF0C6B55A013F1380D907FCC7FC243F7CBC2D>I<150EA2151E153EA215
+7E15FEA214011403157E1406140E140C141814381430146014E014C0EB01801303140013
+06130E130C5B133813305B13E05B485A120390C7FC1206120E120C5A123812305A12E0B8
+FCA3C8EAFE00AC4A7E49B6FCA3283E7EBD2D>I<00021403D807C0130F01F813FE90B55A
+5D5D5D158092C7FC38063FF890C9FCADEB01FE90380FFF8090383E03E090387001F09038
+C00078D80780137C90C77E153F0002EC1F80C8FC16C0A2ED0FE0A316F0A4123E127F5A7F
+A290C713E0A248141F006015C0A2007015800030143F003815000018147E000E5C6C495A
+3903C003F03901F00FE06CB55A013F90C7FCEB07F8243F7CBC2D>I<EC1FE0ECFFF89038
+03F01C903807800690381F0003013EEB018049130F49EB1FC04848133FA2485A120749EB
+1F80000FEC0F0092C7FC485AA2123FA348C9FCA2EB01FE903807FF8090380E03E039FF18
+00F049137849137C8149133FED1F80A24914C0150F16E0A290C7FC16F0A47EA57E7F16E0
+A2121FED1FC0120F6D14800007EC3F007F0003147E6C6C137C6C6C485A90387E07F09038
+3FFFC0010F5BD903FCC7FC243F7CBC2D>I<12301238123E003FB612FCA316F84815F0A2
+16E00070C812C00060EC0180A2ED030015065A5D5DA2C85A5D15E05D4A5A140392C7FC14
+06A2140E5CA2143C14381478A214F85CA21301A21303A3495AA4130FA6131FA96D5A6D5A
+26407BBD2D>I<EB03FC90381FFF8090383C03E09038E000F04848133C48C77E4880120E
+ED07805AED03C0A2123CA3123EA2003FEC07807FD81FE014006D5B6C6C131E01FE131C6C
+6C5B6CEBC0F06CEBE1E06CEBFF806D48C7FC6D7E010F7F15E0497F017813FC9038E03FFE
+48486C7E3803800748486C1380000E010013C0001E147F48EC1FE00038140F00781407ED
+03F0481401A31500A416E01278ED01C07EED03807E6CEC07006C6C131ED803E0137C3901
+FC03F039007FFFE0011F1380D903FCC7FC243F7CBC2D>I<EB03FCEB1FFF90383E07C090
+38F801E048486C7E484813784848137C000F805B001F80123F168048C7FC16C0A248140F
+16E0A616F0A47E151FA27E7F001F143FA26C7E0007146F6C6C13CF12013900F0018F9039
+7C070FE0EB1FFEEB07F890C7FCA2ED1FC0A31680A2ED3F00120F486C133E486C137E157C
+15FC5D49485A6C48485A0018495A000E495A2607C07FC7FC3803FFFC6C5B38003FC0243F
+7CBC2D>I<121E123FEA7F80EAFFC0A4EA7F80EA3F00121EC7FCB3121E123FEA7F80EAFF
+C0A4EA7F80EA3F00121E0A2779A619>I<007FB912E0BA12F0A26C18E0CDFCAE007FB912
+E0BA12F0A26C18E03C167BA147>61 D<EB1FF890B5FC3903E01FC039070007F0000CEB01
+F84814FC4813004814FE127C00FE14FF7EA4127E003C14FEC7120115FC140315F8EC07E0
+EC0FC0EC1F801500143E143C5C147014F05C495AA35C1303A291C7FCA990C8FCA9EB0780
+497E497E497EA46D5A6D5A6D5A20407BBF2B>63 D<1507A34B7EA34B7EA24B7EA34B7E15
+6FA2EDEFF815C7A291380187FC1583A291380303FE1501A291380600FFA34A6D7EA34A6D
+7EA34A6D7EA20270800260130FA202E0804A1307A201018191B6FCA2498191C71201A201
+068182A2496F7EA3496F7EA3496F7EA21370717E13F0486C82D80FFEED3FFCB500E0010F
+B512F8A33D417DC044>65 D<B712FCEEFF8017F00001903980000FF86C6CC7EA03FEEE00
+FFEF7F80EF3FC018E0171F18F0170F18F8A31707170FA318F0171F18E0173F18C0EF7F80
+EFFF00EE03FCEE0FF8EE7FE091B6C7FC17E091C7EA03FCEE00FEEF7F80EF3FC0EF1FE0EF
+0FF018F8170718FC1703A218FEA718FC1707A2EF0FF8EF1FF0A2EF3FE0EFFFC04C138048
+486C90380FFE00B85A17E094C7FC373E7DBD40>I<DB3FF01306913803FFFE020F9038FF
+800E913A3FF007E01E9139FF8000F0D901FCC7EA383ED907F0EC0C7E494814064948EC03
+FE4948140149C9FC13FE4848167E0003173E5B4848161E120FA24848160EA2123F5B1806
+127FA349160012FFAC127F7F1806A2123FA27F121F180C6C7EA2000717186C7E6D163800
+0117306C6C1660137F6D6C15C06D6CEC01806D6CEC03006D6C140ED901FC5C6DB46C13F8
+91393FF007F0020FB512C0020391C7FC9138003FF037427BBF42>I<B712FCEEFF8017E0
+00019039C0001FF86C6C48EB03FEEE00FFEF3F80717E717E717E717E717EA2717E848419
+80183F19C0A3F01FE0A519F0AB19E0A4183F19C0A21980187FA2190018FEA24D5A4D5A17
+074D5A4D5A4D5A05FFC7FCEE03FE48486CEB1FF8B85A178004FCC8FC3C3E7DBD45>I<B9
+12E0A3000101C0C7FC6C6C48141FEF07F01703170117001870A31830A418181618A41800
+A21638A2167816F8150391B5FCA3EC8003150016781638A21618A21806A3180C93C7FCA4
+181C1818A21838A21878A218F0170117031707171F48486CEB01FFB912E0A3373E7DBD3E
+>I<B91280A300019038C000036C6C48EB003FEF1FC017071703A21701A31700A41860A2
+1630A31800A31670A216F01501150791B5FCA3EC8007150115001670A21630A693C8FCAF
+3801FFE0B612F0A3333E7DBD3B>I<DB3FF0130C913803FFFE021F9038FF801C913A7FE0
+0FC03C9139FF0001E0D903FC903800787CD907F0EC1CFC4948140ED91F80140749C81203
+49150113FE484815004848167CA24848163C120FA24848161CA2123F5B180C127FA25B95
+C7FC12FFAB041FB512F0127FA26D9139000FFE00EF03FC123FA27F121FA26C7EA212076C
+7E7F12016C7E137F6D6C14076D7E6D6C140C6D6CEC1C7CD903FC1438D900FFECF03C913A
+7FF007E01C021FB5EA800C020349C8FC9138003FF03C427BBF47>I<B6D8C01FB512F8A3
+000101E0C7383FFC0026007F80EC0FF0B3A691B7FCA30280C7120FB3A92601FFE0EC3FFC
+B6D8C01FB512F8A33D3E7DBD44>I<B612F0A3C6EBF000EB3FC0B3B3B2EBFFF0B612F0A3
+1C3E7EBD21>I<B600C090381FFFFCA3000101E0C70007138026007F80913801FC0018F0
+6018804DC7FC17065F5F5F5F5F4C5A4CC8FC16065E5E5E5E5E4B5A15074B7E4B7E153FED
+6FF0EDCFF8EC818791388303FC02867FEC8C0191389800FF02B08002E0137F4A6D7E4A80
+161F707E831607707E831601707E84177F717E717E84170F717E841703844D7E2601FFE0
+4A13C0B600C090B6FCA3403E7DBD47>75 D<B612F8A3000101E0C9FC38007F80B3B0EF01
+80A517031800A45FA35FA25F5F5F17FE160348486C133FB8FCA3313E7DBD39>I<B56C93
+387FFFC06E93B5FCA20001F1E00026006FE0923801BF80A3D967F0ED033FA2D963F81506
+A3D961FC150CA3D960FE1518A2027F1530A36E6C1460A26E6C14C0A36E6CEB0180A36E6C
+EB0300A26E6C1306A36E6C5BA36E6C5BA2037F5BA36F6C5AA36F6C5AA292380FE180A3DB
+07F3C7FCA2ED03FEA36F5AA213F0486C6D5AD807FEEFFFE0B500F00170017FEBFFC0A34A
+3E7CBD53>I<B56C91387FFFF880A2C66C6C020313006EEC00FC016F1678D967F8153080
+1363EB61FE8001607F147F6E7E81141F6E7E8114076E7E8114016E7E82157F6F7E82151F
+6F7E826F7E15036F7E8281EE7F8017C0163FEE1FE017F0160FEE07F817FC1603EE01FE17
+FF82EF7FB018F0173F171F170FA217071703A201F01501486C1500EA07FEB500F0157018
+30A23D3E7DBD44>I<ED7FE0913807FFFE91391FC03F8091397E0007E0D901F8EB01F8D9
+07F0EB00FED90FC0143F49486E7E49C86C7E017E6F7E01FE8248486F7E49150100038348
+486F7EA24848167FA2001F1880A24848EE3FC0A3007F18E049161FA300FF18F0AC007F18
+E06D163FA4003F18C06D167F001F1880A26D16FF000F1800A26C6C4B5A00035F6D150300
+015F6C6C4B5A017F4B5A6D6C4A5A6D6C4A5A6D6C4AC7FC6D6C14FED901F8EB01F8D9007E
+EB07E091391FC03F80912607FFFEC8FC9138007FE03C427BBF47>I<B712F8EEFF8017E0
+00019039C0001FF86C6C48EB03FC707EEE007FEF3F8018C0EF1FE0A218F0170F18F8A818
+F0171F18E0A2EF3FC01880EF7F00EE01FEEE07FCEE3FF091B612C04CC7FC0280C9FCB3A7
+3801FFE0B612C0A3353E7DBD3E>I<B712C016FCEEFF8000019039C0007FE06C6C48EB0F
+F0EE03FC707E707E717E717EA284171F84A760173F6060177F4DC7FCEE01FC4C5AEE0FE0
+EEFF8091B500FCC8FC5E91388000FFEE3F80EE0FE0707E707E707EA283160083A684A619
+06A2EF7FC0A2053F130C3801FFE0B600C0EB1FE0050F1318943803F870CA3801FFE09438
+003F803F407DBD43>82 D<D907FC131890381FFF80017FEBE0383A01FC03F0783903F000
+7CD807C0EB1EF84848130748C712031501123E15005A1678A200FC1538A46C1518A37E6C
+6C14007F6C7E13F86CB47E14F86CEBFF806C14F06C14FC6C14FF6C6C14806D14C0010714
+E0D9007F13F0020713F8EC007FED0FFC1507ED01FEA21500167F124012C0163FA47EA216
+3E7E167E6C157C7E16F8B4EC01F0D8FB8014E0D8F9E0EB03C0D8F0F8EB0F8090397F803F
+0039E01FFFFED8C00713F89038007FC028427BBF33>I<003FB91280A3903AE0007FE000
+90C76C48131F007EEF0FC0007C17070078170300701701A300601700A5481860A5C81600
+B3B14B7E4B7E0107B612FEA33B3D7DBC42>I<B600C090387FFFF8A3000101E0C7000313
+0026007F80EC00FC18781830B3B3A4013F5EA280011F16E060130F6E4A5A010715036D6C
+92C7FC6E14060101150E6D6C5C027F147891391F8001F091390FF00FC00203B55A020049
+C8FCED1FF03D407DBD44>I<B6913807FFFEA3000301E0020013E0C60180ED3F80F01F00
+017F160E180C6E151C013F1618A26D6C5DA280010F5EA26E15E001075EA26D6C4A5AA280
+01014BC7FCA26E5C6D150681027F5CA26F131C023F1418A26F1338021F143081020F5CA2
+6F13E002075CA26E6C485AA215FE020149C8FCA26F5A6E1306A2ED7F8CA216CCED3FD8A2
+16F86F5AA26F5AA36F5AA36F5AA23F407EBD44>I<B500FE017FB5D88003B5FCA3000301
+C0010101E0C7EA7FF86C90C849EC0FC07148EC07806C1B00716C806E60017F1906717E6E
+180E013F190C4D7E80011F614D7E17676D6C60EFE7FC17C36D6C6084EE01816D6C60A24C
+C67E6D6C4D5AA20406EB7F806E17036D96C7FC4CEB3FC003805E027F17064CEB1FE003C0
+160E023F170C4CEB0FF015E0021F5F047014F804601307DA0FF05E04E014FC4C1303DA07
+F85E19FEDBF9801301DA03FD5EA203FFC812FF6E5FA24B157F020094C8FCA24B81A2037C
+153E0378151EA20338151C0330150C58407EBD5D>I<007FB5D8C003B512E0A3C66C48C7
+387FFC00D93FF8EC1FE06D48EC0F806D6C92C7FC170E6D6C140C6D6C5C17386D6C14306D
+6D5B17E06E6C5B023F495AEDE003DA1FF090C8FC020F1306EDF80E6E6C5A1618913803FE
+386E6C5A16606E13E06F5AA26F7E6F7EA26F7E4B7EA2ED33FEED71FF156103C07F020113
+7F03807F4A486C7E5C02066D7E4A6D7E141C02186D7E4A6D7E147002606D7E4A6D7F1301
+4A6E7E49C86C7E5B01066F7E010E6F7E133F496C812607FFC0EC3FFFB500F80103B512FE
+A33F3E7EBD44>I<B66C49B51280A3000101F0C8383FF8006C6C48ED1FC0013F70C7FC18
+0E6D6C150C181C6D6C15186D6C153818306D6C5D6E15E06D5E6D6D1301606E6C49C8FC6E
+6C5B17066E6C130E170C6E6C5B6E7E5F6E6C13706F13606E14E06E6D5AEE8180ED7FC3DB
+3FE3C9FC16E7ED1FF616FC150F6F5AB3A4ED1FFC020FB512FCA3413E7FBD44>I<EAFFFC
+A4EAF000B3B3B3B3ABEAFFFCA40E5B77C319>91 D<6D1340000114C039030001800006EB
+0300481306A2485BA2485BA2485BA3485BA500CFEB678039DF806FC039FFC07FE001E013
+F0A2007F133FA2393FC01FE0391F800FC0390F0007801C1C73BE2D>I<EAFFFCA4EA003C
+B3B3B3B3ABEAFFFCA40E5B7FC319>I<13801201EA030012065AA25AA25AA25AA35AA512
+CFEADF80EAFFC013E0A2127FA2EA3FC0EA1F80EA0F000B1C7ABE19>96
+D<EB0FF8EB7FFE3901F01F8039038003E039060001F0390F8000F86D7F486C137C157EA2
+816C5A6C5AC8FCA4EC0FFF0103B5FC90381FFC3FEB7F803801FC00EA03F0485A485A485A
+123F48C7FCEE018012FEA3157FA3007F14DFEC019F3B3F80038F83003A1FC0070FC73A07
+F01C07FE3A01FFF803FC3A003FE001F0292A7DA82D>I<EA01F812FFA3120712031201B1
+EC07F8EC3FFF9138780FC09138C003E09039F98001F001FBC77E01FE147C498049143F17
+80161F17C0A2EE0FE0A317F0A917E0A2161F17C0A21780163F6D1500167E01F6147C5E01
+E3495A9039C1C007E09039C0F01F809026803FFEC7FCC7EA0FF02C407DBE33>I<49B4FC
+010F13E090383F00F8017C131C4913064848131F48485B0007EC7F80485A121F5B003FEC
+3F00151E007F91C7FC90C9FCA35AA97EA27F123F16C0121F6DEB0180120F6C6CEB0300A2
+6C6C13066C6C5BD8007C133890383F01F090380FFFC0D901FEC7FC222A7DA828>I<ED03
+F815FFA3150715031501B114FF010713C190381F80F190387E003901F8130D4848130748
+5A0007140348481301121F5B123FA2127F90C7FCA25AA97EA36C7EA2121F7F000F140312
+076C6C13076C6CEB0DFC6C6CEB19FE017C903871FFF090383F01E190380FFF81903A01FE
+01F8002C407DBE33>I<EB01FE90380FFFC090383F03F090387C00F801F0137C00038049
+133F48487F000F1580485AED0FC0123FA248C713E0A35AA290B6FCA290C9FCA67EA27F12
+3F1660121F6D14C0120F6C6CEB018012036C6CEB03006C6C130E017E5B90381F80F09038
+07FFE0010090C7FC232A7EA828>I<EC1FC0ECFFF0903803F038903807C07C90380F80FE
+EB1F01133F133E90387E00FC1578491300AFB6FCA3D800FCC7FCB3AE487E387FFFFEA31F
+407EBF1C>I<167C903903F801FF90391FFF0787903A7E0FCE0F809038F803F83901F001
+F03B03E000F8070000076EC7FCA24848137EA2001F147FA6000F147EA26C6C5BA200035C
+6C6C485A6D485A39037E0FC0D91FFFC8FC380703F80006CAFCA2120EA2120F7E7F7F6CB5
+12F015FE6C6E7E6C15E00003813A07C0001FF848C7EA03FC001E140048157E007C153E00
+78153F00F881A50078151E007C153E6C5D001E15786C5DD807C0EB03E0D803F0EB0FC0D8
+00FE017FC7FC90383FFFFC010313C0293D7EA82D>I<EA01F812FFA3120712031201B1EC
+03F8EC1FFF91383C0F8091386007C04A6C7ED9F9807FEBFB0001FE1301825BA35BB3A648
+6C497EB500F0B512F0A32C3F7CBE33>I<EA01E0487E487E487EA46C5A6C5A6C5AC8FCAC
+EA01F8127FA3120712031201B3AC487EB512E0A3133E7DBD19>I<14F0EB01F8EB03FCEB
+07FEA4EB03FCEB01F8EB00F01400AC14FE137FA313011300147EB3B3A6123C007E137CB4
+13FC14F8A2EB01F0007E13E0383803C0381E0780380FFF00EA01FC175184BD1C>I<EA01
+F812FFA3120712031201B292387FFF80A392381FF800ED0FE01680030EC7FC5D5D15605D
+4A5A4AC8FC140E5C143E147FECDF80EBF98F9038FB0FC09038FE07E0EBFC0301F07F6E7E
+140081157E8181826F7E1507826F7E82486CEB07FEB539E03FFFE0A32B3F7EBE30>I<EA
+01F812FFA3120712031201B3B3B1487EB512F0A3143F7DBE19>I<2703F003FCEB01FE00
+FF903B0FFF8007FFC0913B3C0FC01E07E0913B7003E03801F00007903BC001F06000F826
+03F1806D487F2601F300EBF98001F6D900FBC7127C04FF147E01FC5CA3495CB3A6486C49
+6C14FFB528F07FFFF83F13FCA346287CA74D>I<3903F003F800FFEB1FFF91383C0F8091
+386007C00007496C7E2603F1807F3801F30001F613018213FCA35BB3A6486C497EB500F0
+B512F0A32C287CA733>I<14FF010713E090381F81F890387E007E01F8131F4848EB0F80
+4848EB07C04848EB03E0000F15F04848EB01F8A2003F15FCA248C812FEA44815FFA96C15
+FEA36C6CEB01FCA3001F15F86C6CEB03F0A26C6CEB07E06C6CEB0FC06C6CEB1F80D8007E
+EB7E0090383F81FC90380FFFF0010090C7FC282A7EA82D>I<3901F807F800FFEB3FFF91
+38781FC09138C007E03A07F98001F02603FB007FD801FE6D7E49147E49147FEE3F80A2EE
+1FC0A217E0A2160F17F0A917E0161FA217C0A2EE3F80A26DEC7F00167E6D5C4B5A01FB49
+5A9039F9C007E09039F8F01F80DA3FFEC7FCEC0FF091C9FCAD487EB512F0A32C3A7DA733
+>I<02FF13180107EBC03890381F80E090397E0030784913184848130C4848EB06F8485A
+000F1403485AA248481301A2127FA290C7FC5AA97E7FA2123FA26C7E15036C7E00071407
+6C7E6C6C130D00001419017E137190383F81E190380FFF81903801FE0190C7FCAD4B7E92
+B512F0A32C3A7DA730>I<3903F007E000FFEB1FF0EC7878ECE0FC3907F181FE12033801
+F3019038F600FCA2153001FC1300A35BB3A5487EB512FCA31F287EA724>I<90387FC060
+3901FFF8E03807C03D380E0007481303481301481300A212F01560A27EA27E007F140013
+C0EA3FFE381FFFE06C13FC6C7F6C7FC61480010F13C09038007FE0EC0FF00040130300C0
+EB01F814007E1578A37E15707E15E07E6CEB01C000F3EB038039E1E01F0038C0FFFCEB1F
+E01D2A7DA824>I<1318A61338A41378A213F8A2120112031207001FB512C0B6FCA2D801
+F8C7FCB3A21560A9000014C07F137CEC0180133E90381F8700EB07FEEB01F81B397EB723
+>I<D801F8EB03F800FF14FFA3000714070003140300011401B3A61503A300001407A201
+7CEB0DFCED19FE6D903831FFF090381F80E1903807FFC10100903801F8002C297CA733>
+I<B539C007FFE0A32707FC000113006C48EB007C0001157816707F00001560A2017E5CA2
+017F13016D5CA26D6C48C7FCA26E5A010F1306A26D6C5AA2ECF01C01031318A26D6C5AA2
+ECFC7001001360A2EC7EC0A2147F6E5AA26EC8FCA3140EA22B287EA630>I<B53BC3FFFE
+01FFF8A33D0FFC001FE0007FC0D803F06D48EB1F800307EC0E007F00016F130CA26D161C
+00004A6C1318150D017E5EED1DF815186D5EED307CA2D91F80017E5BED603EA2D90FC090
+383F0180EDC01FA2D907E00283C7FC9138E1800F02F11487010315C69138F3000702FB14
+CE6DB414EC4A1303010015F8A24A1301027C5C02781300A202385C023014603D287EA642
+>I<3B7FFFC00FFFE0A3000390390007FE00C648EB03F0017E6D5A6DEB03801480011F49
+C7FC90380FC00E903807E00C6E5A903803F83801015B6D6C5AEC7EC0EC7F80143F141F6E
+7E81141FEC3BF0EC71F8ECE1FC14C0903801807E01037FD907007F01066D7E49130F496D
+7E01386D7E017880EA01F8D80FFCEB07FEB590381FFFF8A32D277FA630>I<B539C007FF
+E0A32707FC000113006C48EB007C0001157816706C6C1460A27F017E5CA26D495AA2EC80
+03011F91C7FCA290380FC006A2ECE00E0107130CA26D6C5AA2ECF8380101133014FC0100
+5BA2EC7EC0A2147F6E5AA26EC8FCA3140EA2140CA2141C1418A25CA2147000381360007C
+13E000FE5B13015C49C9FCEA7C07EA700EEA383CEA1FF8EA07E02B3A7EA630>I<001FB6
+1280A29039E0003F0090C7127E001E14FE001C495A5D0018495A003813075D0030495A14
+1F4A5A92C7FC147EC712FE495A5C495A13075C495A011FEB0180EB3F801400137E13FE48
+5A491303485A000715005B48485B001F5C485A90C7123F007E49B4FCB7FCA221277EA628
+>I<001C130E007EEB1F80007F133F39FF807FC0A3397F003F80007E131F001CEB0E001A
+0977BD2D>127 D E
%EndDVIPSBitmapFont
%DVIPSBitmapFont: Fs cmbx12 14.4 62
/Fs 62 123 df<EEFFF8031F13FF92B612C0020315F0020F9038C00FF8913A3FFC0001FC
b(2)45 299 y Fq(\017)60 b Fr(The)30 b(garbage)i(collection)h(imp)s
(oses)28 b(no)j(burden)d(on)i(the)h(main)e(application.)45
433 y Fq(\017)60 b Fr(The)30 b(library)g(pro)m(vides)g(ho)s(oks)g(for)g
-(memory)f(allo)s(cation)j(and)e(exceptions.)p eop
+(memory)f(allo)s(cation)j(and)e(exceptions.)45 568 y
+Fq(\017)60 b Fr(All)31 b(non-macro)f(iden)m(ti\014ers)g(are)h(hidden)e
+(in)h(namespace)g Fp(cln)g Fr(in)g(order)f(to)j(a)m(v)m(oid)f(name)f
+(clashes.)p eop
%%Page: 3 5
3 4 bop -30 -116 a Fr(Chapter)30 b(2:)41 b(Installation)2999
b(3)-30 299 y Fo(2)80 b(Installation)-30 526 y Fr(This)30
b(section)h(describ)s(es)f(ho)m(w)g(to)h(install)g(the)g(CLN)f(pac)m(k)
-5 b(age)32 b(on)f(y)m(our)f(system.)-30 779 y Fs(2.1)68
b(Prerequisites)-30 1057 y Fn(2.1.1)63 b(C)p Fm(++)40
-b Fn(compiler)-30 1248 y Fr(T)-8 b(o)31 b(build)f(CLN,)g(y)m(ou)h(need)
-g(a)g(C)p Fp(++)e Fr(compiler.)41 b(Actually)-8 b(,)33
-b(y)m(ou)e(need)f(GNU)i Fp(g++)d(2.7.0)g Fr(or)i(new)m(er.)41
-b(On)30 b(HPP)-8 b(A,)-30 1358 y(y)m(ou)31 b(need)f(GNU)h
-Fp(g++)e(2.8.0)g Fr(or)i(new)m(er.)40 b(I)30 b(recommend)f(GNU)i
-Fp(g++)e(2.95)g Fr(or)i(new)m(er.)-30 1491 y(The)g(follo)m(wing)j(C)p
-Fp(++)d Fr(features)h(are)g(used:)43 b(classes,)33 b(mem)m(b)s(er)c
-(functions,)k(o)m(v)m(erloading)h(of)e(functions)f(and)g(op)s(er-)-30
-1600 y(ators,)g(constructors)g(and)f(destructors,)g(inline,)h(const,)g
-(m)m(ultiple)f(inheritance,)h(templates.)-30 1733 y(The)f(follo)m(wing)
-i(C)p Fp(++)d Fr(features)i(are)g(not)f(used:)40 b Fp(new)p
+b Fn(compiler)-30 1248 y Fr(T)-8 b(o)36 b(build)e(CLN,)g(y)m(ou)i(need)
+f(a)g(C)p Fp(++)f Fr(compiler.)54 b(Actually)-8 b(,)39
+b(y)m(ou)c(need)g(GNU)h Fp(g++)29 b(2.90)34 b Fr(or)h(new)m(er,)h(the)g
+(EGCS)-30 1358 y(compilers)30 b(will)h(do.)40 b(I)30
+b(recommend)e(GNU)j Fp(g++)f(2.95)f Fr(or)h(new)m(er.)-30
+1491 y(The)h(follo)m(wing)j(C)p Fp(++)d Fr(features)h(are)g(used:)43
+b(classes,)33 b(mem)m(b)s(er)c(functions,)k(o)m(v)m(erloading)h(of)e
+(functions)f(and)g(op)s(er-)-30 1600 y(ators,)g(constructors)g(and)f
+(destructors,)g(inline,)h(const,)g(m)m(ultiple)f(inheritance,)h
+(templates)g(and)f(namespaces.)-30 1733 y(The)g(follo)m(wing)i(C)p
+Fp(++)d Fr(features)i(are)g(not)f(used:)40 b Fp(new)p
Fr(,)30 b Fp(delete)p Fr(,)f(virtual)h(inheritance,)i(exceptions.)-30
1866 y(CLN)23 b(relies)h(on)g(semi-automatic)f(ordering)h(of)f
(initializations)j(of)e(static)h(and)e(global)i(v)-5
%%Page: 4 6
4 5 bop -30 -116 a Fr(Chapter)30 b(2:)41 b(Installation)2999
b(4)-30 299 y Fp(CXX)336 b Fr(Sp)s(eci\014es)30 b(the)g(C)p
-Fp(++)g Fr(compiler.)-30 462 y Fp(CXXFLAGS)96 b Fr(Flags)32
+Fp(++)g Fr(compiler.)-30 452 y Fp(CXXFLAGS)96 b Fr(Flags)32
b(to)f(b)s(e)f(giv)m(en)h(to)g(the)g(C)p Fp(++)e Fr(compiler)h(when)f
(compiling)h(programs)f(\(not)i(when)f(linking\).)-30
-627 y(Examples:)210 759 y Fp($)47 b(CC="gcc")f(CFLAGS="-O")f(CXX="g++")
-g(CXXFLAGS="-O")f(./configure)210 863 y($)j(CC="gcc)f(-V)h(2.7.2")g
-(CFLAGS="-O)e(-g")h(\\)305 967 y(CXX="g++)g(-V)h(2.7.2")f(CXXFLAGS="-O)
-f(-g")i(./configure)210 1071 y($)g(CC="gcc)f(-V)h(2.8.1")g(CFLAGS="-O)e
-(-fno-exceptions")e(\\)305 1175 y(CXX="g++)j(-V)h(2.8.1")f
-(CXXFLAGS="-O)f(-fno-exceptions")e(./configure)210 1278
-y($)k(CC="gcc)f(-V)h(egcs-2.91.60")e(CFLAGS="-O2)f(-fno-exceptions")g
-(\\)305 1382 y(CXX="g++)i(-V)h(egcs-2.91.60")d(CFLAGS="-O2)h
-(-fno-exceptions")e(./configure)-30 1520 y Fr(Note)32
+604 y(Examples:)210 730 y Fp($)47 b(CC="gcc")f(CFLAGS="-O")f(CXX="g++")
+g(CXXFLAGS="-O")f(./configure)210 834 y($)j(CC="gcc)f(-V)h
+(egcs-2.91.60")e(CFLAGS="-O)g(-g")i(\\)305 937 y(CXX="g++)f(-V)h
+(egcs-2.91.60")d(CXXFLAGS="-O)h(-g")i(./configure)210
+1041 y($)g(CC="gcc)f(-V)h(2.95.2")f(CFLAGS="-O2)f(-fno-exceptions")e
+(\\)305 1145 y(CXX="g++)j(-V)h(2.95.2")f(CFLAGS="-O2)f
+(-fno-exceptions")e(./configure)-30 1276 y Fr(Note)32
b(that)g(for)e(these)i(en)m(vironmen)m(t)e(v)-5 b(ariables)32
b(to)f(tak)m(e)i(e\013ect,)g(y)m(ou)e(ha)m(v)m(e)h(to)f(set)h(them)e
-(\(assuming)g(a)h(Bourne-)-30 1630 y(compatible)i(shell\))g(on)g(the)g
+(\(assuming)g(a)h(Bourne-)-30 1386 y(compatible)i(shell\))g(on)g(the)g
(same)f(line)h(as)g(the)g Fp(configure)d Fr(command.)46
b(If)32 b(y)m(ou)h(made)f(the)h(settings)h(in)e(earlier)-30
-1740 y(shell)g(commands,)e(y)m(ou)i(ha)m(v)m(e)h(to)g
+1495 y(shell)g(commands,)e(y)m(ou)i(ha)m(v)m(e)h(to)g
Fp(export)d Fr(the)i(en)m(vironmen)m(t)f(v)-5 b(ariables)33
b(b)s(efore)e(calling)i Fp(configure)p Fr(.)43 b(In)31
-b(a)h Fp(csh)-30 1849 y Fr(shell,)f(y)m(ou)g(ha)m(v)m(e)g(to)g(use)f
+b(a)h Fp(csh)-30 1605 y Fr(shell,)f(y)m(ou)g(ha)m(v)m(e)g(to)g(use)f
(the)h(`)p Fp(setenv)p Fr(')e(command)f(for)i(setting)i(eac)m(h)f(of)g
-(the)f(en)m(vironmen)m(t)g(v)-5 b(ariables.)-30 1987
-y(On)28 b(Lin)m(ux,)h Fp(g++)f Fr(needs)h(15)g(MB)h(to)g(compile)f(the)
-g(tests.)41 b(So)28 b(y)m(ou)i(should)e(b)s(etter)h(ha)m(v)m(e)h(17)g
-(MB)f(sw)m(ap)g(space)h(and)-30 2097 y(1)h(MB)g(ro)s(om)e(in)h
-($TMPDIR.)-30 2235 y(If)h(y)m(ou)h(use)g Fp(g++)e Fr(v)m(ersion)j
-(2.7.x,)g(don't)f(add)f(`)p Fp(-O2)p Fr(')g(to)i(the)f(CXXFLA)m(GS,)g
-(b)s(ecause)g(`)p Fp(g++)d(-O)p Fr(')j(generates)h(b)s(etter)-30
-2345 y(co)s(de)e(for)f(CLN)g(than)g(`)p Fp(g++)g(-O2)p
-Fr('.)-30 2483 y(If)44 b(y)m(ou)h(use)f Fp(g++)g Fr(v)m(ersion)h(2.8.x)
-h(or)e(egcs-2.91.x)k(\(a.k.a.)85 b(egcs-1.1\))47 b(or)e(gcc-2.95.x,)52
-b(I)44 b(recommend)e(adding)-30 2593 y(`)p Fp(-fno-exceptions)p
-Fr(')27 b(to)k(the)f(CXXFLA)m(GS.)i(This)d(will)i(lik)m(ely)h(generate)
-g(b)s(etter)e(co)s(de.)-30 2731 y(If)37 b(y)m(ou)g(use)g
-Fp(g++)g Fr(v)m(ersion)g(egcs-2.91.x)k(\(egcs-1.1\))f(or)e(gcc-2.95.x)i
-(on)d(Sparc,)i(add)e(either)g(`)p Fp(-O)p Fr(',)i(`)p
-Fp(-O1)p Fr(')e(or)h(`)p Fp(-O2)-30 2840 y(-fno-schedule-insns)p
-Fr(')26 b(to)32 b(the)f(CXXFLA)m(GS.)h(With)g(full)f(`)p
-Fp(-O2)p Fr(',)g Fp(g++)f Fr(miscompiles)g(the)i(division)f(routines.)
--30 2950 y(Also,)41 b(if)e(y)m(ou)g(ha)m(v)m(e)g Fp(g++)f
-Fr(v)m(ersion)h(egcs-1.1.1)j(or)c(older)h(on)f(Sparc,)j(y)m(ou)d(m)m
-(ust)g(sp)s(ecify)g(`)p Fp(--disable-shared)p Fr(')-30
-3060 y(b)s(ecause)30 b Fp(g++)g Fr(w)m(ould)g(miscompile)f(parts)h(of)h
-(the)f(library)-8 b(.)-30 3198 y(By)32 b(default,)g(b)s(oth)f(a)h
-(shared)e(and)h(a)h(static)h(library)e(are)h(built.)44
+(the)f(en)m(vironmen)m(t)g(v)-5 b(ariables.)-30 1736
+y(Curren)m(tly)25 b(CLN)g(w)m(orks)h(only)g(with)f(the)h(GNU)g
+Fp(g++)f Fr(compiler,)i(and)e(only)g(in)h(optimizing)g(mo)s(de.)37
+b(So)26 b(y)m(ou)g(should)-30 1846 y(sp)s(ecify)33 b(at)i(least)g
+Fp(-O)e Fr(in)h(the)g(CXXFLA)m(GS,)g(or)g(no)g(CXXFLA)m(GS)g(at)h(all.)
+52 b(\(If)34 b(CXXFLA)m(GS)g(is)g(not)g(set,)h(CLN)-30
+1955 y(will)c(use)f Fp(-O)p Fr(.\))-30 2086 y(If)44 b(y)m(ou)h(use)f
+Fp(g++)g Fr(v)m(ersion)h(2.8.x)h(or)e(egcs-2.91.x)k(\(a.k.a.)85
+b(egcs-1.1\))47 b(or)e(gcc-2.95.x,)52 b(I)44 b(recommend)e(adding)-30
+2196 y(`)p Fp(-fno-exceptions)p Fr(')27 b(to)k(the)f(CXXFLA)m(GS.)i
+(This)d(will)i(lik)m(ely)h(generate)g(b)s(etter)e(co)s(de.)-30
+2327 y(If)37 b(y)m(ou)g(use)g Fp(g++)g Fr(v)m(ersion)g(egcs-2.91.x)k
+(\(egcs-1.1\))f(or)e(gcc-2.95.x)i(on)d(Sparc,)i(add)e(either)g(`)p
+Fp(-O)p Fr(',)i(`)p Fp(-O1)p Fr(')e(or)h(`)p Fp(-O2)-30
+2437 y(-fno-schedule-insns)p Fr(')26 b(to)32 b(the)f(CXXFLA)m(GS.)h
+(With)g(full)f(`)p Fp(-O2)p Fr(',)g Fp(g++)f Fr(miscompiles)g(the)i
+(division)f(routines.)-30 2546 y(Also,)41 b(if)e(y)m(ou)g(ha)m(v)m(e)g
+Fp(g++)f Fr(v)m(ersion)h(egcs-1.1.1)j(or)c(older)h(on)f(Sparc,)j(y)m
+(ou)d(m)m(ust)g(sp)s(ecify)g(`)p Fp(--disable-shared)p
+Fr(')-30 2656 y(b)s(ecause)30 b Fp(g++)g Fr(w)m(ould)g(miscompile)f
+(parts)h(of)h(the)f(library)-8 b(.)-30 2787 y(By)32 b(default,)g(b)s
+(oth)f(a)h(shared)e(and)h(a)h(static)h(library)e(are)h(built.)44
b(Y)-8 b(ou)32 b(can)g(build)f(CLN)g(as)g(a)h(static)h(\(or)f(shared\))
--30 3307 y(library)k(only)-8 b(,)38 b(b)m(y)f(calling)g
+-30 2897 y(library)k(only)-8 b(,)38 b(b)m(y)f(calling)g
Fp(configure)d Fr(with)i(the)h(option)f(`)p Fp(--disable-shared)p
-Fr(')d(\(or)j(`)p Fp(--disable-static)p Fr('\).)-30 3417
+Fr(')d(\(or)j(`)p Fp(--disable-static)p Fr('\).)-30 3006
y(While)f(shared)e(libraries)g(are)i(usually)e(more)g(con)m(v)m(enien)m
(t)j(to)e(use,)h(they)f(ma)m(y)f(not)h(w)m(ork)g(on)g(all)g(arc)m
-(hitectures.)-30 3527 y(T)-8 b(ry)32 b(disabling)g(them)g(if)g(y)m(ou)h
+(hitectures.)-30 3116 y(T)-8 b(ry)32 b(disabling)g(them)g(if)g(y)m(ou)h
(run)d(in)m(to)k(link)m(er)e(problems.)45 b(Also,)34
b(they)f(are)f(generally)i(somewhat)e(slo)m(w)m(er)h(than)-30
-3636 y(static)f(libraries)e(so)h(run)m(time-critical)h(applications)f
-(should)e(b)s(e)h(link)m(ed)h(statically)-8 b(.)-30 3868
+3225 y(static)f(libraries)e(so)h(run)m(time-critical)h(applications)f
+(should)e(b)s(e)h(link)m(ed)h(statically)-8 b(.)-30 3440
y Fn(2.2.1)63 b(Using)42 b(the)f(GNU)g(MP)h(Library)-30
-4064 y Fr(Starting)32 b(with)f(v)m(ersion)g(1.1,)i(CLN)e(ma)m(y)g(b)s
+3629 y Fr(Starting)32 b(with)f(v)m(ersion)g(1.1,)i(CLN)e(ma)m(y)g(b)s
(e)f(con\014gured)h(to)h(mak)m(e)f(use)g(of)g(a)h(preinstalled)f
-Fp(gmp)g Fr(library)-8 b(.)43 b(Please)-30 4174 y(mak)m(e)d(sure)f
+Fp(gmp)g Fr(library)-8 b(.)43 b(Please)-30 3738 y(mak)m(e)d(sure)f
(that)h(y)m(ou)g(ha)m(v)m(e)h(at)f(least)h Fp(gmp)e Fr(v)m(ersion)h
(3.0)h(installed)f(since)g(earlier)h(v)m(ersions)f(are)g(unsupp)s
-(orted)-30 4283 y(and)30 b(lik)m(ely)i(not)f(to)h(w)m(ork.)41
+(orted)-30 3848 y(and)30 b(lik)m(ely)i(not)f(to)h(w)m(ork.)41
b(Enabling)31 b(this)f(feature)h(b)m(y)g(calling)h Fp(configure)c
Fr(with)j(the)f(option)i(`)p Fp(--with-gmp)p Fr(')c(is)-30
-4393 y(kno)m(wn)i(to)h(b)s(e)f(quite)h(a)f(b)s(o)s(ost)g(for)g(CLN's)g
-(p)s(erformance.)-30 4531 y(If)35 b(y)m(ou)g(ha)m(v)m(e)i(installed)f
+3958 y(kno)m(wn)i(to)h(b)s(e)f(quite)h(a)f(b)s(o)s(ost)g(for)g(CLN's)g
+(p)s(erformance.)-30 4089 y(If)35 b(y)m(ou)g(ha)m(v)m(e)i(installed)f
(the)f Fp(gmp)f Fr(library)h(and)f(its)i(header)f(\014le)g(in)g(some)g
-(place)h(where)e(y)m(our)i(compiler)e(cannot)-30 4641
+(place)h(where)e(y)m(our)i(compiler)e(cannot)-30 4198
y(\014nd)27 b(it)j(b)m(y)f(default,)h(y)m(ou)f(m)m(ust)f(help)h
Fp(configure)d Fr(b)m(y)j(setting)h Fp(CPPFLAGS)d Fr(and)h
Fp(LDFLAGS)p Fr(.)38 b(Here)30 b(is)f(an)g(example:)210
-4773 y Fp($)47 b(CC="gcc")f(CFLAGS="-O2")e(CXX="g++")i(CXXFLAGS="-O2)e
-(-fno-exceptions")f(\\)305 4877 y(CPPFLAGS="-I/opt/gmp/inclu)o(de")e
+4324 y Fp($)47 b(CC="gcc")f(CFLAGS="-O2")e(CXX="g++")i(CXXFLAGS="-O2)e
+(-fno-exceptions")f(\\)305 4428 y(CPPFLAGS="-I/opt/gmp/inclu)o(de")e
(LDFLAGS="-L/opt/gmp/lib")g(./configure)k(--with-gmp)-30
-5144 y Fs(2.3)68 b(Installing)47 b(the)e(library)-30
-5340 y Fr(As)30 b(with)g(an)m(y)h(auto)s(con\014guring)f(GNU)h(soft)m
-(w)m(are,)h(installation)h(is)d(as)h(easy)g(as)f(this:)p
-eop
-%%Page: 5 7
-5 6 bop -30 -116 a Fr(Chapter)30 b(2:)41 b(Installation)2999
-b(5)210 299 y Fp($)47 b(make)g(install)-30 433 y Fr(The)66
+4675 y Fs(2.3)68 b(Installing)47 b(the)e(library)-30
+4864 y Fr(As)30 b(with)g(an)m(y)h(auto)s(con\014guring)f(GNU)h(soft)m
+(w)m(are,)h(installation)h(is)d(as)h(easy)g(as)f(this:)210
+4990 y Fp($)47 b(make)g(install)-30 5121 y Fr(The)66
b(`)p Fp(make)30 b(install)p Fr(')65 b(command)f(installs)k(the)f
(library)f(and)h(the)g(include)f(\014les)h(in)m(to)h(public)e(places)
--30 543 y(\(`)p Fp(/usr/local/lib/)p Fr(')41 b(and)j(`)p
+-30 5230 y(\(`)p Fp(/usr/local/lib/)p Fr(')41 b(and)j(`)p
Fp(/usr/local/include/)p Fr(',)f(if)i(y)m(ou)g(ha)m(v)m(en't)g(sp)s
-(eci\014ed)f(a)h Fp(--prefix)d Fr(option)j(to)-30 653
+(eci\014ed)f(a)h Fp(--prefix)d Fr(option)j(to)-30 5340
y Fp(configure)p Fr(\).)39 b(This)29 b(step)i(ma)m(y)f(require)g(sup)s
-(eruser)e(privileges.)-30 787 y(If)42 b(y)m(ou)g(ha)m(v)m(e)i(already)f
-(built)f(the)g(library)g(and)g(wish)f(to)i(install)g(it,)j(but)c
-(didn't)f(sp)s(ecify)h Fp(--prefix=...)d Fr(at)-30 897
-y(con\014gure)j(time,)k(just)c(re-run)f Fp(configure)p
-Fr(,)i(giving)h(it)f(the)g(same)f(options)g(as)h(the)g(\014rst)f(time,)
-j(plus)d(the)h Fp(--)-30 1006 y(prefix=...)28 b Fr(option.)-30
-1264 y Fs(2.4)68 b(Cleaning)46 b(up)-30 1456 y Fr(Y)-8
-b(ou)31 b(can)g(remo)m(v)m(e)f(system-dep)s(enden)m(t)f(\014les)i
-(generated)g(b)m(y)f Fp(make)f Fr(through)210 1585 y
-Fp($)47 b(make)g(clean)-30 1719 y Fr(Y)-8 b(ou)31 b(can)g(remo)m(v)m(e)
-f(all)i(\014les)e(generated)h(b)m(y)g Fp(make)p Fr(,)e(th)m(us)h(rev)m
-(erting)h(to)h(a)e(virgin)h(distribution)e(of)i(CLN,)f(through)210
-1848 y Fp($)47 b(make)g(distclean)p eop
+(eruser)e(privileges.)p eop
+%%Page: 5 7
+5 6 bop -30 -116 a Fr(Chapter)30 b(2:)41 b(Installation)2999
+b(5)-30 299 y(If)42 b(y)m(ou)g(ha)m(v)m(e)i(already)f(built)f(the)g
+(library)g(and)g(wish)f(to)i(install)g(it,)j(but)c(didn't)f(sp)s(ecify)
+h Fp(--prefix=...)d Fr(at)-30 408 y(con\014gure)j(time,)k(just)c
+(re-run)f Fp(configure)p Fr(,)i(giving)h(it)f(the)g(same)f(options)g
+(as)h(the)g(\014rst)f(time,)j(plus)d(the)h Fp(--)-30
+518 y(prefix=...)28 b Fr(option.)-30 775 y Fs(2.4)68
+b(Cleaning)46 b(up)-30 968 y Fr(Y)-8 b(ou)31 b(can)g(remo)m(v)m(e)f
+(system-dep)s(enden)m(t)f(\014les)i(generated)g(b)m(y)f
+Fp(make)f Fr(through)210 1097 y Fp($)47 b(make)g(clean)-30
+1231 y Fr(Y)-8 b(ou)31 b(can)g(remo)m(v)m(e)f(all)i(\014les)e
+(generated)h(b)m(y)g Fp(make)p Fr(,)e(th)m(us)h(rev)m(erting)h(to)h(a)e
+(virgin)h(distribution)e(of)i(CLN,)f(through)210 1360
+y Fp($)47 b(make)g(distclean)p eop
%%Page: 6 8
6 7 bop -30 -116 a Fr(Chapter)30 b(3:)41 b(Ordinary)29
b(n)m(um)m(b)s(er)f(t)m(yp)s(es)2517 b(6)-30 299 y Fo(3)80
b(Ordinary)55 b(n)l(um)l(b)t(er)c(t)l(yp)t(es)-30 539
y Fr(CLN)30 b(implemen)m(ts)f(the)h(follo)m(wing)i(class)f(hierarc)m(h)
-m(y:)1355 670 y Fp(Number)1308 773 y(cl_number)1212 877
-y(<cl_number.h>)1451 981 y(|)1451 1085 y(|)1021 1189
-y(Real)47 b(or)g(complex)f(number)1355 1292 y(cl_N)1212
-1396 y(<cl_complex.h>)1451 1500 y(|)1451 1604 y(|)1212
-1707 y(Real)h(number)1355 1811 y(cl_R)1260 1915 y(<cl_real.h>)1451
+m(y:)1355 670 y Fp(Number)1260 773 y(cl_number)1165 877
+y(<cln/number.h>)1451 981 y(|)1451 1085 y(|)1021 1189
+y(Real)47 b(or)g(complex)f(number)1355 1292 y(cl_N)1165
+1396 y(<cln/complex.h>)1451 1500 y(|)1451 1604 y(|)1212
+1707 y(Real)h(number)1355 1811 y(cl_R)1212 1915 y(<cln/real.h>)1451
2019 y(|)496 2123 y(+-------------------+-----)o(---)o(----)o(----)o
(---)o(+)496 2226 y(|)1861 b(|)210 2330 y(Rational)46
b(number)1000 b(Floating-point)44 b(number)401 2434 y(cl_RA)1669
-b(cl_F)210 2538 y(<cl_rational.h>)1237 b(<cl_float.h>)496
-2641 y(|)1861 b(|)496 2745 y(|)859 b(+-------------+----------)o(---+)o
-(---)o(----)o(----)o(--+)353 2849 y(Integer)714 b(|)620
-b(|)h(|)f(|)401 2953 y(cl_I)572 b(Short-Float)140 b(Single-Float)92
-b(Double-Float)140 b(Long-Float)258 3057 y(<cl_integer.h>)378
-b(cl_SF)428 b(cl_FF)g(cl_DF)g(cl_LF)1117 3160 y(<cl_sfloat.h>)44
-b(<cl_ffloat.h>)g(<cl_dfloat.h>)g(<cl_lfloat.h>)-30 3297
-y Fr(The)28 b(base)h(class)h Fp(cl_number)c Fr(is)j(an)g(abstract)g
-(base)g(class.)41 b(It)29 b(is)g(not)g(useful)f(to)i(declare)f(a)h(v)-5
+b(cl_F)210 2538 y(<cln/rational.h>)1189 b(<cln/float.h>)496
+2641 y(|)1861 b(|)496 2745 y(|)764 b(+--------------+-------)o(----)o
+(---+)o(---)o(----)o(----)o(---)o(+)353 2849 y(Integer)619
+b(|)668 b(|)g(|)f(|)401 2953 y(cl_I)476 b(Short-Float)188
+b(Single-Float)140 b(Double-Float)188 b(Long-Float)210
+3057 y(<cln/integer.h>)282 b(cl_SF)476 b(cl_FF)g(cl_DF)g(cl_LF)1021
+3160 y(<cln/sfloat.h>)44 b(<cln/ffloat.h>)g(<cln/dfloat.h>)g
+(<cln/lfloat.h>)-30 3297 y Fr(The)28 b(base)h(class)h
+Fp(cl_number)c Fr(is)j(an)g(abstract)g(base)g(class.)41
+b(It)29 b(is)g(not)g(useful)f(to)i(declare)f(a)h(v)-5
b(ariable)29 b(of)g(this)g(t)m(yp)s(e)-30 3406 y(except)g(if)f(y)m(ou)g
(w)m(an)m(t)h(to)g(completely)f(disable)g(compile-time)g(t)m(yp)s(e)h
(c)m(hec)m(king)g(and)f(use)f(run-time)g(t)m(yp)s(e)h(c)m(hec)m(king)
Fp(cl_F)f Fr(and)h Fp(cl_R)e Fr(to)j(the)f(C)-30 1116
y(built-in)30 b(t)m(yp)s(es)h(`)p Fp(float)p Fr(')e(and)h(`)p
Fp(double)p Fr(')f(are)i(pro)m(vided)f(through)f(the)i(functions)-30
-1275 y Fp(float)e(cl_float_approx)d(\(const)j Fl(t)m(yp)s(e)5
-b Fp(&)30 b(x\))-30 1385 y(double)f(cl_double_approx)d(\(const)i
-Fl(t)m(yp)s(e)5 b Fp(&)31 b(x\))450 1494 y Fr(Returns)e(an)h(appro)m
+1275 y Fp(float)e(float_approx)e(\(const)i Fl(t)m(yp)s(e)5
+b Fp(&)30 b(x\))-30 1385 y(double)f(double_approx)d(\(const)j
+Fl(t)m(yp)s(e)5 b Fp(&)30 b(x\))450 1494 y Fr(Returns)f(an)h(appro)m
(ximation)f(of)h Fp(x)g Fr(of)g(C)f(t)m(yp)s(e)h Fl(ct)m(yp)s(e)p
Fr(.)41 b(If)29 b Fp(abs\(x\))f Fr(is)i(to)s(o)h(close)g(to)f(0)g
(\(under\015o)m(w\),)450 1604 y(0)h(is)f(returned.)40
b(unctions)53 b(on)g(n)l(um)l(b)t(ers)-30 600 y Fr(Eac)m(h)36
b(of)g(the)g(n)m(um)m(b)s(er)d(classes)k(declares)f(its)g(mathematical)
g(op)s(erations)g(in)f(the)h(corresp)s(onding)e(include)i(\014le.)-30
-709 y(F)-8 b(or)31 b(example,)f(if)g(y)m(our)g(co)s(de)g(op)s(erates)h
-(with)e(ob)5 b(jects)31 b(of)f(t)m(yp)s(e)h Fp(cl_I)p
-Fr(,)e(it)h(should)f Fp(#include)g(<cl_integer.h>)p Fr(.)-30
-1022 y Fs(4.1)68 b(Constructing)45 b(n)l(um)l(b)t(ers)-30
+709 y(F)-8 b(or)27 b(example,)g(if)f(y)m(our)g(co)s(de)h(op)s(erates)g
+(with)f(ob)5 b(jects)27 b(of)f(t)m(yp)s(e)g Fp(cl_I)p
+Fr(,)h(it)f(should)g Fp(#include)i(<cln/integer.h>)p
+Fr(.)-30 1022 y Fs(4.1)68 b(Constructing)45 b(n)l(um)l(b)t(ers)-30
1237 y Fr(Here)31 b(is)f(ho)m(w)h(to)g(create)h(n)m(um)m(b)s(er)c(ob)5
b(jects)31 b(\\from)e(nothing".)-30 1505 y Fn(4.1.1)63
b(Constructing)41 b(in)m(tegers)-30 1720 y Fp(cl_I)28
b Fp(&\))-30 862 y(bool)29 b(operator)f(!=)i(\(const)f
Fl(t)m(yp)s(e)5 b Fp(&,)30 b(const)f Fl(t)m(yp)s(e)5
b Fp(&\))450 971 y Fr(Comparison,)29 b(as)i(in)f(C)g(and)f(C)p
-Fp(++)p Fr(.)-30 1125 y Fp(uint32)g(cl_equal_hashcode)c(\(const)k
+Fp(++)p Fr(.)-30 1125 y Fp(uint32)g(equal_hashcode)d(\(const)j
Fl(t)m(yp)s(e)5 b Fp(&\))450 1235 y Fr(Returns)35 b(a)h(32-bit)h(hash)e
(co)s(de)h(that)g(is)g(the)g(same)f(for)h(an)m(y)g(t)m(w)m(o)h(n)m(um)m
(b)s(ers)c(whic)m(h)i(are)i(the)f(same)450 1345 y(according)24
Fp(cl_I)p Fr(,)h Fp(cl_F)p Fr(,)f Fp(cl_SF)p Fr(,)g Fp(cl_FF)p
Fr(,)h Fp(cl_DF)p Fr(,)f Fp(cl_LF)d Fr(de\014nes)h(the)g(follo)m(wing)
-30 1872 y(op)s(erations:)-30 2026 y Fp(cl_signean)28
-b(cl_compare)f(\(const)i Fl(t)m(yp)s(e)5 b Fp(&)30 b(x,)g(const)f
+b(compare)g(\(const)h Fl(t)m(yp)s(e)5 b Fp(&)30 b(x,)g(const)f
Fl(t)m(yp)s(e)5 b Fp(&)30 b(y\))450 2135 y Fr(Compares)f
Fp(x)h Fr(and)g Fp(y)p Fr(.)40 b(Returns)30 b Fp(+)p
Fr(1)g(if)g Fp(x>y)p Fr(,)g(-1)h(if)g Fp(x<y)p Fr(,)e(0)i(if)f
b(Returns)29 b Fp(x^y)g(=)h(exp\(y*log\(x\)\))p Fr(.)-30
3956 y(The)g(constan)m(t)i(e)e(=)g(exp\(1\))i(=)e(2.71828)6
b(.)24 b(.)f(.)41 b(is)31 b(returned)e(b)m(y)h(the)h(follo)m(wing)h
-(functions:)-30 4121 y Fp(cl_F)d(cl_exp1)g(\(cl_float_format_t)c(f\))
-450 4231 y Fr(Returns)k(e)i(as)g(a)g(\015oat)g(of)f(format)g
-Fp(f)p Fr(.)-30 4394 y Fp(cl_F)f(cl_exp1)g(\(const)f(cl_F&)h(y\))450
+(functions:)-30 4121 y Fp(cl_F)d(exp1)g(\(cl_float_format_t)d(f\))450
+4231 y Fr(Returns)j(e)i(as)g(a)g(\015oat)g(of)f(format)g
+Fp(f)p Fr(.)-30 4394 y Fp(cl_F)f(exp1)g(\(const)g(cl_F&)g(y\))450
4503 y Fr(Returns)g(e)i(in)f(the)h(\015oat)g(format)f(of)g
-Fp(y)p Fr(.)-30 4666 y Fp(cl_F)f(cl_exp1)g(\(void\))450
+Fp(y)p Fr(.)-30 4666 y Fp(cl_F)f(exp1)g(\(void\))450
4776 y Fr(Returns)g(e)i(as)g(a)g(\015oat)g(of)f(format)g
-Fp(cl_default_float_format)p Fr(.)-30 5007 y Fn(4.8.2)63
+Fp(default_float_format)p Fr(.)-30 5007 y Fn(4.8.2)63
b(T)-10 b(rigonometric)41 b(functions)-30 5230 y Fp(cl_R)29
b(sin)h(\(const)e(cl_R&)h(x\))450 5340 y Fr(Returns)g
Fp(sin\(x\))p Fr(.)39 b(The)30 b(range)h(of)g(the)f(result)g(is)h(the)f
b(al)32 b Fp(-1)e(<=)f(cos\(x\))g(<=)h(1)p Fr(.)-30 825
y Fp(cl_N)f(cos)h(\(const)e(cl_N&)h(x\))450 934 y Fr(Returns)g
Fp(cos\(z\))p Fr(.)39 b(The)30 b(range)h(of)g(the)f(result)g(is)h(the)f
-(en)m(tire)i(complex)e(plane.)-30 1088 y Fp(struct)f(cl_cos_sin_t)e({)j
-(cl_R)f(cos;)g(cl_R)g(sin;)h(};)-30 1198 y(cl_cos_sin_t)d(cl_cos_sin)h
-(\(const)g(cl_R&)h(x\))450 1307 y Fr(Returns)20 b(b)s(oth)h
+(en)m(tire)i(complex)e(plane.)-30 1088 y Fp(struct)f(cos_sin_t)f({)i
+(cl_R)f(cos;)g(cl_R)g(sin;)g(};)-30 1198 y(cos_sin_t)f(cos_sin)g
+(\(const)h(cl_R&)g(x\))450 1307 y Fr(Returns)20 b(b)s(oth)h
Fp(sin\(x\))f Fr(and)h Fp(cos\(x\))p Fr(.)36 b(This)20
b(is)i(more)e(e\016cien)m(t)j(than)e(computing)g(them)f(separately)-8
b(.)450 1417 y(The)30 b(relation)h Fp(cos^2)e(+)h(sin^2)f(=)h(1)g
b(on)f(n)m(um)m(b)s(ers)2523 b(19)-30 299 y(Arc)m(himedes')30
b(constan)m(t)i(pi)e(=)g(3.14)6 b(.)23 b(.)f(.)42 b(is)30
b(returned)g(b)m(y)g(the)g(follo)m(wing)i(functions:)-30
-469 y Fp(cl_F)d(cl_pi)g(\(cl_float_format_t)d(f\))450
-578 y Fr(Returns)j(pi)i(as)f(a)h(\015oat)g(of)f(format)g
-Fp(f)p Fr(.)-30 745 y Fp(cl_F)f(cl_pi)g(\(const)g(cl_F&)g(y\))450
+469 y Fp(cl_F)d(pi)h(\(cl_float_format_t)25 b(f\))450
+578 y Fr(Returns)k(pi)i(as)f(a)h(\015oat)g(of)f(format)g
+Fp(f)p Fr(.)-30 745 y Fp(cl_F)f(pi)h(\(const)f(cl_F&)g(y\))450
855 y Fr(Returns)g(pi)i(in)f(the)g(\015oat)h(format)f(of)g
-Fp(y)p Fr(.)-30 1021 y Fp(cl_F)f(cl_pi)g(\(void\))450
-1131 y Fr(Returns)g(pi)i(as)f(a)h(\015oat)g(of)f(format)g
-Fp(cl_default_float_format)p Fr(.)-30 1369 y Fn(4.8.3)63
+Fp(y)p Fr(.)-30 1021 y Fp(cl_F)f(pi)h(\(void\))450 1131
+y Fr(Returns)f(pi)i(as)f(a)h(\015oat)g(of)f(format)g
+Fp(default_float_format)p Fr(.)-30 1369 y Fn(4.8.3)63
b(Hyp)s(erb)s(olic)42 b(functions)-30 1597 y Fp(cl_R)29
b(sinh)g(\(const)g(cl_R&)g(x\))450 1707 y Fr(Returns)g
Fp(sinh\(x\))p Fr(.)-30 1873 y Fp(cl_N)g(sinh)g(\(const)g(cl_N&)g(z\))
Fr(.)-30 2425 y Fp(cl_N)f(cosh)g(\(const)g(cl_N&)g(z\))450
2535 y Fr(Returns)g Fp(cosh\(z\))p Fr(.)39 b(The)30 b(range)h(of)f(the)
h(result)f(is)h(the)f(en)m(tire)h(complex)g(plane.)-30
-2701 y Fp(struct)e(cl_cosh_sinh_t)d({)k(cl_R)f(cosh;)g(cl_R)h(sinh;)e
-(};)-30 2811 y(cl_cosh_sinh_t)e(cl_cosh_sinh)h(\(const)i(cl_R&)g(x\))
-450 2921 y Fr(Returns)i(b)s(oth)g Fp(sinh\(x\))f Fr(and)h
+2701 y Fp(struct)e(cosh_sinh_t)e({)j(cl_R)f(cosh;)g(cl_R)g(sinh;)g(};)
+-30 2811 y(cosh_sinh_t)e(cosh_sinh)h(\(const)h(cl_R&)g(x\))450
+2921 y Fr(Returns)i(b)s(oth)g Fp(sinh\(x\))f Fr(and)h
Fp(cosh\(x\))p Fr(.)43 b(This)31 b(is)h(more)f(e\016cien)m(t)i(than)f
(computing)f(them)f(sepa-)450 3030 y(rately)-8 b(.)42
b(The)30 b(relation)i Fp(cosh^2)c(-)i(sinh^2)f(=)h(1)g
b(on)f(n)m(um)m(b)s(ers)2523 b(20)-30 299 y Fn(4.8.4)63
b(Euler)40 b(gamma)-30 498 y Fr(Euler's)30 b(constan)m(t)i(C)e(=)g
(0.577)6 b(.)24 b(.)e(.)41 b(is)31 b(returned)e(b)m(y)h(the)h(follo)m
-(wing)h(functions:)-30 666 y Fp(cl_F)d(cl_eulerconst)e
-(\(cl_float_format_t)e(f\))450 776 y Fr(Returns)k(Euler's)i(constan)m
+(wing)h(functions:)-30 666 y Fp(cl_F)d(eulerconst)f
+(\(cl_float_format_t)d(f\))450 776 y Fr(Returns)k(Euler's)i(constan)m
(t)g(as)g(a)g(\015oat)g(of)f(format)g Fp(f)p Fr(.)-30
-942 y Fp(cl_F)f(cl_eulerconst)e(\(const)i(cl_F&)g(y\))450
+942 y Fp(cl_F)f(eulerconst)f(\(const)g(cl_F&)h(y\))450
1051 y Fr(Returns)g(Euler's)i(constan)m(t)g(in)f(the)h(\015oat)g
-(format)f(of)g Fp(y)p Fr(.)-30 1217 y Fp(cl_F)f(cl_eulerconst)e
-(\(void\))450 1326 y Fr(Returns)i(Euler's)i(constan)m(t)g(as)g(a)g
-(\015oat)g(of)f(format)g Fp(cl_default_float_format)p
-Fr(.)-30 1495 y(Catalan's)i(constan)m(t)f(G)g(=)f(0.915)6
-b(.)24 b(.)e(.)42 b(is)30 b(returned)f(b)m(y)h(the)h(follo)m(wing)h
-(functions:)-30 1664 y Fp(cl_F)d(cl_catalanconst)d(\(cl_float_format_t)
-g(f\))450 1773 y Fr(Returns)j(Catalan's)j(constan)m(t)g(as)e(a)h
-(\015oat)g(of)g(format)e Fp(f)p Fr(.)-30 1939 y Fp(cl_F)g
-(cl_catalanconst)d(\(const)j(cl_F&)g(y\))450 2048 y Fr(Returns)g
-(Catalan's)j(constan)m(t)g(in)e(the)g(\015oat)h(format)f(of)h
-Fp(y)p Fr(.)-30 2214 y Fp(cl_F)e(cl_catalanconst)d(\(void\))450
-2324 y Fr(Returns)j(Catalan's)j(constan)m(t)g(as)e(a)h(\015oat)g(of)g
-(format)e Fp(cl_default_float_format)p Fr(.)-30 2560
-y Fn(4.8.5)63 b(Riemann)39 b(zeta)-30 2759 y Fr(Riemann's)29
-b(zeta)j(function)e(at)h(an)g(in)m(tegral)h(p)s(oin)m(t)e
-Fp(s>1)f Fr(is)i(returned)e(b)m(y)h(the)h(follo)m(wing)h(functions:)-30
-2927 y Fp(cl_F)d(cl_zeta)g(\(int)g(s,)h(cl_float_format_t)25
-b(f\))450 3037 y Fr(Returns)k(Riemann's)h(zeta)i(function)e(at)h
-Fp(s)f Fr(as)g(a)h(\015oat)g(of)g(format)e Fp(f)p Fr(.)-30
-3203 y Fp(cl_F)g(cl_zeta)g(\(int)g(s,)h(const)f(cl_F&)f(y\))450
-3312 y Fr(Returns)h(Riemann's)h(zeta)i(function)e(at)h
+(format)f(of)g Fp(y)p Fr(.)-30 1217 y Fp(cl_F)f(eulerconst)f(\(void\))
+450 1326 y Fr(Returns)h(Euler's)i(constan)m(t)g(as)g(a)g(\015oat)g(of)f
+(format)g Fp(default_float_format)p Fr(.)-30 1495 y(Catalan's)i
+(constan)m(t)f(G)g(=)f(0.915)6 b(.)24 b(.)e(.)42 b(is)30
+b(returned)f(b)m(y)h(the)h(follo)m(wing)h(functions:)-30
+1664 y Fp(cl_F)d(catalanconst)e(\(cl_float_format_t)f(f\))450
+1773 y Fr(Returns)j(Catalan's)j(constan)m(t)g(as)e(a)h(\015oat)g(of)g
+(format)e Fp(f)p Fr(.)-30 1939 y Fp(cl_F)g(catalanconst)e(\(const)i
+(cl_F&)g(y\))450 2048 y Fr(Returns)g(Catalan's)j(constan)m(t)g(in)e
+(the)g(\015oat)h(format)f(of)h Fp(y)p Fr(.)-30 2214 y
+Fp(cl_F)e(catalanconst)e(\(void\))450 2324 y Fr(Returns)i(Catalan's)j
+(constan)m(t)g(as)e(a)h(\015oat)g(of)g(format)e Fp
+(default_float_format)p Fr(.)-30 2560 y Fn(4.8.5)63 b(Riemann)39
+b(zeta)-30 2759 y Fr(Riemann's)29 b(zeta)j(function)e(at)h(an)g(in)m
+(tegral)h(p)s(oin)m(t)e Fp(s>1)f Fr(is)i(returned)e(b)m(y)h(the)h
+(follo)m(wing)h(functions:)-30 2927 y Fp(cl_F)d(zeta)g(\(int)h(s,)f
+(cl_float_format_t)d(f\))450 3037 y Fr(Returns)j(Riemann's)h(zeta)i
+(function)e(at)h Fp(s)f Fr(as)g(a)h(\015oat)g(of)g(format)e
+Fp(f)p Fr(.)-30 3203 y Fp(cl_F)g(zeta)g(\(int)h(s,)f(const)g(cl_F&)g
+(y\))450 3312 y Fr(Returns)g(Riemann's)h(zeta)i(function)e(at)h
Fp(s)f Fr(in)g(the)g(\015oat)h(format)f(of)h Fp(y)p Fr(.)-30
-3478 y Fp(cl_F)e(cl_zeta)g(\(int)g(s\))450 3587 y Fr(Returns)g
-(Riemann's)h(zeta)i(function)e(at)h Fp(s)f Fr(as)g(a)h(\015oat)g(of)g
-(format)e Fp(cl_default_float_format)p Fr(.)-30 3860
-y Fs(4.9)68 b(F)-11 b(unctions)44 b(on)h(in)l(tegers)-30
-4155 y Fn(4.9.1)63 b(Logical)40 b(functions)-30 4354
-y Fr(In)m(tegers,)31 b(when)d(view)m(ed)j(as)f(in)f(t)m(w)m(o's)i
-(complemen)m(t)e(notation,)i(can)f(b)s(e)f(though)m(t)h(as)g
-(in\014nite)f(bit)h(strings)f(where)-30 4463 y(the)i(bits')f(v)-5
-b(alues)31 b(ev)m(en)m(tually)h(are)f(constan)m(t.)42
-b(F)-8 b(or)31 b(example,)401 4598 y Fp(17)47 b(=)h(......00010001)401
-4702 y(-6)f(=)h(......11111010)-30 4843 y Fr(The)33 b(logical)j(op)s
-(erations)e(view)g(in)m(tegers)h(as)f(suc)m(h)f(bit)h(strings)f(and)h
-(op)s(erate)g(on)f(eac)m(h)i(of)f(the)g(bit)g(p)s(ositions)f(in)-30
-4952 y(parallel.)-30 5121 y Fp(cl_I)c(lognot)g(\(const)g(cl_I&)f(x\))
--30 5230 y(cl_I)h(operator)f(~)i(\(const)f(cl_I&)g(x\))450
-5340 y Fr(Logical)j(not,)f(lik)m(e)h Fp(~x)e Fr(in)g(C.)g(This)g(is)g
-(the)h(same)e(as)i Fp(-1-x)p Fr(.)p eop
+3478 y Fp(cl_F)e(zeta)g(\(int)h(s\))450 3587 y Fr(Returns)f(Riemann's)h
+(zeta)i(function)e(at)h Fp(s)f Fr(as)g(a)h(\015oat)g(of)g(format)e
+Fp(default_float_format)p Fr(.)-30 3860 y Fs(4.9)68 b(F)-11
+b(unctions)44 b(on)h(in)l(tegers)-30 4155 y Fn(4.9.1)63
+b(Logical)40 b(functions)-30 4354 y Fr(In)m(tegers,)31
+b(when)d(view)m(ed)j(as)f(in)f(t)m(w)m(o's)i(complemen)m(t)e(notation,)
+i(can)f(b)s(e)f(though)m(t)h(as)g(in\014nite)f(bit)h(strings)f(where)
+-30 4463 y(the)i(bits')f(v)-5 b(alues)31 b(ev)m(en)m(tually)h(are)f
+(constan)m(t.)42 b(F)-8 b(or)31 b(example,)401 4598 y
+Fp(17)47 b(=)h(......00010001)401 4702 y(-6)f(=)h(......11111010)-30
+4843 y Fr(The)33 b(logical)j(op)s(erations)e(view)g(in)m(tegers)h(as)f
+(suc)m(h)f(bit)h(strings)f(and)h(op)s(erate)g(on)f(eac)m(h)i(of)f(the)g
+(bit)g(p)s(ositions)f(in)-30 4952 y(parallel.)-30 5121
+y Fp(cl_I)c(lognot)g(\(const)g(cl_I&)f(x\))-30 5230 y(cl_I)h(operator)f
+(~)i(\(const)f(cl_I&)g(x\))450 5340 y Fr(Logical)j(not,)f(lik)m(e)h
+Fp(~x)e Fr(in)g(C.)g(This)g(is)g(the)h(same)e(as)i Fp(-1-x)p
+Fr(.)p eop
%%Page: 21 23
21 22 bop -30 -116 a Fr(Chapter)30 b(4:)41 b(F)-8 b(unctions)31
b(on)f(n)m(um)m(b)s(ers)2523 b(21)-30 299 y Fp(cl_I)29
Fr(of)h Fp(x)p Fr(.)50 b(F)-8 b(or)34 b Fp(x)c(=)g(0.0)p
Fr(,)k(this)f(is)h(0.)50 b(F)-8 b(or)35 b Fp(x)e Fr(non-zero,)i(this)f
(is)f(the)h(unique)450 518 y(in)m(teger)e(with)e Fp(2^\(e-1\))e(<=)i
-(abs\(x\))f(<)h(2^e)p Fr(.)-30 692 y Fp(sintL)f(float_radix)e(\(const)i
-Fl(t)m(yp)s(e)5 b Fp(&)30 b(x\))450 802 y Fr(Returns)f(the)i(base)g(of)
+(abs\(x\))f(<)h(2^e)p Fr(.)-30 701 y Fp(sintL)f(float_radix)e(\(const)i
+Fl(t)m(yp)s(e)5 b Fp(&)30 b(x\))450 811 y Fr(Returns)f(the)i(base)g(of)
f(the)h(\015oating-p)s(oin)m(t)g(represen)m(tation.)42
-b(This)30 b(is)g(alw)m(a)m(ys)i Fp(2)p Fr(.)-30 976 y
+b(This)30 b(is)g(alw)m(a)m(ys)i Fp(2)p Fr(.)-30 994 y
Fl(t)m(yp)s(e)k Fp(float_sign)27 b(\(const)i Fl(t)m(yp)s(e)5
-b Fp(&)30 b(x\))450 1086 y Fr(Returns)f(the)i(sign)f
+b Fp(&)30 b(x\))450 1103 y Fr(Returns)f(the)i(sign)f
Fp(s)g Fr(of)h Fp(x)f Fr(as)h(a)f(\015oat.)42 b(The)30
b(v)-5 b(alue)31 b(is)f(1)h(for)f Fp(x)g(>)p Fr(=)g(0,)h(-1)g(for)f
-Fp(x)g(<)g Fr(0.)-30 1260 y Fp(uintL)f(float_digits)e(\(const)i
-Fl(t)m(yp)s(e)5 b Fp(&)30 b(x\))450 1370 y Fr(Returns)f(the)h(n)m(um)m
+Fp(x)g(<)g Fr(0.)-30 1287 y Fp(uintL)f(float_digits)e(\(const)i
+Fl(t)m(yp)s(e)5 b Fp(&)30 b(x\))450 1396 y Fr(Returns)f(the)h(n)m(um)m
(b)s(er)e(of)i(man)m(tissa)g(bits)g(in)g(the)g(\015oating-p)s(oin)m(t)h
(represen)m(tation)g(of)f Fp(x)p Fr(,)g(including)450
-1479 y(the)h(hidden)e(bit.)40 b(The)30 b(v)-5 b(alue)31
+1506 y(the)h(hidden)e(bit.)40 b(The)30 b(v)-5 b(alue)31
b(only)g(dep)s(ends)d(on)i(the)h(t)m(yp)s(e)f(of)h Fp(x)p
-Fr(,)f(not)h(on)f(its)h(v)-5 b(alue.)-30 1654 y Fp(uintL)29
+Fr(,)f(not)h(on)f(its)h(v)-5 b(alue.)-30 1689 y Fp(uintL)29
b(float_precision)d(\(const)j Fl(t)m(yp)s(e)5 b Fp(&)30
-b(x\))450 1763 y Fr(Returns)c(the)h(n)m(um)m(b)s(er)d(of)j
+b(x\))450 1798 y Fr(Returns)c(the)h(n)m(um)m(b)s(er)d(of)j
(signi\014can)m(t)h(man)m(tissa)f(bits)g(in)f(the)h(\015oating-p)s(oin)
-m(t)h(represen)m(tation)g(of)f Fp(x)p Fr(.)450 1873 y(Since)j
+m(t)h(represen)m(tation)g(of)f Fp(x)p Fr(.)450 1908 y(Since)j
(denormalized)e(n)m(um)m(b)s(ers)g(are)h(not)h(supp)s(orted,)e(this)i
(is)f(the)h(same)f(as)h Fp(float_digits\(x\))25 b Fr(if)450
-1983 y Fp(x)30 b Fr(is)g(non-zero,)i(and)d(0)i(if)f Fp(x)h
-Fr(=)f(0.)-30 2164 y(The)63 b(complete)h(in)m(ternal)h(represen)m
-(tation)f(of)g(a)g(\015oat)g(is)g(enco)s(ded)f(in)h(the)g(t)m(yp)s(e)f
-Fp(cl_decoded_float)-30 2274 y Fr(\(or)110 b Fp(cl_decoded_sfloat)p
-Fr(,)125 b Fp(cl_decoded_ffloat)p Fr(,)g Fp(cl_decoded_dfloat)p
-Fr(,)f Fp(cl_decoded_lfloat)p Fr(,)-30 2383 y(resp)s(ectiv)m(ely\),)32
-b(de\014ned)d(b)m(y)210 2527 y Fp(struct)46 b(cl_decoded_)p
-Fl(t)m(yp)s(e)5 b Fp(float)44 b({)592 2631 y Fl(t)m(yp)s(e)53
+2018 y Fp(x)30 b Fr(is)g(non-zero,)i(and)d(0)i(if)f Fp(x)h
+Fr(=)f(0.)-30 2213 y(The)f(complete)g(in)m(ternal)h(represen)m(tation)h
+(of)e(a)g(\015oat)h(is)g(enco)s(ded)e(in)h(the)h(t)m(yp)s(e)f
+Fp(decoded_float)d Fr(\(or)j Fp(decoded_)-30 2322 y(sfloat)p
+Fr(,)g Fp(decoded_ffloat)p Fr(,)e Fp(decoded_dfloat)p
+Fr(,)f Fp(decoded_lfloat)p Fr(,)h(resp)s(ectiv)m(ely\),)32
+b(de\014ned)e(b)m(y)210 2475 y Fp(struct)46 b(decoded_)p
+Fl(t)m(yp)s(e)5 b Fp(float)45 b({)592 2578 y Fl(t)m(yp)s(e)53
b Fp(mantissa;)45 b(cl_I)i(exponent;)e Fl(t)m(yp)s(e)53
-b Fp(sign;)210 2735 y(};)-30 2884 y Fr(and)30 b(returned)f(b)m(y)h(the)
-h(function)-30 3066 y Fp(cl_decoded_)p Fl(t)m(yp)s(e)5
-b Fp(float)26 b(decode_float)h(\(const)i Fl(t)m(yp)s(e)5
-b Fp(&)30 b(x\))450 3175 y Fr(F)-8 b(or)26 b Fp(x)e Fr(non-zero,)j
+b Fp(sign;)210 2682 y(};)-30 2840 y Fr(and)30 b(returned)f(b)m(y)h(the)
+h(function)-30 3035 y Fp(decoded_)p Fl(t)m(yp)s(e)5 b
+Fp(float)27 b(decode_float)g(\(const)i Fl(t)m(yp)s(e)5
+b Fp(&)30 b(x\))450 3145 y Fr(F)-8 b(or)26 b Fp(x)e Fr(non-zero,)j
(this)d(returns)g Fp(\(-1\)^s)p Fr(,)h Fp(e)p Fr(,)g
Fp(m)g Fr(with)f Fp(x)30 b(=)g(\(-1\)^s)f(*)h(2^e)g(*)g(m)24
-b Fr(and)g Fp(0.5)30 b(<=)g(m)g(<)g(1.0)p Fr(.)450 3285
+b Fr(and)g Fp(0.5)30 b(<=)g(m)g(<)g(1.0)p Fr(.)450 3255
y(F)-8 b(or)35 b Fp(x)f Fr(=)h(0,)h(it)f(returns)e Fp(\(-1\)^s)p
Fr(=1,)h Fp(e)p Fr(=0,)i Fp(m)p Fr(=0.)53 b Fp(e)34 b
Fr(is)g(the)h(same)f(as)h(returned)e(b)m(y)i(the)f(function)450
-3395 y Fp(float_exponent)p Fr(.)-30 3576 y(A)c(complete)h(deco)s(ding)g
+3364 y Fp(float_exponent)p Fr(.)-30 3559 y(A)c(complete)h(deco)s(ding)g
(in)f(terms)f(of)i(in)m(tegers)g(is)g(pro)m(vided)f(as)g(t)m(yp)s(e)210
-3760 y Fp(struct)46 b(cl_idecoded_float)d({)592 3864
+3712 y Fp(struct)46 b(cl_idecoded_float)d({)592 3815
y(cl_I)j(mantissa;)g(cl_I)g(exponent;)g(cl_I)g(sign;)210
-3967 y(};)-30 4117 y Fr(b)m(y)30 b(the)h(follo)m(wing)h(function:)-30
-4299 y Fp(cl_idecoded_float)26 b(integer_decode_float)e(\(const)29
-b Fl(t)m(yp)s(e)5 b Fp(&)31 b(x\))450 4408 y Fr(F)-8
+3919 y(};)-30 4077 y Fr(b)m(y)30 b(the)h(follo)m(wing)h(function:)-30
+4272 y Fp(cl_idecoded_float)26 b(integer_decode_float)e(\(const)29
+b Fl(t)m(yp)s(e)5 b Fp(&)31 b(x\))450 4382 y Fr(F)-8
b(or)38 b Fp(x)e Fr(non-zero,)k(this)d(returns)f Fp(\(-1\)^s)p
Fr(,)h Fp(e)p Fr(,)h Fp(m)f Fr(with)g Fp(x)30 b(=)g(\(-1\)^s)e(*)i(2^e)
-g(*)g(m)37 b Fr(and)f Fp(m)h Fr(an)g(in)m(teger)450 4518
+g(*)g(m)37 b Fr(and)f Fp(m)h Fr(an)g(in)m(teger)450 4491
y(with)e Fp(float_digits\(x\))30 b Fr(bits.)54 b(F)-8
b(or)36 b Fp(x)e Fr(=)h(0,)h(it)g(returns)d Fp(\(-1\)^s)p
Fr(=1,)i Fp(e)p Fr(=0,)h Fp(m)p Fr(=0.)54 b(W)-10 b(ARNING:)450
-4627 y(The)27 b(exp)s(onen)m(t)h Fp(e)f Fr(is)h(not)f(the)h(same)f(as)h
+4601 y(The)27 b(exp)s(onen)m(t)h Fp(e)f Fr(is)h(not)f(the)h(same)f(as)h
(the)g(one)g(returned)e(b)m(y)h(the)h(functions)f Fp(decode_float)e
-Fr(and)450 4737 y Fp(float_exponent)p Fr(.)-30 4919 y(Some)k(other)i
+Fr(and)450 4711 y Fp(float_exponent)p Fr(.)-30 4906 y(Some)k(other)i
(function,)f(implemen)m(ted)f(only)i(for)f(class)h Fp(cl_F)p
Fr(:)-30 5101 y Fp(cl_F)e(float_sign)f(\(const)g(cl_F&)h(x,)h(const)f
(cl_F&)g(y\))450 5210 y Fr(This)d(returns)g(a)i(\015oating)g(p)s(oin)m
1222 y(man)m(tissa)30 b(\(after)i(the)e(decimal)g(p)s(oin)m(t\).)-30
1397 y Fp(cl_float_format_t)c(cl_float_format)g(\(const)j(cl_F&)f(x\))
450 1507 y Fr(Returns)h(the)i(\015oating)g(p)s(oin)m(t)g(format)e(of)i
-Fp(x)p Fr(.)-30 1682 y Fp(cl_float_format_t)26 b
-(cl_default_float_format)450 1792 y Fr(Global)d(v)-5
-b(ariable:)37 b(the)23 b(default)f(\015oat)g(format)g(used)f(when)g
-(con)m(v)m(erting)j(rational)f(n)m(um)m(b)s(ers)c(to)k(\015oats.)-30
-1974 y(T)-8 b(o)30 b(con)m(v)m(ert)h(a)f(real)g(n)m(um)m(b)s(er)d(to)j
-(a)g(\015oat,)g(eac)m(h)h(of)e(the)h(t)m(yp)s(es)f Fp(cl_R)p
-Fr(,)g Fp(cl_F)p Fr(,)f Fp(cl_I)p Fr(,)h Fp(cl_RA)p Fr(,)g
-Fp(int)p Fr(,)f Fp(unsigned)h(int)p Fr(,)-30 2084 y Fp(float)p
-Fr(,)g Fp(double)g Fr(de\014nes)g(the)i(follo)m(wing)h(op)s(erations:)
--30 2267 y Fp(cl_F)d(cl_float)f(\(const)h Fl(t)m(yp)s(e)5
-b Fp(&x,)30 b(cl_float_format_t)25 b(f\))450 2376 y Fr(Returns)k
-Fp(x)h Fr(as)h(a)g(\015oat)g(of)f(format)g Fp(f)p Fr(.)-30
-2551 y Fp(cl_F)f(cl_float)f(\(const)h Fl(t)m(yp)s(e)5
-b Fp(&x,)30 b(const)f(cl_F&)g(y\))450 2661 y Fr(Returns)g
-Fp(x)h Fr(in)h(the)f(\015oat)h(format)f(of)g Fp(y)p Fr(.)-30
-2836 y Fp(cl_F)f(cl_float)f(\(const)h Fl(t)m(yp)s(e)5
-b Fp(&x\))450 2945 y Fr(Returns)29 b Fp(x)g Fr(as)h(a)g(\015oat)g(of)f
-(format)g Fp(cl_default_float_format)23 b Fr(if)30 b(it)g(is)g(an)f
-(exact)i(n)m(um)m(b)s(er,)d(or)h Fp(x)450 3055 y Fr(itself)i(if)g(it)f
-(is)h(already)g(a)g(\015oat.)-30 3238 y(Of)f(course,)h(con)m(v)m
-(erting)h(a)f(n)m(um)m(b)s(er)d(to)j(a)f(\015oat)i(can)e(lose)h
-(precision.)-30 3388 y(Ev)m(ery)g(\015oating-p)s(oin)m(t)g(format)f
-(has)g(some)g(c)m(haracteristic)j(n)m(um)m(b)s(ers:)-30
-3571 y Fp(cl_F)c(most_positive_float)c(\(cl_float_format_t)h(f\))450
-3680 y Fr(Returns)j(the)i(largest)h(\(most)e(p)s(ositiv)m(e\))i
-(\015oating)f(p)s(oin)m(t)f(n)m(um)m(b)s(er)e(in)i(\015oat)h(format)f
-Fp(f)p Fr(.)-30 3855 y Fp(cl_F)f(most_negative_float)c
-(\(cl_float_format_t)h(f\))450 3965 y Fr(Returns)j(the)i(smallest)g
-(\(most)f(negativ)m(e\))j(\015oating)e(p)s(oin)m(t)f(n)m(um)m(b)s(er)e
-(in)i(\015oat)h(format)f Fp(f)p Fr(.)-30 4140 y Fp(cl_F)f
-(least_positive_float)c(\(cl_float_format_t)g(f\))450
-4249 y Fr(Returns)g(the)h(least)h(p)s(ositiv)m(e)g(\015oating)g(p)s
-(oin)m(t)e(n)m(um)m(b)s(er)f(\(i.e.)40 b Fp(>)26 b Fr(0)g(but)f
-(closest)i(to)g(0\))g(in)e(\015oat)i(format)450 4359
-y Fp(f)p Fr(.)-30 4534 y Fp(cl_F)i(least_negative_float)c
+Fp(x)p Fr(.)-30 1682 y Fp(cl_float_format_t)26 b(default_float_format)
+450 1792 y Fr(Global)d(v)-5 b(ariable:)37 b(the)23 b(default)f(\015oat)
+g(format)g(used)f(when)g(con)m(v)m(erting)j(rational)f(n)m(um)m(b)s
+(ers)c(to)k(\015oats.)-30 1974 y(T)-8 b(o)30 b(con)m(v)m(ert)h(a)f
+(real)g(n)m(um)m(b)s(er)d(to)j(a)g(\015oat,)g(eac)m(h)h(of)e(the)h(t)m
+(yp)s(es)f Fp(cl_R)p Fr(,)g Fp(cl_F)p Fr(,)f Fp(cl_I)p
+Fr(,)h Fp(cl_RA)p Fr(,)g Fp(int)p Fr(,)f Fp(unsigned)h(int)p
+Fr(,)-30 2084 y Fp(float)p Fr(,)g Fp(double)g Fr(de\014nes)g(the)i
+(follo)m(wing)h(op)s(erations:)-30 2267 y Fp(cl_F)d(cl_float)f(\(const)
+h Fl(t)m(yp)s(e)5 b Fp(&x,)30 b(cl_float_format_t)25
+b(f\))450 2376 y Fr(Returns)k Fp(x)h Fr(as)h(a)g(\015oat)g(of)f(format)
+g Fp(f)p Fr(.)-30 2551 y Fp(cl_F)f(cl_float)f(\(const)h
+Fl(t)m(yp)s(e)5 b Fp(&x,)30 b(const)f(cl_F&)g(y\))450
+2661 y Fr(Returns)g Fp(x)h Fr(in)h(the)f(\015oat)h(format)f(of)g
+Fp(y)p Fr(.)-30 2836 y Fp(cl_F)f(cl_float)f(\(const)h
+Fl(t)m(yp)s(e)5 b Fp(&x\))450 2945 y Fr(Returns)24 b
+Fp(x)g Fr(as)h(a)g(\015oat)h(of)f(format)f Fp(default_float_format)19
+b Fr(if)24 b(it)i(is)e(an)h(exact)h(n)m(um)m(b)s(er,)e(or)h
+Fp(x)f Fr(itself)450 3055 y(if)30 b(it)h(is)g(already)g(a)f(\015oat.)
+-30 3238 y(Of)g(course,)h(con)m(v)m(erting)h(a)f(n)m(um)m(b)s(er)d(to)j
+(a)f(\015oat)i(can)e(lose)h(precision.)-30 3388 y(Ev)m(ery)g
+(\015oating-p)s(oin)m(t)g(format)f(has)g(some)g(c)m(haracteristic)j(n)m
+(um)m(b)s(ers:)-30 3571 y Fp(cl_F)c(most_positive_float)c
+(\(cl_float_format_t)h(f\))450 3680 y Fr(Returns)j(the)i(largest)h
+(\(most)e(p)s(ositiv)m(e\))i(\015oating)f(p)s(oin)m(t)f(n)m(um)m(b)s
+(er)e(in)i(\015oat)h(format)f Fp(f)p Fr(.)-30 3855 y
+Fp(cl_F)f(most_negative_float)c(\(cl_float_format_t)h(f\))450
+3965 y Fr(Returns)j(the)i(smallest)g(\(most)f(negativ)m(e\))j
+(\015oating)e(p)s(oin)m(t)f(n)m(um)m(b)s(er)e(in)i(\015oat)h(format)f
+Fp(f)p Fr(.)-30 4140 y Fp(cl_F)f(least_positive_float)c
+(\(cl_float_format_t)g(f\))450 4249 y Fr(Returns)g(the)h(least)h(p)s
+(ositiv)m(e)g(\015oating)g(p)s(oin)m(t)e(n)m(um)m(b)s(er)f(\(i.e.)40
+b Fp(>)26 b Fr(0)g(but)f(closest)i(to)g(0\))g(in)e(\015oat)i(format)450
+4359 y Fp(f)p Fr(.)-30 4534 y Fp(cl_F)i(least_negative_float)c
(\(cl_float_format_t)g(f\))450 4644 y Fr(Returns)e(the)i(least)h
(negativ)m(e)g(\015oating)g(p)s(oin)m(t)e(n)m(um)m(b)s(er)e(\(i.e.)40
b Fp(<)24 b Fr(0)h(but)e(closest)j(to)f(0\))g(in)g(\015oat)g(format)450
(has)150 1991 y Fp(cl_float\(rational\(x\),x\))24 b(=)30
b(x)150 2122 y(cl_float\(rationalize\(x\),)o(x\))24 b(=)30
b(x)-30 2367 y Fs(4.12)68 b(Random)46 b(n)l(um)l(b)t(er)e(generators)
--30 2556 y Fr(A)31 b(random)e(generator)k(is)e(a)g(mac)m(hine)g(whic)m
-(h)g(pro)s(duces)f(\(pseudo-\)random)f(n)m(um)m(b)s(ers.)41
-b(The)30 b(include)h(\014le)g Fp(<cl_)-30 2666 y(random.h>)c
-Fr(de\014nes)h(a)i(class)g Fp(cl_random_state)25 b Fr(whic)m(h)k(con)m
-(tains)h(the)g(state)h(of)e(a)h(random)d(generator.)42
-b(If)29 b(y)m(ou)-30 2775 y(mak)m(e)i(a)g(cop)m(y)h(of)f(the)h(random)d
-(n)m(um)m(b)s(er)f(generator,)33 b(the)e(original)h(one)g(and)e(the)h
-(cop)m(y)h(will)f(pro)s(duce)f(the)i(same)-30 2885 y(sequence)f(of)f
-(random)f(n)m(um)m(b)s(ers.)-30 3015 y(The)j(follo)m(wing)i(functions)d
-(return)h(\(pseudo-\)random)e(n)m(um)m(b)s(ers)g(in)i(di\013eren)m(t)h
-(formats.)45 b(Calling)33 b(one)g(of)f(these)-30 3125
-y(mo)s(di\014es)d(the)h(state)i(of)e(the)h(random)e(n)m(um)m(b)s(er)f
-(generator)j(in)f(a)h(complicated)g(but)f(deterministic)g(w)m(a)m(y)-8
-b(.)-30 3255 y(The)30 b(global)i(v)-5 b(ariable)210 3380
-y Fp(cl_random_state)44 b(cl_default_random_state)-30
-3511 y Fr(con)m(tains)29 b(a)f(default)f(random)f(n)m(um)m(b)s(er)f
-(generator.)41 b(It)28 b(is)f(used)g(when)g(the)g(functions)h(b)s(elo)m
-(w)f(are)h(called)h(without)-30 3620 y Fp(cl_random_state)d
-Fr(argumen)m(t.)-30 3772 y Fp(uint32)j(random32)f(\(cl_random_state&)d
-(randomstate\))-30 3881 y(uint32)k(random32)f(\(\))450
-3991 y Fr(Returns)h(a)i(random)e(unsigned)g(32-bit)j(n)m(um)m(b)s(er.)
-38 b(All)31 b(bits)f(are)h(equally)g(random.)-30 4143
-y Fp(cl_I)e(random_I)f(\(cl_random_state&)e(randomstate,)h(const)i
-(cl_I&)g(n\))-30 4252 y(cl_I)g(random_I)f(\(const)h(cl_I&)g(n\))450
-4362 y(n)i Fr(m)m(ust)e(b)s(e)h(an)h(in)m(teger)h Fp(>)f
-Fr(0.)42 b(This)31 b(function)f(returns)g(a)h(random)e(in)m(teger)j
-Fp(x)f Fr(in)f(the)h(range)g Fp(0)g(<=)e(x)450 4471 y(<)h(n)p
-Fr(.)-30 4623 y Fp(cl_F)f(random_F)f(\(cl_random_state&)e(randomstate,)
-h(const)i(cl_F&)g(n\))-30 4732 y(cl_F)g(random_F)f(\(const)h(cl_F&)g
-(n\))450 4842 y(n)d Fr(m)m(ust)f(b)s(e)h(a)h(\015oat)g
-Fp(>)f Fr(0.)40 b(This)26 b(function)g(returns)f(a)i(random)d
+-30 2556 y Fr(A)j(random)e(generator)j(is)f(a)h(mac)m(hine)e(whic)m(h)h
+(pro)s(duces)e(\(pseudo-\)random)h(n)m(um)m(b)s(ers.)88
+b(The)46 b(include)h(\014le)-30 2666 y Fp(<cln/random.h>)40
+b Fr(de\014nes)j(a)h(class)h Fp(random_state)c Fr(whic)m(h)i(con)m
+(tains)j(the)e(state)h(of)f(a)g(random)f(generator.)-30
+2775 y(If)29 b(y)m(ou)g(mak)m(e)g(a)g(cop)m(y)h(of)f(the)h(random)d(n)m
+(um)m(b)s(er)g(generator,)j(the)g(original)g(one)f(and)f(the)i(cop)m(y)
+f(will)h(pro)s(duce)e(the)-30 2885 y(same)i(sequence)h(of)f(random)f(n)
+m(um)m(b)s(ers.)-30 3015 y(The)j(follo)m(wing)i(functions)d(return)h
+(\(pseudo-\)random)e(n)m(um)m(b)s(ers)g(in)i(di\013eren)m(t)h(formats.)
+45 b(Calling)33 b(one)g(of)f(these)-30 3125 y(mo)s(di\014es)d(the)h
+(state)i(of)e(the)h(random)e(n)m(um)m(b)s(er)f(generator)j(in)f(a)h
+(complicated)g(but)f(deterministic)g(w)m(a)m(y)-8 b(.)-30
+3255 y(The)30 b(global)i(v)-5 b(ariable)210 3380 y Fp(random_state)44
+b(default_random_state)-30 3511 y Fr(con)m(tains)29 b(a)f(default)f
+(random)f(n)m(um)m(b)s(er)f(generator.)41 b(It)28 b(is)f(used)g(when)g
+(the)g(functions)h(b)s(elo)m(w)f(are)h(called)h(without)-30
+3620 y Fp(random_state)e Fr(argumen)m(t.)-30 3772 y Fp(uint32)i
+(random32)f(\(random_state&)e(randomstate\))-30 3881
+y(uint32)j(random32)f(\(\))450 3991 y Fr(Returns)h(a)i(random)e
+(unsigned)g(32-bit)j(n)m(um)m(b)s(er.)38 b(All)31 b(bits)f(are)h
+(equally)g(random.)-30 4143 y Fp(cl_I)e(random_I)f(\(random_state&)f
+(randomstate,)g(const)i(cl_I&)g(n\))-30 4252 y(cl_I)g(random_I)f
+(\(const)h(cl_I&)g(n\))450 4362 y(n)i Fr(m)m(ust)e(b)s(e)h(an)h(in)m
+(teger)h Fp(>)f Fr(0.)42 b(This)31 b(function)f(returns)g(a)h(random)e
+(in)m(teger)j Fp(x)f Fr(in)f(the)h(range)g Fp(0)g(<=)e(x)450
+4471 y(<)h(n)p Fr(.)-30 4623 y Fp(cl_F)f(random_F)f(\(random_state&)f
+(randomstate,)g(const)i(cl_F&)g(n\))-30 4732 y(cl_F)g(random_F)f
+(\(const)h(cl_F&)g(n\))450 4842 y(n)d Fr(m)m(ust)f(b)s(e)h(a)h(\015oat)
+g Fp(>)f Fr(0.)40 b(This)26 b(function)g(returns)f(a)i(random)d
(\015oating-p)s(oin)m(t)k(n)m(um)m(b)s(er)c(of)j(the)g(same)450
4952 y(format)j(as)g Fp(n)g Fr(in)g(the)h(range)g Fp(0)f(<=)f(x)i(<)f
-(n)p Fr(.)-30 5103 y Fp(cl_R)f(random_R)f(\(cl_random_state&)e
-(randomstate,)h(const)i(cl_R&)g(n\))-30 5213 y(cl_R)g(random_R)f
+(n)p Fr(.)-30 5103 y Fp(cl_R)f(random_R)f(\(random_state&)f
+(randomstate,)g(const)i(cl_R&)g(n\))-30 5213 y(cl_R)g(random_R)f
(\(const)h(cl_R&)g(n\))450 5322 y Fr(Beha)m(v)m(es)j(lik)m(e)g
Fp(random_I)c Fr(if)i Fp(n)g Fr(is)h(an)f(in)m(teger)i(and)e(lik)m(e)h
Fp(random_F)d Fr(if)j Fp(n)f Fr(is)g(a)h(\015oat.)p eop
Fl(realpart)32 b(imagpart)r Fp(\))p Fr(.)p eop
%%Page: 29 31
29 30 bop -30 -116 a Fr(Chapter)30 b(5:)41 b(Input/Output)2844
-b(29)-30 299 y Fs(5.2)68 b(Input)44 b(functions)-30 491
-y Fr(Including)28 b Fp(<cl_io.h>)e Fr(de\014nes)h(a)i(t)m(yp)s(e)g
-Fp(cl_istream)p Fr(,)d(whic)m(h)i(is)h(the)g(t)m(yp)s(e)f(of)h(the)g
-(\014rst)e(argumen)m(t)h(to)h(all)h(input)-30 601 y(functions.)40
-b(Unless)28 b(y)m(ou)h(build)f(and)g(use)g(CLN)h(with)f(the)h(macro)f
-(CL)p 2391 601 28 4 v 32 w(IO)p 2527 601 V 33 w(STDIO)f(b)s(eing)i
-(de\014ned,)f Fp(cl_istream)-30 710 y Fr(is)i(the)h(same)f(as)g
-Fp(istream&)p Fr(.)-30 844 y(The)g(v)-5 b(ariable)150
-978 y Fp(cl_istream)28 b(cl_stdin)-30 1137 y Fr(con)m(tains)k(the)e
-(standard)g(input)f(stream.)-30 1271 y(These)h(are)h(the)f(simple)g
-(input)f(functions:)-30 1430 y Fp(int)g(freadchar)f(\(cl_istream)g
-(stream\))450 1539 y Fr(Reads)37 b(a)f(c)m(haracter)j(from)c
-Fp(stream)p Fr(.)57 b(Returns)35 b Fp(cl_EOF)g Fr(\(not)i(a)g(`)p
+b(29)-30 299 y Fs(5.2)68 b(Input)44 b(functions)-30 486
+y Fr(Including)25 b Fp(<cln/io.h>)d Fr(de\014nes)j(a)h(t)m(yp)s(e)f
+Fp(cl_istream)p Fr(,)f(whic)m(h)i(is)f(the)h(t)m(yp)s(e)f(of)h(the)g
+(\014rst)e(argumen)m(t)h(to)i(all)f(input)-30 595 y(functions.)40
+b Fp(cl_istream)28 b Fr(is)i(the)h(same)f(as)g Fp(std::istream&)p
+Fr(.)-30 724 y(The)g(v)-5 b(ariable)150 852 y Fp(cl_istream)28
+b(stdin)-30 1000 y Fr(con)m(tains)k(the)e(standard)g(input)f(stream.)
+-30 1129 y(These)h(are)h(the)f(simple)g(input)f(functions:)-30
+1276 y Fp(int)g(freadchar)f(\(cl_istream)g(stream\))450
+1386 y Fr(Reads)37 b(a)f(c)m(haracter)j(from)c Fp(stream)p
+Fr(.)57 b(Returns)35 b Fp(cl_EOF)g Fr(\(not)i(a)g(`)p
Fp(char)p Fr('!\))59 b(if)36 b(the)h(end)f(of)h(stream)450
-1649 y(w)m(as)31 b(encoun)m(tered)g(or)f(an)g(error)g(o)s(ccurred.)-30
-1807 y Fp(int)f(funreadchar)f(\(cl_istream)f(stream,)h(int)i(c\))450
-1917 y Fr(Puts)41 b(bac)m(k)h Fp(c)f Fr(on)m(to)i Fp(stream)p
+1495 y(w)m(as)31 b(encoun)m(tered)g(or)f(an)g(error)g(o)s(ccurred.)-30
+1643 y Fp(int)f(funreadchar)f(\(cl_istream)f(stream,)h(int)i(c\))450
+1753 y Fr(Puts)41 b(bac)m(k)h Fp(c)f Fr(on)m(to)i Fp(stream)p
Fr(.)72 b Fp(c)41 b Fr(m)m(ust)f(b)s(e)h(the)h(result)f(of)g(the)h
-(last)g Fp(freadchar)d Fr(op)s(eration)j(on)450 2027
-y Fp(stream)p Fr(.)-30 2185 y(Eac)m(h)d(of)f(the)g(classes)h
-Fp(cl_N)p Fr(,)g Fp(cl_R)p Fr(,)g Fp(cl_RA)p Fr(,)g Fp(cl_I)p
-Fr(,)g Fp(cl_F)p Fr(,)g Fp(cl_SF)p Fr(,)g Fp(cl_FF)p
-Fr(,)g Fp(cl_DF)p Fr(,)f Fp(cl_LF)f Fr(de\014nes,)i(in)f
-Fp(<cl_)-30 2295 y Fl(t)m(yp)s(e)5 b Fp(_io.h>)p Fr(,)29
-b(the)i(follo)m(wing)h(input)d(function:)-30 2453 y Fp(cl_istream)f
-(operator>>)f(\(cl_istream)g(stream,)i Fl(t)m(yp)s(e)5
-b Fp(&)30 b(result\))450 2563 y Fr(Reads)g(a)h(n)m(um)m(b)s(er)d(from)h
-Fp(stream)g Fr(and)h(stores)g(it)h(in)f(the)h Fp(result)p
-Fr(.)-30 2721 y(The)f(most)g(\015exible)g(input)g(functions,)g
-(de\014ned)f(in)h Fp(<cl_)p Fl(t)m(yp)s(e)5 b Fp(_io.h>)p
-Fr(,)28 b(are)j(the)f(follo)m(wing:)-30 2880 y Fp(cl_N)f(read_complex)e
-(\(cl_istream)h(stream,)g(const)h(cl_read_flags&)d(flags\))-30
-2990 y(cl_R)j(read_real)f(\(cl_istream)f(stream,)i(const)g
-(cl_read_flags&)d(flags\))-30 3099 y(cl_F)j(read_float)f(\(cl_istream)f
-(stream,)h(const)h(cl_read_flags&)e(flags\))-30 3209
-y(cl_RA)i(read_rational)e(\(cl_istream)g(stream,)h(const)h
-(cl_read_flags&)e(flags\))-30 3318 y(cl_I)i(read_integer)e
+(last)g Fp(freadchar)d Fr(op)s(eration)j(on)450 1862
+y Fp(stream)p Fr(.)-30 2010 y(Eac)m(h)53 b(of)f(the)g(classes)i
+Fp(cl_N)p Fr(,)i Fp(cl_R)p Fr(,)h Fp(cl_RA)p Fr(,)f Fp(cl_I)p
+Fr(,)h Fp(cl_F)p Fr(,)f Fp(cl_SF)p Fr(,)h Fp(cl_FF)p
+Fr(,)f Fp(cl_DF)p Fr(,)h Fp(cl_LF)50 b Fr(de\014nes,)57
+b(in)-30 2119 y Fp(<cln/)p Fl(t)m(yp)s(e)5 b Fp(_io.h>)p
+Fr(,)28 b(the)i(follo)m(wing)i(input)e(function:)-30
+2267 y Fp(cl_istream)e(operator>>)f(\(cl_istream)g(stream,)i
+Fl(t)m(yp)s(e)5 b Fp(&)30 b(result\))450 2377 y Fr(Reads)g(a)h(n)m(um)m
+(b)s(er)d(from)h Fp(stream)g Fr(and)h(stores)g(it)h(in)f(the)h
+Fp(result)p Fr(.)-30 2524 y(The)f(most)g(\015exible)g(input)g
+(functions,)g(de\014ned)f(in)h Fp(<cln/)p Fl(t)m(yp)s(e)5
+b Fp(_io.h>)p Fr(,)28 b(are)j(the)f(follo)m(wing:)-30
+2672 y Fp(cl_N)f(read_complex)e(\(cl_istream)h(stream,)g(const)h
+(cl_read_flags&)d(flags\))-30 2781 y(cl_R)j(read_real)f(\(cl_istream)f
+(stream,)i(const)g(cl_read_flags&)d(flags\))-30 2891
+y(cl_F)j(read_float)f(\(cl_istream)f(stream,)h(const)h(cl_read_flags&)e
+(flags\))-30 3001 y(cl_RA)i(read_rational)e(\(cl_istream)g(stream,)h
+(const)h(cl_read_flags&)e(flags\))-30 3110 y(cl_I)i(read_integer)e
(\(cl_istream)h(stream,)g(const)h(cl_read_flags&)d(flags\))450
-3428 y Fr(Reads)i(a)g(n)m(um)m(b)s(er)e(from)g Fp(stream)p
+3220 y Fr(Reads)i(a)g(n)m(um)m(b)s(er)e(from)g Fp(stream)p
Fr(.)38 b(The)27 b Fp(flags)g Fr(are)h(parameters)f(whic)m(h)h
-(a\013ect)h(the)f(input)f(syn)m(tax.)450 3538 y(Whitespace)32
+(a\013ect)h(the)f(input)f(syn)m(tax.)450 3329 y(Whitespace)32
b(b)s(efore)e(the)g(n)m(um)m(b)s(er)e(is)j(silen)m(tly)h(skipp)s(ed.)
--30 3696 y Fp(cl_N)d(read_complex)e(\(const)i(cl_read_flags&)d(flags,)j
-(const)g(char)g(*)h(string,)f(const)g(char)g(*)-30 3806
+-30 3477 y Fp(cl_N)d(read_complex)e(\(const)i(cl_read_flags&)d(flags,)j
+(const)g(char)g(*)h(string,)f(const)g(char)g(*)-30 3587
y(string_limit,)e(const)i(char)g(*)h(*)g(end_of_parse\))-30
-3915 y(cl_R)f(read_real)f(\(const)h(cl_read_flags&)d(flags,)j(const)g
-(char)g(*)h(string,)e(const)h(char)h(*)-30 4025 y(string_limit,)d
-(const)i(char)g(*)h(*)g(end_of_parse\))-30 4134 y(cl_F)f(read_float)f
+3696 y(cl_R)f(read_real)f(\(const)h(cl_read_flags&)d(flags,)j(const)g
+(char)g(*)h(string,)e(const)h(char)h(*)-30 3806 y(string_limit,)d
+(const)i(char)g(*)h(*)g(end_of_parse\))-30 3915 y(cl_F)f(read_float)f
(\(const)g(cl_read_flags&)f(flags,)i(const)g(char)g(*)h(string,)e
-(const)h(char)g(*)-30 4244 y(string_limit,)e(const)i(char)g(*)h(*)g
-(end_of_parse\))-30 4354 y(cl_RA)f(read_rational)e(\(const)h
+(const)h(char)g(*)-30 4025 y(string_limit,)e(const)i(char)g(*)h(*)g
+(end_of_parse\))-30 4134 y(cl_RA)f(read_rational)e(\(const)h
(cl_read_flags&)f(flags,)h(const)h(char)h(*)g(string,)e(const)h(char)g
-(*)-30 4463 y(string_limit,)e(const)i(char)g(*)h(*)g(end_of_parse\))-30
-4573 y(cl_I)f(read_integer)e(\(const)i(cl_read_flags&)d(flags,)j(const)
-g(char)g(*)h(string,)f(const)g(char)g(*)-30 4682 y(string_limit,)e
-(const)i(char)g(*)h(*)g(end_of_parse\))450 4792 y Fr(Reads)k(a)h(n)m
+(*)-30 4244 y(string_limit,)e(const)i(char)g(*)h(*)g(end_of_parse\))-30
+4354 y(cl_I)f(read_integer)e(\(const)i(cl_read_flags&)d(flags,)j(const)
+g(char)g(*)h(string,)f(const)g(char)g(*)-30 4463 y(string_limit,)e
+(const)i(char)g(*)h(*)g(end_of_parse\))450 4573 y Fr(Reads)k(a)h(n)m
(um)m(b)s(er)d(from)g(a)j(string)f(in)g(memory)-8 b(.)50
b(The)34 b Fp(flags)e Fr(are)j(parameters)e(whic)m(h)h(a\013ect)i(the)
-450 4902 y(input)31 b(syn)m(tax.)46 b(The)31 b(string)h(starts)g(at)h
+450 4682 y(input)31 b(syn)m(tax.)46 b(The)31 b(string)h(starts)g(at)h
Fp(string)d Fr(and)i(ends)f(at)h Fp(string_limit)d Fr(\(exclusiv)m(e)34
-b(limit\).)450 5011 y Fp(string_limit)29 b Fr(ma)m(y)i(also)i(b)s(e)f
+b(limit\).)450 4792 y Fp(string_limit)29 b Fr(ma)m(y)i(also)i(b)s(e)f
Fp(NULL)p Fr(,)f(denoting)i(the)f(en)m(tire)h(string,)g(i.e.)47
-b(equiv)-5 b(alen)m(t)33 b(to)g Fp(string_)450 5121 y(limit)c(=)h
+b(equiv)-5 b(alen)m(t)33 b(to)g Fp(string_)450 4902 y(limit)c(=)h
(string)f(+)h(strlen\(string\))p Fr(.)75 b(If)42 b Fp(end_of_parse)e
Fr(is)j Fp(NULL)p Fr(,)j(the)d(string)g(in)g(memory)450
-5230 y(m)m(ust)30 b(con)m(tain)j(exactly)g(one)f(n)m(um)m(b)s(er)d(and)
+5011 y(m)m(ust)30 b(con)m(tain)j(exactly)g(one)f(n)m(um)m(b)s(er)d(and)
i(nothing)g(more,)g(else)i(a)f(fatal)g(error)f(will)h(b)s(e)f
-(signalled.)450 5340 y(If)37 b Fp(end_of_parse)d Fr(is)k(not)g
+(signalled.)450 5121 y(If)37 b Fp(end_of_parse)d Fr(is)k(not)g
Fp(NULL)p Fr(,)g Fp(*end_of_parse)c Fr(will)k(b)s(e)f(assigned)h(a)g(p)
-s(oin)m(ter)g(past)f(the)h(last)p eop
+s(oin)m(ter)g(past)f(the)h(last)450 5230 y(parsed)32
+b(c)m(haracter)h(\(i.e.)48 b Fp(string_limit)29 b Fr(if)j(nothing)g
+(came)g(after)h(the)g(n)m(um)m(b)s(er\).)44 b(Whitespace)34
+b(is)450 5340 y(not)d(allo)m(w)m(ed.)p eop
%%Page: 30 32
30 31 bop -30 -116 a Fr(Chapter)30 b(5:)41 b(Input/Output)2844
-b(30)450 299 y(parsed)32 b(c)m(haracter)h(\(i.e.)48 b
-Fp(string_limit)29 b Fr(if)j(nothing)g(came)g(after)h(the)g(n)m(um)m(b)
-s(er\).)44 b(Whitespace)34 b(is)450 408 y(not)d(allo)m(w)m(ed.)-30
-565 y(The)f(structure)g Fp(cl_read_flags)d Fr(con)m(tains)k(the)g
-(follo)m(wing)g(\014elds:)-30 721 y Fp(cl_read_syntax_t)26
-b(syntax)450 830 y Fr(The)i(p)s(ossible)f(results)h(of)g(the)h(read)f
-(op)s(eration.)40 b(P)m(ossible)29 b(v)-5 b(alues)28
-b(are)h Fp(syntax_number)p Fr(,)c Fp(syntax_)450 940
-y(real)p Fr(,)49 b Fp(syntax_rational)p Fr(,)e Fp(syntax_integer)p
+b(30)-30 299 y(The)30 b(structure)g Fp(cl_read_flags)d
+Fr(con)m(tains)k(the)g(follo)m(wing)g(\014elds:)-30 461
+y Fp(cl_read_syntax_t)26 b(syntax)450 570 y Fr(The)i(p)s(ossible)f
+(results)h(of)g(the)h(read)f(op)s(eration.)40 b(P)m(ossible)29
+b(v)-5 b(alues)28 b(are)h Fp(syntax_number)p Fr(,)c Fp(syntax_)450
+680 y(real)p Fr(,)49 b Fp(syntax_rational)p Fr(,)e Fp(syntax_integer)p
Fr(,)g Fp(syntax_float)p Fr(,)g Fp(syntax_sfloat)p Fr(,)g
-Fp(syntax_)450 1050 y(ffloat)p Fr(,)29 b Fp(syntax_dfloat)p
-Fr(,)e Fp(syntax_lfloat)p Fr(.)-30 1206 y Fp(cl_read_lsyntax_t)f
-(lsyntax)450 1315 y Fr(Sp)s(eci\014es)31 b(the)g(language-dep)s(enden)m
+Fp(syntax_)450 789 y(ffloat)p Fr(,)29 b Fp(syntax_dfloat)p
+Fr(,)e Fp(syntax_lfloat)p Fr(.)-30 950 y Fp(cl_read_lsyntax_t)f
+(lsyntax)450 1060 y Fr(Sp)s(eci\014es)31 b(the)g(language-dep)s(enden)m
(t)h(syn)m(tax)g(v)-5 b(arian)m(t)32 b(for)f(the)h(read)f(op)s
-(eration.)43 b(P)m(ossible)33 b(v)-5 b(alues)450 1425
-y(are)450 1581 y Fp(lsyntax_standard)930 1691 y Fr(accept)32
+(eration.)43 b(P)m(ossible)33 b(v)-5 b(alues)450 1169
+y(are)450 1330 y Fp(lsyntax_standard)930 1440 y Fr(accept)32
b(standard)d(algebraic)j(notation)g(only)-8 b(,)31 b(no)g(complex)f(n)m
-(um)m(b)s(ers,)450 1847 y Fp(lsyntax_algebraic)930 1957
+(um)m(b)s(ers,)450 1601 y Fp(lsyntax_algebraic)930 1710
y Fr(accept)i(the)e(algebraic)i(notation)g Fl(x)6 b Fp(+)p
Fl(y)i Fp(i)30 b Fr(for)g(complex)g(n)m(um)m(b)s(ers,)450
-2113 y Fp(lsyntax_commonlisp)930 2222 y Fr(accept)49
+1871 y Fp(lsyntax_commonlisp)930 1981 y Fr(accept)49
b(the)g Fp(#b)p Fr(,)j Fp(#o)p Fr(,)g Fp(#x)47 b Fr(syn)m(taxes)i(for)f
(binary)-8 b(,)52 b(o)s(ctal,)i(hexadecimal)48 b(n)m(um)m(b)s(ers,)930
-2332 y Fp(#)p Fl(base)5 b Fp(R)25 b Fr(for)f(rational)i(n)m(um)m(b)s
+2090 y Fp(#)p Fl(base)5 b Fp(R)25 b Fr(for)f(rational)i(n)m(um)m(b)s
(ers)d(in)h(a)i(giv)m(en)g(base,)g Fp(#c\()p Fl(realpart)32
-b(imagpart)r Fp(\))24 b Fr(for)h(com-)930 2441 y(plex)30
-b(n)m(um)m(b)s(ers,)450 2598 y Fp(lsyntax_all)930 2707
-y Fr(accept)i(all)f(of)g(these)f(extensions.)-30 2863
-y Fp(unsigned)e(int)i(rational_base)450 2973 y Fr(The)g(base)g(in)g
+b(imagpart)r Fp(\))24 b Fr(for)h(com-)930 2200 y(plex)30
+b(n)m(um)m(b)s(ers,)450 2361 y Fp(lsyntax_all)930 2471
+y Fr(accept)i(all)f(of)g(these)f(extensions.)-30 2631
+y Fp(unsigned)e(int)i(rational_base)450 2741 y Fr(The)g(base)g(in)g
(whic)m(h)h(rational)g(n)m(um)m(b)s(ers)d(are)j(read.)-30
-3129 y Fp(cl_float_format_t)26 b(float_flags.default_flo)o(at_f)o(orm)o
-(at)450 3239 y Fr(The)k(\015oat)h(format)f(used)f(when)h(reading)g
+2902 y Fp(cl_float_format_t)26 b(float_flags.default_flo)o(at_f)o(orm)o
+(at)450 3012 y Fr(The)k(\015oat)h(format)f(used)f(when)h(reading)g
(\015oats)h(with)f(exp)s(onen)m(t)g(mark)m(er)g(`)p Fp(e)p
-Fr('.)-30 3395 y Fp(cl_float_format_t)c(float_flags.default_lfl)o(oat_)
-o(for)o(mat)450 3505 y Fr(The)k(\015oat)h(format)f(used)f(when)h
+Fr('.)-30 3172 y Fp(cl_float_format_t)c(float_flags.default_lfl)o(oat_)
+o(for)o(mat)450 3282 y Fr(The)k(\015oat)h(format)f(used)f(when)h
(reading)g(\015oats)h(with)f(exp)s(onen)m(t)g(mark)m(er)g(`)p
-Fp(l)p Fr('.)-30 3661 y Fp(cl_boolean)e(float_flags.mantissa_de)o(pen)o
-(dent)o(_flo)o(at_)o(form)o(at)450 3770 y Fr(When)h(this)g(\015ag)h(is)
+Fp(l)p Fr('.)-30 3443 y Fp(cl_boolean)e(float_flags.mantissa_de)o(pen)o
+(dent)o(_flo)o(at_)o(form)o(at)450 3553 y Fr(When)h(this)g(\015ag)h(is)
f(true,)g(\015oats)h(sp)s(eci\014ed)e(with)h(more)g(digits)g(than)g
-(corresp)s(onding)g(to)g(the)h(exp)s(o-)450 3880 y(nen)m(t)g(mark)m(er)
-e(they)i(con)m(tain,)h(but)e(without)p 2018 3880 28 4
+(corresp)s(onding)g(to)g(the)h(exp)s(o-)450 3662 y(nen)m(t)g(mark)m(er)
+e(they)i(con)m(tain,)h(but)e(without)p 2018 3662 28 4
v 62 w Fl(nnn)e Fr(su\016x,)i(will)h(get)h(a)e(precision)h(corresp)s
-(onding)e(to)450 3990 y(their)i(n)m(um)m(b)s(er)e(of)j(signi\014can)m
-(t)g(digits.)-30 4242 y Fs(5.3)68 b(Output)45 b(functions)-30
-4433 y Fr(Including)24 b Fp(<cl_io.h>)f Fr(de\014nes)h(a)h(t)m(yp)s(e)g
-Fp(cl_ostream)p Fr(,)f(whic)m(h)g(is)h(the)h(t)m(yp)s(e)f(of)g(the)g
-(\014rst)f(argumen)m(t)h(to)g(all)h(output)-30 4543 y(functions.)40
-b(Unless)28 b(y)m(ou)h(build)f(and)g(use)g(CLN)h(with)f(the)h(macro)f
-(CL)p 2391 4543 V 32 w(IO)p 2527 4543 V 33 w(STDIO)f(b)s(eing)i
-(de\014ned,)f Fp(cl_ostream)-30 4652 y Fr(is)i(the)h(same)f(as)g
-Fp(ostream&)p Fr(.)-30 4785 y(The)g(v)-5 b(ariable)150
-4918 y Fp(cl_ostream)28 b(cl_stdout)-30 5074 y Fr(con)m(tains)k(the)e
-(standard)g(output)g(stream.)-30 5207 y(The)g(v)-5 b(ariable)150
-5340 y Fp(cl_ostream)28 b(cl_stderr)p eop
+(onding)e(to)450 3772 y(their)i(n)m(um)m(b)s(er)e(of)j(signi\014can)m
+(t)g(digits.)-30 4033 y Fs(5.3)68 b(Output)45 b(functions)-30
+4227 y Fr(Including)40 b Fp(<cln/io.h>)f Fr(de\014nes)h(a)i(t)m(yp)s(e)
+f Fp(cl_ostream)p Fr(,)g(whic)m(h)g(is)h(the)f(t)m(yp)s(e)g(of)h(the)f
+(\014rst)f(argumen)m(t)h(to)h(all)-30 4337 y(output)30
+b(functions.)40 b Fp(cl_ostream)28 b Fr(is)i(the)h(same)f(as)g
+Fp(std::ostream&)p Fr(.)-30 4473 y(The)g(v)-5 b(ariable)150
+4609 y Fp(cl_ostream)28 b(stdout)-30 4770 y Fr(con)m(tains)k(the)e
+(standard)g(output)g(stream.)-30 4906 y(The)g(v)-5 b(ariable)150
+5042 y Fp(cl_ostream)28 b(stderr)-30 5204 y Fr(con)m(tains)k(the)e
+(standard)g(error)g(output)g(stream.)-30 5340 y(These)g(are)h(the)f
+(simple)g(output)g(functions:)p eop
%%Page: 31 33
31 32 bop -30 -116 a Fr(Chapter)30 b(5:)41 b(Input/Output)2844
-b(31)-30 299 y(con)m(tains)32 b(the)e(standard)g(error)g(output)g
-(stream.)-30 444 y(These)g(are)h(the)f(simple)g(output)g(functions:)-30
-618 y Fp(void)f(fprintchar)f(\(cl_ostream)f(stream,)h(char)i(c\))450
-728 y Fr(Prin)m(ts)g(the)h(c)m(haracter)h Fp(x)e Fr(literally)i(on)e
-(the)h Fp(stream)p Fr(.)-30 897 y Fp(void)e(fprint)g(\(cl_ostream)e
-(stream,)i(const)f(char)i(*)g(string\))450 1007 y Fr(Prin)m(ts)g(the)h
-Fp(string)d Fr(literally)33 b(on)d(the)g Fp(stream)p
-Fr(.)-30 1176 y Fp(void)f(fprintdecimal)e(\(cl_ostream)g(stream,)i(int)
-g(x\))-30 1286 y(void)g(fprintdecimal)e(\(cl_ostream)g(stream,)i(const)
-g(cl_I&)g(x\))450 1396 y Fr(Prin)m(ts)h(the)h(in)m(teger)h
-Fp(x)e Fr(in)g(decimal)g(on)g(the)h Fp(stream)p Fr(.)-30
-1565 y Fp(void)e(fprintbinary)e(\(cl_ostream)h(stream,)g(const)h(cl_I&)
-g(x\))450 1675 y Fr(Prin)m(ts)h(the)h(in)m(teger)h Fp(x)e
+b(31)-30 299 y Fp(void)29 b(fprintchar)f(\(cl_ostream)f(stream,)h(char)
+i(c\))450 408 y Fr(Prin)m(ts)g(the)h(c)m(haracter)h Fp(x)e
+Fr(literally)i(on)e(the)h Fp(stream)p Fr(.)-30 574 y
+Fp(void)e(fprint)g(\(cl_ostream)e(stream,)i(const)f(char)i(*)g
+(string\))450 683 y Fr(Prin)m(ts)g(the)h Fp(string)d
+Fr(literally)33 b(on)d(the)g Fp(stream)p Fr(.)-30 848
+y Fp(void)f(fprintdecimal)e(\(cl_ostream)g(stream,)i(int)g(x\))-30
+958 y(void)g(fprintdecimal)e(\(cl_ostream)g(stream,)i(const)g(cl_I&)g
+(x\))450 1068 y Fr(Prin)m(ts)h(the)h(in)m(teger)h Fp(x)e
+Fr(in)g(decimal)g(on)g(the)h Fp(stream)p Fr(.)-30 1233
+y Fp(void)e(fprintbinary)e(\(cl_ostream)h(stream,)g(const)h(cl_I&)g
+(x\))450 1342 y Fr(Prin)m(ts)h(the)h(in)m(teger)h Fp(x)e
Fr(in)g(binary)f(\(base)i(2,)g(without)g(pre\014x\))e(on)h(the)h
-Fp(stream)p Fr(.)-30 1844 y Fp(void)e(fprintoctal)f(\(cl_ostream)f
-(stream,)h(const)h(cl_I&)g(x\))450 1954 y Fr(Prin)m(ts)h(the)h(in)m
+Fp(stream)p Fr(.)-30 1508 y Fp(void)e(fprintoctal)f(\(cl_ostream)f
+(stream,)h(const)h(cl_I&)g(x\))450 1617 y Fr(Prin)m(ts)h(the)h(in)m
(teger)h Fp(x)e Fr(in)g(o)s(ctal)h(\(base)g(8,)g(without)g(pre\014x\))e
-(on)i(the)f Fp(stream)p Fr(.)-30 2123 y Fp(void)f(fprinthexadecimal)d
-(\(cl_ostream)h(stream,)i(const)f(cl_I&)h(x\))450 2233
+(on)i(the)f Fp(stream)p Fr(.)-30 1782 y Fp(void)f(fprinthexadecimal)d
+(\(cl_ostream)h(stream,)i(const)f(cl_I&)h(x\))450 1892
y Fr(Prin)m(ts)h(the)h(in)m(teger)h Fp(x)e Fr(in)g(hexadecimal)g
(\(base)h(16,)h(without)e(pre\014x\))g(on)g(the)h Fp(stream)p
-Fr(.)-30 2408 y(Eac)m(h)39 b(of)f(the)g(classes)h Fp(cl_N)p
-Fr(,)g Fp(cl_R)p Fr(,)g Fp(cl_RA)p Fr(,)g Fp(cl_I)p Fr(,)g
-Fp(cl_F)p Fr(,)g Fp(cl_SF)p Fr(,)g Fp(cl_FF)p Fr(,)g
-Fp(cl_DF)p Fr(,)f Fp(cl_LF)f Fr(de\014nes,)i(in)f Fp(<cl_)-30
-2517 y Fl(t)m(yp)s(e)5 b Fp(_io.h>)p Fr(,)29 b(the)i(follo)m(wing)h
-(output)e(functions:)-30 2692 y Fp(void)f(fprint)g(\(cl_ostream)e
-(stream,)i(const)f Fl(t)m(yp)s(e)5 b Fp(&)31 b(x\))-30
-2801 y(cl_ostream)d(operator<<)f(\(cl_ostream)g(stream,)i(const)g
-Fl(t)m(yp)s(e)5 b Fp(&)30 b(x\))450 2911 y Fr(Prin)m(ts)42
-b(the)g(n)m(um)m(b)s(er)e Fp(x)i Fr(on)g(the)g Fp(stream)p
-Fr(.)75 b(The)41 b(output)h(ma)m(y)g(dep)s(end)e(on)i(the)h(global)g
-(prin)m(ter)450 3021 y(settings)23 b(in)e(the)h(v)-5
-b(ariable)22 b Fp(cl_default_print_flags)p Fr(.)32 b(The)21
-b Fp(ostream)f Fr(\015ags)h(and)h(settings)g(\(\015ags,)450
-3130 y(width)30 b(and)f(lo)s(cale\))k(are)e(ignored.)-30
-3305 y(The)f(most)g(\015exible)g(output)g(function,)g(de\014ned)g(in)g
-Fp(<cl_)p Fl(t)m(yp)s(e)5 b Fp(_io.h>)p Fr(,)28 b(are)j(the)f(follo)m
-(wing:)210 3444 y Fp(void)47 b(print_complex)92 b(\(cl_ostream)44
-b(stream,)i(const)g(cl_print_flags&)e(flags,)1212 3548
-y(const)j(cl_N&)f(z\);)210 3651 y(void)h(print_real)236
+Fr(.)-30 2060 y(Eac)m(h)53 b(of)f(the)g(classes)i Fp(cl_N)p
+Fr(,)i Fp(cl_R)p Fr(,)h Fp(cl_RA)p Fr(,)f Fp(cl_I)p Fr(,)h
+Fp(cl_F)p Fr(,)f Fp(cl_SF)p Fr(,)h Fp(cl_FF)p Fr(,)f
+Fp(cl_DF)p Fr(,)h Fp(cl_LF)50 b Fr(de\014nes,)57 b(in)-30
+2170 y Fp(<cln/)p Fl(t)m(yp)s(e)5 b Fp(_io.h>)p Fr(,)28
+b(the)i(follo)m(wing)i(output)e(functions:)-30 2338 y
+Fp(void)f(fprint)g(\(cl_ostream)e(stream,)i(const)f Fl(t)m(yp)s(e)5
+b Fp(&)31 b(x\))-30 2447 y(cl_ostream)d(operator<<)f(\(cl_ostream)g
+(stream,)i(const)g Fl(t)m(yp)s(e)5 b Fp(&)30 b(x\))450
+2557 y Fr(Prin)m(ts)42 b(the)g(n)m(um)m(b)s(er)e Fp(x)i
+Fr(on)g(the)g Fp(stream)p Fr(.)75 b(The)41 b(output)h(ma)m(y)g(dep)s
+(end)e(on)i(the)h(global)g(prin)m(ter)450 2667 y(settings)36
+b(in)g(the)f(v)-5 b(ariable)37 b Fp(default_print_flags)p
+Fr(.)51 b(The)35 b Fp(ostream)e Fr(\015ags)j(and)f(settings)h
+(\(\015ags,)450 2776 y(width)30 b(and)f(lo)s(cale\))k(are)e(ignored.)
+-30 2944 y(The)f(most)g(\015exible)g(output)g(function,)g(de\014ned)g
+(in)g Fp(<cln/)p Fl(t)m(yp)s(e)5 b Fp(_io.h>)p Fr(,)28
+b(are)i(the)h(follo)m(wing:)210 3079 y Fp(void)47 b(print_complex)92
b(\(cl_ostream)44 b(stream,)i(const)g(cl_print_flags&)e(flags,)1212
-3755 y(const)j(cl_R&)f(z\);)210 3859 y(void)h(print_float)188
+3183 y(const)j(cl_N&)f(z\);)210 3286 y(void)h(print_real)236
b(\(cl_ostream)44 b(stream,)i(const)g(cl_print_flags&)e(flags,)1212
-3963 y(const)j(cl_F&)f(z\);)210 4066 y(void)h(print_rational)d
+3390 y(const)j(cl_R&)f(z\);)210 3494 y(void)h(print_float)188
+b(\(cl_ostream)44 b(stream,)i(const)g(cl_print_flags&)e(flags,)1212
+3598 y(const)j(cl_F&)f(z\);)210 3702 y(void)h(print_rational)d
(\(cl_ostream)g(stream,)i(const)g(cl_print_flags&)e(flags,)1212
-4170 y(const)j(cl_RA&)f(z\);)210 4274 y(void)h(print_integer)92
+3805 y(const)j(cl_RA&)f(z\);)210 3909 y(void)h(print_integer)92
b(\(cl_ostream)44 b(stream,)i(const)g(cl_print_flags&)e(flags,)1212
-4378 y(const)j(cl_I&)f(z\);)-30 4522 y Fr(Prin)m(ts)30
+4013 y(const)j(cl_I&)f(z\);)-30 4153 y Fr(Prin)m(ts)30
b(the)h(n)m(um)m(b)s(er)d Fp(x)i Fr(on)g(the)h Fp(stream)p
Fr(.)39 b(The)30 b Fp(flags)f Fr(are)h(parameters)g(whic)m(h)g
-(a\013ect)i(the)f(output.)-30 4667 y(The)f(structure)g(t)m(yp)s(e)g
+(a\013ect)i(the)f(output.)-30 4293 y(The)f(structure)g(t)m(yp)s(e)g
Fp(cl_print_flags)d Fr(con)m(tains)k(the)g(follo)m(wing)h(\014elds:)-30
-4842 y Fp(unsigned)c(int)i(rational_base)450 4951 y Fr(The)g(base)g(in)
+4462 y Fp(unsigned)c(int)i(rational_base)450 4571 y Fr(The)g(base)g(in)
g(whic)m(h)h(rational)g(n)m(um)m(b)s(ers)d(are)j(prin)m(ted.)40
-b(Default)32 b(is)e Fp(10)p Fr(.)-30 5121 y Fp(cl_boolean)e
-(rational_readably)450 5230 y Fr(If)34 b(this)h(\015ag)h(is)f(true,)h
+b(Default)32 b(is)e Fp(10)p Fr(.)-30 4736 y Fp(cl_boolean)e
+(rational_readably)450 4846 y Fr(If)34 b(this)h(\015ag)h(is)f(true,)h
(rational)g(n)m(um)m(b)s(ers)c(are)k(prin)m(ted)e(with)h(radix)f(sp)s
-(eci\014ers)h(in)f(Common)f(Lisp)450 5340 y(syn)m(tax)e(\()p
+(eci\014ers)h(in)f(Common)f(Lisp)450 4956 y(syn)m(tax)e(\()p
Fp(#)p Fl(n)p Fp(R)f Fr(or)g Fp(#b)g Fr(or)g Fp(#o)g
Fr(or)g Fp(#x)g Fr(pre\014xes,)g(trailing)h(dot\).)41
-b(Default)32 b(is)e(false.)p eop
+b(Default)32 b(is)e(false.)-30 5121 y Fp(cl_boolean)e(float_readably)
+450 5230 y Fr(If)34 b(this)g(\015ag)h(is)f(true,)i(t)m(yp)s(e)e(sp)s
+(eci\014c)g(exp)s(onen)m(t)h(mark)m(ers)e(ha)m(v)m(e)j(precedence)f(o)m
+(v)m(er)g('E'.)g(Default)h(is)450 5340 y(false.)p eop
%%Page: 32 34
32 33 bop -30 -116 a Fr(Chapter)30 b(5:)41 b(Input/Output)2844
-b(32)-30 299 y Fp(cl_boolean)28 b(float_readably)450
-408 y Fr(If)34 b(this)g(\015ag)h(is)f(true,)i(t)m(yp)s(e)e(sp)s
-(eci\014c)g(exp)s(onen)m(t)h(mark)m(ers)e(ha)m(v)m(e)j(precedence)f(o)m
-(v)m(er)g('E'.)g(Default)h(is)450 518 y(false.)-30 677
-y Fp(cl_float_format_t)26 b(default_float_format)450
-787 y Fr(Floating)40 b(p)s(oin)m(t)d(n)m(um)m(b)s(ers)e(of)j(this)f
+b(32)-30 299 y Fp(cl_float_format_t)26 b(default_float_format)450
+408 y Fr(Floating)40 b(p)s(oin)m(t)d(n)m(um)m(b)s(ers)e(of)j(this)f
(format)g(will)h(b)s(e)f(prin)m(ted)g(using)g(the)h('E')g(exp)s(onen)m
-(t)f(mark)m(er.)450 897 y(Default)31 b(is)g Fp(cl_float_format_ffloat)p
-Fr(.)-30 1056 y Fp(cl_boolean)d(complex_readably)450
-1166 y Fr(If)41 b(this)g(\015ag)g(is)h(true,)i(complex)c(n)m(um)m(b)s
-(ers)f(will)j(b)s(e)e(prin)m(ted)h(using)g(the)g(Common)e(Lisp)h(syn)m
-(tax)450 1275 y Fp(#C\()p Fl(realpart)32 b(imagpart)r
-Fp(\))p Fr(.)40 b(Default)32 b(is)e(false.)-30 1435 y
-Fp(cl_string)e(univpoly_varname)450 1544 y Fr(Univ)-5
-b(ariate)37 b(p)s(olynomials)d(with)i(no)f(explicit)i(indeterminate)e
-(name)f(will)i(b)s(e)f(prin)m(ted)g(using)g(this)450
-1654 y(v)-5 b(ariable)31 b(name.)40 b(Default)31 b(is)g
-Fp("x")p Fr(.)-30 1813 y(The)43 b(global)j(v)-5 b(ariable)45
-b Fp(cl_default_print_flags)37 b Fr(con)m(tains)46 b(the)e(default)g(v)
--5 b(alues,)48 b(used)43 b(b)m(y)h(the)g(function)-30
-1923 y Fp(fprint)p Fr(.)p eop
+(t)f(mark)m(er.)450 518 y(Default)31 b(is)g Fp(cl_float_format_ffloat)p
+Fr(.)-30 677 y Fp(cl_boolean)d(complex_readably)450 787
+y Fr(If)41 b(this)g(\015ag)g(is)h(true,)i(complex)c(n)m(um)m(b)s(ers)f
+(will)j(b)s(e)e(prin)m(ted)h(using)g(the)g(Common)e(Lisp)h(syn)m(tax)
+450 897 y Fp(#C\()p Fl(realpart)32 b(imagpart)r Fp(\))p
+Fr(.)40 b(Default)32 b(is)e(false.)-30 1056 y Fp(cl_string)e
+(univpoly_varname)450 1166 y Fr(Univ)-5 b(ariate)37 b(p)s(olynomials)d
+(with)i(no)f(explicit)i(indeterminate)e(name)f(will)i(b)s(e)f(prin)m
+(ted)g(using)g(this)450 1275 y(v)-5 b(ariable)31 b(name.)40
+b(Default)31 b(is)g Fp("x")p Fr(.)-30 1435 y(The)26 b(global)i(v)-5
+b(ariable)27 b Fp(default_print_flags)21 b Fr(con)m(tains)28
+b(the)f(default)f(v)-5 b(alues,)28 b(used)e(b)m(y)g(the)h(function)f
+Fp(fprint)p Fr(.)p eop
%%Page: 33 35
33 34 bop -30 -116 a Fr(Chapter)30 b(6:)41 b(Rings)3180
b(33)-30 299 y Fo(6)80 b(Rings)-30 533 y Fr(CLN)30 b(has)g(a)h(class)g
-(of)g(abstract)g(rings.)1403 662 y Fp(Ring)1308 765 y(cl_ring)1260
-869 y(<cl_ring.h>)-30 1004 y Fr(Rings)f(can)h(b)s(e)f(compared)f(for)h
+(of)g(abstract)g(rings.)1403 662 y Fp(Ring)1308 765 y(cl_ring)1212
+869 y(<cln/ring.h>)-30 1004 y Fr(Rings)f(can)h(b)s(e)f(compared)f(for)h
(equalit)m(y:)-30 1163 y Fp(bool)f(operator==)f(\(const)g(cl_ring&,)g
(const)h(cl_ring&\))-30 1273 y(bool)g(operator!=)f(\(const)g(cl_ring&,)
g(const)h(cl_ring&\))450 1382 y Fr(These)h(compare)g(t)m(w)m(o)i(rings)
Fp(++)g Fr(do)s(esn't)h(ha)m(v)m(e)h(generic)g(t)m(yp)s(es.)42
b(So)30 b(one)h(has)g(to)h(liv)m(e)g(with)e(run)m(time)-30
1288 y(c)m(hec)m(ks.\))-30 1423 y(The)g(class)h(of)g(mo)s(dular)d(in)m
-(teger)k(rings)e(is)1403 1552 y Fp(Ring)1308 1656 y(cl_ring)1260
-1760 y(<cl_ring.h>)1451 1863 y(|)1451 1967 y(|)1021 2071
-y(Modular)46 b(integer)g(ring)1165 2175 y(cl_modint_ring)1117
-2279 y(<cl_modinteger.h>)-30 2413 y Fr(and)30 b(the)g(class)h(of)g(all)
-g(mo)s(dular)e(in)m(tegers)i(\(elemen)m(ts)g(of)g(mo)s(dular)d(in)m
-(teger)k(rings\))e(is)1165 2542 y Fp(Modular)45 b(integer)1403
-2646 y(cl_MI)1117 2750 y(<cl_modinteger.h>)-30 2885 y
-Fr(Mo)s(dular)30 b(in)m(teger)i(rings)e(are)g(constructed)h(using)f
-(the)h(function)-30 3044 y Fp(cl_modint_ring)26 b(cl_find_modint_ring)g
-(\(const)i(cl_I&)h(N\))450 3154 y Fr(This)f(function)g(returns)f(the)h
+(teger)k(rings)e(is)1403 1552 y Fp(Ring)1308 1656 y(cl_ring)1212
+1760 y(<cln/ring.h>)1451 1863 y(|)1451 1967 y(|)1021
+2071 y(Modular)46 b(integer)g(ring)1165 2175 y(cl_modint_ring)1069
+2279 y(<cln/modinteger.h>)-30 2413 y Fr(and)30 b(the)g(class)h(of)g
+(all)g(mo)s(dular)e(in)m(tegers)i(\(elemen)m(ts)g(of)g(mo)s(dular)d(in)
+m(teger)k(rings\))e(is)1165 2542 y Fp(Modular)45 b(integer)1403
+2646 y(cl_MI)1117 2750 y(<cln/modinteger.h>)-30 2885
+y Fr(Mo)s(dular)30 b(in)m(teger)i(rings)e(are)g(constructed)h(using)f
+(the)h(function)-30 3044 y Fp(cl_modint_ring)26 b(find_modint_ring)g
+(\(const)j(cl_I&)g(N\))450 3154 y Fr(This)f(function)g(returns)f(the)h
(mo)s(dular)e(ring)j(`)p Fp(Z/NZ)p Fr('.)39 b(It)28 b(tak)m(es)i(care)f
(of)g(\014nding)e(out)h(ab)s(out)g(sp)s(ecial)450 3264
y(cases)e(of)e Fp(N)p Fr(,)i(lik)m(e)g(p)s(o)m(w)m(ers)f(of)g(t)m(w)m
(compared)f(for)i(equalit)m(y:)-30 3912 y Fp(bool)e(operator==)f
(\(const)g(cl_modint_ring&,)e(const)j(cl_modint_ring&\))-30
4022 y(bool)g(operator!=)f(\(const)g(cl_modint_ring&,)e(const)j
-(cl_modint_ring&\))450 4131 y Fr(These)j(compare)g(t)m(w)m(o)h(mo)s
-(dular)d(in)m(teger)k(rings)d(for)h(equalit)m(y)-8 b(.)48
-b(Tw)m(o)32 b(di\013eren)m(t)h(calls)g(to)g Fp(cl_find_)450
-4241 y(modint_ring)39 b Fr(with)i(the)h(same)f(argumen)m(t)g
-(necessarily)h(return)f(the)h(same)f(ring)g(b)s(ecause)h(it)g(is)450
+(cl_modint_ring&\))450 4131 y Fr(These)42 b(compare)g(t)m(w)m(o)i(mo)s
+(dular)c(in)m(teger)k(rings)e(for)g(equalit)m(y)-8 b(.)78
+b(Tw)m(o)43 b(di\013eren)m(t)g(calls)g(to)g Fp(find_)450
+4241 y(modint_ring)c Fr(with)i(the)h(same)f(argumen)m(t)g(necessarily)h
+(return)f(the)h(same)f(ring)g(b)s(ecause)h(it)g(is)450
4350 y(memoized)29 b(in)h(the)h(cac)m(he)h(table.)-30
4608 y Fs(7.2)68 b(F)-11 b(unctions)44 b(on)h(mo)t(dular)g(in)l(tegers)
-30 4801 y Fr(Giv)m(en)31 b(a)g(mo)s(dular)d(in)m(teger)k(ring)e
Fp(R->canonhom)p Fr(.)36 b(It)26 b(returns)f(the)h(standard)f(represen)
m(tativ)m(e)450 1072 y(\()p Fp(>=0)p Fr(,)30 b Fp(<N)p
Fr(\))g(of)h Fp(x)p Fr(.)-30 1240 y Fp(cl_MI)e
-(R->random\(cl_random_stat)o(e&)24 b(randomstate\))-30
-1349 y(cl_MI)29 b(R->random\(\))450 1459 y Fr(This)h(returns)f(a)h
-(random)f(in)m(teger)j(mo)s(dulo)d Fp(N)p Fr(.)-30 1630
-y(The)h(follo)m(wing)i(op)s(erations)e(are)h(de\014ned)e(on)i(mo)s
-(dular)d(in)m(tegers.)-30 1802 y Fp(cl_modint_ring)e(x.ring)j(\(\))450
-1912 y Fr(Returns)g(the)i(ring)f(to)h(whic)m(h)f(the)h(mo)s(dular)d(in)
-m(teger)k Fp(x)e Fr(b)s(elongs.)-30 2079 y Fp(cl_MI)f(operator+)f
-(\(const)g(cl_MI&,)h(const)g(cl_MI&\))450 2189 y Fr(Returns)36
+(R->random\(random_state&)24 b(randomstate\))-30 1349
+y(cl_MI)29 b(R->random\(\))450 1459 y Fr(This)h(returns)f(a)h(random)f
+(in)m(teger)j(mo)s(dulo)d Fp(N)p Fr(.)-30 1630 y(The)h(follo)m(wing)i
+(op)s(erations)e(are)h(de\014ned)e(on)i(mo)s(dular)d(in)m(tegers.)-30
+1802 y Fp(cl_modint_ring)e(x.ring)j(\(\))450 1912 y Fr(Returns)g(the)i
+(ring)f(to)h(whic)m(h)f(the)h(mo)s(dular)d(in)m(teger)k
+Fp(x)e Fr(b)s(elongs.)-30 2079 y Fp(cl_MI)f(operator+)f(\(const)g
+(cl_MI&,)h(const)g(cl_MI&\))450 2189 y Fr(Returns)36
b(the)h(sum)d(of)j(t)m(w)m(o)h(mo)s(dular)d(in)m(tegers.)60
b(One)37 b(of)f(the)h(argumen)m(ts)f(ma)m(y)g(also)i(b)s(e)e(a)h(plain)
450 2298 y(in)m(teger.)-30 2466 y Fp(cl_MI)29 b(operator-)f(\(const)g
(in)m(teger)k Fp(x)d Fr(on)i(the)f Fp(stream)p Fr(.)69
b(The)40 b(output)g(ma)m(y)f(dep)s(end)g(on)h(the)h(global)450
1813 y(prin)m(ter)30 b(settings)h(in)f(the)h(v)-5 b(ariable)31
-b Fp(cl_default_print_flags)p Fr(.)p eop
+b Fp(default_print_flags)p Fr(.)p eop
%%Page: 37 39
37 38 bop -30 -116 a Fr(Chapter)30 b(8:)41 b(Sym)m(b)s(olic)29
b(data)i(t)m(yp)s(es)2596 b(37)-30 299 y Fo(8)80 b(Sym)l(b)t(olic)54
(sym)m(b)s(olic)d(\(non-n)m(umeric\))h(data)h(t)m(yp)s(es:)41
b(strings)30 b(and)g(sym)m(b)s(ols.)-30 758 y Fs(8.1)68
b(Strings)-30 946 y Fr(The)30 b(class)1260 1071 y Fp(String)1212
-1175 y(cl_string)1165 1278 y(<cl_string.h>)-30 1409 y
-Fr(implemen)m(ts)f(imm)m(utable)g(strings.)-30 1539 y(Strings)h(are)h
-(constructed)f(through)g(the)h(follo)m(wing)g(constructors:)-30
-1691 y Fp(cl_string)d(\(const)h(char)g(*)h(s\))450 1800
-y Fr(Returns)f(an)i(imm)m(utable)e(cop)m(y)i(of)f(the)h
+1175 y(cl_string)1117 1278 y(<cln/string.h>)-30 1409
+y Fr(implemen)m(ts)f(imm)m(utable)g(strings.)-30 1539
+y(Strings)h(are)h(constructed)f(through)g(the)h(follo)m(wing)g
+(constructors:)-30 1691 y Fp(cl_string)d(\(const)h(char)g(*)h(s\))450
+1800 y Fr(Returns)f(an)i(imm)m(utable)e(cop)m(y)i(of)f(the)h
(\(zero-terminated\))h(C)e(string)g Fp(s)p Fr(.)-30 1951
y Fp(cl_string)e(\(const)h(char)g(*)h(ptr,)f(unsigned)f(long)h(len\))
450 2061 y Fr(Returns)36 b(an)h(imm)m(utable)f(cop)m(y)i(of)f(the)g
b(Univ)-7 b(ariate)47 b(p)t(olynomial)f(rings)-30 844
y Fr(CLN)33 b(implemen)m(ts)f(univ)-5 b(ariate)35 b(p)s(olynomials)e
(\(p)s(olynomials)g(in)g(one)h(v)-5 b(ariable\))35 b(o)m(v)m(er)g(an)f
-(arbitrary)f(ring.)50 b(The)-30 953 y(indeterminate)23
-b(v)-5 b(ariable)23 b(ma)m(y)g(b)s(e)f(either)h(unnamed)e(\(and)h(will)
-i(b)s(e)e(prin)m(ted)g(according)i(to)g Fp(cl_default_print_)-30
-1063 y(flags.univpoly_varname)p Fr(,)37 b(whic)m(h)j(defaults)g(to)h(`)
-p Fp(x)p Fr('\))g(or)f(carry)h(a)f(giv)m(en)h(name.)70
+(arbitrary)f(ring.)50 b(The)-30 953 y(indeterminate)34
+b(v)-5 b(ariable)36 b(ma)m(y)e(b)s(e)h(either)g(unnamed)d(\(and)j(will)
+g(b)s(e)f(prin)m(ted)h(according)g(to)h Fp(default_print_)-30
+1063 y(flags.univpoly_varname)p Fr(,)h(whic)m(h)j(defaults)g(to)h(`)p
+Fp(x)p Fr('\))g(or)f(carry)h(a)f(giv)m(en)h(name.)70
b(The)40 b(base)g(ring)g(and)g(the)-30 1172 y(indeterminate)31
b(are)h(explicitly)g(part)f(of)h(ev)m(ery)g(p)s(olynomial.)42
b(CLN)31 b(do)s(esn't)g(allo)m(w)i(y)m(ou)e(to)h(\(acciden)m(tally\))j
b(ariate)31 b(p)s(olynomial,)f(but)g(they)g(are)h(not)g(y)m(et)g
(implemen)m(ted)e(in)h(CLN.\))-30 1525 y(The)g(classes)h(of)g(univ)-5
b(ariate)31 b(p)s(olynomial)f(rings)f(are)1499 1653 y
-Fp(Ring)1403 1757 y(cl_ring)1355 1861 y(<cl_ring.h>)1546
+Fp(Ring)1403 1757 y(cl_ring)1308 1861 y(<cln/ring.h>)1546
1965 y(|)1546 2068 y(|)1021 2172 y(Univariate)45 b(polynomial)g(ring)
-1260 2276 y(cl_univpoly_ring)1260 2380 y(<cl_univpoly.h>)1546
+1260 2276 y(cl_univpoly_ring)1260 2380 y(<cln/univpoly.h>)1546
2484 y(|)735 2587 y(+----------------+------)o(----)o(----)o(---)o(--+)
735 2691 y(|)763 b(|)907 b(|)258 2795 y(Complex)46 b(polynomial)f(ring)
189 b(|)i(Modular)46 b(integer)g(polynomial)f(ring)258
2899 y(cl_univpoly_complex_rin)o(g)137 b(|)382 b
-(cl_univpoly_modint_ring)305 3002 y(<cl_univpoly_complex.h>)137
-b(|)382 b(<cl_univpoly_modint.h>)1546 3106 y(|)735 3210
+(cl_univpoly_modint_ring)258 3002 y(<cln/univpoly_complex.h)o(>)137
+b(|)382 b(<cln/univpoly_modint.h>)1546 3106 y(|)735 3210
y(+----------------+)735 3314 y(|)763 b(|)353 3418 y(Real)47
b(polynomial)e(ring)237 b(|)353 3521 y(cl_univpoly_real_ring)185
-b(|)401 3625 y(<cl_univpoly_real.h>)g(|)1546 3729 y(|)735
+b(|)353 3625 y(<cln/univpoly_real.h>)g(|)1546 3729 y(|)735
3833 y(+----------------+)735 3936 y(|)763 b(|)258 4040
y(Rational)45 b(polynomial)g(ring)142 b(|)258 4144 y
-(cl_univpoly_rational_ri)o(ng)89 b(|)305 4248 y
-(<cl_univpoly_rational.h>)g(|)1546 4352 y(|)735 4455
+(cl_univpoly_rational_ri)o(ng)89 b(|)258 4248 y
+(<cln/univpoly_rational.)o(h>)g(|)1546 4352 y(|)735 4455
y(+----------------+)735 4559 y(|)258 4663 y(Integer)46
-b(polynomial)f(ring)258 4767 y(cl_univpoly_integer_rin)o(g)305
-4870 y(<cl_univpoly_integer.h>)-30 5004 y Fr(and)30 b(the)g(corresp)s
-(onding)g(classes)h(of)g(univ)-5 b(ariate)31 b(p)s(olynomials)e(are)
-1117 5132 y Fp(Univariate)45 b(polynomial)1451 5236 y(cl_UP)1260
-5340 y(<cl_univpoly.h>)p eop
+b(polynomial)f(ring)258 4767 y(cl_univpoly_integer_rin)o(g)258
+4870 y(<cln/univpoly_integer.h)o(>)-30 5004 y Fr(and)30
+b(the)g(corresp)s(onding)g(classes)h(of)g(univ)-5 b(ariate)31
+b(p)s(olynomials)e(are)1117 5132 y Fp(Univariate)45 b(polynomial)1451
+5236 y(cl_UP)1260 5340 y(<cln/univpoly.h>)p eop
%%Page: 39 41
39 40 bop -30 -116 a Fr(Chapter)30 b(9:)41 b(Univ)-5
b(ariate)32 b(p)s(olynomials)2483 b(39)1546 299 y Fp(|)735
403 y(+----------------+------)o(----)o(----)o(---)o(--+)735
506 y(|)763 b(|)907 b(|)353 610 y(Complex)46 b(polynomial)331
b(|)286 b(Modular)46 b(integer)g(polynomial)592 714 y(cl_UP_N)618
-b(|)764 b(cl_UP_MI)305 818 y(<cl_univpoly_complex.h>)137
-b(|)382 b(<cl_univpoly_modint.h>)1546 922 y(|)735 1025
+b(|)764 b(cl_UP_MI)258 818 y(<cln/univpoly_complex.h)o(>)137
+b(|)382 b(<cln/univpoly_modint.h>)1546 922 y(|)735 1025
y(+----------------+)735 1129 y(|)763 b(|)449 1233 y(Real)46
-b(polynomial)379 b(|)592 1337 y(cl_UP_R)618 b(|)401 1440
-y(<cl_univpoly_real.h>)185 b(|)1546 1544 y(|)735 1648
+b(polynomial)379 b(|)592 1337 y(cl_UP_R)618 b(|)305 1440
+y(<cln/univpoly_real.h>)233 b(|)1546 1544 y(|)735 1648
y(+----------------+)735 1752 y(|)763 b(|)353 1856 y(Rational)46
-b(polynomial)283 b(|)592 1959 y(cl_UP_RA)570 b(|)305
-2063 y(<cl_univpoly_rational.h>)89 b(|)1546 2167 y(|)735
-2271 y(+----------------+)735 2374 y(|)353 2478 y(Integer)46
-b(polynomial)592 2582 y(cl_UP_I)305 2686 y(<cl_univpoly_integer.h>)-30
-3545 y Fr(Univ)-5 b(ariate)32 b(p)s(olynomial)d(rings)h(are)h
-(constructed)g(using)f(the)g(functions)-30 4792 y Fp(cl_univpoly_ring)c
-(cl_find_univpoly_ring)e(\(const)29 b(cl_ring&)f(R\))-30
-4902 y(cl_univpoly_ring)e(cl_find_univpoly_ring)e(\(const)29
-b(cl_ring&)f(R,)i(const)f(cl_symbol&)f(varname\))450
+b(polynomial)283 b(|)592 1959 y(cl_UP_RA)570 b(|)258
+2063 y(<cln/univpoly_rational.)o(h>)89 b(|)1546 2167
+y(|)735 2271 y(+----------------+)735 2374 y(|)353 2478
+y(Integer)46 b(polynomial)592 2582 y(cl_UP_I)258 2686
+y(<cln/univpoly_integer.h)o(>)-30 3545 y Fr(Univ)-5 b(ariate)32
+b(p)s(olynomial)d(rings)h(are)h(constructed)g(using)f(the)g(functions)
+-30 4792 y Fp(cl_univpoly_ring)c(find_univpoly_ring)f(\(const)k
+(cl_ring&)f(R\))-30 4902 y(cl_univpoly_ring)e(find_univpoly_ring)f
+(\(const)k(cl_ring&)f(R,)i(const)f(cl_symbol&)e(varname\))450
5011 y Fr(This)40 b(function)h(returns)f(the)h(p)s(olynomial)g(ring)g
(`)p Fp(R[X])p Fr(',)i(unnamed)c(or)i(named.)71 b Fp(R)41
b Fr(ma)m(y)g(b)s(e)f(an)450 5121 y(arbitrary)f(ring.)68
b(ariate)32 b(p)s(olynomials)2483 b(40)450 299 y(that)28
b(t)m(w)m(o)i(calls)f(of)e(this)h(function)g(with)f(the)h(same)f
(argumen)m(ts)h(will)g(return)e(the)i(same)g(p)s(olynomial)450
-408 y(ring.)-30 547 y Fp(cl_univpoly_complex_ring)c
-(cl_find_univpoly_ring)g(\(const)29 b(cl_complex_ring&)d(R\))-30
-657 y(cl_univpoly_complex_ring)e(cl_find_univpoly_ring)g(\(const)29
-b(cl_complex_ring&)d(R,)k(const)-30 766 y(cl_symbol&)e(varname\))-30
-876 y(cl_univpoly_real_ring)d(cl_find_univpoly_ring)f(\(const)29
-b(cl_real_ring&)e(R\))-30 986 y(cl_univpoly_real_ring)e
-(cl_find_univpoly_ring)f(\(const)29 b(cl_real_ring&)e(R,)i(const)g
-(cl_symbol&)-30 1095 y(varname\))-30 1205 y(cl_univpoly_rational_rin)o
-(g)24 b(cl_find_univpoly_ring)h(\(const)k(cl_rational_ring&)c(R\))-30
-1314 y(cl_univpoly_rational_rin)o(g)f(cl_find_univpoly_ring)h(\(const)k
-(cl_rational_ring&)c(R,)30 b(const)-30 1424 y(cl_symbol&)e(varname\))
--30 1533 y(cl_univpoly_integer_ring)c(cl_find_univpoly_ring)g(\(const)
-29 b(cl_integer_ring&)d(R\))-30 1643 y(cl_univpoly_integer_ring)e
-(cl_find_univpoly_ring)g(\(const)29 b(cl_integer_ring&)d(R,)k(const)-30
-1753 y(cl_symbol&)e(varname\))-30 1862 y(cl_univpoly_modint_ring)c
-(cl_find_univpoly_ring)h(\(const)j(cl_modint_ring&)e(R\))-30
-1972 y(cl_univpoly_modint_ring)e(cl_find_univpoly_ring)h(\(const)j
-(cl_modint_ring&)e(R,)k(const)-30 2081 y(cl_symbol&)e(varname\))450
-2191 y Fr(These)i(functions)g(are)g(equiv)-5 b(alen)m(t)32
-b(to)f(the)f(general)i Fp(cl_find_univpoly_ring)p Fr(,)24
-b(only)31 b(the)f(return)450 2301 y(t)m(yp)s(e)h(is)f(more)f(sp)s
-(eci\014c,)i(according)g(to)g(the)g(base)f(ring's)h(t)m(yp)s(e.)-30
+408 y(ring.)-30 547 y Fp(cl_univpoly_complex_ring)c(find_univpoly_ring)
+h(\(const)k(cl_complex_ring&)d(R\))-30 657 y(cl_univpoly_complex_ring)e
+(find_univpoly_ring)h(\(const)k(cl_complex_ring&)d(R,)j(const)-30
+766 y(cl_symbol&)f(varname\))-30 876 y(cl_univpoly_real_ring)d
+(find_univpoly_ring)g(\(const)k(cl_real_ring&)d(R\))-30
+986 y(cl_univpoly_real_ring)f(find_univpoly_ring)g(\(const)k
+(cl_real_ring&)d(R,)k(const)f(cl_symbol&)-30 1095 y(varname\))-30
+1205 y(cl_univpoly_rational_rin)o(g)24 b(find_univpoly_ring)i(\(const)j
+(cl_rational_ring&)c(R\))-30 1314 y(cl_univpoly_rational_rin)o(g)f
+(find_univpoly_ring)i(\(const)j(cl_rational_ring&)c(R,)30
+b(const)-30 1424 y(cl_symbol&)e(varname\))-30 1533 y
+(cl_univpoly_integer_ring)c(find_univpoly_ring)h(\(const)k
+(cl_integer_ring&)d(R\))-30 1643 y(cl_univpoly_integer_ring)e
+(find_univpoly_ring)h(\(const)k(cl_integer_ring&)d(R,)j(const)-30
+1753 y(cl_symbol&)f(varname\))-30 1862 y(cl_univpoly_modint_ring)c
+(find_univpoly_ring)h(\(const)k(cl_modint_ring&)d(R\))-30
+1972 y(cl_univpoly_modint_ring)e(find_univpoly_ring)h(\(const)k
+(cl_modint_ring&)d(R,)k(const)f(cl_symbol&)-30 2081 y(varname\))450
+2191 y Fr(These)24 b(functions)g(are)h(equiv)-5 b(alen)m(t)26
+b(to)g(the)e(general)i Fp(find_univpoly_ring)p Fr(,)21
+b(only)k(the)f(return)g(t)m(yp)s(e)450 2301 y(is)30 b(more)g(sp)s
+(eci\014c,)g(according)i(to)f(the)f(base)h(ring's)f(t)m(yp)s(e.)-30
2579 y Fs(9.2)68 b(F)-11 b(unctions)44 b(on)h(univ)-7
b(ariate)46 b(p)t(olynomials)-30 2780 y Fr(Giv)m(en)31
b(a)g(univ)-5 b(ariate)31 b(p)s(olynomial)f(ring)g Fp(R)p
Fr(,)g(the)h(follo)m(wing)h(mem)m(b)s(ers)27 b(can)k(b)s(e)f(used.)-30
2952 y Fp(cl_ring)e(R->basering\(\))450 3061 y Fr(This)i(returns)f(the)
-h(base)h(ring,)f(as)h(passed)f(to)h(`)p Fp(cl_find_univpoly_ring)p
+h(base)h(ring,)f(as)h(passed)f(to)h(`)p Fp(find_univpoly_ring)p
Fr('.)-30 3229 y Fp(cl_UP)e(R->zero\(\))450 3339 y Fr(This)h(returns)f
Fp(0)h(in)g(R)p Fr(,)g(a)h(p)s(olynomial)e(of)i(degree)g(-1.)-30
3506 y Fp(cl_UP)e(R->one\(\))450 3616 y Fr(This)h(returns)f
b(ariate)26 b(p)s(olynomial)e Fp(x)g Fr(on)h(the)f Fp(stream)p
Fr(.)38 b(The)24 b(output)g(ma)m(y)g(dep)s(end)f(on)i(the)g(global)450
5320 y(prin)m(ter)30 b(settings)h(in)f(the)h(v)-5 b(ariable)31
-b Fp(cl_default_print_flags)p Fr(.)p eop
+b Fp(default_print_flags)p Fr(.)p eop
%%Page: 42 44
42 43 bop -30 -116 a Fr(Chapter)30 b(9:)41 b(Univ)-5
b(ariate)32 b(p)s(olynomials)2483 b(42)-30 299 y Fs(9.3)68
b(Sp)t(ecial)45 b(p)t(olynomials)-30 491 y Fr(The)30
b(follo)m(wing)i(functions)e(return)f(sp)s(ecial)i(p)s(olynomials.)-30
-651 y Fp(cl_UP_I)d(cl_tschebychev)f(\(sintL)i(n\))450
-760 y Fr(Returns)g(the)i(n-th)f(Tc)m(heb)m(yc)m(hev)h(p)s(olynomial)f
-(\(n)g Fp(>)p Fr(=)g(0\).)-30 920 y Fp(cl_UP_I)e(cl_hermite)g(\(sintL)h
-(n\))450 1029 y Fr(Returns)g(the)i(n-th)f(Hermite)g(p)s(olynomial)g
-(\(n)g Fp(>)p Fr(=)g(0\).)-30 1189 y Fp(cl_UP_RA)e(cl_legendre)f
-(\(sintL)i(n\))450 1298 y Fr(Returns)g(the)i(n-th)f(Legendre)g(p)s
-(olynomial)g(\(n)g Fp(>)p Fr(=)g(0\).)-30 1458 y Fp(cl_UP_I)e
-(cl_laguerre)g(\(sintL)g(n\))450 1567 y Fr(Returns)h(the)i(n-th)f
-(Laguerre)h(p)s(olynomial)e(\(n)h Fp(>)p Fr(=)g(0\).)-30
-1727 y(Information)e(ho)m(w)h(to)h(deriv)m(e)g(the)g(di\013eren)m(tial)
-g(equation)h(satis\014ed)e(b)m(y)g(eac)m(h)h(of)g(these)g(p)s
-(olynomials)e(from)g(their)-30 1836 y(de\014nition)i(can)h(b)s(e)e
-(found)g(in)i(the)f Fp(doc/polynomial/)c Fr(directory)-8
-b(.)p eop
+651 y Fp(cl_UP_I)d(tschebychev)g(\(sintL)g(n\))450 760
+y Fr(Returns)h(the)i(n-th)f(Cheb)m(yshev)g(p)s(olynomial)f(\(n)h
+Fp(>)p Fr(=)g(0\).)-30 920 y Fp(cl_UP_I)e(hermite)h(\(sintL)f(n\))450
+1029 y Fr(Returns)h(the)i(n-th)f(Hermite)g(p)s(olynomial)g(\(n)g
+Fp(>)p Fr(=)g(0\).)-30 1189 y Fp(cl_UP_RA)e(legendre)g(\(sintL)h(n\))
+450 1298 y Fr(Returns)g(the)i(n-th)f(Legendre)g(p)s(olynomial)g(\(n)g
+Fp(>)p Fr(=)g(0\).)-30 1458 y Fp(cl_UP_I)e(laguerre)h(\(sintL)f(n\))450
+1567 y Fr(Returns)h(the)i(n-th)f(Laguerre)h(p)s(olynomial)e(\(n)h
+Fp(>)p Fr(=)g(0\).)-30 1727 y(Information)e(ho)m(w)h(to)h(deriv)m(e)g
+(the)g(di\013eren)m(tial)g(equation)h(satis\014ed)e(b)m(y)g(eac)m(h)h
+(of)g(these)g(p)s(olynomials)e(from)g(their)-30 1836
+y(de\014nition)i(can)h(b)s(e)e(found)g(in)i(the)f Fp(doc/polynomial/)c
+Fr(directory)-8 b(.)p eop
%%Page: 43 45
43 44 bop -30 -116 a Fr(Chapter)30 b(10:)41 b(In)m(ternals)3010
b(43)-30 299 y Fo(10)80 b(In)l(ternals)-30 651 y Fs(10.1)68
%%Page: 45 47
45 46 bop -30 -116 a Fr(Chapter)30 b(11:)41 b(Using)31
b(the)f(library)2681 b(45)-30 299 y Fo(11)80 b(Using)54
-b(the)f(library)-30 523 y Fr(F)-8 b(or)47 b(the)g(follo)m(wing)g
+b(the)f(library)-30 542 y Fr(F)-8 b(or)47 b(the)g(follo)m(wing)g
(discussion,)j(w)m(e)d(will)g(assume)e(that)h(y)m(ou)h(ha)m(v)m(e)h
-(installed)f(the)f(CLN)g(source)g(in)g Fp($CLN_)-30 632
+(installed)f(the)f(CLN)g(source)g(in)g Fp($CLN_)-30 652
y(DIR)41 b Fr(and)g(built)h(it)g(in)g Fp($CLN_TARGETDIR)p
Fr(.)71 b(F)-8 b(or)43 b(example,)h(for)e(me)f(it's)h
-Fp(CLN_DIR="$HOME/cln")37 b Fr(and)k Fp(CLN_)-30 742
+Fp(CLN_DIR="$HOME/cln")37 b Fr(and)k Fp(CLN_)-30 762
y(TARGETDIR="$HOME/cln/lin)o(uxel)o(f")p Fr(.)53 b(Y)-8
b(ou)38 b(migh)m(t)e(de\014ne)g(these)h(as)g(en)m(vironmen)m(t)f(v)-5
-b(ariables,)40 b(or)c(directly)-30 851 y(substitute)30
-b(the)h(appropriate)f(v)-5 b(alues.)-30 1103 y Fs(11.1)68
-b(Compiler)46 b(options)-30 1293 y Fr(Un)m(til)31 b(y)m(ou)g(ha)m(v)m
+b(ariables,)40 b(or)c(directly)-30 871 y(substitute)30
+b(the)h(appropriate)f(v)-5 b(alues.)-30 1136 y Fs(11.1)68
+b(Compiler)46 b(options)-30 1332 y Fr(Un)m(til)31 b(y)m(ou)g(ha)m(v)m
(e)h(installed)f(CLN)f(in)g(a)h(public)e(place,)j(the)e(follo)m(wing)i
-(options)f(are)g(needed:)-30 1426 y(When)f(y)m(ou)h(compile)f(CLN)g
-(application)i(co)s(de,)f(add)e(the)i(\015ags)353 1552
+(options)f(are)g(needed:)-30 1470 y(When)f(y)m(ou)h(compile)f(CLN)g
+(application)i(co)s(de,)f(add)e(the)i(\015ags)353 1601
y Fp(-I$CLN_DIR/include)43 b(-I$CLN_TARGETDIR/include)-30
-1685 y Fr(to)29 b(the)g(C)p Fp(++)e Fr(compiler's)h(command)f(line)h
+1739 y Fr(to)29 b(the)g(C)p Fp(++)e Fr(compiler's)h(command)f(line)h
(\()p Fp(make)g Fr(v)-5 b(ariable)29 b(CFLA)m(GS)g(or)f(CXXFLA)m(GS\).)
-i(When)e(y)m(ou)h(link)f(CLN)-30 1794 y(application)k(co)s(de)e(to)h
-(form)e(an)i(executable,)h(add)e(the)g(\015ags)353 1921
-y Fp($CLN_TARGETDIR/src/libcln)o(.a)-30 2053 y Fr(to)h(the)g(C/C)p
+i(When)e(y)m(ou)h(link)f(CLN)-30 1849 y(application)k(co)s(de)e(to)h
+(form)e(an)i(executable,)h(add)e(the)g(\015ags)353 1980
+y Fp($CLN_TARGETDIR/src/libcln)o(.a)-30 2118 y Fr(to)h(the)g(C/C)p
Fp(++)e Fr(compiler's)h(command)e(line)j(\()p Fp(make)f
-Fr(v)-5 b(ariable)31 b(LIBS\).)-30 2186 y(If)62 b(y)m(ou)h(did)f(a)h
+Fr(v)-5 b(ariable)31 b(LIBS\).)-30 2256 y(If)62 b(y)m(ou)h(did)f(a)h
Fp(make)29 b(install)p Fr(,)69 b(the)62 b(include)h(\014les)f(are)h
(installed)g(in)g(a)f(public)g(directory)h(\(normally)-30
-2295 y Fp(/usr/local/include)p Fr(\),)45 b(hence)g(y)m(ou)h(don't)g
+2365 y Fp(/usr/local/include)p Fr(\),)45 b(hence)g(y)m(ou)h(don't)g
(need)f(sp)s(ecial)h(\015ags)g(for)f(compiling.)85 b(The)45
-b(library)g(has)h(b)s(een)-30 2405 y(installed)i(to)g(a)f(public)f
+b(library)g(has)h(b)s(een)-30 2475 y(installed)i(to)g(a)f(public)f
(directory)i(as)f(w)m(ell)h(\(normally)f Fp(/usr/local/lib)p
-Fr(\),)h(hence)f(when)f(linking)h(a)g(CLN)-30 2514 y(application)32
+Fr(\),)h(hence)f(when)f(linking)h(a)g(CLN)-30 2584 y(application)32
b(it)f(is)f(su\016cien)m(t)h(to)g(giv)m(e)h(the)e(\015ag)h
-Fp(-lcln)p Fr(.)-30 2766 y Fs(11.2)68 b(Include)45 b(\014les)-30
-2956 y Fr(Here)31 b(is)f(a)h(summary)c(of)k(the)f(include)h(\014les)f
-(and)g(their)g(con)m(ten)m(ts.)-30 3111 y Fp(<cl_object.h>)450
-3221 y Fr(General)h(de\014nitions,)f(reference)h(coun)m(ting,)h
-(garbage)f(collection.)-30 3376 y Fp(<cl_number.h>)450
-3486 y Fr(The)f(class)h(cl)p 920 3486 28 4 v 33 w(n)m(um)m(b)s(er.)-30
-3641 y Fp(<cl_complex.h>)450 3751 y Fr(F)-8 b(unctions)31
-b(for)f(class)h(cl)p 1288 3751 V 34 w(N,)f(the)h(complex)f(n)m(um)m(b)s
-(ers.)-30 3906 y Fp(<cl_real.h>)450 4016 y Fr(F)-8 b(unctions)31
-b(for)f(class)h(cl)p 1288 4016 V 34 w(R,)f(the)h(real)g(n)m(um)m(b)s
-(ers.)-30 4171 y Fp(<cl_float.h>)450 4281 y Fr(F)-8 b(unctions)31
-b(for)f(class)h(cl)p 1288 4281 V 34 w(F,)f(the)h(\015oats.)-30
-4436 y Fp(<cl_sfloat.h>)450 4545 y Fr(F)-8 b(unctions)31
-b(for)f(class)h(cl)p 1288 4545 V 34 w(SF,)f(the)h(short-\015oats.)-30
-4701 y Fp(<cl_ffloat.h>)450 4810 y Fr(F)-8 b(unctions)31
-b(for)f(class)h(cl)p 1288 4810 V 34 w(FF,)g(the)f(single-\015oats.)-30
-4966 y Fp(<cl_dfloat.h>)450 5075 y Fr(F)-8 b(unctions)31
-b(for)f(class)h(cl)p 1288 5075 V 34 w(DF,)g(the)f(double-\015oats.)-30
-5230 y Fp(<cl_lfloat.h>)450 5340 y Fr(F)-8 b(unctions)31
-b(for)f(class)h(cl)p 1288 5340 V 34 w(LF,)f(the)h(long-\015oats.)p
+Fp(-lcln)p Fr(.)-30 2850 y Fs(11.2)68 b(Compatibilit)l(y)48
+b(to)d(old)g(CLN)g(v)l(ersions)-30 3045 y Fr(As)39 b(of)h(CLN)f(v)m
+(ersion)h(1.1)h(all)f(non-macro)f(iden)m(ti\014ers)g(w)m(ere)h(hidden)e
+(in)h(namespace)h Fp(cln)e Fr(in)h(order)g(to)h(a)m(v)m(oid)-30
+3155 y(p)s(oten)m(tial)f(name)e(clashes)h(with)f(other)h(C)p
+Fp(++)e Fr(libraries.)62 b(If)37 b(y)m(ou)h(ha)m(v)m(e)h(an)e(old)h
+(application,)j(y)m(ou)d(will)f(ha)m(v)m(e)i(to)-30 3264
+y(man)m(ually)30 b(p)s(ort)g(it)h(to)g(the)f(new)g(sc)m(heme.)41
+b(The)29 b(follo)m(wing)j(principles)e(will)h(help)f(during)f(the)i
+(transition:)45 3402 y Fq(\017)60 b Fr(All)35 b(headers)f(are)h(no)m(w)
+f(in)g(a)h(separate)h(sub)s(directory)-8 b(.)52 b(Instead)34
+b(of)h(including)f Fp(cl_)p Fl(something)8 b Fp(.h)p
+Fr(,)33 b(include)150 3512 y Fp(cln/)p Fl(something)8
+b Fp(.h)28 b Fr(no)m(w.)45 3648 y Fq(\017)60 b Fr(All)25
+b(public)e(iden)m(ti\014ers)i(\(t)m(yp)s(enames)e(and)h(functions\))g
+(ha)m(v)m(e)h(lost)g(their)g Fp(cl_)e Fr(pre\014x.)37
+b(Exceptions)25 b(are)g(all)g(the)150 3757 y(t)m(yp)s(enames)j(of)i(n)m
+(um)m(b)s(er)d(t)m(yp)s(es,)j(\(cl)p 1404 3757 28 4 v
+34 w(N,)f(cl)p 1625 3757 V 34 w(I,)g(cl)p 1811 3757 V
+33 w(MI,)36 b(.)22 b(.)g(.)11 b(\),)30 b(rings,)g(sym)m(b)s(olic)f(t)m
+(yp)s(es)g(\(cl)p 3204 3757 V 34 w(string,)g(cl)p 3585
+3757 V 34 w(sym)m(b)s(ol\))150 3867 y(and)36 b(p)s(olynomials)g(\(cl)p
+950 3867 V 33 w(UP)p 1113 3867 V 33 w Fl(t)m(yp)s(e)5
+b Fr(\).)60 b(\(This)36 b(is)h(b)s(ecause)f(their)h(names)f(w)m(ould)g
+(not)h(b)s(e)f(mnemonic)e(enough)150 3977 y(once)d(the)g(namespace)f
+Fp(cln)f Fr(is)i(imp)s(orted.)39 b(Ev)m(en)30 b(in)g(a)h(namespace)f(w)
+m(e)h(fa)m(v)m(or)g Fp(cl_N)f Fr(o)m(v)m(er)h Fp(N)p
+Fr(.\))45 4113 y Fq(\017)60 b Fr(All)30 b(public)e Fe(functions)37
+b Fr(that)29 b(had)g(b)m(y)g(a)g Fp(cl_)f Fr(in)h(their)g(name)f(still)
+i(carry)e(that)i Fp(cl_)e Fr(if)h(it)h(is)f(in)m(trinsic)g(part)g(of)
+150 4222 y(a)i(t)m(yp)s(ename)e(\(as)i(in)f Fp(cl_I_to_int)e(\(\))p
+Fr(\).)-30 4386 y(When)d(dev)m(eloping)h(other)f(libraries,)h(please)g
+(k)m(eep)f(in)g(mind)e(not)i(to)g(imp)s(ort)f(the)h(namespace)f
+Fp(cln)g Fr(in)h(one)g(of)g(y)m(our)-30 4496 y(public)e(header)g
+(\014les)h(b)m(y)g(sa)m(ying)g Fp(using)29 b(namespace)f(cln;)p
+Fr(.)37 b(This)23 b(w)m(ould)h(propagate)g(to)h(other)f(applications)h
+(and)-30 4605 y(can)31 b(cause)g(name)e(clashes)i(there.)-30
+4871 y Fs(11.3)68 b(Include)45 b(\014les)-30 5066 y Fr(Here)31
+b(is)f(a)h(summary)c(of)k(the)f(include)h(\014les)f(and)g(their)g(con)m
+(ten)m(ts.)-30 5230 y Fp(<cln/object.h>)450 5340 y Fr(General)h
+(de\014nitions,)f(reference)h(coun)m(ting,)h(garbage)f(collection.)p
eop
%%Page: 46 48
46 47 bop -30 -116 a Fr(Chapter)30 b(11:)41 b(Using)31
-b(the)f(library)2681 b(46)-30 299 y Fp(<cl_rational.h>)450
-408 y Fr(F)-8 b(unctions)31 b(for)f(class)h(cl)p 1288
-408 28 4 v 34 w(RA,)f(the)h(rational)g(n)m(um)m(b)s(ers.)-30
-573 y Fp(<cl_integer.h>)450 682 y Fr(F)-8 b(unctions)31
-b(for)f(class)h(cl)p 1288 682 V 34 w(I,)f(the)h(in)m(tegers.)-30
-847 y Fp(<cl_io.h>)450 956 y Fr(Input/Output.)-30 1121
-y Fp(<cl_complex_io.h>)450 1230 y Fr(Input/Output)d(for)j(class)g(cl)p
-1461 1230 V 33 w(N,)g(the)f(complex)g(n)m(um)m(b)s(ers.)-30
-1395 y Fp(<cl_real_io.h>)450 1504 y Fr(Input/Output)e(for)j(class)g(cl)
-p 1461 1504 V 33 w(R,)g(the)f(real)h(n)m(um)m(b)s(ers.)-30
-1669 y Fp(<cl_float_io.h>)450 1778 y Fr(Input/Output)d(for)j(class)g
-(cl)p 1461 1778 V 33 w(F,)g(the)g(\015oats.)-30 1943
-y Fp(<cl_sfloat_io.h>)450 2052 y Fr(Input/Output)d(for)j(class)g(cl)p
-1461 2052 V 33 w(SF,)f(the)h(short-\015oats.)-30 2217
-y Fp(<cl_ffloat_io.h>)450 2326 y Fr(Input/Output)d(for)j(class)g(cl)p
-1461 2326 V 33 w(FF,)g(the)g(single-\015oats.)-30 2491
-y Fp(<cl_dfloat_io.h>)450 2600 y Fr(Input/Output)d(for)j(class)g(cl)p
-1461 2600 V 33 w(DF,)g(the)g(double-\015oats.)-30 2765
-y Fp(<cl_lfloat_io.h>)450 2874 y Fr(Input/Output)d(for)j(class)g(cl)p
-1461 2874 V 33 w(LF,)g(the)f(long-\015oats.)-30 3039
-y Fp(<cl_rational_io.h>)450 3148 y Fr(Input/Output)e(for)j(class)g(cl)p
-1461 3148 V 33 w(RA,)g(the)f(rational)i(n)m(um)m(b)s(ers.)-30
-3313 y Fp(<cl_integer_io.h>)450 3422 y Fr(Input/Output)c(for)j(class)g
-(cl)p 1461 3422 V 33 w(I,)f(the)h(in)m(tegers.)-30 3587
-y Fp(<cl_input.h>)450 3696 y Fr(Flags)h(for)e(customizing)g(input)g(op)
-s(erations.)-30 3861 y Fp(<cl_output.h>)450 3970 y Fr(Flags)i(for)e
-(customizing)g(output)g(op)s(erations.)-30 4134 y Fp(<cl_malloc.h>)450
-4244 y(cl_malloc_hook)p Fr(,)d Fp(cl_free_hook)p Fr(.)-30
-4408 y Fp(<cl_abort.h>)450 4518 y(cl_abort)p Fr(.)-30
-4682 y Fp(<cl_condition.h>)450 4792 y Fr(Conditions/exceptions.)-30
-4956 y Fp(<cl_string.h>)450 5066 y Fr(Strings.)-30 5230
-y Fp(<cl_symbol.h>)450 5340 y Fr(Sym)m(b)s(ols.)p eop
+b(the)f(library)2681 b(46)-30 299 y Fp(<cln/number.h>)450
+408 y Fr(The)30 b(class)h(cl)p 920 408 28 4 v 33 w(n)m(um)m(b)s(er.)-30
+573 y Fp(<cln/complex.h>)450 682 y Fr(F)-8 b(unctions)31
+b(for)f(class)h(cl)p 1288 682 V 34 w(N,)f(the)h(complex)f(n)m(um)m(b)s
+(ers.)-30 847 y Fp(<cln/real.h>)450 956 y Fr(F)-8 b(unctions)31
+b(for)f(class)h(cl)p 1288 956 V 34 w(R,)f(the)h(real)g(n)m(um)m(b)s
+(ers.)-30 1121 y Fp(<cln/float.h>)450 1230 y Fr(F)-8
+b(unctions)31 b(for)f(class)h(cl)p 1288 1230 V 34 w(F,)f(the)h
+(\015oats.)-30 1395 y Fp(<cln/sfloat.h>)450 1504 y Fr(F)-8
+b(unctions)31 b(for)f(class)h(cl)p 1288 1504 V 34 w(SF,)f(the)h
+(short-\015oats.)-30 1669 y Fp(<cln/ffloat.h>)450 1778
+y Fr(F)-8 b(unctions)31 b(for)f(class)h(cl)p 1288 1778
+V 34 w(FF,)g(the)f(single-\015oats.)-30 1943 y Fp(<cln/dfloat.h>)450
+2052 y Fr(F)-8 b(unctions)31 b(for)f(class)h(cl)p 1288
+2052 V 34 w(DF,)g(the)f(double-\015oats.)-30 2217 y Fp(<cln/lfloat.h>)
+450 2326 y Fr(F)-8 b(unctions)31 b(for)f(class)h(cl)p
+1288 2326 V 34 w(LF,)f(the)h(long-\015oats.)-30 2491
+y Fp(<cln/rational.h>)450 2600 y Fr(F)-8 b(unctions)31
+b(for)f(class)h(cl)p 1288 2600 V 34 w(RA,)f(the)h(rational)g(n)m(um)m
+(b)s(ers.)-30 2765 y Fp(<cln/integer.h>)450 2874 y Fr(F)-8
+b(unctions)31 b(for)f(class)h(cl)p 1288 2874 V 34 w(I,)f(the)h(in)m
+(tegers.)-30 3039 y Fp(<cln/io.h>)450 3148 y Fr(Input/Output.)-30
+3313 y Fp(<cln/complex_io.h>)450 3422 y Fr(Input/Output)d(for)j(class)g
+(cl)p 1461 3422 V 33 w(N,)g(the)f(complex)g(n)m(um)m(b)s(ers.)-30
+3587 y Fp(<cln/real_io.h>)450 3696 y Fr(Input/Output)e(for)j(class)g
+(cl)p 1461 3696 V 33 w(R,)g(the)f(real)h(n)m(um)m(b)s(ers.)-30
+3861 y Fp(<cln/float_io.h>)450 3970 y Fr(Input/Output)d(for)j(class)g
+(cl)p 1461 3970 V 33 w(F,)g(the)g(\015oats.)-30 4134
+y Fp(<cln/sfloat_io.h>)450 4244 y Fr(Input/Output)d(for)j(class)g(cl)p
+1461 4244 V 33 w(SF,)f(the)h(short-\015oats.)-30 4408
+y Fp(<cln/ffloat_io.h>)450 4518 y Fr(Input/Output)d(for)j(class)g(cl)p
+1461 4518 V 33 w(FF,)g(the)g(single-\015oats.)-30 4682
+y Fp(<cln/dfloat_io.h>)450 4792 y Fr(Input/Output)d(for)j(class)g(cl)p
+1461 4792 V 33 w(DF,)g(the)g(double-\015oats.)-30 4956
+y Fp(<cln/lfloat_io.h>)450 5066 y Fr(Input/Output)d(for)j(class)g(cl)p
+1461 5066 V 33 w(LF,)g(the)f(long-\015oats.)-30 5230
+y Fp(<cln/rational_io.h>)450 5340 y Fr(Input/Output)e(for)j(class)g(cl)
+p 1461 5340 V 33 w(RA,)g(the)f(rational)i(n)m(um)m(b)s(ers.)p
+eop
%%Page: 47 49
47 48 bop -30 -116 a Fr(Chapter)30 b(11:)41 b(Using)31
-b(the)f(library)2681 b(47)-30 299 y Fp(<cl_proplist.h>)450
-408 y Fr(Prop)s(ert)m(y)30 b(lists.)-30 564 y Fp(<cl_ring.h>)450
-674 y Fr(General)h(rings.)-30 830 y Fp(<cl_null_ring.h>)450
-939 y Fr(The)f(n)m(ull)g(ring.)-30 1095 y Fp(<cl_complex_ring.h>)450
-1204 y Fr(The)g(ring)g(of)h(complex)f(n)m(um)m(b)s(ers.)-30
-1360 y Fp(<cl_real_ring.h>)450 1470 y Fr(The)g(ring)g(of)h(real)g(n)m
-(um)m(b)s(ers.)-30 1625 y Fp(<cl_rational_ring.h>)450
-1735 y Fr(The)f(ring)g(of)h(rational)g(n)m(um)m(b)s(ers.)-30
-1891 y Fp(<cl_integer_ring.h>)450 2000 y Fr(The)f(ring)g(of)h(in)m
-(tegers.)-30 2156 y Fp(<cl_numtheory.h>)450 2266 y Fr(Num)m(b)s(er)d
-(threory)i(functions.)-30 2421 y Fp(<cl_modinteger.h>)450
-2531 y Fr(Mo)s(dular)g(in)m(tegers.)-30 2687 y Fp(<cl_V.h>)96
-b Fr(V)-8 b(ectors.)-30 2842 y Fp(<cl_GV.h>)450 2952
-y Fr(General)31 b(v)m(ectors.)-30 3108 y Fp(<cl_GV_number.h>)450
-3217 y Fr(General)g(v)m(ectors)h(o)m(v)m(er)g(cl)p 1363
-3217 28 4 v 33 w(n)m(um)m(b)s(er.)-30 3373 y Fp(<cl_GV_complex.h>)450
-3483 y Fr(General)f(v)m(ectors)h(o)m(v)m(er)g(cl)p 1363
-3483 V 33 w(N.)-30 3638 y Fp(<cl_GV_real.h>)450 3748
-y Fr(General)f(v)m(ectors)h(o)m(v)m(er)g(cl)p 1363 3748
-V 33 w(R.)-30 3904 y Fp(<cl_GV_rational.h>)450 4013 y
-Fr(General)f(v)m(ectors)h(o)m(v)m(er)g(cl)p 1363 4013
-V 33 w(RA.)-30 4169 y Fp(<cl_GV_integer.h>)450 4279 y
-Fr(General)f(v)m(ectors)h(o)m(v)m(er)g(cl)p 1363 4279
-V 33 w(I.)-30 4434 y Fp(<cl_GV_modinteger.h>)450 4544
-y Fr(General)f(v)m(ectors)h(of)f(mo)s(dular)d(in)m(tegers.)-30
-4700 y Fp(<cl_SV.h>)450 4809 y Fr(Simple)h(v)m(ectors.)-30
-4965 y Fp(<cl_SV_number.h>)450 5075 y Fr(Simple)g(v)m(ectors)j(o)m(v)m
-(er)g(cl)p 1322 5075 V 33 w(n)m(um)m(b)s(er.)-30 5230
-y Fp(<cl_SV_complex.h>)450 5340 y Fr(Simple)d(v)m(ectors)j(o)m(v)m(er)g
-(cl)p 1322 5340 V 33 w(N.)p eop
+b(the)f(library)2681 b(47)-30 299 y Fp(<cln/integer_io.h>)450
+408 y Fr(Input/Output)28 b(for)j(class)g(cl)p 1461 408
+28 4 v 33 w(I,)f(the)h(in)m(tegers.)-30 573 y Fp(<cln/input.h>)450
+682 y Fr(Flags)h(for)e(customizing)g(input)g(op)s(erations.)-30
+847 y Fp(<cln/output.h>)450 956 y Fr(Flags)i(for)e(customizing)g
+(output)g(op)s(erations.)-30 1121 y Fp(<cln/malloc.h>)450
+1230 y(malloc_hook)p Fr(,)e Fp(free_hook)p Fr(.)-30 1395
+y Fp(<cln/abort.h>)450 1504 y(cl_abort)p Fr(.)-30 1669
+y Fp(<cln/condition.h>)450 1778 y Fr(Conditions/exceptions.)-30
+1943 y Fp(<cln/string.h>)450 2052 y Fr(Strings.)-30 2217
+y Fp(<cln/symbol.h>)450 2326 y Fr(Sym)m(b)s(ols.)-30
+2491 y Fp(<cln/proplist.h>)450 2600 y Fr(Prop)s(ert)m(y)i(lists.)-30
+2765 y Fp(<cln/ring.h>)450 2874 y Fr(General)h(rings.)-30
+3039 y Fp(<cln/null_ring.h>)450 3148 y Fr(The)f(n)m(ull)g(ring.)-30
+3313 y Fp(<cln/complex_ring.h>)450 3422 y Fr(The)g(ring)g(of)h(complex)
+f(n)m(um)m(b)s(ers.)-30 3587 y Fp(<cln/real_ring.h>)450
+3696 y Fr(The)g(ring)g(of)h(real)g(n)m(um)m(b)s(ers.)-30
+3861 y Fp(<cln/rational_ring.h>)450 3970 y Fr(The)f(ring)g(of)h
+(rational)g(n)m(um)m(b)s(ers.)-30 4134 y Fp(<cln/integer_ring.h>)450
+4244 y Fr(The)f(ring)g(of)h(in)m(tegers.)-30 4408 y Fp
+(<cln/numtheory.h>)450 4518 y Fr(Num)m(b)s(er)d(threory)i(functions.)
+-30 4682 y Fp(<cln/modinteger.h>)450 4792 y Fr(Mo)s(dular)g(in)m
+(tegers.)-30 4956 y Fp(<cln/V.h>)450 5066 y Fr(V)-8 b(ectors.)-30
+5230 y Fp(<cln/GV.h>)450 5340 y Fr(General)31 b(v)m(ectors.)p
+eop
%%Page: 48 50
48 49 bop -30 -116 a Fr(Chapter)30 b(11:)41 b(Using)31
-b(the)f(library)2681 b(48)-30 299 y Fp(<cl_SV_real.h>)450
-408 y Fr(Simple)29 b(v)m(ectors)j(o)m(v)m(er)g(cl)p 1322
-408 28 4 v 33 w(R.)-30 575 y Fp(<cl_SV_rational.h>)450
-685 y Fr(Simple)d(v)m(ectors)j(o)m(v)m(er)g(cl)p 1322
-685 V 33 w(RA.)-30 852 y Fp(<cl_SV_integer.h>)450 961
-y Fr(Simple)d(v)m(ectors)j(o)m(v)m(er)g(cl)p 1322 961
-V 33 w(I.)-30 1128 y Fp(<cl_SV_ringelt.h>)450 1238 y
-Fr(Simple)d(v)m(ectors)j(of)e(general)i(ring)e(elemen)m(ts.)-30
-1405 y Fp(<cl_univpoly.h>)450 1514 y Fr(Univ)-5 b(ariate)32
-b(p)s(olynomials.)-30 1681 y Fp(<cl_univpoly_integer.h>)450
-1791 y Fr(Univ)-5 b(ariate)32 b(p)s(olynomials)d(o)m(v)m(er)j(the)f(in)
-m(tegers.)-30 1958 y Fp(<cl_univpoly_rational.h>)450
-2067 y Fr(Univ)-5 b(ariate)32 b(p)s(olynomials)d(o)m(v)m(er)j(the)f
-(rational)g(n)m(um)m(b)s(ers.)-30 2234 y Fp(<cl_univpoly_real.h>)450
-2344 y Fr(Univ)-5 b(ariate)32 b(p)s(olynomials)d(o)m(v)m(er)j(the)f
-(real)g(n)m(um)m(b)s(ers.)-30 2511 y Fp(<cl_univpoly_complex.h>)450
-2620 y Fr(Univ)-5 b(ariate)32 b(p)s(olynomials)d(o)m(v)m(er)j(the)f
-(complex)f(n)m(um)m(b)s(ers.)-30 2787 y Fp(<cl_univpoly_modint.h>)450
-2897 y Fr(Univ)-5 b(ariate)32 b(p)s(olynomials)d(o)m(v)m(er)j(mo)s
-(dular)c(in)m(teger)k(rings.)-30 3064 y Fp(<cl_timing.h>)450
-3173 y Fr(Timing)d(facilities.)-30 3340 y Fp(<cln.h>)144
-b Fr(Includes)30 b(all)h(of)f(the)h(ab)s(o)m(v)m(e.)-30
-3616 y Fs(11.3)68 b(An)44 b(Example)-30 3816 y Fr(A)30
+b(the)f(library)2681 b(48)-30 299 y Fp(<cln/GV_number.h>)450
+408 y Fr(General)31 b(v)m(ectors)h(o)m(v)m(er)g(cl)p
+1363 408 28 4 v 33 w(n)m(um)m(b)s(er.)-30 573 y Fp(<cln/GV_complex.h>)
+450 682 y Fr(General)f(v)m(ectors)h(o)m(v)m(er)g(cl)p
+1363 682 V 33 w(N.)-30 847 y Fp(<cln/GV_real.h>)450 956
+y Fr(General)f(v)m(ectors)h(o)m(v)m(er)g(cl)p 1363 956
+V 33 w(R.)-30 1121 y Fp(<cln/GV_rational.h>)450 1230
+y Fr(General)f(v)m(ectors)h(o)m(v)m(er)g(cl)p 1363 1230
+V 33 w(RA.)-30 1395 y Fp(<cln/GV_integer.h>)450 1504
+y Fr(General)f(v)m(ectors)h(o)m(v)m(er)g(cl)p 1363 1504
+V 33 w(I.)-30 1669 y Fp(<cln/GV_modinteger.h>)450 1778
+y Fr(General)f(v)m(ectors)h(of)f(mo)s(dular)d(in)m(tegers.)-30
+1943 y Fp(<cln/SV.h>)450 2052 y Fr(Simple)h(v)m(ectors.)-30
+2217 y Fp(<cln/SV_number.h>)450 2326 y Fr(Simple)g(v)m(ectors)j(o)m(v)m
+(er)g(cl)p 1322 2326 V 33 w(n)m(um)m(b)s(er.)-30 2491
+y Fp(<cln/SV_complex.h>)450 2600 y Fr(Simple)d(v)m(ectors)j(o)m(v)m(er)
+g(cl)p 1322 2600 V 33 w(N.)-30 2765 y Fp(<cln/SV_real.h>)450
+2874 y Fr(Simple)d(v)m(ectors)j(o)m(v)m(er)g(cl)p 1322
+2874 V 33 w(R.)-30 3039 y Fp(<cln/SV_rational.h>)450
+3148 y Fr(Simple)d(v)m(ectors)j(o)m(v)m(er)g(cl)p 1322
+3148 V 33 w(RA.)-30 3313 y Fp(<cln/SV_integer.h>)450
+3422 y Fr(Simple)d(v)m(ectors)j(o)m(v)m(er)g(cl)p 1322
+3422 V 33 w(I.)-30 3587 y Fp(<cln/SV_ringelt.h>)450 3696
+y Fr(Simple)d(v)m(ectors)j(of)e(general)i(ring)e(elemen)m(ts.)-30
+3861 y Fp(<cln/univpoly.h>)450 3970 y Fr(Univ)-5 b(ariate)32
+b(p)s(olynomials.)-30 4134 y Fp(<cln/univpoly_integer.h>)450
+4244 y Fr(Univ)-5 b(ariate)32 b(p)s(olynomials)d(o)m(v)m(er)j(the)f(in)
+m(tegers.)-30 4408 y Fp(<cln/univpoly_rational.h)o(>)450
+4518 y Fr(Univ)-5 b(ariate)32 b(p)s(olynomials)d(o)m(v)m(er)j(the)f
+(rational)g(n)m(um)m(b)s(ers.)-30 4682 y Fp(<cln/univpoly_real.h>)450
+4792 y Fr(Univ)-5 b(ariate)32 b(p)s(olynomials)d(o)m(v)m(er)j(the)f
+(real)g(n)m(um)m(b)s(ers.)-30 4956 y Fp(<cln/univpoly_complex.h>)450
+5066 y Fr(Univ)-5 b(ariate)32 b(p)s(olynomials)d(o)m(v)m(er)j(the)f
+(complex)f(n)m(um)m(b)s(ers.)-30 5230 y Fp(<cln/univpoly_modint.h>)450
+5340 y Fr(Univ)-5 b(ariate)32 b(p)s(olynomials)d(o)m(v)m(er)j(mo)s
+(dular)c(in)m(teger)k(rings.)p eop
+%%Page: 49 51
+49 50 bop -30 -116 a Fr(Chapter)30 b(11:)41 b(Using)31
+b(the)f(library)2681 b(49)-30 299 y Fp(<cln/timing.h>)450
+408 y Fr(Timing)29 b(facilities.)-30 576 y Fp(<cln/cln.h>)450
+686 y Fr(Includes)h(all)h(of)f(the)h(ab)s(o)m(v)m(e.)-30
+965 y Fs(11.4)68 b(An)44 b(Example)-30 1166 y Fr(A)30
b(function)h(whic)m(h)f(computes)f(the)i(n)m(th)f(Fib)s(onacci)h(n)m
(um)m(b)s(er)d(can)j(b)s(e)f(written)g(as)h(follo)m(ws.)210
-3953 y Fp(#include)46 b(<cl_integer.h>)210 4056 y(#include)g
-(<cl_real.h>)210 4264 y(//)h(Returns)f(F_n,)h(computed)e(as)i(the)g
-(nearest)f(integer)g(to)210 4368 y(//)h
-(\(\(1+sqrt\(5\)\)/2\)^n/sqrt\(5\))o(.)42 b(Assume)k(n>=0.)210
-4472 y(const)g(cl_I)h(fibonacci)e(\(int)i(n\))210 4575
-y({)592 4679 y(//)g(Need)g(a)g(precision)e(of)j
-(\(\(1+sqrt\(5\)\)/2\)^-n.)592 4783 y(cl_float_format_t)43
+1303 y Fp(#include)46 b(<cln/integer.h>)210 1407 y(#include)g
+(<cln/real.h>)210 1511 y(using)g(namespace)g(cln;)210
+1718 y(//)h(Returns)f(F_n,)h(computed)e(as)i(the)g(nearest)f(integer)g
+(to)210 1822 y(//)h(\(\(1+sqrt\(5\)\)/2\)^n/sqrt\(5\))o(.)42
+b(Assume)k(n>=0.)210 1926 y(const)g(cl_I)h(fibonacci)e(\(int)i(n\))210
+2030 y({)592 2133 y(//)g(Need)g(a)g(precision)e(of)j
+(\(\(1+sqrt\(5\)\)/2\)^-n.)592 2237 y(cl_float_format_t)43
b(prec)k(=)g(cl_float_format\(\(int\)\(0.)o(2089)o(8764)o(1*n)o(+5\)\))
-o(;)592 4887 y(cl_R)f(sqrt5)h(=)g(sqrt\(cl_float\(5,prec\)\);)592
-4990 y(cl_R)f(phi)h(=)h(\(1+sqrt5\)/2;)592 5094 y(return)e(round1\()g
-(expt\(phi,n\)/sqrt5)d(\);)210 5198 y(})-30 5340 y Fr(Let's)31
-b(explain)g(what)f(is)g(going)i(on)e(in)g(detail.)p eop
-%%Page: 49 51
-49 50 bop -30 -116 a Fr(Chapter)30 b(11:)41 b(Using)31
-b(the)f(library)2681 b(49)-30 299 y(The)27 b(include)g(\014le)h
-Fp(<cl_integer.h>)c Fr(is)k(necessary)g(b)s(ecause)f(the)h(t)m(yp)s(e)g
-Fp(cl_I)e Fr(is)i(used)f(in)g(the)h(function,)g(and)f(the)-30
-408 y(include)k(\014le)g Fp(<cl_real.h>)e Fr(is)i(needed)g(for)g(the)g
-(t)m(yp)s(e)h Fp(cl_R)e Fr(and)h(the)g(\015oating)h(p)s(oin)m(t)f(n)m
-(um)m(b)s(er)e(functions.)43 b(The)-30 518 y(order)30
-b(of)g(the)h(include)f(\014les)g(do)s(es)g(not)h(matter.)-30
-657 y(Then)23 b(comes)i(the)f(function)h(declaration.)40
+o(;)592 2341 y(cl_R)f(sqrt5)h(=)g(sqrt\(cl_float\(5,prec\)\);)592
+2445 y(cl_R)f(phi)h(=)h(\(1+sqrt5\)/2;)592 2548 y(return)e(round1\()g
+(expt\(phi,n\)/sqrt5)d(\);)210 2652 y(})-30 2795 y Fr(Let's)31
+b(explain)g(what)f(is)g(going)i(on)e(in)g(detail.)-30
+2938 y(The)k(include)h(\014le)f Fp(<cln/integer.h>)d
+Fr(is)j(necessary)h(b)s(ecause)g(the)g(t)m(yp)s(e)g Fp(cl_I)e
+Fr(is)i(used)f(in)g(the)h(function,)h(and)-30 3048 y(the)31
+b(include)g(\014le)g Fp(<cln/real.h>)c Fr(is)k(needed)g(for)f(the)i(t)m
+(yp)s(e)f Fp(cl_R)e Fr(and)i(the)g(\015oating)h(p)s(oin)m(t)f(n)m(um)m
+(b)s(er)d(functions.)-30 3157 y(The)37 b(order)g(of)h(the)f(include)h
+(\014les)f(do)s(es)g(not)h(matter.)62 b(In)37 b(order)g(not)h(to)g
+(write)g(out)g Fp(cln::)p Fl(fo)s(o)i Fr(w)m(e)e(can)g(safely)-30
+3267 y(imp)s(ort)29 b(the)h(whole)h(namespace)f Fp(cln)p
+Fr(.)-30 3410 y(Then)23 b(comes)i(the)f(function)h(declaration.)40
b(The)24 b(argumen)m(t)g(is)g(an)h Fp(int)p Fr(,)g(the)f(result)h(an)f
-(in)m(teger.)40 b(The)24 b(return)g(t)m(yp)s(e)-30 767
+(in)m(teger.)40 b(The)24 b(return)g(t)m(yp)s(e)-30 3520
y(is)33 b(de\014ned)e(as)i(`)p Fp(const)c(cl_I)p Fr(',)j(not)h(simply)e
(`)p Fp(cl_I)p Fr(',)i(b)s(ecause)f(that)h(allo)m(ws)h(the)f(compiler)f
-(to)h(detect)h(t)m(yp)s(os)f(lik)m(e)-30 876 y(`)p Fp(fibonacci\(n\))27
-b(=)j(100)p Fr('.)40 b(It)29 b(w)m(ould)f(b)s(e)h(p)s(ossible)f(to)i
+(to)h(detect)h(t)m(yp)s(os)f(lik)m(e)-30 3629 y(`)p Fp(fibonacci\(n\))
+27 b(=)j(100)p Fr('.)40 b(It)29 b(w)m(ould)f(b)s(e)h(p)s(ossible)f(to)i
(declare)f(the)h(return)d(t)m(yp)s(e)i(as)g Fp(const)g(cl_R)f
-Fr(\(real)i(n)m(um)m(b)s(er\))-30 986 y(or)36 b(ev)m(en)g
+Fr(\(real)i(n)m(um)m(b)s(er\))-30 3739 y(or)36 b(ev)m(en)g
Fp(const)29 b(cl_N)35 b Fr(\(complex)h(n)m(um)m(b)s(er\).)55
b(W)-8 b(e)37 b(use)f(the)g(most)f(sp)s(ecialized)i(p)s(ossible)e
-(return)g(t)m(yp)s(e)h(b)s(ecause)-30 1095 y(functions)26
+(return)g(t)m(yp)s(e)h(b)s(ecause)-30 3848 y(functions)26
b(whic)m(h)g(call)h(`)p Fp(fibonacci)p Fr(')d(will)j(b)s(e)e(able)i(to)
g(pro\014t)f(from)e(the)j(compiler's)f(t)m(yp)s(e)g(analysis:)39
-b(Adding)26 b(t)m(w)m(o)-30 1205 y(in)m(tegers)g(is)e(sligh)m(tly)i
+b(Adding)26 b(t)m(w)m(o)-30 3958 y(in)m(tegers)g(is)e(sligh)m(tly)i
(more)e(e\016cien)m(t)i(than)e(adding)g(the)h(same)f(ob)5
b(jects)25 b(declared)g(as)g(complex)f(n)m(um)m(b)s(ers,)g(b)s(ecause)
--30 1314 y(it)34 b(needs)f(less)h(t)m(yp)s(e)f(dispatc)m(h.)51
+-30 4068 y(it)34 b(needs)f(less)h(t)m(yp)s(e)f(dispatc)m(h.)51
b(Also,)35 b(when)d(linking)i(to)g(CLN)f(as)h(a)g(non-shared)e(library)
--8 b(,)35 b(this)e(minimizes)f(the)-30 1424 y(size)f(of)g(the)f
-(resulting)h(executable)h(program.)-30 1563 y(The)f(result)g(will)h(b)s
+-8 b(,)35 b(this)e(minimizes)f(the)-30 4177 y(size)f(of)g(the)f
+(resulting)h(executable)h(program.)-30 4320 y(The)f(result)g(will)h(b)s
(e)f(computed)f(as)i(expt\(phi,n\)/sqrt\(5\),)h(rounded)d(to)j(the)e
(nearest)h(in)m(teger.)46 b(In)31 b(order)g(to)h(get)-30
-1673 y(a)c(correct)h(result,)g(the)f(absolute)h(error)e(should)g(b)s(e)
+4430 y(a)c(correct)h(result,)g(the)f(absolute)h(error)e(should)g(b)s(e)
g(less)i(than)e(1/2,)j(i.e.)41 b(the)28 b(relativ)m(e)i(error)e(should)
-f(b)s(e)g(less)h(than)-30 1782 y(sqrt\(5\)/\(2*expt\(phi,n\)\).)65
+f(b)s(e)g(less)h(than)-30 4539 y(sqrt\(5\)/\(2*expt\(phi,n\)\).)65
b(T)-8 b(o)38 b(this)g(end,)h(the)e(\014rst)g(line)h(computes)f(a)h
(\015oating)g(p)s(oin)m(t)g(precision)g(for)f(sqrt\(5\))-30
-1892 y(and)30 b(phi.)-30 2031 y(Then)41 b(sqrt\(5\))h(is)g(computed)e
+4649 y(and)30 b(phi.)-30 4792 y(Then)41 b(sqrt\(5\))h(is)g(computed)e
(b)m(y)i(\014rst)e(con)m(v)m(erting)k(the)e(in)m(teger)h(5)f(to)g(a)g
(\015oating)g(p)s(oin)m(t)g(n)m(um)m(b)s(er)d(and)i(than)-30
-2140 y(taking)i(the)f(square)g(ro)s(ot.)76 b(The)42 b(con)m(v)m(erse,)k
+4902 y(taking)i(the)f(square)g(ro)s(ot.)76 b(The)42 b(con)m(v)m(erse,)k
(\014rst)c(taking)h(the)f(square)g(ro)s(ot)g(of)g(5,)k(and)c(then)f
-(con)m(v)m(erting)j(to)-30 2250 y(the)c(desired)f(precision,)j(w)m
+(con)m(v)m(erting)j(to)-30 5011 y(the)c(desired)f(precision,)j(w)m
(ould)e(not)g(w)m(ork)f(in)h(CLN:)f(The)g(square)h(ro)s(ot)g(w)m(ould)f
-(b)s(e)g(computed)f(to)j(a)f(default)-30 2359 y(precision)g(\(normally)
+(b)s(e)g(computed)f(to)j(a)f(default)-30 5121 y(precision)g(\(normally)
f(single-\015oat)j(precision\),)h(and)c(the)h(follo)m(wing)i(con)m(v)m
-(ersion)f(could)f(not)g(help)f(ab)s(out)h(the)-30 2469
+(ersion)f(could)f(not)g(help)f(ab)s(out)h(the)-30 5230
y(lac)m(king)h(accuracy)-8 b(.)68 b(This)39 b(is)g(b)s(ecause)g(CLN)g
(is)g(not)g(a)g(sym)m(b)s(olic)g(computer)f(algebra)i(system)e(and)h
-(do)s(es)g(not)-30 2579 y(represen)m(t)30 b(sqrt\(5\))i(in)e(a)h(non-n)
-m(umeric)d(w)m(a)m(y)-8 b(.)-30 2717 y(The)29 b(t)m(yp)s(e)i
+(do)s(es)g(not)-30 5340 y(represen)m(t)30 b(sqrt\(5\))i(in)e(a)h(non-n)
+m(umeric)d(w)m(a)m(y)-8 b(.)p eop
+%%Page: 50 52
+50 51 bop -30 -116 a Fr(Chapter)30 b(11:)41 b(Using)31
+b(the)f(library)2681 b(50)-30 299 y(The)29 b(t)m(yp)s(e)i
Fp(cl_R)d Fr(for)i(sqrt5)g(and,)g(in)g(the)g(follo)m(wing)h(line,)g
(phi)e(is)h(the)h(only)f(p)s(ossible)f(c)m(hoice.)43
-b(Y)-8 b(ou)30 b(cannot)h(write)-30 2827 y Fp(cl_F)26
+b(Y)-8 b(ou)30 b(cannot)h(write)-30 408 y Fp(cl_F)26
b Fr(b)s(ecause)h(the)g(C)p Fp(++)g Fr(compiler)f(can)i(only)f(infer)g
(that)g Fp(cl_float\(5,prec\))c Fr(is)k(a)h(real)f(n)m(um)m(b)s(er.)38
-b(Y)-8 b(ou)27 b(cannot)-30 2937 y(write)k Fp(cl_N)e
-Fr(b)s(ecause)h(a)h(`)p Fp(round1)p Fr(')e(do)s(es)h(not)h(exist)g(for)
-f(general)h(complex)f(n)m(um)m(b)s(ers.)-30 3075 y(When)21
-b(the)g(function)g(returns,)h(all)g(the)f(lo)s(cal)h(v)-5
-b(ariables)22 b(in)f(the)g(function)g(are)g(automatically)i(reclaimed)e
-(\(garbage)-30 3185 y(collected\).)43 b(Only)30 b(the)h(result)f
-(surviv)m(es)g(and)g(gets)h(passed)f(to)h(the)g(caller.)-30
-3324 y(The)d(\014le)h Fp(fibonacci.cc)c Fr(in)j(the)h(sub)s(directory)e
-Fp(examples)f Fr(con)m(tains)k(this)f(implemen)m(tation)f(together)i
-(with)e(an)-30 3434 y(ev)m(en)j(faster)g(algorithm.)-30
-3702 y Fs(11.4)68 b(Debugging)46 b(supp)t(ort)-30 3899
-y Fr(When)30 b(debugging)g(a)h(CLN)f(application)i(with)e(GNU)h
-Fp(gdb)p Fr(,)f(t)m(w)m(o)h(facilities)i(are)e(a)m(v)-5
-b(ailable)33 b(from)28 b(the)j(library:)45 4038 y Fq(\017)60
-b Fr(The)36 b(library)g(do)s(es)g(t)m(yp)s(e)h(c)m(hec)m(ks,)j(range)d
-(c)m(hec)m(ks,)i(consistency)f(c)m(hec)m(ks)g(at)f(man)m(y)f(places.)60
-b(When)36 b(one)h(of)150 4147 y(these)44 b(fails,)j(the)c(function)g
-Fp(cl_abort\(\))e Fr(is)i(called.)81 b(Its)43 b(default)g(implemen)m
-(tation)g(is)g(to)h(p)s(erform)d(an)150 4257 y Fp(exit\(1\))p
-Fr(,)32 b(so)i(y)m(ou)g(w)m(on't)g(ha)m(v)m(e)h(a)f(core)g(dump.)47
-b(But)34 b(for)f(debugging,)h(it)g(is)g(b)s(est)f(to)h(set)g(a)g
-(breakp)s(oin)m(t)f(at)150 4366 y(this)d(function:)390
-4497 y Fp(\(gdb\))46 b(break)h(cl_abort)150 4634 y Fr(When)30
+b(Y)-8 b(ou)27 b(cannot)-30 518 y(write)k Fp(cl_N)e Fr(b)s(ecause)h(a)h
+(`)p Fp(round1)p Fr(')e(do)s(es)h(not)h(exist)g(for)f(general)h
+(complex)f(n)m(um)m(b)s(ers.)-30 651 y(When)21 b(the)g(function)g
+(returns,)h(all)g(the)f(lo)s(cal)h(v)-5 b(ariables)22
+b(in)f(the)g(function)g(are)g(automatically)i(reclaimed)e(\(garbage)-30
+761 y(collected\).)43 b(Only)30 b(the)h(result)f(surviv)m(es)g(and)g
+(gets)h(passed)f(to)h(the)g(caller.)-30 894 y(The)d(\014le)h
+Fp(fibonacci.cc)c Fr(in)j(the)h(sub)s(directory)e Fp(examples)f
+Fr(con)m(tains)k(this)f(implemen)m(tation)f(together)i(with)e(an)-30
+1003 y(ev)m(en)j(faster)g(algorithm.)-30 1257 y Fs(11.5)68
+b(Debugging)46 b(supp)t(ort)-30 1448 y Fr(When)30 b(debugging)g(a)h
+(CLN)f(application)i(with)e(GNU)h Fp(gdb)p Fr(,)f(t)m(w)m(o)h
+(facilities)i(are)e(a)m(v)-5 b(ailable)33 b(from)28 b(the)j(library:)45
+1581 y Fq(\017)60 b Fr(The)36 b(library)g(do)s(es)g(t)m(yp)s(e)h(c)m
+(hec)m(ks,)j(range)d(c)m(hec)m(ks,)i(consistency)f(c)m(hec)m(ks)g(at)f
+(man)m(y)f(places.)60 b(When)36 b(one)h(of)150 1691 y(these)44
+b(fails,)j(the)c(function)g Fp(cl_abort\(\))e Fr(is)i(called.)81
+b(Its)43 b(default)g(implemen)m(tation)g(is)g(to)h(p)s(erform)d(an)150
+1800 y Fp(exit\(1\))p Fr(,)32 b(so)i(y)m(ou)g(w)m(on't)g(ha)m(v)m(e)h
+(a)f(core)g(dump.)47 b(But)34 b(for)f(debugging,)h(it)g(is)g(b)s(est)f
+(to)h(set)g(a)g(breakp)s(oin)m(t)f(at)150 1910 y(this)d(function:)390
+2037 y Fp(\(gdb\))46 b(break)h(cl_abort)150 2170 y Fr(When)30
b(this)g(breakp)s(oin)m(t)h(is)f(hit,)h(lo)s(ok)g(at)g(the)f(stac)m
-(k's)i(bac)m(ktrace:)390 4765 y Fp(\(gdb\))46 b(where)45
-4902 y Fq(\017)60 b Fr(The)32 b(debugger's)g(normal)g
+(k's)i(bac)m(ktrace:)390 2298 y Fp(\(gdb\))46 b(where)45
+2431 y Fq(\017)60 b Fr(The)32 b(debugger's)g(normal)g
Fp(print)f Fr(command)f(do)s(esn't)j(kno)m(w)f(ab)s(out)h(CLN's)f(t)m
-(yp)s(es)g(and)g(therefore)h(prin)m(ts)150 5011 y(mostly)j(useless)g
+(yp)s(es)g(and)g(therefore)h(prin)m(ts)150 2540 y(mostly)j(useless)g
(hexadecimal)h(addresses.)58 b(CLN)35 b(o\013ers)i(a)g(function)f
Fp(cl_print)p Fr(,)f(callable)k(from)34 b(the)j(de-)150
-5121 y(bugger,)29 b(for)f(prin)m(ting)g(n)m(um)m(b)s(er)d(ob)5
+2650 y(bugger,)29 b(for)f(prin)m(ting)g(n)m(um)m(b)s(er)d(ob)5
b(jects.)41 b(In)28 b(order)f(to)i(get)g(this)f(function,)h(y)m(ou)f
-(ha)m(v)m(e)i(to)f(de\014ne)e(the)h(macro)150 5230 y(`)p
+(ha)m(v)m(e)i(to)f(de\014ne)e(the)h(macro)150 2760 y(`)p
Fp(CL_DEBUG)p Fr(')21 b(and)h(then)g(include)g(all)i(the)f(header)f
(\014les)h(for)f(whic)m(h)g(y)m(ou)h(w)m(an)m(t)h Fp(cl_print)c
-Fr(debugging)i(supp)s(ort.)150 5340 y(F)-8 b(or)31 b(example:)p
-eop
-%%Page: 50 52
-50 51 bop -30 -116 a Fr(Chapter)30 b(11:)41 b(Using)31
-b(the)f(library)2681 b(50)390 299 y Fp(#define)46 b(CL_DEBUG)390
-403 y(#include)g(<cl_string.h>)150 537 y Fr(No)m(w,)30
-b(if)e(y)m(ou)g(ha)m(v)m(e)i(in)d(y)m(our)h(program)f(a)i(v)-5
-b(ariable)29 b Fp(cl_string)f(s)p Fr(,)g(and)g(insp)s(ect)g(it)g(under)
-f Fp(gdb)p Fr(,)h(the)g(output)150 647 y(ma)m(y)i(lo)s(ok)h(lik)m(e)h
-(this:)390 775 y Fp(\(gdb\))46 b(print)h(s)390 879 y($7)g(=)h
-({<cl_gcpointer>)43 b(=)48 b({)f(=)h({pointer)d(=)j(0x8055b60,)d
-(heappointer)f(=)k(0x8055b60,)485 983 y(word)f(=)h(134568800}},)c(})390
-1087 y(\(gdb\))i(call)h(cl_print\(s\))390 1191 y(\(cl_string\))e("")390
-1294 y($8)i(=)h(134568800)150 1429 y Fr(Note)38 b(that)f(the)g(output)f
+Fr(debugging)i(supp)s(ort.)150 2869 y(F)-8 b(or)31 b(example:)390
+2996 y Fp(#define)46 b(CL_DEBUG)390 3100 y(#include)g(<cln/string.h>)
+150 3233 y Fr(No)m(w,)30 b(if)e(y)m(ou)g(ha)m(v)m(e)i(in)d(y)m(our)h
+(program)f(a)i(v)-5 b(ariable)29 b Fp(cl_string)f(s)p
+Fr(,)g(and)g(insp)s(ect)g(it)g(under)f Fp(gdb)p Fr(,)h(the)g(output)150
+3343 y(ma)m(y)i(lo)s(ok)h(lik)m(e)h(this:)390 3470 y
+Fp(\(gdb\))46 b(print)h(s)390 3574 y($7)g(=)h({<cl_gcpointer>)43
+b(=)48 b({)f(=)h({pointer)d(=)j(0x8055b60,)d(heappointer)f(=)k
+(0x8055b60,)485 3678 y(word)f(=)h(134568800}},)c(})390
+3782 y(\(gdb\))i(call)h(cl_print\(s\))390 3885 y(\(cl_string\))e("")390
+3989 y($8)i(=)h(134568800)150 4122 y Fr(Note)38 b(that)f(the)g(output)f
(of)h Fp(cl_print)d Fr(go)s(es)j(to)g(the)g(program's)f(error)g
-(output,)i(not)e(to)i(gdb's)e(standard)150 1538 y(output.)150
-1673 y(Note,)43 b(ho)m(w)m(ev)m(er,)f(that)d(the)g(ab)s(o)m(v)m(e)i
+(output,)i(not)e(to)i(gdb's)e(standard)150 4232 y(output.)150
+4365 y(Note,)43 b(ho)m(w)m(ev)m(er,)f(that)d(the)g(ab)s(o)m(v)m(e)i
(facilit)m(y)f(do)s(es)f(not)g(w)m(ork)g(with)f(all)i(CLN)f(t)m(yp)s
-(es,)i(only)e(with)f(n)m(um)m(b)s(er)150 1782 y(ob)5
+(es,)i(only)e(with)f(n)m(um)m(b)s(er)150 4475 y(ob)5
b(jects)27 b(and)e(similar.)38 b(Therefore)26 b(CLN)f(o\013ers)i(a)f
(mem)m(b)s(er)d(function)j Fp(debug_print\(\))c Fr(on)j(all)i(CLN)f(t)m
-(yp)s(es.)150 1892 y(The)h(same)g(macro)g(`)p Fp(CL_DEBUG)p
+(yp)s(es.)150 4584 y(The)h(same)g(macro)g(`)p Fp(CL_DEBUG)p
Fr(')f(is)h(needed)h(for)f(this)g(mem)m(b)s(er)e(function)i(to)i(b)s(e)
-e(implemen)m(ted.)38 b(Under)27 b Fp(gdb)p Fr(,)150 2002
-y(y)m(ou)k(call)g(it)g(lik)m(e)h(this:)390 2130 y Fp(\(gdb\))46
-b(print)h(s)390 2234 y($7)g(=)h({<cl_gcpointer>)43 b(=)48
+e(implemen)m(ted.)38 b(Under)27 b Fp(gdb)p Fr(,)150 4694
+y(y)m(ou)k(call)g(it)g(lik)m(e)h(this:)390 4821 y Fp(\(gdb\))46
+b(print)h(s)390 4925 y($7)g(=)h({<cl_gcpointer>)43 b(=)48
b({)f(=)h({pointer)d(=)j(0x8055b60,)d(heappointer)f(=)k(0x8055b60,)485
-2338 y(word)f(=)h(134568800}},)c(})390 2442 y(\(gdb\))i(call)h
-(s.debug_print\(\))390 2545 y(\(cl_string\))e("")390
-2649 y(\(gdb\))h(define)g(cprint)390 2753 y(>call)g
-(\($1\).debug_print\(\))390 2857 y(>end)390 2961 y(\(gdb\))g(cprint)g
-(s)390 3064 y(\(cl_string\))f("")150 3199 y Fr(Unfortunately)-8
+5029 y(word)f(=)h(134568800}},)c(})390 5132 y(\(gdb\))i(call)h
+(s.debug_print\(\))390 5236 y(\(cl_string\))e("")390
+5340 y(\(gdb\))h(define)g(cprint)p eop
+%%Page: 51 53
+51 52 bop -30 -116 a Fr(Chapter)30 b(11:)41 b(Using)31
+b(the)f(library)2681 b(51)390 299 y Fp(>call)46 b
+(\($1\).debug_print\(\))390 403 y(>end)390 506 y(\(gdb\))g(cprint)g(s)
+390 610 y(\(cl_string\))f("")150 745 y Fr(Unfortunately)-8
b(,)31 b(this)g(feature)f(do)s(es)g(not)h(seem)f(to)h(w)m(ork)f(under)f
(all)i(circumstances.)p eop
-%%Page: 51 53
-51 52 bop -30 -116 a Fr(Chapter)30 b(12:)41 b(Customizing)2863
-b(51)-30 299 y Fo(12)80 b(Customizing)-30 656 y Fs(12.1)68
+%%Page: 52 54
+52 53 bop -30 -116 a Fr(Chapter)30 b(12:)41 b(Customizing)2863
+b(52)-30 299 y Fo(12)80 b(Customizing)-30 656 y Fs(12.1)68
b(Error)46 b(handling)-30 848 y Fr(When)30 b(a)h(fatal)g(error)f(o)s
(ccurs,)g(an)g(error)g(message)g(is)g(output)g(to)h(the)f(standard)g
(error)g(output)f(stream,)h(and)g(the)-30 958 y(function)c
-30 1068 y(the)i(application.)41 b(T)-8 b(o)29 b(catc)m(h)h(suc)m(h)d
(a)i(fatal)g(error,)f(y)m(ou)h(need)e(to)i(de\014ne)f(the)g(function)f
Fp(cl_abort)f Fr(y)m(ourself,)j(with)-30 1177 y(the)i(protot)m(yp)s(e)
-210 1306 y Fp(#include)46 b(<cl_abort.h>)210 1410 y(void)h(cl_abort)e
+210 1306 y Fp(#include)46 b(<cln/abort.h>)210 1410 y(void)h(cl_abort)e
(\(void\);)-30 1544 y Fr(This)30 b(function)g(m)m(ust)f(not)i(return)e
(con)m(trol)j(to)f(its)f(caller.)-30 1802 y Fs(12.2)68
b(Floating-p)t(oin)l(t)47 b(under\015o)l(w)-30 1994 y
b(Customizing)46 b(I/O)-30 3036 y Fr(The)31 b(output)g(of)g(the)g
(function)g Fp(fprint)f Fr(ma)m(y)h(b)s(e)f(customized)h(b)m(y)g(c)m
(hanging)i(the)e(v)-5 b(alue)32 b(of)f(the)h(global)g(v)-5
-b(ariable)-30 3146 y Fp(cl_default_print_flags)p Fr(.)-30
+b(ariable)-30 3146 y Fp(default_print_flags)p Fr(.)-30
3403 y Fs(12.4)68 b(Customizing)46 b(the)f(memory)h(allo)t(cator)-30
-3596 y Fr(Ev)m(ery)38 b(memory)e(allo)s(cation)k(of)e(CLN)f(is)h(done)g
-(through)f(the)h(function)g(p)s(oin)m(ter)f Fp(cl_malloc_hook)p
-Fr(.)60 b(F)-8 b(reeing)-30 3705 y(of)35 b(this)f(memory)f(is)i(done)f
-(through)g(the)h(function)f(p)s(oin)m(ter)h Fp(cl_free_hook)p
-Fr(.)50 b(The)34 b(default)h(v)m(ersions)g(of)f(these)-30
-3815 y(functions,)f(pro)m(vided)f(in)g(the)h(library)-8
-b(,)33 b(call)h Fp(malloc)d Fr(and)h Fp(free)f Fr(and)h(c)m(hec)m(k)i
-(the)f Fp(malloc)e Fr(result)h(against)i Fp(NULL)p Fr(.)-30
-3924 y(If)c(y)m(ou)g(w)m(an)m(t)h(to)f(pro)m(vide)g(another)h(memory)d
-(allo)s(cator,)k(y)m(ou)e(need)g(to)h(de\014ne)e(the)h(v)-5
-b(ariables)31 b Fp(cl_malloc_hook)-30 4034 y Fr(and)f
-Fp(cl_free_hook)d Fr(y)m(ourself,)k(lik)m(e)g(this:)210
-4163 y Fp(#include)46 b(<cl_malloc.h>)210 4267 y(void*)g
-(\(*cl_malloc_hook\))d(\(size_t)j(size\))h(=)g(...)o(;)210
-4370 y(void)g(\(*cl_free_hook\))c(\(void*)j(ptr\))286
-b(=)47 b(...)o(;)-30 4505 y Fr(The)30 b Fp(cl_malloc_hook)c
+3596 y Fr(Ev)m(ery)28 b(memory)e(allo)s(cation)k(of)e(CLN)g(is)g(done)f
+(through)g(the)h(function)g(p)s(oin)m(ter)g Fp(malloc_hook)p
+Fr(.)37 b(F)-8 b(reeing)29 b(of)f(this)-30 3705 y(memory)33
+b(is)j(done)f(through)g(the)g(function)g(p)s(oin)m(ter)h
+Fp(free_hook)p Fr(.)53 b(The)35 b(default)g(v)m(ersions)h(of)f(these)h
+(functions,)-30 3815 y(pro)m(vided)27 b(in)h(the)f(library)-8
+b(,)29 b(call)g Fp(malloc)d Fr(and)h Fp(free)f Fr(and)h(c)m(hec)m(k)i
+(the)f Fp(malloc)e Fr(result)h(against)i Fp(NULL)p Fr(.)39
+b(If)27 b(y)m(ou)h(w)m(an)m(t)-30 3924 y(to)i(pro)m(vide)f(another)h
+(memory)d(allo)s(cator,)32 b(y)m(ou)e(need)f(to)h(de\014ne)e(the)i(v)-5
+b(ariables)30 b Fp(malloc_hook)c Fr(and)i Fp(free_hook)-30
+4034 y Fr(y)m(ourself,)j(lik)m(e)h(this:)210 4163 y Fp(#include)46
+b(<cln/malloc.h>)210 4267 y(namespace)f(cln)i({)592 4370
+y(void*)f(\(*malloc_hook\))e(\(size_t)i(size\))g(=)i(...)o(;)592
+4474 y(void)e(\(*free_hook\))f(\(void*)h(ptr\))285 b(=)48
+b(...)o(;)210 4578 y(})-30 4712 y Fr(The)30 b Fp(cl_malloc_hook)c
Fr(function)k(m)m(ust)g(not)g(return)g(a)g Fp(NULL)g
-Fr(p)s(oin)m(ter.)-30 4639 y(It)e(is)f(not)h(p)s(ossible)f(to)h(c)m
+Fr(p)s(oin)m(ter.)-30 4847 y(It)e(is)f(not)h(p)s(ossible)f(to)h(c)m
(hange)h(the)e(memory)f(allo)s(cator)j(at)f(run)m(time,)f(b)s(ecause)h
-(it)g(is)f(already)h(called)h(at)f(program)-30 4749 y(startup)i(b)m(y)g
+(it)g(is)f(already)h(called)h(at)f(program)-30 4956 y(startup)i(b)m(y)g
(the)h(constructors)f(of)h(some)f(global)h(v)-5 b(ariables.)p
eop
-%%Page: 52 54
-52 53 bop -30 -116 a Fr(Index)3646 b(52)-30 299 y Fo(Index)-30
-614 y Fs(A)-30 737 y Fe(abs)26 b(\(\))12 b Fd(.)h(.)f(.)h(.)f(.)g(.)h
+%%Page: 53 55
+53 54 bop -30 -116 a Fr(Index)3646 b(53)-30 299 y Fo(Index)-30
+614 y Fs(A)-30 737 y Fd(abs)26 b(\(\))12 b Fc(.)h(.)f(.)h(.)f(.)g(.)h
(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)
g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
-(.)g(.)38 b Fc(12)-30 829 y(abstract)26 b(class)g Fd(.)12
+(.)g(.)38 b Fb(12)-30 829 y(abstract)26 b(class)g Fc(.)12
b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h
(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)
-g(.)50 b Fc(6)-30 921 y Fe(acos)27 b(\(\))10 b Fd(.)j(.)f(.)g(.)h(.)f
+g(.)50 b Fb(6)-30 921 y Fd(acos)27 b(\(\))10 b Fc(.)j(.)f(.)g(.)h(.)f
(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g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)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)38
-b Fc(25)2032 2838 y Fe(cl_float_format_t)7 b Fd(.)17
+h(.)48 b Fb(25)2032 984 y Fd(cl_float_format)29 b(\(\))13
+b Fc(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)
+h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)38
+b Fb(25)2032 1076 y Fd(cl_float_format_t)7 b Fc(.)17
b(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)
g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)33
-b Fc(25)2032 2931 y Fe(cl_free_hook)c(\(\))17 b Fd(.)12
-b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h
-(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43
-b Fc(51)2032 3023 y Fe(cl_hermite)28 b(\(\))20 b Fd(.)13
-b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
-(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)46
-b Fc(42)2032 3116 y Fe(cl_I_to_int)28 b(\(\))20 b Fd(.)13
+b Fb(25)2032 1168 y Fd(cl_I_to_int)28 b(\(\))20 b Fc(.)13
b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)46
-b Fc(9)2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)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)
+h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
+(.)39 b Fb(24)2032 5155 y Fd(decoded_lfloat)12 b Fc(.)j(.)e(.)f(.)g(.)h
+(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)
+g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)37 b Fb(24)2032
+5248 y Fd(decoded_sfloat)12 b Fc(.)j(.)e(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)
+g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h
+(.)f(.)g(.)h(.)f(.)g(.)h(.)37 b Fb(24)2032 5340 y Fd
+(default_float_format)26 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
+f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)47
+b Fb(25)p eop
+%%Page: 54 56
+54 55 bop -30 -116 a Fr(Index)3646 b(54)-30 299 y Fd
+(default_print_flags)27 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
+(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
+48 b Fb(52)-30 391 y Fd(default_random_state)26 b Fc(.)12
+b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g
+(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)47 b Fb(26)-30 483
+y Fd(degree)27 b(\(\))8 b Fc(.)k(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.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.)h(.)f(.)g(.)49
-b Fc(41)-30 4382 y Fe(float_digits)28 b(\(\))17 b Fd(.)c(.)f(.)h(.)f(.)
-g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
-(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)43 b Fc(24)-30
-4474 y Fe(float_epsilon)29 b(\(\))16 b Fd(.)c(.)g(.)g(.)h(.)f(.)g(.)h
+b Fb(41)-30 3461 y Fd(find_modint_ring)29 b(\(\))11 b
+Fc(.)i(.)g(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
+(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)37 b Fb(34)-30
+3553 y Fd(find_univpoly_ring)30 b(\(\))8 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)
+g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h
+(.)f(.)g(.)h(.)34 b Fb(40)-30 3645 y Fd(float_approx)28
+b(\(\))18 b Fc(.)13 b(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
+(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)
+h(.)f(.)g(.)44 b Fb(9)-30 3737 y Fd(float_digits)28 b(\(\))17
+b Fc(.)c(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)
+g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)43
+b Fb(24)-30 3829 y Fd(float_epsilon)29 b(\(\))16 b Fc(.)c(.)g(.)g(.)h
(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)
-h(.)f(.)g(.)h(.)f(.)g(.)h(.)41 b Fc(25)-30 4566 y Fe(float_exponent)29
-b(\(\))14 b Fd(.)f(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h
-(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)40
-b Fc(24)-30 4658 y Fe(float_negative_epsilon)31 b(\(\))21
-b Fd(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
-(.)g(.)g(.)h(.)f(.)g(.)47 b Fc(25)-30 4749 y Fe(float_precision)29
-b(\(\))13 b Fd(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h
-(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)39
-b Fc(24)-30 4841 y Fe(float_radix)28 b(\(\))18 b Fd(.)13
+h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)41 b Fb(25)-30
+3921 y Fd(float_exponent)29 b(\(\))14 b Fc(.)f(.)f(.)g(.)h(.)f(.)g(.)h
+(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)
+g(.)h(.)f(.)g(.)h(.)f(.)40 b Fb(24)-30 4013 y Fd
+(float_negative_epsilon)31 b(\(\))21 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)
+f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)47
+b Fb(25)-30 4105 y Fd(float_precision)29 b(\(\))13 b
+Fc(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)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(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)
-h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
-(.)h(.)33 b Fc(1,)27 b(4)2032 1660 y Fs(H)2032 1783 y
-Fc(header)f(\014les)7 b Fd(.)13 b(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
-(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)
-h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)33 b Fc(45)2032
-1874 y(Hermite)25 b(p)r(olynomial)7 b Fd(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f
+g(.)h(.)32 b Fb(42)2032 1675 y Fs(I)2032 1797 y Fd(imagpart)c(\(\))23
+b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
-f(.)g(.)h(.)f(.)g(.)h(.)32 b Fc(42)2032 2133 y Fs(I)2032
-2256 y Fe(imagpart)c(\(\))23 b Fd(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)
+f(.)g(.)h(.)48 b Fb(12)2032 1889 y(include)26 b(\014les)17
+b Fc(.)c(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)
h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
-(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)48 b Fc(12)2032
-2347 y(include)26 b(\014les)17 b Fd(.)c(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
-(.)h(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)g(.)h(.)f(.)g(.)g(.)h(.)f(.)
-g(.)h(.)f(.)g(.)46 b Fc(33)2032 2714 y(in)n(teger)10
-b Fd(.)j(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)
+g(.)h(.)f(.)g(.)46 b Fb(33)2032 2256 y(in)n(teger)10
+b Fc(.)j(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)
h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
-(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)36 b Fc(6)2032
-2806 y Fe(integer_decode_float)30 b(\(\))24 b Fd(.)13
+(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)36 b Fb(6)2032
+2347 y Fd(integer_decode_float)30 b(\(\))24 b Fc(.)13
b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
-(.)g(.)h(.)f(.)g(.)h(.)49 b Fc(24)2032 2898 y Fe(integer_length)29
-b(\(\))14 b Fd(.)f(.)f(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
+(.)g(.)h(.)f(.)g(.)h(.)49 b Fb(24)2032 2439 y Fd(integer_length)29
+b(\(\))14 b Fc(.)f(.)f(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)40
-b Fc(22)2032 2990 y Fe(isqrt)27 b(\(\))9 b Fd(.)k(.)f(.)g(.)h(.)f(.)g
+b Fb(22)2032 2531 y Fd(isqrt)27 b(\(\))9 b Fc(.)k(.)f(.)g(.)h(.)f(.)g
(.)h(.)f(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(.)g
(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)
g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h
-(.)f(.)g(.)38 b Fc(22)2032 3648 y Fe(ldb_test)28 b(\(\))23
-b Fd(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
+(.)f(.)g(.)38 b Fb(22)2032 3281 y Fd(ldb_test)28 b(\(\))23
+b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
-f(.)g(.)h(.)48 b Fc(22)2032 3740 y Fe(least_negative_float)30
-b(\(\))24 b Fd(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h
-(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)49 b Fc(25)2032
-3832 y Fe(least_positive_float)30 b(\(\))24 b Fd(.)13
+f(.)g(.)h(.)48 b Fb(22)2032 3373 y Fd(least_negative_float)30
+b(\(\))24 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h
+(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)49 b Fb(25)2032
+3465 y Fd(least_positive_float)30 b(\(\))24 b Fc(.)13
b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
-(.)g(.)h(.)f(.)g(.)h(.)49 b Fc(25)2032 3924 y(Legende)26
-b(p)r(olynomial)e Fd(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f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h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g
+(.)38 b Fb(16)-30 1700 y(mo)r(difying)26 b(op)r(erators)c
+Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g
(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)47
-b Fc(27)-30 1879 y(mo)r(dular)25 b(in)n(teger)20 b Fd(.)12
+b Fb(27)-30 1792 y(mo)r(dular)25 b(in)n(teger)20 b Fc(.)12
b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)45
-b Fc(34)-30 1971 y Fe(modulus)23 b Fd(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)
+b Fb(34)-30 1884 y Fd(modulus)23 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)
f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g
(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)48
-b Fc(34)-30 2063 y Fe(monomial)27 b(\(\))d Fd(.)12 b(.)g(.)h(.)f(.)g(.)
+b Fb(34)-30 1976 y Fd(monomial)27 b(\(\))d Fc(.)12 b(.)g(.)h(.)f(.)g(.)
h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)49
-b Fc(40)-30 2155 y(Mon)n(tgomery)25 b(m)n(ultiplication)9
-b Fd(.)k(.)f(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
-f(.)g(.)h(.)f(.)g(.)h(.)f(.)35 b Fc(34)-30 2247 y Fe
-(most_negative_float)30 b(\(\))7 b Fd(.)13 b(.)f(.)g(.)g(.)h(.)f(.)g(.)
+b Fb(40)-30 2068 y(Mon)n(tgomery)25 b(m)n(ultiplication)9
+b Fc(.)k(.)f(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
+f(.)g(.)h(.)f(.)g(.)h(.)f(.)35 b Fb(34)-30 2161 y Fd
+(most_negative_float)30 b(\(\))7 b Fc(.)13 b(.)f(.)g(.)g(.)h(.)f(.)g(.)
h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
-(.)33 b Fc(25)-30 2339 y Fe(most_positive_float)d(\(\))7
-b Fd(.)13 b(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
-(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)33 b Fc(25)-30
-2601 y Fs(N)-30 2724 y Fe(numerator)28 b(\(\))21 b Fd(.)13
-b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
-(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
-47 b Fc(12)-30 2971 y Fs(O)-30 3094 y Fe(oddp)27 b(\(\))10
-b Fd(.)j(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
-f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
-(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)36 b Fc(22)-30 3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
-b Fd(.)k(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)
+f(.)33 b Fb(27)-30 4195 y Fd(operator)27 b(/)f(\(\))9
+b Fc(.)k(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)
h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
-(.)h(.)34 b Fc(11)-30 4197 y Fe(operator)27 b(/=)f(\(\))7
-b Fd(.)13 b(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
+(.)h(.)34 b Fb(11)-30 4287 y Fd(operator)27 b(/=)f(\(\))7
+b Fc(.)13 b(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
-f(.)33 b Fc(27)-30 4289 y Fe(operator)27 b(==)f(\(\))c
-Fd(.)13 b(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
-(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)47 b Fc(13,)27 b(34,)f(36,)h(41)-30
-4381 y Fe(operator)g([])f(\(\))7 b Fd(.)13 b(.)g(.)f(.)g(.)h(.)f(.)g(.)
+f(.)33 b Fb(27)-30 4379 y Fd(operator)27 b(==)f(\(\))c
+Fc(.)13 b(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
+(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)47 b Fb(13,)27 b(34,)f(36,)h(41)-30
+4471 y Fd(operator)g([])f(\(\))7 b Fc(.)13 b(.)g(.)f(.)g(.)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g(.)h(.)34 b Fc(20)-30
-4749 y Fe(operator)27 b(+)f(\(\))12 b Fd(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)
+h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)34 b Fb(20)-30
+4840 y Fd(operator)27 b(+)f(\(\))12 b Fc(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)
g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h
-(.)f(.)g(.)h(.)38 b Fc(11,)26 b(35,)h(41)-30 4841 y Fe(operator)g(+=)f
-(\(\))7 b Fd(.)13 b(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h
+(.)f(.)g(.)h(.)38 b Fb(11,)26 b(35,)h(41)-30 4932 y Fd(operator)g(+=)f
+(\(\))7 b Fc(.)13 b(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h
(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)
-g(.)h(.)f(.)33 b Fc(27)-30 4933 y Fe(operator)27 b(++)f(\(\))7
-b Fd(.)13 b(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
+g(.)h(.)f(.)33 b Fb(27)-30 5024 y Fd(operator)27 b(++)f(\(\))7
+b Fc(.)13 b(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
-f(.)33 b Fc(27)-30 5024 y Fe(operator)27 b(>)f(\(\))9
-b Fd(.)k(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)
-h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
-(.)h(.)34 b Fc(13)2032 299 y Fe(operator)28 b(>=)e(\(\))7
-b Fd(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g
+f(.)33 b Fb(27)2032 299 y Fd(operator)28 b(>)d(\(\))9
+b Fc(.)k(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
+f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g
+(.)h(.)34 b Fb(13)2032 391 y Fd(operator)28 b(>=)e(\(\))7
+b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g
(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)
-g(.)33 b Fc(13)2032 396 y Fe(operator)28 b(>>)e(\(\))18
-b Fd(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
+g(.)33 b Fb(13)2032 483 y Fd(operator)28 b(>>)e(\(\))18
+b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)43
-b Fc(22,)27 b(36)2032 493 y Fe(operator)h(>>=)e(\(\))e
-Fd(.)13 b(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
+b Fb(22,)27 b(36)2032 576 y Fd(operator)h(>>=)e(\(\))e
+Fc(.)13 b(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)50
-b Fc(27)2032 591 y Fe(operator)28 b(^)d(\(\))9 b Fd(.)k(.)f(.)g(.)h(.)f
+b Fb(27)2032 668 y Fd(operator)28 b(^)d(\(\))9 b Fc(.)k(.)f(.)g(.)h(.)f
(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)34
-b Fc(21)2032 688 y Fe(operator)28 b(^=)e(\(\))7 b Fd(.)13
+b Fb(21)2032 760 y Fd(operator)28 b(^=)e(\(\))7 b Fc(.)13
b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)33
-b Fc(27)2032 785 y Fe(operator)28 b(<)d(\(\))9 b Fd(.)k(.)f(.)g(.)h(.)f
+b Fb(27)2032 853 y Fd(operator)28 b(<)d(\(\))9 b Fc(.)k(.)f(.)g(.)h(.)f
(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)34
-b Fc(13)2032 883 y Fe(operator)28 b(<=)e(\(\))7 b Fd(.)13
+b Fb(13)2032 945 y Fd(operator)28 b(<=)e(\(\))7 b Fc(.)13
b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)33
-b Fc(13)2032 980 y Fe(operator)28 b(<<)e(\(\))21 b Fd(.)13
+b Fb(13)2032 1037 y Fd(operator)28 b(<<)e(\(\))21 b Fc(.)13
b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
-(.)h(.)f(.)g(.)h(.)f(.)47 b Fc(22,)27 b(35,)f(36,)h(41)2032
-1077 y Fe(operator)h(<<=)e(\(\))e Fd(.)13 b(.)f(.)g(.)g(.)h(.)f(.)g(.)h
+(.)h(.)f(.)g(.)h(.)f(.)47 b Fb(22,)27 b(35,)f(36,)h(41)2032
+1129 y Fd(operator)h(<<=)e(\(\))e Fc(.)13 b(.)f(.)g(.)g(.)h(.)f(.)g(.)h
(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)
-h(.)f(.)g(.)h(.)f(.)g(.)g(.)50 b Fc(27)2032 1174 y Fe(ord2)27
-b(\(\))10 b Fd(.)j(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
+h(.)f(.)g(.)h(.)f(.)g(.)g(.)50 b Fb(27)2032 1222 y Fd(ord2)27
+b(\(\))10 b Fc(.)j(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
-f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)36 b Fc(22)2032
-1451 y Fs(P)2032 1585 y Fe(phase)27 b(\(\))9 b Fd(.)k(.)f(.)g(.)h(.)f
+f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)36 b Fb(22)2032
+1471 y Fs(P)2032 1594 y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h(.)f(.)g(.)h(.)36
-b Fc(19)-30 2171 y Fe(The\(\)\(\))24 b Fd(.)13 b(.)f(.)g(.)h(.)f(.)g(.)
+b Fb(19)-30 2444 y Fd(The\(\)\(\))24 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)
h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g
(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
-48 b Fc(9)-30 2263 y(transcenden)n(tal)26 b(functions)c
-Fd(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h
-(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)47 b Fc(17)2032
-299 y Fe(truncate1)28 b(\(\))22 b Fd(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g
+48 b Fb(9)2032 299 y(transcenden)n(tal)26 b(functions)c
+Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
+(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)47 b Fb(17)2032
+390 y Fd(truncate1)28 b(\(\))22 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g
(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)
-f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)47 b Fc(14)2032
-393 y Fe(truncate2)28 b(\(\))22 b Fd(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g
+f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)47 b Fb(14)2032
+482 y Fd(truncate2)28 b(\(\))22 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h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(.)h(.)f(.)g(.)h(.)f(.)
-g(.)h(.)f(.)g(.)47 b Fc(34,)27 b(40)2032 2263 y Fe(zerop)g(\(\))12
-b Fd(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)
-g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)39
-b Fc(13,)26 b(36,)h(41)p eop
-%%Page: -1 58
--1 57 bop 3905 -116 a Fr(i)-30 299 y Fo(T)-13 b(able)54
+b Fb(23)2032 2139 y Fs(Z)2032 2261 y Fd(zero)27 b(\(\))14
+b Fc(.)e(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)
+h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f
+(.)40 b Fb(33,)26 b(34,)h(40)2032 2352 y Fd(zerop)g(\(\))d
+Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h
+(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)49
+b Fb(13,)27 b(33,)f(36,)h(41)2032 2444 y Fd(zeta)g(\(\))10
+b Fc(.)j(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)
+f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h
+(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)36 b Fb(20)p eop
+%%Page: -1 59
+-1 58 bop 3905 -116 a Fr(i)-30 299 y Fo(T)-13 b(able)54
b(of)g(Con)l(ten)l(ts)-30 641 y Fs(1)135 b(In)l(tro)t(duction)39
-b Fb(.)20 b(.)f(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.)40 b Fr(10)568 3122 y(4.1.2)93 b(Constructing)30
-b(rational)h(n)m(um)m(b)s(ers)20 b Fa(.)13 b(.)i(.)g(.)g(.)g(.)g(.)g(.)
+b(rational)h(n)m(um)m(b)s(ers)20 b Fe(.)13 b(.)i(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)49 b Fr(10)568 3231 y(4.1.3)93 b(Constructing)30 b(\015oating-p)s
-(oin)m(t)h(n)m(um)m(b)s(ers)14 b Fa(.)f(.)i(.)g(.)g(.)g(.)g(.)g(.)g(.)g
+(oin)m(t)h(n)m(um)m(b)s(ers)14 b Fe(.)f(.)i(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)43 b Fr(10)568
3341 y(4.1.4)93 b(Constructing)30 b(complex)g(n)m(um)m(b)s(ers)11
-b Fa(.)h(.)j(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)
+b Fe(.)h(.)j(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)40 b Fr(10)269 3450
-y(4.2)92 b(Elemen)m(tary)30 b(functions)25 b Fa(.)15
+y(4.2)92 b(Elemen)m(tary)30 b(functions)25 b Fe(.)15
b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)55 b Fr(11)269 3560 y(4.3)92
-b(Elemen)m(tary)30 b(rational)i(functions)c Fa(.)15 b(.)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)g
+Fe(.)16 b(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)54 b Fr(20)568 4875
-y(4.9.1)93 b(Logical)32 b(functions)13 b Fa(.)h(.)h(.)g(.)g(.)g(.)g(.)g
+y(4.9.1)93 b(Logical)32 b(functions)13 b Fe(.)h(.)h(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)42
b Fr(20)568 4985 y(4.9.2)93 b(Num)m(b)s(er)28 b(theoretic)k(functions)
-20 b Fa(.)14 b(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
+20 b Fe(.)14 b(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)49
b Fr(23)568 5094 y(4.9.3)93 b(Com)m(binatorial)30 b(functions)21
-b Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
+b Fe(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)50
b Fr(23)269 5204 y(4.10)92 b(F)-8 b(unctions)31 b(on)g(\015oating-p)s
-(oin)m(t)g(n)m(um)m(b)s(ers)25 b Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g
+(oin)m(t)g(n)m(um)m(b)s(ers)25 b Fe(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
g(.)g(.)56 b Fr(23)269 5313 y(4.11)92 b(Con)m(v)m(ersion)31
-b(functions)12 b Fa(.)j(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
+b(functions)12 b Fe(.)j(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)41 b
Fr(25)p eop
-%%Page: -2 59
--2 58 bop 3879 -116 a Fr(ii)568 83 y(4.11.1)93 b(Con)m(v)m(ersion)31
+%%Page: -2 60
+-2 59 bop 3879 -116 a Fr(ii)568 83 y(4.11.1)93 b(Con)m(v)m(ersion)31
b(to)g(\015oating-p)s(oin)m(t)h(n)m(um)m(b)s(ers)17 b
-Fa(.)c(.)i(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
+Fe(.)c(.)i(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)47 b Fr(25)568 193 y(4.11.2)93 b(Con)m(v)m(ersion)31
-b(to)g(rational)h(n)m(um)m(b)s(ers)21 b Fa(.)15 b(.)g(.)g(.)g(.)g(.)g
+b(to)g(rational)h(n)m(um)m(b)s(ers)21 b Fe(.)15 b(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
53 b Fr(26)269 302 y(4.12)92 b(Random)29 b(n)m(um)m(b)s(er)f
-(generators)e Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
+(generators)e Fe(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
h(.)f(.)g(.)g(.)g(.)53 b Fr(26)269 412 y(4.13)92 b(Obfuscating)30
-b(op)s(erators)g Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
+b(op)s(erators)g Fe(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)59 b Fr(27)-30
-654 y Fs(5)135 b(Input/Output)26 b Fb(.)19 b(.)h(.)f(.)g(.)h(.)f(.)h(.)
+652 y Fs(5)135 b(Input/Output)26 b Fa(.)19 b(.)h(.)f(.)g(.)h(.)f(.)h(.)
f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g
-(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)71 b Fs(28)269 791
+(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)71 b Fs(28)269 789
y Fr(5.1)92 b(In)m(ternal)31 b(and)e(prin)m(ted)h(represen)m(tation)g
-Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g
+Fe(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)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)46 b(p)t(olynomials)40 b Fb(.)19 b(.)h(.)f(.)g(.)h(.)f(.)h(.)f
+(.)g(.)g(.)g(.)55 b Fr(37)-30 2489 y Fs(9)135 b(Univ)-7
+b(ariate)46 b(p)t(olynomials)40 b Fa(.)19 b(.)h(.)f(.)g(.)h(.)f(.)h(.)f
(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)83
-b Fs(38)269 2638 y Fr(9.1)92 b(Univ)-5 b(ariate)32 b(p)s(olynomial)d
-(rings)c Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
+b Fs(38)269 2626 y Fr(9.1)92 b(Univ)-5 b(ariate)32 b(p)s(olynomial)d
+(rings)c Fe(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
-g(.)g(.)g(.)g(.)g(.)54 b Fr(38)269 2747 y(9.2)92 b(F)-8
+g(.)g(.)g(.)g(.)g(.)54 b Fr(38)269 2736 y(9.2)92 b(F)-8
b(unctions)31 b(on)f(univ)-5 b(ariate)31 b(p)s(olynomials)d
-Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
+Fe(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)58
-b Fr(40)269 2857 y(9.3)92 b(Sp)s(ecial)31 b(p)s(olynomials)13
-b Fa(.)h(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)
+b Fr(40)269 2845 y(9.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
+b Fe(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)53 b Fr(43)269
-3455 y(10.3)92 b(Sp)s(eed)30 b(e\016ciency)e Fa(.)15
+3442 y(10.3)92 b(Sp)s(eed)30 b(e\016ciency)e Fe(.)15
b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)57 b Fr(43)269
-3565 y(10.4)92 b(Garbage)32 b(collection)14 b Fa(.)k(.)d(.)g(.)g(.)g(.)
+3551 y(10.4)92 b(Garbage)32 b(collection)14 b Fe(.)k(.)d(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
-g(.)g(.)g(.)g(.)44 b Fr(44)-30 3807 y Fs(11)135 b(Using)46
-b(the)f(library)25 b Fb(.)20 b(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h
+g(.)g(.)g(.)g(.)44 b Fr(44)-30 3791 y Fs(11)135 b(Using)46
+b(the)f(library)25 b Fa(.)20 b(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h
(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)
-h(.)69 b Fs(45)269 3944 y Fr(11.1)92 b(Compiler)30 b(options)21
-b Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
+h(.)69 b Fs(45)269 3928 y Fr(11.1)92 b(Compiler)30 b(options)21
+b Fe(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)50 b
-Fr(45)269 4054 y(11.2)92 b(Include)30 b(\014les)18 b
-Fa(.)d(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g
-(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
-g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)47
-b Fr(45)269 4164 y(11.3)92 b(An)30 b(Example)d Fa(.)15
+Fr(45)269 4038 y(11.2)92 b(Compatibilit)m(y)31 b(to)g(old)g(CLN)f(v)m
+(ersions)17 b Fe(.)e(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
+g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)46
+b Fr(45)269 4147 y(11.3)92 b(Include)30 b(\014les)18
+b Fe(.)d(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)
+g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
+(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)47
+b Fr(45)269 4257 y(11.4)92 b(An)30 b(Example)d Fe(.)15
b(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)57
-b Fr(48)269 4273 y(11.4)92 b(Debugging)32 b(supp)s(ort)23
-b Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g
+b Fr(49)269 4367 y(11.5)92 b(Debugging)32 b(supp)s(ort)23
+b Fe(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
-g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)54 b Fr(49)-30
-4516 y Fs(12)135 b(Customizing)39 b Fb(.)19 b(.)h(.)f(.)h(.)f(.)h(.)f
+g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)54 b Fr(50)-30
+4607 y Fs(12)135 b(Customizing)39 b Fa(.)19 b(.)h(.)f(.)h(.)f(.)h(.)f
(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)
-h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)83 b Fs(51)269 4653
-y Fr(12.1)92 b(Error)30 b(handling)24 b Fa(.)15 b(.)g(.)g(.)g(.)g(.)h
+h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)83 b Fs(52)269 4744
+y Fr(12.1)92 b(Error)30 b(handling)24 b Fe(.)15 b(.)g(.)g(.)g(.)g(.)h
(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f
-(.)g(.)g(.)g(.)g(.)g(.)g(.)54 b Fr(51)269 4762 y(12.2)92
-b(Floating-p)s(oin)m(t)33 b(under\015o)m(w)19 b Fa(.)14
+(.)g(.)g(.)g(.)g(.)g(.)g(.)54 b Fr(52)269 4853 y(12.2)92
+b(Floating-p)s(oin)m(t)33 b(under\015o)m(w)19 b Fe(.)14
b(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
-g(.)g(.)g(.)49 b Fr(51)269 4872 y(12.3)92 b(Customizing)30
-b(I/O)25 b Fa(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
+g(.)g(.)g(.)49 b Fr(52)269 4963 y(12.3)92 b(Customizing)30
+b(I/O)25 b Fe(.)15 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)
g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)54
-b Fr(51)269 4981 y(12.4)92 b(Customizing)30 b(the)h(memory)d(allo)s
-(cator)16 b Fa(.)i(.)d(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
+b Fr(52)269 5072 y(12.4)92 b(Customizing)30 b(the)h(memory)d(allo)s
+(cator)16 b Fe(.)i(.)d(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g
(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)46
-b Fr(51)-30 5224 y Fs(Index)30 b Fb(.)19 b(.)g(.)h(.)f(.)h(.)f(.)h(.)f
+b Fr(52)-30 5313 y Fs(Index)30 b Fa(.)19 b(.)g(.)h(.)f(.)h(.)f(.)h(.)f
(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)
h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f
-(.)h(.)74 b Fs(52)p eop
+(.)h(.)74 b Fs(53)p eop
%%Trailer
end
userdict /end-hook known{end-hook}if
The garbage collection imposes no burden on the main application.
@item
The library provides hooks for memory allocation and exceptions.
+@item
+@cindex namespace
+All non-macro identifiers are hidden in namespace @code{cln} in
+order to avoid name clashes.
@end itemize
@subsection C++ compiler
To build CLN, you need a C++ compiler.
-Actually, you need GNU @code{g++ 2.7.0} or newer.
-On HPPA, you need GNU @code{g++ 2.8.0} or newer.
+Actually, you need GNU @code{g++ 2.90} or newer, the EGCS compilers will
+do.
I recommend GNU @code{g++ 2.95} or newer.
The following C++ features are used:
-classes, member functions,
-overloading of functions and operators,
-constructors and destructors, inline, const,
-multiple inheritance, templates.
+classes, member functions, overloading of functions and operators,
+constructors and destructors, inline, const, multiple inheritance,
+templates and namespaces.
The following C++ features are not used:
-@code{new}, @code{delete}, virtual inheritance,
-exceptions.
+@code{new}, @code{delete}, virtual inheritance, exceptions.
CLN relies on semi-automatic ordering of initializations
of static and global variables, a feature which I could
@example
$ CC="gcc" CFLAGS="-O" CXX="g++" CXXFLAGS="-O" ./configure
-$ CC="gcc -V 2.7.2" CFLAGS="-O -g" \
- CXX="g++ -V 2.7.2" CXXFLAGS="-O -g" ./configure
-$ CC="gcc -V 2.8.1" CFLAGS="-O -fno-exceptions" \
- CXX="g++ -V 2.8.1" CXXFLAGS="-O -fno-exceptions" ./configure
-$ CC="gcc -V egcs-2.91.60" CFLAGS="-O2 -fno-exceptions" \
- CXX="g++ -V egcs-2.91.60" CFLAGS="-O2 -fno-exceptions" ./configure
+$ CC="gcc -V egcs-2.91.60" CFLAGS="-O -g" \
+ CXX="g++ -V egcs-2.91.60" CXXFLAGS="-O -g" ./configure
+$ CC="gcc -V 2.95.2" CFLAGS="-O2 -fno-exceptions" \
+ CXX="g++ -V 2.95.2" CFLAGS="-O2 -fno-exceptions" ./configure
@end example
@ignore
@comment cl_modules.h requires g++
optimizing mode. So you should specify at least @code{-O} in the CXXFLAGS,
or no CXXFLAGS at all. (If CXXFLAGS is not set, CLN will use @code{-O}.)
-On Linux, @code{g++} needs 15 MB to compile the tests. So you should better
-have 17 MB swap space and 1 MB room in $TMPDIR.
-
-If you use @code{g++} version 2.7.x, don't add @samp{-O2} to the CXXFLAGS,
-because @samp{g++ -O} generates better code for CLN than @samp{g++ -O2}.
-
If you use @code{g++} version 2.8.x or egcs-2.91.x (a.k.a. egcs-1.1) or
gcc-2.95.x, I recommend adding @samp{-fno-exceptions} to the CXXFLAGS.
This will likely generate better code.
@example
Number
- cl_number
- <cl_number.h>
+ cl_number
+ <cln/number.h>
|
|
Real or complex number
cl_N
- <cl_complex.h>
+ <cln/complex.h>
|
|
Real number
cl_R
- <cl_real.h>
+ <cln/real.h>
|
+-------------------+-------------------+
| |
Rational number Floating-point number
cl_RA cl_F
-<cl_rational.h> <cl_float.h>
+<cln/rational.h> <cln/float.h>
| |
- | +-------------+-------------+-------------+
- Integer | | | |
- cl_I Short-Float Single-Float Double-Float Long-Float
- <cl_integer.h> cl_SF cl_FF cl_DF cl_LF
- <cl_sfloat.h> <cl_ffloat.h> <cl_dfloat.h> <cl_lfloat.h>
+ | +--------------+--------------+--------------+
+ Integer | | | |
+ cl_I Short-Float Single-Float Double-Float Long-Float
+<cln/integer.h> cl_SF cl_FF cl_DF cl_LF
+ <cln/sfloat.h> <cln/ffloat.h> <cln/dfloat.h> <cln/lfloat.h>
@end example
@cindex @code{cl_number}
the functions
@table @code
-@item float cl_float_approx (const @var{type}& x)
-@cindex @code{cl_float_approx ()}
-@itemx double cl_double_approx (const @var{type}& x)
-@cindex @code{cl_double_approx ()}
+@item float float_approx (const @var{type}& x)
+@cindex @code{float_approx ()}
+@itemx double double_approx (const @var{type}& x)
+@cindex @code{double_approx ()}
Returns an approximation of @code{x} of C type @var{ctype}.
If @code{abs(x)} is too close to 0 (underflow), 0 is returned.
If @code{abs(x)} is too large (overflow), an IEEE infinity is returned.
Each of the number classes declares its mathematical operations in the
corresponding include file. For example, if your code operates with
-objects of type @code{cl_I}, it should @code{#include <cl_integer.h>}.
+objects of type @code{cl_I}, it should @code{#include <cln/integer.h>}.
@section Constructing numbers
@cindex @code{operator != ()}
Comparison, as in C and C++.
-@item uint32 cl_equal_hashcode (const @var{type}&)
-@cindex @code{cl_equal_hashcode ()}
+@item uint32 equal_hashcode (const @var{type}&)
+@cindex @code{equal_hashcode ()}
Returns a 32-bit hash code that is the same for any two numbers which are
the same according to @code{==}. This hash code depends on the number's value,
not its type or precision.
defines the following operations:
@table @code
-@item cl_signean cl_compare (const @var{type}& x, const @var{type}& y)
-@cindex @code{cl_compare ()}
+@item cl_signean compare (const @var{type}& x, const @var{type}& y)
+@cindex @code{compare ()}
Compares @code{x} and @code{y}. Returns +1 if @code{x}>@code{y},
-1 if @code{x}<@code{y}, 0 if @code{x}=@code{y}.
The constant e = exp(1) = 2.71828@dots{} is returned by the following functions:
@table @code
-@item cl_F cl_exp1 (cl_float_format_t f)
+@item cl_F exp1 (cl_float_format_t f)
@cindex @code{exp1 ()}
Returns e as a float of format @code{f}.
-@item cl_F cl_exp1 (const cl_F& y)
+@item cl_F exp1 (const cl_F& y)
Returns e in the float format of @code{y}.
-@item cl_F cl_exp1 (void)
-Returns e as a float of format @code{cl_default_float_format}.
+@item cl_F exp1 (void)
+Returns e as a float of format @code{default_float_format}.
@end table
@item cl_N cos (const cl_N& x)
Returns @code{cos(z)}. The range of the result is the entire complex plane.
-@item struct cl_cos_sin_t @{ cl_R cos; cl_R sin; @};
-@cindex @code{cl_cos_sin_t}
-@itemx cl_cos_sin_t cl_cos_sin (const cl_R& x)
+@item struct cos_sin_t @{ cl_R cos; cl_R sin; @};
+@cindex @code{cos_sin_t}
+@itemx cos_sin_t cos_sin (const cl_R& x)
Returns both @code{sin(x)} and @code{cos(x)}. This is more efficient than
-@cindex @code{cl_cos_sin ()}
+@cindex @code{cos_sin ()}
computing them separately. The relation @code{cos^2 + sin^2 = 1} will
hold only approximately.
Archimedes' constant pi = 3.14@dots{} is returned by the following functions:
@table @code
-@item cl_F cl_pi (cl_float_format_t f)
-@cindex @code{cl_pi ()}
+@item cl_F pi (cl_float_format_t f)
+@cindex @code{pi ()}
Returns pi as a float of format @code{f}.
-@item cl_F cl_pi (const cl_F& y)
+@item cl_F pi (const cl_F& y)
Returns pi in the float format of @code{y}.
-@item cl_F cl_pi (void)
-Returns pi as a float of format @code{cl_default_float_format}.
+@item cl_F pi (void)
+Returns pi as a float of format @code{default_float_format}.
@end table
@item cl_N cosh (const cl_N& z)
Returns @code{cosh(z)}. The range of the result is the entire complex plane.
-@item struct cl_cosh_sinh_t @{ cl_R cosh; cl_R sinh; @};
-@cindex @code{cl_cosh_sinh_t}
-@itemx cl_cosh_sinh_t cl_cosh_sinh (const cl_R& x)
-@cindex @code{cl_cosh_sinh ()}
+@item struct cosh_sinh_t @{ cl_R cosh; cl_R sinh; @};
+@cindex @code{cosh_sinh_t}
+@itemx cosh_sinh_t cosh_sinh (const cl_R& x)
+@cindex @code{cosh_sinh ()}
Returns both @code{sinh(x)} and @code{cosh(x)}. This is more efficient than
computing them separately. The relation @code{cosh^2 - sinh^2 = 1} will
hold only approximately.
Euler's constant C = 0.577@dots{} is returned by the following functions:
@table @code
-@item cl_F cl_eulerconst (cl_float_format_t f)
-@cindex @code{cl_eulerconst ()}
+@item cl_F eulerconst (cl_float_format_t f)
+@cindex @code{eulerconst ()}
Returns Euler's constant as a float of format @code{f}.
-@item cl_F cl_eulerconst (const cl_F& y)
+@item cl_F eulerconst (const cl_F& y)
Returns Euler's constant in the float format of @code{y}.
-@item cl_F cl_eulerconst (void)
-Returns Euler's constant as a float of format @code{cl_default_float_format}.
+@item cl_F eulerconst (void)
+Returns Euler's constant as a float of format @code{default_float_format}.
@end table
Catalan's constant G = 0.915@dots{} is returned by the following functions:
@cindex Catalan's constant
@table @code
-@item cl_F cl_catalanconst (cl_float_format_t f)
-@cindex @code{cl_catalanconst ()}
+@item cl_F catalanconst (cl_float_format_t f)
+@cindex @code{catalanconst ()}
Returns Catalan's constant as a float of format @code{f}.
-@item cl_F cl_catalanconst (const cl_F& y)
+@item cl_F catalanconst (const cl_F& y)
Returns Catalan's constant in the float format of @code{y}.
-@item cl_F cl_catalanconst (void)
-Returns Catalan's constant as a float of format @code{cl_default_float_format}.
+@item cl_F catalanconst (void)
+Returns Catalan's constant as a float of format @code{default_float_format}.
@end table
following functions:
@table @code
-@item cl_F cl_zeta (int s, cl_float_format_t f)
-@cindex @code{cl_zeta ()}
+@item cl_F zeta (int s, cl_float_format_t f)
+@cindex @code{zeta ()}
Returns Riemann's zeta function at @code{s} as a float of format @code{f}.
-@item cl_F cl_zeta (int s, const cl_F& y)
+@item cl_F zeta (int s, const cl_F& y)
Returns Riemann's zeta function at @code{s} in the float format of @code{y}.
-@item cl_F cl_zeta (int s)
+@item cl_F zeta (int s)
Returns Riemann's zeta function at @code{s} as a float of format
-@code{cl_default_float_format}.
+@code{default_float_format}.
@end table
@end table
The complete internal representation of a float is encoded in the type
-@cindex @code{cl_decoded_float}
-@cindex @code{cl_decoded_sfloat}
-@cindex @code{cl_decoded_ffloat}
-@cindex @code{cl_decoded_dfloat}
-@cindex @code{cl_decoded_lfloat}
-@code{cl_decoded_float} (or @code{cl_decoded_sfloat}, @code{cl_decoded_ffloat},
-@code{cl_decoded_dfloat}, @code{cl_decoded_lfloat}, respectively), defined by
+@cindex @code{decoded_float}
+@cindex @code{decoded_sfloat}
+@cindex @code{decoded_ffloat}
+@cindex @code{decoded_dfloat}
+@cindex @code{decoded_lfloat}
+@code{decoded_float} (or @code{decoded_sfloat}, @code{decoded_ffloat},
+@code{decoded_dfloat}, @code{decoded_lfloat}, respectively), defined by
@example
-struct cl_decoded_@var{type}float @{
+struct decoded_@var{type}float @{
@var{type} mantissa; cl_I exponent; @var{type} sign;
@};
@end example
and returned by the function
@table @code
-@item cl_decoded_@var{type}float decode_float (const @var{type}& x)
+@item decoded_@var{type}float decode_float (const @var{type}& x)
@cindex @code{decode_float ()}
For @code{x} non-zero, this returns @code{(-1)^s}, @code{e}, @code{m} with
@code{x = (-1)^s * 2^e * m} and @code{0.5 <= m < 1.0}. For @code{x} = 0,
@end table
A complete decoding in terms of integers is provided as type
-@example
@cindex @code{cl_idecoded_float}
+@example
struct cl_idecoded_float @{
cl_I mantissa; cl_I exponent; cl_I sign;
@};
@item cl_float_format_t cl_float_format (const cl_F& x)
Returns the floating point format of @code{x}.
-@item cl_float_format_t cl_default_float_format
-@cindex @code{cl_default_float_format}
+@item cl_float_format_t default_float_format
+@cindex @code{default_float_format}
Global variable: the default float format used when converting rational numbers
to floats.
@end table
@item cl_F cl_float (const @var{type}&x, const cl_F& y)
Returns @code{x} in the float format of @code{y}.
@item cl_F cl_float (const @var{type}&x)
-Returns @code{x} as a float of format @code{cl_default_float_format} if
+Returns @code{x} as a float of format @code{default_float_format} if
it is an exact number, or @code{x} itself if it is already a float.
@end table
A random generator is a machine which produces (pseudo-)random numbers.
-The include file @code{<cl_random.h>} defines a class @code{cl_random_state}
+The include file @code{<cln/random.h>} defines a class @code{random_state}
which contains the state of a random generator. If you make a copy
of the random number generator, the original one and the copy will produce
the same sequence of random numbers.
a complicated but deterministic way.
The global variable
-@cindex @code{cl_random_state}
-@cindex @code{cl_default_random_state}
+@cindex @code{random_state}
+@cindex @code{default_random_state}
@example
-cl_random_state cl_default_random_state
+random_state default_random_state
@end example
contains a default random number generator. It is used when the functions
-below are called without @code{cl_random_state} argument.
+below are called without @code{random_state} argument.
@table @code
-@item uint32 random32 (cl_random_state& randomstate)
+@item uint32 random32 (random_state& randomstate)
@itemx uint32 random32 ()
@cindex @code{random32 ()}
Returns a random unsigned 32-bit number. All bits are equally random.
-@item cl_I random_I (cl_random_state& randomstate, const cl_I& n)
+@item cl_I random_I (random_state& randomstate, const cl_I& n)
@itemx cl_I random_I (const cl_I& n)
@cindex @code{random_I ()}
@code{n} must be an integer > 0. This function returns a random integer @code{x}
in the range @code{0 <= x < n}.
-@item cl_F random_F (cl_random_state& randomstate, const cl_F& n)
+@item cl_F random_F (random_state& randomstate, const cl_F& n)
@itemx cl_F random_F (const cl_F& n)
@cindex @code{random_F ()}
@code{n} must be a float > 0. This function returns a random floating-point
number of the same format as @code{n} in the range @code{0 <= x < n}.
-@item cl_R random_R (cl_random_state& randomstate, const cl_R& n)
+@item cl_R random_R (random_state& randomstate, const cl_R& n)
@itemx cl_R random_R (const cl_R& n)
@cindex @code{random_R ()}
Behaves like @code{random_I} if @code{n} is an integer and like @code{random_F}
@section Input functions
-Including @code{<cl_io.h>} defines a type @code{cl_istream}, which is
-the type of the first argument to all input functions. Unless you build
-and use CLN with the macro CL_IO_STDIO being defined, @code{cl_istream}
-is the same as @code{istream&}.
+Including @code{<cln/io.h>} defines a type @code{cl_istream}, which is
+the type of the first argument to all input functions. @code{cl_istream}
+is the same as @code{std::istream&}.
The variable
@itemize @asis
@item
-@code{cl_istream cl_stdin}
+@code{cl_istream stdin}
@end itemize
contains the standard input stream.
Each of the classes @code{cl_N}, @code{cl_R}, @code{cl_RA}, @code{cl_I},
@code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF}
-defines, in @code{<cl_@var{type}_io.h>}, the following input function:
+defines, in @code{<cln/@var{type}_io.h>}, the following input function:
@table @code
@item cl_istream operator>> (cl_istream stream, @var{type}& result)
Reads a number from @code{stream} and stores it in the @code{result}.
@end table
-The most flexible input functions, defined in @code{<cl_@var{type}_io.h>},
+The most flexible input functions, defined in @code{<cln/@var{type}_io.h>},
are the following:
@table @code
@section Output functions
-Including @code{<cl_io.h>} defines a type @code{cl_ostream}, which is
-the type of the first argument to all output functions. Unless you build
-and use CLN with the macro CL_IO_STDIO being defined, @code{cl_ostream}
-is the same as @code{ostream&}.
+Including @code{<cln/io.h>} defines a type @code{cl_ostream}, which is
+the type of the first argument to all output functions. @code{cl_ostream}
+is the same as @code{std::ostream&}.
The variable
@itemize @asis
@item
-@code{cl_ostream cl_stdout}
+@code{cl_ostream stdout}
@end itemize
contains the standard output stream.
The variable
@itemize @asis
@item
-@code{cl_ostream cl_stderr}
+@code{cl_ostream stderr}
@end itemize
contains the standard error output stream.
Each of the classes @code{cl_N}, @code{cl_R}, @code{cl_RA}, @code{cl_I},
@code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF}
-defines, in @code{<cl_@var{type}_io.h>}, the following output functions:
+defines, in @code{<cln/@var{type}_io.h>}, the following output functions:
@table @code
@item void fprint (cl_ostream stream, const @var{type}& x)
@itemx cl_ostream operator<< (cl_ostream stream, const @var{type}& x)
Prints the number @code{x} on the @code{stream}. The output may depend
-on the global printer settings in the variable @code{cl_default_print_flags}.
+on the global printer settings in the variable @code{default_print_flags}.
The @code{ostream} flags and settings (flags, width and locale) are
ignored.
@end table
-The most flexible output function, defined in @code{<cl_@var{type}_io.h>},
+The most flexible output function, defined in @code{<cln/@var{type}_io.h>},
are the following:
@example
void print_complex (cl_ostream stream, const cl_print_flags& flags,
using this variable name. Default is @code{"x"}.
@end table
-The global variable @code{cl_default_print_flags} contains the default values,
+The global variable @code{default_print_flags} contains the default values,
used by the function @code{fprint}.
@example
Ring
cl_ring
- <cl_ring.h>
+ <cln/ring.h>
@end example
Rings can be compared for equality:
@table @code
@item void R->fprint (cl_ostream stream, const cl_ring_element& x)
+@cindex @code{fprint ()}
@itemx cl_boolean R->equal (const cl_ring_element& x, const cl_ring_element& y)
+@cindex @code{equal ()}
@itemx cl_ring_element R->zero ()
+@cindex @code{zero ()}
@itemx cl_boolean R->zerop (const cl_ring_element& x)
+@cindex @code{zerop ()}
@itemx cl_ring_element R->plus (const cl_ring_element& x, const cl_ring_element& y)
+@cindex @code{plus ()}
@itemx cl_ring_element R->minus (const cl_ring_element& x, const cl_ring_element& y)
+@cindex @code{minus ()}
@itemx cl_ring_element R->uminus (const cl_ring_element& x)
+@cindex @code{uminus ()}
@itemx cl_ring_element R->one ()
+@cindex @code{one ()}
@itemx cl_ring_element R->canonhom (const cl_I& x)
+@cindex @code{canonhom ()}
@itemx cl_ring_element R->mul (const cl_ring_element& x, const cl_ring_element& y)
+@cindex @code{mul ()}
@itemx cl_ring_element R->square (const cl_ring_element& x)
+@cindex @code{square ()}
@itemx cl_ring_element R->expt_pos (const cl_ring_element& x, const cl_I& y)
+@cindex @code{expt_pos ()}
@end table
The following rings are built-in.
@example
Ring
cl_ring
- <cl_ring.h>
+ <cln/ring.h>
|
|
Modular integer ring
cl_modint_ring
- <cl_modinteger.h>
+ <cln/modinteger.h>
@end example
@cindex @code{cl_modint_ring}
@example
Modular integer
cl_MI
- <cl_modinteger.h>
+ <cln/modinteger.h>
@end example
Modular integer rings are constructed using the function
@table @code
-@item cl_modint_ring cl_find_modint_ring (const cl_I& N)
-@cindex @code{cl_find_modint_ring ()}
+@item cl_modint_ring find_modint_ring (const cl_I& N)
+@cindex @code{find_modint_ring ()}
This function returns the modular ring @samp{Z/NZ}. It takes care
of finding out about special cases of @code{N}, like powers of two
and odd numbers for which Montgomery multiplication will be a win,
@itemx bool operator!= (const cl_modint_ring&, const cl_modint_ring&)
@cindex @code{operator != ()}
These compare two modular integer rings for equality. Two different calls
-to @code{cl_find_modint_ring} with the same argument necessarily return the
+to @code{find_modint_ring} with the same argument necessarily return the
same ring because it is memoized in the cache table.
@end table
This is a partial inverse function to @code{R->canonhom}. It returns the
standard representative (@code{>=0}, @code{<N}) of @code{x}.
-@item cl_MI R->random(cl_random_state& randomstate)
+@item cl_MI R->random(random_state& randomstate)
@itemx cl_MI R->random()
@cindex @code{random ()}
This returns a random integer modulo @code{N}.
@itemx cl_ostream operator<< (cl_ostream stream, const cl_MI& x)
@cindex @code{operator << ()}
Prints the modular integer @code{x} on the @code{stream}. The output may depend
-on the global printer settings in the variable @code{cl_default_print_flags}.
+on the global printer settings in the variable @code{default_print_flags}.
@end table
@section Strings
@cindex string
+@cindex @code{cl_string}
The class
@example
String
cl_string
- <cl_string.h>
+ <cln/string.h>
@end example
implements immutable strings.
@table @code
@item cl_string (const char * s)
-@cindex @code{cl_string ()}
Returns an immutable copy of the (zero-terminated) C string @code{s}.
@item cl_string (const char * ptr, unsigned long len)
@section Symbols
@cindex symbol
+@cindex @code{cl_symbol}
Symbols are uniquified strings: all symbols with the same name are shared.
This means that comparison of two symbols is fast (effectively just a pointer
@table @code
@item cl_symbol (const cl_string& s)
-@cindex @code{cl_symbol ()}
Looks up or creates a new symbol with a given name.
@end table
CLN implements univariate polynomials (polynomials in one variable) over an
arbitrary ring. The indeterminate variable may be either unnamed (and will be
-printed according to @code{cl_default_print_flags.univpoly_varname}, which
+printed according to @code{default_print_flags.univpoly_varname}, which
defaults to @samp{x}) or carry a given name. The base ring and the
indeterminate are explicitly part of every polynomial. CLN doesn't allow you to
(accidentally) mix elements of different polynomial rings, e.g.
@example
Ring
cl_ring
- <cl_ring.h>
+ <cln/ring.h>
|
|
Univariate polynomial ring
cl_univpoly_ring
- <cl_univpoly.h>
+ <cln/univpoly.h>
|
+----------------+-------------------+
| | |
Complex polynomial ring | Modular integer polynomial ring
cl_univpoly_complex_ring | cl_univpoly_modint_ring
- <cl_univpoly_complex.h> | <cl_univpoly_modint.h>
+ <cln/univpoly_complex.h> | <cln/univpoly_modint.h>
|
+----------------+
| |
Real polynomial ring |
cl_univpoly_real_ring |
- <cl_univpoly_real.h> |
+ <cln/univpoly_real.h> |
|
+----------------+
| |
Rational polynomial ring |
cl_univpoly_rational_ring |
- <cl_univpoly_rational.h> |
+ <cln/univpoly_rational.h> |
|
+----------------+
|
Integer polynomial ring
cl_univpoly_integer_ring
- <cl_univpoly_integer.h>
+ <cln/univpoly_integer.h>
@end example
and the corresponding classes of univariate polynomials are
@example
Univariate polynomial
cl_UP
- <cl_univpoly.h>
+ <cln/univpoly.h>
|
+----------------+-------------------+
| | |
Complex polynomial | Modular integer polynomial
cl_UP_N | cl_UP_MI
- <cl_univpoly_complex.h> | <cl_univpoly_modint.h>
+ <cln/univpoly_complex.h> | <cln/univpoly_modint.h>
|
+----------------+
| |
Real polynomial |
cl_UP_R |
- <cl_univpoly_real.h> |
+ <cln/univpoly_real.h> |
|
+----------------+
| |
Rational polynomial |
cl_UP_RA |
- <cl_univpoly_rational.h> |
+ <cln/univpoly_rational.h> |
|
+----------------+
|
Integer polynomial
cl_UP_I
- <cl_univpoly_integer.h>
+ <cln/univpoly_integer.h>
@end example
Univariate polynomial rings are constructed using the functions
@table @code
-@item cl_univpoly_ring cl_find_univpoly_ring (const cl_ring& R)
-@itemx cl_univpoly_ring cl_find_univpoly_ring (const cl_ring& R, const cl_symbol& varname)
+@item cl_univpoly_ring find_univpoly_ring (const cl_ring& R)
+@itemx cl_univpoly_ring find_univpoly_ring (const cl_ring& R, const cl_symbol& varname)
This function returns the polynomial ring @samp{R[X]}, unnamed or named.
@code{R} may be an arbitrary ring. This function takes care of finding out
about special cases of @code{R}, such as the rings of complex numbers,
This ensures that two calls of this function with the same arguments will
return the same polynomial ring.
-@itemx cl_univpoly_complex_ring cl_find_univpoly_ring (const cl_complex_ring& R)
-@cindex @code{cl_find_univpoly_ring ()}
-@itemx cl_univpoly_complex_ring cl_find_univpoly_ring (const cl_complex_ring& R, const cl_symbol& varname)
-@itemx cl_univpoly_real_ring cl_find_univpoly_ring (const cl_real_ring& R)
-@itemx cl_univpoly_real_ring cl_find_univpoly_ring (const cl_real_ring& R, const cl_symbol& varname)
-@itemx cl_univpoly_rational_ring cl_find_univpoly_ring (const cl_rational_ring& R)
-@itemx cl_univpoly_rational_ring cl_find_univpoly_ring (const cl_rational_ring& R, const cl_symbol& varname)
-@itemx cl_univpoly_integer_ring cl_find_univpoly_ring (const cl_integer_ring& R)
-@itemx cl_univpoly_integer_ring cl_find_univpoly_ring (const cl_integer_ring& R, const cl_symbol& varname)
-@itemx cl_univpoly_modint_ring cl_find_univpoly_ring (const cl_modint_ring& R)
-@itemx cl_univpoly_modint_ring cl_find_univpoly_ring (const cl_modint_ring& R, const cl_symbol& varname)
-These functions are equivalent to the general @code{cl_find_univpoly_ring},
+@itemx cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& R)
+@cindex @code{find_univpoly_ring ()}
+@itemx cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& R, const cl_symbol& varname)
+@itemx cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& R)
+@itemx cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& R, const cl_symbol& varname)
+@itemx cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& R)
+@itemx cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& R, const cl_symbol& varname)
+@itemx cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& R)
+@itemx cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& R, const cl_symbol& varname)
+@itemx cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& R)
+@itemx cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& R, const cl_symbol& varname)
+These functions are equivalent to the general @code{find_univpoly_ring},
only the return type is more specific, according to the base ring's type.
@end table
@table @code
@item cl_ring R->basering()
@cindex @code{basering ()}
-This returns the base ring, as passed to @samp{cl_find_univpoly_ring}.
+This returns the base ring, as passed to @samp{find_univpoly_ring}.
@item cl_UP R->zero()
@cindex @code{zero ()}
@cindex @code{operator << ()}
Prints the univariate polynomial @code{x} on the @code{stream}. The output may
depend on the global printer settings in the variable
-@code{cl_default_print_flags}.
+@code{default_print_flags}.
@end table
@section Special polynomials
The following functions return special polynomials.
@table @code
-@item cl_UP_I cl_tschebychev (sintL n)
-@cindex @code{cl_tschebychev ()}
-@cindex Tschebychev polynomial
-Returns the n-th Tchebychev polynomial (n >= 0).
+@item cl_UP_I tschebychev (sintL n)
+@cindex @code{tschebychev ()}
+@cindex Chebyshev polynomial
+Returns the n-th Chebyshev polynomial (n >= 0).
-@item cl_UP_I cl_hermite (sintL n)
-@cindex @code{cl_hermite ()}
+@item cl_UP_I hermite (sintL n)
+@cindex @code{hermite ()}
@cindex Hermite polynomial
Returns the n-th Hermite polynomial (n >= 0).
-@item cl_UP_RA cl_legendre (sintL n)
-@cindex @code{cl_legendre ()}
+@item cl_UP_RA legendre (sintL n)
+@cindex @code{legendre ()}
@cindex Legende polynomial
Returns the n-th Legendre polynomial (n >= 0).
-@item cl_UP_I cl_laguerre (sintL n)
-@cindex @code{cl_laguerre ()}
+@item cl_UP_I laguerre (sintL n)
+@cindex @code{laguerre ()}
@cindex Laguerre polynomial
Returns the n-th Laguerre polynomial (n >= 0).
@end table
linking a CLN application it is sufficient to give the flag @code{-lcln}.
+@section Compatibility to old CLN versions
+@cindex namespace
+@cindex compatibility
+
+As of CLN version 1.1 all non-macro identifiers were hidden in namespace
+@code{cln} in order to avoid potential name clashes with other C++
+libraries. If you have an old application, you will have to manually
+port it to the new scheme. The following principles will help during
+the transition:
+@itemize @bullet
+@item
+All headers are now in a separate subdirectory. Instead of including
+@code{cl_}@var{something}@code{.h}, include
+@code{cln/}@var{something}@code{.h} now.
+@item
+All public identifiers (typenames and functions) have lost their
+@code{cl_} prefix. Exceptions are all the typenames of number types,
+(cl_N, cl_I, cl_MI, @dots{}), rings, symbolic types (cl_string,
+cl_symbol) and polynomials (cl_UP_@var{type}). (This is because their
+names would not be mnemonic enough once the namespace @code{cln} is
+imported. Even in a namespace we favor @code{cl_N} over @code{N}.)
+@item
+All public @emph{functions} that had by a @code{cl_} in their name still
+carry that @code{cl_} if it is intrinsic part of a typename (as in
+@code{cl_I_to_int ()}).
+@end itemize
+When developing other libraries, please keep in mind not to import the
+namespace @code{cln} in one of your public header files by saying
+@code{using namespace cln;}. This would propagate to other applications
+and can cause name clashes there.
+
+
@section Include files
@cindex include files
@cindex header files
Here is a summary of the include files and their contents.
@table @code
-@item <cl_object.h>
+@item <cln/object.h>
General definitions, reference counting, garbage collection.
-@item <cl_number.h>
+@item <cln/number.h>
The class cl_number.
-@item <cl_complex.h>
+@item <cln/complex.h>
Functions for class cl_N, the complex numbers.
-@item <cl_real.h>
+@item <cln/real.h>
Functions for class cl_R, the real numbers.
-@item <cl_float.h>
+@item <cln/float.h>
Functions for class cl_F, the floats.
-@item <cl_sfloat.h>
+@item <cln/sfloat.h>
Functions for class cl_SF, the short-floats.
-@item <cl_ffloat.h>
+@item <cln/ffloat.h>
Functions for class cl_FF, the single-floats.
-@item <cl_dfloat.h>
+@item <cln/dfloat.h>
Functions for class cl_DF, the double-floats.
-@item <cl_lfloat.h>
+@item <cln/lfloat.h>
Functions for class cl_LF, the long-floats.
-@item <cl_rational.h>
+@item <cln/rational.h>
Functions for class cl_RA, the rational numbers.
-@item <cl_integer.h>
+@item <cln/integer.h>
Functions for class cl_I, the integers.
-@item <cl_io.h>
+@item <cln/io.h>
Input/Output.
-@item <cl_complex_io.h>
+@item <cln/complex_io.h>
Input/Output for class cl_N, the complex numbers.
-@item <cl_real_io.h>
+@item <cln/real_io.h>
Input/Output for class cl_R, the real numbers.
-@item <cl_float_io.h>
+@item <cln/float_io.h>
Input/Output for class cl_F, the floats.
-@item <cl_sfloat_io.h>
+@item <cln/sfloat_io.h>
Input/Output for class cl_SF, the short-floats.
-@item <cl_ffloat_io.h>
+@item <cln/ffloat_io.h>
Input/Output for class cl_FF, the single-floats.
-@item <cl_dfloat_io.h>
+@item <cln/dfloat_io.h>
Input/Output for class cl_DF, the double-floats.
-@item <cl_lfloat_io.h>
+@item <cln/lfloat_io.h>
Input/Output for class cl_LF, the long-floats.
-@item <cl_rational_io.h>
+@item <cln/rational_io.h>
Input/Output for class cl_RA, the rational numbers.
-@item <cl_integer_io.h>
+@item <cln/integer_io.h>
Input/Output for class cl_I, the integers.
-@item <cl_input.h>
+@item <cln/input.h>
Flags for customizing input operations.
-@item <cl_output.h>
+@item <cln/output.h>
Flags for customizing output operations.
-@item <cl_malloc.h>
-@code{cl_malloc_hook}, @code{cl_free_hook}.
-@item <cl_abort.h>
+@item <cln/malloc.h>
+@code{malloc_hook}, @code{free_hook}.
+@item <cln/abort.h>
@code{cl_abort}.
-@item <cl_condition.h>
+@item <cln/condition.h>
Conditions/exceptions.
-@item <cl_string.h>
+@item <cln/string.h>
Strings.
-@item <cl_symbol.h>
+@item <cln/symbol.h>
Symbols.
-@item <cl_proplist.h>
+@item <cln/proplist.h>
Property lists.
-@item <cl_ring.h>
+@item <cln/ring.h>
General rings.
-@item <cl_null_ring.h>
+@item <cln/null_ring.h>
The null ring.
-@item <cl_complex_ring.h>
+@item <cln/complex_ring.h>
The ring of complex numbers.
-@item <cl_real_ring.h>
+@item <cln/real_ring.h>
The ring of real numbers.
-@item <cl_rational_ring.h>
+@item <cln/rational_ring.h>
The ring of rational numbers.
-@item <cl_integer_ring.h>
+@item <cln/integer_ring.h>
The ring of integers.
-@item <cl_numtheory.h>
+@item <cln/numtheory.h>
Number threory functions.
-@item <cl_modinteger.h>
+@item <cln/modinteger.h>
Modular integers.
-@item <cl_V.h>
+@item <cln/V.h>
Vectors.
-@item <cl_GV.h>
+@item <cln/GV.h>
General vectors.
-@item <cl_GV_number.h>
+@item <cln/GV_number.h>
General vectors over cl_number.
-@item <cl_GV_complex.h>
+@item <cln/GV_complex.h>
General vectors over cl_N.
-@item <cl_GV_real.h>
+@item <cln/GV_real.h>
General vectors over cl_R.
-@item <cl_GV_rational.h>
+@item <cln/GV_rational.h>
General vectors over cl_RA.
-@item <cl_GV_integer.h>
+@item <cln/GV_integer.h>
General vectors over cl_I.
-@item <cl_GV_modinteger.h>
+@item <cln/GV_modinteger.h>
General vectors of modular integers.
-@item <cl_SV.h>
+@item <cln/SV.h>
Simple vectors.
-@item <cl_SV_number.h>
+@item <cln/SV_number.h>
Simple vectors over cl_number.
-@item <cl_SV_complex.h>
+@item <cln/SV_complex.h>
Simple vectors over cl_N.
-@item <cl_SV_real.h>
+@item <cln/SV_real.h>
Simple vectors over cl_R.
-@item <cl_SV_rational.h>
+@item <cln/SV_rational.h>
Simple vectors over cl_RA.
-@item <cl_SV_integer.h>
+@item <cln/SV_integer.h>
Simple vectors over cl_I.
-@item <cl_SV_ringelt.h>
+@item <cln/SV_ringelt.h>
Simple vectors of general ring elements.
-@item <cl_univpoly.h>
+@item <cln/univpoly.h>
Univariate polynomials.
-@item <cl_univpoly_integer.h>
+@item <cln/univpoly_integer.h>
Univariate polynomials over the integers.
-@item <cl_univpoly_rational.h>
+@item <cln/univpoly_rational.h>
Univariate polynomials over the rational numbers.
-@item <cl_univpoly_real.h>
+@item <cln/univpoly_real.h>
Univariate polynomials over the real numbers.
-@item <cl_univpoly_complex.h>
+@item <cln/univpoly_complex.h>
Univariate polynomials over the complex numbers.
-@item <cl_univpoly_modint.h>
+@item <cln/univpoly_modint.h>
Univariate polynomials over modular integer rings.
-@item <cl_timing.h>
+@item <cln/timing.h>
Timing facilities.
-@item <cln.h>
+@item <cln/cln.h>
Includes all of the above.
@end table
@cindex Fibonacci number
@example
-#include <cl_integer.h>
-#include <cl_real.h>
+#include <cln/integer.h>
+#include <cln/real.h>
+using namespace cln;
// Returns F_n, computed as the nearest integer to
// ((1+sqrt(5))/2)^n/sqrt(5). Assume n>=0.
Let's explain what is going on in detail.
-The include file @code{<cl_integer.h>} is necessary because the type
-@code{cl_I} is used in the function, and the include file @code{<cl_real.h>}
+The include file @code{<cln/integer.h>} is necessary because the type
+@code{cl_I} is used in the function, and the include file @code{<cln/real.h>}
is needed for the type @code{cl_R} and the floating point number functions.
-The order of the include files does not matter.
+The order of the include files does not matter. In order not to write out
+@code{cln::}@var{foo} we can safely import the whole namespace @code{cln}.
Then comes the function declaration. The argument is an @code{int}, the
result an integer. The return type is defined as @samp{const cl_I}, not
@cindex @code{CL_DEBUG}
@example
#define CL_DEBUG
-#include <cl_string.h>
+#include <cln/string.h>
@end example
Now, if you have in your program a variable @code{cl_string s}, and
inspect it under @code{gdb}, the output may look like this:
To catch such a fatal error, you need to define the function @code{cl_abort}
yourself, with the prototype
@example
-#include <cl_abort.h>
+#include <cln/abort.h>
void cl_abort (void);
@end example
@cindex @code{cl_abort ()}
@section Customizing I/O
The output of the function @code{fprint} may be customized by changing the
-value of the global variable @code{cl_default_print_flags}.
-@cindex @code{cl_default_print_flags}
+value of the global variable @code{default_print_flags}.
+@cindex @code{default_print_flags}
@section Customizing the memory allocator
Every memory allocation of CLN is done through the function pointer
-@code{cl_malloc_hook}. Freeing of this memory is done through the function
-pointer @code{cl_free_hook}. The default versions of these functions,
+@code{malloc_hook}. Freeing of this memory is done through the function
+pointer @code{free_hook}. The default versions of these functions,
provided in the library, call @code{malloc} and @code{free} and check
the @code{malloc} result against @code{NULL}.
If you want to provide another memory allocator, you need to define
-the variables @code{cl_malloc_hook} and @code{cl_free_hook} yourself,
+the variables @code{malloc_hook} and @code{free_hook} yourself,
like this:
@example
-#include <cl_malloc.h>
-void* (*cl_malloc_hook) (size_t size) = @dots{};
-void (*cl_free_hook) (void* ptr) = @dots{};
+#include <cln/malloc.h>
+namespace cln @{
+ void* (*malloc_hook) (size_t size) = @dots{};
+ void (*free_hook) (void* ptr) = @dots{};
+@}
@end example
-@cindex @code{cl_malloc_hook ()}
-@cindex @code{cl_free_hook ()}
+@cindex @code{malloc_hook ()}
+@cindex @code{free_hook ()}
The @code{cl_malloc_hook} function must not return a @code{NULL} pointer.
It is not possible to change the memory allocator at runtime, because
Using the library
* Compiler options::
+* Compatibility to old CLN versions::
* Include files::
* An Example::
* Debugging support::
The garbage collection imposes no burden on the main application.
@item
The library provides hooks for memory allocation and exceptions.
+@item
+@cindex namespace
+All non-macro identifiers are hidden in namespace @code{cln} in
+order to avoid name clashes.
@end itemize
@subsection C++ compiler
To build CLN, you need a C++ compiler.
-Actually, you need GNU @code{g++ 2.7.0} or newer.
-On HPPA, you need GNU @code{g++ 2.8.0} or newer.
+Actually, you need GNU @code{g++ 2.90} or newer, the EGCS compilers will
+do.
I recommend GNU @code{g++ 2.95} or newer.
The following C++ features are used:
-classes, member functions,
-overloading of functions and operators,
-constructors and destructors, inline, const,
-multiple inheritance, templates.
+classes, member functions, overloading of functions and operators,
+constructors and destructors, inline, const, multiple inheritance,
+templates and namespaces.
The following C++ features are not used:
-@code{new}, @code{delete}, virtual inheritance,
-exceptions.
+@code{new}, @code{delete}, virtual inheritance, exceptions.
CLN relies on semi-automatic ordering of initializations
of static and global variables, a feature which I could
@example
$ CC="gcc" CFLAGS="-O" CXX="g++" CXXFLAGS="-O" ./configure
-$ CC="gcc -V 2.7.2" CFLAGS="-O -g" \
- CXX="g++ -V 2.7.2" CXXFLAGS="-O -g" ./configure
-$ CC="gcc -V 2.8.1" CFLAGS="-O -fno-exceptions" \
- CXX="g++ -V 2.8.1" CXXFLAGS="-O -fno-exceptions" ./configure
-$ CC="gcc -V egcs-2.91.60" CFLAGS="-O2 -fno-exceptions" \
- CXX="g++ -V egcs-2.91.60" CFLAGS="-O2 -fno-exceptions" ./configure
+$ CC="gcc -V egcs-2.91.60" CFLAGS="-O -g" \
+ CXX="g++ -V egcs-2.91.60" CXXFLAGS="-O -g" ./configure
+$ CC="gcc -V 2.95.2" CFLAGS="-O2 -fno-exceptions" \
+ CXX="g++ -V 2.95.2" CFLAGS="-O2 -fno-exceptions" ./configure
@end example
@ignore
@comment cl_modules.h requires g++
calling @code{configure}. In a @code{csh} shell, you have to use the
@samp{setenv} command for setting each of the environment variables.
-On Linux, @code{g++} needs 15 MB to compile the tests. So you should better
-have 17 MB swap space and 1 MB room in $TMPDIR.
-
-If you use @code{g++} version 2.7.x, don't add @samp{-O2} to the CXXFLAGS,
-because @samp{g++ -O} generates better code for CLN than @samp{g++ -O2}.
+Currently CLN works only with the GNU @code{g++} compiler, and only in
+optimizing mode. So you should specify at least @code{-O} in the CXXFLAGS,
+or no CXXFLAGS at all. (If CXXFLAGS is not set, CLN will use @code{-O}.)
If you use @code{g++} version 2.8.x or egcs-2.91.x (a.k.a. egcs-1.1) or
gcc-2.95.x, I recommend adding @samp{-fno-exceptions} to the CXXFLAGS.
@example
Number
- cl_number
- <cl_number.h>
+ cl_number
+ <cln/number.h>
|
|
Real or complex number
cl_N
- <cl_complex.h>
+ <cln/complex.h>
|
|
Real number
cl_R
- <cl_real.h>
+ <cln/real.h>
|
+-------------------+-------------------+
| |
Rational number Floating-point number
cl_RA cl_F
-<cl_rational.h> <cl_float.h>
+<cln/rational.h> <cln/float.h>
| |
- | +-------------+-------------+-------------+
- Integer | | | |
- cl_I Short-Float Single-Float Double-Float Long-Float
- <cl_integer.h> cl_SF cl_FF cl_DF cl_LF
- <cl_sfloat.h> <cl_ffloat.h> <cl_dfloat.h> <cl_lfloat.h>
+ | +--------------+--------------+--------------+
+ Integer | | | |
+ cl_I Short-Float Single-Float Double-Float Long-Float
+<cln/integer.h> cl_SF cl_FF cl_DF cl_LF
+ <cln/sfloat.h> <cln/ffloat.h> <cln/dfloat.h> <cln/lfloat.h>
@end example
@cindex @code{cl_number}
the functions
@table @code
-@item float cl_float_approx (const @var{type}& x)
-@cindex @code{cl_float_approx ()}
-@itemx double cl_double_approx (const @var{type}& x)
-@cindex @code{cl_double_approx ()}
+@item float float_approx (const @var{type}& x)
+@cindex @code{float_approx ()}
+@itemx double double_approx (const @var{type}& x)
+@cindex @code{double_approx ()}
Returns an approximation of @code{x} of C type @var{ctype}.
If @code{abs(x)} is too close to 0 (underflow), 0 is returned.
If @code{abs(x)} is too large (overflow), an IEEE infinity is returned.
Each of the number classes declares its mathematical operations in the
corresponding include file. For example, if your code operates with
-objects of type @code{cl_I}, it should @code{#include <cl_integer.h>}.
+objects of type @code{cl_I}, it should @code{#include <cln/integer.h>}.
@menu
@cindex @code{operator != ()}
Comparison, as in C and C++.
-@item uint32 cl_equal_hashcode (const @var{type}&)
-@cindex @code{cl_equal_hashcode ()}
+@item uint32 equal_hashcode (const @var{type}&)
+@cindex @code{equal_hashcode ()}
Returns a 32-bit hash code that is the same for any two numbers which are
the same according to @code{==}. This hash code depends on the number's value,
not its type or precision.
defines the following operations:
@table @code
-@item cl_signean cl_compare (const @var{type}& x, const @var{type}& y)
-@cindex @code{cl_compare ()}
+@item cl_signean compare (const @var{type}& x, const @var{type}& y)
+@cindex @code{compare ()}
Compares @code{x} and @code{y}. Returns +1 if @code{x}>@code{y},
-1 if @code{x}<@code{y}, 0 if @code{x}=@code{y}.
The constant e = exp(1) = 2.71828@dots{} is returned by the following functions:
@table @code
-@item cl_F cl_exp1 (cl_float_format_t f)
+@item cl_F exp1 (cl_float_format_t f)
@cindex @code{exp1 ()}
Returns e as a float of format @code{f}.
-@item cl_F cl_exp1 (const cl_F& y)
+@item cl_F exp1 (const cl_F& y)
Returns e in the float format of @code{y}.
-@item cl_F cl_exp1 (void)
-Returns e as a float of format @code{cl_default_float_format}.
+@item cl_F exp1 (void)
+Returns e as a float of format @code{default_float_format}.
@end table
@item cl_N cos (const cl_N& x)
Returns @code{cos(z)}. The range of the result is the entire complex plane.
-@item struct cl_cos_sin_t @{ cl_R cos; cl_R sin; @};
-@cindex @code{cl_cos_sin_t}
-@itemx cl_cos_sin_t cl_cos_sin (const cl_R& x)
+@item struct cos_sin_t @{ cl_R cos; cl_R sin; @};
+@cindex @code{cos_sin_t}
+@itemx cos_sin_t cos_sin (const cl_R& x)
Returns both @code{sin(x)} and @code{cos(x)}. This is more efficient than
-@cindex @code{cl_cos_sin ()}
+@cindex @code{cos_sin ()}
computing them separately. The relation @code{cos^2 + sin^2 = 1} will
hold only approximately.
Archimedes' constant pi = 3.14@dots{} is returned by the following functions:
@table @code
-@item cl_F cl_pi (cl_float_format_t f)
-@cindex @code{cl_pi ()}
+@item cl_F pi (cl_float_format_t f)
+@cindex @code{pi ()}
Returns pi as a float of format @code{f}.
-@item cl_F cl_pi (const cl_F& y)
+@item cl_F pi (const cl_F& y)
Returns pi in the float format of @code{y}.
-@item cl_F cl_pi (void)
-Returns pi as a float of format @code{cl_default_float_format}.
+@item cl_F pi (void)
+Returns pi as a float of format @code{default_float_format}.
@end table
@item cl_N cosh (const cl_N& z)
Returns @code{cosh(z)}. The range of the result is the entire complex plane.
-@item struct cl_cosh_sinh_t @{ cl_R cosh; cl_R sinh; @};
-@cindex @code{cl_cosh_sinh_t}
-@itemx cl_cosh_sinh_t cl_cosh_sinh (const cl_R& x)
-@cindex @code{cl_cosh_sinh ()}
+@item struct cosh_sinh_t @{ cl_R cosh; cl_R sinh; @};
+@cindex @code{cosh_sinh_t}
+@itemx cosh_sinh_t cosh_sinh (const cl_R& x)
+@cindex @code{cosh_sinh ()}
Returns both @code{sinh(x)} and @code{cosh(x)}. This is more efficient than
computing them separately. The relation @code{cosh^2 - sinh^2 = 1} will
hold only approximately.
Euler's constant C = 0.577@dots{} is returned by the following functions:
@table @code
-@item cl_F cl_eulerconst (cl_float_format_t f)
-@cindex @code{cl_eulerconst ()}
+@item cl_F eulerconst (cl_float_format_t f)
+@cindex @code{eulerconst ()}
Returns Euler's constant as a float of format @code{f}.
-@item cl_F cl_eulerconst (const cl_F& y)
+@item cl_F eulerconst (const cl_F& y)
Returns Euler's constant in the float format of @code{y}.
-@item cl_F cl_eulerconst (void)
-Returns Euler's constant as a float of format @code{cl_default_float_format}.
+@item cl_F eulerconst (void)
+Returns Euler's constant as a float of format @code{default_float_format}.
@end table
Catalan's constant G = 0.915@dots{} is returned by the following functions:
@cindex Catalan's constant
@table @code
-@item cl_F cl_catalanconst (cl_float_format_t f)
-@cindex @code{cl_catalanconst ()}
+@item cl_F catalanconst (cl_float_format_t f)
+@cindex @code{catalanconst ()}
Returns Catalan's constant as a float of format @code{f}.
-@item cl_F cl_catalanconst (const cl_F& y)
+@item cl_F catalanconst (const cl_F& y)
Returns Catalan's constant in the float format of @code{y}.
-@item cl_F cl_catalanconst (void)
-Returns Catalan's constant as a float of format @code{cl_default_float_format}.
+@item cl_F catalanconst (void)
+Returns Catalan's constant as a float of format @code{default_float_format}.
@end table
following functions:
@table @code
-@item cl_F cl_zeta (int s, cl_float_format_t f)
-@cindex @code{cl_zeta ()}
+@item cl_F zeta (int s, cl_float_format_t f)
+@cindex @code{zeta ()}
Returns Riemann's zeta function at @code{s} as a float of format @code{f}.
-@item cl_F cl_zeta (int s, const cl_F& y)
+@item cl_F zeta (int s, const cl_F& y)
Returns Riemann's zeta function at @code{s} in the float format of @code{y}.
-@item cl_F cl_zeta (int s)
+@item cl_F zeta (int s)
Returns Riemann's zeta function at @code{s} as a float of format
-@code{cl_default_float_format}.
+@code{default_float_format}.
@end table
@end table
The complete internal representation of a float is encoded in the type
-@cindex @code{cl_decoded_float}
-@cindex @code{cl_decoded_sfloat}
-@cindex @code{cl_decoded_ffloat}
-@cindex @code{cl_decoded_dfloat}
-@cindex @code{cl_decoded_lfloat}
-@code{cl_decoded_float} (or @code{cl_decoded_sfloat}, @code{cl_decoded_ffloat},
-@code{cl_decoded_dfloat}, @code{cl_decoded_lfloat}, respectively), defined by
+@cindex @code{decoded_float}
+@cindex @code{decoded_sfloat}
+@cindex @code{decoded_ffloat}
+@cindex @code{decoded_dfloat}
+@cindex @code{decoded_lfloat}
+@code{decoded_float} (or @code{decoded_sfloat}, @code{decoded_ffloat},
+@code{decoded_dfloat}, @code{decoded_lfloat}, respectively), defined by
@example
-struct cl_decoded_@var{type}float @{
+struct decoded_@var{type}float @{
@var{type} mantissa; cl_I exponent; @var{type} sign;
@};
@end example
and returned by the function
@table @code
-@item cl_decoded_@var{type}float decode_float (const @var{type}& x)
+@item decoded_@var{type}float decode_float (const @var{type}& x)
@cindex @code{decode_float ()}
For @code{x} non-zero, this returns @code{(-1)^s}, @code{e}, @code{m} with
@code{x = (-1)^s * 2^e * m} and @code{0.5 <= m < 1.0}. For @code{x} = 0,
@end table
A complete decoding in terms of integers is provided as type
-@example
@cindex @code{cl_idecoded_float}
+@example
struct cl_idecoded_float @{
cl_I mantissa; cl_I exponent; cl_I sign;
@};
@item cl_float_format_t cl_float_format (const cl_F& x)
Returns the floating point format of @code{x}.
-@item cl_float_format_t cl_default_float_format
-@cindex @code{cl_default_float_format}
+@item cl_float_format_t default_float_format
+@cindex @code{default_float_format}
Global variable: the default float format used when converting rational numbers
to floats.
@end table
@item cl_F cl_float (const @var{type}&x, const cl_F& y)
Returns @code{x} in the float format of @code{y}.
@item cl_F cl_float (const @var{type}&x)
-Returns @code{x} as a float of format @code{cl_default_float_format} if
+Returns @code{x} as a float of format @code{default_float_format} if
it is an exact number, or @code{x} itself if it is already a float.
@end table
A random generator is a machine which produces (pseudo-)random numbers.
-The include file @code{<cl_random.h>} defines a class @code{cl_random_state}
+The include file @code{<cln/random.h>} defines a class @code{random_state}
which contains the state of a random generator. If you make a copy
of the random number generator, the original one and the copy will produce
the same sequence of random numbers.
a complicated but deterministic way.
The global variable
-@cindex @code{cl_random_state}
-@cindex @code{cl_default_random_state}
+@cindex @code{random_state}
+@cindex @code{default_random_state}
@example
-cl_random_state cl_default_random_state
+random_state default_random_state
@end example
contains a default random number generator. It is used when the functions
-below are called without @code{cl_random_state} argument.
+below are called without @code{random_state} argument.
@table @code
-@item uint32 random32 (cl_random_state& randomstate)
+@item uint32 random32 (random_state& randomstate)
@itemx uint32 random32 ()
@cindex @code{random32 ()}
Returns a random unsigned 32-bit number. All bits are equally random.
-@item cl_I random_I (cl_random_state& randomstate, const cl_I& n)
+@item cl_I random_I (random_state& randomstate, const cl_I& n)
@itemx cl_I random_I (const cl_I& n)
@cindex @code{random_I ()}
@code{n} must be an integer > 0. This function returns a random integer @code{x}
in the range @code{0 <= x < n}.
-@item cl_F random_F (cl_random_state& randomstate, const cl_F& n)
+@item cl_F random_F (random_state& randomstate, const cl_F& n)
@itemx cl_F random_F (const cl_F& n)
@cindex @code{random_F ()}
@code{n} must be a float > 0. This function returns a random floating-point
number of the same format as @code{n} in the range @code{0 <= x < n}.
-@item cl_R random_R (cl_random_state& randomstate, const cl_R& n)
+@item cl_R random_R (random_state& randomstate, const cl_R& n)
@itemx cl_R random_R (const cl_R& n)
@cindex @code{random_R ()}
Behaves like @code{random_I} if @code{n} is an integer and like @code{random_F}
@node Input functions, Output functions, Internal and printed representation, Input/Output
@section Input functions
-Including @code{<cl_io.h>} defines a type @code{cl_istream}, which is
-the type of the first argument to all input functions. Unless you build
-and use CLN with the macro CL_IO_STDIO being defined, @code{cl_istream}
-is the same as @code{istream&}.
+Including @code{<cln/io.h>} defines a type @code{cl_istream}, which is
+the type of the first argument to all input functions. @code{cl_istream}
+is the same as @code{std::istream&}.
The variable
@itemize @asis
@item
-@code{cl_istream cl_stdin}
+@code{cl_istream stdin}
@end itemize
contains the standard input stream.
Each of the classes @code{cl_N}, @code{cl_R}, @code{cl_RA}, @code{cl_I},
@code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF}
-defines, in @code{<cl_@var{type}_io.h>}, the following input function:
+defines, in @code{<cln/@var{type}_io.h>}, the following input function:
@table @code
@item cl_istream operator>> (cl_istream stream, @var{type}& result)
Reads a number from @code{stream} and stores it in the @code{result}.
@end table
-The most flexible input functions, defined in @code{<cl_@var{type}_io.h>},
+The most flexible input functions, defined in @code{<cln/@var{type}_io.h>},
are the following:
@table @code
@node Output functions, , Input functions, Input/Output
@section Output functions
-Including @code{<cl_io.h>} defines a type @code{cl_ostream}, which is
-the type of the first argument to all output functions. Unless you build
-and use CLN with the macro CL_IO_STDIO being defined, @code{cl_ostream}
-is the same as @code{ostream&}.
+Including @code{<cln/io.h>} defines a type @code{cl_ostream}, which is
+the type of the first argument to all output functions. @code{cl_ostream}
+is the same as @code{std::ostream&}.
The variable
@itemize @asis
@item
-@code{cl_ostream cl_stdout}
+@code{cl_ostream stdout}
@end itemize
contains the standard output stream.
The variable
@itemize @asis
@item
-@code{cl_ostream cl_stderr}
+@code{cl_ostream stderr}
@end itemize
contains the standard error output stream.
Each of the classes @code{cl_N}, @code{cl_R}, @code{cl_RA}, @code{cl_I},
@code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF}
-defines, in @code{<cl_@var{type}_io.h>}, the following output functions:
+defines, in @code{<cln/@var{type}_io.h>}, the following output functions:
@table @code
@item void fprint (cl_ostream stream, const @var{type}& x)
@itemx cl_ostream operator<< (cl_ostream stream, const @var{type}& x)
Prints the number @code{x} on the @code{stream}. The output may depend
-on the global printer settings in the variable @code{cl_default_print_flags}.
+on the global printer settings in the variable @code{default_print_flags}.
The @code{ostream} flags and settings (flags, width and locale) are
ignored.
@end table
-The most flexible output function, defined in @code{<cl_@var{type}_io.h>},
+The most flexible output function, defined in @code{<cln/@var{type}_io.h>},
are the following:
@example
void print_complex (cl_ostream stream, const cl_print_flags& flags,
using this variable name. Default is @code{"x"}.
@end table
-The global variable @code{cl_default_print_flags} contains the default values,
+The global variable @code{default_print_flags} contains the default values,
used by the function @code{fprint}.
@example
Ring
cl_ring
- <cl_ring.h>
+ <cln/ring.h>
@end example
Rings can be compared for equality:
@table @code
@item void R->fprint (cl_ostream stream, const cl_ring_element& x)
+@cindex @code{fprint ()}
@itemx cl_boolean R->equal (const cl_ring_element& x, const cl_ring_element& y)
+@cindex @code{equal ()}
@itemx cl_ring_element R->zero ()
+@cindex @code{zero ()}
@itemx cl_boolean R->zerop (const cl_ring_element& x)
+@cindex @code{zerop ()}
@itemx cl_ring_element R->plus (const cl_ring_element& x, const cl_ring_element& y)
+@cindex @code{plus ()}
@itemx cl_ring_element R->minus (const cl_ring_element& x, const cl_ring_element& y)
+@cindex @code{minus ()}
@itemx cl_ring_element R->uminus (const cl_ring_element& x)
+@cindex @code{uminus ()}
@itemx cl_ring_element R->one ()
+@cindex @code{one ()}
@itemx cl_ring_element R->canonhom (const cl_I& x)
+@cindex @code{canonhom ()}
@itemx cl_ring_element R->mul (const cl_ring_element& x, const cl_ring_element& y)
+@cindex @code{mul ()}
@itemx cl_ring_element R->square (const cl_ring_element& x)
+@cindex @code{square ()}
@itemx cl_ring_element R->expt_pos (const cl_ring_element& x, const cl_I& y)
+@cindex @code{expt_pos ()}
@end table
The following rings are built-in.
@example
Ring
cl_ring
- <cl_ring.h>
+ <cln/ring.h>
|
|
Modular integer ring
cl_modint_ring
- <cl_modinteger.h>
+ <cln/modinteger.h>
@end example
@cindex @code{cl_modint_ring}
@example
Modular integer
cl_MI
- <cl_modinteger.h>
+ <cln/modinteger.h>
@end example
Modular integer rings are constructed using the function
@table @code
-@item cl_modint_ring cl_find_modint_ring (const cl_I& N)
-@cindex @code{cl_find_modint_ring ()}
+@item cl_modint_ring find_modint_ring (const cl_I& N)
+@cindex @code{find_modint_ring ()}
This function returns the modular ring @samp{Z/NZ}. It takes care
of finding out about special cases of @code{N}, like powers of two
and odd numbers for which Montgomery multiplication will be a win,
@itemx bool operator!= (const cl_modint_ring&, const cl_modint_ring&)
@cindex @code{operator != ()}
These compare two modular integer rings for equality. Two different calls
-to @code{cl_find_modint_ring} with the same argument necessarily return the
+to @code{find_modint_ring} with the same argument necessarily return the
same ring because it is memoized in the cache table.
@end table
This is a partial inverse function to @code{R->canonhom}. It returns the
standard representative (@code{>=0}, @code{<N}) of @code{x}.
-@item cl_MI R->random(cl_random_state& randomstate)
+@item cl_MI R->random(random_state& randomstate)
@itemx cl_MI R->random()
@cindex @code{random ()}
This returns a random integer modulo @code{N}.
@itemx cl_ostream operator<< (cl_ostream stream, const cl_MI& x)
@cindex @code{operator << ()}
Prints the modular integer @code{x} on the @code{stream}. The output may depend
-on the global printer settings in the variable @code{cl_default_print_flags}.
+on the global printer settings in the variable @code{default_print_flags}.
@end table
@node Strings, Symbols, Symbolic data types, Symbolic data types
@section Strings
@cindex string
+@cindex @code{cl_string}
The class
@example
String
cl_string
- <cl_string.h>
+ <cln/string.h>
@end example
implements immutable strings.
@table @code
@item cl_string (const char * s)
-@cindex @code{cl_string ()}
Returns an immutable copy of the (zero-terminated) C string @code{s}.
@item cl_string (const char * ptr, unsigned long len)
@node Symbols, , Strings, Symbolic data types
@section Symbols
@cindex symbol
+@cindex @code{cl_symbol}
Symbols are uniquified strings: all symbols with the same name are shared.
This means that comparison of two symbols is fast (effectively just a pointer
@table @code
@item cl_symbol (const cl_string& s)
-@cindex @code{cl_symbol ()}
Looks up or creates a new symbol with a given name.
@end table
CLN implements univariate polynomials (polynomials in one variable) over an
arbitrary ring. The indeterminate variable may be either unnamed (and will be
-printed according to @code{cl_default_print_flags.univpoly_varname}, which
+printed according to @code{default_print_flags.univpoly_varname}, which
defaults to @samp{x}) or carry a given name. The base ring and the
indeterminate are explicitly part of every polynomial. CLN doesn't allow you to
(accidentally) mix elements of different polynomial rings, e.g.
@example
Ring
cl_ring
- <cl_ring.h>
+ <cln/ring.h>
|
|
Univariate polynomial ring
cl_univpoly_ring
- <cl_univpoly.h>
+ <cln/univpoly.h>
|
+----------------+-------------------+
| | |
Complex polynomial ring | Modular integer polynomial ring
cl_univpoly_complex_ring | cl_univpoly_modint_ring
- <cl_univpoly_complex.h> | <cl_univpoly_modint.h>
+ <cln/univpoly_complex.h> | <cln/univpoly_modint.h>
|
+----------------+
| |
Real polynomial ring |
cl_univpoly_real_ring |
- <cl_univpoly_real.h> |
+ <cln/univpoly_real.h> |
|
+----------------+
| |
Rational polynomial ring |
cl_univpoly_rational_ring |
- <cl_univpoly_rational.h> |
+ <cln/univpoly_rational.h> |
|
+----------------+
|
Integer polynomial ring
cl_univpoly_integer_ring
- <cl_univpoly_integer.h>
+ <cln/univpoly_integer.h>
@end example
and the corresponding classes of univariate polynomials are
@example
Univariate polynomial
cl_UP
- <cl_univpoly.h>
+ <cln/univpoly.h>
|
+----------------+-------------------+
| | |
Complex polynomial | Modular integer polynomial
cl_UP_N | cl_UP_MI
- <cl_univpoly_complex.h> | <cl_univpoly_modint.h>
+ <cln/univpoly_complex.h> | <cln/univpoly_modint.h>
|
+----------------+
| |
Real polynomial |
cl_UP_R |
- <cl_univpoly_real.h> |
+ <cln/univpoly_real.h> |
|
+----------------+
| |
Rational polynomial |
cl_UP_RA |
- <cl_univpoly_rational.h> |
+ <cln/univpoly_rational.h> |
|
+----------------+
|
Integer polynomial
cl_UP_I
- <cl_univpoly_integer.h>
+ <cln/univpoly_integer.h>
@end example
Univariate polynomial rings are constructed using the functions
@table @code
-@item cl_univpoly_ring cl_find_univpoly_ring (const cl_ring& R)
-@itemx cl_univpoly_ring cl_find_univpoly_ring (const cl_ring& R, const cl_symbol& varname)
+@item cl_univpoly_ring find_univpoly_ring (const cl_ring& R)
+@itemx cl_univpoly_ring find_univpoly_ring (const cl_ring& R, const cl_symbol& varname)
This function returns the polynomial ring @samp{R[X]}, unnamed or named.
@code{R} may be an arbitrary ring. This function takes care of finding out
about special cases of @code{R}, such as the rings of complex numbers,
This ensures that two calls of this function with the same arguments will
return the same polynomial ring.
-@itemx cl_univpoly_complex_ring cl_find_univpoly_ring (const cl_complex_ring& R)
-@cindex @code{cl_find_univpoly_ring ()}
-@itemx cl_univpoly_complex_ring cl_find_univpoly_ring (const cl_complex_ring& R, const cl_symbol& varname)
-@itemx cl_univpoly_real_ring cl_find_univpoly_ring (const cl_real_ring& R)
-@itemx cl_univpoly_real_ring cl_find_univpoly_ring (const cl_real_ring& R, const cl_symbol& varname)
-@itemx cl_univpoly_rational_ring cl_find_univpoly_ring (const cl_rational_ring& R)
-@itemx cl_univpoly_rational_ring cl_find_univpoly_ring (const cl_rational_ring& R, const cl_symbol& varname)
-@itemx cl_univpoly_integer_ring cl_find_univpoly_ring (const cl_integer_ring& R)
-@itemx cl_univpoly_integer_ring cl_find_univpoly_ring (const cl_integer_ring& R, const cl_symbol& varname)
-@itemx cl_univpoly_modint_ring cl_find_univpoly_ring (const cl_modint_ring& R)
-@itemx cl_univpoly_modint_ring cl_find_univpoly_ring (const cl_modint_ring& R, const cl_symbol& varname)
-These functions are equivalent to the general @code{cl_find_univpoly_ring},
+@itemx cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& R)
+@cindex @code{find_univpoly_ring ()}
+@itemx cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& R, const cl_symbol& varname)
+@itemx cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& R)
+@itemx cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& R, const cl_symbol& varname)
+@itemx cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& R)
+@itemx cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& R, const cl_symbol& varname)
+@itemx cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& R)
+@itemx cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& R, const cl_symbol& varname)
+@itemx cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& R)
+@itemx cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& R, const cl_symbol& varname)
+These functions are equivalent to the general @code{find_univpoly_ring},
only the return type is more specific, according to the base ring's type.
@end table
@table @code
@item cl_ring R->basering()
@cindex @code{basering ()}
-This returns the base ring, as passed to @samp{cl_find_univpoly_ring}.
+This returns the base ring, as passed to @samp{find_univpoly_ring}.
@item cl_UP R->zero()
@cindex @code{zero ()}
@cindex @code{operator << ()}
Prints the univariate polynomial @code{x} on the @code{stream}. The output may
depend on the global printer settings in the variable
-@code{cl_default_print_flags}.
+@code{default_print_flags}.
@end table
@node Special polynomials, , Functions on univariate polynomials, Univariate polynomials
The following functions return special polynomials.
@table @code
-@item cl_UP_I cl_tschebychev (sintL n)
-@cindex @code{cl_tschebychev ()}
-@cindex Tschebychev polynomial
-Returns the n-th Tchebychev polynomial (n >= 0).
+@item cl_UP_I tschebychev (sintL n)
+@cindex @code{tschebychev ()}
+@cindex Chebyshev polynomial
+Returns the n-th Chebyshev polynomial (n >= 0).
-@item cl_UP_I cl_hermite (sintL n)
-@cindex @code{cl_hermite ()}
+@item cl_UP_I hermite (sintL n)
+@cindex @code{hermite ()}
@cindex Hermite polynomial
Returns the n-th Hermite polynomial (n >= 0).
-@item cl_UP_RA cl_legendre (sintL n)
-@cindex @code{cl_legendre ()}
+@item cl_UP_RA legendre (sintL n)
+@cindex @code{legendre ()}
@cindex Legende polynomial
Returns the n-th Legendre polynomial (n >= 0).
-@item cl_UP_I cl_laguerre (sintL n)
-@cindex @code{cl_laguerre ()}
+@item cl_UP_I laguerre (sintL n)
+@cindex @code{laguerre ()}
@cindex Laguerre polynomial
Returns the n-th Laguerre polynomial (n >= 0).
@end table
@menu
* Compiler options::
+* Compatibility to old CLN versions::
* Include files::
* An Example::
* Debugging support::
@end menu
-@node Compiler options, Include files, Using the library, Using the library
+@node Compiler options, Compatibility to old CLN versions, Using the library, Using the library
@section Compiler options
@cindex compiler options
linking a CLN application it is sufficient to give the flag @code{-lcln}.
-@node Include files, An Example, Compiler options, Using the library
+@node Compatibility to old CLN versions, Include files, Compiler options, Using the library
+@section Compatibility to old CLN versions
+@cindex namespace
+@cindex compatibility
+
+As of CLN version 1.1 all non-macro identifiers were hidden in namespace
+@code{cln} in order to avoid potential name clashes with other C++
+libraries. If you have an old application, you will have to manually
+port it to the new scheme. The following principles will help during
+the transition:
+@itemize @bullet
+@item
+All headers are now in a separate subdirectory. Instead of including
+@code{cl_}@var{something}@code{.h}, include
+@code{cln/}@var{something}@code{.h} now.
+@item
+All public identifiers (typenames and functions) have lost their
+@code{cl_} prefix. Exceptions are all the typenames of number types,
+(cl_N, cl_I, cl_MI, @dots{}), rings, symbolic types (cl_string,
+cl_symbol) and polynomials (cl_UP_@var{type}). (This is because their
+names would not be mnemonic enough once the namespace @code{cln} is
+imported. Even in a namespace we favor @code{cl_N} over @code{N}.)
+@item
+All public @emph{functions} that had by a @code{cl_} in their name still
+carry that @code{cl_} if it is intrinsic part of a typename (as in
+@code{cl_I_to_int ()}).
+@end itemize
+When developing other libraries, please keep in mind not to import the
+namespace @code{cln} in one of your public header files by saying
+@code{using namespace cln;}. This would propagate to other applications
+and can cause name clashes there.
+
+
+@node Include files, An Example, Compatibility to old CLN versions, Using the library
@section Include files
@cindex include files
@cindex header files
Here is a summary of the include files and their contents.
@table @code
-@item <cl_object.h>
+@item <cln/object.h>
General definitions, reference counting, garbage collection.
-@item <cl_number.h>
+@item <cln/number.h>
The class cl_number.
-@item <cl_complex.h>
+@item <cln/complex.h>
Functions for class cl_N, the complex numbers.
-@item <cl_real.h>
+@item <cln/real.h>
Functions for class cl_R, the real numbers.
-@item <cl_float.h>
+@item <cln/float.h>
Functions for class cl_F, the floats.
-@item <cl_sfloat.h>
+@item <cln/sfloat.h>
Functions for class cl_SF, the short-floats.
-@item <cl_ffloat.h>
+@item <cln/ffloat.h>
Functions for class cl_FF, the single-floats.
-@item <cl_dfloat.h>
+@item <cln/dfloat.h>
Functions for class cl_DF, the double-floats.
-@item <cl_lfloat.h>
+@item <cln/lfloat.h>
Functions for class cl_LF, the long-floats.
-@item <cl_rational.h>
+@item <cln/rational.h>
Functions for class cl_RA, the rational numbers.
-@item <cl_integer.h>
+@item <cln/integer.h>
Functions for class cl_I, the integers.
-@item <cl_io.h>
+@item <cln/io.h>
Input/Output.
-@item <cl_complex_io.h>
+@item <cln/complex_io.h>
Input/Output for class cl_N, the complex numbers.
-@item <cl_real_io.h>
+@item <cln/real_io.h>
Input/Output for class cl_R, the real numbers.
-@item <cl_float_io.h>
+@item <cln/float_io.h>
Input/Output for class cl_F, the floats.
-@item <cl_sfloat_io.h>
+@item <cln/sfloat_io.h>
Input/Output for class cl_SF, the short-floats.
-@item <cl_ffloat_io.h>
+@item <cln/ffloat_io.h>
Input/Output for class cl_FF, the single-floats.
-@item <cl_dfloat_io.h>
+@item <cln/dfloat_io.h>
Input/Output for class cl_DF, the double-floats.
-@item <cl_lfloat_io.h>
+@item <cln/lfloat_io.h>
Input/Output for class cl_LF, the long-floats.
-@item <cl_rational_io.h>
+@item <cln/rational_io.h>
Input/Output for class cl_RA, the rational numbers.
-@item <cl_integer_io.h>
+@item <cln/integer_io.h>
Input/Output for class cl_I, the integers.
-@item <cl_input.h>
+@item <cln/input.h>
Flags for customizing input operations.
-@item <cl_output.h>
+@item <cln/output.h>
Flags for customizing output operations.
-@item <cl_malloc.h>
-@code{cl_malloc_hook}, @code{cl_free_hook}.
-@item <cl_abort.h>
+@item <cln/malloc.h>
+@code{malloc_hook}, @code{free_hook}.
+@item <cln/abort.h>
@code{cl_abort}.
-@item <cl_condition.h>
+@item <cln/condition.h>
Conditions/exceptions.
-@item <cl_string.h>
+@item <cln/string.h>
Strings.
-@item <cl_symbol.h>
+@item <cln/symbol.h>
Symbols.
-@item <cl_proplist.h>
+@item <cln/proplist.h>
Property lists.
-@item <cl_ring.h>
+@item <cln/ring.h>
General rings.
-@item <cl_null_ring.h>
+@item <cln/null_ring.h>
The null ring.
-@item <cl_complex_ring.h>
+@item <cln/complex_ring.h>
The ring of complex numbers.
-@item <cl_real_ring.h>
+@item <cln/real_ring.h>
The ring of real numbers.
-@item <cl_rational_ring.h>
+@item <cln/rational_ring.h>
The ring of rational numbers.
-@item <cl_integer_ring.h>
+@item <cln/integer_ring.h>
The ring of integers.
-@item <cl_numtheory.h>
+@item <cln/numtheory.h>
Number threory functions.
-@item <cl_modinteger.h>
+@item <cln/modinteger.h>
Modular integers.
-@item <cl_V.h>
+@item <cln/V.h>
Vectors.
-@item <cl_GV.h>
+@item <cln/GV.h>
General vectors.
-@item <cl_GV_number.h>
+@item <cln/GV_number.h>
General vectors over cl_number.
-@item <cl_GV_complex.h>
+@item <cln/GV_complex.h>
General vectors over cl_N.
-@item <cl_GV_real.h>
+@item <cln/GV_real.h>
General vectors over cl_R.
-@item <cl_GV_rational.h>
+@item <cln/GV_rational.h>
General vectors over cl_RA.
-@item <cl_GV_integer.h>
+@item <cln/GV_integer.h>
General vectors over cl_I.
-@item <cl_GV_modinteger.h>
+@item <cln/GV_modinteger.h>
General vectors of modular integers.
-@item <cl_SV.h>
+@item <cln/SV.h>
Simple vectors.
-@item <cl_SV_number.h>
+@item <cln/SV_number.h>
Simple vectors over cl_number.
-@item <cl_SV_complex.h>
+@item <cln/SV_complex.h>
Simple vectors over cl_N.
-@item <cl_SV_real.h>
+@item <cln/SV_real.h>
Simple vectors over cl_R.
-@item <cl_SV_rational.h>
+@item <cln/SV_rational.h>
Simple vectors over cl_RA.
-@item <cl_SV_integer.h>
+@item <cln/SV_integer.h>
Simple vectors over cl_I.
-@item <cl_SV_ringelt.h>
+@item <cln/SV_ringelt.h>
Simple vectors of general ring elements.
-@item <cl_univpoly.h>
+@item <cln/univpoly.h>
Univariate polynomials.
-@item <cl_univpoly_integer.h>
+@item <cln/univpoly_integer.h>
Univariate polynomials over the integers.
-@item <cl_univpoly_rational.h>
+@item <cln/univpoly_rational.h>
Univariate polynomials over the rational numbers.
-@item <cl_univpoly_real.h>
+@item <cln/univpoly_real.h>
Univariate polynomials over the real numbers.
-@item <cl_univpoly_complex.h>
+@item <cln/univpoly_complex.h>
Univariate polynomials over the complex numbers.
-@item <cl_univpoly_modint.h>
+@item <cln/univpoly_modint.h>
Univariate polynomials over modular integer rings.
-@item <cl_timing.h>
+@item <cln/timing.h>
Timing facilities.
-@item <cln.h>
+@item <cln/cln.h>
Includes all of the above.
@end table
@cindex Fibonacci number
@example
-#include <cl_integer.h>
-#include <cl_real.h>
+#include <cln/integer.h>
+#include <cln/real.h>
+using namespace cln;
// Returns F_n, computed as the nearest integer to
// ((1+sqrt(5))/2)^n/sqrt(5). Assume n>=0.
Let's explain what is going on in detail.
-The include file @code{<cl_integer.h>} is necessary because the type
-@code{cl_I} is used in the function, and the include file @code{<cl_real.h>}
+The include file @code{<cln/integer.h>} is necessary because the type
+@code{cl_I} is used in the function, and the include file @code{<cln/real.h>}
is needed for the type @code{cl_R} and the floating point number functions.
-The order of the include files does not matter.
+The order of the include files does not matter. In order not to write out
+@code{cln::}@var{foo} we can safely import the whole namespace @code{cln}.
Then comes the function declaration. The argument is an @code{int}, the
result an integer. The return type is defined as @samp{const cl_I}, not
@cindex @code{CL_DEBUG}
@example
#define CL_DEBUG
-#include <cl_string.h>
+#include <cln/string.h>
@end example
Now, if you have in your program a variable @code{cl_string s}, and
inspect it under @code{gdb}, the output may look like this:
To catch such a fatal error, you need to define the function @code{cl_abort}
yourself, with the prototype
@example
-#include <cl_abort.h>
+#include <cln/abort.h>
void cl_abort (void);
@end example
@cindex @code{cl_abort ()}
@section Customizing I/O
The output of the function @code{fprint} may be customized by changing the
-value of the global variable @code{cl_default_print_flags}.
-@cindex @code{cl_default_print_flags}
+value of the global variable @code{default_print_flags}.
+@cindex @code{default_print_flags}
@node Customizing the memory allocator, , Customizing I/O, Customizing
@section Customizing the memory allocator
Every memory allocation of CLN is done through the function pointer
-@code{cl_malloc_hook}. Freeing of this memory is done through the function
-pointer @code{cl_free_hook}. The default versions of these functions,
+@code{malloc_hook}. Freeing of this memory is done through the function
+pointer @code{free_hook}. The default versions of these functions,
provided in the library, call @code{malloc} and @code{free} and check
the @code{malloc} result against @code{NULL}.
If you want to provide another memory allocator, you need to define
-the variables @code{cl_malloc_hook} and @code{cl_free_hook} yourself,
+the variables @code{malloc_hook} and @code{free_hook} yourself,
like this:
@example
-#include <cl_malloc.h>
-void* (*cl_malloc_hook) (size_t size) = @dots{};
-void (*cl_free_hook) (void* ptr) = @dots{};
+#include <cln/malloc.h>
+namespace cln @{
+ void* (*malloc_hook) (size_t size) = @dots{};
+ void (*free_hook) (void* ptr) = @dots{};
+@}
@end example
-@cindex @code{cl_malloc_hook ()}
-@cindex @code{cl_free_hook ()}
+@cindex @code{malloc_hook ()}
+@cindex @code{free_hook ()}
The @code{cl_malloc_hook} function must not return a @code{NULL} pointer.
It is not possible to change the memory allocator at runtime, because
<HTML>
<HEAD>
-<!-- Created by texi2html 1.56k from cln.texi on 2 June 2000 -->
+<!-- Created by texi2html 1.56k from cln.texi on 28 August 2000 -->
<TITLE>CLN, a Class Library for Numbers - 1. Introduction</TITLE>
</HEAD>
<LI>
The library provides hooks for memory allocation and exceptions.
+<LI>
+
+<A NAME="IDX3"></A>
+All non-macro identifiers are hidden in namespace <CODE>cln</CODE> in
+order to avoid name clashes.
</UL>
<P><HR><P>
<HTML>
<HEAD>
-<!-- Created by texi2html 1.56k from cln.texi on 2 June 2000 -->
+<!-- Created by texi2html 1.56k from cln.texi on 28 August 2000 -->
<TITLE>CLN, a Class Library for Numbers - 10. Internals</TITLE>
</HEAD>
<H2><A NAME="SEC60" HREF="cln_toc.html#TOC60">10.1 Why C++ ?</A></H2>
<P>
-<A NAME="IDX314"></A>
+<A NAME="IDX327"></A>
<P>
<LI>
-<A NAME="IDX315"></A>
+<A NAME="IDX328"></A>
Portability: It runs on all platforms supporting a C++ compiler. Because
of the availability of GNU C++, this includes all currently used 32-bit and
64-bit platforms, independently of the quality of the vendor's C++ compiler.
it.
<LI>
-<A NAME="IDX316"></A>
-<A NAME="IDX317"></A>
+<A NAME="IDX329"></A>
+<A NAME="IDX330"></A>
Garbage collection: A reference counting mechanism makes sure that any
number object's storage is freed immediately when the last reference to the
object is gone.
For very large numbers (more than 12000 decimal digits), CLN uses
Schönhage-Strassen
-<A NAME="IDX318"></A>
+<A NAME="IDX331"></A>
multiplication, which is an asymptotically optimal multiplication
algorithm.
<LI>
<H2><A NAME="SEC63" HREF="cln_toc.html#TOC63">10.4 Garbage collection</A></H2>
<P>
-<A NAME="IDX319"></A>
+<A NAME="IDX332"></A>
<P>
<HTML>
<HEAD>
-<!-- Created by texi2html 1.56k from cln.texi on 2 June 2000 -->
+<!-- Created by texi2html 1.56k from cln.texi on 28 August 2000 -->
<TITLE>CLN, a Class Library for Numbers - 11. Using the library</TITLE>
</HEAD>
<H2><A NAME="SEC65" HREF="cln_toc.html#TOC65">11.1 Compiler options</A></H2>
<P>
-<A NAME="IDX320"></A>
+<A NAME="IDX333"></A>
<P>
-<H2><A NAME="SEC66" HREF="cln_toc.html#TOC66">11.2 Include files</A></H2>
+<H2><A NAME="SEC66" HREF="cln_toc.html#TOC66">11.2 Compatibility to old CLN versions</A></H2>
<P>
-<A NAME="IDX321"></A>
-<A NAME="IDX322"></A>
+<A NAME="IDX334"></A>
+<A NAME="IDX335"></A>
+
+
+<P>
+As of CLN version 1.1 all non-macro identifiers were hidden in namespace
+<CODE>cln</CODE> in order to avoid potential name clashes with other C++
+libraries. If you have an old application, you will have to manually
+port it to the new scheme. The following principles will help during
+the transition:
+
+<UL>
+<LI>
+
+All headers are now in a separate subdirectory. Instead of including
+<CODE>cl_</CODE><VAR>something</VAR><CODE>.h</CODE>, include
+<CODE>cln/</CODE><VAR>something</VAR><CODE>.h</CODE> now.
+<LI>
+
+All public identifiers (typenames and functions) have lost their
+<CODE>cl_</CODE> prefix. Exceptions are all the typenames of number types,
+(cl_N, cl_I, cl_MI, ...), rings, symbolic types (cl_string,
+cl_symbol) and polynomials (cl_UP_<VAR>type</VAR>). (This is because their
+names would not be mnemonic enough once the namespace <CODE>cln</CODE> is
+imported. Even in a namespace we favor <CODE>cl_N</CODE> over <CODE>N</CODE>.)
+<LI>
+
+All public <EM>functions</EM> that had by a <CODE>cl_</CODE> in their name still
+carry that <CODE>cl_</CODE> if it is intrinsic part of a typename (as in
+<CODE>cl_I_to_int ()</CODE>).
+</UL>
+
+<P>
+When developing other libraries, please keep in mind not to import the
+namespace <CODE>cln</CODE> in one of your public header files by saying
+<CODE>using namespace cln;</CODE>. This would propagate to other applications
+and can cause name clashes there.
+
+
+
+
+<H2><A NAME="SEC67" HREF="cln_toc.html#TOC67">11.3 Include files</A></H2>
+<P>
+<A NAME="IDX336"></A>
+<A NAME="IDX337"></A>
<P>
<DL COMPACT>
-<DT><CODE><cl_object.h></CODE>
+<DT><CODE><cln/object.h></CODE>
<DD>
General definitions, reference counting, garbage collection.
-<DT><CODE><cl_number.h></CODE>
+<DT><CODE><cln/number.h></CODE>
<DD>
The class cl_number.
-<DT><CODE><cl_complex.h></CODE>
+<DT><CODE><cln/complex.h></CODE>
<DD>
Functions for class cl_N, the complex numbers.
-<DT><CODE><cl_real.h></CODE>
+<DT><CODE><cln/real.h></CODE>
<DD>
Functions for class cl_R, the real numbers.
-<DT><CODE><cl_float.h></CODE>
+<DT><CODE><cln/float.h></CODE>
<DD>
Functions for class cl_F, the floats.
-<DT><CODE><cl_sfloat.h></CODE>
+<DT><CODE><cln/sfloat.h></CODE>
<DD>
Functions for class cl_SF, the short-floats.
-<DT><CODE><cl_ffloat.h></CODE>
+<DT><CODE><cln/ffloat.h></CODE>
<DD>
Functions for class cl_FF, the single-floats.
-<DT><CODE><cl_dfloat.h></CODE>
+<DT><CODE><cln/dfloat.h></CODE>
<DD>
Functions for class cl_DF, the double-floats.
-<DT><CODE><cl_lfloat.h></CODE>
+<DT><CODE><cln/lfloat.h></CODE>
<DD>
Functions for class cl_LF, the long-floats.
-<DT><CODE><cl_rational.h></CODE>
+<DT><CODE><cln/rational.h></CODE>
<DD>
Functions for class cl_RA, the rational numbers.
-<DT><CODE><cl_integer.h></CODE>
+<DT><CODE><cln/integer.h></CODE>
<DD>
Functions for class cl_I, the integers.
-<DT><CODE><cl_io.h></CODE>
+<DT><CODE><cln/io.h></CODE>
<DD>
Input/Output.
-<DT><CODE><cl_complex_io.h></CODE>
+<DT><CODE><cln/complex_io.h></CODE>
<DD>
Input/Output for class cl_N, the complex numbers.
-<DT><CODE><cl_real_io.h></CODE>
+<DT><CODE><cln/real_io.h></CODE>
<DD>
Input/Output for class cl_R, the real numbers.
-<DT><CODE><cl_float_io.h></CODE>
+<DT><CODE><cln/float_io.h></CODE>
<DD>
Input/Output for class cl_F, the floats.
-<DT><CODE><cl_sfloat_io.h></CODE>
+<DT><CODE><cln/sfloat_io.h></CODE>
<DD>
Input/Output for class cl_SF, the short-floats.
-<DT><CODE><cl_ffloat_io.h></CODE>
+<DT><CODE><cln/ffloat_io.h></CODE>
<DD>
Input/Output for class cl_FF, the single-floats.
-<DT><CODE><cl_dfloat_io.h></CODE>
+<DT><CODE><cln/dfloat_io.h></CODE>
<DD>
Input/Output for class cl_DF, the double-floats.
-<DT><CODE><cl_lfloat_io.h></CODE>
+<DT><CODE><cln/lfloat_io.h></CODE>
<DD>
Input/Output for class cl_LF, the long-floats.
-<DT><CODE><cl_rational_io.h></CODE>
+<DT><CODE><cln/rational_io.h></CODE>
<DD>
Input/Output for class cl_RA, the rational numbers.
-<DT><CODE><cl_integer_io.h></CODE>
+<DT><CODE><cln/integer_io.h></CODE>
<DD>
Input/Output for class cl_I, the integers.
-<DT><CODE><cl_input.h></CODE>
+<DT><CODE><cln/input.h></CODE>
<DD>
Flags for customizing input operations.
-<DT><CODE><cl_output.h></CODE>
+<DT><CODE><cln/output.h></CODE>
<DD>
Flags for customizing output operations.
-<DT><CODE><cl_malloc.h></CODE>
+<DT><CODE><cln/malloc.h></CODE>
<DD>
-<CODE>cl_malloc_hook</CODE>, <CODE>cl_free_hook</CODE>.
-<DT><CODE><cl_abort.h></CODE>
+<CODE>malloc_hook</CODE>, <CODE>free_hook</CODE>.
+<DT><CODE><cln/abort.h></CODE>
<DD>
<CODE>cl_abort</CODE>.
-<DT><CODE><cl_condition.h></CODE>
+<DT><CODE><cln/condition.h></CODE>
<DD>
Conditions/exceptions.
-<DT><CODE><cl_string.h></CODE>
+<DT><CODE><cln/string.h></CODE>
<DD>
Strings.
-<DT><CODE><cl_symbol.h></CODE>
+<DT><CODE><cln/symbol.h></CODE>
<DD>
Symbols.
-<DT><CODE><cl_proplist.h></CODE>
+<DT><CODE><cln/proplist.h></CODE>
<DD>
Property lists.
-<DT><CODE><cl_ring.h></CODE>
+<DT><CODE><cln/ring.h></CODE>
<DD>
General rings.
-<DT><CODE><cl_null_ring.h></CODE>
+<DT><CODE><cln/null_ring.h></CODE>
<DD>
The null ring.
-<DT><CODE><cl_complex_ring.h></CODE>
+<DT><CODE><cln/complex_ring.h></CODE>
<DD>
The ring of complex numbers.
-<DT><CODE><cl_real_ring.h></CODE>
+<DT><CODE><cln/real_ring.h></CODE>
<DD>
The ring of real numbers.
-<DT><CODE><cl_rational_ring.h></CODE>
+<DT><CODE><cln/rational_ring.h></CODE>
<DD>
The ring of rational numbers.
-<DT><CODE><cl_integer_ring.h></CODE>
+<DT><CODE><cln/integer_ring.h></CODE>
<DD>
The ring of integers.
-<DT><CODE><cl_numtheory.h></CODE>
+<DT><CODE><cln/numtheory.h></CODE>
<DD>
Number threory functions.
-<DT><CODE><cl_modinteger.h></CODE>
+<DT><CODE><cln/modinteger.h></CODE>
<DD>
Modular integers.
-<DT><CODE><cl_V.h></CODE>
+<DT><CODE><cln/V.h></CODE>
<DD>
Vectors.
-<DT><CODE><cl_GV.h></CODE>
+<DT><CODE><cln/GV.h></CODE>
<DD>
General vectors.
-<DT><CODE><cl_GV_number.h></CODE>
+<DT><CODE><cln/GV_number.h></CODE>
<DD>
General vectors over cl_number.
-<DT><CODE><cl_GV_complex.h></CODE>
+<DT><CODE><cln/GV_complex.h></CODE>
<DD>
General vectors over cl_N.
-<DT><CODE><cl_GV_real.h></CODE>
+<DT><CODE><cln/GV_real.h></CODE>
<DD>
General vectors over cl_R.
-<DT><CODE><cl_GV_rational.h></CODE>
+<DT><CODE><cln/GV_rational.h></CODE>
<DD>
General vectors over cl_RA.
-<DT><CODE><cl_GV_integer.h></CODE>
+<DT><CODE><cln/GV_integer.h></CODE>
<DD>
General vectors over cl_I.
-<DT><CODE><cl_GV_modinteger.h></CODE>
+<DT><CODE><cln/GV_modinteger.h></CODE>
<DD>
General vectors of modular integers.
-<DT><CODE><cl_SV.h></CODE>
+<DT><CODE><cln/SV.h></CODE>
<DD>
Simple vectors.
-<DT><CODE><cl_SV_number.h></CODE>
+<DT><CODE><cln/SV_number.h></CODE>
<DD>
Simple vectors over cl_number.
-<DT><CODE><cl_SV_complex.h></CODE>
+<DT><CODE><cln/SV_complex.h></CODE>
<DD>
Simple vectors over cl_N.
-<DT><CODE><cl_SV_real.h></CODE>
+<DT><CODE><cln/SV_real.h></CODE>
<DD>
Simple vectors over cl_R.
-<DT><CODE><cl_SV_rational.h></CODE>
+<DT><CODE><cln/SV_rational.h></CODE>
<DD>
Simple vectors over cl_RA.
-<DT><CODE><cl_SV_integer.h></CODE>
+<DT><CODE><cln/SV_integer.h></CODE>
<DD>
Simple vectors over cl_I.
-<DT><CODE><cl_SV_ringelt.h></CODE>
+<DT><CODE><cln/SV_ringelt.h></CODE>
<DD>
Simple vectors of general ring elements.
-<DT><CODE><cl_univpoly.h></CODE>
+<DT><CODE><cln/univpoly.h></CODE>
<DD>
Univariate polynomials.
-<DT><CODE><cl_univpoly_integer.h></CODE>
+<DT><CODE><cln/univpoly_integer.h></CODE>
<DD>
Univariate polynomials over the integers.
-<DT><CODE><cl_univpoly_rational.h></CODE>
+<DT><CODE><cln/univpoly_rational.h></CODE>
<DD>
Univariate polynomials over the rational numbers.
-<DT><CODE><cl_univpoly_real.h></CODE>
+<DT><CODE><cln/univpoly_real.h></CODE>
<DD>
Univariate polynomials over the real numbers.
-<DT><CODE><cl_univpoly_complex.h></CODE>
+<DT><CODE><cln/univpoly_complex.h></CODE>
<DD>
Univariate polynomials over the complex numbers.
-<DT><CODE><cl_univpoly_modint.h></CODE>
+<DT><CODE><cln/univpoly_modint.h></CODE>
<DD>
Univariate polynomials over modular integer rings.
-<DT><CODE><cl_timing.h></CODE>
+<DT><CODE><cln/timing.h></CODE>
<DD>
Timing facilities.
-<DT><CODE><cln.h></CODE>
+<DT><CODE><cln/cln.h></CODE>
<DD>
Includes all of the above.
</DL>
-<H2><A NAME="SEC67" HREF="cln_toc.html#TOC67">11.3 An Example</A></H2>
+<H2><A NAME="SEC68" HREF="cln_toc.html#TOC68">11.4 An Example</A></H2>
<P>
A function which computes the nth Fibonacci number can be written as follows.
-<A NAME="IDX323"></A>
+<A NAME="IDX338"></A>
<PRE>
-#include <cl_integer.h>
-#include <cl_real.h>
+#include <cln/integer.h>
+#include <cln/real.h>
+using namespace cln;
// Returns F_n, computed as the nearest integer to
// ((1+sqrt(5))/2)^n/sqrt(5). Assume n>=0.
<P>
-The include file <CODE><cl_integer.h></CODE> is necessary because the type
-<CODE>cl_I</CODE> is used in the function, and the include file <CODE><cl_real.h></CODE>
+The include file <CODE><cln/integer.h></CODE> is necessary because the type
+<CODE>cl_I</CODE> is used in the function, and the include file <CODE><cln/real.h></CODE>
is needed for the type <CODE>cl_R</CODE> and the floating point number functions.
-The order of the include files does not matter.
+The order of the include files does not matter. In order not to write out
+<CODE>cln::</CODE><VAR>foo</VAR> we can safely import the whole namespace <CODE>cln</CODE>.
<P>
-<H2><A NAME="SEC68" HREF="cln_toc.html#TOC68">11.4 Debugging support</A></H2>
+<H2><A NAME="SEC69" HREF="cln_toc.html#TOC69">11.5 Debugging support</A></H2>
<P>
-<A NAME="IDX324"></A>
+<A NAME="IDX339"></A>
<P>
for printing number objects. In order to get this function, you have
to define the macro <SAMP>`CL_DEBUG'</SAMP> and then include all the header files
for which you want <CODE>cl_print</CODE> debugging support. For example:
-<A NAME="IDX325"></A>
+<A NAME="IDX340"></A>
<PRE>
#define CL_DEBUG
-#include <cl_string.h>
+#include <cln/string.h>
</PRE>
Now, if you have in your program a variable <CODE>cl_string s</CODE>, and
<CODE>debug_print()</CODE> on all CLN types. The same macro <SAMP>`CL_DEBUG'</SAMP>
is needed for this member function to be implemented. Under <CODE>gdb</CODE>,
you call it like this:
-<A NAME="IDX326"></A>
+<A NAME="IDX341"></A>
<PRE>
(gdb) print s
<HTML>
<HEAD>
-<!-- Created by texi2html 1.56k from cln.texi on 2 June 2000 -->
+<!-- Created by texi2html 1.56k from cln.texi on 28 August 2000 -->
<TITLE>CLN, a Class Library for Numbers - 12. Customizing</TITLE>
</HEAD>
<P><HR><P>
-<H1><A NAME="SEC69" HREF="cln_toc.html#TOC69">12. Customizing</A></H1>
+<H1><A NAME="SEC70" HREF="cln_toc.html#TOC70">12. Customizing</A></H1>
<P>
-<A NAME="IDX327"></A>
+<A NAME="IDX342"></A>
-<H2><A NAME="SEC70" HREF="cln_toc.html#TOC70">12.1 Error handling</A></H2>
+<H2><A NAME="SEC71" HREF="cln_toc.html#TOC71">12.1 Error handling</A></H2>
<P>
When a fatal error occurs, an error message is output to the standard error
yourself, with the prototype
<PRE>
-#include <cl_abort.h>
+#include <cln/abort.h>
void cl_abort (void);
</PRE>
<P>
-<A NAME="IDX328"></A>
+<A NAME="IDX343"></A>
This function must not return control to its caller.
-<H2><A NAME="SEC71" HREF="cln_toc.html#TOC71">12.2 Floating-point underflow</A></H2>
+<H2><A NAME="SEC72" HREF="cln_toc.html#TOC72">12.2 Floating-point underflow</A></H2>
<P>
-<A NAME="IDX329"></A>
+<A NAME="IDX344"></A>
<P>
-<H2><A NAME="SEC72" HREF="cln_toc.html#TOC72">12.3 Customizing I/O</A></H2>
+<H2><A NAME="SEC73" HREF="cln_toc.html#TOC73">12.3 Customizing I/O</A></H2>
<P>
The output of the function <CODE>fprint</CODE> may be customized by changing the
-value of the global variable <CODE>cl_default_print_flags</CODE>.
-<A NAME="IDX330"></A>
+value of the global variable <CODE>default_print_flags</CODE>.
+<A NAME="IDX345"></A>
-<H2><A NAME="SEC73" HREF="cln_toc.html#TOC73">12.4 Customizing the memory allocator</A></H2>
+<H2><A NAME="SEC74" HREF="cln_toc.html#TOC74">12.4 Customizing the memory allocator</A></H2>
<P>
Every memory allocation of CLN is done through the function pointer
-<CODE>cl_malloc_hook</CODE>. Freeing of this memory is done through the function
-pointer <CODE>cl_free_hook</CODE>. The default versions of these functions,
+<CODE>malloc_hook</CODE>. Freeing of this memory is done through the function
+pointer <CODE>free_hook</CODE>. The default versions of these functions,
provided in the library, call <CODE>malloc</CODE> and <CODE>free</CODE> and check
the <CODE>malloc</CODE> result against <CODE>NULL</CODE>.
If you want to provide another memory allocator, you need to define
-the variables <CODE>cl_malloc_hook</CODE> and <CODE>cl_free_hook</CODE> yourself,
+the variables <CODE>malloc_hook</CODE> and <CODE>free_hook</CODE> yourself,
like this:
<PRE>
-#include <cl_malloc.h>
-void* (*cl_malloc_hook) (size_t size) = ...;
-void (*cl_free_hook) (void* ptr) = ...;
+#include <cln/malloc.h>
+namespace cln {
+ void* (*malloc_hook) (size_t size) = ...;
+ void (*free_hook) (void* ptr) = ...;
+}
</PRE>
<P>
-<A NAME="IDX331"></A>
-<A NAME="IDX332"></A>
+<A NAME="IDX346"></A>
+<A NAME="IDX347"></A>
The <CODE>cl_malloc_hook</CODE> function must not return a <CODE>NULL</CODE> pointer.
<HTML>
<HEAD>
-<!-- Created by texi2html 1.56k from cln.texi on 2 June 2000 -->
+<!-- Created by texi2html 1.56k from cln.texi on 28 August 2000 -->
<TITLE>CLN, a Class Library for Numbers - Index</TITLE>
</HEAD>
<P><HR><P>
-<H1><A NAME="SEC74" HREF="cln_toc.html#TOC74">Index</A></H1>
+<H1><A NAME="SEC75" HREF="cln_toc.html#TOC75">Index</A></H1>
<P>
Jump to:
<HTML>
<HEAD>
-<!-- Created by texi2html 1.56k from cln.texi on 2 June 2000 -->
+<!-- Created by texi2html 1.56k from cln.texi on 28 August 2000 -->
<TITLE>CLN, a Class Library for Numbers - 2. Installation</TITLE>
</HEAD>
<P>
To build CLN, you need a C++ compiler.
-Actually, you need GNU <CODE>g++ 2.7.0</CODE> or newer.
-On HPPA, you need GNU <CODE>g++ 2.8.0</CODE> or newer.
+Actually, you need GNU <CODE>g++ 2.90</CODE> or newer, the EGCS compilers will
+do.
I recommend GNU <CODE>g++ 2.95</CODE> or newer.
<P>
The following C++ features are used:
-classes, member functions,
-overloading of functions and operators,
-constructors and destructors, inline, const,
-multiple inheritance, templates.
+classes, member functions, overloading of functions and operators,
+constructors and destructors, inline, const, multiple inheritance,
+templates and namespaces.
<P>
The following C++ features are not used:
-<CODE>new</CODE>, <CODE>delete</CODE>, virtual inheritance,
-exceptions.
+<CODE>new</CODE>, <CODE>delete</CODE>, virtual inheritance, exceptions.
<P>
<H3><A NAME="SEC5" HREF="cln_toc.html#TOC5">2.1.2 Make utility</A></H3>
<P>
-<A NAME="IDX3"></A>
+<A NAME="IDX4"></A>
<P>
<H3><A NAME="SEC6" HREF="cln_toc.html#TOC6">2.1.3 Sed utility</A></H3>
<P>
-<A NAME="IDX4"></A>
+<A NAME="IDX5"></A>
<P>
<PRE>
$ CC="gcc" CFLAGS="-O" CXX="g++" CXXFLAGS="-O" ./configure
-$ CC="gcc -V 2.7.2" CFLAGS="-O -g" \
- CXX="g++ -V 2.7.2" CXXFLAGS="-O -g" ./configure
-$ CC="gcc -V 2.8.1" CFLAGS="-O -fno-exceptions" \
- CXX="g++ -V 2.8.1" CXXFLAGS="-O -fno-exceptions" ./configure
-$ CC="gcc -V egcs-2.91.60" CFLAGS="-O2 -fno-exceptions" \
- CXX="g++ -V egcs-2.91.60" CFLAGS="-O2 -fno-exceptions" ./configure
+$ CC="gcc -V egcs-2.91.60" CFLAGS="-O -g" \
+ CXX="g++ -V egcs-2.91.60" CXXFLAGS="-O -g" ./configure
+$ CC="gcc -V 2.95.2" CFLAGS="-O2 -fno-exceptions" \
+ CXX="g++ -V 2.95.2" CFLAGS="-O2 -fno-exceptions" ./configure
</PRE>
<P>
<P>
-On Linux, <CODE>g++</CODE> needs 15 MB to compile the tests. So you should better
-have 17 MB swap space and 1 MB room in $TMPDIR.
-
-
-<P>
-If you use <CODE>g++</CODE> version 2.7.x, don't add <SAMP>`-O2'</SAMP> to the CXXFLAGS,
-because <SAMP>`g++ -O'</SAMP> generates better code for CLN than <SAMP>`g++ -O2'</SAMP>.
+Currently CLN works only with the GNU <CODE>g++</CODE> compiler, and only in
+optimizing mode. So you should specify at least <CODE>-O</CODE> in the CXXFLAGS,
+or no CXXFLAGS at all. (If CXXFLAGS is not set, CLN will use <CODE>-O</CODE>.)
<P>
<H3><A NAME="SEC8" HREF="cln_toc.html#TOC8">2.2.1 Using the GNU MP Library</A></H3>
<P>
-<A NAME="IDX5"></A>
+<A NAME="IDX6"></A>
<P>
<H2><A NAME="SEC9" HREF="cln_toc.html#TOC9">2.3 Installing the library</A></H2>
<P>
-<A NAME="IDX6"></A>
+<A NAME="IDX7"></A>
<P>
<HTML>
<HEAD>
-<!-- Created by texi2html 1.56k from cln.texi on 2 June 2000 -->
+<!-- Created by texi2html 1.56k from cln.texi on 28 August 2000 -->
<TITLE>CLN, a Class Library for Numbers - 3. Ordinary number types</TITLE>
</HEAD>
<PRE>
Number
- cl_number
- <cl_number.h>
+ cl_number
+ <cln/number.h>
|
|
Real or complex number
cl_N
- <cl_complex.h>
+ <cln/complex.h>
|
|
Real number
cl_R
- <cl_real.h>
+ <cln/real.h>
|
+-------------------+-------------------+
| |
Rational number Floating-point number
cl_RA cl_F
-<cl_rational.h> <cl_float.h>
+<cln/rational.h> <cln/float.h>
| |
- | +-------------+-------------+-------------+
- Integer | | | |
- cl_I Short-Float Single-Float Double-Float Long-Float
- <cl_integer.h> cl_SF cl_FF cl_DF cl_LF
- <cl_sfloat.h> <cl_ffloat.h> <cl_dfloat.h> <cl_lfloat.h>
+ | +--------------+--------------+--------------+
+ Integer | | | |
+ cl_I Short-Float Single-Float Double-Float Long-Float
+<cln/integer.h> cl_SF cl_FF cl_DF cl_LF
+ <cln/sfloat.h> <cln/ffloat.h> <cln/dfloat.h> <cln/lfloat.h>
</PRE>
<P>
-<A NAME="IDX7"></A>
<A NAME="IDX8"></A>
+<A NAME="IDX9"></A>
The base class <CODE>cl_number</CODE> is an abstract base class.
It is not useful to declare a variable of this type except if you want
to completely disable compile-time type checking and use run-time type
<P>
-<A NAME="IDX9"></A>
<A NAME="IDX10"></A>
<A NAME="IDX11"></A>
+<A NAME="IDX12"></A>
The class <CODE>cl_N</CODE> comprises real and complex numbers. There is
no special class for complex numbers since complex numbers with imaginary
part <CODE>0</CODE> are automatically converted to real numbers.
<P>
-<A NAME="IDX12"></A>
+<A NAME="IDX13"></A>
The class <CODE>cl_R</CODE> comprises real numbers of different kinds. It is an
abstract class.
<P>
-<A NAME="IDX13"></A>
<A NAME="IDX14"></A>
<A NAME="IDX15"></A>
+<A NAME="IDX16"></A>
The class <CODE>cl_RA</CODE> comprises exact real numbers: rational numbers, including
integers. There is no special class for non-integral rational numbers
since rational numbers with denominator <CODE>1</CODE> are automatically converted
<P>
-<A NAME="IDX16"></A>
+<A NAME="IDX17"></A>
The class <CODE>cl_F</CODE> implements floating-point approximations to real numbers.
It is an abstract class.
<H2><A NAME="SEC12" HREF="cln_toc.html#TOC12">3.1 Exact numbers</A></H2>
<P>
-<A NAME="IDX17"></A>
+<A NAME="IDX18"></A>
<P>
<H2><A NAME="SEC13" HREF="cln_toc.html#TOC13">3.2 Floating-point numbers</A></H2>
<P>
-<A NAME="IDX18"></A>
+<A NAME="IDX19"></A>
<P>
<P>
-<A NAME="IDX19"></A>
+<A NAME="IDX20"></A>
The elementary operations (<CODE>+</CODE>, <CODE>-</CODE>, <CODE>*</CODE>, <CODE>/</CODE>, ...)
only return approximate results. For example, the value of the expression
<CODE>(cl_F) 0.3 + (cl_F) 0.4</CODE> prints as <SAMP>`0.70000005'</SAMP>, not as
<UL>
<LI>
-<A NAME="IDX20"></A>
+<A NAME="IDX21"></A>
Short floats, type <CODE>cl_SF</CODE>.
They have 1 sign bit, 8 exponent bits (including the exponent's sign),
and 17 mantissa bits (including the "hidden" bit).
<LI>
-<A NAME="IDX21"></A>
+<A NAME="IDX22"></A>
Single floats, type <CODE>cl_FF</CODE>.
They have 1 sign bit, 8 exponent bits (including the exponent's sign),
and 24 mantissa bits (including the "hidden" bit).
<LI>
-<A NAME="IDX22"></A>
+<A NAME="IDX23"></A>
Double floats, type <CODE>cl_DF</CODE>.
They have 1 sign bit, 11 exponent bits (including the exponent's sign),
and 53 mantissa bits (including the "hidden" bit).
<LI>
-<A NAME="IDX23"></A>
+<A NAME="IDX24"></A>
Long floats, type <CODE>cl_LF</CODE>.
They have 1 sign bit, 32 exponent bits (including the exponent's sign),
and n mantissa bits (including the "hidden" bit), where n >= 64.
<P>
-<A NAME="IDX24"></A>
+<A NAME="IDX25"></A>
As a user of CLN, you can forget about the differences between the
four floating-point types and just declare all your floating-point
variables as being of type <CODE>cl_F</CODE>. This has the advantage that
<H2><A NAME="SEC14" HREF="cln_toc.html#TOC14">3.3 Complex numbers</A></H2>
<P>
-<A NAME="IDX25"></A>
+<A NAME="IDX26"></A>
<P>
<H2><A NAME="SEC15" HREF="cln_toc.html#TOC15">3.4 Conversions</A></H2>
<P>
-<A NAME="IDX26"></A>
+<A NAME="IDX27"></A>
<P>
<CODE>cl_R</CODE>, <CODE>cl_N</CODE>.
The easiest way to specify a value which is outside of the range of the
C++ built-in types is therefore to specify it as a string, like this:
-<A NAME="IDX27"></A>
+<A NAME="IDX28"></A>
<PRE>
cl_I order_of_rubiks_cube_group = "43252003274489856000";
<DT><CODE>int cl_I_to_int (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX28"></A>
+<A NAME="IDX29"></A>
<DT><CODE>unsigned int cl_I_to_uint (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX29"></A>
+<A NAME="IDX30"></A>
<DT><CODE>long cl_I_to_long (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX30"></A>
+<A NAME="IDX31"></A>
<DT><CODE>unsigned long cl_I_to_ulong (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX31"></A>
+<A NAME="IDX32"></A>
Returns <CODE>x</CODE> as element of the C type <VAR>ctype</VAR>. If <CODE>x</CODE> is not
representable in the range of <VAR>ctype</VAR>, a runtime error occurs.
</DL>
<DL COMPACT>
-<DT><CODE>float cl_float_approx (const <VAR>type</VAR>& x)</CODE>
-<DD>
-<A NAME="IDX32"></A>
-<DT><CODE>double cl_double_approx (const <VAR>type</VAR>& x)</CODE>
+<DT><CODE>float float_approx (const <VAR>type</VAR>& x)</CODE>
<DD>
<A NAME="IDX33"></A>
+<DT><CODE>double double_approx (const <VAR>type</VAR>& x)</CODE>
+<DD>
+<A NAME="IDX34"></A>
Returns an approximation of <CODE>x</CODE> of C type <VAR>ctype</VAR>.
If <CODE>abs(x)</CODE> is too close to 0 (underflow), 0 is returned.
If <CODE>abs(x)</CODE> is too large (overflow), an IEEE infinity is returned.
C++ terminology) are not provided. Instead, you can assert and check
that a value belongs to a certain subclass, and return it as element of that
class, using the <SAMP>`As'</SAMP> and <SAMP>`The'</SAMP> macros.
-<A NAME="IDX34"></A>
+<A NAME="IDX35"></A>
<CODE>As(<VAR>type</VAR>)(<VAR>value</VAR>)</CODE> checks that <VAR>value</VAR> belongs to
<VAR>type</VAR> and returns it as such.
-<A NAME="IDX35"></A>
+<A NAME="IDX36"></A>
<CODE>The(<VAR>type</VAR>)(<VAR>value</VAR>)</CODE> assumes that <VAR>value</VAR> belongs to
<VAR>type</VAR> and returns it as such. It is your responsibility to ensure
that this assumption is valid.
<HTML>
<HEAD>
-<!-- Created by texi2html 1.56k from cln.texi on 2 June 2000 -->
+<!-- Created by texi2html 1.56k from cln.texi on 28 August 2000 -->
<TITLE>CLN, a Class Library for Numbers - 4. Functions on numbers</TITLE>
</HEAD>
<P>
Each of the number classes declares its mathematical operations in the
corresponding include file. For example, if your code operates with
-objects of type <CODE>cl_I</CODE>, it should <CODE>#include <cl_integer.h></CODE>.
+objects of type <CODE>cl_I</CODE>, it should <CODE>#include <cln/integer.h></CODE>.
<DT><CODE><VAR>type</VAR> operator + (const <VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX36"></A>
+<A NAME="IDX37"></A>
Addition.
<DT><CODE><VAR>type</VAR> operator - (const <VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX37"></A>
+<A NAME="IDX38"></A>
Subtraction.
<DT><CODE><VAR>type</VAR> operator - (const <VAR>type</VAR>&)</CODE>
<DT><CODE><VAR>type</VAR> plus1 (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX38"></A>
+<A NAME="IDX39"></A>
Returns <CODE>x + 1</CODE>.
<DT><CODE><VAR>type</VAR> minus1 (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX39"></A>
+<A NAME="IDX40"></A>
Returns <CODE>x - 1</CODE>.
<DT><CODE><VAR>type</VAR> operator * (const <VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX40"></A>
+<A NAME="IDX41"></A>
Multiplication.
<DT><CODE><VAR>type</VAR> square (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX41"></A>
+<A NAME="IDX42"></A>
Returns <CODE>x * x</CODE>.
</DL>
<DT><CODE><VAR>type</VAR> operator / (const <VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX42"></A>
+<A NAME="IDX43"></A>
Division.
<DT><CODE><VAR>type</VAR> recip (const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX43"></A>
+<A NAME="IDX44"></A>
Returns the reciprocal of the argument.
</DL>
<DT><CODE>cl_I exquo (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX44"></A>
+<A NAME="IDX45"></A>
Checks that <CODE>y</CODE> divides <CODE>x</CODE>, and returns the quotient <CODE>x</CODE>/<CODE>y</CODE>.
</DL>
<DT><CODE>cl_I expt_pos (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX45"></A>
+<A NAME="IDX46"></A>
<DT><CODE>cl_RA expt_pos (const cl_RA& x, const cl_I& y)</CODE>
<DD>
<CODE>y</CODE> must be > 0. Returns <CODE>x^y</CODE>.
<DT><CODE>cl_RA expt (const cl_RA& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX46"></A>
+<A NAME="IDX47"></A>
<DT><CODE>cl_R expt (const cl_R& x, const cl_I& y)</CODE>
<DD>
<DT><CODE>cl_N expt (const cl_N& x, const cl_I& y)</CODE>
<DT><CODE><VAR>type</VAR> abs (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX47"></A>
+<A NAME="IDX48"></A>
Returns the absolute value of <CODE>x</CODE>.
This is <CODE>x</CODE> if <CODE>x >= 0</CODE>, and <CODE>-x</CODE> if <CODE>x <= 0</CODE>.
</DL>
<DT><CODE><VAR>type</VAR> signum (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX48"></A>
+<A NAME="IDX49"></A>
Returns the sign of <CODE>x</CODE>, in the same number format as <CODE>x</CODE>.
This is defined as <CODE>x / abs(x)</CODE> if <CODE>x</CODE> is non-zero, and
<CODE>x</CODE> if <CODE>x</CODE> is zero. If <CODE>x</CODE> is real, the value is either
<DT><CODE>cl_I numerator (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX49"></A>
+<A NAME="IDX50"></A>
Returns the numerator of <CODE>x</CODE>.
<DT><CODE>cl_I denominator (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX50"></A>
+<A NAME="IDX51"></A>
Returns the denominator of <CODE>x</CODE>.
</DL>
<DT><CODE>cl_N complex (const cl_R& a, const cl_R& b)</CODE>
<DD>
-<A NAME="IDX51"></A>
+<A NAME="IDX52"></A>
Returns the complex number <CODE>a+bi</CODE>, that is, the complex number with
real part <CODE>a</CODE> and imaginary part <CODE>b</CODE>.
</DL>
<DT><CODE>cl_R realpart (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX52"></A>
+<A NAME="IDX53"></A>
Returns the real part of <CODE>x</CODE>.
<DT><CODE>cl_R imagpart (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX53"></A>
+<A NAME="IDX54"></A>
Returns the imaginary part of <CODE>x</CODE>.
<DT><CODE><VAR>type</VAR> conjugate (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX54"></A>
+<A NAME="IDX55"></A>
Returns the complex conjugate of <CODE>x</CODE>.
</DL>
<H2><A NAME="SEC25" HREF="cln_toc.html#TOC25">4.5 Comparisons</A></H2>
<P>
-<A NAME="IDX55"></A>
+<A NAME="IDX56"></A>
<P>
<DT><CODE>bool operator == (const <VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX56"></A>
+<A NAME="IDX57"></A>
<DT><CODE>bool operator != (const <VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX57"></A>
+<A NAME="IDX58"></A>
Comparison, as in C and C++.
-<DT><CODE>uint32 cl_equal_hashcode (const <VAR>type</VAR>&)</CODE>
+<DT><CODE>uint32 equal_hashcode (const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX58"></A>
+<A NAME="IDX59"></A>
Returns a 32-bit hash code that is the same for any two numbers which are
the same according to <CODE>==</CODE>. This hash code depends on the number's value,
not its type or precision.
<DT><CODE>cl_boolean zerop (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX59"></A>
+<A NAME="IDX60"></A>
Compare against zero: <CODE>x == 0</CODE>
</DL>
<DL COMPACT>
-<DT><CODE>cl_signean cl_compare (const <VAR>type</VAR>& x, const <VAR>type</VAR>& y)</CODE>
+<DT><CODE>cl_signean compare (const <VAR>type</VAR>& x, const <VAR>type</VAR>& y)</CODE>
<DD>
-<A NAME="IDX60"></A>
+<A NAME="IDX61"></A>
Compares <CODE>x</CODE> and <CODE>y</CODE>. Returns +1 if <CODE>x</CODE>><CODE>y</CODE>,
-1 if <CODE>x</CODE><<CODE>y</CODE>, 0 if <CODE>x</CODE>=<CODE>y</CODE>.
<DT><CODE>bool operator <= (const <VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX61"></A>
+<A NAME="IDX62"></A>
<DT><CODE>bool operator < (const <VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX62"></A>
+<A NAME="IDX63"></A>
<DT><CODE>bool operator >= (const <VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX63"></A>
+<A NAME="IDX64"></A>
<DT><CODE>bool operator > (const <VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX64"></A>
+<A NAME="IDX65"></A>
Comparison, as in C and C++.
<DT><CODE>cl_boolean minusp (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX65"></A>
+<A NAME="IDX66"></A>
Compare against zero: <CODE>x < 0</CODE>
<DT><CODE>cl_boolean plusp (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX66"></A>
+<A NAME="IDX67"></A>
Compare against zero: <CODE>x > 0</CODE>
<DT><CODE><VAR>type</VAR> max (const <VAR>type</VAR>& x, const <VAR>type</VAR>& y)</CODE>
<DD>
-<A NAME="IDX67"></A>
+<A NAME="IDX68"></A>
Return the maximum of <CODE>x</CODE> and <CODE>y</CODE>.
<DT><CODE><VAR>type</VAR> min (const <VAR>type</VAR>& x, const <VAR>type</VAR>& y)</CODE>
<DD>
-<A NAME="IDX68"></A>
+<A NAME="IDX69"></A>
Return the minimum of <CODE>x</CODE> and <CODE>y</CODE>.
</DL>
<H2><A NAME="SEC26" HREF="cln_toc.html#TOC26">4.6 Rounding functions</A></H2>
<P>
-<A NAME="IDX69"></A>
+<A NAME="IDX70"></A>
<P>
<DT><CODE>cl_I floor1 (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX70"></A>
+<A NAME="IDX71"></A>
Returns <CODE>floor(x)</CODE>.
<DT><CODE>cl_I ceiling1 (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX71"></A>
+<A NAME="IDX72"></A>
Returns <CODE>ceiling(x)</CODE>.
<DT><CODE>cl_I truncate1 (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX72"></A>
+<A NAME="IDX73"></A>
Returns <CODE>truncate(x)</CODE>.
<DT><CODE>cl_I round1 (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX73"></A>
+<A NAME="IDX74"></A>
Returns <CODE>round(x)</CODE>.
</DL>
<DD>
<DT><CODE><VAR>type</VAR>_div_t floor2 (const <VAR>type</VAR>& x, const <VAR>type</VAR>& y)</CODE>
<DD>
-<A NAME="IDX74"></A>
+<A NAME="IDX75"></A>
<DT><CODE><VAR>type</VAR>_div_t ceiling2 (const <VAR>type</VAR>& x, const <VAR>type</VAR>& y)</CODE>
<DD>
-<A NAME="IDX75"></A>
+<A NAME="IDX76"></A>
<DT><CODE><VAR>type</VAR>_div_t truncate2 (const <VAR>type</VAR>& x, const <VAR>type</VAR>& y)</CODE>
<DD>
-<A NAME="IDX76"></A>
+<A NAME="IDX77"></A>
<DT><CODE><VAR>type</VAR>_div_t round2 (const <VAR>type</VAR>& x, const <VAR>type</VAR>& y)</CODE>
<DD>
-<A NAME="IDX77"></A>
+<A NAME="IDX78"></A>
</DL>
<P>
<DT><CODE><VAR>type</VAR> ffloor (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX78"></A>
+<A NAME="IDX79"></A>
<DT><CODE><VAR>type</VAR> fceiling (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX79"></A>
+<A NAME="IDX80"></A>
<DT><CODE><VAR>type</VAR> ftruncate (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX80"></A>
+<A NAME="IDX81"></A>
<DT><CODE><VAR>type</VAR> fround (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX81"></A>
+<A NAME="IDX82"></A>
</DL>
<P>
Each of the classes
<CODE>cl_F</CODE>, <CODE>cl_SF</CODE>, <CODE>cl_FF</CODE>, <CODE>cl_DF</CODE>, <CODE>cl_LF</CODE>
defines the following operations:
-<A NAME="IDX82"></A>
<A NAME="IDX83"></A>
<A NAME="IDX84"></A>
<A NAME="IDX85"></A>
<A NAME="IDX86"></A>
+<A NAME="IDX87"></A>
<DL COMPACT>
<DD>
<DT><CODE><VAR>type</VAR>_fdiv_t ffloor2 (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX87"></A>
+<A NAME="IDX88"></A>
<DT><CODE><VAR>type</VAR>_fdiv_t fceiling2 (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX88"></A>
+<A NAME="IDX89"></A>
<DT><CODE><VAR>type</VAR>_fdiv_t ftruncate2 (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX89"></A>
+<A NAME="IDX90"></A>
<DT><CODE><VAR>type</VAR>_fdiv_t fround2 (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX90"></A>
+<A NAME="IDX91"></A>
</DL>
<P>
and similarly for class <CODE>cl_R</CODE>, but with quotient type <CODE>cl_F</CODE>.
-<A NAME="IDX91"></A>
+<A NAME="IDX92"></A>
<P>
<DT><CODE><VAR>type</VAR> mod (const <VAR>type</VAR>& x, const <VAR>type</VAR>& y)</CODE>
<DD>
-<A NAME="IDX92"></A>
+<A NAME="IDX93"></A>
<DT><CODE><VAR>type</VAR> rem (const <VAR>type</VAR>& x, const <VAR>type</VAR>& y)</CODE>
<DD>
-<A NAME="IDX93"></A>
+<A NAME="IDX94"></A>
</DL>
<DT><CODE><VAR>type</VAR> sqrt (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX94"></A>
+<A NAME="IDX95"></A>
<CODE>x</CODE> must be >= 0. This function returns the square root of <CODE>x</CODE>,
normalized to be >= 0. If <CODE>x</CODE> is the square of a rational number,
<CODE>sqrt(x)</CODE> will be a rational number, else it will return a
<DT><CODE>cl_boolean sqrtp (const <VAR>type</VAR>& x, <VAR>type</VAR>* root)</CODE>
<DD>
-<A NAME="IDX95"></A>
+<A NAME="IDX96"></A>
This tests whether <CODE>x</CODE> is a perfect square. If so, it returns true
and the exact square root in <CODE>*root</CODE>, else it returns false.
</DL>
<DT><CODE>cl_boolean isqrt (const <VAR>type</VAR>& x, <VAR>type</VAR>* root)</CODE>
<DD>
-<A NAME="IDX96"></A>
+<A NAME="IDX97"></A>
<CODE>x</CODE> should be >= 0. This function sets <CODE>*root</CODE> to
<CODE>floor(sqrt(x))</CODE> and returns the same value as <CODE>sqrtp</CODE>:
the boolean value <CODE>(expt(*root,2) == x)</CODE>.
<DT><CODE>cl_boolean rootp (const <VAR>type</VAR>& x, const cl_I& n, <VAR>type</VAR>* root)</CODE>
<DD>
-<A NAME="IDX97"></A>
+<A NAME="IDX98"></A>
<CODE>x</CODE> must be >= 0. <CODE>n</CODE> must be > 0.
This tests whether <CODE>x</CODE> is an <CODE>n</CODE>th power of a rational number.
If so, it returns true and the exact root in <CODE>*root</CODE>, else it returns
<DT><CODE>cl_N sqrt (const cl_N& z)</CODE>
<DD>
-<A NAME="IDX98"></A>
+<A NAME="IDX99"></A>
Returns the square root of <CODE>z</CODE>, as defined by the formula
<CODE>sqrt(z) = exp(log(z)/2)</CODE>. Conversion to a floating-point type
or to a complex number are done if necessary. The range of the result is the
<H2><A NAME="SEC28" HREF="cln_toc.html#TOC28">4.8 Transcendental functions</A></H2>
<P>
-<A NAME="IDX99"></A>
+<A NAME="IDX100"></A>
<P>
<DT><CODE>cl_R exp (const cl_R& x)</CODE>
<DD>
-<A NAME="IDX100"></A>
+<A NAME="IDX101"></A>
<DT><CODE>cl_N exp (const cl_N& x)</CODE>
<DD>
Returns the exponential function of <CODE>x</CODE>. This is <CODE>e^x</CODE> where
<DT><CODE>cl_R ln (const cl_R& x)</CODE>
<DD>
-<A NAME="IDX101"></A>
+<A NAME="IDX102"></A>
<CODE>x</CODE> must be > 0. Returns the (natural) logarithm of x.
<DT><CODE>cl_N log (const cl_N& x)</CODE>
<DD>
-<A NAME="IDX102"></A>
+<A NAME="IDX103"></A>
Returns the (natural) logarithm of x. If <CODE>x</CODE> is real and positive,
this is <CODE>ln(x)</CODE>. In general, <CODE>log(x) = log(abs(x)) + i*phase(x)</CODE>.
The range of the result is the strip in the complex plane
<DT><CODE>cl_R phase (const cl_N& x)</CODE>
<DD>
-<A NAME="IDX103"></A>
+<A NAME="IDX104"></A>
Returns the angle part of <CODE>x</CODE> in its polar representation as a
complex number. That is, <CODE>phase(x) = atan(realpart(x),imagpart(x))</CODE>.
This is also the imaginary part of <CODE>log(x)</CODE>.
<DT><CODE>cl_N expt (const cl_N& x, const cl_N& y)</CODE>
<DD>
-<A NAME="IDX104"></A>
+<A NAME="IDX105"></A>
Exponentiation: Returns <CODE>x^y = exp(y*log(x))</CODE>.
</DL>
<DL COMPACT>
-<DT><CODE>cl_F cl_exp1 (cl_float_format_t f)</CODE>
+<DT><CODE>cl_F exp1 (cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX105"></A>
+<A NAME="IDX106"></A>
Returns e as a float of format <CODE>f</CODE>.
-<DT><CODE>cl_F cl_exp1 (const cl_F& y)</CODE>
+<DT><CODE>cl_F exp1 (const cl_F& y)</CODE>
<DD>
Returns e in the float format of <CODE>y</CODE>.
-<DT><CODE>cl_F cl_exp1 (void)</CODE>
+<DT><CODE>cl_F exp1 (void)</CODE>
<DD>
-Returns e as a float of format <CODE>cl_default_float_format</CODE>.
+Returns e as a float of format <CODE>default_float_format</CODE>.
</DL>
<DT><CODE>cl_R sin (const cl_R& x)</CODE>
<DD>
-<A NAME="IDX106"></A>
+<A NAME="IDX107"></A>
Returns <CODE>sin(x)</CODE>. The range of the result is the interval
<CODE>-1 <= sin(x) <= 1</CODE>.
<DT><CODE>cl_R cos (const cl_R& x)</CODE>
<DD>
-<A NAME="IDX107"></A>
+<A NAME="IDX108"></A>
Returns <CODE>cos(x)</CODE>. The range of the result is the interval
<CODE>-1 <= cos(x) <= 1</CODE>.
<DD>
Returns <CODE>cos(z)</CODE>. The range of the result is the entire complex plane.
-<DT><CODE>struct cl_cos_sin_t { cl_R cos; cl_R sin; };</CODE>
+<DT><CODE>struct cos_sin_t { cl_R cos; cl_R sin; };</CODE>
<DD>
-<A NAME="IDX108"></A>
-<DT><CODE>cl_cos_sin_t cl_cos_sin (const cl_R& x)</CODE>
+<A NAME="IDX109"></A>
+<DT><CODE>cos_sin_t cos_sin (const cl_R& x)</CODE>
<DD>
Returns both <CODE>sin(x)</CODE> and <CODE>cos(x)</CODE>. This is more efficient than
-<A NAME="IDX109"></A>
+<A NAME="IDX110"></A>
computing them separately. The relation <CODE>cos^2 + sin^2 = 1</CODE> will
hold only approximately.
<DT><CODE>cl_R tan (const cl_R& x)</CODE>
<DD>
-<A NAME="IDX110"></A>
+<A NAME="IDX111"></A>
<DT><CODE>cl_N tan (const cl_N& x)</CODE>
<DD>
Returns <CODE>tan(x) = sin(x)/cos(x)</CODE>.
<DT><CODE>cl_N cis (const cl_R& x)</CODE>
<DD>
-<A NAME="IDX111"></A>
+<A NAME="IDX112"></A>
<DT><CODE>cl_N cis (const cl_N& x)</CODE>
<DD>
Returns <CODE>exp(i*x)</CODE>. The name <SAMP>`cis'</SAMP> means "cos + i sin", because
<CODE>e^(i*x) = cos(x) + i*sin(x)</CODE>.
-<A NAME="IDX112"></A>
<A NAME="IDX113"></A>
+<A NAME="IDX114"></A>
<DT><CODE>cl_N asin (const cl_N& z)</CODE>
<DD>
Returns <CODE>arcsin(z)</CODE>. This is defined as
<DT><CODE>cl_N acos (const cl_N& z)</CODE>
<DD>
-<A NAME="IDX114"></A>
+<A NAME="IDX115"></A>
Returns <CODE>arccos(z)</CODE>. This is defined as
<CODE>arccos(z) = pi/2 - arcsin(z) = log(z+i*sqrt(1-z^2))/i</CODE>
and satisfies <CODE>arccos(-z) = pi - arccos(z)</CODE>.
with <CODE>realpart = 0</CODE> and <CODE>imagpart < 0</CODE> and the numbers
with <CODE>realpart = pi</CODE> and <CODE>imagpart > 0</CODE>.
-<A NAME="IDX115"></A>
<A NAME="IDX116"></A>
+<A NAME="IDX117"></A>
<DT><CODE>cl_R atan (const cl_R& x, const cl_R& y)</CODE>
<DD>
Returns the angle of the polar representation of the complex number
</DL>
<P>
-<A NAME="IDX117"></A>
<A NAME="IDX118"></A>
+<A NAME="IDX119"></A>
Archimedes' constant pi = 3.14... is returned by the following functions:
<DL COMPACT>
-<DT><CODE>cl_F cl_pi (cl_float_format_t f)</CODE>
+<DT><CODE>cl_F pi (cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX119"></A>
+<A NAME="IDX120"></A>
Returns pi as a float of format <CODE>f</CODE>.
-<DT><CODE>cl_F cl_pi (const cl_F& y)</CODE>
+<DT><CODE>cl_F pi (const cl_F& y)</CODE>
<DD>
Returns pi in the float format of <CODE>y</CODE>.
-<DT><CODE>cl_F cl_pi (void)</CODE>
+<DT><CODE>cl_F pi (void)</CODE>
<DD>
-Returns pi as a float of format <CODE>cl_default_float_format</CODE>.
+Returns pi as a float of format <CODE>default_float_format</CODE>.
</DL>
<DT><CODE>cl_R sinh (const cl_R& x)</CODE>
<DD>
-<A NAME="IDX120"></A>
+<A NAME="IDX121"></A>
Returns <CODE>sinh(x)</CODE>.
<DT><CODE>cl_N sinh (const cl_N& z)</CODE>
<DT><CODE>cl_R cosh (const cl_R& x)</CODE>
<DD>
-<A NAME="IDX121"></A>
+<A NAME="IDX122"></A>
Returns <CODE>cosh(x)</CODE>. The range of the result is the interval
<CODE>cosh(x) >= 1</CODE>.
<DD>
Returns <CODE>cosh(z)</CODE>. The range of the result is the entire complex plane.
-<DT><CODE>struct cl_cosh_sinh_t { cl_R cosh; cl_R sinh; };</CODE>
-<DD>
-<A NAME="IDX122"></A>
-<DT><CODE>cl_cosh_sinh_t cl_cosh_sinh (const cl_R& x)</CODE>
+<DT><CODE>struct cosh_sinh_t { cl_R cosh; cl_R sinh; };</CODE>
<DD>
<A NAME="IDX123"></A>
+<DT><CODE>cosh_sinh_t cosh_sinh (const cl_R& x)</CODE>
+<DD>
+<A NAME="IDX124"></A>
Returns both <CODE>sinh(x)</CODE> and <CODE>cosh(x)</CODE>. This is more efficient than
computing them separately. The relation <CODE>cosh^2 - sinh^2 = 1</CODE> will
hold only approximately.
<DT><CODE>cl_R tanh (const cl_R& x)</CODE>
<DD>
-<A NAME="IDX124"></A>
+<A NAME="IDX125"></A>
<DT><CODE>cl_N tanh (const cl_N& x)</CODE>
<DD>
Returns <CODE>tanh(x) = sinh(x)/cosh(x)</CODE>.
<DT><CODE>cl_N asinh (const cl_N& z)</CODE>
<DD>
-<A NAME="IDX125"></A>
+<A NAME="IDX126"></A>
Returns <CODE>arsinh(z)</CODE>. This is defined as
<CODE>arsinh(z) = log(z+sqrt(1+z^2))</CODE> and satisfies
<CODE>arsinh(-z) = -arsinh(z)</CODE>.
<DT><CODE>cl_N acosh (const cl_N& z)</CODE>
<DD>
-<A NAME="IDX126"></A>
+<A NAME="IDX127"></A>
Returns <CODE>arcosh(z)</CODE>. This is defined as
<CODE>arcosh(z) = 2*log(sqrt((z+1)/2)+sqrt((z-1)/2))</CODE>.
The range of the result is the half-strip in the complex domain
<DT><CODE>cl_N atanh (const cl_N& z)</CODE>
<DD>
-<A NAME="IDX127"></A>
+<A NAME="IDX128"></A>
Returns <CODE>artanh(z)</CODE>. This is defined as
<CODE>artanh(z) = (log(1+z)-log(1-z)) / 2</CODE> and satisfies
<CODE>artanh(-z) = -artanh(z)</CODE>. The range of the result is
<H3><A NAME="SEC32" HREF="cln_toc.html#TOC32">4.8.4 Euler gamma</A></H3>
<P>
-<A NAME="IDX128"></A>
+<A NAME="IDX129"></A>
<P>
<DL COMPACT>
-<DT><CODE>cl_F cl_eulerconst (cl_float_format_t f)</CODE>
+<DT><CODE>cl_F eulerconst (cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX129"></A>
+<A NAME="IDX130"></A>
Returns Euler's constant as a float of format <CODE>f</CODE>.
-<DT><CODE>cl_F cl_eulerconst (const cl_F& y)</CODE>
+<DT><CODE>cl_F eulerconst (const cl_F& y)</CODE>
<DD>
Returns Euler's constant in the float format of <CODE>y</CODE>.
-<DT><CODE>cl_F cl_eulerconst (void)</CODE>
+<DT><CODE>cl_F eulerconst (void)</CODE>
<DD>
-Returns Euler's constant as a float of format <CODE>cl_default_float_format</CODE>.
+Returns Euler's constant as a float of format <CODE>default_float_format</CODE>.
</DL>
<P>
Catalan's constant G = 0.915... is returned by the following functions:
-<A NAME="IDX130"></A>
+<A NAME="IDX131"></A>
<DL COMPACT>
-<DT><CODE>cl_F cl_catalanconst (cl_float_format_t f)</CODE>
+<DT><CODE>cl_F catalanconst (cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX131"></A>
+<A NAME="IDX132"></A>
Returns Catalan's constant as a float of format <CODE>f</CODE>.
-<DT><CODE>cl_F cl_catalanconst (const cl_F& y)</CODE>
+<DT><CODE>cl_F catalanconst (const cl_F& y)</CODE>
<DD>
Returns Catalan's constant in the float format of <CODE>y</CODE>.
-<DT><CODE>cl_F cl_catalanconst (void)</CODE>
+<DT><CODE>cl_F catalanconst (void)</CODE>
<DD>
-Returns Catalan's constant as a float of format <CODE>cl_default_float_format</CODE>.
+Returns Catalan's constant as a float of format <CODE>default_float_format</CODE>.
</DL>
<H3><A NAME="SEC33" HREF="cln_toc.html#TOC33">4.8.5 Riemann zeta</A></H3>
<P>
-<A NAME="IDX132"></A>
+<A NAME="IDX133"></A>
<P>
<DL COMPACT>
-<DT><CODE>cl_F cl_zeta (int s, cl_float_format_t f)</CODE>
+<DT><CODE>cl_F zeta (int s, cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX133"></A>
+<A NAME="IDX134"></A>
Returns Riemann's zeta function at <CODE>s</CODE> as a float of format <CODE>f</CODE>.
-<DT><CODE>cl_F cl_zeta (int s, const cl_F& y)</CODE>
+<DT><CODE>cl_F zeta (int s, const cl_F& y)</CODE>
<DD>
Returns Riemann's zeta function at <CODE>s</CODE> in the float format of <CODE>y</CODE>.
-<DT><CODE>cl_F cl_zeta (int s)</CODE>
+<DT><CODE>cl_F zeta (int s)</CODE>
<DD>
Returns Riemann's zeta function at <CODE>s</CODE> as a float of format
-<CODE>cl_default_float_format</CODE>.
+<CODE>default_float_format</CODE>.
</DL>
<DT><CODE>cl_I lognot (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX134"></A>
+<A NAME="IDX135"></A>
<DT><CODE>cl_I operator ~ (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX135"></A>
+<A NAME="IDX136"></A>
Logical not, like <CODE>~x</CODE> in C. This is the same as <CODE>-1-x</CODE>.
<DT><CODE>cl_I logand (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX136"></A>
+<A NAME="IDX137"></A>
<DT><CODE>cl_I operator & (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX137"></A>
+<A NAME="IDX138"></A>
Logical and, like <CODE>x & y</CODE> in C.
<DT><CODE>cl_I logior (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX138"></A>
+<A NAME="IDX139"></A>
<DT><CODE>cl_I operator | (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX139"></A>
+<A NAME="IDX140"></A>
Logical (inclusive) or, like <CODE>x | y</CODE> in C.
<DT><CODE>cl_I logxor (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX140"></A>
+<A NAME="IDX141"></A>
<DT><CODE>cl_I operator ^ (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX141"></A>
+<A NAME="IDX142"></A>
Exclusive or, like <CODE>x ^ y</CODE> in C.
<DT><CODE>cl_I logeqv (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX142"></A>
+<A NAME="IDX143"></A>
Bitwise equivalence, like <CODE>~(x ^ y)</CODE> in C.
<DT><CODE>cl_I lognand (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX143"></A>
+<A NAME="IDX144"></A>
Bitwise not and, like <CODE>~(x & y)</CODE> in C.
<DT><CODE>cl_I lognor (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX144"></A>
+<A NAME="IDX145"></A>
Bitwise not or, like <CODE>~(x | y)</CODE> in C.
<DT><CODE>cl_I logandc1 (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX145"></A>
+<A NAME="IDX146"></A>
Logical and, complementing the first argument, like <CODE>~x & y</CODE> in C.
<DT><CODE>cl_I logandc2 (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX146"></A>
+<A NAME="IDX147"></A>
Logical and, complementing the second argument, like <CODE>x & ~y</CODE> in C.
<DT><CODE>cl_I logorc1 (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX147"></A>
+<A NAME="IDX148"></A>
Logical or, complementing the first argument, like <CODE>~x | y</CODE> in C.
<DT><CODE>cl_I logorc2 (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX148"></A>
+<A NAME="IDX149"></A>
Logical or, complementing the second argument, like <CODE>x | ~y</CODE> in C.
</DL>
<DT><CODE>cl_I boole (cl_boole op, const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX149"></A>
+<A NAME="IDX150"></A>
</DL>
<P>
where <CODE>op</CODE> must have one of the 16 values (each one stands for a function
<CODE>boole_and</CODE>, <CODE>boole_ior</CODE>, <CODE>boole_xor</CODE>, <CODE>boole_eqv</CODE>,
<CODE>boole_nand</CODE>, <CODE>boole_nor</CODE>, <CODE>boole_andc1</CODE>, <CODE>boole_andc2</CODE>,
<CODE>boole_orc1</CODE>, <CODE>boole_orc2</CODE>.
-<A NAME="IDX150"></A>
<A NAME="IDX151"></A>
<A NAME="IDX152"></A>
<A NAME="IDX153"></A>
<A NAME="IDX162"></A>
<A NAME="IDX163"></A>
<A NAME="IDX164"></A>
+<A NAME="IDX165"></A>
<P>
<DT><CODE>cl_boolean logtest (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX165"></A>
+<A NAME="IDX166"></A>
Returns true if some bit is set in both <CODE>x</CODE> and <CODE>y</CODE>, i.e. if
<CODE>logand(x,y) != 0</CODE>.
<DT><CODE>cl_boolean logbitp (const cl_I& n, const cl_I& x)</CODE>
<DD>
-<A NAME="IDX166"></A>
+<A NAME="IDX167"></A>
Returns true if the <CODE>n</CODE>th bit (from the right) of <CODE>x</CODE> is set.
Bit 0 is the least significant bit.
<DT><CODE>uintL logcount (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX167"></A>
+<A NAME="IDX168"></A>
Returns the number of one bits in <CODE>x</CODE>, if <CODE>x</CODE> >= 0, or
the number of zero bits in <CODE>x</CODE>, if <CODE>x</CODE> < 0.
</DL>
</PRE>
<P>
-<A NAME="IDX168"></A>
+<A NAME="IDX169"></A>
represents the bit interval containing the bits
<CODE>position</CODE>...<CODE>position+size-1</CODE> of an integer.
The constructor <CODE>cl_byte(size,position)</CODE> constructs a <CODE>cl_byte</CODE>.
<DT><CODE>cl_I ldb (const cl_I& n, const cl_byte& b)</CODE>
<DD>
-<A NAME="IDX169"></A>
+<A NAME="IDX170"></A>
extracts the bits of <CODE>n</CODE> described by the bit interval <CODE>b</CODE>
and returns them as a nonnegative integer with <CODE>b.size</CODE> bits.
<DT><CODE>cl_boolean ldb_test (const cl_I& n, const cl_byte& b)</CODE>
<DD>
-<A NAME="IDX170"></A>
+<A NAME="IDX171"></A>
Returns true if some bit described by the bit interval <CODE>b</CODE> is set in
<CODE>n</CODE>.
<DT><CODE>cl_I dpb (const cl_I& newbyte, const cl_I& n, const cl_byte& b)</CODE>
<DD>
-<A NAME="IDX171"></A>
+<A NAME="IDX172"></A>
Returns <CODE>n</CODE>, with the bits described by the bit interval <CODE>b</CODE>
replaced by <CODE>newbyte</CODE>. Only the lowest <CODE>b.size</CODE> bits of
<CODE>newbyte</CODE> are relevant.
<DT><CODE>cl_I mask_field (const cl_I& n, const cl_byte& b)</CODE>
<DD>
-<A NAME="IDX172"></A>
+<A NAME="IDX173"></A>
returns an integer with the bits described by the bit interval <CODE>b</CODE>
copied from the corresponding bits in <CODE>n</CODE>, the other bits zero.
<DT><CODE>cl_I deposit_field (const cl_I& newbyte, const cl_I& n, const cl_byte& b)</CODE>
<DD>
-<A NAME="IDX173"></A>
+<A NAME="IDX174"></A>
returns an integer where the bits described by the bit interval <CODE>b</CODE>
come from <CODE>newbyte</CODE> and the other bits come from <CODE>n</CODE>.
</DL>
<DT><CODE>cl_boolean oddp (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX174"></A>
+<A NAME="IDX175"></A>
Returns true if the least significant bit of <CODE>x</CODE> is 1. Equivalent to
<CODE>mod(x,2) != 0</CODE>.
<DT><CODE>cl_boolean evenp (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX175"></A>
+<A NAME="IDX176"></A>
Returns true if the least significant bit of <CODE>x</CODE> is 0. Equivalent to
<CODE>mod(x,2) == 0</CODE>.
<DT><CODE>cl_I operator << (const cl_I& x, const cl_I& n)</CODE>
<DD>
-<A NAME="IDX176"></A>
+<A NAME="IDX177"></A>
Shifts <CODE>x</CODE> by <CODE>n</CODE> bits to the left. <CODE>n</CODE> should be >=0.
Equivalent to <CODE>x * expt(2,n)</CODE>.
<DT><CODE>cl_I operator >> (const cl_I& x, const cl_I& n)</CODE>
<DD>
-<A NAME="IDX177"></A>
+<A NAME="IDX178"></A>
Shifts <CODE>x</CODE> by <CODE>n</CODE> bits to the right. <CODE>n</CODE> should be >=0.
Bits shifted out to the right are thrown away.
Equivalent to <CODE>floor(x / expt(2,n))</CODE>.
<DT><CODE>cl_I ash (const cl_I& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX178"></A>
+<A NAME="IDX179"></A>
Shifts <CODE>x</CODE> by <CODE>y</CODE> bits to the left (if <CODE>y</CODE>>=0) or
by <CODE>-y</CODE> bits to the right (if <CODE>y</CODE><=0). In other words, this
returns <CODE>floor(x * expt(2,y))</CODE>.
<DT><CODE>uintL integer_length (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX179"></A>
+<A NAME="IDX180"></A>
Returns the number of bits (excluding the sign bit) needed to represent <CODE>x</CODE>
in two's complement notation. This is the smallest n >= 0 such that
-2^n <= x < 2^n. If x > 0, this is the unique n > 0 such that
<DT><CODE>uintL ord2 (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX180"></A>
+<A NAME="IDX181"></A>
<CODE>x</CODE> must be non-zero. This function returns the number of 0 bits at the
right of <CODE>x</CODE> in two's complement notation. This is the largest n >= 0
such that 2^n divides <CODE>x</CODE>.
<DT><CODE>uintL power2p (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX181"></A>
+<A NAME="IDX182"></A>
<CODE>x</CODE> must be > 0. This function checks whether <CODE>x</CODE> is a power of 2.
If <CODE>x</CODE> = 2^(n-1), it returns n. Else it returns 0.
(See also the function <CODE>logp</CODE>.)
<DT><CODE>uint32 gcd (uint32 a, uint32 b)</CODE>
<DD>
-<A NAME="IDX182"></A>
+<A NAME="IDX183"></A>
<DT><CODE>cl_I gcd (const cl_I& a, const cl_I& b)</CODE>
<DD>
This function returns the greatest common divisor of <CODE>a</CODE> and <CODE>b</CODE>,
<DT><CODE>cl_I xgcd (const cl_I& a, const cl_I& b, cl_I* u, cl_I* v)</CODE>
<DD>
-<A NAME="IDX183"></A>
+<A NAME="IDX184"></A>
This function ("extended gcd") returns the greatest common divisor <CODE>g</CODE> of
<CODE>a</CODE> and <CODE>b</CODE> and at the same time the representation of <CODE>g</CODE>
as an integral linear combination of <CODE>a</CODE> and <CODE>b</CODE>:
<DT><CODE>cl_I lcm (const cl_I& a, const cl_I& b)</CODE>
<DD>
-<A NAME="IDX184"></A>
+<A NAME="IDX185"></A>
This function returns the least common multiple of <CODE>a</CODE> and <CODE>b</CODE>,
normalized to be >= 0.
<DT><CODE>cl_boolean logp (const cl_I& a, const cl_I& b, cl_RA* l)</CODE>
<DD>
-<A NAME="IDX185"></A>
+<A NAME="IDX186"></A>
<DT><CODE>cl_boolean logp (const cl_RA& a, const cl_RA& b, cl_RA* l)</CODE>
<DD>
<CODE>a</CODE> must be > 0. <CODE>b</CODE> must be >0 and != 1. If log(a,b) is
<DT><CODE>cl_I factorial (uintL n)</CODE>
<DD>
-<A NAME="IDX186"></A>
+<A NAME="IDX187"></A>
<CODE>n</CODE> must be a small integer >= 0. This function returns the factorial
<CODE>n</CODE>! = <CODE>1*2*...*n</CODE>.
<DT><CODE>cl_I doublefactorial (uintL n)</CODE>
<DD>
-<A NAME="IDX187"></A>
+<A NAME="IDX188"></A>
<CODE>n</CODE> must be a small integer >= 0. This function returns the
doublefactorial <CODE>n</CODE>!! = <CODE>1*3*...*n</CODE> or
<CODE>n</CODE>!! = <CODE>2*4*...*n</CODE>, respectively.
<DT><CODE>cl_I binomial (uintL n, uintL k)</CODE>
<DD>
-<A NAME="IDX188"></A>
+<A NAME="IDX189"></A>
<CODE>n</CODE> and <CODE>k</CODE> must be small integers >= 0. This function returns the
binomial coefficient
(<CODE>n</CODE> choose <CODE>k</CODE>) = <CODE>n</CODE>! / <CODE>k</CODE>! <CODE>(n-k)</CODE>!
<DT><CODE><VAR>type</VAR> scale_float (const <VAR>type</VAR>& x, sintL delta)</CODE>
<DD>
-<A NAME="IDX189"></A>
+<A NAME="IDX190"></A>
<DT><CODE><VAR>type</VAR> scale_float (const <VAR>type</VAR>& x, const cl_I& delta)</CODE>
<DD>
Returns <CODE>x*2^delta</CODE>. This is more efficient than an explicit multiplication
<DT><CODE>sintL float_exponent (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX190"></A>
+<A NAME="IDX191"></A>
Returns the exponent <CODE>e</CODE> of <CODE>x</CODE>.
For <CODE>x = 0.0</CODE>, this is 0. For <CODE>x</CODE> non-zero, this is the unique
integer with <CODE>2^(e-1) <= abs(x) < 2^e</CODE>.
<DT><CODE>sintL float_radix (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX191"></A>
+<A NAME="IDX192"></A>
Returns the base of the floating-point representation. This is always <CODE>2</CODE>.
<DT><CODE><VAR>type</VAR> float_sign (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX192"></A>
+<A NAME="IDX193"></A>
Returns the sign <CODE>s</CODE> of <CODE>x</CODE> as a float. The value is 1 for
<CODE>x</CODE> >= 0, -1 for <CODE>x</CODE> < 0.
<DT><CODE>uintL float_digits (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX193"></A>
+<A NAME="IDX194"></A>
Returns the number of mantissa bits in the floating-point representation
of <CODE>x</CODE>, including the hidden bit. The value only depends on the type
of <CODE>x</CODE>, not on its value.
<DT><CODE>uintL float_precision (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX194"></A>
+<A NAME="IDX195"></A>
Returns the number of significant mantissa bits in the floating-point
representation of <CODE>x</CODE>. Since denormalized numbers are not supported,
this is the same as <CODE>float_digits(x)</CODE> if <CODE>x</CODE> is non-zero, and
<P>
The complete internal representation of a float is encoded in the type
-<A NAME="IDX195"></A>
<A NAME="IDX196"></A>
<A NAME="IDX197"></A>
<A NAME="IDX198"></A>
<A NAME="IDX199"></A>
-<CODE>cl_decoded_float</CODE> (or <CODE>cl_decoded_sfloat</CODE>, <CODE>cl_decoded_ffloat</CODE>,
-<CODE>cl_decoded_dfloat</CODE>, <CODE>cl_decoded_lfloat</CODE>, respectively), defined by
+<A NAME="IDX200"></A>
+<CODE>decoded_float</CODE> (or <CODE>decoded_sfloat</CODE>, <CODE>decoded_ffloat</CODE>,
+<CODE>decoded_dfloat</CODE>, <CODE>decoded_lfloat</CODE>, respectively), defined by
<PRE>
-struct cl_decoded_<VAR>type</VAR>float {
+struct decoded_<VAR>type</VAR>float {
<VAR>type</VAR> mantissa; cl_I exponent; <VAR>type</VAR> sign;
};
</PRE>
<DL COMPACT>
-<DT><CODE>cl_decoded_<VAR>type</VAR>float decode_float (const <VAR>type</VAR>& x)</CODE>
+<DT><CODE>decoded_<VAR>type</VAR>float decode_float (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX200"></A>
+<A NAME="IDX201"></A>
For <CODE>x</CODE> non-zero, this returns <CODE>(-1)^s</CODE>, <CODE>e</CODE>, <CODE>m</CODE> with
<CODE>x = (-1)^s * 2^e * m</CODE> and <CODE>0.5 <= m < 1.0</CODE>. For <CODE>x</CODE> = 0,
it returns <CODE>(-1)^s</CODE>=1, <CODE>e</CODE>=0, <CODE>m</CODE>=0.
<P>
A complete decoding in terms of integers is provided as type
+<A NAME="IDX202"></A>
<PRE>
-<A NAME="IDX201"></A>struct cl_idecoded_float {
+struct cl_idecoded_float {
cl_I mantissa; cl_I exponent; cl_I sign;
};
</PRE>
<DT><CODE>cl_idecoded_float integer_decode_float (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX202"></A>
+<A NAME="IDX203"></A>
For <CODE>x</CODE> non-zero, this returns <CODE>(-1)^s</CODE>, <CODE>e</CODE>, <CODE>m</CODE> with
<CODE>x = (-1)^s * 2^e * m</CODE> and <CODE>m</CODE> an integer with <CODE>float_digits(x)</CODE>
bits. For <CODE>x</CODE> = 0, it returns <CODE>(-1)^s</CODE>=1, <CODE>e</CODE>=0, <CODE>m</CODE>=0.
<DT><CODE>cl_F float_sign (const cl_F& x, const cl_F& y)</CODE>
<DD>
-<A NAME="IDX203"></A>
+<A NAME="IDX204"></A>
This returns a floating point number whose precision and absolute value
is that of <CODE>y</CODE> and whose sign is that of <CODE>x</CODE>. If <CODE>x</CODE> is
zero, it is treated as positive. Same for <CODE>y</CODE>.
<H2><A NAME="SEC39" HREF="cln_toc.html#TOC39">4.11 Conversion functions</A></H2>
<P>
-<A NAME="IDX204"></A>
+<A NAME="IDX205"></A>
<P>
The type <CODE>cl_float_format_t</CODE> describes a floating-point format.
-<A NAME="IDX205"></A>
+<A NAME="IDX206"></A>
<DL COMPACT>
<DT><CODE>cl_float_format_t cl_float_format (uintL n)</CODE>
<DD>
-<A NAME="IDX206"></A>
+<A NAME="IDX207"></A>
Returns the smallest float format which guarantees at least <CODE>n</CODE>
decimal digits in the mantissa (after the decimal point).
<DD>
Returns the floating point format of <CODE>x</CODE>.
-<DT><CODE>cl_float_format_t cl_default_float_format</CODE>
+<DT><CODE>cl_float_format_t default_float_format</CODE>
<DD>
-<A NAME="IDX207"></A>
+<A NAME="IDX208"></A>
Global variable: the default float format used when converting rational numbers
to floats.
</DL>
<DT><CODE>cl_F cl_float (const <VAR>type</VAR>&x, cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX208"></A>
+<A NAME="IDX209"></A>
Returns <CODE>x</CODE> as a float of format <CODE>f</CODE>.
<DT><CODE>cl_F cl_float (const <VAR>type</VAR>&x, const cl_F& y)</CODE>
<DD>
Returns <CODE>x</CODE> in the float format of <CODE>y</CODE>.
<DT><CODE>cl_F cl_float (const <VAR>type</VAR>&x)</CODE>
<DD>
-Returns <CODE>x</CODE> as a float of format <CODE>cl_default_float_format</CODE> if
+Returns <CODE>x</CODE> as a float of format <CODE>default_float_format</CODE> if
it is an exact number, or <CODE>x</CODE> itself if it is already a float.
</DL>
<DT><CODE>cl_F most_positive_float (cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX209"></A>
+<A NAME="IDX210"></A>
Returns the largest (most positive) floating point number in float format <CODE>f</CODE>.
<DT><CODE>cl_F most_negative_float (cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX210"></A>
+<A NAME="IDX211"></A>
Returns the smallest (most negative) floating point number in float format <CODE>f</CODE>.
<DT><CODE>cl_F least_positive_float (cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX211"></A>
+<A NAME="IDX212"></A>
Returns the least positive floating point number (i.e. > 0 but closest to 0)
in float format <CODE>f</CODE>.
<DT><CODE>cl_F least_negative_float (cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX212"></A>
+<A NAME="IDX213"></A>
Returns the least negative floating point number (i.e. < 0 but closest to 0)
in float format <CODE>f</CODE>.
<DT><CODE>cl_F float_epsilon (cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX213"></A>
+<A NAME="IDX214"></A>
Returns the smallest floating point number e > 0 such that <CODE>1+e != 1</CODE>.
<DT><CODE>cl_F float_negative_epsilon (cl_float_format_t f)</CODE>
<DD>
-<A NAME="IDX214"></A>
+<A NAME="IDX215"></A>
Returns the smallest floating point number e > 0 such that <CODE>1-e != 1</CODE>.
</DL>
<DT><CODE>cl_RA rational (const <VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX215"></A>
+<A NAME="IDX216"></A>
Returns the value of <CODE>x</CODE> as an exact number. If <CODE>x</CODE> is already
an exact number, this is <CODE>x</CODE>. If <CODE>x</CODE> is a floating-point number,
the value is a rational number whose denominator is a power of 2.
<DT><CODE>cl_RA rationalize (const cl_R& x)</CODE>
<DD>
-<A NAME="IDX216"></A>
+<A NAME="IDX217"></A>
If <CODE>x</CODE> is a floating-point number, it actually represents an interval
of real numbers, and this function returns the rational number with
smallest denominator (and smallest numerator, in magnitude)
<P>
A random generator is a machine which produces (pseudo-)random numbers.
-The include file <CODE><cl_random.h></CODE> defines a class <CODE>cl_random_state</CODE>
+The include file <CODE><cln/random.h></CODE> defines a class <CODE>random_state</CODE>
which contains the state of a random generator. If you make a copy
of the random number generator, the original one and the copy will produce
the same sequence of random numbers.
<P>
The global variable
-<A NAME="IDX217"></A>
<A NAME="IDX218"></A>
+<A NAME="IDX219"></A>
<PRE>
-cl_random_state cl_default_random_state
+random_state default_random_state
</PRE>
<P>
contains a default random number generator. It is used when the functions
-below are called without <CODE>cl_random_state</CODE> argument.
+below are called without <CODE>random_state</CODE> argument.
<DL COMPACT>
-<DT><CODE>uint32 random32 (cl_random_state& randomstate)</CODE>
+<DT><CODE>uint32 random32 (random_state& randomstate)</CODE>
<DD>
<DT><CODE>uint32 random32 ()</CODE>
<DD>
-<A NAME="IDX219"></A>
+<A NAME="IDX220"></A>
Returns a random unsigned 32-bit number. All bits are equally random.
-<DT><CODE>cl_I random_I (cl_random_state& randomstate, const cl_I& n)</CODE>
+<DT><CODE>cl_I random_I (random_state& randomstate, const cl_I& n)</CODE>
<DD>
<DT><CODE>cl_I random_I (const cl_I& n)</CODE>
<DD>
-<A NAME="IDX220"></A>
+<A NAME="IDX221"></A>
<CODE>n</CODE> must be an integer > 0. This function returns a random integer <CODE>x</CODE>
in the range <CODE>0 <= x < n</CODE>.
-<DT><CODE>cl_F random_F (cl_random_state& randomstate, const cl_F& n)</CODE>
+<DT><CODE>cl_F random_F (random_state& randomstate, const cl_F& n)</CODE>
<DD>
<DT><CODE>cl_F random_F (const cl_F& n)</CODE>
<DD>
-<A NAME="IDX221"></A>
+<A NAME="IDX222"></A>
<CODE>n</CODE> must be a float > 0. This function returns a random floating-point
number of the same format as <CODE>n</CODE> in the range <CODE>0 <= x < n</CODE>.
-<DT><CODE>cl_R random_R (cl_random_state& randomstate, const cl_R& n)</CODE>
+<DT><CODE>cl_R random_R (random_state& randomstate, const cl_R& n)</CODE>
<DD>
<DT><CODE>cl_R random_R (const cl_R& n)</CODE>
<DD>
-<A NAME="IDX222"></A>
+<A NAME="IDX223"></A>
Behaves like <CODE>random_I</CODE> if <CODE>n</CODE> is an integer and like <CODE>random_F</CODE>
if <CODE>n</CODE> is a float.
</DL>
<H2><A NAME="SEC43" HREF="cln_toc.html#TOC43">4.13 Obfuscating operators</A></H2>
<P>
-<A NAME="IDX223"></A>
+<A NAME="IDX224"></A>
<P>
</PRE>
<P>
-<A NAME="IDX224"></A>
+<A NAME="IDX225"></A>
to the beginning of your source files, before the inclusion of any CLN
include files. This flag will enable the following operators:
<DT><CODE><VAR>type</VAR>& operator += (<VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX225"></A>
+<A NAME="IDX226"></A>
<DT><CODE><VAR>type</VAR>& operator -= (<VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX226"></A>
+<A NAME="IDX227"></A>
<DT><CODE><VAR>type</VAR>& operator *= (<VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX227"></A>
+<A NAME="IDX228"></A>
<DT><CODE><VAR>type</VAR>& operator /= (<VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX228"></A>
+<A NAME="IDX229"></A>
</DL>
<P>
<DD>
<DT><CODE><VAR>type</VAR>& operator &= (<VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX229"></A>
+<A NAME="IDX230"></A>
<DT><CODE><VAR>type</VAR>& operator |= (<VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX230"></A>
+<A NAME="IDX231"></A>
<DT><CODE><VAR>type</VAR>& operator ^= (<VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX231"></A>
+<A NAME="IDX232"></A>
<DT><CODE><VAR>type</VAR>& operator <<= (<VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX232"></A>
+<A NAME="IDX233"></A>
<DT><CODE><VAR>type</VAR>& operator >>= (<VAR>type</VAR>&, const <VAR>type</VAR>&)</CODE>
<DD>
-<A NAME="IDX233"></A>
+<A NAME="IDX234"></A>
</DL>
<P>
<DT><CODE><VAR>type</VAR>& operator ++ (<VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX234"></A>
+<A NAME="IDX235"></A>
The prefix operator <CODE>++x</CODE>.
<DT><CODE>void operator ++ (<VAR>type</VAR>& x, int)</CODE>
<DT><CODE><VAR>type</VAR>& operator -- (<VAR>type</VAR>& x)</CODE>
<DD>
-<A NAME="IDX235"></A>
+<A NAME="IDX236"></A>
The prefix operator <CODE>--x</CODE>.
<DT><CODE>void operator -- (<VAR>type</VAR>& x, int)</CODE>
<HTML>
<HEAD>
-<!-- Created by texi2html 1.56k from cln.texi on 2 June 2000 -->
+<!-- Created by texi2html 1.56k from cln.texi on 28 August 2000 -->
<TITLE>CLN, a Class Library for Numbers - 5. Input/Output</TITLE>
</HEAD>
<H1><A NAME="SEC44" HREF="cln_toc.html#TOC44">5. Input/Output</A></H1>
<P>
-<A NAME="IDX236"></A>
+<A NAME="IDX237"></A>
<H2><A NAME="SEC45" HREF="cln_toc.html#TOC45">5.1 Internal and printed representation</A></H2>
<P>
-<A NAME="IDX237"></A>
+<A NAME="IDX238"></A>
<P>
<P>
Converting an internal to an external representation is called "printing",
-<A NAME="IDX238"></A>
-converting an external to an internal representation is called "reading".
<A NAME="IDX239"></A>
+converting an external to an internal representation is called "reading".
+<A NAME="IDX240"></A>
In CLN, it is always true that conversion of an internal to an external
representation and then back to an internal representation will yield the
same internal representation. Symbolically: <CODE>read(print(x)) == x</CODE>.
<H2><A NAME="SEC46" HREF="cln_toc.html#TOC46">5.2 Input functions</A></H2>
<P>
-Including <CODE><cl_io.h></CODE> defines a type <CODE>cl_istream</CODE>, which is
-the type of the first argument to all input functions. Unless you build
-and use CLN with the macro CL_IO_STDIO being defined, <CODE>cl_istream</CODE>
-is the same as <CODE>istream&</CODE>.
+Including <CODE><cln/io.h></CODE> defines a type <CODE>cl_istream</CODE>, which is
+the type of the first argument to all input functions. <CODE>cl_istream</CODE>
+is the same as <CODE>std::istream&</CODE>.
<P>
<UL>
<LI>
-<CODE>cl_istream cl_stdin</CODE>
+<CODE>cl_istream stdin</CODE>
</UL>
<P>
<P>
Each of the classes <CODE>cl_N</CODE>, <CODE>cl_R</CODE>, <CODE>cl_RA</CODE>, <CODE>cl_I</CODE>,
<CODE>cl_F</CODE>, <CODE>cl_SF</CODE>, <CODE>cl_FF</CODE>, <CODE>cl_DF</CODE>, <CODE>cl_LF</CODE>
-defines, in <CODE><cl_<VAR>type</VAR>_io.h></CODE>, the following input function:
+defines, in <CODE><cln/<VAR>type</VAR>_io.h></CODE>, the following input function:
<DL COMPACT>
</DL>
<P>
-The most flexible input functions, defined in <CODE><cl_<VAR>type</VAR>_io.h></CODE>,
+The most flexible input functions, defined in <CODE><cln/<VAR>type</VAR>_io.h></CODE>,
are the following:
<H2><A NAME="SEC47" HREF="cln_toc.html#TOC47">5.3 Output functions</A></H2>
<P>
-Including <CODE><cl_io.h></CODE> defines a type <CODE>cl_ostream</CODE>, which is
-the type of the first argument to all output functions. Unless you build
-and use CLN with the macro CL_IO_STDIO being defined, <CODE>cl_ostream</CODE>
-is the same as <CODE>ostream&</CODE>.
+Including <CODE><cln/io.h></CODE> defines a type <CODE>cl_ostream</CODE>, which is
+the type of the first argument to all output functions. <CODE>cl_ostream</CODE>
+is the same as <CODE>std::ostream&</CODE>.
<P>
<UL>
<LI>
-<CODE>cl_ostream cl_stdout</CODE>
+<CODE>cl_ostream stdout</CODE>
</UL>
<P>
<UL>
<LI>
-<CODE>cl_ostream cl_stderr</CODE>
+<CODE>cl_ostream stderr</CODE>
</UL>
<P>
<P>
Each of the classes <CODE>cl_N</CODE>, <CODE>cl_R</CODE>, <CODE>cl_RA</CODE>, <CODE>cl_I</CODE>,
<CODE>cl_F</CODE>, <CODE>cl_SF</CODE>, <CODE>cl_FF</CODE>, <CODE>cl_DF</CODE>, <CODE>cl_LF</CODE>
-defines, in <CODE><cl_<VAR>type</VAR>_io.h></CODE>, the following output functions:
+defines, in <CODE><cln/<VAR>type</VAR>_io.h></CODE>, the following output functions:
<DL COMPACT>
<DT><CODE>cl_ostream operator<< (cl_ostream stream, const <VAR>type</VAR>& x)</CODE>
<DD>
Prints the number <CODE>x</CODE> on the <CODE>stream</CODE>. The output may depend
-on the global printer settings in the variable <CODE>cl_default_print_flags</CODE>.
+on the global printer settings in the variable <CODE>default_print_flags</CODE>.
The <CODE>ostream</CODE> flags and settings (flags, width and locale) are
ignored.
</DL>
<P>
-The most flexible output function, defined in <CODE><cl_<VAR>type</VAR>_io.h></CODE>,
+The most flexible output function, defined in <CODE><cln/<VAR>type</VAR>_io.h></CODE>,
are the following:
<PRE>
</DL>
<P>
-The global variable <CODE>cl_default_print_flags</CODE> contains the default values,
+The global variable <CODE>default_print_flags</CODE> contains the default values,
used by the function <CODE>fprint</CODE>.
<HTML>
<HEAD>
-<!-- Created by texi2html 1.56k from cln.texi on 2 June 2000 -->
+<!-- Created by texi2html 1.56k from cln.texi on 28 August 2000 -->
<TITLE>CLN, a Class Library for Numbers - 6. Rings</TITLE>
</HEAD>
<PRE>
Ring
cl_ring
- <cl_ring.h>
+ <cln/ring.h>
</PRE>
<P>
<DT><CODE>void R->fprint (cl_ostream stream, const cl_ring_element& x)</CODE>
<DD>
+<A NAME="IDX241"></A>
<DT><CODE>cl_boolean R->equal (const cl_ring_element& x, const cl_ring_element& y)</CODE>
<DD>
+<A NAME="IDX242"></A>
<DT><CODE>cl_ring_element R->zero ()</CODE>
<DD>
+<A NAME="IDX243"></A>
<DT><CODE>cl_boolean R->zerop (const cl_ring_element& x)</CODE>
<DD>
+<A NAME="IDX244"></A>
<DT><CODE>cl_ring_element R->plus (const cl_ring_element& x, const cl_ring_element& y)</CODE>
<DD>
+<A NAME="IDX245"></A>
<DT><CODE>cl_ring_element R->minus (const cl_ring_element& x, const cl_ring_element& y)</CODE>
<DD>
+<A NAME="IDX246"></A>
<DT><CODE>cl_ring_element R->uminus (const cl_ring_element& x)</CODE>
<DD>
+<A NAME="IDX247"></A>
<DT><CODE>cl_ring_element R->one ()</CODE>
<DD>
+<A NAME="IDX248"></A>
<DT><CODE>cl_ring_element R->canonhom (const cl_I& x)</CODE>
<DD>
+<A NAME="IDX249"></A>
<DT><CODE>cl_ring_element R->mul (const cl_ring_element& x, const cl_ring_element& y)</CODE>
<DD>
+<A NAME="IDX250"></A>
<DT><CODE>cl_ring_element R->square (const cl_ring_element& x)</CODE>
<DD>
+<A NAME="IDX251"></A>
<DT><CODE>cl_ring_element R->expt_pos (const cl_ring_element& x, const cl_I& y)</CODE>
<DD>
+<A NAME="IDX252"></A>
</DL>
<P>
<DT><CODE>cl_boolean instanceof (const cl_number& x, const cl_number_ring& R)</CODE>
<DD>
-<A NAME="IDX240"></A>
+<A NAME="IDX253"></A>
Tests whether the given number is an element of the number ring R.
</DL>
<HTML>
<HEAD>
-<!-- Created by texi2html 1.56k from cln.texi on 2 June 2000 -->
+<!-- Created by texi2html 1.56k from cln.texi on 28 August 2000 -->
<TITLE>CLN, a Class Library for Numbers - 7. Modular integers</TITLE>
</HEAD>
<H1><A NAME="SEC49" HREF="cln_toc.html#TOC49">7. Modular integers</A></H1>
<P>
-<A NAME="IDX241"></A>
+<A NAME="IDX254"></A>
<H2><A NAME="SEC50" HREF="cln_toc.html#TOC50">7.1 Modular integer rings</A></H2>
<P>
-<A NAME="IDX242"></A>
+<A NAME="IDX255"></A>
<P>
<PRE>
Ring
cl_ring
- <cl_ring.h>
+ <cln/ring.h>
|
|
Modular integer ring
cl_modint_ring
- <cl_modinteger.h>
+ <cln/modinteger.h>
</PRE>
<P>
-<A NAME="IDX243"></A>
+<A NAME="IDX256"></A>
<P>
<PRE>
Modular integer
cl_MI
- <cl_modinteger.h>
+ <cln/modinteger.h>
</PRE>
<P>
<DL COMPACT>
-<DT><CODE>cl_modint_ring cl_find_modint_ring (const cl_I& N)</CODE>
+<DT><CODE>cl_modint_ring find_modint_ring (const cl_I& N)</CODE>
<DD>
-<A NAME="IDX244"></A>
+<A NAME="IDX257"></A>
This function returns the modular ring <SAMP>`Z/NZ'</SAMP>. It takes care
of finding out about special cases of <CODE>N</CODE>, like powers of two
and odd numbers for which Montgomery multiplication will be a win,
-<A NAME="IDX245"></A>
+<A NAME="IDX258"></A>
and precomputes any necessary auxiliary data for computing modulo <CODE>N</CODE>.
There is a cache table of rings, indexed by <CODE>N</CODE> (or, more precisely,
by <CODE>abs(N)</CODE>). This ensures that the precomputation costs are reduced
<DT><CODE>bool operator== (const cl_modint_ring&, const cl_modint_ring&)</CODE>
<DD>
-<A NAME="IDX246"></A>
+<A NAME="IDX259"></A>
<DT><CODE>bool operator!= (const cl_modint_ring&, const cl_modint_ring&)</CODE>
<DD>
-<A NAME="IDX247"></A>
+<A NAME="IDX260"></A>
These compare two modular integer rings for equality. Two different calls
-to <CODE>cl_find_modint_ring</CODE> with the same argument necessarily return the
+to <CODE>find_modint_ring</CODE> with the same argument necessarily return the
same ring because it is memoized in the cache table.
</DL>
<DT><CODE>cl_I R->modulus</CODE>
<DD>
-<A NAME="IDX248"></A>
+<A NAME="IDX261"></A>
This is the ring's modulus, normalized to be nonnegative: <CODE>abs(N)</CODE>.
<DT><CODE>cl_MI R->zero()</CODE>
<DD>
-<A NAME="IDX249"></A>
+<A NAME="IDX262"></A>
This returns <CODE>0 mod N</CODE>.
<DT><CODE>cl_MI R->one()</CODE>
<DD>
-<A NAME="IDX250"></A>
+<A NAME="IDX263"></A>
This returns <CODE>1 mod N</CODE>.
<DT><CODE>cl_MI R->canonhom (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX251"></A>
+<A NAME="IDX264"></A>
This returns <CODE>x mod N</CODE>.
<DT><CODE>cl_I R->retract (const cl_MI& x)</CODE>
<DD>
-<A NAME="IDX252"></A>
+<A NAME="IDX265"></A>
This is a partial inverse function to <CODE>R->canonhom</CODE>. It returns the
standard representative (<CODE>>=0</CODE>, <CODE><N</CODE>) of <CODE>x</CODE>.
-<DT><CODE>cl_MI R->random(cl_random_state& randomstate)</CODE>
+<DT><CODE>cl_MI R->random(random_state& randomstate)</CODE>
<DD>
<DT><CODE>cl_MI R->random()</CODE>
<DD>
-<A NAME="IDX253"></A>
+<A NAME="IDX266"></A>
This returns a random integer modulo <CODE>N</CODE>.
</DL>
<DT><CODE>cl_modint_ring x.ring ()</CODE>
<DD>
-<A NAME="IDX254"></A>
+<A NAME="IDX267"></A>
Returns the ring to which the modular integer <CODE>x</CODE> belongs.
<DT><CODE>cl_MI operator+ (const cl_MI&, const cl_MI&)</CODE>
<DD>
-<A NAME="IDX255"></A>
+<A NAME="IDX268"></A>
Returns the sum of two modular integers. One of the arguments may also
be a plain integer.
<DT><CODE>cl_MI operator- (const cl_MI&, const cl_MI&)</CODE>
<DD>
-<A NAME="IDX256"></A>
+<A NAME="IDX269"></A>
Returns the difference of two modular integers. One of the arguments may also
be a plain integer.
<DT><CODE>cl_MI operator* (const cl_MI&, const cl_MI&)</CODE>
<DD>
-<A NAME="IDX257"></A>
+<A NAME="IDX270"></A>
Returns the product of two modular integers. One of the arguments may also
be a plain integer.
<DT><CODE>cl_MI square (const cl_MI&)</CODE>
<DD>
-<A NAME="IDX258"></A>
+<A NAME="IDX271"></A>
Returns the square of a modular integer.
<DT><CODE>cl_MI recip (const cl_MI& x)</CODE>
<DD>
-<A NAME="IDX259"></A>
+<A NAME="IDX272"></A>
Returns the reciprocal <CODE>x^-1</CODE> of a modular integer <CODE>x</CODE>. <CODE>x</CODE>
must be coprime to the modulus, otherwise an error message is issued.
<DT><CODE>cl_MI div (const cl_MI& x, const cl_MI& y)</CODE>
<DD>
-<A NAME="IDX260"></A>
+<A NAME="IDX273"></A>
Returns the quotient <CODE>x*y^-1</CODE> of two modular integers <CODE>x</CODE>, <CODE>y</CODE>.
<CODE>y</CODE> must be coprime to the modulus, otherwise an error message is issued.
<DT><CODE>cl_MI expt_pos (const cl_MI& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX261"></A>
+<A NAME="IDX274"></A>
<CODE>y</CODE> must be > 0. Returns <CODE>x^y</CODE>.
<DT><CODE>cl_MI expt (const cl_MI& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX262"></A>
+<A NAME="IDX275"></A>
Returns <CODE>x^y</CODE>. If <CODE>y</CODE> is negative, <CODE>x</CODE> must be coprime to the
modulus, else an error message is issued.
<DT><CODE>cl_MI operator<< (const cl_MI& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX263"></A>
+<A NAME="IDX276"></A>
Returns <CODE>x*2^y</CODE>.
<DT><CODE>cl_MI operator>> (const cl_MI& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX264"></A>
+<A NAME="IDX277"></A>
Returns <CODE>x*2^-y</CODE>. When <CODE>y</CODE> is positive, the modulus must be odd,
or an error message is issued.
<DT><CODE>bool operator== (const cl_MI&, const cl_MI&)</CODE>
<DD>
-<A NAME="IDX265"></A>
+<A NAME="IDX278"></A>
<DT><CODE>bool operator!= (const cl_MI&, const cl_MI&)</CODE>
<DD>
-<A NAME="IDX266"></A>
+<A NAME="IDX279"></A>
Compares two modular integers, belonging to the same modular integer ring,
for equality.
<DT><CODE>cl_boolean zerop (const cl_MI& x)</CODE>
<DD>
-<A NAME="IDX267"></A>
+<A NAME="IDX280"></A>
Returns true if <CODE>x</CODE> is <CODE>0 mod N</CODE>.
</DL>
<DT><CODE>void fprint (cl_ostream stream, const cl_MI& x)</CODE>
<DD>
-<A NAME="IDX268"></A>
+<A NAME="IDX281"></A>
<DT><CODE>cl_ostream operator<< (cl_ostream stream, const cl_MI& x)</CODE>
<DD>
-<A NAME="IDX269"></A>
+<A NAME="IDX282"></A>
Prints the modular integer <CODE>x</CODE> on the <CODE>stream</CODE>. The output may depend
-on the global printer settings in the variable <CODE>cl_default_print_flags</CODE>.
+on the global printer settings in the variable <CODE>default_print_flags</CODE>.
</DL>
<P><HR><P>
<HTML>
<HEAD>
-<!-- Created by texi2html 1.56k from cln.texi on 2 June 2000 -->
+<!-- Created by texi2html 1.56k from cln.texi on 28 August 2000 -->
<TITLE>CLN, a Class Library for Numbers - 8. Symbolic data types</TITLE>
</HEAD>
<H1><A NAME="SEC52" HREF="cln_toc.html#TOC52">8. Symbolic data types</A></H1>
<P>
-<A NAME="IDX270"></A>
+<A NAME="IDX283"></A>
<P>
<H2><A NAME="SEC53" HREF="cln_toc.html#TOC53">8.1 Strings</A></H2>
<P>
-<A NAME="IDX271"></A>
+<A NAME="IDX284"></A>
+<A NAME="IDX285"></A>
<P>
<PRE>
String
cl_string
- <cl_string.h>
+ <cln/string.h>
</PRE>
<P>
<DT><CODE>cl_string (const char * s)</CODE>
<DD>
-<A NAME="IDX272"></A>
Returns an immutable copy of the (zero-terminated) C string <CODE>s</CODE>.
<DT><CODE>cl_string (const char * ptr, unsigned long len)</CODE>
<DT><CODE>s.length()</CODE>
<DD>
-<A NAME="IDX273"></A>
+<A NAME="IDX286"></A>
<DT><CODE>strlen(s)</CODE>
<DD>
-<A NAME="IDX274"></A>
+<A NAME="IDX287"></A>
Returns the length of the string <CODE>s</CODE>.
<DT><CODE>s[i]</CODE>
<DD>
-<A NAME="IDX275"></A>
+<A NAME="IDX288"></A>
Returns the <CODE>i</CODE>th character of the string <CODE>s</CODE>.
<CODE>i</CODE> must be in the range <CODE>0 <= i < s.length()</CODE>.
<DT><CODE>bool equal (const cl_string& s1, const cl_string& s2)</CODE>
<DD>
-<A NAME="IDX276"></A>
+<A NAME="IDX289"></A>
Compares two strings for equality. One of the arguments may also be a
plain <CODE>const char *</CODE>.
</DL>
<H2><A NAME="SEC54" HREF="cln_toc.html#TOC54">8.2 Symbols</A></H2>
<P>
-<A NAME="IDX277"></A>
+<A NAME="IDX290"></A>
+<A NAME="IDX291"></A>
<P>
<DT><CODE>cl_symbol (const cl_string& s)</CODE>
<DD>
-<A NAME="IDX278"></A>
Looks up or creates a new symbol with a given name.
</DL>
<DT><CODE>bool equal (const cl_symbol& sym1, const cl_symbol& sym2)</CODE>
<DD>
-<A NAME="IDX279"></A>
+<A NAME="IDX292"></A>
Compares two symbols for equality. This is very fast.
</DL>
<HTML>
<HEAD>
-<!-- Created by texi2html 1.56k from cln.texi on 2 June 2000 -->
+<!-- Created by texi2html 1.56k from cln.texi on 28 August 2000 -->
<TITLE>CLN, a Class Library for Numbers - 9. Univariate polynomials</TITLE>
</HEAD>
<H1><A NAME="SEC55" HREF="cln_toc.html#TOC55">9. Univariate polynomials</A></H1>
<P>
-<A NAME="IDX280"></A>
-<A NAME="IDX281"></A>
+<A NAME="IDX293"></A>
+<A NAME="IDX294"></A>
<P>
CLN implements univariate polynomials (polynomials in one variable) over an
arbitrary ring. The indeterminate variable may be either unnamed (and will be
-printed according to <CODE>cl_default_print_flags.univpoly_varname</CODE>, which
+printed according to <CODE>default_print_flags.univpoly_varname</CODE>, which
defaults to <SAMP>`x'</SAMP>) or carry a given name. The base ring and the
indeterminate are explicitly part of every polynomial. CLN doesn't allow you to
(accidentally) mix elements of different polynomial rings, e.g.
<PRE>
Ring
cl_ring
- <cl_ring.h>
+ <cln/ring.h>
|
|
Univariate polynomial ring
cl_univpoly_ring
- <cl_univpoly.h>
+ <cln/univpoly.h>
|
+----------------+-------------------+
| | |
Complex polynomial ring | Modular integer polynomial ring
cl_univpoly_complex_ring | cl_univpoly_modint_ring
- <cl_univpoly_complex.h> | <cl_univpoly_modint.h>
+ <cln/univpoly_complex.h> | <cln/univpoly_modint.h>
|
+----------------+
| |
Real polynomial ring |
cl_univpoly_real_ring |
- <cl_univpoly_real.h> |
+ <cln/univpoly_real.h> |
|
+----------------+
| |
Rational polynomial ring |
cl_univpoly_rational_ring |
- <cl_univpoly_rational.h> |
+ <cln/univpoly_rational.h> |
|
+----------------+
|
Integer polynomial ring
cl_univpoly_integer_ring
- <cl_univpoly_integer.h>
+ <cln/univpoly_integer.h>
</PRE>
<P>
<PRE>
Univariate polynomial
cl_UP
- <cl_univpoly.h>
+ <cln/univpoly.h>
|
+----------------+-------------------+
| | |
Complex polynomial | Modular integer polynomial
cl_UP_N | cl_UP_MI
- <cl_univpoly_complex.h> | <cl_univpoly_modint.h>
+ <cln/univpoly_complex.h> | <cln/univpoly_modint.h>
|
+----------------+
| |
Real polynomial |
cl_UP_R |
- <cl_univpoly_real.h> |
+ <cln/univpoly_real.h> |
|
+----------------+
| |
Rational polynomial |
cl_UP_RA |
- <cl_univpoly_rational.h> |
+ <cln/univpoly_rational.h> |
|
+----------------+
|
Integer polynomial
cl_UP_I
- <cl_univpoly_integer.h>
+ <cln/univpoly_integer.h>
</PRE>
<P>
<DL COMPACT>
-<DT><CODE>cl_univpoly_ring cl_find_univpoly_ring (const cl_ring& R)</CODE>
+<DT><CODE>cl_univpoly_ring find_univpoly_ring (const cl_ring& R)</CODE>
<DD>
-<DT><CODE>cl_univpoly_ring cl_find_univpoly_ring (const cl_ring& R, const cl_symbol& varname)</CODE>
+<DT><CODE>cl_univpoly_ring find_univpoly_ring (const cl_ring& R, const cl_symbol& varname)</CODE>
<DD>
This function returns the polynomial ring <SAMP>`R[X]'</SAMP>, unnamed or named.
<CODE>R</CODE> may be an arbitrary ring. This function takes care of finding out
This ensures that two calls of this function with the same arguments will
return the same polynomial ring.
-<DT><CODE>cl_univpoly_complex_ring cl_find_univpoly_ring (const cl_complex_ring& R)</CODE>
+<DT><CODE>cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& R)</CODE>
<DD>
-<A NAME="IDX282"></A>
-<DT><CODE>cl_univpoly_complex_ring cl_find_univpoly_ring (const cl_complex_ring& R, const cl_symbol& varname)</CODE>
+<A NAME="IDX295"></A>
+<DT><CODE>cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& R, const cl_symbol& varname)</CODE>
<DD>
-<DT><CODE>cl_univpoly_real_ring cl_find_univpoly_ring (const cl_real_ring& R)</CODE>
+<DT><CODE>cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& R)</CODE>
<DD>
-<DT><CODE>cl_univpoly_real_ring cl_find_univpoly_ring (const cl_real_ring& R, const cl_symbol& varname)</CODE>
+<DT><CODE>cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& R, const cl_symbol& varname)</CODE>
<DD>
-<DT><CODE>cl_univpoly_rational_ring cl_find_univpoly_ring (const cl_rational_ring& R)</CODE>
+<DT><CODE>cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& R)</CODE>
<DD>
-<DT><CODE>cl_univpoly_rational_ring cl_find_univpoly_ring (const cl_rational_ring& R, const cl_symbol& varname)</CODE>
+<DT><CODE>cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& R, const cl_symbol& varname)</CODE>
<DD>
-<DT><CODE>cl_univpoly_integer_ring cl_find_univpoly_ring (const cl_integer_ring& R)</CODE>
+<DT><CODE>cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& R)</CODE>
<DD>
-<DT><CODE>cl_univpoly_integer_ring cl_find_univpoly_ring (const cl_integer_ring& R, const cl_symbol& varname)</CODE>
+<DT><CODE>cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& R, const cl_symbol& varname)</CODE>
<DD>
-<DT><CODE>cl_univpoly_modint_ring cl_find_univpoly_ring (const cl_modint_ring& R)</CODE>
+<DT><CODE>cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& R)</CODE>
<DD>
-<DT><CODE>cl_univpoly_modint_ring cl_find_univpoly_ring (const cl_modint_ring& R, const cl_symbol& varname)</CODE>
+<DT><CODE>cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& R, const cl_symbol& varname)</CODE>
<DD>
-These functions are equivalent to the general <CODE>cl_find_univpoly_ring</CODE>,
+These functions are equivalent to the general <CODE>find_univpoly_ring</CODE>,
only the return type is more specific, according to the base ring's type.
</DL>
<DT><CODE>cl_ring R->basering()</CODE>
<DD>
-<A NAME="IDX283"></A>
-This returns the base ring, as passed to <SAMP>`cl_find_univpoly_ring'</SAMP>.
+<A NAME="IDX296"></A>
+This returns the base ring, as passed to <SAMP>`find_univpoly_ring'</SAMP>.
<DT><CODE>cl_UP R->zero()</CODE>
<DD>
-<A NAME="IDX284"></A>
+<A NAME="IDX297"></A>
This returns <CODE>0 in R</CODE>, a polynomial of degree -1.
<DT><CODE>cl_UP R->one()</CODE>
<DD>
-<A NAME="IDX285"></A>
+<A NAME="IDX298"></A>
This returns <CODE>1 in R</CODE>, a polynomial of degree <= 0.
<DT><CODE>cl_UP R->canonhom (const cl_I& x)</CODE>
<DD>
-<A NAME="IDX286"></A>
+<A NAME="IDX299"></A>
This returns <CODE>x in R</CODE>, a polynomial of degree <= 0.
<DT><CODE>cl_UP R->monomial (const cl_ring_element& x, uintL e)</CODE>
<DD>
-<A NAME="IDX287"></A>
+<A NAME="IDX300"></A>
This returns a sparse polynomial: <CODE>x * X^e</CODE>, where <CODE>X</CODE> is the
indeterminate.
<DT><CODE>cl_UP R->create (sintL degree)</CODE>
<DD>
-<A NAME="IDX288"></A>
+<A NAME="IDX301"></A>
Creates a new polynomial with a given degree. The zero polynomial has degree
<CODE>-1</CODE>. After creating the polynomial, you should put in the coefficients,
using the <CODE>set_coeff</CODE> member function, and then call the <CODE>finalize</CODE>
<DT><CODE>void set_coeff (cl_UP& x, uintL index, const cl_ring_element& y)</CODE>
<DD>
-<A NAME="IDX289"></A>
+<A NAME="IDX302"></A>
This changes the coefficient of <CODE>X^index</CODE> in <CODE>x</CODE> to be <CODE>y</CODE>.
After changing a polynomial and before applying any "normal" operation on it,
you should call its <CODE>finalize</CODE> member function.
<DT><CODE>void finalize (cl_UP& x)</CODE>
<DD>
-<A NAME="IDX290"></A>
+<A NAME="IDX303"></A>
This function marks the endpoint of destructive modifications of a polynomial.
It normalizes the internal representation so that subsequent computations have
less overhead. Doing normal computations on unnormalized polynomials may
<DT><CODE>cl_univpoly_ring x.ring ()</CODE>
<DD>
-<A NAME="IDX291"></A>
+<A NAME="IDX304"></A>
Returns the ring to which the univariate polynomial <CODE>x</CODE> belongs.
<DT><CODE>cl_UP operator+ (const cl_UP&, const cl_UP&)</CODE>
<DD>
-<A NAME="IDX292"></A>
+<A NAME="IDX305"></A>
Returns the sum of two univariate polynomials.
<DT><CODE>cl_UP operator- (const cl_UP&, const cl_UP&)</CODE>
<DD>
-<A NAME="IDX293"></A>
+<A NAME="IDX306"></A>
Returns the difference of two univariate polynomials.
<DT><CODE>cl_UP operator- (const cl_UP&)</CODE>
<DT><CODE>cl_UP operator* (const cl_UP&, const cl_UP&)</CODE>
<DD>
-<A NAME="IDX294"></A>
+<A NAME="IDX307"></A>
Returns the product of two univariate polynomials. One of the arguments may
also be a plain integer or an element of the base ring.
<DT><CODE>cl_UP square (const cl_UP&)</CODE>
<DD>
-<A NAME="IDX295"></A>
+<A NAME="IDX308"></A>
Returns the square of a univariate polynomial.
<DT><CODE>cl_UP expt_pos (const cl_UP& x, const cl_I& y)</CODE>
<DD>
-<A NAME="IDX296"></A>
+<A NAME="IDX309"></A>
<CODE>y</CODE> must be > 0. Returns <CODE>x^y</CODE>.
<DT><CODE>bool operator== (const cl_UP&, const cl_UP&)</CODE>
<DD>
-<A NAME="IDX297"></A>
+<A NAME="IDX310"></A>
<DT><CODE>bool operator!= (const cl_UP&, const cl_UP&)</CODE>
<DD>
-<A NAME="IDX298"></A>
+<A NAME="IDX311"></A>
Compares two univariate polynomials, belonging to the same univariate
polynomial ring, for equality.
<DT><CODE>cl_boolean zerop (const cl_UP& x)</CODE>
<DD>
-<A NAME="IDX299"></A>
+<A NAME="IDX312"></A>
Returns true if <CODE>x</CODE> is <CODE>0 in R</CODE>.
<DT><CODE>sintL degree (const cl_UP& x)</CODE>
<DD>
-<A NAME="IDX300"></A>
+<A NAME="IDX313"></A>
Returns the degree of the polynomial. The zero polynomial has degree <CODE>-1</CODE>.
<DT><CODE>cl_ring_element coeff (const cl_UP& x, uintL index)</CODE>
<DD>
-<A NAME="IDX301"></A>
+<A NAME="IDX314"></A>
Returns the coefficient of <CODE>X^index</CODE> in the polynomial <CODE>x</CODE>.
<DT><CODE>cl_ring_element x (const cl_ring_element& y)</CODE>
<DD>
-<A NAME="IDX302"></A>
+<A NAME="IDX315"></A>
Evaluation: If <CODE>x</CODE> is a polynomial and <CODE>y</CODE> belongs to the base ring,
then <SAMP>`x(y)'</SAMP> returns the value of the substitution of <CODE>y</CODE> into
<CODE>x</CODE>.
<DT><CODE>cl_UP deriv (const cl_UP& x)</CODE>
<DD>
-<A NAME="IDX303"></A>
+<A NAME="IDX316"></A>
Returns the derivative of the polynomial <CODE>x</CODE> with respect to the
indeterminate <CODE>X</CODE>.
</DL>
<DT><CODE>void fprint (cl_ostream stream, const cl_UP& x)</CODE>
<DD>
-<A NAME="IDX304"></A>
+<A NAME="IDX317"></A>
<DT><CODE>cl_ostream operator<< (cl_ostream stream, const cl_UP& x)</CODE>
<DD>
-<A NAME="IDX305"></A>
+<A NAME="IDX318"></A>
Prints the univariate polynomial <CODE>x</CODE> on the <CODE>stream</CODE>. The output may
depend on the global printer settings in the variable
-<CODE>cl_default_print_flags</CODE>.
+<CODE>default_print_flags</CODE>.
</DL>
<DL COMPACT>
-<DT><CODE>cl_UP_I cl_tschebychev (sintL n)</CODE>
+<DT><CODE>cl_UP_I tschebychev (sintL n)</CODE>
<DD>
-<A NAME="IDX306"></A>
-<A NAME="IDX307"></A>
-Returns the n-th Tchebychev polynomial (n >= 0).
+<A NAME="IDX319"></A>
+<A NAME="IDX320"></A>
+Returns the n-th Chebyshev polynomial (n >= 0).
-<DT><CODE>cl_UP_I cl_hermite (sintL n)</CODE>
+<DT><CODE>cl_UP_I hermite (sintL n)</CODE>
<DD>
-<A NAME="IDX308"></A>
-<A NAME="IDX309"></A>
+<A NAME="IDX321"></A>
+<A NAME="IDX322"></A>
Returns the n-th Hermite polynomial (n >= 0).
-<DT><CODE>cl_UP_RA cl_legendre (sintL n)</CODE>
+<DT><CODE>cl_UP_RA legendre (sintL n)</CODE>
<DD>
-<A NAME="IDX310"></A>
-<A NAME="IDX311"></A>
+<A NAME="IDX323"></A>
+<A NAME="IDX324"></A>
Returns the n-th Legendre polynomial (n >= 0).
-<DT><CODE>cl_UP_I cl_laguerre (sintL n)</CODE>
+<DT><CODE>cl_UP_I laguerre (sintL n)</CODE>
<DD>
-<A NAME="IDX312"></A>
-<A NAME="IDX313"></A>
+<A NAME="IDX325"></A>
+<A NAME="IDX326"></A>
Returns the n-th Laguerre polynomial (n >= 0).
</DL>
<HTML>
<HEAD>
-<!-- Created by texi2html 1.56k from cln.texi on 2 June 2000 -->
+<!-- Created by texi2html 1.56k from cln.texi on 28 August 2000 -->
<TITLE>CLN, a Class Library for Numbers - Table of Contents</TITLE>
</HEAD>
<LI><A NAME="TOC64" HREF="cln_11.html#SEC64">11. Using the library</A>
<UL>
<LI><A NAME="TOC65" HREF="cln_11.html#SEC65">11.1 Compiler options</A>
-<LI><A NAME="TOC66" HREF="cln_11.html#SEC66">11.2 Include files</A>
-<LI><A NAME="TOC67" HREF="cln_11.html#SEC67">11.3 An Example</A>
-<LI><A NAME="TOC68" HREF="cln_11.html#SEC68">11.4 Debugging support</A>
+<LI><A NAME="TOC66" HREF="cln_11.html#SEC66">11.2 Compatibility to old CLN versions</A>
+<LI><A NAME="TOC67" HREF="cln_11.html#SEC67">11.3 Include files</A>
+<LI><A NAME="TOC68" HREF="cln_11.html#SEC68">11.4 An Example</A>
+<LI><A NAME="TOC69" HREF="cln_11.html#SEC69">11.5 Debugging support</A>
</UL>
-<LI><A NAME="TOC69" HREF="cln_12.html#SEC69">12. Customizing</A>
+<LI><A NAME="TOC70" HREF="cln_12.html#SEC70">12. Customizing</A>
<UL>
-<LI><A NAME="TOC70" HREF="cln_12.html#SEC70">12.1 Error handling</A>
-<LI><A NAME="TOC71" HREF="cln_12.html#SEC71">12.2 Floating-point underflow</A>
-<LI><A NAME="TOC72" HREF="cln_12.html#SEC72">12.3 Customizing I/O</A>
-<LI><A NAME="TOC73" HREF="cln_12.html#SEC73">12.4 Customizing the memory allocator</A>
+<LI><A NAME="TOC71" HREF="cln_12.html#SEC71">12.1 Error handling</A>
+<LI><A NAME="TOC72" HREF="cln_12.html#SEC72">12.2 Floating-point underflow</A>
+<LI><A NAME="TOC73" HREF="cln_12.html#SEC73">12.3 Customizing I/O</A>
+<LI><A NAME="TOC74" HREF="cln_12.html#SEC74">12.4 Customizing the memory allocator</A>
</UL>
-<LI><A NAME="TOC74" HREF="cln_13.html#SEC74">Index</A>
+<LI><A NAME="TOC75" HREF="cln_13.html#SEC75">Index</A>
</UL>
<P><HR><P>
-This document was generated on 2 June 2000 using
+This document was generated on 28 August 2000 using
<A HREF="http://wwwinfo.cern.ch/dis/texi2html/">texi2html</A> 1.56k.
</BODY>
</HTML>
clean : force
$(RM) *.s *.o *.a $(PROGRAMS) a.out core
+ $(RM) -r .libs _libs
distclean : clean
$(RM) config.status config.log config.cache Makefile
// Computation of arctan(1/m) (m integer) to high precision.
-#include "cl_integer.h"
-#include "cl_rational.h"
-#include "cl_real.h"
-#include "cl_lfloat.h"
+#include "cln/integer.h"
+#include "cln/rational.h"
+#include "cln/real.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
#include "cl_LF_tran.h"
#include "cl_alloca.h"
#include <stdlib.h>
#include <string.h>
-#include "cl_timing.h"
+#include "cln/timing.h"
#undef floor
#include <math.h>
#define floor cln_floor
+using namespace cln;
// Method 1: atan(1/m) = sum(n=0..infty, (-1)^n/(2n+1) * 1/m^(2n+1))
// Method 2: atan(1/m) = sum(n=0..infty, 4^n*n!^2/(2n+1)! * m/(m^2+1)^(n+1))
{
var uintC actuallen = len + 1;
var cl_I m2 = m*m;
- var sintL N = (sintL)(0.69314718*intDsize/2*actuallen/log(cl_double_approx(m))) + 1;
+ var sintL N = (sintL)(0.69314718*intDsize/2*actuallen/log(double_approx(m))) + 1;
var cl_I num = 0, den = 1; // "lazy rational number"
for (sintL n = N-1; n>=0; n--) {
// Multiply sum with 1/m^2:
{
var uintC actuallen = len + 1;
var cl_I m2 = m*m;
- var uintL N = (uintL)(0.69314718*intDsize/2*actuallen/log(cl_double_approx(m))) + 1;
+ var uintL N = (uintL)(0.69314718*intDsize/2*actuallen/log(double_approx(m))) + 1;
CL_ALLOCA_STACK;
var cl_I* bv = (cl_I*) cl_alloca(N*sizeof(cl_I));
var cl_I* qv = (cl_I*) cl_alloca(N*sizeof(cl_I));
{
var uintC actuallen = len + 1;
var cl_I m2 = m*m+1;
- var uintL N = (uintL)(0.69314718*intDsize*actuallen/log(cl_double_approx(m2))) + 1;
+ var uintL N = (uintL)(0.69314718*intDsize*actuallen/log(double_approx(m2))) + 1;
var cl_I num = 0, den = 1; // "lazy rational number"
for (uintL n = N; n>0; n--) {
// Multiply sum with (2n)/(2n+1)(m^2+1):
{
var uintC actuallen = len + 1;
var cl_I m2 = m*m+1;
- var uintL N = (uintL)(0.69314718*intDsize*actuallen/log(cl_double_approx(m2))) + 1;
+ var uintL N = (uintL)(0.69314718*intDsize*actuallen/log(double_approx(m2))) + 1;
CL_ALLOCA_STACK;
var cl_I* pv = (cl_I*) cl_alloca(N*sizeof(cl_I));
var cl_I* qv = (cl_I*) cl_alloca(N*sizeof(cl_I));
// Computation of artanh(1/m) (m integer) to high precision.
-#include "cl_integer.h"
-#include "cl_rational.h"
-#include "cl_real.h"
-#include "cl_complex.h"
-#include "cl_lfloat.h"
+#include "cln/integer.h"
+#include "cln/rational.h"
+#include "cln/real.h"
+#include "cln/complex.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
#include "cl_LF_tran.h"
#include "cl_alloca.h"
#include <stdlib.h>
#include <string.h>
-#include "cl_timing.h"
+#include "cln/timing.h"
#undef floor
-#include <math.h>
+#include <cmath>
#define floor cln_floor
{
var uintC actuallen = len + 1;
var cl_I m2 = m*m;
- var sintL N = (sintL)(0.69314718*intDsize/2*actuallen/log(cl_double_approx(m))) + 1;
+ var sintL N = (sintL)(0.69314718*intDsize/2*actuallen/log(double_approx(m))) + 1;
var cl_I num = 0, den = 1; // "lazy rational number"
for (sintL n = N-1; n>=0; n--) {
// Multiply sum with 1/m^2:
{
var uintC actuallen = len + 1;
var cl_I m2 = m*m;
- var uintL N = (uintL)(0.69314718*intDsize/2*actuallen/log(cl_double_approx(m))) + 1;
+ var uintL N = (uintL)(0.69314718*intDsize/2*actuallen/log(double_approx(m))) + 1;
CL_ALLOCA_STACK;
var cl_I* bv = (cl_I*) cl_alloca(N*sizeof(cl_I));
var cl_I* qv = (cl_I*) cl_alloca(N*sizeof(cl_I));
{
var uintC actuallen = len + 1;
var cl_I m2 = m*m-1;
- var uintL N = (uintL)(0.69314718*intDsize*actuallen/log(cl_double_approx(m2))) + 1;
+ var uintL N = (uintL)(0.69314718*intDsize*actuallen/log(double_approx(m2))) + 1;
var cl_I num = 0, den = 1; // "lazy rational number"
for (uintL n = N; n>0; n--) {
// Multiply sum with -(2n)/(2n+1)(m^2+1):
{
var uintC actuallen = len + 1;
var cl_I m2 = m*m-1;
- var uintL N = (uintL)(0.69314718*intDsize*actuallen/log(cl_double_approx(m2))) + 1;
+ var uintL N = (uintL)(0.69314718*intDsize*actuallen/log(double_approx(m2))) + 1;
CL_ALLOCA_STACK;
var cl_I* pv = (cl_I*) cl_alloca(N*sizeof(cl_I));
var cl_I* qv = (cl_I*) cl_alloca(N*sizeof(cl_I));
// Print the continued fraction of a real number.
// We work with real numbers and integers.
-#include <cl_real.h>
-#include <cl_integer.h>
+#include <cln/real.h>
+#include <cln/integer.h>
// We do I/O.
-#include <cl_io.h>
-#include <cl_integer_io.h>
+#include <cln/io.h>
+#include <cln/integer_io.h>
+
+using namespace cln;
// Our private error handling: return to the main program.
#include <setjmp.h>
jmp_buf restartpoint;
-void cl_abort (void) { longjmp(restartpoint,1); }
+namespace cln {
+ void cl_abort (void) { longjmp(restartpoint,1); }
+}
int main (int argc, char* argv[])
{
cl_R x = arg;
// Check sign.
if (minusp(x)) {
- fprint(cl_stdout, "-");
+ stdout << '-';
x = -x;
}
- fprint(cl_stdout, "[");
+ fprint(stdout, "[");
const char* separator = "; ";
for (;;) {
// Split x into integral and fractional part.
cl_R_div_t x_split = floor2(x);
- fprint(cl_stdout, x_split.quotient);
+ stdout << x_split.quotient;
x = x_split.remainder;
if (zerop(x))
break;
- fprint(cl_stdout, separator);
+ stdout << separator;
separator = ", ";
// Invert x.
x = recip(x);
}
- fprint(cl_stdout, "]\n");
+ stdout << ']' << std::endl;
}
}
* conversion to decimal: real time: 54507.003 s, run time: 40063.510 s
*/
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_integer_io.h>
-#include <cl_float.h>
-#include <cl_float_io.h>
-#include <cl_real.h>
-#include <cl_complex.h>
-#include <stdlib.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/integer_io.h>
+#include <cln/float.h>
+#include <cln/float_io.h>
+#include <cln/real.h>
+#include <cln/complex.h>
#include <string.h>
-#include <cl_timing.h>
-#include <math.h>
+#include <cln/timing.h>
+#include <cmath>
+
+using namespace std;
+using namespace cln;
void
sum_exp1 (uintL a, uintL b, cl_I & first, cl_I & second)
}
}
+namespace cln {
+ extern cl_LF cl_I_to_LF(const cl_I&, uintC);
+};
+
void
const_exp1 (cl_LF & result, uintL dec)
{
- uintL c = (uintL) (dec * log (10));
+ uintL c = (uintL) (dec * ::log (10));
uintL n = dec;
uintC actuallen = (uintC)(3.321928094 * dec / intDsize);
- n = (uintL) ((n + c) / log ((double)n));
- n = (uintL) ((n + c) / log ((double)n));
- n = (uintL) ((n + c) / log ((double)n));
+ n = (uintL) ((n + c) / ::log ((double)n));
+ n = (uintL) ((n + c) / ::log ((double)n));
+ n = (uintL) ((n + c) / ::log ((double)n));
n += 2;
actuallen += 2;
cl_I p, q;
sum_exp1 (0, n, p, q);
cout << "sum_exp1 ends ok" << endl;
- extern cl_LF cl_I_to_LF(const cl_I&, uintC);
result = The(cl_LF)(cl_I_to_LF (p, actuallen) / cl_I_to_LF (q, actuallen));
cout << "const_exp1 returns ok" << endl;
}
break;
}
if (argc < 1)
- exit(1);
+ return(1);
cl_LF c1;
long l = digits;
cout << c1 << endl;
cout << "@" << endl;
}
+ return(0);
}
// Compute and print the n-th Fibonacci number.
// We work with integers and real numbers.
-#include <cl_integer.h>
-#include <cl_real.h>
+#include <cln/integer.h>
+#include <cln/real.h>
// We do I/O.
-#include <cl_io.h>
-#include <cl_integer_io.h>
+#include <cln/io.h>
+#include <cln/integer_io.h>
// We use the timing functions.
-#include <cl_timing.h>
+#include <cln/timing.h>
-// Declare the exit() function.
-#include <stdlib.h>
+using namespace std;
+using namespace cln;
// F_n is defined through the recurrence relation
// F_0 = 0, F_1 = 1, F_(n+2) = F_(n+1) + F_n.
}
}
+// The next routine is a variation of the above. It is mathematically
+// equivalent but implemented in a non-recursive way.
+const cl_I fibonacci_compact (int n)
+{
+ if (n==0)
+ return 0;
+ cl_I u = 0;
+ cl_I v = 1;
+ cl_I m = n/2; // floor(n/2)
+ for (uintL bit=integer_length(m); bit>0; --bit) {
+ // Since a squaring is cheaper than a multiplication, better use
+ // three squarings instead of one multiplication and two squarings.
+ cl_I u2 = square(u);
+ cl_I v2 = square(v);
+ if (logbitp(bit-1, m)) {
+ v = square(u + v) - u2;
+ u = u2 + v2;
+ } else {
+ u = v2 - square(v - u);
+ v = u2 + v2;
+ }
+ }
+ if (n==2*m)
+ // Here we don't use the squaring formula because
+ // one multiplication is cheaper than two squarings.
+ return u * ((v << 1) - u);
+ else
+ return square(u) + square(v);
+}
+
// Returns just F_n, computed as the nearest integer to
// ((1+sqrt(5))/2)^n/sqrt(5). Assume n>=0.
const cl_I fibonacci_slow (int n)
{
// Need a precision of ((1+sqrt(5))/2)^-n.
- cl_float_format_t prec = cl_float_format((int)(0.208987641*n+5));
+ float_format_t prec = float_format((int)(0.208987641*n+5));
cl_R sqrt5 = sqrt(cl_float(5,prec));
cl_R phi = (1+sqrt5)/2;
return round1( expt(phi,n)/sqrt5 );
int main (int argc, char* argv[])
{
if (argc != 2) {
- fprint(cl_stderr, "Usage: fibonacci n\n");
- exit(1);
+ stderr << "Usage: fibonacci n" << endl;
+ return(1);
}
int n = atoi(argv[1]);
- fprint(cl_stdout, "fib(");
- fprintdecimal(cl_stdout, n);
- fprint(cl_stdout, ") = ");
- fprint(cl_stdout, fibonacci(n));
- fprint(cl_stdout, "\n");
+ stdout << "fib(" << n << ") = " << fibonacci(n) << endl;
+ return(0);
}
#else // TIMING
int main (int argc, char* argv[])
{
- int repetitions = 1;
+ int repetitions = 100;
if ((argc >= 3) && !strcmp(argv[1],"-r")) {
repetitions = atoi(argv[2]);
argc -= 2; argv += 2;
}
if (argc != 2) {
- fprint(cl_stderr, "Usage: fibonacci n\n");
- exit(1);
+ stderr << "Usage: fibonacci n" << endl;
+ return(1);
}
int n = atoi(argv[1]);
{ CL_TIMING;
- fprint(cl_stdout, "fib(");
- fprintdecimal(cl_stdout, n);
- fprint(cl_stdout, ") = ");
+ stdout << "fib(" << n << ") = ";
for (int rep = repetitions-1; rep > 0; rep--)
fibonacci(n);
- fprint(cl_stdout, fibonacci(n));
- fprint(cl_stdout, "\n");
+ stdout << fibonacci(n) << endl;
+ }
+ { CL_TIMING;
+ stdout << "fib(" << n << ") = ";
+ for (int rep = repetitions-1; rep > 0; rep--)
+ fibonacci_compact(n);
+ stdout << fibonacci_compact(n) << endl;
}
{ CL_TIMING;
- fprint(cl_stdout, "fib(");
- fprintdecimal(cl_stdout, n);
- fprint(cl_stdout, ") = ");
+ stdout << "fib(" << n << ") = ";
for (int rep = repetitions-1; rep > 0; rep--)
fibonacci_slow(n);
- fprint(cl_stdout, fibonacci_slow(n));
- fprint(cl_stdout, "\n");
+ stdout << fibonacci_slow(n) << endl;
}
+ return(0);
}
#endif
// Compute the Legendre polynomials.
-#include <cl_number.h>
-#include <cl_integer.h>
-#include <cl_rational.h>
-#include <cl_univpoly.h>
-#include <cl_modinteger.h>
-#include <cl_univpoly_rational.h>
-#include <cl_univpoly_modint.h>
-#include <cl_io.h>
+#include <cln/number.h>
+#include <cln/integer.h>
+#include <cln/rational.h>
+#include <cln/univpoly.h>
+#include <cln/modinteger.h>
+#include <cln/univpoly_rational.h>
+#include <cln/univpoly_modint.h>
+#include <cln/io.h>
#include <stdlib.h>
+using namespace cln;
+
// Computes the n-th Legendre polynomial in R[x], using the formula
// P_n(x) = 1/(2^n n!) * (d/dx)^n (x^2-1)^n. (Assume n >= 0.)
const cl_UP_RA legendre (const cl_rational_ring& R, int n)
{
- cl_univpoly_rational_ring PR = cl_find_univpoly_ring(R);
+ cl_univpoly_rational_ring PR = find_univpoly_ring(R);
cl_UP_RA b = PR->create(2);
b.set_coeff(2,1);
b.set_coeff(1,0);
const cl_UP_MI legendre (const cl_modint_ring& R, int n)
{
- cl_univpoly_modint_ring PR = cl_find_univpoly_ring(R);
+ cl_univpoly_modint_ring PR = find_univpoly_ring(R);
cl_UP_MI b = PR->create(2);
b.set_coeff(2,R->canonhom(1));
b.set_coeff(1,R->canonhom(0));
int main (int argc, char* argv[])
{
if (!(argc == 2 || argc == 3)) {
- fprint(cl_stderr, "Usage: legendre n [m]\n");
+ fprint(stderr, "Usage: legendre n [m]\n");
exit(1);
}
int n = atoi(argv[1]);
if (!(n >= 0)) {
- fprint(cl_stderr, "Usage: legendre n [m] with n >= 0\n");
+ fprint(stderr, "Usage: legendre n [m] with n >= 0\n");
exit(1);
}
if (argc == 2) {
cl_UP p = legendre(cl_RA_ring,n);
- fprint(cl_stdout, p);
+ fprint(stdout, p);
} else {
cl_I m = argv[2];
- cl_UP p = legendre(cl_find_modint_ring(m),n);
- fprint(cl_stdout, p);
+ cl_UP p = legendre(find_modint_ring(m),n);
+ fprint(stdout, p);
}
- fprint(cl_stdout, "\n");
+ fprint(stdout, "\n");
}
// Seminumerical Algorithms, second edition. Section 4.5.4, p. 391.]
// We work with integers.
-#include <cl_integer.h>
+#include <cln/integer.h>
+
+using namespace std;
+using namespace cln;
// Checks whether 2^q-1 is prime, q an odd prime.
bool mersenne_prime_p (int q)
}
// Now we work with modular integers.
-#include <cl_modinteger.h>
+#include <cln/modinteger.h>
// Same thing, but using modular integers.
bool mersenne_prime_p_modint (int q)
{
cl_I m = ((cl_I)1 << q) - 1;
- cl_modint_ring R = cl_find_modint_ring(m); // Z/mZ
+ cl_modint_ring R = find_modint_ring(m); // Z/mZ
int i;
cl_MI L_i;
for (i = 0, L_i = R->canonhom(4); i < q-2; i++)
return R->equal(L_i,R->zero());
}
-#include <cl_io.h> // we do I/O
+#include <cln/io.h> // we do I/O
#include <stdlib.h> // declares exit()
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char* argv[])
{
if (!(argc == 2)) {
- fprint(cl_stderr, "Usage: lucaslehmer exponent\n");
+ cerr << "Usage: lucaslehmer exponent" << endl;
exit(1);
}
int q = atoi(argv[1]);
if (!(q >= 2 && ((q % 2)==1))) {
- fprint(cl_stderr, "Usage: lucaslehmer q with q odd prime\n");
+ cerr << "Usage: lucaslehmer q with q odd prime" << endl;
exit(1);
}
bool isprime;
{ CL_TIMING; isprime = mersenne_prime_p(q); }
{ CL_TIMING; isprime = mersenne_prime_p_opt(q); }
{ CL_TIMING; isprime = mersenne_prime_p_modint(q); }
- fprint(cl_stdout, "2^");
- fprintdecimal(cl_stdout, q);
- fprint(cl_stdout, "-1 is ");
+ cout << "2^" << q << "-1 is ";
if (isprime)
- fprint(cl_stdout, "prime");
+ cout << "prime" << endl;
else
- fprint(cl_stdout, "composite");
- fprint(cl_stdout, "\n");
+ cout << "composite" << endl;
}
// Computing time on a i486, 33 MHz:
// command line.
// We work with real numbers and integers.
-#include <cl_real.h>
-#include <cl_integer.h>
+#include <cln/real.h>
+#include <cln/integer.h>
// We do I/O.
-#include <cl_io.h>
-#include <cl_integer_io.h>
+#include <cln/io.h>
+#include <cln/integer_io.h>
// The function nextprobprime() is part of the number theory package.
-#include <cl_numtheory.h>
+#include <cln/numtheory.h>
int main (int argc, char* argv[])
{
if (argc != 2) {
- fprint(cl_stderr, "Usage: nextprime x\n");
- exit(1);
+ cln::stderr << "Usage: nextprime x" << std::endl;
+ return(1);
}
- cl_R x = (cl_R)argv[1];
- cl_I p = nextprobprime(x);
- fprint(cl_stdout, p);
- fprint(cl_stdout, "\n");
+ cln::cl_R x = (cln::cl_R)argv[1];
+ cln::cl_I p = cln::nextprobprime(x);
+ cln::stdout << p << std::endl;
+ return(0);
}
-// This program prints the largest now known perfect number.
+// This program prints the largest now known even perfect number.
-#include <cl_integer.h>
-#include <cl_integer_io.h>
+#include <cln/integer.h>
+#include <cln/integer_io.h>
+
+using namespace std;
+using namespace cln;
int main ()
{
- int p = 1398269; // previous one was 1257787
+ // previous ones were 1257787, 1398269, 2976221, 3021377
+ int p = 6972593;
cl_I x = (((cl_I)1 << p) - 1) << (p-1);
cout << x << endl;
}
+++ /dev/null
-// Defines CPU and compiler dependent macros
-
-#ifndef _CL_CONFIG_H
-#define _CL_CONFIG_H
-
-/* These definitions are adjusted by `configure' automatically. */
-
-
-/* release version */
-
-#undef CL_VERSION
-#undef CL_VERSION_MINOR
-#undef CL_VERSION_PATCHLEVEL
-
-
-/* CPU */
-#ifndef __i386__
-#undef __i386__
-#endif
-#ifndef __m68k__
-#undef __m68k__
-#endif
-#ifndef __mips__
-#undef __mips__
-#endif
-#ifndef __mips64__
-#undef __mips64__
-#endif
-#ifndef __sparc__
-#undef __sparc__
-#endif
-#ifndef __sparc64__
-#undef __sparc64__
-#endif
-#ifndef __alpha__
-#undef __alpha__
-#endif
-#ifndef __hppa__
-#undef __hppa__
-#endif
-#ifndef __arm__
-#undef __arm__
-#endif
-#ifndef __rs6000__
-#undef __rs6000__
-#endif
-#ifndef __m88k__
-#undef __m88k__
-#endif
-#ifndef __convex__
-#undef __convex__
-#endif
-
-
-/* assembler syntax */
-
-/* CL_AS_UNDERSCORE */
-/* Define if C symbols are prefixed by an underscore in assembly language. */
-#undef ASM_UNDERSCORE
-
-
-/* compiler characteristics */
-
-/* CL_BOOL */
-/* Define if your compiler understands the bool type. */
-#undef HAVE_BOOL
-/* Define this as `int' if your compiler doesn't understand the bool type. */
-#undef bool
-
-/* CL_LONGLONG */
-/* Define if your compiler supports the `long long' type. */
-#undef HAVE_LONGLONG
-
-/* CL_LONGDOUBLE */
-/* Define if your compiler supports the `long double' type. */
-#undef HAVE_LONGDOUBLE
-
-/* CL_TEMPLATE_NULL */
-/* Define if your compiler supports the `template <>' syntax. */
-#undef HAVE_TEMPLATE_NULL
-
-
-/* header files */
-
-/* CL_UNISTD_H */
-/* Define if you have <unistd.h>. */
-#undef HAVE_UNISTD_H
-
-
-/* functions and declarations */
-
-/* CL_ALLOCA */
-/* Define if you have <alloca.h> and it should be used (not Ultrix). */
-#undef HAVE_ALLOCA_H
-/* Define if you need to link with an external alloca.o when using alloca(). */
-#undef NO_ALLOCA
-
-
-/* compiler characteristics */
-
-/* CL_GLOBAL_CONSTRUCTORS */
-/* Define as the prefix of the name of a module's global constructor function,
- cf. macro FILE_FUNCTION_FORMAT in gcc/tree.c. */
-#ifndef CL_GLOBAL_CONSTRUCTOR_PREFIX
-#undef CL_GLOBAL_CONSTRUCTOR_PREFIX
-#endif
-/* Define as the prefix of the name of a module's global destructor function,
- cf. macro FILE_FUNCTION_FORMAT in gcc/tree.c. */
-#ifndef CL_GLOBAL_DESTRUCTOR_PREFIX
-#undef CL_GLOBAL_DESTRUCTOR_PREFIX
-#endif
-/* Define if a module's global constructor function and global destructor
- function need to be exported in order to be accessible from other modules. */
-#undef CL_NEED_GLOBALIZE_CTORDTOR
-
-/* CL_CHAR_UNSIGNED */
-#ifndef __CHAR_UNSIGNED__
-#undef __CHAR_UNSIGNED__
-#endif
-
-/* CL_MACHINE */
-/* see cl_intparam.h */
-/* see cl_floatparam.h */
-
-
-#endif /* _CL_CONFIG_H */
-
+++ /dev/null
-// Floating point format specifiers.
-
-#ifndef _CL_FLOATFORMAT_H
-#define _CL_FLOATFORMAT_H
-
-#include "cl_types.h"
-
-// Float format specifier type. (Float mantissa precision in bits.)
-typedef enum cl_float_format_t {
- cl_float_format_sfloat = 17,
- cl_float_format_ffloat = 24,
- cl_float_format_dfloat = 53,
- cl_float_format_lfloat_min = ((53+intDsize-1)/intDsize)*intDsize // = round_up(53,intDsize)
-};
-
-#endif /* _CL_FLOATFORMAT_H */
+++ /dev/null
-// CLN exported types and functions
-
-#ifndef _CLN_H
-#define _CLN_H
-
-// Automatically generated by configure
-//#include "cl_config.h" // included by "cl_types.h" below
-//#include "cl_intparam.h" // included by "cl_types.h" below
-//#include "cl_floatparam.h" // not needed by any public header file
-
-// ============================== base ==============================
-
-// Basic types and definitions.
-#include "cl_types.h"
-#include "cl_modules.h"
-#include "cl_object.h"
-
-// Miscellaneous.
-#include "cl_random.h"
-#include "cl_malloc.h"
-#include "cl_abort.h"
-#include "cl_floatformat.h"
-#include "cl_io.h"
-#include "cl_condition.h"
-
-// Symbolic facilities.
-#include "cl_string.h"
-#include "cl_symbol.h"
-#include "cl_proplist.h"
-
-// Miscellaneous.
-#include "cl_input.h"
-#include "cl_output.h"
-
-// Abstract number classes.
-#include "cl_number.h"
-#include "cl_number_io.h"
-#include "cl_complex_class.h"
-#include "cl_real_class.h"
-#include "cl_rational_class.h"
-
-// Rings.
-#include "cl_ring.h"
-
-// ============================== integer ==============================
-
-// Integers.
-#include "cl_integer_class.h"
-#include "cl_integer.h"
-#include "cl_integer_io.h"
-#include "cl_integer_ring.h"
-#include "cl_null_ring.h"
-
-// ============================== rational ==============================
-
-// Rational numbers.
-#include "cl_rational.h"
-#include "cl_rational_io.h"
-#include "cl_rational_ring.h"
-
-// ============================== float ==============================
-
-// Floating-point numbers.
-#include "cl_float_class.h"
-#include "cl_sfloat_class.h"
-#include "cl_ffloat_class.h"
-#include "cl_dfloat_class.h"
-#include "cl_lfloat_class.h"
-#include "cl_float.h"
-#include "cl_float_io.h"
-#include "cl_sfloat.h"
-#include "cl_sfloat_io.h"
-#include "cl_ffloat.h"
-#include "cl_ffloat_io.h"
-#include "cl_dfloat.h"
-#include "cl_dfloat_io.h"
-#include "cl_lfloat.h"
-#include "cl_lfloat_io.h"
-
-// ============================== real ==============================
-
-// Real numbers.
-#include "cl_real.h"
-#include "cl_real_io.h"
-#include "cl_real_ring.h"
-
-// ============================== complex ==============================
-
-// Complex numbers.
-#include "cl_complex.h"
-#include "cl_complex_io.h"
-#include "cl_complex_ring.h"
-
-// ============================== modinteger ==============================
-
-// Modular integers.
-#include "cl_modinteger.h"
-
-// ============================== numtheory ==============================
-
-// Rings for number theory.
-#include "cl_numtheory.h"
-
-// ============================== vector ==============================
-
-// Vectors.
-#include "cl_V.h"
-#include "cl_GV.h"
-#include "cl_GV_number.h"
-#include "cl_GV_complex.h"
-#include "cl_GV_real.h"
-#include "cl_GV_rational.h"
-#include "cl_GV_integer.h"
-#include "cl_GV_modinteger.h"
-#include "cl_SV.h"
-#include "cl_SV_number.h"
-#include "cl_SV_complex.h"
-#include "cl_SV_real.h"
-#include "cl_SV_rational.h"
-#include "cl_SV_integer.h"
-#include "cl_SV_ringelt.h"
-
-// ============================== polynomial ==============================
-
-// Polynomials.
-#include "cl_univpoly.h"
-#include "cl_univpoly_complex.h"
-#include "cl_univpoly_real.h"
-#include "cl_univpoly_rational.h"
-#include "cl_univpoly_integer.h"
-#include "cl_univpoly_modint.h"
-
-// ============================== modpolynomial ==============================
-
-// ============================== timing ==============================
-
-// Environmental facilities.
-#include "cl_timing.h"
-
-#endif /* _CLN_H */
-
#ifndef _CL_GV_H
#define _CL_GV_H
-#include "cl_object.h"
-#include "cl_V.h"
-#include "cl_abort.h"
+#include "cln/object.h"
+#include "cln/V.h"
+#include "cln/abort.h"
#include <stdlib.h>
+namespace cln {
// A vector is a structure having the following interface:
// v.length() returns the number of elements
// This inline function is for type checking purposes only.
inline const cl_GV_any& cl_identity (const cl_GV_any& x) { return x; }
+} // namespace cln
#endif /* _CL_GV_H */
#ifndef _CL_GV_COMPLEX_H
#define _CL_GV_COMPLEX_H
-#include "cl_number.h"
-#include "cl_GV_number.h"
-#include "cl_complex_class.h"
-#include "cl_io.h"
+#include "cln/number.h"
+#include "cln/GV_number.h"
+#include "cln/complex_class.h"
+#include "cln/io.h"
+
+namespace cln {
// A vector of complex numbers is just a normal vector of numbers.
// Output.
inline void fprint (cl_ostream stream, const cl_GV_N& x)
{
- extern cl_print_flags cl_default_print_flags;
+ extern cl_print_flags default_print_flags;
extern void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* fun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_GV_number& vector);
extern void print_complex (cl_ostream stream, const cl_print_flags& flags, const cl_N& z);
- print_vector(stream, cl_default_print_flags,
+ print_vector(stream, default_print_flags,
(void (*) (cl_ostream, const cl_print_flags&, const cl_number&))
(void (*) (cl_ostream, const cl_print_flags&, const cl_N&))
&print_complex,
}
CL_DEFINE_PRINT_OPERATOR(cl_GV_N)
+} // namespace cln
+
#endif /* _CL_GV_COMPLEX_H */
#ifndef _CL_GV_INTEGER_H
#define _CL_GV_INTEGER_H
-#include "cl_number.h"
-#include "cl_GV_rational.h"
-#include "cl_integer_class.h"
-#include "cl_io.h"
+#include "cln/number.h"
+#include "cln/GV_rational.h"
+#include "cln/integer_class.h"
+#include "cln/io.h"
+
+namespace cln {
// A vector of integers is *not* just a normal vector of numbers (the vectorops
// support the maxbits() operation), but we treat can it like this nevertheless.
// Output.
inline void fprint (cl_ostream stream, const cl_GV_I& x)
{
- extern cl_print_flags cl_default_print_flags;
+ extern cl_print_flags default_print_flags;
extern void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* fun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_GV_number& vector);
extern void print_integer (cl_ostream stream, const cl_print_flags& flags, const cl_I& z);
- print_vector(stream, cl_default_print_flags,
+ print_vector(stream, default_print_flags,
(void (*) (cl_ostream, const cl_print_flags&, const cl_number&))
(void (*) (cl_ostream, const cl_print_flags&, const cl_I&))
&print_integer,
};
#endif
+} // namespace cln
+
#endif /* _CL_GV_INTEGER_H */
#ifndef _CL_GV_MODINTEGER_H
#define _CL_GV_MODINTEGER_H
-#include "cl_modinteger.h"
-#include "cl_GV_integer.h"
+#include "cln/modinteger.h"
+#include "cln/GV_integer.h"
+
+namespace cln {
// A vector of modular integers (over the same modular integer ring)
// is just a normal vector of integers, with maxbits() operation.
return The(cl_GV_MI) (copy((const cl_GV_I&) vector));
}
+} // namespace cln
#endif /* _CL_GV_MODINTEGER_H */
#ifndef _CL_GV_NUMBER_H
#define _CL_GV_NUMBER_H
-#include "cl_number.h"
-#include "cl_GV.h"
+#include "cln/number.h"
+#include "cln/GV.h"
+
+namespace cln {
typedef cl_heap_GV<cl_number> cl_heap_GV_number;
};
#endif
+} // namespace cln
+
#endif /* _CL_GV_NUMBER_H */
#ifndef _CL_GV_RATIONAL_H
#define _CL_GV_RATIONAL_H
-#include "cl_number.h"
-#include "cl_GV_real.h"
-#include "cl_rational_class.h"
-#include "cl_io.h"
+#include "cln/number.h"
+#include "cln/GV_real.h"
+#include "cln/rational_class.h"
+#include "cln/io.h"
+
+namespace cln {
// A vector of rational numbers is just a normal vector of real numbers.
// Output.
inline void fprint (cl_ostream stream, const cl_GV_RA& x)
{
- extern cl_print_flags cl_default_print_flags;
+ extern cl_print_flags default_print_flags;
extern void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* fun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_GV_number& vector);
extern void print_rational (cl_ostream stream, const cl_print_flags& flags, const cl_RA& z);
- print_vector(stream, cl_default_print_flags,
+ print_vector(stream, default_print_flags,
(void (*) (cl_ostream, const cl_print_flags&, const cl_number&))
(void (*) (cl_ostream, const cl_print_flags&, const cl_RA&))
&print_rational,
}
CL_DEFINE_PRINT_OPERATOR(cl_GV_RA)
+} // namespace cln
+
#endif /* _CL_GV_RAATIONAL_H */
#ifndef _CL_GV_REAL_H
#define _CL_GV_REAL_H
-#include "cl_number.h"
-#include "cl_GV_complex.h"
-#include "cl_real_class.h"
-#include "cl_io.h"
+#include "cln/number.h"
+#include "cln/GV_complex.h"
+#include "cln/real_class.h"
+#include "cln/io.h"
+
+namespace cln {
// A vector of real numbers is just a normal vector of numbers.
// Output.
inline void fprint (cl_ostream stream, const cl_GV_R& x)
{
- extern cl_print_flags cl_default_print_flags;
+ extern cl_print_flags default_print_flags;
extern void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* fun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_GV_number& vector);
extern void print_real (cl_ostream stream, const cl_print_flags& flags, const cl_R& z);
- print_vector(stream, cl_default_print_flags,
+ print_vector(stream, default_print_flags,
(void (*) (cl_ostream, const cl_print_flags&, const cl_number&))
(void (*) (cl_ostream, const cl_print_flags&, const cl_R&))
&print_real,
}
CL_DEFINE_PRINT_OPERATOR(cl_GV_R)
+} // namespace cln
+
#endif /* _CL_GV_REAL_H */
#ifndef _CL_SV_H
#define _CL_SV_H
-#include "cl_object.h"
-#include "cl_V.h"
-#include "cl_abort.h"
+#include "cln/object.h"
+#include "cln/V.h"
+#include "cln/abort.h"
#include <stdlib.h>
+namespace cln {
// A simple vector has the same operations as a vector, but it can store
// _only_ cl_gcobject's.
// This inline function is for type checking purposes only.
inline const cl_SV_any& cl_identity (const cl_SV_any& x) { return x; }
+} // namespace cln
#endif /* _CL_SV_H */
#ifndef _CL_SV_COMPLEX_H
#define _CL_SV_COMPLEX_H
-#include "cl_number.h"
-#include "cl_SV_number.h"
-#include "cl_complex_class.h"
-#include "cl_io.h"
+#include "cln/number.h"
+#include "cln/SV_number.h"
+#include "cln/complex_class.h"
+#include "cln/io.h"
+
+namespace cln {
// A vector of complex numbers is just a normal vector of numbers.
// Output.
inline void fprint (cl_ostream stream, const cl_SV_N& x)
{
- extern cl_print_flags cl_default_print_flags;
+ extern cl_print_flags default_print_flags;
extern void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* fun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_SV_number& vector);
extern void print_complex (cl_ostream stream, const cl_print_flags& flags, const cl_N& z);
- print_vector(stream, cl_default_print_flags,
+ print_vector(stream, default_print_flags,
(void (*) (cl_ostream, const cl_print_flags&, const cl_number&))
(void (*) (cl_ostream, const cl_print_flags&, const cl_N&))
&print_complex,
}
CL_DEFINE_PRINT_OPERATOR(cl_SV_N)
+} // namespace cln
+
#endif /* _CL_SV_COMPLEX_H */
#ifndef _CL_SV_INTEGER_H
#define _CL_SV_INTEGER_H
-#include "cl_number.h"
-#include "cl_SV_rational.h"
-#include "cl_integer_class.h"
-#include "cl_io.h"
+#include "cln/number.h"
+#include "cln/SV_rational.h"
+#include "cln/integer_class.h"
+#include "cln/io.h"
+
+namespace cln {
// A vector of integers is just a normal vector of rational numbers.
// Output.
inline void fprint (cl_ostream stream, const cl_SV_I& x)
{
- extern cl_print_flags cl_default_print_flags;
+ extern cl_print_flags default_print_flags;
extern void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* fun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_SV_number& vector);
extern void print_integer (cl_ostream stream, const cl_print_flags& flags, const cl_I& z);
- print_vector(stream, cl_default_print_flags,
+ print_vector(stream, default_print_flags,
(void (*) (cl_ostream, const cl_print_flags&, const cl_number&))
(void (*) (cl_ostream, const cl_print_flags&, const cl_I&))
&print_integer,
}
CL_DEFINE_PRINT_OPERATOR(cl_SV_I)
+} // namespace cln
+
#endif /* _CL_SV_INTEGER_H */
#ifndef _CL_SV_NUMBER_H
#define _CL_SV_NUMBER_H
-#include "cl_number.h"
-#include "cl_SV.h"
-#include "cl_io.h"
+#include "cln/number.h"
+#include "cln/SV.h"
+#include "cln/io.h"
+
+namespace cln {
typedef cl_heap_SV<cl_number> cl_heap_SV_number;
};
#endif
+} // namespace cln
+
#endif /* _CL_SV_NUMBER_H */
#ifndef _CL_SV_RATIONAL_H
#define _CL_SV_RATIONAL_H
-#include "cl_number.h"
-#include "cl_SV_real.h"
-#include "cl_rational_class.h"
-#include "cl_io.h"
+#include "cln/number.h"
+#include "cln/SV_real.h"
+#include "cln/rational_class.h"
+#include "cln/io.h"
+
+namespace cln {
// A vector of rational numbers is just a normal vector of real numbers.
// Output.
inline void fprint (cl_ostream stream, const cl_SV_RA& x)
{
- extern cl_print_flags cl_default_print_flags;
+ extern cl_print_flags default_print_flags;
extern void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* fun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_SV_number& vector);
extern void print_rational (cl_ostream stream, const cl_print_flags& flags, const cl_RA& z);
- print_vector(stream, cl_default_print_flags,
+ print_vector(stream, default_print_flags,
(void (*) (cl_ostream, const cl_print_flags&, const cl_number&))
(void (*) (cl_ostream, const cl_print_flags&, const cl_RA&))
&print_rational,
}
CL_DEFINE_PRINT_OPERATOR(cl_SV_RA)
+} // namespace cln
+
#endif /* _CL_SV_RAATIONAL_H */
#ifndef _CL_SV_REAL_H
#define _CL_SV_REAL_H
-#include "cl_number.h"
-#include "cl_SV_complex.h"
-#include "cl_real_class.h"
-#include "cl_io.h"
+#include "cln/number.h"
+#include "cln/SV_complex.h"
+#include "cln/real_class.h"
+#include "cln/io.h"
+
+namespace cln {
// A vector of real numbers is just a normal vector of numbers.
// Output.
inline void fprint (cl_ostream stream, const cl_SV_R& x)
{
- extern cl_print_flags cl_default_print_flags;
+ extern cl_print_flags default_print_flags;
extern void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* fun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_SV_number& vector);
extern void print_real (cl_ostream stream, const cl_print_flags& flags, const cl_R& z);
- print_vector(stream, cl_default_print_flags,
+ print_vector(stream, default_print_flags,
(void (*) (cl_ostream, const cl_print_flags&, const cl_number&))
(void (*) (cl_ostream, const cl_print_flags&, const cl_R&))
&print_real,
}
CL_DEFINE_PRINT_OPERATOR(cl_SV_R)
+} // namespace cln
+
#endif /* _CL_SV_REAL_H */
#ifndef _CL_SV_RINGELT_H
#define _CL_SV_RINGELT_H
-#include "cl_ring.h"
-#include "cl_SV.h"
-#include "cl_io.h"
+#include "cln/ring.h"
+#include "cln/SV.h"
+#include "cln/io.h"
+
+namespace cln {
typedef cl_heap_SV<_cl_ring_element> cl_heap_SV_ringelt;
};
#endif
+} // namespace cln
+
#endif /* _CL_SV_RINGELT_H */
#ifndef _CL_V_H
#define _CL_V_H
-#include "cl_object.h"
+#include "cln/object.h"
+
+namespace cln {
struct cl_V_any : public cl_gcpointer {
// Constructors.
CL_DEFINE_COPY_CONSTRUCTOR2(cl_V_any,cl_gcpointer)
CL_DEFINE_ASSIGNMENT_OPERATOR(cl_V_any,cl_V_any)
+} // namespace cln
+
#endif /* _CL_V_H */
#ifndef _CL_ABORT_H
#define _CL_ABORT_H
+namespace cln {
+
#ifdef _CL_MACROS_H
nonreturning_function(extern, cl_abort, (void));
#else
extern void cl_abort (void);
#endif
+} // namespace cln
+
#endif /* _CL_ABORT_H */
--- /dev/null
+// CLN exported types and functions
+
+#ifndef _CLN_H
+#define _CLN_H
+
+// Automatically generated by configure
+//#include "cln/config.h" // included by "cln/types.h" below
+//#include "cln/intparam.h" // included by "cln/types.h" below
+//#include "cln/floatparam.h" // not needed by any public header file
+
+// ============================== base ==============================
+
+// Basic types and definitions.
+#include "cln/types.h"
+#include "cln/modules.h"
+#include "cln/object.h"
+
+// Miscellaneous.
+#include "cln/random.h"
+#include "cln/malloc.h"
+#include "cln/abort.h"
+#include "cln/floatformat.h"
+#include "cln/io.h"
+#include "cln/condition.h"
+
+// Symbolic facilities.
+#include "cln/string.h"
+#include "cln/symbol.h"
+#include "cln/proplist.h"
+
+// Miscellaneous.
+#include "cln/input.h"
+#include "cln/output.h"
+
+// Abstract number classes.
+#include "cln/number.h"
+#include "cln/number_io.h"
+#include "cln/complex_class.h"
+#include "cln/real_class.h"
+#include "cln/rational_class.h"
+
+// Rings.
+#include "cln/ring.h"
+
+// ============================== integer ==============================
+
+// Integers.
+#include "cln/integer_class.h"
+#include "cln/integer.h"
+#include "cln/integer_io.h"
+#include "cln/integer_ring.h"
+#include "cln/null_ring.h"
+
+// ============================== rational ==============================
+
+// Rational numbers.
+#include "cln/rational.h"
+#include "cln/rational_io.h"
+#include "cln/rational_ring.h"
+
+// ============================== float ==============================
+
+// Floating-point numbers.
+#include "cln/float_class.h"
+#include "cln/sfloat_class.h"
+#include "cln/ffloat_class.h"
+#include "cln/dfloat_class.h"
+#include "cln/lfloat_class.h"
+#include "cln/float.h"
+#include "cln/float_io.h"
+#include "cln/sfloat.h"
+#include "cln/sfloat_io.h"
+#include "cln/ffloat.h"
+#include "cln/ffloat_io.h"
+#include "cln/dfloat.h"
+#include "cln/dfloat_io.h"
+#include "cln/lfloat.h"
+#include "cln/lfloat_io.h"
+
+// ============================== real ==============================
+
+// Real numbers.
+#include "cln/real.h"
+#include "cln/real_io.h"
+#include "cln/real_ring.h"
+
+// ============================== complex ==============================
+
+// Complex numbers.
+#include "cln/complex.h"
+#include "cln/complex_io.h"
+#include "cln/complex_ring.h"
+
+// ============================== modinteger ==============================
+
+// Modular integers.
+#include "cln/modinteger.h"
+
+// ============================== numtheory ==============================
+
+// Rings for number theory.
+#include "cln/numtheory.h"
+
+// ============================== vector ==============================
+
+// Vectors.
+#include "cln/V.h"
+#include "cln/GV.h"
+#include "cln/GV_number.h"
+#include "cln/GV_complex.h"
+#include "cln/GV_real.h"
+#include "cln/GV_rational.h"
+#include "cln/GV_integer.h"
+#include "cln/GV_modinteger.h"
+#include "cln/SV.h"
+#include "cln/SV_number.h"
+#include "cln/SV_complex.h"
+#include "cln/SV_real.h"
+#include "cln/SV_rational.h"
+#include "cln/SV_integer.h"
+#include "cln/SV_ringelt.h"
+
+// ============================== polynomial ==============================
+
+// Polynomials.
+#include "cln/univpoly.h"
+#include "cln/univpoly_complex.h"
+#include "cln/univpoly_real.h"
+#include "cln/univpoly_rational.h"
+#include "cln/univpoly_integer.h"
+#include "cln/univpoly_modint.h"
+
+// ============================== modpolynomial ==============================
+
+// ============================== timing ==============================
+
+// Environmental facilities.
+#include "cln/timing.h"
+
+#endif /* _CLN_H */
+
#ifndef _CL_COMPLEX_H
#define _CL_COMPLEX_H
-#include "cl_number.h"
-#include "cl_complex_class.h"
-#include "cl_real_class.h"
-#include "cl_integer_class.h"
+#include "cln/number.h"
+#include "cln/complex_class.h"
+#include "cln/real_class.h"
+#include "cln/integer_class.h"
+namespace cln {
CL_DEFINE_AS_CONVERSION(cl_N)
// sqrt(x) = (sqrt x) zieht die Wurzel aus einer Zahl x.
extern const cl_N sqrt (const cl_N& x);
-// cl_equal(x,y) vergleicht zwei Zahlen x und y auf Gleichheit.
-extern cl_boolean cl_equal (const cl_N& x, const cl_N& y);
-// cl_equal_hashcode(x) liefert einen cl_equal-invarianten Hashcode für x.
-extern uint32 cl_equal_hashcode (const cl_N& x);
+// equal(x,y) vergleicht zwei Zahlen x und y auf Gleichheit.
+extern cl_boolean equal (const cl_N& x, const cl_N& y);
+// equal_hashcode(x) liefert einen equal-invarianten Hashcode für x.
+extern uint32 equal_hashcode (const cl_N& x);
inline bool operator== (const cl_N& x, const cl_N& y)
- { return cl_equal(x,y); }
+ { return equal(x,y); }
inline bool operator!= (const cl_N& x, const cl_N& y)
- { return !cl_equal(x,y); }
+ { return !equal(x,y); }
// phase(x) liefert (phase x), wo x eine Zahl ist.
// Ergebnis rational nur wenn (= x 0) oder wenn x reell und >0.
// Runtime typing support.
extern cl_class cl_class_complex;
+} // namespace cln
#endif /* _CL_COMPLEX_H */
#ifndef _CL_COMPLEX_CLASS_H
#define _CL_COMPLEX_CLASS_H
-#include "cl_number.h"
+#include "cln/number.h"
+namespace cln {
class cl_N : public cl_number {
public:
cl_N (cl_private_thing);
cl_N (struct cl_heap_complex *);
public: // Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, cl_N* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
private:
// Friend declarations. They are for the compiler. Just ignore them.
};
CL_DEFINE_FLOAT_CONSTRUCTOR(cl_N)
CL_DEFINE_DOUBLE_CONSTRUCTOR(cl_N)
+} // namespace cln
#endif /* _CL_COMPLEX_CLASS_H */
#ifndef _CL_COMPLEX_IO_H
#define _CL_COMPLEX_IO_H
-#include "cl_number_io.h"
-#include "cl_complex.h"
+#include "cln/number_io.h"
+#include "cln/complex.h"
+namespace cln {
// Undocumented input functions
inline void fprint (cl_ostream stream, const cl_N& x)
{
- extern cl_print_flags cl_default_print_flags;
- print_complex(stream,cl_default_print_flags,x);
+ extern cl_print_flags default_print_flags;
+ print_complex(stream,default_print_flags,x);
}
CL_DEFINE_PRINT_OPERATOR(cl_N)
+} // namespace cln
#endif /* _CL_COMPLEX_IO_H */
#ifndef _CL_COMPLEX_RING_H
#define _CL_COMPLEX_RING_H
-#include "cl_ring.h"
-#include "cl_complex_class.h"
+#include "cln/ring.h"
+#include "cln/complex_class.h"
+
+namespace cln {
typedef cl_specialized_number_ring<cl_N> cl_complex_ring;
extern const cl_complex_ring cl_C_ring; // math. C
extern cl_class cl_class_complex_ring;
//CL_REQUIRE(cl_C_ring)
+} // namespace cln
+
#endif /* _CL_COMPLEX_RING_H */
#ifndef _CL_CONDITION_H
#define _CL_CONDITION_H
-#include "cl_malloc.h"
-#include "cl_io.h"
+#include "cln/malloc.h"
+#include "cln/io.h"
+
+namespace cln {
struct cl_condition {
// Allocation.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
// Deallocation.
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
// Name.
virtual const char * name () const = 0;
// Print.
virtual void print (cl_ostream) const = 0;
// Virtual destructor.
- virtual ~cl_condition ()
- #if defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ < 8) // workaround gcc bug
- {}
- #else
- = 0;
- #endif
+ virtual ~cl_condition () = 0;
private:
virtual void dummy ();
};
#define SUBCLASS_cl_condition() \
public: \
/* Allocation. */ \
- void* operator new (size_t size) { return cl_malloc_hook(size); } \
+ void* operator new (size_t size) { return malloc_hook(size); } \
/* Deallocation. */ \
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
// Functions which want to raise a condition return a `cl_condition*'.
// The caller checks this value. NULL means no condition. The one who
// disposes the condition (handles it without resignalling it) should
// call `delete' on the condition pointer.
+} // namespace cln
+
#endif /* _CL_CONDITION_H */
#ifndef _CL_DFLOAT_H
#define _CL_DFLOAT_H
-#include "cl_number.h"
-#include "cl_dfloat_class.h"
-#include "cl_integer_class.h"
-#include "cl_float.h"
+#include "cln/number.h"
+#include "cln/dfloat_class.h"
+#include "cln/integer_class.h"
+#include "cln/float.h"
+namespace cln {
CL_DEFINE_AS_CONVERSION(cl_DF)
// Liefert zu einem Double-Float x : (- x), ein DF.
extern const cl_DF operator- (const cl_DF& x);
-// cl_compare(x,y) vergleicht zwei Double-Floats x und y.
+// compare(x,y) vergleicht zwei Double-Floats x und y.
// Ergebnis: 0 falls x=y, +1 falls x>y, -1 falls x<y.
-extern cl_signean cl_compare (const cl_DF& x, const cl_DF& y);
+extern cl_signean compare (const cl_DF& x, const cl_DF& y);
-// cl_equal_hashcode(x) liefert einen cl_equal-invarianten Hashcode für x.
-extern uint32 cl_equal_hashcode (const cl_DF& x);
+// equal_hashcode(x) liefert einen equal-invarianten Hashcode für x.
+extern uint32 equal_hashcode (const cl_DF& x);
inline bool operator== (const cl_DF& x, const cl_DF& y)
- { return cl_compare(x,y)==0; }
+ { return compare(x,y)==0; }
inline bool operator!= (const cl_DF& x, const cl_DF& y)
- { return cl_compare(x,y)!=0; }
+ { return compare(x,y)!=0; }
inline bool operator<= (const cl_DF& x, const cl_DF& y)
- { return cl_compare(x,y)<=0; }
+ { return compare(x,y)<=0; }
inline bool operator< (const cl_DF& x, const cl_DF& y)
- { return cl_compare(x,y)<0; }
+ { return compare(x,y)<0; }
inline bool operator>= (const cl_DF& x, const cl_DF& y)
- { return cl_compare(x,y)>=0; }
+ { return compare(x,y)>=0; }
inline bool operator> (const cl_DF& x, const cl_DF& y)
- { return cl_compare(x,y)>0; }
+ { return compare(x,y)>0; }
// minusp(x) == (< x 0)
extern cl_boolean minusp (const cl_DF& x);
// Return type for decode_float:
-struct cl_decoded_dfloat {
+struct decoded_dfloat {
cl_DF mantissa;
cl_I exponent;
cl_DF sign;
// Constructor.
- cl_decoded_dfloat () {}
- cl_decoded_dfloat (const cl_DF& m, const cl_I& e, const cl_DF& s) : mantissa(m), exponent(e), sign(s) {}
+ decoded_dfloat () {}
+ decoded_dfloat (const cl_DF& m, const cl_I& e, const cl_DF& s) : mantissa(m), exponent(e), sign(s) {}
};
// decode_float(x) liefert zu einem Float x: (decode-float x).
// x = 0.0 liefert (0.0, 0, 1.0).
// x = (-1)^s * 2^e * m liefert ((-1)^0 * 2^0 * m, e als Integer, (-1)^s).
-extern const cl_decoded_dfloat decode_float (const cl_DF& x);
+extern const decoded_dfloat decode_float (const cl_DF& x);
// float_exponent(x) liefert zu einem Float x:
// den Exponenten von (decode-float x).
// Konversion zu einem C "float".
-extern float cl_float_approx (const cl_DF& x);
+extern float float_approx (const cl_DF& x);
// Konversion zu einem C "double".
-extern double cl_double_approx (const cl_DF& x);
+extern double double_approx (const cl_DF& x);
#ifdef WANT_OBFUSCATING_OPERATORS
};
#endif
+} // namespace cln
#endif /* _CL_DFLOAT_H */
#ifndef _CL_DFLOAT_CLASS_H
#define _CL_DFLOAT_CLASS_H
-#include "cl_number.h"
-#include "cl_float_class.h"
+#include "cln/number.h"
+#include "cln/float_class.h"
+namespace cln {
class cl_DF : public cl_F {
public:
// Private pointer manipulations.
operator struct cl_heap_dfloat * () const;
public: // Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, cl_DF* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
private:
// Friend declarations. They are for the compiler. Just ignore them.
};
// Constructors and assignment operators from C numeric types.
CL_DEFINE_DOUBLE_CONSTRUCTOR(cl_DF)
+} // namespace cln
#endif /* _CL_DFLOAT_CLASS_H */
#ifndef _CL_DFLOAT_IO_H
#define _CL_DFLOAT_IO_H
-#include "cl_number_io.h"
-#include "cl_dfloat.h"
+#include "cln/number_io.h"
+#include "cln/dfloat.h"
+
+namespace cln {
inline cl_istream operator>> (cl_istream stream, cl_DF& result)
{
}
// The following does strictly the same as the general `fprint' for floats.
-// It is here only so that people don't need to include <cl_float_io.h>.
+// It is here only so that people don't need to include <cln/float_io.h>.
inline void fprint (cl_ostream stream, const cl_DF& x)
{
extern void print_float (cl_ostream stream, const cl_print_flags& flags, const cl_F& z);
- extern cl_print_flags cl_default_print_flags;
- print_float(stream,cl_default_print_flags,x);
+ extern cl_print_flags default_print_flags;
+ print_float(stream,default_print_flags,x);
}
CL_DEFINE_PRINT_OPERATOR(cl_DF)
+} // namespace cln
+
#endif /* _CL_DFLOAT_IO_H */
#ifndef _CL_FFLOAT_H
#define _CL_FFLOAT_H
-#include "cl_number.h"
-#include "cl_ffloat_class.h"
-#include "cl_integer_class.h"
-#include "cl_float.h"
+#include "cln/number.h"
+#include "cln/ffloat_class.h"
+#include "cln/integer_class.h"
+#include "cln/float.h"
+namespace cln {
CL_DEFINE_AS_CONVERSION(cl_FF)
// Liefert zu einem Single-Float x : (- x), ein FF.
extern const cl_FF operator- (const cl_FF& x);
-// cl_compare(x,y) vergleicht zwei Single-Floats x und y.
+// compare(x,y) vergleicht zwei Single-Floats x und y.
// Ergebnis: 0 falls x=y, +1 falls x>y, -1 falls x<y.
-extern cl_signean cl_compare (const cl_FF& x, const cl_FF& y);
+extern cl_signean compare (const cl_FF& x, const cl_FF& y);
-// cl_equal_hashcode(x) liefert einen cl_equal-invarianten Hashcode für x.
-extern uint32 cl_equal_hashcode (const cl_FF& x);
+// equal_hashcode(x) liefert einen equal-invarianten Hashcode für x.
+extern uint32 equal_hashcode (const cl_FF& x);
inline bool operator== (const cl_FF& x, const cl_FF& y)
- { return cl_compare(x,y)==0; }
+ { return compare(x,y)==0; }
inline bool operator!= (const cl_FF& x, const cl_FF& y)
- { return cl_compare(x,y)!=0; }
+ { return compare(x,y)!=0; }
inline bool operator<= (const cl_FF& x, const cl_FF& y)
- { return cl_compare(x,y)<=0; }
+ { return compare(x,y)<=0; }
inline bool operator< (const cl_FF& x, const cl_FF& y)
- { return cl_compare(x,y)<0; }
+ { return compare(x,y)<0; }
inline bool operator>= (const cl_FF& x, const cl_FF& y)
- { return cl_compare(x,y)>=0; }
+ { return compare(x,y)>=0; }
inline bool operator> (const cl_FF& x, const cl_FF& y)
- { return cl_compare(x,y)>0; }
+ { return compare(x,y)>0; }
// minusp(x) == (< x 0)
extern cl_boolean minusp (const cl_FF& x);
// Return type for decode_float:
-struct cl_decoded_ffloat {
+struct decoded_ffloat {
cl_FF mantissa;
cl_I exponent;
cl_FF sign;
// Constructor.
- cl_decoded_ffloat () {}
- cl_decoded_ffloat (const cl_FF& m, const cl_I& e, const cl_FF& s) : mantissa(m), exponent(e), sign(s) {}
+ decoded_ffloat () {}
+ decoded_ffloat (const cl_FF& m, const cl_I& e, const cl_FF& s) : mantissa(m), exponent(e), sign(s) {}
};
// decode_float(x) liefert zu einem Float x: (decode-float x).
// x = 0.0 liefert (0.0, 0, 1.0).
// x = (-1)^s * 2^e * m liefert ((-1)^0 * 2^0 * m, e als Integer, (-1)^s).
-extern const cl_decoded_ffloat decode_float (const cl_FF& x);
+extern const decoded_ffloat decode_float (const cl_FF& x);
// float_exponent(x) liefert zu einem Float x:
// den Exponenten von (decode-float x).
// Konversion zu einem C "float".
-extern float cl_float_approx (const cl_FF& x);
+extern float float_approx (const cl_FF& x);
// Konversion zu einem C "double".
-extern double cl_double_approx (const cl_FF& x);
+extern double double_approx (const cl_FF& x);
#ifdef WANT_OBFUSCATING_OPERATORS
};
#endif
+} // namespace cln
#endif /* _CL_FFLOAT_H */
#ifndef _CL_FFLOAT_CLASS_H
#define _CL_FFLOAT_CLASS_H
-#include "cl_number.h"
-#include "cl_float_class.h"
+#include "cln/number.h"
+#include "cln/float_class.h"
+namespace cln {
class cl_FF : public cl_F {
public:
operator struct cl_heap_ffloat * () const;
#endif
public: // Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, cl_FF* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
};
// Private constructors.
// Constructors and assignment operators from C numeric types.
CL_DEFINE_FLOAT_CONSTRUCTOR(cl_FF)
+} // namespace cln
#endif /* _CL_FFLOAT_CLASS_H */
#ifndef _CL_FFLOAT_IO_H
#define _CL_FFLOAT_IO_H
-#include "cl_number_io.h"
-#include "cl_ffloat.h"
+#include "cln/number_io.h"
+#include "cln/ffloat.h"
+
+namespace cln {
inline cl_istream operator>> (cl_istream stream, cl_FF& result)
{
}
// The following does strictly the same as the general `fprint' for floats.
-// It is here only so that people don't need to include <cl_float_io.h>.
+// It is here only so that people don't need to include <cln/float_io.h>.
inline void fprint (cl_ostream stream, const cl_FF& x)
{
extern void print_float (cl_ostream stream, const cl_print_flags& flags, const cl_F& z);
- extern cl_print_flags cl_default_print_flags;
- print_float(stream,cl_default_print_flags,x);
+ extern cl_print_flags default_print_flags;
+ print_float(stream,default_print_flags,x);
}
CL_DEFINE_PRINT_OPERATOR(cl_FF)
+} // namespace cln
+
#endif /* _CL_FFLOAT_IO_H */
#ifndef _CL_FLOAT_H
#define _CL_FLOAT_H
-#include "cl_number.h"
-#include "cl_float_class.h"
-#include "cl_floatformat.h"
-#include "cl_random.h"
-#include "cl_integer_class.h"
-#include "cl_sfloat_class.h"
-#include "cl_ffloat_class.h"
-#include "cl_dfloat_class.h"
-#include "cl_lfloat_class.h"
-
+#include "cln/number.h"
+#include "cln/float_class.h"
+#include "cln/floatformat.h"
+#include "cln/random.h"
+#include "cln/integer_class.h"
+#include "cln/sfloat_class.h"
+#include "cln/ffloat_class.h"
+#include "cln/dfloat_class.h"
+#include "cln/lfloat_class.h"
+
+namespace cln {
CL_DEFINE_AS_CONVERSION(cl_F)
// The default float format used when converting rational numbers to floats.
-extern cl_float_format_t cl_default_float_format;
+extern float_format_t default_float_format;
// Returns the smallest float format which guarantees at least n decimal digits
// in the mantissa (after the decimal point).
-extern cl_float_format_t cl_float_format (uintL n);
+extern float_format_t float_format (uintL n);
// cl_float(x,y) wandelt ein Float x in das Float-Format des Floats y um
// und rundet dabei nötigenfalls.
// > x: ein Float
// > f: eine Float-Format-Spezifikation
// < ergebnis: (float x f)
-extern const cl_F cl_float (const cl_F& x, cl_float_format_t f);
+extern const cl_F cl_float (const cl_F& x, float_format_t f);
// cl_float(x) wandelt eine reelle Zahl x in ein Float um
// und rundet dabei nötigenfalls.
// > x: eine reelle Zahl
// < ergebnis: (float x)
-// Abhängig von cl_default_float_format.
+// Abhängig von default_float_format.
inline const cl_F cl_float (const cl_F& x) { return x; }
// cl_float(x,y) wandelt ein Integer x in das Float-Format des Floats y um
// > x: ein Integer
// > f: eine Float-Format-Spezifikation
// < ergebnis: (float x f)
-extern const cl_F cl_float (const cl_I& x, cl_float_format_t f);
+extern const cl_F cl_float (const cl_I& x, float_format_t f);
// cl_float(x) wandelt ein Integer x in ein Float um und rundet dabei.
// > x: ein Integer
// < ergebnis: (float x)
-// Abhängig von cl_default_float_format.
+// Abhängig von default_float_format.
extern const cl_F cl_float (const cl_I& x);
// cl_float(x,y) wandelt eine rationale Zahl x in das Float-Format des
// > x: eine rationale Zahl
// > f: eine Float-Format-Spezifikation
// < ergebnis: (float x f)
-extern const cl_F cl_float (const cl_RA& x, cl_float_format_t f);
+extern const cl_F cl_float (const cl_RA& x, float_format_t f);
// cl_float(x) wandelt eine rationale Zahl x in ein Float um und rundet dabei.
// > x: eine rationale Zahl
// < ergebnis: (float x)
-// Abhängig von cl_default_float_format.
+// Abhängig von default_float_format.
extern const cl_F cl_float (const cl_RA& x);
// The C++ compilers are not clever enough to guess this:
{ return cl_float(cl_I(x),y); }
inline const cl_F cl_float (unsigned int x, const cl_F& y)
{ return cl_float(cl_I(x),y); }
-inline const cl_F cl_float (int x, cl_float_format_t y)
+inline const cl_F cl_float (int x, float_format_t y)
{ return cl_float(cl_I(x),y); }
-inline const cl_F cl_float (unsigned int x, cl_float_format_t y)
+inline const cl_F cl_float (unsigned int x, float_format_t y)
{ return cl_float(cl_I(x),y); }
inline const cl_F cl_float (int x)
{ return cl_float(cl_I(x)); }
{ return cl_float(cl_FF(x),y); }
inline const cl_F cl_float (double x, const cl_F& y)
{ return cl_float(cl_DF(x),y); }
-inline const cl_F cl_float (float x, cl_float_format_t y)
+inline const cl_F cl_float (float x, float_format_t y)
{ return cl_float(cl_FF(x),y); }
-inline const cl_F cl_float (double x, cl_float_format_t y)
+inline const cl_F cl_float (double x, float_format_t y)
{ return cl_float(cl_DF(x),y); }
inline const cl_F cl_float (float x)
{ return cl_float(cl_FF(x)); }
return x + cl_float(-1,x);
}
-// cl_compare(x,y) vergleicht zwei Floats x und y.
+// compare(x,y) vergleicht zwei Floats x und y.
// Ergebnis: 0 falls x=y, +1 falls x>y, -1 falls x<y.
-extern cl_signean cl_compare (const cl_F& x, const cl_F& y);
+extern cl_signean compare (const cl_F& x, const cl_F& y);
-// cl_equal_hashcode(x) liefert einen cl_equal-invarianten Hashcode für x.
-extern uint32 cl_equal_hashcode (const cl_F& x);
+// equal_hashcode(x) liefert einen equal-invarianten Hashcode für x.
+extern uint32 equal_hashcode (const cl_F& x);
inline bool operator== (const cl_F& x, const cl_F& y)
- { return cl_compare(x,y)==0; }
+ { return compare(x,y)==0; }
inline bool operator!= (const cl_F& x, const cl_F& y)
- { return cl_compare(x,y)!=0; }
+ { return compare(x,y)!=0; }
inline bool operator<= (const cl_F& x, const cl_F& y)
- { return cl_compare(x,y)<=0; }
+ { return compare(x,y)<=0; }
inline bool operator< (const cl_F& x, const cl_F& y)
- { return cl_compare(x,y)<0; }
+ { return compare(x,y)<0; }
inline bool operator>= (const cl_F& x, const cl_F& y)
- { return cl_compare(x,y)>=0; }
+ { return compare(x,y)>=0; }
inline bool operator> (const cl_F& x, const cl_F& y)
- { return cl_compare(x,y)>0; }
+ { return compare(x,y)>0; }
// ffloor(x) liefert (ffloor x), wo x ein Float ist.
// Return type for decode_float:
-struct cl_decoded_float {
+struct decoded_float {
cl_F mantissa;
cl_I exponent;
cl_F sign;
// Constructor.
- cl_decoded_float () {}
- cl_decoded_float (const cl_F& m, const cl_I& e, const cl_F& s) : mantissa(m), exponent(e), sign(s) {}
+ decoded_float () {}
+ decoded_float (const cl_F& m, const cl_I& e, const cl_F& s) : mantissa(m), exponent(e), sign(s) {}
};
// decode_float(x) liefert zu einem Float x: (decode-float x).
// x = 0.0 liefert (0.0, 0, 1.0).
// x = (-1)^s * 2^e * m liefert ((-1)^0 * 2^0 * m, e als Integer, (-1)^s).
-extern const cl_decoded_float decode_float (const cl_F& x);
+extern const decoded_float decode_float (const cl_F& x);
// float_exponent(x) liefert zu einem Float x:
// den Exponenten von (decode-float x).
extern uintL float_precision (const cl_F& x);
// Returns the floating point format of a float.
-inline cl_float_format_t cl_float_format (const cl_F& x)
- { return (cl_float_format_t) float_digits(x); }
+inline float_format_t float_format (const cl_F& x)
+ { return (float_format_t) float_digits(x); }
// integer_decode_float(x) liefert zu einem Float x: (integer-decode-float x).
// Returns the largest (most positive) floating point number in float format f.
-extern const cl_F most_positive_float (cl_float_format_t f);
+extern const cl_F most_positive_float (float_format_t f);
//CL_REQUIRE(cl_F_mostpos)
// Returns the smallest (most negative) floating point number in float format f.
-extern const cl_F most_negative_float (cl_float_format_t f);
+extern const cl_F most_negative_float (float_format_t f);
//CL_REQUIRE(cl_F_mostneg)
// Returns the least positive floating point number (i.e. > 0 but closest to 0)
// in float format f.
-extern const cl_F least_positive_float (cl_float_format_t f);
+extern const cl_F least_positive_float (float_format_t f);
//CL_REQUIRE(cl_F_leastpos)
// Returns the least negative floating point number (i.e. < 0 but closest to 0)
// in float format f.
-extern const cl_F least_negative_float (cl_float_format_t f);
+extern const cl_F least_negative_float (float_format_t f);
//CL_REQUIRE(cl_F_leastneg)
// Returns the smallest floating point number e > 0 such that 1+e != 1.
-extern const cl_F float_epsilon (cl_float_format_t f);
+extern const cl_F float_epsilon (float_format_t f);
//CL_REQUIRE(cl_F_epspos)
// Returns the smallest floating point number e > 0 such that 1-e != 1.
-extern const cl_F float_negative_epsilon (cl_float_format_t f);
+extern const cl_F float_negative_epsilon (float_format_t f);
//CL_REQUIRE(cl_F_epsneg)
// Konversion zu einem C "float".
-extern float cl_float_approx (const cl_F& x);
+extern float float_approx (const cl_F& x);
// Konversion zu einem C "double".
-extern double cl_double_approx (const cl_F& x);
+extern double double_approx (const cl_F& x);
// Transcendental functions
-// cl_pi(y) liefert die Zahl pi im selben Float-Format wie y.
+// pi(y) liefert die Zahl pi im selben Float-Format wie y.
// > y: ein Float
-extern const cl_F cl_pi (const cl_F& y);
+extern const cl_F pi (const cl_F& y);
-// cl_pi(y) liefert die Zahl pi im Float-Format f.
+// pi(y) liefert die Zahl pi im Float-Format f.
// > f: eine Float-Format-Spezifikation
-extern const cl_F cl_pi (cl_float_format_t f);
+extern const cl_F pi (float_format_t f);
-// cl_pi() liefert die Zahl pi im Default-Float-Format.
-extern const cl_F cl_pi (void);
+// pi() liefert die Zahl pi im Default-Float-Format.
+extern const cl_F pi (void);
//CL_REQUIRE(cl_F_pi_var)
// cos(x) liefert den Cosinus (cos x) eines Float x.
extern const cl_F cos (const cl_F& x);
-// Return type for cl_cos_sin():
-struct cl_cos_sin_t {
+// Return type for cos_sin():
+struct cos_sin_t {
cl_R cos;
cl_R sin;
// Constructor:
- cl_cos_sin_t (const cl_R& u, const cl_R& v) : cos (u), sin (v) {}
+ cos_sin_t (const cl_R& u, const cl_R& v) : cos (u), sin (v) {}
};
-// cl_cos_sin(x) liefert ((cos x),(sin x)), beide Werte.
-extern const cl_cos_sin_t cl_cos_sin (const cl_F& x);
+// cos_sin(x) liefert ((cos x),(sin x)), beide Werte.
+extern const cos_sin_t cos_sin (const cl_F& x);
// tan(x) liefert den Tangens (tan x) eines Float x.
extern const cl_F tan (const cl_F& x);
-// cl_exp1(y) liefert die Zahl e = exp(1) im selben Float-Format wie y.
+// exp1(y) liefert die Zahl e = exp(1) im selben Float-Format wie y.
// > y: ein Float
-extern const cl_F cl_exp1 (const cl_F& y);
+extern const cl_F exp1 (const cl_F& y);
-// cl_exp1(y) liefert die Zahl e = exp(1) im Float-Format f.
+// exp1(y) liefert die Zahl e = exp(1) im Float-Format f.
// > f: eine Float-Format-Spezifikation
-extern const cl_F cl_exp1 (cl_float_format_t f);
+extern const cl_F exp1 (float_format_t f);
-// cl_exp1() liefert die Zahl e = exp(1) im Default-Float-Format.
-extern const cl_F cl_exp1 (void);
+// exp1() liefert die Zahl e = exp(1) im Default-Float-Format.
+extern const cl_F exp1 (void);
//CL_REQUIRE(cl_F_exp1_var)
// cosh(x) liefert zu einem Float x die Zahl cosh(x).
extern const cl_F cosh (const cl_F& x);
-// Return type for cl_cosh_sinh():
-struct cl_cosh_sinh_t {
+// Return type for cosh_sinh():
+struct cosh_sinh_t {
cl_R cosh;
cl_R sinh;
// Constructor:
- cl_cosh_sinh_t (const cl_R& u, const cl_R& v) : cosh (u), sinh (v) {}
+ cosh_sinh_t (const cl_R& u, const cl_R& v) : cosh (u), sinh (v) {}
};
-// cl_cosh_sinh(x) liefert ((cosh x),(sinh x)), beide Werte.
-extern const cl_cosh_sinh_t cl_cosh_sinh (const cl_F& x);
+// cosh_sinh(x) liefert ((cosh x),(sinh x)), beide Werte.
+extern const cosh_sinh_t cosh_sinh (const cl_F& x);
// tanh(x) liefert zu einem Float x die Zahl tanh(x).
extern const cl_F tanh (const cl_F& x);
-// cl_eulerconst(y) liefert die Eulersche Konstante
+// eulerconst(y) liefert die Eulersche Konstante
// im selben Float-Format wie y.
// > y: ein Float
-extern const cl_F cl_eulerconst (const cl_F& y);
+extern const cl_F eulerconst (const cl_F& y);
-// cl_eulerconst(y) liefert die Eulersche Konstante im Float-Format f.
+// eulerconst(y) liefert die Eulersche Konstante im Float-Format f.
// > f: eine Float-Format-Spezifikation
-extern const cl_F cl_eulerconst (cl_float_format_t f);
+extern const cl_F eulerconst (float_format_t f);
-// cl_eulerconst() liefert die Eulersche Konstante im Default-Float-Format.
-extern const cl_F cl_eulerconst (void);
+// eulerconst() liefert die Eulersche Konstante im Default-Float-Format.
+extern const cl_F eulerconst (void);
//CL_REQUIRE(cl_F_eulerconst_var)
-// cl_catalanconst(y) liefert die Catalansche Konstante
+// catalanconst(y) liefert die Catalansche Konstante
// im selben Float-Format wie y.
// > y: ein Float
-extern const cl_F cl_catalanconst (const cl_F& y);
+extern const cl_F catalanconst (const cl_F& y);
-// cl_catalanconst(y) liefert die Catalansche Konstante im Float-Format f.
+// catalanconst(y) liefert die Catalansche Konstante im Float-Format f.
// > f: eine Float-Format-Spezifikation
-extern const cl_F cl_catalanconst (cl_float_format_t f);
+extern const cl_F catalanconst (float_format_t f);
-// cl_catalanconst() liefert die Catalansche Konstante im Default-Float-Format.
-extern const cl_F cl_catalanconst (void);
+// catalanconst() liefert die Catalansche Konstante im Default-Float-Format.
+extern const cl_F catalanconst (void);
//CL_REQUIRE(cl_F_catalanconst_var)
// zeta(s) returns the Riemann zeta function at s>1.
-extern const cl_F cl_zeta (int s, const cl_F& y);
-extern const cl_F cl_zeta (int s, cl_float_format_t f);
-extern const cl_F cl_zeta (int s);
+extern const cl_F zeta (int s, const cl_F& y);
+extern const cl_F zeta (int s, float_format_t f);
+extern const cl_F zeta (int s);
// random_F(randomstate,n) liefert zu einem Float n>0 ein zufälliges
// Float x mit 0 <= x < n.
// > randomstate: ein Random-State, wird verändert
-extern const cl_F random_F (cl_random_state& randomstate, const cl_F& n);
+extern const cl_F random_F (random_state& randomstate, const cl_F& n);
inline const cl_F random_F (const cl_F& n)
- { return random_F(cl_default_random_state,n); }
+ { return random_F(default_random_state,n); }
#ifdef WANT_OBFUSCATING_OPERATORS
// If this is true, floating point underflow returns zero instead of an error.
extern cl_boolean cl_inhibit_floating_point_underflow;
+} // namespace cln
#endif /* _CL_FLOAT_H */
#ifndef _CL_FLOAT_CLASS_H
#define _CL_FLOAT_CLASS_H
-#include "cl_number.h"
-#include "cl_real_class.h"
+#include "cln/number.h"
+#include "cln/real_class.h"
+namespace cln {
class cl_F : public cl_R {
public:
// Private constructor.
cl_F (cl_private_thing);
public: // Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, cl_F* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
private:
// Friend declarations. They are for the compiler. Just ignore them.
};
CL_DEFINE_FLOAT_CONSTRUCTOR(cl_F)
CL_DEFINE_DOUBLE_CONSTRUCTOR(cl_F)
+} // namespace cln
#endif /* _CL_FLOAT_CLASS_H */
#ifndef _CL_FLOAT_IO_H
#define _CL_FLOAT_IO_H
-#include "cl_number_io.h"
-#include "cl_float.h"
+#include "cln/number_io.h"
+#include "cln/float.h"
+namespace cln {
// Undocumented input functions
// index4+1 = Index des Exponenten-Vorzeichens oder der ersten
// Exponenten-Ziffer)
// < ergebnis: Float
-extern const cl_F read_float (unsigned int base, cl_float_format_t prec,
+extern const cl_F read_float (unsigned int base, float_format_t prec,
cl_signean sign, const char * string, uintL index1, uintL index4, uintL index2, uintL index3);
// The following does strictly the same as the general read_complex.
inline void fprint (cl_ostream stream, const cl_F& x)
{
- extern cl_print_flags cl_default_print_flags;
- print_float(stream,cl_default_print_flags,x);
+ extern cl_print_flags default_print_flags;
+ print_float(stream,default_print_flags,x);
}
CL_DEFINE_PRINT_OPERATOR(cl_F)
+} // namespace cln
#endif /* _CL_FLOAT_IO_H */
--- /dev/null
+// Floating point format specifiers.
+
+#ifndef _CL_FLOATFORMAT_H
+#define _CL_FLOATFORMAT_H
+
+#include "cln/types.h"
+
+namespace cln {
+
+// Float format specifier type. (Float mantissa precision in bits.)
+typedef enum float_format_t {
+ float_format_sfloat = 17,
+ float_format_ffloat = 24,
+ float_format_dfloat = 53,
+ float_format_lfloat_min = ((53+intDsize-1)/intDsize)*intDsize // = round_up(53,intDsize)
+};
+
+} // namespace cln
+
+#endif /* _CL_FLOATFORMAT_H */
#ifndef _CL_INPUT_H
#define _CL_INPUT_H
-#include "cl_types.h"
-#include "cl_floatformat.h"
-#include "cl_io.h"
+#include "cln/types.h"
+#include "cln/floatformat.h"
+#include "cln/io.h"
+
+namespace cln {
struct cl_read_float_flags {
// The float format used when reading floats with exponent marker 'E'.
- cl_float_format_t default_float_format;
+ float_format_t default_float_format;
// The float format used when reading floats with exponent marker 'L'.
- cl_float_format_t default_lfloat_format;
+ float_format_t default_lfloat_format;
// Flag whether floats specified with more digits than corresponding
// to the exponent marker they contain, but without _nnn suffix, will
// get a precision corresponding to their number of significant digits.
cl_read_float_flags float_flags;
};
+} // namespace cln
+
#endif /* _CL_INPUT_H */
#ifndef _CL_INTEGER_H
#define _CL_INTEGER_H
-#include "cl_number.h"
-#include "cl_integer_class.h"
-#include "cl_random.h"
+#include "cln/number.h"
+#include "cln/integer_class.h"
+#include "cln/random.h"
+namespace cln {
CL_DEFINE_AS_CONVERSION(cl_I)
// Vergleich von Integers
-// cl_equal(x,y) vergleicht zwei Integers x und y auf Gleichheit.
-extern cl_boolean cl_equal (const cl_I& x, const cl_I& y);
-// cl_equal_hashcode(x) liefert einen cl_equal-invarianten Hashcode für x.
-extern uint32 cl_equal_hashcode (const cl_I& x);
+// equal(x,y) vergleicht zwei Integers x und y auf Gleichheit.
+extern cl_boolean equal (const cl_I& x, const cl_I& y);
+// equal_hashcode(x) liefert einen equal-invarianten Hashcode für x.
+extern uint32 equal_hashcode (const cl_I& x);
-// cl_compare(x,y) vergleicht zwei Integers x und y.
+// compare(x,y) vergleicht zwei Integers x und y.
// Ergebnis: 0 falls x=y, +1 falls x>y, -1 falls x<y.
-extern cl_signean cl_compare (const cl_I& x, const cl_I& y);
+extern cl_signean compare (const cl_I& x, const cl_I& y);
inline bool operator== (const cl_I& x, const cl_I& y)
- { return cl_equal(x,y); }
+ { return equal(x,y); }
inline bool operator!= (const cl_I& x, const cl_I& y)
- { return !cl_equal(x,y); }
+ { return !equal(x,y); }
inline bool operator<= (const cl_I& x, const cl_I& y)
- { return cl_compare(x,y)<=0; }
+ { return compare(x,y)<=0; }
inline bool operator< (const cl_I& x, const cl_I& y)
- { return cl_compare(x,y)<0; }
+ { return compare(x,y)<0; }
inline bool operator>= (const cl_I& x, const cl_I& y)
- { return cl_compare(x,y)>=0; }
+ { return compare(x,y)>=0; }
inline bool operator> (const cl_I& x, const cl_I& y)
- { return cl_compare(x,y)>0; }
+ { return compare(x,y)>0; }
// minusp(x) == (< x 0)
extern cl_boolean minusp (const cl_I& x);
// Konversion zu einem C "float".
-extern float cl_float_approx (const cl_I& x);
+extern float float_approx (const cl_I& x);
// Konversion zu einem C "double".
-extern double cl_double_approx (const cl_I& x);
+extern double double_approx (const cl_I& x);
// random_I(randomstate,n) liefert zu einem Integer n>0 ein zufälliges
// Integer x mit 0 <= x < n.
// > randomstate: ein Random-State, wird verändert
-extern const cl_I random_I (cl_random_state& randomstate, const cl_I& n);
+extern const cl_I random_I (random_state& randomstate, const cl_I& n);
inline const cl_I random_I (const cl_I& n)
- { return random_I(cl_default_random_state,n); }
+ { return random_I(default_random_state,n); }
// testrandom_I(randomstate) liefert ein zufälliges Integer zum Testen.
// > randomstate: ein Random-State, wird verändert
-extern const cl_I testrandom_I (cl_random_state& randomstate);
+extern const cl_I testrandom_I (random_state& randomstate);
inline const cl_I testrandom_I ()
- { return testrandom_I(cl_default_random_state); }
+ { return testrandom_I(default_random_state); }
#ifdef WANT_OBFUSCATING_OPERATORS
};
#endif
+} // namespace cln
#endif /* _CL_INTEGER_H */
#ifndef _CL_INTEGER_CLASS_H
#define _CL_INTEGER_CLASS_H
-#include "cl_number.h"
-#include "cl_rational_class.h"
+#include "cln/number.h"
+#include "cln/rational_class.h"
+namespace cln {
class cl_I : public cl_RA {
public:
cl_I (struct cl_fixnum * /* NULL! */, cl_uint);
cl_I (struct cl_heap_bignum *);
public: // Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, cl_I* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
};
// Private constructors.
CL_DEFINE_LONG_CONSTRUCTORS(cl_I)
CL_DEFINE_LONG_ASSIGNMENT_OPERATORS(cl_I)
+} // namespace cln
#endif /* _CL_INTEGER_CLASS_H */
#ifndef _CL_INTEGER_IO_H
#define _CL_INTEGER_IO_H
-#include "cl_number_io.h"
-#include "cl_integer_class.h"
+#include "cln/number_io.h"
+#include "cln/integer_class.h"
+namespace cln {
// Undocumented input functions
// Liefert zu einem Integer >=0 (write-to-string integer :base 10 :radix nil),
// also die Ziffernfolge als String.
-// Mit cl_malloc_hook() alloziert, mit cl_free_hook() freizugeben.
+// Mit malloc_hook() alloziert, mit free_hook() freizugeben.
extern char * cl_decimal_string (const cl_I& x);
// Gibt ein Integer aus.
// > base: Basis (>=2, <=36)
// > stream: Stream
extern void print_integer (cl_ostream stream, unsigned int base, const cl_I& z);
-// Dasselbe als String. Mit cl_malloc_hook() alloziert, mit cl_free_hook() freizugeben.
+// Dasselbe als String. Mit malloc_hook() alloziert, mit free_hook() freizugeben.
extern char * print_integer_to_string (unsigned int base, const cl_I& z);
inline void fprint (cl_ostream stream, const cl_I& x)
{
- extern cl_print_flags cl_default_print_flags;
- print_integer(stream,cl_default_print_flags,x);
+ extern cl_print_flags default_print_flags;
+ print_integer(stream,default_print_flags,x);
}
CL_DEFINE_PRINT_OPERATOR(cl_I)
+} // namespace cln
#endif /* _CL_INTEGER_IO_H */
#ifndef _CL_INTEGER_RING_H
#define _CL_INTEGER_RING_H
-#include "cl_ring.h"
-#include "cl_integer_class.h"
+#include "cln/ring.h"
+#include "cln/integer_class.h"
+
+namespace cln {
typedef cl_specialized_number_ring<cl_I> cl_integer_ring;
extern const cl_integer_ring cl_I_ring; // math. Z
extern cl_class cl_class_integer_ring;
//CL_REQUIRE(cl_I_ring)
+} // namespace cln
+
#endif /* _CL_INTEGER_RING_H */
-// I/O through <stdio.h> or <iostream.h>
+// I/O through <stdio.h> or <iostream>
#ifndef _CL_IO_H
#define _CL_IO_H
-#include "cl_types.h"
-#include "cl_modules.h"
+#include "cln/types.h"
+#include "cln/modules.h"
-#if !defined(CL_IO_STDIO) && !defined(CL_IO_IOSTREAM)
-// Prefer iostream based I/O - this is what people expect.
-#define CL_IO_IOSTREAM
-#endif
-
-
-#if defined(CL_IO_STDIO)
-
-// I/O through <stdio.h>
-
-#include <stdio.h>
-
-#define cl_istream FILE *
-#define cl_ostream FILE *
-#define cl_stdin stdin
-#define cl_stdout stdout
-#define cl_stderr stderr
-extern FILE* cl_debugout;
-
-// Elementary operations on cl_istream
-
-#define cl_EOF EOF
-
-inline int freadchar (cl_istream stream)
-{
- // return fgetc(stream);
- return getc(stream);
-}
-
-inline int funreadchar (cl_istream stream, int c)
-{
- return ungetc(c,stream);
-}
-
-// Elementary operations on cl_ostream
-
-inline void fprintchar (cl_ostream stream, char c)
-{
- // fputc(c,stream);
- putc(c,stream);
-}
-
-inline void fprint (cl_ostream stream, const char * string)
-{
- // fprintf(stream,"%s",string);
- fputs(string,stream);
-}
-
-#endif
-
-
-#if defined(CL_IO_IOSTREAM)
-
-// I/O through <iostream.h>
+// I/O through <iostream>
#ifdef floor
#undef floor
- #include <iostream.h>
+ #include <iostream>
#define floor cln_floor
#else
- #include <iostream.h>
+ #include <iostream>
#endif
-#define cl_istream istream&
-#define cl_ostream ostream&
-#define cl_stdin cin
-#define cl_stdout cout
-#define cl_stderr cerr
-extern ostream* cl_debugout_stream;
+namespace cln {
+
+typedef std::istream& cl_istream;
+typedef std::ostream& cl_ostream;
+extern cl_istream stdin;
+extern cl_ostream stdout;
+extern cl_ostream stderr;
+extern std::ostream* cl_debugout_stream;
#define cl_debugout (*cl_debugout_stream)
// Elementary operations on cl_istream
stream << string;
}
-#endif
-
extern void fprintdecimal (cl_ostream stream, unsigned long x);
extern void fprintdecimal (cl_ostream stream, long x);
fprint(stream,x); \
return stream; \
}
-
+
+} // namespace cln
#endif /* _CL_IO_H */
#ifndef _CL_LFLOAT_H
#define _CL_LFLOAT_H
-#include "cl_number.h"
-#include "cl_lfloat_class.h"
-#include "cl_integer_class.h"
-#include "cl_float.h"
+#include "cln/number.h"
+#include "cln/lfloat_class.h"
+#include "cln/integer_class.h"
+#include "cln/float.h"
+namespace cln {
CL_DEFINE_AS_CONVERSION(cl_LF)
// Liefert zu einem Long-Float x : (- x), ein LF.
extern const cl_LF operator- (const cl_LF& x);
-// cl_compare(x,y) vergleicht zwei Long-Floats x und y.
+// compare(x,y) vergleicht zwei Long-Floats x und y.
// Ergebnis: 0 falls x=y, +1 falls x>y, -1 falls x<y.
-extern cl_signean cl_compare (const cl_LF& x, const cl_LF& y);
+extern cl_signean compare (const cl_LF& x, const cl_LF& y);
-// cl_equal_hashcode(x) liefert einen cl_equal-invarianten Hashcode für x.
-extern uint32 cl_equal_hashcode (const cl_LF& x);
+// equal_hashcode(x) liefert einen equal-invarianten Hashcode für x.
+extern uint32 equal_hashcode (const cl_LF& x);
inline bool operator== (const cl_LF& x, const cl_LF& y)
- { return cl_compare(x,y)==0; }
+ { return compare(x,y)==0; }
inline bool operator!= (const cl_LF& x, const cl_LF& y)
- { return cl_compare(x,y)!=0; }
+ { return compare(x,y)!=0; }
inline bool operator<= (const cl_LF& x, const cl_LF& y)
- { return cl_compare(x,y)<=0; }
+ { return compare(x,y)<=0; }
inline bool operator< (const cl_LF& x, const cl_LF& y)
- { return cl_compare(x,y)<0; }
+ { return compare(x,y)<0; }
inline bool operator>= (const cl_LF& x, const cl_LF& y)
- { return cl_compare(x,y)>=0; }
+ { return compare(x,y)>=0; }
inline bool operator> (const cl_LF& x, const cl_LF& y)
- { return cl_compare(x,y)>0; }
+ { return compare(x,y)>0; }
// minusp(x) == (< x 0)
extern cl_boolean minusp (const cl_LF& x);
// Return type for decode_float:
-struct cl_decoded_lfloat {
+struct decoded_lfloat {
cl_LF mantissa;
cl_I exponent;
cl_LF sign;
// Constructor.
- cl_decoded_lfloat () {}
- cl_decoded_lfloat (const cl_LF& m, const cl_I& e, const cl_LF& s) : mantissa(m), exponent(e), sign(s) {}
+ decoded_lfloat () {}
+ decoded_lfloat (const cl_LF& m, const cl_I& e, const cl_LF& s) : mantissa(m), exponent(e), sign(s) {}
};
// decode_float(x) liefert zu einem Float x: (decode-float x).
// x = 0.0 liefert (0.0, 0, 1.0).
// x = (-1)^s * 2^e * m liefert ((-1)^0 * 2^0 * m, e als Integer, (-1)^s).
-extern const cl_decoded_lfloat decode_float (const cl_LF& x);
+extern const decoded_lfloat decode_float (const cl_LF& x);
// float_exponent(x) liefert zu einem Float x:
// den Exponenten von (decode-float x).
// Konversion zu einem C "float".
-extern float cl_float_approx (const cl_LF& x);
+extern float float_approx (const cl_LF& x);
// Konversion zu einem C "double".
-extern double cl_double_approx (const cl_LF& x);
+extern double double_approx (const cl_LF& x);
#ifdef WANT_OBFUSCATING_OPERATORS
};
#endif
+} // namespace cln
#endif /* _CL_LFLOAT_H */
#ifndef _CL_LFLOAT_CLASS_H
#define _CL_LFLOAT_CLASS_H
-#include "cl_number.h"
-#include "cl_float_class.h"
+#include "cln/number.h"
+#include "cln/float_class.h"
+namespace cln {
class cl_LF : public cl_F {
public:
// Private pointer manipulations.
operator struct cl_heap_lfloat * () const;
public: // Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, cl_LF* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
};
// Define this if you want the elementary cl_LF operations (+, -, *, /,
// sqrt, cl_LF_I_mul) to return results which are always the correctly
// The copy constructors.
CL_DEFINE_COPY_CONSTRUCTOR2(cl_LF,cl_F)
+} // namespace cln
#endif /* _CL_LFLOAT_CLASS_H */
#ifndef _CL_LFLOAT_IO_H
#define _CL_LFLOAT_IO_H
-#include "cl_number_io.h"
-#include "cl_lfloat.h"
+#include "cln/number_io.h"
+#include "cln/lfloat.h"
+
+namespace cln {
inline cl_istream operator>> (cl_istream stream, cl_LF& result)
{
}
// The following does strictly the same as the general `fprint' for floats.
-// It is here only so that people don't need to include <cl_float_io.h>.
+// It is here only so that people don't need to include <cln/float_io.h>.
inline void fprint (cl_ostream stream, const cl_LF& x)
{
extern void print_float (cl_ostream stream, const cl_print_flags& flags, const cl_F& z);
- extern cl_print_flags cl_default_print_flags;
- print_float(stream,cl_default_print_flags,x);
+ extern cl_print_flags default_print_flags;
+ print_float(stream,default_print_flags,x);
}
CL_DEFINE_PRINT_OPERATOR(cl_LF)
+} // namespace cln
+
#endif /* _CL_LFLOAT_IO_H */
#include <stdlib.h>
+namespace cln {
+
// Function like malloc() which returns aligned memory of size (> 0) bytes.
-extern void* (*cl_malloc_hook) (size_t size);
+extern void* (*malloc_hook) (size_t size);
// Function like free() which makes available for reuse such memory.
-extern void (*cl_free_hook) (void* ptr);
+extern void (*free_hook) (void* ptr);
+
+} // namespace cln
#endif /* _CL_MALLOC_H */
#ifndef _CL_MODINTEGER_H
#define _CL_MODINTEGER_H
-#include "cl_object.h"
-#include "cl_ring.h"
-#include "cl_integer.h"
-#include "cl_random.h"
-#include "cl_malloc.h"
-#include "cl_io.h"
-#include "cl_proplist.h"
-#include "cl_condition.h"
-#include "cl_abort.h"
+#include "cln/object.h"
+#include "cln/ring.h"
+#include "cln/integer.h"
+#include "cln/random.h"
+#include "cln/malloc.h"
+#include "cln/io.h"
+#include "cln/proplist.h"
+#include "cln/condition.h"
+#include "cln/abort.h"
#undef random // Linux defines random() as a macro!
+namespace cln {
// Representation of an element of a ring Z/mZ.
// Constructors.
cl_composite_condition (const cl_I& _p)
: p (_p), factor (0)
- { print(cl_stderr); }
+ { print(stderr); }
cl_composite_condition (const cl_I& _p, const cl_I& _f)
: p (_p), factor (_f)
- { print(cl_stderr); }
+ { print(stderr); }
// Implement general condition methods.
const char * name () const;
void print (cl_ostream) const;
// Conversion.
CL_DEFINE_CONVERTER(_cl_ring_element)
public: // Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, _cl_MI* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
};
class cl_MI /* cf. cl_ring_element */ : public _cl_MI {
// Debugging output.
void debug_print () const;
public: // Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, cl_MI* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
};
// equality
cl_boolean (* equal) (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y);
// random number
- const _cl_MI (* random) (cl_heap_modint_ring* R, cl_random_state& randomstate);
+ const _cl_MI (* random) (cl_heap_modint_ring* R, random_state& randomstate);
};
struct _cl_modint_addops /* cf. _cl_ring_addops */ {
// 0
// some inverse of canonical homomorphism
const cl_I (* retract) (cl_heap_modint_ring* R, const _cl_MI& x);
};
-#if defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ < 8) // workaround two g++-2.7.0 bugs
- #define cl_modint_setops _cl_modint_setops
- #define cl_modint_addops _cl_modint_addops
- #define cl_modint_mulops _cl_modint_mulops
-#else
typedef const _cl_modint_setops cl_modint_setops;
typedef const _cl_modint_addops cl_modint_addops;
typedef const _cl_modint_mulops cl_modint_mulops;
-#endif
// Representation of the ring Z/mZ.
{ setops->fprint(this,stream,x); }
cl_boolean _equal (const _cl_MI& x, const _cl_MI& y)
{ return setops->equal(this,x,y); }
- const _cl_MI _random (cl_random_state& randomstate)
+ const _cl_MI _random (random_state& randomstate)
{ return setops->random(this,randomstate); }
const _cl_MI _zero ()
{ return addops->zero(this); }
if (!(y.ring() == this)) cl_abort();
return _equal(x,y);
}
- const cl_MI random (cl_random_state& randomstate = cl_default_random_state)
+ const cl_MI random (random_state& randomstate = default_random_state)
{
return cl_MI(this,_random(randomstate));
}
SUBCLASS_cl_heap_ring()
// Lookup or create a modular integer ring Z/mZ
-extern const cl_modint_ring cl_find_modint_ring (const cl_I& m);
+extern const cl_modint_ring find_modint_ring (const cl_I& m);
CL_REQUIRE(cl_MI)
// Runtime typing support.
};
#endif
+} // namespace cln
#endif /* _CL_MODINTEGER_H */
#ifndef _CL_NULL_RING_H
#define _CL_NULL_RING_H
-#include "cl_ring.h"
+#include "cln/ring.h"
+
+namespace cln {
class cl_null_ring : public cl_ring { public: cl_null_ring (); };
extern const cl_null_ring cl_0_ring; // math. {0}
//CL_REQUIRE(cl_0_ring)
+} // namespace cln
+
#endif /* _CL_NULL_RING_H */
#ifndef _CL_NUMBER_H
#define _CL_NUMBER_H
-#include "cl_object.h"
-#include "cl_malloc.h"
+#include "cln/object.h"
+#include "cln/malloc.h"
+
+namespace cln {
// Type hierachy:
// Number (N) =
// Ratio (RT)
// Complex (C)
-
// Constructors and assignment operators from C numeric types.
#define CL_DEFINE_INT_CONSTRUCTOR(_class_,_type_) \
const type& __tmp_##x = *(const type*) &x; \
const type& x = __tmp_##x;
+} // namespace cln
#endif /* _CL_NUMBER_H */
#ifndef _CL_NUMBER_IO_H
#define _CL_NUMBER_IO_H
-#include "cl_io.h"
-#include "cl_number.h"
+#include "cln/io.h"
+#include "cln/number.h"
+
+namespace cln {
// Input.
struct cl_read_flags;
+} // namespace cln
+
#endif /* _CL_NUMBER_IO_H */
#ifndef _CL_NUMTHEORY_H
#define _CL_NUMTHEORY_H
-#include "cl_number.h"
-#include "cl_integer.h"
-#include "cl_modinteger.h"
-#include "cl_condition.h"
+#include "cln/number.h"
+#include "cln/integer.h"
+#include "cln/modinteger.h"
+#include "cln/condition.h"
+
+namespace cln {
// jacobi(a,b) returns the Jacobi symbol
// ( a )
extern const cornacchia_t cornacchia1 (const cl_I& d, const cl_I& p);
extern const cornacchia_t cornacchia4 (const cl_I& d, const cl_I& p);
+} // namespace cln
+
#endif /* _CL_NUMTHEORY_H */
#ifndef _CL_OBJECT_H
#define _CL_OBJECT_H
-#include "cl_types.h"
-#include "cl_modules.h"
+#include "cln/types.h"
+#include "cln/modules.h"
#include <stdlib.h>
+namespace cln {
+
// We don't have to deal with circular structures, so normal reference counting
// is sufficient. Is also has the advantage of being mostly non-interrupting.
#define cl_class_flags_subclass_rational 8 // all instances belong to cl_RA
#define cl_class_flags_number_ring 16 // all instances are rings whose
// elements belong to cl_number
-// Function to print an object for debugging, to cl_stderr.
+// Function to print an object for debugging, to stderr.
typedef void (*cl_heap_dprint_function) (cl_heap* pointer);
struct cl_class {
// Define a conversion operator from one object to another object of the
// same size.
-#if (defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ <= 7)) // workaround g++ bug
- #define CL_DEFINE_CONVERTER(target_class) \
- operator target_class () const \
- { \
- if (sizeof(*this) != sizeof(target_class)) cl_abort(); \
- return * (const target_class *) (void*) this; \
- }
-#else
#define CL_DEFINE_CONVERTER(target_class) \
operator const target_class & () const \
{ \
if (sizeof(*this) != sizeof(target_class)) cl_abort(); \
return * (const target_class *) (void*) this; \
}
-#endif
+
+} // namespace cln
#endif /* _CL_OBJECT_H */
#ifndef _CL_OUTPUT_H
#define _CL_OUTPUT_H
-#include "cl_types.h"
-#include "cl_floatformat.h"
-#include "cl_io.h"
-#include "cl_string.h"
+#include "cln/types.h"
+#include "cln/floatformat.h"
+#include "cln/io.h"
+#include "cln/string.h"
+
+namespace cln {
struct cl_print_rational_flags {
// Base in which rational numbers are to be printed.
// Flag whether to prefer type specific exponent markers over 'E'.
cl_boolean float_readably;
// If !float_readably, the format which earns the 'E' exponent marker.
- cl_float_format_t default_float_format;
+ float_format_t default_float_format;
// Constructor.
cl_print_float_flags () :
float_readably (cl_false),
- default_float_format (cl_float_format_ffloat) {}
+ default_float_format (float_format_ffloat) {}
};
struct cl_print_real_flags : cl_print_rational_flags, cl_print_float_flags {};
struct cl_print_flags : cl_print_number_flags, cl_print_vector_flags, cl_print_univpoly_flags {};
-extern cl_print_flags cl_default_print_flags;
+extern cl_print_flags default_print_flags;
+
+} // namespace cln
#endif /* _CL_OUTPUT_H */
#ifndef _CL_PROPLIST_H
#define _CL_PROPLIST_H
-#include "cl_symbol.h"
-#include "cl_malloc.h"
+#include "cln/symbol.h"
+#include "cln/malloc.h"
+
+namespace cln {
// The only extensible way to extend objects at runtime in an extensible
// and decentralized way (without having to modify the object's class)
// Destructor.
virtual ~cl_property () {}
// Allocation and deallocation.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void* operator new (size_t size) { return malloc_hook(size); }
+ void operator delete (void* ptr) { free_hook(ptr); }
private:
virtual void dummy ();
// Friend declarations. They are for the compiler. Just ignore them.
friend class cl_property_list;
};
#define SUBCLASS_cl_property() \
- void* operator new (size_t size) { return cl_malloc_hook(size); } \
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void* operator new (size_t size) { return malloc_hook(size); } \
+ void operator delete (void* ptr) { free_hook(ptr); }
struct cl_property_list {
private:
~cl_property_list ();
};
+} // namespace cln
+
#endif /* _CL_PROPLIST_H */
#ifndef _CL_RANDOM_H
#define _CL_RANDOM_H
-#include "cl_types.h"
-#include "cl_modules.h"
+#include "cln/types.h"
+#include "cln/modules.h"
-class cl_random_state {
+namespace cln {
+
+class random_state {
public:
struct { uint32 hi; uint32 lo; } seed;
// Constructor:
- cl_random_state ();
+ random_state ();
};
// random32(randomstate) liefert eine neue Zufallszahl.
// > randomstate: ein Random-State, wird verändert
// < ergebnis: eine 32-Bit-Zufallszahl
-extern uint32 random32 (cl_random_state& randomstate);
+extern uint32 random32 (random_state& randomstate);
#if defined(HAVE_FAST_LONGLONG)
// random64(randomstate) liefert eine neue Zufallszahl.
// > randomstate: ein Random-State, wird verändert
// < ergebnis: eine 64-Bit-Zufallszahl
-inline uint64 random64 (cl_random_state& randomstate)
+inline uint64 random64 (random_state& randomstate)
{
return ((uint64)random32(randomstate) << 32)
| (uint64)random32(randomstate);
#endif
// Ein globaler Zufallszahlengenerator.
-extern cl_random_state cl_default_random_state;
+extern random_state default_random_state;
CL_REQUIRE(cl_random_def)
// Das ist der Default-Generator.
inline uint32 random32 (void)
- { return random32(cl_default_random_state); }
+ { return random32(default_random_state); }
#if defined(HAVE_FAST_LONGLONG)
inline uint64 random64 (void)
- { return random64(cl_default_random_state); }
+ { return random64(default_random_state); }
#endif
+} // namespace cln
+
#endif /* _CL_RANDOM_H */
#ifndef _CL_RATIONAL_H
#define _CL_RATIONAL_H
-#include "cl_number.h"
-#include "cl_rational_class.h"
-#include "cl_integer_class.h"
+#include "cln/number.h"
+#include "cln/rational_class.h"
+#include "cln/integer_class.h"
+namespace cln {
CL_DEFINE_AS_CONVERSION(cl_RA)
// (abs r), wo r eine rationale Zahl ist.
extern const cl_RA abs (const cl_RA& r);
-// cl_equal(r,s) vergleicht zwei rationale Zahlen r und s auf Gleichheit.
-extern cl_boolean cl_equal (const cl_RA& r, const cl_RA& s);
-// cl_equal_hashcode(r) liefert einen cl_equal-invarianten Hashcode für r.
-extern uint32 cl_equal_hashcode (const cl_RA& r);
+// equal(r,s) vergleicht zwei rationale Zahlen r und s auf Gleichheit.
+extern cl_boolean equal (const cl_RA& r, const cl_RA& s);
+// equal_hashcode(r) liefert einen equal-invarianten Hashcode für r.
+extern uint32 equal_hashcode (const cl_RA& r);
-// cl_compare(r,s) vergleicht zwei rationale Zahlen r und s.
+// compare(r,s) vergleicht zwei rationale Zahlen r und s.
// Ergebnis: 0 falls r=s, +1 falls r>s, -1 falls r<s.
-extern cl_signean cl_compare (const cl_RA& r, const cl_RA& s);
+extern cl_signean compare (const cl_RA& r, const cl_RA& s);
inline bool operator== (const cl_RA& x, const cl_RA& y)
- { return cl_equal(x,y); }
+ { return equal(x,y); }
inline bool operator!= (const cl_RA& x, const cl_RA& y)
- { return !cl_equal(x,y); }
+ { return !equal(x,y); }
inline bool operator<= (const cl_RA& x, const cl_RA& y)
- { return cl_compare(x,y)<=0; }
+ { return compare(x,y)<=0; }
inline bool operator< (const cl_RA& x, const cl_RA& y)
- { return cl_compare(x,y)<0; }
+ { return compare(x,y)<0; }
inline bool operator>= (const cl_RA& x, const cl_RA& y)
- { return cl_compare(x,y)>=0; }
+ { return compare(x,y)>=0; }
inline bool operator> (const cl_RA& x, const cl_RA& y)
- { return cl_compare(x,y)>0; }
+ { return compare(x,y)>0; }
// minusp(x) == (< x 0)
extern cl_boolean minusp (const cl_RA& x);
extern cl_boolean logp (const cl_RA& a, const cl_RA& b, cl_RA* l);
// Konversion zu einem C "float".
-extern float cl_float_approx (const cl_RA& x);
+extern float float_approx (const cl_RA& x);
// Konversion zu einem C "double".
-extern double cl_double_approx (const cl_RA& x);
+extern double double_approx (const cl_RA& x);
#ifdef WANT_OBFUSCATING_OPERATORS
};
#endif
+} // namespace cln
#endif /* _CL_RATIONAL_H */
#ifndef _CL_RATIONAL_CLASS_H
#define _CL_RATIONAL_CLASS_H
-#include "cl_number.h"
-#include "cl_real_class.h"
+#include "cln/number.h"
+#include "cln/real_class.h"
+namespace cln {
class cl_RA : public cl_R {
public:
cl_RA (cl_private_thing);
cl_RA (struct cl_heap_ratio *);
public: // Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, cl_RA* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
private:
// Friend declarations. They are for the compiler. Just ignore them.
};
CL_DEFINE_LONG_CONSTRUCTORS(cl_RA)
CL_DEFINE_LONG_ASSIGNMENT_OPERATORS(cl_RA)
+} // namespace cln
#endif /* _CL_RATIONAL_CLASS_H */
#ifndef _CL_RATIONAL_IO_H
#define _CL_RATIONAL_IO_H
-#include "cl_number_io.h"
-#include "cl_rational.h"
+#include "cln/number_io.h"
+#include "cln/rational.h"
+namespace cln {
// Undocumented input functions
inline void fprint (cl_ostream stream, const cl_RA& x)
{
- extern cl_print_flags cl_default_print_flags;
- print_rational(stream,cl_default_print_flags,x);
+ extern cl_print_flags default_print_flags;
+ print_rational(stream,default_print_flags,x);
}
CL_DEFINE_PRINT_OPERATOR(cl_RA)
+} // namespace cln
#endif /* _CL_RATIONAL_IO_H */
#ifndef _CL_RATIONAL_RING_H
#define _CL_RATIONAL_RING_H
-#include "cl_ring.h"
-#include "cl_rational_class.h"
+#include "cln/ring.h"
+#include "cln/rational_class.h"
+
+namespace cln {
typedef cl_specialized_number_ring<cl_RA> cl_rational_ring;
extern const cl_rational_ring cl_RA_ring; // math. Q
extern cl_class cl_class_rational_ring;
//CL_REQUIRE(cl_RA_ring)
+} // namespace cln
+
#endif /* _CL_RATIONAL_RING_H */
#ifndef _CL_REAL_H
#define _CL_REAL_H
-#include "cl_number.h"
-#include "cl_real_class.h"
-#include "cl_rational_class.h"
-#include "cl_integer_class.h"
-#include "cl_float.h"
-#include "cl_floatformat.h"
-#include "cl_random.h"
+#include "cln/number.h"
+#include "cln/real_class.h"
+#include "cln/rational_class.h"
+#include "cln/integer_class.h"
+#include "cln/float.h"
+#include "cln/floatformat.h"
+#include "cln/random.h"
+namespace cln {
CL_DEFINE_AS_CONVERSION(cl_R)
// > x: eine reelle Zahl
// > f: eine Float-Format-Spezifikation
// < ergebnis: (float x f)
-extern const cl_F cl_float (const cl_R& x, cl_float_format_t f);
+extern const cl_F cl_float (const cl_R& x, float_format_t f);
// cl_float(x) wandelt eine reelle Zahl x in ein Float um
// und rundet dabei nötigenfalls.
// > x: eine reelle Zahl
// < ergebnis: (float x)
-// Abhängig von cl_default_float_format.
+// Abhängig von default_float_format.
extern const cl_F cl_float (const cl_R& x);
inline const cl_RA rational (const cl_RA& x) { return x; }
-// cl_equal(x,y) vergleicht zwei reelle Zahlen x und y auf Gleichheit.
-extern cl_boolean cl_equal (const cl_R& x, const cl_R& y);
-// cl_equal_hashcode(x) liefert einen cl_equal-invarianten Hashcode für x.
-extern uint32 cl_equal_hashcode (const cl_R& x);
+// equal(x,y) vergleicht zwei reelle Zahlen x und y auf Gleichheit.
+extern cl_boolean equal (const cl_R& x, const cl_R& y);
+// equal_hashcode(x) liefert einen equal-invarianten Hashcode für x.
+extern uint32 equal_hashcode (const cl_R& x);
-// cl_compare(x,y) vergleicht zwei reelle Zahlen x und y.
+// compare(x,y) vergleicht zwei reelle Zahlen x und y.
// Ergebnis: 0 falls x=y, +1 falls x>y, -1 falls x<y.
-extern cl_signean cl_compare (const cl_R& x, const cl_R& y);
+extern cl_signean compare (const cl_R& x, const cl_R& y);
inline bool operator== (const cl_R& x, const cl_R& y)
- { return cl_equal(x,y); }
+ { return equal(x,y); }
inline bool operator!= (const cl_R& x, const cl_R& y)
- { return !cl_equal(x,y); }
+ { return !equal(x,y); }
inline bool operator<= (const cl_R& x, const cl_R& y)
- { return cl_compare(x,y)<=0; }
+ { return compare(x,y)<=0; }
inline bool operator< (const cl_R& x, const cl_R& y)
- { return cl_compare(x,y)<0; }
+ { return compare(x,y)<0; }
inline bool operator>= (const cl_R& x, const cl_R& y)
- { return cl_compare(x,y)>=0; }
+ { return compare(x,y)>=0; }
inline bool operator> (const cl_R& x, const cl_R& y)
- { return cl_compare(x,y)>0; }
+ { return compare(x,y)>0; }
// max(x,y) liefert (max x y), wo x und y reelle Zahlen sind.
extern const cl_R max (const cl_R& x, const cl_R& y);
// Konversion zu einem C "float".
-extern float cl_float_approx (const cl_R& x);
+extern float float_approx (const cl_R& x);
// Konversion zu einem C "double".
-extern double cl_double_approx (const cl_R& x);
+extern double double_approx (const cl_R& x);
// Transcendental functions
inline const cl_R cos (const long x) { return cos(cl_I(x)); }
inline const cl_R cos (const unsigned long x) { return cos(cl_I(x)); }
-// cl_cos_sin(x) liefert ((cos x),(sin x)), beide Werte.
-extern const cl_cos_sin_t cl_cos_sin (const cl_R& x);
+// cos_sin(x) liefert ((cos x),(sin x)), beide Werte.
+extern const cos_sin_t cos_sin (const cl_R& x);
// tan(x) liefert den Tangens (tan x) einer reellen Zahl x.
extern const cl_R tan (const cl_R& x);
inline const cl_R cosh (const long x) { return cosh(cl_I(x)); }
inline const cl_R cosh (const unsigned long x) { return cosh(cl_I(x)); }
-// cl_cosh_sinh(x) liefert ((cosh x),(sinh x)), beide Werte.
-extern const cl_cosh_sinh_t cl_cosh_sinh (const cl_R& x);
+// cosh_sinh(x) liefert ((cosh x),(sinh x)), beide Werte.
+extern const cosh_sinh_t cosh_sinh (const cl_R& x);
// tanh(x) liefert zu einer reellen Zahl x die Zahl tanh(x).
extern const cl_R tanh (const cl_R& x);
// random_R(randomstate,n) liefert zu einer reellen Zahl n>0 eine Zufallszahl
// x mit 0 <= x < n.
-extern const cl_R random_R (cl_random_state& randomstate, const cl_R& n);
+extern const cl_R random_R (random_state& randomstate, const cl_R& n);
inline const cl_R random_R (const cl_R& n)
- { return random_R(cl_default_random_state,n); }
+ { return random_R(default_random_state,n); }
#ifdef WANT_OBFUSCATING_OPERATORS
};
#endif
+} // namespace cln
#endif /* _CL_REAL_H */
#ifndef _CL_REAL_CLASS_H
#define _CL_REAL_CLASS_H
-#include "cl_number.h"
-#include "cl_complex_class.h"
+#include "cln/number.h"
+#include "cln/complex_class.h"
+namespace cln {
class cl_R : public cl_N {
public:
// Private constructor.
cl_R (cl_private_thing);
public: // Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, cl_R* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
private:
// Friend declarations. They are for the compiler. Just ignore them.
};
CL_DEFINE_FLOAT_CONSTRUCTOR(cl_R)
CL_DEFINE_DOUBLE_CONSTRUCTOR(cl_R)
-
+} // namespace cln
#endif /* _CL_REAL_CLASS_H */
#ifndef _CL_REAL_IO_H
#define _CL_REAL_IO_H
-#include "cl_number_io.h"
-#include "cl_real.h"
+#include "cln/number_io.h"
+#include "cln/real.h"
+namespace cln {
// Undocumented input functions
inline void fprint (cl_ostream stream, const cl_R& x)
{
- extern cl_print_flags cl_default_print_flags;
- print_real(stream,cl_default_print_flags,x);
+ extern cl_print_flags default_print_flags;
+ print_real(stream,default_print_flags,x);
}
CL_DEFINE_PRINT_OPERATOR(cl_R)
+} // namespace cln
#endif /* _CL_REAL_IO_H */
#ifndef _CL_REAL_RING_H
#define _CL_REAL_RING_H
-#include "cl_ring.h"
-#include "cl_real_class.h"
+#include "cln/ring.h"
+#include "cln/real_class.h"
+
+namespace cln {
typedef cl_specialized_number_ring<cl_R> cl_real_ring;
extern const cl_real_ring cl_R_ring; // math. R
extern cl_class cl_class_real_ring;
//CL_REQUIRE(cl_R_ring)
+} // namespace cln
+
#endif /* _CL_REAL_RING_H */
#ifndef _CL_RING_H
#define _CL_RING_H
-#include "cl_object.h"
-#include "cl_malloc.h"
-#include "cl_proplist.h"
-#include "cl_number.h"
-#include "cl_io.h"
+#include "cln/object.h"
+#include "cln/malloc.h"
+#include "cln/proplist.h"
+#include "cln/number.h"
+#include "cln/io.h"
+
+namespace cln {
+
class cl_I;
// This file defines the general layout of rings, ring elements, and
_cl_ring_element (const cl_heap_ring* R, const cl_gcobject& r) : rep (as_cl_private_thing(r)) { (void)R; }
_cl_ring_element (const cl_ring& R, const cl_gcobject& r) : rep (as_cl_private_thing(r)) { (void)R; }
public: // Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, _cl_ring_element* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
};
class cl_ring_element : public _cl_ring_element {
public: // Debugging output.
void debug_print () const;
// Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, cl_ring_element* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
};
// The ring operations are encoded as vectors of function pointers. You
const _cl_ring_element (* expt_pos) (cl_heap_ring* R, const _cl_ring_element& x, const cl_I& y);
// ...
};
-#if defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ < 8) // workaround two g++-2.7.0 bugs
- #define cl_ring_setops _cl_ring_setops
- #define cl_ring_addops _cl_ring_addops
- #define cl_ring_mulops _cl_ring_mulops
-#else
typedef const _cl_ring_setops cl_ring_setops;
typedef const _cl_ring_addops cl_ring_addops;
typedef const _cl_ring_mulops cl_ring_mulops;
-#endif
// Representation of a ring in memory.
class cl_heap_ring : public cl_heap {
public:
// Allocation.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
// Deallocation.
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
private:
cl_property_list properties;
protected:
#define SUBCLASS_cl_heap_ring() \
public: \
/* Allocation. */ \
- void* operator new (size_t size) { return cl_malloc_hook(size); } \
+ void* operator new (size_t size) { return malloc_hook(size); } \
/* Deallocation. */ \
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
// Operations on ring elements.
};
#endif
+} // namespace cln
#endif /* _CL_RING_H */
#ifndef _CL_SFLOAT_H
#define _CL_SFLOAT_H
-#include "cl_number.h"
-#include "cl_sfloat_class.h"
-#include "cl_integer_class.h"
-#include "cl_float.h"
+#include "cln/number.h"
+#include "cln/sfloat_class.h"
+#include "cln/integer_class.h"
+#include "cln/float.h"
+namespace cln {
CL_DEFINE_AS_CONVERSION(cl_SF)
// Liefert zu einem Short-Float x : (- x), ein SF.
extern const cl_SF operator- (const cl_SF& x);
-// cl_compare(x,y) vergleicht zwei Short-Floats x und y.
+// compare(x,y) vergleicht zwei Short-Floats x und y.
// Ergebnis: 0 falls x=y, +1 falls x>y, -1 falls x<y.
-extern cl_signean cl_compare (const cl_SF& x, const cl_SF& y);
+extern cl_signean compare (const cl_SF& x, const cl_SF& y);
-// cl_equal_hashcode(x) liefert einen cl_equal-invarianten Hashcode für x.
-extern uint32 cl_equal_hashcode (const cl_SF& x);
+// equal_hashcode(x) liefert einen equal-invarianten Hashcode für x.
+extern uint32 equal_hashcode (const cl_SF& x);
inline bool operator== (const cl_SF& x, const cl_SF& y)
- { return cl_compare(x,y)==0; }
+ { return compare(x,y)==0; }
inline bool operator!= (const cl_SF& x, const cl_SF& y)
- { return cl_compare(x,y)!=0; }
+ { return compare(x,y)!=0; }
inline bool operator<= (const cl_SF& x, const cl_SF& y)
- { return cl_compare(x,y)<=0; }
+ { return compare(x,y)<=0; }
inline bool operator< (const cl_SF& x, const cl_SF& y)
- { return cl_compare(x,y)<0; }
+ { return compare(x,y)<0; }
inline bool operator>= (const cl_SF& x, const cl_SF& y)
- { return cl_compare(x,y)>=0; }
+ { return compare(x,y)>=0; }
inline bool operator> (const cl_SF& x, const cl_SF& y)
- { return cl_compare(x,y)>0; }
+ { return compare(x,y)>0; }
// minusp(x) == (< x 0)
extern cl_boolean minusp (const cl_SF& x);
// Return type for decode_float:
-struct cl_decoded_sfloat {
+struct decoded_sfloat {
cl_SF mantissa;
cl_I exponent;
cl_SF sign;
// Constructor.
- cl_decoded_sfloat () {}
- cl_decoded_sfloat (const cl_SF& m, const cl_I& e, const cl_SF& s) : mantissa(m), exponent(e), sign(s) {}
+ decoded_sfloat () {}
+ decoded_sfloat (const cl_SF& m, const cl_I& e, const cl_SF& s) : mantissa(m), exponent(e), sign(s) {}
};
// decode_float(x) liefert zu einem Float x: (decode-float x).
// x = 0.0 liefert (0.0, 0, 1.0).
// x = (-1)^s * 2^e * m liefert ((-1)^0 * 2^0 * m, e als Integer, (-1)^s).
-extern const cl_decoded_sfloat decode_float (const cl_SF& x);
+extern const decoded_sfloat decode_float (const cl_SF& x);
// float_exponent(x) liefert zu einem Float x:
// den Exponenten von (decode-float x).
// Konversion zu einem C "float".
-extern float cl_float_approx (const cl_SF& x);
+extern float float_approx (const cl_SF& x);
// Konversion zu einem C "double".
-extern double cl_double_approx (const cl_SF& x);
+extern double double_approx (const cl_SF& x);
#ifdef WANT_OBFUSCATING_OPERATORS
};
#endif
+} // namespace cln
#endif /* _CL_SFLOAT_H */
#ifndef _CL_SFLOAT_CLASS_H
#define _CL_SFLOAT_CLASS_H
-#include "cl_number.h"
-#include "cl_float_class.h"
+#include "cln/number.h"
+#include "cln/float_class.h"
+namespace cln {
class cl_SF : public cl_F {
public:
cl_SF (cl_private_thing);
cl_SF (struct cl_sfloat * /* NULL! */, cl_uint);
public: // Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, cl_SF* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
};
// Private constructors.
// The copy constructors.
CL_DEFINE_COPY_CONSTRUCTOR2(cl_SF,cl_F)
+} // namespace cln
#endif /* _CL_SFLOAT_CLASS_H */
#ifndef _CL_SFLOAT_IO_H
#define _CL_SFLOAT_IO_H
-#include "cl_number_io.h"
-#include "cl_sfloat.h"
+#include "cln/number_io.h"
+#include "cln/sfloat.h"
+
+namespace cln {
inline cl_istream operator>> (cl_istream stream, cl_SF& result)
{
}
// The following does strictly the same as the general `fprint' for floats.
-// It is here only so that people don't need to include <cl_float_io.h>.
+// It is here only so that people don't need to include <cln/float_io.h>.
inline void fprint (cl_ostream stream, const cl_SF& x)
{
extern void print_float (cl_ostream stream, const cl_print_flags& flags, const cl_F& z);
- extern cl_print_flags cl_default_print_flags;
- print_float(stream,cl_default_print_flags,x);
+ extern cl_print_flags default_print_flags;
+ print_float(stream,default_print_flags,x);
}
CL_DEFINE_PRINT_OPERATOR(cl_SF)
+} // namespace cln
+
#endif /* _CL_SFLOAT_IO_H */
#ifndef _CL_STRING_H
#define _CL_STRING_H
-#include "cl_object.h"
-#include "cl_io.h"
-#include "cl_abort.h"
+#include "cln/object.h"
+#include "cln/io.h"
+#include "cln/abort.h"
#include <string.h>
+namespace cln {
+
// General, reference counted and garbage collected strings.
struct cl_heap_string : public cl_heap {
private:
// Input.
-#ifdef CL_IO_IOSTREAM
-
// Reads a line. Up to delim. The delimiter character is not placed in the
// resulting string. The delimiter character is kept in the input stream.
// If EOF is encountered, the stream's eofbit is set.
// If EOF is encountered, the stream's eofbit is set.
extern cl_istream operator>> (cl_istream stream, cl_string& str);
-#endif
-
// Runtime typing support.
extern cl_class cl_class_string;
};
#endif
+} // namespace cln
+
#endif /* _CL_STRING_H */
#ifndef _CL_SYMBOL_H
#define _CL_SYMBOL_H
-#include "cl_string.h"
+#include "cln/string.h"
+
+namespace cln {
// Symbols are just strings, uniquified through a global hash table.
CL_REQUIRE(cl_symbol)
+} // namespace cln
+
#endif /* _CL_SYMBOL_H */
#ifndef _CL_TIMING_H
#define _CL_TIMING_H
-#include "cl_config.h"
-#include "cl_intparam.h"
-#include "cl_types.h"
+#include "cln/config.h"
+#include "cln/intparam.h"
+#include "cln/types.h"
-#include "cl_io.h"
+#include "cln/io.h"
+
+namespace cln {
struct cl_timespec {
uintL tv_sec; // seconds since 1970-01-01
struct cl_timing {
// Constructor, starts the time interval.
cl_timing (cl_time_consumption& accumulator);
- cl_timing (cl_ostream destination = cl_stderr);
- cl_timing (const char *, cl_ostream destination = cl_stderr);
+ cl_timing (cl_ostream destination = stderr);
+ cl_timing (const char *, cl_ostream destination = stderr);
// Destructor, closes the time interval and does a report.
~cl_timing ();
//private:
// Usage:
// { CL_TIMING; computation(); }
// or { CL_TIMING(accumulator); computation(); }
-// or { CL_TIMING(cl_stdout); computation(); }
+// or { CL_TIMING(stdout); computation(); }
// The timing interval starts immediately and ends at the closing brace.
#define CL_TIMING CL_TIMING1(__LINE__)
#define CL_TIMING1(line) CL_TIMING2(line)
#define CL_TIMING2(line) cl_timing cl_timing_dummy_##line
+} // namespace cln
+
#endif /* _CL_TIMING_H */
#define _CL_TYPES_H
// CPU and other
-#include "cl_config.h"
+#include "cln/config.h"
// char_bitsize, short_bitsize, long_bitsize, long_long_bitsize
-#include "cl_intparam.h"
+#include "cln/intparam.h"
// Elementary arithmetic types of given width:
// 8 bits
#ifndef _CL_UNIVPOLY_H
#define _CL_UNIVPOLY_H
-#include "cl_object.h"
-#include "cl_ring.h"
-#include "cl_malloc.h"
-#include "cl_proplist.h"
-#include "cl_symbol.h"
-#include "cl_V.h"
-#include "cl_io.h"
+#include "cln/object.h"
+#include "cln/ring.h"
+#include "cln/malloc.h"
+#include "cln/proplist.h"
+#include "cln/symbol.h"
+#include "cln/V.h"
+#include "cln/io.h"
+
+namespace cln {
// To protect against mixing elements of different polynomial rings, every
// polynomial carries its ring in itself.
// Conversion.
CL_DEFINE_CONVERTER(_cl_ring_element)
public: // Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, _cl_UP* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
};
class cl_UP /* cf. cl_ring_element */ : public _cl_UP {
// Debugging output.
void debug_print () const;
public: // Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, cl_UP* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
};
// evaluate, substitute an element of R
const cl_ring_element (* eval) (cl_heap_univpoly_ring* R, const _cl_UP& x, const cl_ring_element& y);
};
-#if defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ < 8) // workaround two g++-2.7.0 bugs
- #define cl_univpoly_setops _cl_univpoly_setops
- #define cl_univpoly_addops _cl_univpoly_addops
- #define cl_univpoly_mulops _cl_univpoly_mulops
- #define cl_univpoly_modulops _cl_univpoly_modulops
- #define cl_univpoly_polyops _cl_univpoly_polyops
-#else
typedef const _cl_univpoly_setops cl_univpoly_setops;
typedef const _cl_univpoly_addops cl_univpoly_addops;
typedef const _cl_univpoly_mulops cl_univpoly_mulops;
typedef const _cl_univpoly_modulops cl_univpoly_modulops;
typedef const _cl_univpoly_polyops cl_univpoly_polyops;
-#endif
// Representation of a univariate polynomial ring.
// Lookup or create the "standard" univariate polynomial ring over a ring r.
-extern const cl_univpoly_ring cl_find_univpoly_ring (const cl_ring& r);
+extern const cl_univpoly_ring find_univpoly_ring (const cl_ring& r);
//CL_REQUIRE(cl_UP_unnamed)
// Lookup or create a univariate polynomial ring with a named variable over r.
-extern const cl_univpoly_ring cl_find_univpoly_ring (const cl_ring& r, const cl_symbol& varname);
+extern const cl_univpoly_ring find_univpoly_ring (const cl_ring& r, const cl_symbol& varname);
//CL_REQUIRE(cl_UP_named)
CL_REQUIRE(cl_UP)
};
#endif
+} // namespace cln
#endif /* _CL_UNIVPOLY_H */
+namespace cln {
// Templates for univariate polynomials of complex/real/rational/integers.
// Evaluation.
const T operator() (const T& y) const;
public: // Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, cl_UP_specialized<T>* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
};
template <class T>
// Lookup of polynomial rings.
template <class T>
-inline const cl_univpoly_specialized_ring<T> cl_find_univpoly_ring (const cl_specialized_number_ring<T>& r)
-{ return The(cl_univpoly_specialized_ring<T>) (cl_find_univpoly_ring((const cl_ring&)r)); }
+inline const cl_univpoly_specialized_ring<T> find_univpoly_ring (const cl_specialized_number_ring<T>& r)
+{ return The(cl_univpoly_specialized_ring<T>) (find_univpoly_ring((const cl_ring&)r)); }
template <class T>
-inline const cl_univpoly_specialized_ring<T> cl_find_univpoly_ring (const cl_specialized_number_ring<T>& r, const cl_symbol& varname)
-{ return The(cl_univpoly_specialized_ring<T>) (cl_find_univpoly_ring((const cl_ring&)r,varname)); }
+inline const cl_univpoly_specialized_ring<T> find_univpoly_ring (const cl_specialized_number_ring<T>& r, const cl_symbol& varname)
+{ return The(cl_univpoly_specialized_ring<T>) (find_univpoly_ring((const cl_ring&)r,varname)); }
// Operations on polynomials.
#endif /* _CL_UNIVPOLY_AUX_H */
#endif
-#endif
+#endif /* notyet */
+
+} // namespace cln
#ifndef _CL_UNIVPOLY_COMPLEX_H
#define _CL_UNIVPOLY_COMPLEX_H
-#include "cl_ring.h"
-#include "cl_univpoly.h"
-#include "cl_number.h"
-#include "cl_complex_class.h"
-#include "cl_integer_class.h"
-#include "cl_complex_ring.h"
+#include "cln/ring.h"
+#include "cln/univpoly.h"
+#include "cln/number.h"
+#include "cln/complex_class.h"
+#include "cln/integer_class.h"
+#include "cln/complex_ring.h"
+
+namespace cln {
// Normal univariate polynomials with stricter static typing:
// `cl_N' instead of `cl_ring_element'.
// Evaluation.
const cl_N operator() (const cl_N& y) const;
public: // Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, cl_UP_N* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
};
class cl_heap_univpoly_complex_ring : public cl_heap_univpoly_ring {
};
// Lookup of polynomial rings.
-inline const cl_univpoly_complex_ring cl_find_univpoly_ring (const cl_complex_ring& r)
-{ return The(cl_univpoly_complex_ring) (cl_find_univpoly_ring((const cl_ring&)r)); }
-inline const cl_univpoly_complex_ring cl_find_univpoly_ring (const cl_complex_ring& r, const cl_symbol& varname)
-{ return The(cl_univpoly_complex_ring) (cl_find_univpoly_ring((const cl_ring&)r,varname)); }
+inline const cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& r)
+{ return The(cl_univpoly_complex_ring) (find_univpoly_ring((const cl_ring&)r)); }
+inline const cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& r, const cl_symbol& varname)
+{ return The(cl_univpoly_complex_ring) (find_univpoly_ring((const cl_ring&)r,varname)); }
// Operations on polynomials.
CL_REQUIRE(cl_C_ring)
+} // namespace cln
+
#endif /* _CL_UNIVPOLY_COMPLEX_H */
#ifndef _CL_UNIVPOLY_INTEGER_H
#define _CL_UNIVPOLY_INTEGER_H
-#include "cl_ring.h"
-#include "cl_univpoly.h"
-#include "cl_number.h"
-#include "cl_integer_class.h"
-#include "cl_integer_ring.h"
+#include "cln/ring.h"
+#include "cln/univpoly.h"
+#include "cln/number.h"
+#include "cln/integer_class.h"
+#include "cln/integer_ring.h"
+
+namespace cln {
// Normal univariate polynomials with stricter static typing:
// `cl_I' instead of `cl_ring_element'.
// Evaluation.
const cl_I operator() (const cl_I& y) const;
public: // Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, cl_UP_I* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
};
class cl_heap_univpoly_integer_ring : public cl_heap_univpoly_ring {
};
// Lookup of polynomial rings.
-inline const cl_univpoly_integer_ring cl_find_univpoly_ring (const cl_integer_ring& r)
-{ return The(cl_univpoly_integer_ring) (cl_find_univpoly_ring((const cl_ring&)r)); }
-inline const cl_univpoly_integer_ring cl_find_univpoly_ring (const cl_integer_ring& r, const cl_symbol& varname)
-{ return The(cl_univpoly_integer_ring) (cl_find_univpoly_ring((const cl_ring&)r,varname)); }
+inline const cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& r)
+{ return The(cl_univpoly_integer_ring) (find_univpoly_ring((const cl_ring&)r)); }
+inline const cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& r, const cl_symbol& varname)
+{ return The(cl_univpoly_integer_ring) (find_univpoly_ring((const cl_ring&)r,varname)); }
// Operations on polynomials.
// Returns the n-th Tchebychev polynomial (n >= 0).
-extern const cl_UP_I cl_tschebychev (sintL n);
+extern const cl_UP_I tschebychev (sintL n);
// Returns the n-th Hermite polynomial (n >= 0).
-extern const cl_UP_I cl_hermite (sintL n);
+extern const cl_UP_I hermite (sintL n);
// Returns the n-th Laguerre polynomial (n >= 0).
-extern const cl_UP_I cl_laguerre (sintL n);
+extern const cl_UP_I laguerre (sintL n);
+
+} // namespace cln
#endif /* _CL_UNIVPOLY_INTEGER_H */
#ifndef _CL_UNIVPOLY_MODINT_H
#define _CL_UNIVPOLY_MODINT_H
-#include "cl_ring.h"
-#include "cl_univpoly.h"
-#include "cl_modinteger.h"
-#include "cl_integer_class.h"
+#include "cln/ring.h"
+#include "cln/univpoly.h"
+#include "cln/modinteger.h"
+#include "cln/integer_class.h"
+
+namespace cln {
// Normal univariate polynomials with stricter static typing:
// `cl_MI' instead of `cl_ring_element'.
// Evaluation.
const cl_MI operator() (const cl_MI& y) const;
public: // Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, cl_UP_MI* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
};
class cl_heap_univpoly_modint_ring : public cl_heap_univpoly_ring {
};
// Lookup of polynomial rings.
-inline const cl_univpoly_modint_ring cl_find_univpoly_ring (const cl_modint_ring& r)
-{ return The(cl_univpoly_modint_ring) (cl_find_univpoly_ring((const cl_ring&)r)); }
-inline const cl_univpoly_modint_ring cl_find_univpoly_ring (const cl_modint_ring& r, const cl_symbol& varname)
-{ return The(cl_univpoly_modint_ring) (cl_find_univpoly_ring((const cl_ring&)r,varname)); }
+inline const cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& r)
+{ return The(cl_univpoly_modint_ring) (find_univpoly_ring((const cl_ring&)r)); }
+inline const cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& r, const cl_symbol& varname)
+{ return The(cl_univpoly_modint_ring) (find_univpoly_ring((const cl_ring&)r,varname)); }
// Operations on polynomials.
inline const cl_UP_MI deriv (const cl_UP_MI& x)
{ return The2(cl_UP_MI)(deriv((const cl_UP&)x)); }
+} // namespace cln
+
#endif /* _CL_UNIVPOLY_MODINT_H */
#ifndef _CL_UNIVPOLY_RATIONAL_H
#define _CL_UNIVPOLY_RATIONAL_H
-#include "cl_ring.h"
-#include "cl_univpoly.h"
-#include "cl_number.h"
-#include "cl_rational_class.h"
-#include "cl_integer_class.h"
-#include "cl_rational_ring.h"
+#include "cln/ring.h"
+#include "cln/univpoly.h"
+#include "cln/number.h"
+#include "cln/rational_class.h"
+#include "cln/integer_class.h"
+#include "cln/rational_ring.h"
+
+namespace cln {
// Normal univariate polynomials with stricter static typing:
// `cl_RA' instead of `cl_ring_element'.
// Evaluation.
const cl_RA operator() (const cl_RA& y) const;
public: // Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, cl_UP_RA* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
};
class cl_heap_univpoly_rational_ring : public cl_heap_univpoly_ring {
};
// Lookup of polynomial rings.
-inline const cl_univpoly_rational_ring cl_find_univpoly_ring (const cl_rational_ring& r)
-{ return The(cl_univpoly_rational_ring) (cl_find_univpoly_ring((const cl_ring&)r)); }
-inline const cl_univpoly_rational_ring cl_find_univpoly_ring (const cl_rational_ring& r, const cl_symbol& varname)
-{ return The(cl_univpoly_rational_ring) (cl_find_univpoly_ring((const cl_ring&)r,varname)); }
+inline const cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& r)
+{ return The(cl_univpoly_rational_ring) (find_univpoly_ring((const cl_ring&)r)); }
+inline const cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& r, const cl_symbol& varname)
+{ return The(cl_univpoly_rational_ring) (find_univpoly_ring((const cl_ring&)r,varname)); }
// Operations on polynomials.
// Returns the n-th Legendre polynomial (n >= 0).
-extern const cl_UP_RA cl_legendre (sintL n);
+extern const cl_UP_RA legendre (sintL n);
+
+} // namespace cln
#endif /* _CL_UNIVPOLY_RATIONAL_H */
#ifndef _CL_UNIVPOLY_REAL_H
#define _CL_UNIVPOLY_REAL_H
-#include "cl_ring.h"
-#include "cl_univpoly.h"
-#include "cl_number.h"
-#include "cl_real_class.h"
-#include "cl_integer_class.h"
-#include "cl_real_ring.h"
+#include "cln/ring.h"
+#include "cln/univpoly.h"
+#include "cln/number.h"
+#include "cln/real_class.h"
+#include "cln/integer_class.h"
+#include "cln/real_ring.h"
+
+namespace cln {
// Normal univariate polynomials with stricter static typing:
// `cl_R' instead of `cl_ring_element'.
// Evaluation.
const cl_R operator() (const cl_R& y) const;
public: // Ability to place an object at a given address.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
void* operator new (size_t size, cl_UP_R* ptr) { (void)size; return ptr; }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
};
class cl_heap_univpoly_real_ring : public cl_heap_univpoly_ring {
};
// Lookup of polynomial rings.
-inline const cl_univpoly_real_ring cl_find_univpoly_ring (const cl_real_ring& r)
-{ return The(cl_univpoly_real_ring) (cl_find_univpoly_ring((const cl_ring&)r)); }
-inline const cl_univpoly_real_ring cl_find_univpoly_ring (const cl_real_ring& r, const cl_symbol& varname)
-{ return The(cl_univpoly_real_ring) (cl_find_univpoly_ring((const cl_ring&)r,varname)); }
+inline const cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& r)
+{ return The(cl_univpoly_real_ring) (find_univpoly_ring((const cl_ring&)r)); }
+inline const cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& r, const cl_symbol& varname)
+{ return The(cl_univpoly_real_ring) (find_univpoly_ring((const cl_ring&)r,varname)); }
// Operations on polynomials.
CL_REQUIRE(cl_R_ring)
+} // namespace cln
+
#endif /* _CL_UNIVPOLY_REAL_H */
**
**/
-#include <LiDIA/kernel/cl_number.h>
-#include <LiDIA/kernel/cl_integer.h>
+#include <LiDIA/kernel/cln/number.h>
+#include <LiDIA/kernel/cln/integer.h>
#define integer_type_name cl_I
#define base_digit uintD
if [ ! -d $(libdir) ] ; then mkdir $(libdir) ; fi
$(LIBTOOL_INSTALL) $(INSTALL_DATA) libcln.la $(libdir)/libcln.la
if [ ! -d $(includedir) ] ; then mkdir $(includedir) ; fi
- $(INSTALL_DATA) $(top_srcdir)/include/*.h $(includedir)
- $(INSTALL_DATA) ../include/*.h $(includedir)
+ if [ ! -d $(includedir)/cln ] ; then mkdir $(includedir)/cln ; fi
+ $(INSTALL_DATA) $(top_srcdir)/include/cln/*.h $(includedir)/cln
+ $(INSTALL_DATA) ../include/cln/*.h $(includedir)/cln
# if [ ! -d $(mandir) ] ; then mkdir $(mandir) ; fi
# if [ ! -d $(mandir)/man3 ] ; then mkdir $(mandir)/man3 ; fi
# if [ ! -d $(datadir) ] ; then mkdir $(datadir) ; fi
installdirs : force
if [ ! -d $(libdir) ] ; then mkdir $(libdir) ; fi
if [ ! -d $(includedir) ] ; then mkdir $(includedir) ; fi
+ if [ ! -d $(includedir)/cln ] ; then mkdir $(includedir)/cln ; fi
# if [ ! -d $(mandir) ] ; then mkdir $(mandir) ; fi
# if [ ! -d $(mandir)/man3 ] ; then mkdir $(mandir)/man3 ; fi
# if [ ! -d $(datadir) ] ; then mkdir $(datadir) ; fi
uninstall : force
$(LIBTOOL_UNINSTALL) $(RM) $(libdir)/libcln.la
- $(RM) $(addprefix $(includedir)/, $(notdir $(wildcard $(top_srcdir)/include/*.h)))
- $(RM) $(addprefix $(includedir)/, $(notdir $(wildcard ../include/*.h)))
+ $(RM) -r $(includedir)/cln
check : all
#ifndef _CL_N_H
#define _CL_N_H
-#include "cl_number.h"
+#include "cln/number.h"
#include "cl_macros.h"
+namespace cln {
+
nonreturning_function(extern, cl_error_division_by_0, (void));
nonreturning_function(extern, cl_as_error, (const cl_number& obj, const char * typestring, const char * filename, int line));
(((((uint32)(msd) << 7) | ((uint32)(msd) >> 25)) ^ ((sint32)(sign) << 30)) + (uintL)(exp))
#define equal_hashcode_one equal_hashcode_low(bit(31),1,0)
+} // namespace cln
+
#endif /* _CL_N_H */
// Implementation.
-#include "cl_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/abort.h"
+
+namespace cln {
void cl_error_division_by_0 (void)
{
- fprint(cl_stderr, "Division by zero.\n");
+ fprint(stderr, "Division by zero.\n");
cl_abort();
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_abort.h"
+#include "cln/abort.h"
// Implementation.
#include <stdlib.h>
+namespace cln {
+
void cl_abort (void)
{
exit(1);
}
+
+} // namespace cln
// Implementation.
-#include "cl_malloc.h"
+#include "cln/malloc.h"
#include "cl_offsetof.h"
+namespace cln {
+
cl_alloca_header* cl_alloc_alloca_header (size_t size)
{
var cl_alloca_header* pointer =
- (cl_alloca_header*)cl_malloc_hook(size+offsetofa(cl_alloca_header,usable_memory));
+ (cl_alloca_header*)malloc_hook(size+offsetofa(cl_alloca_header,usable_memory));
pointer->next = NULL;
return pointer;
}
{
do {
cl_alloca_header* next = pointer->next;
- cl_free_hook(pointer);
+ free_hook(pointer);
pointer = next;
} while (pointer != NULL);
}
+
+} // namespace cln
+
#include "cl_macros.h"
#include <stdlib.h>
+namespace cln {
+
// Allocating temporary data of arbitrary size.
// We prefer to allocate it on the stack instead of via malloc(), because
// that's fully inlinable and causes less cache misses. But the global stack
#define cl_small_alloc_array(arrayeltype,arraysize) \
(arrayeltype*)cl_small_alloca((arraysize)*sizeof(arrayeltype))
+} // namespace cln
+
#endif /* _CL_ALLOCA_H */
// Implementation.
-#include "cl_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/abort.h"
+
+namespace cln {
void cl_as_error (const cl_number& obj, const char * typestring, const char * filename, int line)
{
- fprint(cl_stderr, "Type assertion failed: in file ");
- fprint(cl_stderr, filename);
- fprint(cl_stderr, ", line ");
- fprintdecimal(cl_stderr, line);
- fprint(cl_stderr, ", not ");
- fprint(cl_stderr, typestring);
- fprint(cl_stderr, ": ");
+ fprint(stderr, "Type assertion failed: in file ");
+ fprint(stderr, filename);
+ fprint(stderr, ", line ");
+ fprintdecimal(stderr, line);
+ fprint(stderr, ", not ");
+ fprint(stderr, typestring);
+ fprint(stderr, ": ");
#if 0 // This brings in a dependency from the complex and float printer and all the float stuff.
- fprint(cl_stderr, obj);
+ fprint(stderr, obj);
#else
- fprint(cl_stderr, "@0x");
- fprinthexadecimal(cl_stderr, (unsigned long)(void*)&obj);
- fprint(cl_stderr, ": 0x");
- fprinthexadecimal(cl_stderr, (unsigned long)obj.word);
+ fprint(stderr, "@0x");
+ fprinthexadecimal(stderr, (unsigned long)(void*)&obj);
+ fprint(stderr, ": 0x");
+ fprinthexadecimal(stderr, (unsigned long)obj.word);
#endif
- fprint(cl_stderr, "\n");
+ fprint(stderr, "\n");
cl_abort();
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_condition.h"
-
+#include "cln/condition.h"
// Implementation.
+namespace cln {
+
// This tells the compiler to put the `cl_condition' vtable into this file.
void cl_condition::dummy () {}
// The destructor must be defined although it is virtual and abstract.
-#if !(defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ < 8))
cl_condition::~cl_condition () {}
-#endif
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_object.h"
+#include "cln/object.h"
// Implementation.
-#include "cl_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/abort.h"
+
+namespace cln {
// The default printer function.
void cl_dprint_unknown (cl_heap* pointer)
else
cl_dprint_unknown_immediate(pointer);
}
- #ifdef CL_IO_IOSTREAM
- cl_debugout << endl; // newline and flush output
- #else
- fprint(cl_debugout, "\n");
- #endif
+ cl_debugout << std::endl; // newline and flush output
return pointer;
}
{
cl_print(word);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_io.h"
+#include "cln/io.h"
// Implementation.
// Just assume that the debugger runs on /dev/tty, independently of
-// cl_stdin, cl_stdout, cl_stderr.
+// stdin, stdout, stderr.
-#if defined(CL_IO_STDIO)
+#include <fstream>
-FILE* cl_debugout = fopen("/dev/tty","a");
+namespace cln {
-#endif
+std::ostream * cl_debugout_stream = new std::ofstream ("/dev/tty");
-#if defined(CL_IO_IOSTREAM)
-
-#include <fstream.h>
-
-ostream* cl_debugout_stream = new ofstream ("/dev/tty");
-
-#endif
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_object.h"
+#include "cln/object.h"
// Implementation.
-#include "cl_malloc.h"
+#include "cln/malloc.h"
+
+namespace cln {
void cl_free_heap_object (cl_heap* pointer)
{
var const cl_class* type = pointer->type;
if (type->destruct)
type->destruct(pointer);
- cl_free_hook(pointer);
+ free_hook(pointer);
}
static const char * copyright_notice[] = {
" \n"
- "Copyright (c) Bruno Haible 1988-1999 \n"
+ "Copyright (c) Bruno Haible 1988-2000 \n"
" \n"
"This program is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
" ",
(const char *) ©right_notice
};
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_object.h"
+#include "cln/object.h"
// Implementation.
+namespace cln {
+
const struct cl_class * cl_immediate_classes [1<<cl_tag_len];
// Zero-initialized.
+
+} // namespace cln
#ifndef _CL_ITERATOR_H
#define _CL_ITERATOR_H
-#include "cl_types.h"
+#include "cln/types.h"
// An iterator's typical use is a loop, but you have an abstraction over
#ifndef _CL_LOW_H
#define _CL_LOW_H
+namespace cln {
// Determines the sign of a 16-bit number.
// sign_of(wert)
/* x64 besteht aus 1 16-Bit-Zähler (0,...,64). */\
)
+} // namespace cln
#endif /* _CL_LOW_H */
// Denotes a point where control flow can never arrive.
// NOTREACHED
#define NOTREACHED cl_notreached_abort(__FILE__,__LINE__);
+namespace cln {
nonreturning_function(extern,cl_notreached_abort, (const char* filename, int lineno));
+} // namespace cln
// Check an arithmetic expression.
// ASSERT(expr)
// floor(a,b) for a>=0, b>0 returns floor(a/b).
// b should be a constant expression.
#define floor(a_from_floor,b_from_floor) ((a_from_floor) / (b_from_floor))
-// Save the macro in case we need to include <math.h>.
+// Save the macro in case we need to include <cmath>.
#define cln_floor(a_from_floor,b_from_floor) ((a_from_floor) / (b_from_floor))
// ceiling(a,b) for a>=0, b>0 returns ceiling(a/b) = floor((a+b-1)/b).
#define ALLOCATE_ANYWHERE(classname) \
/* Ability to place an object at a given address. */ \
public: \
- void* operator new (size_t size) { return cl_malloc_hook(size); } \
+ void* operator new (size_t size) { return malloc_hook(size); } \
void* operator new (size_t size, classname* ptr) { unused size; return ptr; } \
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
#else
// For some compilers, work around template problem with "classname".
#define ALLOCATE_ANYWHERE(classname) \
/* Ability to place an object at a given address. */ \
public: \
- void* operator new (size_t size) { return cl_malloc_hook(size); } \
+ void* operator new (size_t size) { return malloc_hook(size); } \
void* operator new (size_t size, void* ptr) { unused size; return ptr; } \
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
#endif
// init1(type, object) (value);
-// cl_malloc_hook, cl_free_hook.
+// malloc_hook, free_hook.
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_malloc.h"
+#include "cln/malloc.h"
// Implementation.
#include <stdlib.h>
-#include "cl_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/abort.h"
#ifndef malloc
extern "C" void* malloc (size_t size);
extern "C" void free (void* ptr);
#endif
+namespace cln {
+
// Just like malloc() but never return NULL pointers.
static void* xmalloc (size_t size)
{
void* ptr = malloc(size);
if (ptr)
return ptr;
- fprint(cl_stderr, "Out of virtual memory.\n");
+ fprint(stderr, "Out of virtual memory.\n");
cl_abort();
}
-void* (*cl_malloc_hook) (size_t size) = xmalloc;
-void (*cl_free_hook) (void* ptr) = free;
+void* (*malloc_hook) (size_t size) = xmalloc;
+void (*free_hook) (void* ptr) = free;
+} // namespace cln
// Implementation.
-#include "cl_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/abort.h"
+
+namespace cln {
void cl_notreached_abort (const char* filename, int lineno)
{
- fprint(cl_stderr, "Internal error: statement in file ");
- fprint(cl_stderr, filename);
- fprint(cl_stderr, ", line ");
- fprintdecimal(cl_stderr, lineno);
- fprint(cl_stderr, " has been reached!!\n");
- fprint(cl_stderr, "Please send the authors of the program a description how you produced this error!\n");
+ fprint(stderr, "Internal error: statement in file ");
+ fprint(stderr, filename);
+ fprint(stderr, ", line ");
+ fprintdecimal(stderr, lineno);
+ fprint(stderr, " has been reached!!\n");
+ fprint(stderr, "Please send the authors of the program a description how you produced this error!\n");
cl_abort();
}
+
+} // namespace cln
#define _CL_SYSDEP_H
// CPU and other
-#include "cl_config.h"
+#include "cln/config.h"
// char_bitsize, short_bitsize, long_bitsize, long_long_bitsize
-#include "cl_intparam.h"
+#include "cln/intparam.h"
// The CPU's endianness
#if defined(short_little_endian) || defined(int_little_endian) || defined(long_little_endian)
#include "cl_macros.h"
// Elementary types.
-#include "cl_types.h"
+#include "cln/types.h"
// Dependencies among modules.
-#include "cl_modules.h"
+#include "cln/modules.h"
#endif /* _CL_SYSDEP_H */
#ifndef _CL_2D_H
#define _CL_2D_H
-#include "cl_types.h"
+#include "cln/types.h"
#include "cl_D.h"
+namespace cln {
+
// Multipliziert zwei Zahlen mod 2^intDsize.
// mul2adic(a,b)
// > uintD a,b: Zahlen mod 2^intDsize
// < ergebnis: Zahl c mod 2^intDsize mit b*c == a mod 2^intDsize
extern uintD div2adic (uintD a, uintD b);
+} // namespace cln
+
#endif /* _CL_2D_H */
// Implementation.
+namespace cln {
+
uintD div2adic (uintD a, uintD b)
{
// Methode:
}
#endif
}
+
+} // namespace cln
// Implementation.
+namespace cln {
+
uintD expt_pos (uintD a, uintL b)
{
// Methode:
}
return c;
}
+
+} // namespace cln
#ifndef _CL_D_H
#define _CL_D_H
-#include "cl_types.h"
+#include "cln/types.h"
#include "cl_low.h"
-// Aus cl_types.h importiere:
+// Aus cln/types.h importiere:
// intDsize Anzahl Bits in einem Digit
// uintD, sintD Integer-Typen für ein Digit
// log2_intDsize log2(intDsize)
#endif
#endif
+namespace cln {
// Vorzeichen eines Digit bestimmen
// sign_of_sintD(wert)
inline uint64 logcountD (uint64 x64) { logcount_64(); return x64; }
#endif
+} // namespace cln
+
#endif /* _CL_D_H */
#ifndef _CL_2DS_H
#define _CL_2DS_H
+namespace cln {
+
// div2adic(a_len,a_LSDptr,b_len,b_LSDptr,dest_LSDptr);
// dividiert die UDS a_LSDptr[-a_len..-1] mod 2^(intDsize*b_len)
// durch die ungerade UDS b_LSDptr[-b_len..-1] mod 2^(intDsize*b_len)
// (len>0) und liefert sie als UDS dest_LSDptr[-len..-1] mod 2^(intDsize*len).
extern void recip2adic (uintC len, const uintD* a_LSDptr, uintD* dest_LSDptr);
+} // namespace cln
+
#endif /* _CL_2DS_H */
#include "cl_2D.h"
#include "cl_DS.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
+
+namespace cln {
// Time for dividing a n word number by a n word number, this is the common
// case and therefore the important one:
}
// Bit complexity (N = max(a_len,b_len)): O(M(N)).
+} // namespace cln
const unsigned int recip2adic_threshold = 380;
#endif
+namespace cln {
+
void recip2adic (uintC len, const uintD* a_LSDptr, uintD* dest_LSDptr)
{
// Method:
}
// Bit complexity (N := len): O(M(N)).
+} // namespace cln
#ifndef _CL_DS_H
#define _CL_DS_H
-#include "cl_types.h"
+#include "cln/types.h"
#include "cl_gmpconfig.h"
#include "cl_D.h"
#include "cl_DS_endian.h"
#include "cl_alloca.h"
+namespace cln {
+
// Digit Sequence (DS)
// a memory range with n digits (n an uintC),
// between two pointers MSDptr and LSDptr.
// Supersede the functions by wrappers around calls to gmp mpn,
// for those functions where gmp is believed to be faster.
+extern "C" {
#include <gmp.h>
+}
#if 0 // not worth it, since gmp's mpn_cmp is not optimized
inline cl_signean compare_loop_down (const uintD* xptr, const uintD* yptr, uintC count)
extern void cl_UDS_recipsqrt (const uintD* a_MSDptr, uintC a_len,
uintD* b_MSDptr, uintC b_len);
+} // namespace cln
#endif /* _CL_DS_H */
// Implementation.
#include "cl_N.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
+
+namespace cln {
// We observe the following timings in seconds:
// Time for dividing a 2*n word number by a n word number:
}
// Bit complexity (N = a_len): O(M(N)).
+} // namespace cln
// Implementation.
#include "cl_low.h"
-#include "cl_malloc.h"
-#include "cl_abort.h"
+#include "cln/malloc.h"
+#include "cln/abort.h"
+
+namespace cln {
// Multiplikations-Doppelschleife:
// Multipliziert zwei UDS und legt das Ergebnis in einer dritten UDS ab.
}
// Karatsuba-multiplication: O(n^(log 3 / log 2))
- static void mulu_karatsuba (const uintD* sourceptr1, uintC len1,
- const uintD* sourceptr2, uintC len2,
- uintD* destptr);
static void mulu_karatsuba_square (const uintD* sourceptr, uintC len,
uintD* destptr);
#include "cl_DS_mul_kara.h"
mulu_fft_modm(sourceptr,len,sourceptr,len,destptr);
}
}
+
+} // namespace cln
#endif
-#include "cl_floatparam.h"
-#include "cl_io.h"
-#include "cl_abort.h"
+#include "cln/floatparam.h"
+#include "cln/io.h"
+#include "cln/abort.h"
#if defined(HAVE_LONGDOUBLE) && (long_double_mant_bits > double_mant_bits) && (defined(__i386__) || defined(__m68k__) || (defined(__sparc__) && 0))
// Only these CPUs have fast "long double"s in hardware.
if (max_l(2) > intDsize && l > intDsize) {
// l > intDsize
if (max_l(2) > 64 && l > 64) {
- fprint(cl_stderr, "FFT problem: l > 64 not supported by pow2_table\n");
+ fprint(stderr, "FFT problem: l > 64 not supported by pow2_table\n");
cl_abort();
}
var fftc_real carry = 0;
for ( ; ; k++) {
if (k >= sizeof(max_l_table)/sizeof(max_l_table[0])
|| max_l_table[k] <= 0) {
- fprint(cl_stderr, "FFT problem: numbers too big, floating point precision not sufficient\n");
+ fprint(stderr, "FFT problem: numbers too big, floating point precision not sufficient\n");
cl_abort();
}
if (2*ceiling((uintL)len1*intDsize,max_l_table[k])-1 <= ((uintL)1 << k))
var uintD checksum = multiply_checksum(checksum1,checksum2);
mulu_fftcomplex_nocheck(sourceptr1,len1,sourceptr2,len2,destptr);
if (!(checksum == compute_checksum(destptr,len1+len2))) {
- fprint(cl_stderr, "FFT problem: checksum error\n");
+ fprint(stderr, "FFT problem: checksum error\n");
cl_abort();
}
}
#endif
-#include "cl_floatparam.h"
-#include "cl_io.h"
-#include "cl_abort.h"
+#include "cln/floatparam.h"
+#include "cln/io.h"
+#include "cln/abort.h"
+
#if defined(HAVE_LONGDOUBLE) && (long_double_mant_bits > double_mant_bits) && (defined(__i386__) || defined(__m68k__) || (defined(__sparc__) && 0))
// Only these CPUs have fast "long double"s in hardware.
if (max_l(2) > intDsize && l > intDsize) {
// l > intDsize
if (max_l(2) > 64 && l > 64) {
- fprint(cl_stderr, "FFT problem: l > 64 not supported by pow2_table\n");
+ fprint(stderr, "FFT problem: l > 64 not supported by pow2_table\n");
cl_abort();
}
var fftcs_real carry = 0;
for ( ; ; k++) {
if (k >= sizeof(max_l_table)/sizeof(max_l_table[0])
|| max_l_table[k] <= 0) {
- fprint(cl_stderr, "FFT problem: numbers too big, floating point precision not sufficient\n");
+ fprint(stderr, "FFT problem: numbers too big, floating point precision not sufficient\n");
cl_abort();
}
if (2*ceiling((uintL)len1*intDsize,max_l_table[k])-1 <= ((uintL)1 << k))
var uintD checksum = multiply_checksum(checksum1,checksum2);
mulu_fftcs_nocheck(sourceptr1,len1,sourceptr2,len2,destptr);
if (!(checksum == compute_checksum(destptr,len1+len2))) {
- fprint(cl_stderr, "FFT problem: checksum error\n");
+ fprint(stderr, "FFT problem: checksum error\n");
cl_abort();
}
}
#endif
-#include "cl_floatparam.h"
-#include "cl_io.h"
-#include "cl_abort.h"
+#include "cln/floatparam.h"
+#include "cln/io.h"
+#include "cln/abort.h"
+
#if defined(HAVE_LONGDOUBLE) && (long_double_mant_bits > double_mant_bits) && (defined(__i386__) || defined(__m68k__) || (defined(__sparc__) && 0))
// Only these CPUs have fast "long double"s in hardware.
if (max_l(2) > intDsize && l > intDsize) {
// l > intDsize
if (max_l(2) > 64 && l > 64) {
- fprint(cl_stderr, "FFT problem: l > 64 not supported by pow2_table\n");
+ fprint(stderr, "FFT problem: l > 64 not supported by pow2_table\n");
cl_abort();
}
var fftr_real carry = 0;
for ( ; ; k++) {
if (k >= sizeof(max_l_table)/sizeof(max_l_table[0])
|| max_l_table[k] <= 0) {
- fprint(cl_stderr, "FFT problem: numbers too big, floating point precision not sufficient\n");
+ fprint(stderr, "FFT problem: numbers too big, floating point precision not sufficient\n");
cl_abort();
}
if (2*ceiling((uintL)len1*intDsize,max_l_table[k])-1 <= ((uintL)1 << k))
var uintD checksum = multiply_checksum(checksum1,checksum2);
mulu_fftr_nocheck(sourceptr1,len1,sourceptr2,len2,destptr);
if (!(checksum == compute_checksum(destptr,len1+len2))) {
- fprint(cl_stderr, "FFT problem: checksum error\n");
+ fprint(stderr, "FFT problem: checksum error\n");
cl_abort();
}
}
-
static void mulu_karatsuba (const uintD* sourceptr1, uintC len1,
const uintD* sourceptr2, uintC len2,
uintD* destptr)
-
// Eine vereinfachte Version von mulu_karatsuba für den Fall
// sourceptr1 == sourceptr2 && len1 == len2.
// Weniger Variablen, eine Additionsschleife weniger, eine Kopierschleife
// Implementation.
-#include "cl_random.h"
+#include "cln/random.h"
#include "cl_DS.h"
#include "cl_low.h"
-void random_UDS (cl_random_state& randomstate, uintD* ptr, uintC len)
+namespace cln {
+
+void random_UDS (random_state& randomstate, uintD* ptr, uintC len)
{
var uintC count;
#if (intDsize==64)
}
#endif
}
+
+} // namespace cln
// Implementation.
-#include "cl_abort.h"
+#include "cln/abort.h"
+
+namespace cln {
// Compute the reciprocal value of a digit sequence.
// Input: UDS a_MSDptr/a_len/.. of length a_len,
shiftrightcopy_loop_msp(y_MSDptr,b_MSDptr,b_len+1,1,0);
}
// Bit complexity (N := b_len): O(M(N)).
+
+} // namespace cln
// Implementation.
#include "cl_low.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
+
+namespace cln {
// Compute the reciprocal square root of a digit sequence.
// Input: UDS a_MSDptr/a_len/.. of length a_len,
}
// Bit complexity (N := b_len): O(M(N)).
+} // namespace cln
// Implementation.
#include "cl_low.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
+
+namespace cln {
// We observe the following timings:
// Time for square root of a_len = 2*N by b_len = N digits,
{ return (cl_boolean)(n >= 2100); }
#endif
-// Workaround gcc-2.7.0 bug on i386.
-#if defined(__GNUC__)
- #if (__GNUC__ == 2)
- #if (__GNUC_MINOR__ == 7)
- #define workaround_gcc_bug() *&b_stern = *&b_stern;
- #endif
- #endif
-#endif
-#ifndef workaround_gcc_bug
- #define workaround_gcc_bug()
-#endif
-
// Bildet zu einer Unsigned Digit sequence a die Wurzel
// (genauer: Gaußklammer aus Wurzel aus a).
// squarep = cl_UDS_sqrt(a_MSDptr,a_len,a_LSDptr, &b);
if ( dec_loop_lsp(a_lptr lspop 2,j+1) ==0) goto b_stern_ok;
// Subtraktion von b*^2 lieferte negativen Carry
b_stern = b_stern-1; // b* := b* - 1
- workaround_gcc_bug();
// erhöhe [a[2n-j-1],...,a[2n-2j-2]] um [b[n],...,b[n-j],0] + 2 * b* + 1
if ((sintD)b_stern < 0) { mspref(b_ptr,-1) |= bit(0); } // höchstes Bit von b* in b[n-j] ablegen
mspref(b_ptr,0) = (uintD)(b_stern<<1)+1; // niedrige Bits von b* und eine 1 als b[n-j-1] ablegen
}
// Bit complexity (N := a_len): O(M(N)).
+} // namespace cln
// Implementation.
-#include "cl_random.h"
+#include "cln/random.h"
#include "cl_DS.h"
#include "cl_low.h"
-void testrandom_UDS (cl_random_state& randomstate, uintD* MSDptr, uintC len)
+namespace cln {
+
+void testrandom_UDS (random_state& randomstate, uintD* MSDptr, uintC len)
{
// Idea from Torbjörn Granlund, see his "random2.c" file in gmp 2.0.
var uintD* ptr = MSDptr mspop len;
ran = ran >> (log2_intDsize+1); ran_bits -= log2_intDsize+1;
}
}
+
+} // namespace cln
// Includes the CPU specific cl_asm_*.h file.
-#include "cl_config.h"
+#include "cln/config.h"
#include "cl_DS_endian.h"
#ifdef __m68k__
// Includes the CPU specific cl_asm_*.cc file.
-#include "cl_config.h"
+#include "cln/config.h"
#include "cl_DS_endian.h"
#ifdef __m68k__
#ifndef _CL_HASH_H
#define _CL_HASH_H
-#include "cl_object.h"
-#include "cl_malloc.h"
-#include "cl_abort.h"
+#include "cln/object.h"
+#include "cln/malloc.h"
+#include "cln/abort.h"
#include "cl_iterator.h"
+namespace cln {
+
const long htentry_last = 0; // means that there is no next entry
// These forward declarations are needed for Sun CC 3.0.1 and 4.0.1.
// a normal hash table into a "weak" hash table.
public:
// Allocation.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
// Deallocation.
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
// Constructor: build a new, empty table.
cl_heap_hashtable (long initial_size = 5) : cl_heap (),
_size (initial_size), _count (0), _garcol_fun (no_garcol)
{
_modulus = compute_modulus(_size);
- _total_vector = cl_malloc_hook(_modulus*sizeof(long) + _size*sizeof(htxentry));
+ _total_vector = malloc_hook(_modulus*sizeof(long) + _size*sizeof(htxentry));
_slots = (long*) ((char*)_total_vector + 0);
_entries = (htxentry *) ((char*)_total_vector + _modulus*sizeof(long));
for (var long hi = _modulus-1; hi >= 0; hi--)
for (long i = 0; i < _size; i++)
if (_entries[i].next >= 0)
_entries[i].~htxentry();
- cl_free_hook(_total_vector);
+ free_hook(_total_vector);
}
// Count number of entries.
long num_entries ()
#endif
}
+} // namespace cln
#endif /* _CL_HASH_H */
#include "cl_hash.h"
#include "cl_iterator.h"
+namespace cln {
+
// Requirements:
// - function bool equal (key1_type,key1_type);
// - function unsigned long hashcode (key1_type);
template <class key1_type, class value_type>
struct cl_heap_hashtable_1 : public cl_heap_hashtable <cl_htentry1 <key1_type,value_type> > {
// Allocation.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
// Deallocation.
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
public:
// Lookup (htref alias gethash).
// Returns a pointer which you should immediately dereference
{
var long new_size = _size + (_size >> 1) + 1; // _size*1.5
var long new_modulus = compute_modulus(new_size);
- var void* new_total_vector = cl_malloc_hook(new_modulus*sizeof(long) + new_size*sizeof(htxentry));
+ var void* new_total_vector = malloc_hook(new_modulus*sizeof(long) + new_size*sizeof(htxentry));
var long* new_slots = (long*) ((char*)new_total_vector + 0);
var htxentry* new_entries = (htxentry *) ((char*)new_total_vector + new_modulus*sizeof(long));
for (var long hi = new_modulus-1; hi >= 0; hi--)
new_slots[hindex] = 1+index;
old_entries[old_index].~htxentry();
}
- cl_free_hook(_total_vector);
+ free_hook(_total_vector);
_modulus = new_modulus;
_size = new_size;
_freelist = free_list_head;
}
};
+} // namespace cln
+
#endif /* _CL_HASH1_H */
#include "cl_hash1.h"
+namespace cln {
+
// This is a hash table in which an entry can be removed when a user-defined
// condition is fulfilled (e.g. the value is not referenced any more).
// We don't remove unused entries immediately, only when the hash table
template <class key1_type, class value_type>
struct cl_heap_weak_hashtable_1 : public cl_heap_hashtable_1 <key1_type,value_type> {
// Allocation.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
// Deallocation.
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
public:
// Function which tells when an unused entry may be garbage collected.
cl_boolean (* const _maygc_htentry) (const cl_htentry1<key1_type,value_type>&);
}
};
+} // namespace cln
+
#endif /* _CL_HASH1WEAK_H */
#include "cl_hash.h"
#include "cl_iterator.h"
+namespace cln {
+
// Requirements:
// - function bool equal (key1_type,key1_type);
// - function bool equal (key2_type,key2_type);
template <class key1_type, class key2_type, class value_type>
struct cl_heap_hashtable_2 : public cl_heap_hashtable <cl_htentry2 <key1_type,key2_type,value_type> > {
// Allocation.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
// Deallocation.
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
public:
// Lookup (htref alias gethash).
// Returns a pointer which you should immediately dereference
{
var long new_size = _size + (_size >> 1) + 1; // _size*1.5
var long new_modulus = compute_modulus(new_size);
- var void* new_total_vector = cl_malloc_hook(new_modulus*sizeof(long) + new_size*sizeof(htxentry));
+ var void* new_total_vector = malloc_hook(new_modulus*sizeof(long) + new_size*sizeof(htxentry));
var long* new_slots = (long*) ((char*)new_total_vector + 0);
var htxentry* new_entries = (htxentry *) ((char*)new_total_vector + new_modulus*sizeof(long));
for (var long hi = new_modulus-1; hi >= 0; hi--)
new_slots[hindex] = 1+index;
old_entries[old_index].~htxentry();
}
- cl_free_hook(_total_vector);
+ free_hook(_total_vector);
_modulus = new_modulus;
_size = new_size;
_freelist = free_list_head;
}
};
+} // namespace cln
+
#endif /* _CL_HASH2_H */
#include "cl_hash2.h"
+namespace cln {
+
// This is a hash table in which an entry can be removed when a user-defined
// condition is fulfilled (e.g. the value is not referenced any more).
// We don't remove unused entries immediately, only when the hash table
template <class key1_type, class key2_type, class value_type>
struct cl_heap_weak_hashtable_2 : public cl_heap_hashtable_2 <key1_type,key2_type,value_type> {
// Allocation.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
// Deallocation.
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
public:
// Function which tells when an unused entry may be garbage collected.
cl_boolean (* const _maygc_htentry) (const cl_htentry2<key1_type,key2_type,value_type>&);
}
};
+} // namespace cln
+
#endif /* _CL_HASH2WEAK_H */
#include "cl_hash.h"
#include "cl_iterator.h"
+namespace cln {
+
// Requirements:
// - function bool equal (key1_type,key1_type);
// - function unsigned long hashcode (key1_type);
template <class key1_type>
struct cl_heap_hashtable_set : public cl_heap_hashtable <cl_htsetentry <key1_type> > {
// Allocation.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
// Deallocation.
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
public:
// Lookup (htref alias gethash).
bool get (const key1_type& key)
{
var long new_size = _size + (_size >> 1) + 1; // _size*1.5
var long new_modulus = compute_modulus(new_size);
- var void* new_total_vector = cl_malloc_hook(new_modulus*sizeof(long) + new_size*sizeof(htxentry));
+ var void* new_total_vector = malloc_hook(new_modulus*sizeof(long) + new_size*sizeof(htxentry));
var long* new_slots = (long*) ((char*)new_total_vector + 0);
var htxentry* new_entries = (htxentry *) ((char*)new_total_vector + new_modulus*sizeof(long));
for (var long hi = new_modulus-1; hi >= 0; hi--)
new_slots[hindex] = 1+index;
old_entries[old_index].~htxentry();
}
- cl_free_hook(_total_vector);
+ free_hook(_total_vector);
_modulus = new_modulus;
_size = new_size;
_freelist = free_list_head;
}
};
+} // namespace cln
+
#endif /* _CL_HASHSET_H */
#include "cl_hash.h"
#include "cl_iterator.h"
+namespace cln {
+
// In such a hash table an entry's key is determined by its value
// and not stored explicitly.
template <class key1_type, class value_type>
struct cl_heap_hashtable_uniq : public cl_heap_hashtable <cl_htuniqentry <key1_type,value_type> > {
// Allocation.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
// Deallocation.
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
public:
// Lookup (htref alias gethash).
// Returns a pointer which you should immediately dereference
{
var long new_size = _size + (_size >> 1) + 1; // _size*1.5
var long new_modulus = compute_modulus(new_size);
- var void* new_total_vector = cl_malloc_hook(new_modulus*sizeof(long) + new_size*sizeof(htxentry));
+ var void* new_total_vector = malloc_hook(new_modulus*sizeof(long) + new_size*sizeof(htxentry));
var long* new_slots = (long*) ((char*)new_total_vector + 0);
var htxentry* new_entries = (htxentry *) ((char*)new_total_vector + new_modulus*sizeof(long));
for (var long hi = new_modulus-1; hi >= 0; hi--)
new_slots[hindex] = 1+index;
old_entries[old_index].~htxentry();
}
- cl_free_hook(_total_vector);
+ free_hook(_total_vector);
_modulus = new_modulus;
_size = new_size;
_freelist = free_list_head;
}
};
+} // namespace cln
+
#endif /* _CL_HASHUNIQ_H */
#include "cl_hashuniq.h"
+namespace cln {
+
// This is a hashuniq table in which an entry can be removed when the
// value is not referenced any more.
// Best example: string -> symbol uniquification. When a symbol is not
template <class key1_type, class value_type>
struct cl_heap_weak_hashtable_uniq : public cl_heap_hashtable_uniq <key1_type,value_type> {
// Allocation.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
+ void* operator new (size_t size) { return malloc_hook(size); }
// Deallocation.
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void operator delete (void* ptr) { free_hook(ptr); }
public:
// Constructor.
cl_heap_weak_hashtable_uniq ()
}
};
+} // namespace cln
+
#endif /* _CL_HASHUNIQWEAK_H */
#include "cl_hash2weak.h"
+namespace cln {
+
static void cl_weak_hashtable_from_rcpointer2_to_rcpointer_destructor (cl_heap* pointer)
{
#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug
((cl_heap_weak_hashtable_from_rcpointer2_to_rcpointer*)pointer)->put(x,y,z);
}
+} // namespace cln
#ifndef _CL_RCPOINTER2_HASHWEAK_RCPOINTER_H
#define _CL_RCPOINTER2_HASHWEAK_RCPOINTER_H
-#include "cl_object.h"
+#include "cln/object.h"
#include "cl_hash2weak.h"
+namespace cln {
+
// Equality.
static inline bool equal (const cl_rcpointer& x, const cl_rcpointer& y)
{ return (x.pointer == y.pointer); }
void put (const cl_rcpointer& x, const cl_rcpointer& y, const cl_rcpointer& z) const;
};
+} // namespace cln
+
#endif /* _CL_RCPOINTER2_HASHWEAK_RCPOINTER_H */
#include "cl_hash1weak.h"
+namespace cln {
+
static void cl_weak_hashtable_from_rcpointer_to_rcpointer_destructor (cl_heap* pointer)
{
#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug
((cl_heap_weak_hashtable_from_rcpointer_to_rcpointer*)pointer)->put(x,y);
}
+} // namespace cln
#ifndef _CL_RCPOINTER_HASHWEAK_RCPOINTER_H
#define _CL_RCPOINTER_HASHWEAK_RCPOINTER_H
-#include "cl_object.h"
+#include "cln/object.h"
#include "cl_hash1weak.h"
+namespace cln {
+
// Equality.
static inline bool equal (const cl_rcpointer& x, const cl_rcpointer& y)
{ return (x.pointer == y.pointer); }
void put (const cl_rcpointer& x, const cl_rcpointer& y) const;
};
+} // namespace cln
+
#endif /* _CL_RCPOINTER_HASHWEAK_RCPOINTER_H */
#include "cl_sysdep.h"
// Specification.
-#include "cl_number_io.h"
+#include "cln/number_io.h"
// Implementation.
-#include "cl_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/abort.h"
+
+namespace cln {
void read_number_bad_syntax (const char * string, const char * string_limit)
{
- fprint(cl_stderr, "Illegal number syntax: \"");
+ fprint(stderr, "Illegal number syntax: \"");
for (const char * ptr = string; ptr != string_limit; ptr++)
- fprintchar(cl_stderr, *ptr);
- fprint(cl_stderr, "\"\n");
+ fprintchar(stderr, *ptr);
+ fprint(stderr, "\"\n");
cl_abort();
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_number_io.h"
+#include "cln/number_io.h"
// Implementation.
-#include "cl_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/abort.h"
+
+namespace cln {
void read_number_eof (void)
{
- fprint(cl_stderr, "read_number: end of stream encountered\n");
+ fprint(stderr, "read_number: end of stream encountered\n");
cl_abort();
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_number_io.h"
+#include "cln/number_io.h"
// Implementation.
-#include "cl_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/abort.h"
+
+namespace cln {
void read_number_junk (const char * string_rest, const char * string, const char * string_limit)
{
- fprint(cl_stderr, "Junk after number: ");
+ fprint(stderr, "Junk after number: ");
{ for (const char * ptr = string; ptr != string_rest; ptr++)
- fprintchar(cl_stderr, *ptr);
+ fprintchar(stderr, *ptr);
}
- fprint(cl_stderr, "\"");
+ fprint(stderr, "\"");
{ for (const char * ptr = string_rest; ptr != string_limit; ptr++)
- fprintchar(cl_stderr, *ptr);
+ fprintchar(stderr, *ptr);
}
- fprint(cl_stderr, "\"\n");
+ fprint(stderr, "\"\n");
cl_abort();
}
+
+} // namespace cln
--- /dev/null
+// Global variables in CLN
+
+// Specification.
+#include "cln/io.h"
+
+// Implementation.
+
+namespace cln {
+
+extern cl_istream stdin = std::cin;
+
+} // namespace cln
// Implementation.
+namespace cln {
+
#ifdef NEED_VAR_divu_16_rest
uint16 divu_16_rest;
#endif
} } }
#endif
+} // namespace cln
// Implementation.
+namespace cln {
+
// Zieht die Ganzzahl-Wurzel aus einer 32-Bit-Zahl und
// liefert eine 16-Bit-Wurzel.
// isqrt(x)
}
}}
}
+
+} // namespace cln
// Implementation.
+namespace cln {
+
// Zieht die Ganzzahl-Wurzel aus einer 64-Bit-Zahl und
// liefert eine 32-Bit-Wurzel.
// isqrt(x1,x0)
}
}}
}
+
+} // namespace cln
// Implementation.
+namespace cln {
+
#ifdef NEED_VAR_mulu32_high
uint32 mulu32_high;
#endif
mulu64_high = hi; return lo;
}
#endif
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_io.h"
+#include "cln/io.h"
// Implementation.
-#if defined(CL_IO_STDIO)
-
-void fprintdecimal (cl_ostream stream, unsigned long x)
-{
- fprintf(stream,"%lu",x);
-}
-
-void fprintdecimal (cl_ostream stream, long x)
-{
- fprintf(stream,"%ld",x);
-}
-
-#endif
-
-#if defined(CL_IO_IOSTREAM)
+namespace cln {
// We don't use `stream << x' or `stream << dec << x', because an ostream
// carries so many attributes, and we don't want to modifies these attributes.
}
}
-#endif
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_io.h"
+#include "cln/io.h"
// Implementation.
-#if defined(CL_IO_STDIO)
-
-void fprinthexadecimal (cl_ostream stream, unsigned long x)
-{
- fprintf(stream,"%lX",x);
-}
-
-#endif
-
-#if defined(CL_IO_IOSTREAM)
+namespace cln {
void fprinthexadecimal (cl_ostream stream, unsigned long x)
{
#undef bufsize
}
-#endif
-
void fprinthexadecimal (cl_ostream stream, long x)
{
if (x >= 0)
fprintdecimal(stream,(unsigned long)(-1-x)+1);
}
}
+
+} // namespace cln
CL_PROVIDE(cl_prin_globals)
// Specification.
-#include "cl_output.h"
+#include "cln/output.h"
// Implementation.
-cl_print_flags cl_default_print_flags;
+namespace cln {
+
+cl_ostream stdout = std::cout;
+cl_ostream stderr = std::cerr;
+
+cl_print_flags default_print_flags;
#if 0 // The default constructors already do this.
-AT_INITIALIZATION(cl_default_print_flags)
+AT_INITIALIZATION(default_print_flags)
{
- cl_default_print_flags.rational_base = 10;
- cl_default_print_flags.rational_readably = cl_false;
- cl_default_print_flags.float_readably = cl_false;
- cl_default_print_flags.default_float_format = cl_float_format_ffloat;
- cl_default_print_flags.complex_readably = cl_false;
- cl_default_print_flags.vector_syntax = vsyntax_pretty;
- cl_default_print_flags.univpoly_varname = "x";
+ default_print_flags.rational_base = 10;
+ default_print_flags.rational_readably = cl_false;
+ default_print_flags.float_readably = cl_false;
+ default_print_flags.default_float_format = float_format_ffloat;
+ default_print_flags.complex_readably = cl_false;
+ default_print_flags.vector_syntax = vsyntax_pretty;
+ default_print_flags.univpoly_varname = "x";
}
#endif
+} // namespace cln
+
CL_PROVIDE_END(cl_prin_globals)
#include "cl_sysdep.h"
// Specification.
-#include "cl_proplist.h"
+#include "cln/proplist.h"
// Implementation.
-#include "cl_abort.h"
+#include "cln/abort.h"
+
+namespace cln {
// This tells the compiler to put the `cl_property' vtable into this file.
void cl_property::dummy () {}
new_property->next = list;
list = new_property;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_proplist.h"
+#include "cln/proplist.h"
// Implementation.
+namespace cln {
+
cl_property_list::~cl_property_list ()
{
while (list) {
delete l;
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_proplist.h"
+#include "cln/proplist.h"
// Implementation.
+namespace cln {
+
cl_property* cl_property_list::get_property (const cl_symbol& key)
{
var cl_property* l;
break;
return l;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_random.h"
+#include "cln/random.h"
// Implementation.
#include "cl_low.h"
+namespace cln {
+
// Zufallszahlengenerator nach [Knuth: The Art of Computer Programming, Vol. II,
// Seminumerical Algorithms, 3.3.4., Table 1, Line 30], nach C. Haynes:
// X eine 64-Bit-Zahl. Iteration X := (a*X+c) mod m
// mit m=2^64, a=6364136223846793005, c=1.
-uint32 random32 (cl_random_state& randomstate)
+uint32 random32 (random_state& randomstate)
{
#ifdef HAVE_FAST_LONGLONG
// Multiplikator a=6364136223846793005 = 0x5851F42D4C957F2D :
return highlow32(low16(newseed_hi),high16(newseed_lo));
#endif
}
+
+} // namespace cln
-// cl_default_random_state.
+// default_random_state.
// General includes.
#include "cl_sysdep.h"
CL_PROVIDE(cl_random_def)
// Specification.
-#include "cl_random.h"
+#include "cln/random.h"
// Implementation.
-cl_random_state cl_default_random_state;
+namespace cln {
+
+random_state default_random_state;
+
+} // namespace cln
CL_PROVIDE_END(cl_random_def)
-// cl_random_state constructor.
+// random_state constructor.
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_random.h"
+#include "cln/random.h"
// Implementation.
{
var struct timeval tv;
gettimeofday(&tv,0);
- return highlow32(tv.tv_sec,tv.tv_usec); // 16+16 zufällige Bits
+ return cln::highlow32(tv.tv_sec,tv.tv_usec); // 16+16 zufällige Bits
}
#elif defined(HAVE_FTIME)
#endif
+namespace cln {
+
// Counter, to avoid that two random-states created immediately one after
// the other contain the same seed.
static uint32 counter = 0;
-cl_random_state::cl_random_state ()
+random_state::random_state ()
{
var uint32 seed_hi;
var uint32 seed_lo;
#if defined(unix) || defined(__unix) || defined(_AIX) || defined(sinix) || (defined(_WIN32) && defined(__GNUC__))
- seed_lo = get_seed();
+ seed_lo = ::get_seed();
seed_hi = (rand() // zufällige 31 Bit (bei UNIX_BSD) bzw. 16 Bit (bei UNIX_SYSV)
<< 8) ^ (uintL)(getpid()); // ca. 8 Bit von der Process ID
#elif defined(__atarist)
seed_lo = get_real_time(); // Uhrzeit, 100 Hz
seed_hi = time(NULL);
#else
-#error "Must implement cl_random_state constructor!"
+#error "Must implement random_state constructor!"
#endif
seed_hi ^= counter++ << 5;
seed.hi = seed_hi;
seed.lo = seed_lo;
}
+
+} // namespace cln
#ifndef _CL_RANDOM_IMPL_H
#define _CL_RANDOM_IMPL_H
-#include "cl_random.h"
+#include "cln/random.h"
+
+namespace cln {
// random_UDS(randomstate,MSDptr,len) füllt die UDS MSDptr/len/..
// mit len Zufallsdigits.
// > randomstate: ein Random-State, wird verändert
// > MSDptr/len/..: wo die Zufallsdigits abgelegt werden sollen
// > len: gewünschte Anzahl von Zufallsdigits
-extern void random_UDS (cl_random_state& randomstate, uintD* MSDptr, uintC len);
+extern void random_UDS (random_state& randomstate, uintD* MSDptr, uintC len);
// testrandom_UDS(randomstate,MSDptr,len) füllt die UDS MSDptr/len/..
// mit len Zufallsdigits, mit relativ langen Blöcken von Nullen und Einsen.
// > randomstate: ein Random-State, wird verändert
// > MSDptr/len/..: wo die Zufallsdigits abgelegt werden sollen
// > len: gewünschte Anzahl von Zufallsdigits
-extern void testrandom_UDS (cl_random_state& randomstate, uintD* MSDptr, uintC len);
+extern void testrandom_UDS (random_state& randomstate, uintD* MSDptr, uintC len);
+
+} // namespace cln
#endif /* _CL_RANDOM_IMPL_H */
CL_PROVIDE(cl_no_ring)
// Specification.
-#include "cl_ring.h"
+#include "cln/ring.h"
// Implementation.
-#include "cl_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/abort.h"
+
+namespace cln {
nonreturning_function(static, uninitialized_ring, (void));
static void uninitialized_ring ()
{
- fprint(cl_stderr, "Uninitialized ring operation called\n");
+ fprint(stderr, "Uninitialized ring operation called\n");
cl_abort();
}
nonreturning_function(static, uninitialized_error, (const _cl_ring_element&));
static void uninitialized_error (const _cl_ring_element& obj)
{
- fprint(cl_stderr, "Uninitialized ring element @0x");
- fprinthexadecimal(cl_stderr, (unsigned long)(void*)&obj);
- fprint(cl_stderr, ": 0x");
- fprinthexadecimal(cl_stderr, (unsigned long)obj.rep.word);
- fprint(cl_stderr, "\n");
+ fprint(stderr, "Uninitialized ring element @0x");
+ fprinthexadecimal(stderr, (unsigned long)(void*)&obj);
+ fprint(stderr, ": 0x");
+ fprinthexadecimal(stderr, (unsigned long)obj.rep.word);
+ fprint(stderr, "\n");
cl_abort();
}
const cl_ring cl_no_ring = cl_ring (new cl_heap_no_ring());
+} // namespace cln
+
CL_PROVIDE_END(cl_no_ring)
#include "cl_sysdep.h"
// Specification.
-#include "cl_ring.h"
+#include "cln/ring.h"
// Implementation.
-#include "cl_io.h"
+#include "cln/io.h"
+
+namespace cln {
void cl_ring_element::debug_print () const
{
fprint(cl_debugout, *this);
- #ifdef CL_IO_IOSTREAM
- cl_debugout << endl; // newline and flush output
- #else
- fprint(cl_debugout, "\n");
- #endif
+ cl_debugout << std::endl; // newline and flush output
}
-// This dummy links in this module when <cl_ring.h> requires it.
+// This dummy links in this module when <cln/ring.h> requires it.
int cl_ring_debug_module;
+
+} // namespace cln
#ifndef _CL_SPUSHSTRING_H
#define _CL_SPUSHSTRING_H
-#include "cl_object.h"
-#include "cl_malloc.h"
+#include "cln/object.h"
+#include "cln/malloc.h"
#include "cl_sstring.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
+
+namespace cln {
class cl_spushstring {
protected:
void push (char);
// Adds several characters at the end at once.
void append (const char * ptr, uintL len);
-// Get the contents as a string. Free it using cl_free_hook() when done.
+// Get the contents as a string. Free it using free_hook() when done.
char* contents ();
// Look at the contents.
uintL length () const;
inline cl_spushstring::cl_spushstring ()
{
alloc = 20; // Must be > 0.
- buffer = (char *) cl_malloc_hook(alloc);
+ buffer = (char *) malloc_hook(alloc);
index = 0;
}
inline cl_spushstring::~cl_spushstring ()
{
- cl_free_hook(buffer);
+ free_hook(buffer);
}
inline void cl_spushstring::reset ()
{
return buffer[i];
}
+} // namespace cln
+
#endif /* _CL_SPUSHSTRING_H */
#include <string.h> // declares memcpy()
+namespace cln {
+
void cl_spushstring::append (const char * ptr, uintL len)
{
if (index + len > alloc) {
var uintL newalloc = index+2*len;
if (newalloc < 2*alloc) { newalloc = 2*alloc; }
- var char* newbuffer = (char *) cl_malloc_hook(newalloc);
+ var char* newbuffer = (char *) malloc_hook(newalloc);
memcpy(newbuffer,buffer,alloc);
- cl_free_hook(buffer);
+ free_hook(buffer);
buffer = newbuffer;
alloc = newalloc;
}
for (uintL count = len; count > 0; count--)
buffer[index++] = *ptr++;
}
+
+} // namespace cln
#include <string.h> // declares memcpy()
+namespace cln {
+
void cl_spushstring::push (char c)
{
if (index >= alloc) {
var uintL newalloc = 2*alloc;
- var char* newbuffer = (char *) cl_malloc_hook(newalloc);
+ var char* newbuffer = (char *) malloc_hook(newalloc);
memcpy(newbuffer,buffer,alloc);
- cl_free_hook(buffer);
+ free_hook(buffer);
buffer = newbuffer;
alloc = newalloc;
}
// Now index < alloc.
buffer[index++] = c;
}
+
+} // namespace cln
// Implementation.
-#include "cl_malloc.h"
+#include "cln/malloc.h"
+
+namespace cln {
char * cl_sstring (const char * ptr, uintL len)
{
- var char * string = (char *) cl_malloc_hook(len+1);
+ var char * string = (char *) malloc_hook(len+1);
{
var const char* ptr1 = ptr;
var char* ptr2 = string;
}
return string;
}
+
+} // namespace cln
#ifndef _CL_SSTRING_H
#define _CL_SSTRING_H
+namespace cln {
+
// Liefert einen String.
-// Mit cl_malloc_hook() alloziert, mit cl_free_hook() freizugeben.
+// Mit malloc_hook() alloziert, mit free_hook() freizugeben.
extern char * cl_sstring (const char * ptr, uintL len);
+} // namespace cln
+
#endif /* _CL_SSTRING_H */
#include "cl_sysdep.h"
// Specification.
-#include "cl_string.h"
+#include "cln/string.h"
// Implementation.
+namespace cln {
+
extern cl_heap_string* cl_make_heap_string (const char * ptr, unsigned long len);
cl_string::cl_string (const char * ptr, unsigned long len)
{
pointer = cl_make_heap_string(ptr,len);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_string.h"
+#include "cln/string.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_st_make0.cc"
+namespace cln {
+
const cl_string operator+ (const cl_string& str1, const cl_string& str2)
{
unsigned long len1 = strlen(str1);
*ptr++ = '\0';
return str;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_string.h"
+#include "cln/string.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_st_make0.cc"
+namespace cln {
+
const cl_string operator+ (const char* str1, const cl_string& str2)
{
- unsigned long len1 = strlen(str1);
+ unsigned long len1 = ::strlen(str1);
unsigned long len2 = strlen(str2);
var cl_heap_string* str = cl_make_heap_string(len1+len2);
var char * ptr = &str->data[0];
*ptr++ = '\0';
return str;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_string.h"
+#include "cln/string.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_st_make0.cc"
+namespace cln {
+
const cl_string operator+ (const cl_string& str1, const char* str2)
{
unsigned long len1 = strlen(str1);
- unsigned long len2 = strlen(str2);
+ unsigned long len2 = ::strlen(str2);
var cl_heap_string* str = cl_make_heap_string(len1+len2);
var char * ptr = &str->data[0];
{
*ptr++ = '\0';
return str;
}
+
+} // namespace cln
// Implementation.
-#include "cl_string.h"
-#include "cl_io.h"
+#include "cln/string.h"
+#include "cln/io.h"
#include <ctype.h>
+namespace cln {
+
static void dprint (cl_heap* pointer)
{
var const cl_string& obj = *(const cl_string*)&pointer;
AT_INITIALIZATION(dprint_string)
{ cl_register_type_printer(cl_class_string,dprint); }
-// This dummy links in this module when <cl_string.h> requires it.
+// This dummy links in this module when <cln/string.h> requires it.
int cl_string_debug_module;
+
+} // namespace cln
-// cl_string hashcode().
+// cln/string.hashcode().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_string.h"
+#include "cln/string.h"
// Implementation.
+namespace cln {
+
unsigned long hashcode (const cl_string& str)
{
var unsigned long code = 0x61284AF3;
}
return code;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_string.h"
+#include "cln/string.h"
// Implementation.
-#include "cl_malloc.h"
+#include "cln/malloc.h"
#include "cl_offsetof.h"
+namespace cln {
+
MAYBE_INLINE
cl_heap_string* cl_make_heap_string (unsigned long len)
{
- var cl_heap_string* str = (cl_heap_string*) cl_malloc_hook(offsetofa(cl_heap_string,data)+sizeof(char)*(len+1));
+ var cl_heap_string* str = (cl_heap_string*) malloc_hook(offsetofa(cl_heap_string,data)+sizeof(char)*(len+1));
str->refcount = 1;
str->type = &cl_class_string;
str->length = len;
return str; /* Have to fill data[0..len] yourself. */
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_string.h"
+#include "cln/string.h"
// Implementation.
-#include "cl_malloc.h"
+#include "cln/malloc.h"
#include "cl_offsetof.h"
+namespace cln {
+
cl_heap_string* cl_make_heap_string (const char * s)
{
- var unsigned long len = strlen(s);
- var cl_heap_string* str = (cl_heap_string*) cl_malloc_hook(offsetofa(cl_heap_string,data)+sizeof(char)*(len+1));
+ var unsigned long len = ::strlen(s);
+ var cl_heap_string* str = (cl_heap_string*) malloc_hook(offsetofa(cl_heap_string,data)+sizeof(char)*(len+1));
str->refcount = 1;
str->type = &cl_class_string;
str->length = len;
}
return str;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_string.h"
+#include "cln/string.h"
// Implementation.
-#include "cl_malloc.h"
+#include "cln/malloc.h"
#include "cl_offsetof.h"
+namespace cln {
+
cl_heap_string* cl_make_heap_string (const char * ptr, unsigned long len)
{
- var cl_heap_string* str = (cl_heap_string*) cl_malloc_hook(offsetofa(cl_heap_string,data)+sizeof(char)*(len+1));
+ var cl_heap_string* str = (cl_heap_string*) malloc_hook(offsetofa(cl_heap_string,data)+sizeof(char)*(len+1));
str->refcount = 1;
str->type = &cl_class_string;
str->length = len;
}
return str;
}
+
+} // namespace cln
CL_PROVIDE(cl_st_null)
// Specification.
-#include "cl_string.h"
+#include "cln/string.h"
+
+namespace cln {
+
extern const cl_string cl_null_string;
+} // namespace cln
// Implementation.
+namespace cln {
+
const cl_string cl_null_string = cl_string(NULL,0);
+} // namespace cln
+
CL_PROVIDE_END(cl_st_null)
#include "cl_sysdep.h"
// Specification.
-#include "cl_string.h"
+#include "cln/string.h"
// Implementation.
-#ifdef CL_IO_IOSTREAM
-
-#include "cl_io.h"
+#include "cln/io.h"
#include "cl_spushstring.h"
-#if ((defined(__sparc__) || defined(__rs6000__) || defined(__mips__)) && !defined(__GNUC__))
-// Sun C++ doesn't have istream::unget().
- #define unget() putback(c)
-#endif
+namespace cln {
const cl_string cl_fget (cl_istream stream, char delim)
{
while (stream.good()) {
var int c = stream.get();
if (c==EOF)
- break; // ios::eofbit already set
+ break; // std::ios::eofbit already set
if (c==delim) {
stream.unget();
break;
return buffer.contents();
}
-#endif
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_string.h"
+#include "cln/string.h"
// Implementation.
-#ifdef CL_IO_IOSTREAM
-
-#include "cl_io.h"
+#include "cln/io.h"
#include "cl_spushstring.h"
-#if ((defined(__sparc__) || defined(__rs6000__) || defined(__mips__)) && !defined(__GNUC__))
-// Sun C++ doesn't have istream::unget() and istream::set().
- #define unget() putback(c)
- #define set(x) setf(x)
-#endif
+namespace cln {
const cl_string cl_fget (cl_istream stream, int n, char delim)
{
}
if (--n <= 0) {
stream.unget();
- #if defined(__GNUG__) && (__GNUC_MINOR__ < 8)
- stream.set(ios::failbit);
- #else // new ANSI C++
- stream.setstate(ios::failbit);
- #endif
+ stream.setstate(std::ios::failbit);
break;
}
buffer.push(c);
return buffer.contents();
}
-#endif
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_string.h"
+#include "cln/string.h"
// Implementation.
-#ifdef CL_IO_IOSTREAM
-
-#include "cl_io.h"
+#include "cln/io.h"
#include "cl_spushstring.h"
+namespace cln {
+
const cl_string cl_fgetline (cl_istream stream, char delim)
{
var cl_spushstring buffer;
while (stream.good()) {
var int c = stream.get();
if (c==EOF)
- break; // ios::eofbit already set
+ break; // std::ios::eofbit already set
if (c==delim)
break;
buffer.push(c);
return buffer.contents();
}
-#endif
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_string.h"
+#include "cln/string.h"
// Implementation.
-#ifdef CL_IO_IOSTREAM
-
-#include "cl_io.h"
+#include "cln/io.h"
#include "cl_spushstring.h"
-#if ((defined(__sparc__) || defined(__rs6000__) || defined(__mips__)) && !defined(__GNUC__))
-// Sun C++ doesn't have istream::unget() and istream::set().
- #define unget() putback(c)
- #define set(x) setf(x)
-#endif
+namespace cln {
const cl_string cl_fgetline (cl_istream stream, int n, char delim)
{
while (stream.good()) {
var int c = stream.get();
if (c==EOF)
- break; // ios::eofbit already set
+ break; // std::ios::eofbit already set
if (c==delim)
break;
if (--n <= 0) {
stream.unget();
- #if defined(__GNUG__) && (__GNUC_MINOR__ < 8)
- stream.set(ios::failbit);
- #else // new ANSI C++
- stream.setstate(ios::failbit);
- #endif
+ stream.setstate(std::ios::failbit);
break;
}
buffer.push(c);
return buffer.contents();
}
-#endif
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_string.h"
+#include "cln/string.h"
// Implementation.
-#ifdef CL_IO_IOSTREAM
-
-#include "cl_io.h"
+#include "cln/io.h"
#include "cl_spushstring.h"
#include <ctype.h>
-#if ((defined(__sparc__) || defined(__rs6000__) || defined(__mips__)) && !defined(__GNUC__))
-// Sun C++ doesn't have istream::unget().
- #define unget() putback(c)
-#endif
+namespace cln {
cl_istream operator>> (cl_istream stream, cl_string& str)
{
return stream;
}
-#endif
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_string.h"
+#include "cln/string.h"
// Implementation.
+namespace cln {
+
cl_class cl_class_string = {
NULL, // empty destructor
0
};
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_string.h"
+#include "cln/string.h"
// Implementation.
-#include "cl_io.h"
+#include "cln/io.h"
+
+namespace cln {
void fprint (cl_ostream stream, const cl_string& str)
{
-#if defined(CL_IO_STDIO)
- var const char * ptr = str.asciz();
- var unsigned long i = str.length();
- while (i > 0) {
- fprintchar(stream,*ptr);
- ptr++; i--;
- }
-#endif
-#if defined(CL_IO_IOSTREAM)
stream.write(str.asciz(),str.length());
-#endif
}
+
+} // namespace cln
-// cl_symbol hashcode().
+// cln/symbol.hashcode().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_symbol.h"
+#include "cln/symbol.h"
// Implementation.
#include "cl_offsetof.h"
+namespace cln {
+
#define declare_alignof(where,type) \
struct CONCAT(aligndummy,__LINE__) { char slot1; type slot2; }; \
const unsigned long where = offsetof(CONCAT(aligndummy,__LINE__), slot2);
return (unsigned long)(s.pointer)
/ (string_alignment & -string_alignment); // divide by power of 2
}
+
+} // namespace cln
CL_PROVIDE(cl_symbol)
// Specification.
-#include "cl_symbol.h"
+#include "cln/symbol.h"
// Implementation.
#include "cl_hashuniqweak.h"
+namespace cln {
+
inline const cl_string hashkey (const cl_symbol& sym)
{
return (cl_string)sym;
pointer = p;
}
+} // namespace cln
+
CL_PROVIDE_END(cl_symbol)
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
#include "cl_C_abs_aux.cc"
+namespace cln {
+
const cl_R abs (const cl_N& x)
{
// Methode:
return abs(x);
}
}
+
+} // namespace cln
// Implementation.
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
MAYBE_INLINE
const cl_R abs (const cl_C& x)
var const cl_R& b = imagpart(x);
return cl_hypot(a,b);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
#include "cl_C_abs_aux.cc"
+namespace cln {
+
const cl_N signum (const cl_N& x)
{
// Methode:
return x / abs(x);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_N sqrt (const cl_N& x)
{
}
}
}
+
+} // namespace cln
// Implementation.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
#include "cl_DF.h"
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
#include "cl_DF_minusp.cc"
+namespace cln {
+
const cl_DF cl_hypot (const cl_DF& a, const cl_DF& b)
{
// a=0.0 -> liefere abs(b).
var cl_DF nc = square(na) + square(nb);
return scale_float(sqrt(nc),e); // c' := sqrt(c'), 2^e*c'
}
+
+} // namespace cln
// Implementation.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
#include "cl_FF.h"
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
#include "cl_FF_minusp.cc"
+namespace cln {
+
const cl_FF cl_hypot (const cl_FF& a, const cl_FF& b)
{
// a=0.0 -> liefere abs(b).
var cl_FF nc = square(na) + square(nb);
return scale_float(sqrt(nc),e); // c' := sqrt(c'), 2^e*c'
}
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
#include "cl_LF_impl.h"
#define MAYBE_INLINE inline
#include "cl_LF_minusp.cc"
+namespace cln {
+
ALL_cl_LF_OPERATIONS_SAME_PRECISION()
const cl_LF cl_hypot (const cl_LF& a, const cl_LF& b)
var cl_LF nc = square(na) + square(nb);
return scale_float(sqrt(nc),e); // c' := sqrt(c'), 2^e*c'
}}
+
+} // namespace cln
// Implementation.
-#include "cl_real.h"
+#include "cln/real.h"
#include "cl_R.h"
-#include "cl_rational.h"
+#include "cln/rational.h"
#include "cl_RA.h"
#include "cl_F.h"
#include "cl_SF.h"
#include "cl_DF.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_R cl_hypot (const cl_R& a, const cl_R& b)
{
// Methode:
}
}
}
+
+} // namespace cln
// Implementation.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
#include "cl_SF.h"
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
#include "cl_SF_minusp.cc"
+namespace cln {
+
const cl_SF cl_hypot (const cl_SF& a, const cl_SF& b)
{
// a=0.0 -> liefere abs(b).
var cl_SF nc = square(na) + square(nb);
return scale_float(sqrt(nc),e); // c' := sqrt(c'), 2^e*c'
}
+
+} // namespace cln
#ifndef _CL_C_H
#define _CL_C_H
-#include "cl_number.h"
-#include "cl_complex.h"
-#include "cl_sfloat_class.h"
-#include "cl_ffloat_class.h"
-#include "cl_dfloat_class.h"
-#include "cl_lfloat_class.h"
+#include "cln/number.h"
+#include "cln/complex.h"
+#include "cln/sfloat_class.h"
+#include "cln/ffloat_class.h"
+#include "cln/dfloat_class.h"
+#include "cln/lfloat_class.h"
#include "cl_macros.h"
-#include "cl_malloc.h"
+#include "cln/malloc.h"
+
+namespace cln {
struct cl_heap_complex : cl_heap {
cl_R realpart;
inline cl_heap_complex* allocate_complex (const cl_R& real, const cl_R& imag)
{
- cl_heap_complex* p = (cl_heap_complex*) cl_malloc_hook(sizeof(cl_heap_complex));
+ cl_heap_complex* p = (cl_heap_complex*) malloc_hook(sizeof(cl_heap_complex));
p->refcount = 1;
p->type = &cl_class_complex;
p->realpart.pointer = real.pointer; cl_inc_refcount(real);
// Hilfsfunktion für asinh und asin: u+iv := arsinh(x+iy). Liefert cl_C_R(u,v).
extern const cl_C_R asinh (const cl_R& x, const cl_R& y);
+} // namespace cln
#endif /* _CL_C_H */
-// cl_equal().
+// equal().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
-cl_boolean cl_equal (const cl_N& x, const cl_N& y)
+namespace cln {
+
+cl_boolean equal (const cl_N& x, const cl_N& y)
{
// Methode:
// Falls beide reell, klar.
if (realp(y)) {
DeclareType(cl_R,y);
// x,y beide reell
- return cl_equal(x,y);
+ return equal(x,y);
} else {
DeclareType(cl_C,y);
// x reell, y komplex
if (!zerop(imagpart(y)))
return cl_false;
- return cl_equal(x,realpart(y));
+ return equal(x,realpart(y));
}
} else {
DeclareType(cl_C,x);
// x komplex, y reell
if (!zerop(imagpart(x)))
return cl_false;
- return cl_equal(realpart(x),y);
+ return equal(realpart(x),y);
} else {
DeclareType(cl_C,y);
// x,y beide komplex
- if (!cl_equal(realpart(x),realpart(y)))
+ if (!equal(realpart(x),realpart(y)))
return cl_false;
- if (!cl_equal(imagpart(x),imagpart(y)))
+ if (!equal(imagpart(x),imagpart(y)))
return cl_false;
return cl_true;
}
}
}
+
+} // namespace cln
// Implementation.
+namespace cln {
+
const cl_N complex_C (const cl_R& a, const cl_R& b)
{
return allocate_complex(a,b);
}
+
+} // namespace cln
#include "cl_R.h"
+namespace cln {
+
const cl_N complex (const cl_R& a, const cl_R& b)
{
// Methode:
else
return allocate_complex(a,b);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
+namespace cln {
+
const cl_R imagpart (const cl_N& x)
{
if (realp(x))
return imagpart(x);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_N operator- (const cl_N& x, const cl_N& y)
{
}
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_N minus1 (const cl_N& x)
{
return complex_C(minus1(a),b);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_N operator* (const cl_N& x, const cl_N& y)
{
}
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_N operator+ (const cl_N& x, const cl_N& y)
{
}
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_N plus1 (const cl_N& x)
{
return complex_C(plus1(a),b);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
+namespace cln {
+
const cl_R realpart (const cl_N& x)
{
if (realp(x)) {
return realpart(x);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_N square (const cl_N& x)
{
return complex_C(square(a)-square(b),2*a*b);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_N operator- (const cl_N& x)
{
return complex_C(-a,-b);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
cl_boolean zerop (const cl_N& x)
{
return cl_false;
}
}
+
+} // namespace cln
// Implementation.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
#include "cl_DF.h"
+namespace cln {
+
const cl_C_DF cl_C_recip (const cl_DF& a, const cl_DF& b)
{
// a=0.0 -> liefere die Komponenten a=0.0 und -1/b.
// 2^(-e)*a'/c' + i * -2^(-e)*b'/c'
return cl_C_DF(scale_float(na/nc,-e), scale_float(-(nb/nc),-e));
}
+
+} // namespace cln
// Implementation.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
#include "cl_FF.h"
+namespace cln {
+
const cl_C_FF cl_C_recip (const cl_FF& a, const cl_FF& b)
{
// a=0.0 -> liefere die Komponenten a=0.0 und -1/b.
// 2^(-e)*a'/c' + i * -2^(-e)*b'/c'
return cl_C_FF(scale_float(na/nc,-e), scale_float(-(nb/nc),-e));
}
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
#include "cl_LF_impl.h"
+namespace cln {
+
ALL_cl_LF_OPERATIONS_SAME_PRECISION()
const cl_C_LF cl_C_recip (const cl_LF& a, const cl_LF& b)
// 2^(-e)*a'/c' + i * -2^(-e)*b'/c'
return cl_C_LF(scale_float(na/nc,-e), scale_float(-(nb/nc),-e));
}}
+
+} // namespace cln
// Implementation.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
#include "cl_SF.h"
+namespace cln {
+
const cl_C_SF cl_C_recip (const cl_SF& a, const cl_SF& b)
{
// a=0.0 -> liefere die Komponenten a=0.0 und -1/b.
// 2^(-e)*a'/c' + i * -2^(-e)*b'/c'
return cl_C_SF(scale_float(na/nc,-e), scale_float(-(nb/nc),-e));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_N operator/ (const cl_N& x, const cl_N& y)
{
return x * recip(y);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
#include "cl_R.h"
-#include "cl_rational.h"
+#include "cln/rational.h"
#include "cl_RA.h"
#include "cl_F.h"
#include "cl_SF.h"
#include "cl_DF.h"
#include "cl_LF.h"
+namespace cln {
+
ALL_cl_LF_OPERATIONS_SAME_PRECISION()
// for GEN_F_OP2:
}
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex_class.h"
+#include "cln/complex_class.h"
// Implementation.
-#include "cl_input.h"
-#include "cl_complex_io.h"
+#include "cln/input.h"
+#include "cln/complex_io.h"
+
+namespace cln {
cl_read_flags cl_N_read_flags = {
syntax_number,
lsyntax_all,
10,
- { cl_float_format_ffloat, cl_float_format_lfloat_min, cl_true }
+ { float_format_ffloat, float_format_lfloat_min, cl_true }
};
cl_N::cl_N (const char * string)
pointer = as_cl_private_thing(
read_complex(cl_N_read_flags,string,NULL,NULL));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex_io.h"
+#include "cln/complex_io.h"
// Implementation.
#include <string.h>
-#include "cl_input.h"
-#include "cl_real_io.h"
-#include "cl_float_io.h"
-#include "cl_rational_io.h"
-#include "cl_integer_io.h"
-#include "cl_integer.h"
+#include "cln/input.h"
+#include "cln/real_io.h"
+#include "cln/float_io.h"
+#include "cln/rational_io.h"
+#include "cln/integer_io.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_F.h"
#include "cl_C.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
#undef floor
-#include <math.h>
+#include <cmath>
#define floor cln_floor
+namespace cln {
+
// Step forward over all digits, to the end of string or to the next non-digit.
static const char * skip_digits (const char * ptr, const char * string_limit, unsigned int base)
{
{
// If no string_limit is given, it defaults to the end of the string.
if (!string_limit)
- string_limit = string + strlen(string);
+ string_limit = string + ::strlen(string);
if (flags.syntax & syntax_rational) {
// Check for rational number syntax.
var unsigned int rational_base = flags.rational_base;
goto not_rational_syntax;
var cl_I base = read_integer(10,0,ptr,0,base_end_ptr-ptr);
if (!((base >= 2) && (base <= 36))) {
- fprint(cl_stderr, "Base must be an integer in the range from 2 to 36, not ");
- fprint(cl_stderr, base);
- fprint(cl_stderr, "\n");
+ fprint(stderr, "Base must be an integer in the range from 2 to 36, not ");
+ fprint(stderr, base);
+ fprint(stderr, "\n");
cl_abort();
}
rational_base = FN_to_UL(base); ptr = base_end_ptr;
}
ptr = ptr_after_exponent;
var const char * ptr_after_prec = ptr;
- var cl_float_format_t prec;
+ var float_format_t prec;
if ((ptr != string_limit) && (*ptr == '_')) {
ptr++;
ptr_after_prec = skip_digits(ptr,string_limit,10);
if (ptr_after_prec == ptr) goto not_float_syntax;
var cl_I prec1 = digits_to_I(ptr,ptr_after_prec-ptr,10);
var uintL prec2 = cl_I_to_UL(prec1);
- prec = (float_base==10 ? cl_float_format(prec2)
- : (cl_float_format_t)((uintL)((1+prec2)*log((double)float_base)*1.442695041)+1)
+ prec = (float_base==10 ? float_format(prec2)
+ : (float_format_t)((uintL)((1+prec2)*::log((double)float_base)*1.442695041)+1)
);
} else {
switch (exponent_marker) {
- case 'S': prec = cl_float_format_sfloat; break;
- case 'F': prec = cl_float_format_ffloat; break;
- case 'D': prec = cl_float_format_dfloat; break;
+ case 'S': prec = float_format_sfloat; break;
+ case 'F': prec = float_format_ffloat; break;
+ case 'D': prec = float_format_dfloat; break;
case 'L': prec = flags.float_flags.default_lfloat_format; break;
case 'E': prec = flags.float_flags.default_float_format; break;
default: NOTREACHED
var uintL num_significant_digits =
(ptr_after_fracpart - ptr) - (ptr_before_fracpart > ptr ? 1 : 0);
var uintL prec2 = (num_significant_digits>=2 ? num_significant_digits-2 : 0);
- var cl_float_format_t precx =
- (float_base==10 ? cl_float_format(prec2)
- : (cl_float_format_t)((uintL)((1+prec2)*log((double)float_base)*1.442695041)+1)
+ var float_format_t precx =
+ (float_base==10 ? float_format(prec2)
+ : (float_format_t)((uintL)((1+prec2)*::log((double)float_base)*1.442695041)+1)
);
if ((uintL)precx > (uintL)prec)
prec = precx;
at_end_of_parse(string_rest);
return x;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex_io.h"
+#include "cln/complex_io.h"
// Implementation.
-#include "cl_io.h"
+#include "cln/io.h"
#include "cl_spushstring.h"
-#include "cl_input.h"
+#include "cln/input.h"
+
+namespace cln {
// We read an entire token (or even more, if it begins with #C) into a
// buffer and then call read_complex() on the buffer.
// Handle premature EOF.
eof: read_number_eof();
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
+namespace cln {
+
static void complex_destructor (cl_heap* pointer)
{
(*(cl_heap_complex*)pointer).~cl_heap_complex();
complex_destructor,
cl_class_flags_subclass_complex
};
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_N conjugate (const cl_N& x)
{
return complex_C(a,-b);
}
}
+
+} // namespace cln
// Implementation.
-#include "cl_complex.h"
-#include "cl_io.h"
-#include "cl_complex_io.h"
+#include "cln/complex.h"
+#include "cln/io.h"
+#include "cln/complex_io.h"
+
+namespace cln {
static void dprint (cl_heap* pointer)
{
AT_INITIALIZATION(dprint_N)
{ cl_register_type_printer(cl_class_complex,dprint); }
-// This dummy links in this module when <cl_complex.h> requires it.
+// This dummy links in this module when <cln/complex.h> requires it.
int cl_C_debug_module;
extern int cl_R_debug_module;
static void* dummy[] = { &dummy,
&cl_R_debug_module
};
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_N.h"
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
-uint32 cl_equal_hashcode (const cl_N& x)
+namespace cln {
+
+uint32 equal_hashcode (const cl_N& x)
{
if (realp(x)) {
DeclareType(cl_R,x);
- return cl_equal_hashcode(x);
+ return equal_hashcode(x);
} else {
DeclareType(cl_C,x);
var const cl_R& a = realpart(x);
var const cl_R& b = imagpart(x);
- var uint32 code1 = cl_equal_hashcode(a);
- var uint32 code2 = cl_equal_hashcode(b);
+ var uint32 code1 = equal_hashcode(a);
+ var uint32 code2 = equal_hashcode(b);
// Wichtig beim Kombinieren, wegen "complex canonicalization":
- // Ist imagpart=0.0, so ist der Hashcode = cl_equal_hashcode(a).
+ // Ist imagpart=0.0, so ist der Hashcode = equal_hashcode(a).
return code1 ^ ((code2 << 5) | (code2 >> 27));
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
// Methode:
// Für y>0:
var cl_N z = expt_pos(x,abs_y); // (expt x (abs y))
return (y<0 ? recip(z) : z); // evtl. noch Kehrwert nehmen
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
#include "cl_I.h"
+namespace cln {
+
// Methode:
// Für y>0:
// a:=x, b:=y.
var cl_N z = expt_pos(x,abs_y); // (expt x (abs y))
return (y_negative ? recip(z) : z); // evtl. noch Kehrwert nehmen
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_N.h"
+namespace cln {
+
// Cf. cl_N_p in cl_C_ring.cc.
// But here, for better inlining in g++, it is preferrable to finish every
// alternative with either "return cl_true;" or "return cl_false;".
} else
cl_as_error(x,"a number",filename,line);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex_io.h"
+#include "cln/complex_io.h"
// Implementation.
-#include "cl_output.h"
+#include "cln/output.h"
+
+namespace cln {
void print_complex (cl_ostream stream, const cl_print_flags& flags, const cl_N& z)
{
print_complex(stream,(const cl_print_number_flags&)flags,z);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex_io.h"
+#include "cln/complex_io.h"
// Implementation.
-#include "cl_output.h"
-#include "cl_complex.h"
+#include "cln/output.h"
+#include "cln/complex.h"
#include "cl_C.h"
-#include "cl_real_io.h"
+#include "cln/real_io.h"
+
+namespace cln {
void print_complex (cl_ostream stream, const cl_print_number_flags& flags, const cl_N& z)
{
}
}
}
+
+} // namespace cln
CL_PROVIDE(cl_C_ring)
// Specification.
-#include "cl_complex_ring.h"
+#include "cln/complex_ring.h"
// Implementation.
-#include "cl_complex.h"
-#include "cl_complex_io.h"
+#include "cln/complex.h"
+#include "cln/complex_io.h"
#include "cl_C.h"
+namespace cln {
+
static void N_fprint (cl_heap_ring* R, cl_ostream stream, const _cl_ring_element& x)
{
unused R;
static cl_boolean N_equal (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y)
{
unused R;
- return cl_equal(The(cl_N)(x),The(cl_N)(y));
+ return equal(The(cl_N)(x),The(cl_N)(y));
}
static const _cl_ring_element N_zero (cl_heap_ring* R)
static cl_number_ring_ops<cl_N> N_ops = {
cl_N_p,
- cl_equal,
+ equal,
exact_zerop,
operator+,
operator-,
const cl_complex_ring cl_C_ring;
+} // namespace cln
+
CL_PROVIDE_END(cl_C_ring)
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
#include "cl_R.h"
-#include "cl_rational.h"
+#include "cln/rational.h"
#include "cl_RA.h"
-#include "cl_float.h"
+#include "cln/float.h"
-inline const cl_F cl_pi (const cl_R& v)
+namespace cln {
+
+inline const cl_F pi (const cl_R& v)
{
if (rationalp(v))
- return cl_pi();
+ return pi();
else {
DeclareType(cl_F,v);
- return cl_pi(v);
+ return pi(v);
}
}
DeclareType(cl_I,x);
// x Integer
if (eq(x,0)) // x=0 -> Ergebnis pi/2
- return scale_float(cl_pi(),-1);
+ return scale_float(pi(),-1);
if (eq(x,1)) // x=1 -> Ergebnis 0
return 0;
if (eq(x,-1)) // x=-1 -> Ergebnis pi
- return cl_pi();
+ return pi();
xf = cl_float(x);
} else {
DeclareType(cl_RT,x);
// x Ratio
if (eq(denominator(x),2)) { // Nenner = 2 ?
if (eq(numerator(x),1)) // x=1/2 -> Ergebnis pi/3
- return cl_pi()/3;
+ return pi()/3;
if (eq(numerator(x),-1)) // x=-1/2 -> Ergebnis 2pi/3
- return scale_float(cl_pi(),1)/3;
+ return scale_float(pi(),1)/3;
}
xf = cl_float(x);
}
}
var cl_R& u = u_v.realpart;
var cl_R& v = u_v.imagpart;
- var cl_F pi = cl_pi(v); // pi im Float-Format von v
- return complex(scale_float(pi,-1)-v,u); // (pi/2-v)+iu
+ var cl_F archimedes = pi(v); // pi im Float-Format von v
+ return complex(scale_float(archimedes,-1)-v,u); // (pi/2-v)+iu
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
#include "cl_R.h"
-#include "cl_rational.h"
+#include "cln/rational.h"
#include "cl_RA.h"
-#include "cl_float.h"
+#include "cln/float.h"
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
#include "cl_F_from_R_def.cc"
+namespace cln {
+
const cl_N acosh (const cl_N& z)
{
// Methode:
DeclareType(cl_I,x);
// x Integer
if (eq(x,0)) // x=0 -> Ergebnis pi/2 i
- return complex_C(0,scale_float(cl_pi(),-1));
+ return complex_C(0,scale_float(pi(),-1));
if (eq(x,1)) // x=1 -> Ergebnis 0
return 0;
if (eq(x,-1)) // x=-1 -> Ergebnis pi i
- return complex_C(0,cl_pi());
+ return complex_C(0,pi());
} else {
DeclareType(cl_RT,x);
// x Ratio
if (eq(denominator(x),2)) { // Nenner = 2 ?
if (eq(numerator(x),1)) // x=1/2 -> Ergebnis pi/3 i
- return complex_C(0,cl_pi()/3);
+ return complex_C(0,pi()/3);
if (eq(numerator(x),-1)) // x=-1/2 -> Ergebnis 2pi/3 i
- return complex_C(0,scale_float(cl_pi(),1)/3);
+ return complex_C(0,scale_float(pi(),1)/3);
}
}
}
var cl_F& x = xf;
// x Float <= -1
// log(sqrt(x^2-1)-x), ein Float >=0, Imaginärteil pi
- return complex_C(ln(sqrt(square(x)-1)-x),cl_pi());
+ return complex_C(ln(sqrt(square(x)-1)-x),pi());
}
}
return 4 * atanh( sqrt(minus1(z)/2) / plus1(sqrt(plus1(z)/2)) );
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
// Methode:
// Wert und Branch Cuts nach der Formel CLTL2, S. 311:
var cl_R& v = u_v.imagpart;
return complex(v,-u); // v-iu
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
// Methode:
// Wert und Branch Cuts nach der Formel CLTL2, S. 313:
var cl_R& v = u_v.imagpart;
return complex(u,v);
}
+
+} // namespace cln
// Implementation.
-#include "cl_real.h"
+#include "cln/real.h"
#include "cl_F_tran.h"
#include "cl_R.h"
-#include "cl_rational.h"
+#include "cln/rational.h"
#include "cl_RA.h"
-#include "cl_float.h"
+#include "cln/float.h"
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
#include "cl_F_from_R_def.cc"
+namespace cln {
+
// Hilfsfunktion für asinh und asin: u+iv := arsinh(x+iy). Liefert cl_C_R(u,v).
const cl_C_R asinh (const cl_R& x, const cl_R& y)
DeclareType(cl_I,y);
// y Integer
if (eq(y,1)) // x=0, y=1 -> v = pi/2
- return cl_C_R(0,scale_float(cl_pi(),-1));
+ return cl_C_R(0,scale_float(pi(),-1));
if (eq(y,-1)) // x=0, y=-1 -> v = -pi/2
- return cl_C_R(0,-scale_float(cl_pi(),-1));
+ return cl_C_R(0,-scale_float(pi(),-1));
yf = cl_float(y); // y in Float umwandeln
} else {
DeclareType(cl_RT,y);
// y Ratio
if (eq(denominator(y),2)) { // Nenner = 2 ?
if (eq(numerator(y),1)) // x=0, y=1/2 -> v = pi/6
- return cl_C_R(0,cl_pi()/6);
+ return cl_C_R(0,pi()/6);
if (eq(numerator(y),-1)) // x=0, y=-1/2 -> v = -pi/6
- return cl_C_R(0,-(cl_pi()/6));
+ return cl_C_R(0,-(pi()/6));
}
yf = cl_float(y); // y in Float umwandeln
}
temp = temp + y;
// temp = sqrt(y^2-1)+|y|, ein Float >1
var cl_F u = ln(temp); // ln(|y|+sqrt(y^2-1)), ein Float >0
- var cl_F v = scale_float(cl_pi(),-1); // (scale-float pi -1) = pi/2
+ var cl_F v = scale_float(pi(),-1); // (scale-float pi -1) = pi/2
if (!minusp(y))
return cl_C_R(u,v); // y>1 -> v = pi/2
else
DeclareType(cl_F,v);
return cl_C_R(scale_float(u,1),scale_float(v,1)); // u:=2*u, v:=2*v
}}}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
// Methode:
// Wert und Branch Cuts nach der Formel CLTL2, S. 307/312/313:
var cl_R& v = u_v.imagpart;
return complex(v,-u); // v-iu
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
// Methode:
// Wert und Branch Cuts nach der Formel CLTL2, S. 315:
var cl_R& v = u_v.imagpart;
return complex(u,v);
}
+
+} // namespace cln
// Implementation.
#include "cl_N.h"
-#include "cl_real.h"
+#include "cln/real.h"
#include "cl_F_tran.h"
#include "cl_R.h"
#define MAYBE_INLINE inline
#include "cl_F_from_R_def.cc"
+namespace cln {
+
// Hilfsfunktion für atanh und atan: u+iv := artanh(x+iy). Liefert cl_C_R(u,v).
const cl_C_R atanh (const cl_R& x, const cl_R& y)
} else {
// (1+x)/(1-x) < 0 -> Betrag nehmen, Imaginärteil berechnen:
xx = - xx;
- v = scale_float(cl_pi(),-1); // (scale-float pi -1) = pi/2
+ v = scale_float(pi(),-1); // (scale-float pi -1) = pi/2
if (minusp(xx_den))
// 1-x<0 -> dann -pi/2
v = -v;
}
return cl_C_R(u,v);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_N cis (const cl_N& x)
{
// x = a+bi -> (complex (* (exp (- b)) (cos a)) (* (exp (- b)) (sin a)))
if (realp(x)) {
DeclareType(cl_R,x);
- var cl_cos_sin_t trig = cl_cos_sin(x);
+ var cos_sin_t trig = cos_sin(x);
return complex(trig.cos, trig.sin);
} else {
DeclareType(cl_C,x);
// x=a+bi
var const cl_R& a = realpart(x);
var const cl_R& b = imagpart(x);
- var cl_cos_sin_t trig_a = cl_cos_sin(a); // cos(a), sin(a) errechnen
+ var cos_sin_t trig_a = cos_sin(a); // cos(a), sin(a) errechnen
var cl_R exp_minusb = exp(-b); // (exp (- b))
return complex(exp_minusb*trig_a.cos, // (* (exp (- b)) (cos a))
exp_minusb*trig_a.sin); // (* (exp (- b)) (sin a))
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_N cos (const cl_N& x)
{
// x=a+bi
var const cl_R& a = realpart(x);
var const cl_R& b = imagpart(x);
- var cl_cosh_sinh_t hyp_b = cl_cosh_sinh(b); // cosh(b), sinh(b) errechnen
- var cl_cos_sin_t trig_a = cl_cos_sin(a); // cos(a), sin(a) errechnen
+ var cosh_sinh_t hyp_b = cosh_sinh(b); // cosh(b), sinh(b) errechnen
+ var cos_sin_t trig_a = cos_sin(a); // cos(a), sin(a) errechnen
return complex(trig_a.cos * hyp_b.cosh, // cos(a)*cosh(b)
- (trig_a.sin * hyp_b.sinh) // -sin(a)*sinh(b)
);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_N cosh (const cl_N& x)
{
// x=a+bi
var const cl_R& a = realpart(x);
var const cl_R& b = imagpart(x);
- var cl_cos_sin_t trig_b = cl_cos_sin(b); // cos(b), sin(b) errechnen
- var cl_cosh_sinh_t hyp_a = cl_cosh_sinh(a); // cosh(a), sinh(a) errechnen
+ var cos_sin_t trig_b = cos_sin(b); // cos(b), sin(b) errechnen
+ var cosh_sinh_t hyp_a = cosh_sinh(a); // cosh(a), sinh(a) errechnen
return complex(hyp_a.cosh * trig_b.cos, // cosh(a)*cos(b)
hyp_a.sinh * trig_b.sin // sinh(a)*sin(b)
);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_N exp (const cl_N& x)
{
// x=a+bi
var const cl_R& a = realpart(x);
var const cl_R& b = imagpart(x);
- var cl_cos_sin_t unitvec = cl_cos_sin(b); // (cos b), (sin b)
+ var cos_sin_t unitvec = cos_sin(b); // (cos b), (sin b)
// Da b nicht = Fixnum 0 ist, ist auch sin(b) nicht = Fixnum 0.
var cl_R exp_a = exp(a); // (exp a)
return complex_C(exp_a * unitvec.cos, exp_a * unitvec.sin);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
#include "cl_R.h"
-#include "cl_rational.h"
+#include "cln/rational.h"
#include "cl_RA.h"
#include "cl_I.h"
#include "cl_N.h"
+namespace cln {
+
// Methode:
// Falls y rational:
// Falls y Integer:
}
return exp(log(x)*y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
#include "cl_N.h"
+namespace cln {
+
const cl_N log (const cl_N& x)
{
// Methode:
{ cl_error_division_by_0(); }
return complex(ln(r),phase(x));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
#include "cl_R.h"
#include "cl_N.h"
+namespace cln {
+
const cl_N log (const cl_N& a, const cl_N& b)
{
// Methode:
// normaler komplexer Fall
return log(a) / log(b);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_R phase (const cl_N& x)
{
return atan(realpart(x),imagpart(x));
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_N sin (const cl_N& x)
{
// x=a+bi
var const cl_R& a = realpart(x);
var const cl_R& b = imagpart(x);
- var cl_cosh_sinh_t hyp_b = cl_cosh_sinh(b); // cosh(b), sinh(b) errechnen
- var cl_cos_sin_t trig_a = cl_cos_sin(a); // cos(a), sin(a) errechnen
+ var cosh_sinh_t hyp_b = cosh_sinh(b); // cosh(b), sinh(b) errechnen
+ var cos_sin_t trig_a = cos_sin(a); // cos(a), sin(a) errechnen
// Da b nicht = Fixnum 0 ist, ist auch sinh(b) nicht = Fixnum 0.
// cos(a) /= Fixnum 0.
return complex_C(trig_a.sin * hyp_b.cosh, // sin(a)*cosh(b)
);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_N sinh (const cl_N& x)
{
// x=a+bi
var const cl_R& a = realpart(x);
var const cl_R& b = imagpart(x);
- var cl_cosh_sinh_t hyp_a = cl_cosh_sinh(a); // cosh(a), sinh(a) errechnen
- var cl_cos_sin_t trig_b = cl_cos_sin(b); // cos(b), sin(b) errechnen
+ var cosh_sinh_t hyp_a = cosh_sinh(a); // cosh(a), sinh(a) errechnen
+ var cos_sin_t trig_b = cos_sin(b); // cos(b), sin(b) errechnen
// Da b nicht = Fixnum 0 ist, ist auch sin(b) nicht = Fixnum 0.
// cosh(a) /= Fixnum 0.
return complex_C(hyp_a.sinh * trig_b.cos, // sinh(a)*cos(b)
);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_N tan (const cl_N& x)
{
// (complex (* (cos a) (cosh b)) (- (* (sin a) (sinh b)))) )
if (realp(x)) {
DeclareType(cl_R,x);
- var cl_cos_sin_t trig = cl_cos_sin(x);
+ var cos_sin_t trig = cos_sin(x);
return trig.sin / trig.cos;
} else {
DeclareType(cl_C,x);
// x=a+bi
var const cl_R& a = realpart(x);
var const cl_R& b = imagpart(x);
- var cl_cosh_sinh_t hyp_b = cl_cosh_sinh(b); // cosh(b), sinh(b) errechnen
- var cl_cos_sin_t trig_a = cl_cos_sin(a); // cos(a), sin(a) errechnen
+ var cosh_sinh_t hyp_b = cosh_sinh(b); // cosh(b), sinh(b) errechnen
+ var cos_sin_t trig_a = cos_sin(a); // cos(a), sin(a) errechnen
return
complex_C(trig_a.sin * hyp_b.cosh, // sin(a)*cosh(b)
trig_a.cos * hyp_b.sinh // cos(a)*sinh(b), nicht Fixnum 0
);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_N tanh (const cl_N& x)
{
// (complex (* (cosh a) (cos b)) (* (sinh a) (sin b))) )
if (realp(x)) {
DeclareType(cl_R,x);
- var cl_cosh_sinh_t hyp = cl_cosh_sinh(x);
+ var cosh_sinh_t hyp = cosh_sinh(x);
return hyp.sinh / hyp.cosh;
} else {
DeclareType(cl_C,x);
// x=a+bi
var const cl_R& a = realpart(x);
var const cl_R& b = imagpart(x);
- var cl_cos_sin_t trig_b = cl_cos_sin(b); // cos(b), sin(b) errechnen
- var cl_cosh_sinh_t hyp_a = cl_cosh_sinh(a); // cosh(a), sinh(a) errechnen
+ var cos_sin_t trig_b = cos_sin(b); // cos(b), sin(b) errechnen
+ var cosh_sinh_t hyp_a = cosh_sinh(a); // cosh(a), sinh(a) errechnen
return
complex_C(hyp_a.sinh * trig_b.cos, // sinh(a)*cos(b)
hyp_a.cosh * trig_b.sin // cosh(a)*sin(b), nicht Fixnum 0
);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_complex.h"
+#include "cln/complex.h"
// Implementation.
#include "cl_C.h"
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_N cis (const cl_R& x)
{
// Methode:
// (complex (cos x) (sin x))
- var cl_cos_sin_t trig = cl_cos_sin(x);
+ var cos_sin_t trig = cos_sin(x);
return complex(trig.cos, trig.sin);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
+
+namespace cln {
const cl_F sqrt (const cl_F& x)
GEN_F_OP1(x, sqrt, return)
+
+} // namespace cln
// Implementation.
-#include "cl_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/abort.h"
+
+namespace cln {
void cl_error_floating_point_nan (void)
{
- fprint(cl_stderr, "floating point NaN occurred.\n");
+ fprint(stderr, "floating point NaN occurred.\n");
cl_abort();
}
+
+} // namespace cln
// Implementation.
-#include "cl_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/abort.h"
+
+namespace cln {
void cl_error_floating_point_overflow (void)
{
- fprint(cl_stderr, "Floating point overflow.\n");
+ fprint(stderr, "Floating point overflow.\n");
cl_abort();
}
+
+} // namespace cln
// Implementation.
-#include "cl_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/abort.h"
+
+namespace cln {
void cl_error_floating_point_underflow (void)
{
- fprint(cl_stderr, "Floating point underflow.\n");
+ fprint(stderr, "Floating point underflow.\n");
cl_abort();
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
+namespace cln {
+
cl_boolean cl_inhibit_floating_point_underflow = cl_false;
-cl_float_format_t cl_default_float_format = cl_float_format_ffloat;
+float_format_t default_float_format = float_format_ffloat;
+} // namespace cln
#endif
+namespace cln {
+
// This dummy links in this module whenever some module needs IEEE floats.
int cl_ieee_module;
+} // namespace cln
+
CL_PROVIDE_END(cl_ieee)
#ifndef _CL_IEEE_H
#define _CL_IEEE_H
+namespace cln {
+
// To make sure that cl_ieee.cc is linked in.
// NEED_IEEE_FLOATS()
#if (defined(linux) || defined(__linux)) // only needed on Linux
#endif
extern int cl_ieee_module;
+} // namespace cln
+
#endif /* _CL_IEEE_H */
#ifndef _CL_F_H
#define _CL_F_H
-#include "cl_number.h"
+#include "cln/number.h"
#include "cl_macros.h"
-#include "cl_float.h"
+#include "cln/float.h"
+namespace cln {
nonreturning_function(extern, cl_error_floating_point_overflow, (void));
nonreturning_function(extern, cl_error_floating_point_underflow, (void));
extern const cl_F cl_F_shortenrelative (const cl_F& x, const cl_F& y);
-// Macro: dispatches according to a cl_float_format_t value.
+// Macro: dispatches according to a float_format_t value.
// floatformatcase(value, SF_statement,FF_statement,DF_statement,LF_statement)
// LF_statement darf auf `len' zugreifen, die zu `value' korrespondierende
// Mantissenlänge (gemessen in Digits).
#define floatformatcase(value, SF_statement,FF_statement,DF_statement,LF_statement) \
- { if ((value) <= cl_float_format_sfloat) { SF_statement } \
- elif ((value) <= cl_float_format_ffloat) { FF_statement } \
- elif ((value) <= cl_float_format_dfloat) { DF_statement } \
+ { if ((value) <= float_format_sfloat) { SF_statement } \
+ elif ((value) <= float_format_ffloat) { FF_statement } \
+ elif ((value) <= float_format_dfloat) { DF_statement } \
else { var uintL len = ceiling((uintL)(value),intDsize); LF_statement } \
}
+} // namespace cln
#endif /* _CL_F_H */
#include "cl_DF.h"
#include "cl_FF.h"
+namespace cln {
+
const cl_FF cl_DF_to_FF (const cl_DF& x)
{
// x entpacken:
return encode_FF(sign,exp,manthi);
#endif
}
+
+} // namespace cln
#include "cl_LF_impl.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_LF cl_DF_to_LF (const cl_DF& x, uintC len)
{
// x entpacken:
clear_loop_msp(ptr mspop ceiling(DF_mant_len+1,intDsize),len-ceiling(DF_mant_len+1,intDsize));
return y;
}
+
+} // namespace cln
#include "cl_DF.h"
#include "cl_SF.h"
+namespace cln {
+
const cl_SF cl_DF_to_SF (const cl_DF& x)
{
// x entpacken:
return encode_SF(sign,exp,manthi);
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF.h"
-double cl_double_approx (const cl_DF& obj)
+namespace cln {
+
+double double_approx (const cl_DF& obj)
{
union { dfloat eksplicit; double machine_double; } u;
#define val u.eksplicit
#undef val
return u.machine_double;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF.h"
#include "cl_FF.h"
-float cl_float_approx (const cl_DF& x)
+namespace cln {
+
+float float_approx (const cl_DF& x)
{
union { ffloat eksplicit; float machine_float; } u;
// x entpacken:
{ u.eksplicit = make_FF_word(sign,exp+FF_exp_mid,mant); }
return u.machine_float;
}
+
+} // namespace cln
#include "cl_FF.h"
#include "cl_DF.h"
+namespace cln {
+
const cl_DF cl_FF_to_DF (const cl_FF& x)
{
// x entpacken:
return encode_DF(sign,exp,mant>>(32-(DF_mant_len-FF_mant_len)),mant<<(DF_mant_len-FF_mant_len));
#endif
}
+
+} // namespace cln
#include "cl_LF_impl.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_LF cl_FF_to_LF (const cl_FF& x, uintC len)
{
// x entpacken:
clear_loop_msp(ptr mspop ceiling(FF_mant_len+1,intDsize),len-ceiling(FF_mant_len+1,intDsize));
return y;
}
+
+} // namespace cln
#include "cl_FF.h"
#include "cl_SF.h"
+namespace cln {
+
const cl_SF cl_FF_to_SF (const cl_FF& x)
{
// x entpacken:
}
return encode_SF(sign,exp,mant);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF.h"
#include "cl_DF.h"
-double cl_double_approx (const cl_FF& x)
+namespace cln {
+
+double double_approx (const cl_FF& x)
{
// x entpacken:
var cl_signean sign;
#endif
return u.machine_double;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF.h"
-float cl_float_approx (const cl_FF& obj)
+namespace cln {
+
+float float_approx (const cl_FF& obj)
{
union { ffloat eksplicit; float machine_float; } u;
#define val u.eksplicit
#undef val
return u.machine_float;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F cl_float (const cl_F& x, const cl_F& y)
{
floattypecase(y
, return cl_F_to_LF(x,TheLfloat(y)->len);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-const cl_F cl_float (const cl_F& x, cl_float_format_t f)
+namespace cln {
+
+const cl_F cl_float (const cl_F& x, float_format_t f)
{
floatformatcase((uintL)f
, return cl_F_to_SF(x);
, return cl_F_to_LF(x,len);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_DF.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F cl_float (const cl_I& x, const cl_F& y)
{
floattypecase(y
, return cl_I_to_LF(x,TheLfloat(y)->len);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_DF.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F cl_float (const cl_I& x)
{
- floatformatcase(cl_default_float_format
+ floatformatcase(default_float_format
, return cl_I_to_SF(x);
, return cl_I_to_FF(x);
, return cl_I_to_DF(x);
, return cl_I_to_LF(x,len);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_DF.h"
#include "cl_LF.h"
-const cl_F cl_float (const cl_I& x, cl_float_format_t f)
+namespace cln {
+
+const cl_F cl_float (const cl_I& x, float_format_t f)
{
floatformatcase((uintL)f
, return cl_I_to_SF(x);
, return cl_I_to_LF(x,len);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_DF.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F cl_float (const cl_RA& x, const cl_F& y)
{
floattypecase(y
, return cl_RA_to_LF(x,TheLfloat(y)->len);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_DF.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F cl_float (const cl_RA& x)
{
- floatformatcase(cl_default_float_format
+ floatformatcase(default_float_format
, return cl_RA_to_SF(x);
, return cl_RA_to_FF(x);
, return cl_RA_to_DF(x);
, return cl_RA_to_LF(x,len);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_DF.h"
#include "cl_LF.h"
-const cl_F cl_float (const cl_RA& x, cl_float_format_t f)
+namespace cln {
+
+const cl_F cl_float (const cl_RA& x, float_format_t f)
{
floatformatcase((uintL)f
, return cl_RA_to_SF(x);
, return cl_RA_to_LF(x,len);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
+namespace cln {
+
const cl_DF cl_F_to_DF (const cl_F& x)
{
floatcase(x
, return cl_LF_to_DF(x);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
+namespace cln {
+
const cl_FF cl_F_to_FF (const cl_F& x)
{
floatcase(x
, return cl_LF_to_FF(x);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_LF cl_F_to_LF (const cl_F& x, uintC len)
{
floatcase(x
, return LF_to_LF(x,len);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
+namespace cln {
+
const cl_SF cl_F_to_SF (const cl_F& x)
{
floatcase(x
, return cl_LF_to_SF(x);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
-double cl_double_approx (const cl_F& x)
+namespace cln {
+
+double double_approx (const cl_F& x)
{
floatcase(x
- , return cl_double_approx(x);
- , return cl_double_approx(x);
- , return cl_double_approx(x);
- , return cl_double_approx(x);
+ , return double_approx(x);
+ , return double_approx(x);
+ , return double_approx(x);
+ , return double_approx(x);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
-float cl_float_approx (const cl_F& x)
+namespace cln {
+
+float float_approx (const cl_F& x)
{
floatcase(x
- , return cl_float_approx(x);
- , return cl_float_approx(x);
- , return cl_float_approx(x);
- , return cl_float_approx(x);
+ , return float_approx(x);
+ , return float_approx(x);
+ , return float_approx(x);
+ , return float_approx(x);
);
}
+
+} // namespace cln
#include "cl_DF.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_DF cl_LF_to_DF (const cl_LF& x)
{
// x entpacken:
return encode_DF(sign,exp,manthi,mantlo);
#endif
}
+
+} // namespace cln
#include "cl_FF.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_FF cl_LF_to_FF (const cl_LF& x)
{
// x entpacken:
}
return encode_FF(sign,exp,mant);
}
+
+} // namespace cln
#include "cl_SF.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_SF cl_LF_to_SF (const cl_LF& x)
{
// x entpacken:
}
return encode_SF(sign,exp,mant);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_DF.h"
#include "cl_DS.h"
-double cl_double_approx (const cl_LF& x)
+namespace cln {
+
+double double_approx (const cl_LF& x)
{
// x entpacken:
var cl_signean sign;
#endif
return u.machine_double;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_FF.h"
#include "cl_DS.h"
-float cl_float_approx (const cl_LF& x)
+namespace cln {
+
+float float_approx (const cl_LF& x)
{
// x entpacken:
var cl_signean sign;
{ u.eksplicit = make_FF_word(sign,exp+FF_exp_mid,mant); }
return u.machine_float;
}
+
+} // namespace cln
#include "cl_SF.h"
#include "cl_DF.h"
+namespace cln {
+
const cl_DF cl_SF_to_DF (const cl_SF& x)
{
// x entpacken:
return encode_DF(sign,exp,mant<<(DF_mant_len-SF_mant_len-32),0);
#endif
}
+
+} // namespace cln
#include "cl_SF.h"
#include "cl_FF.h"
+namespace cln {
+
const cl_FF cl_SF_to_FF (const cl_SF& x)
{
// x entpacken:
// Mantisse um 23-16=7 Bits nach links schieben:
return encode_FF(sign,exp,mant<<(FF_mant_len-SF_mant_len));
}
+
+} // namespace cln
#include "cl_LF_impl.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_LF cl_SF_to_LF (const cl_SF& x, uintC len)
{
// x entpacken:
clear_loop_msp(ptr mspop ceiling(SF_mant_len+1,intDsize),len-ceiling(SF_mant_len+1,intDsize));
return y;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF.h"
#include "cl_DF.h"
-double cl_double_approx (const cl_SF& x)
+namespace cln {
+
+double double_approx (const cl_SF& x)
{
// x entpacken:
var cl_signean sign;
#endif
return u.machine_double;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF.h"
#include "cl_FF.h"
-float cl_float_approx (const cl_SF& x)
+namespace cln {
+
+float float_approx (const cl_SF& x)
{
// x entpacken:
var cl_signean sign;
{ u.eksplicit = make_FF_word(sign,exp+FF_exp_mid,mant<<(FF_mant_len-SF_mant_len)); }
return u.machine_float;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_low.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_DF sqrt (const cl_DF& x)
{
// Methode:
return encode_DF(0,exp,manthi,mantlo);
#endif
}
+
+} // namespace cln
#ifndef _CL_DF_H
#define _CL_DF_H
-#include "cl_number.h"
-#include "cl_malloc.h"
+#include "cln/number.h"
+#include "cln/malloc.h"
#include "cl_low.h"
#include "cl_F.h"
+#ifdef FAST_DOUBLE
+#include "cl_N.h"
+#include "cl_F.h"
+#endif
+
+namespace cln {
+
typedef // 64-bit float in IEEE format
#if (cl_word_size==64)
// Sign/Exponent/Mantissa
#if (cl_word_size==64)
inline cl_heap_dfloat* allocate_dfloat (dfloat eksplicit)
{
- cl_heap_dfloat* p = (cl_heap_dfloat*) cl_malloc_hook(sizeof(cl_heap_dfloat));
+ cl_heap_dfloat* p = (cl_heap_dfloat*) malloc_hook(sizeof(cl_heap_dfloat));
p->refcount = 1;
p->type = &cl_class_dfloat;
p->representation.eksplicit = eksplicit;
#else
inline cl_heap_dfloat* allocate_dfloat (uint32 semhi, uint32 mlo)
{
- cl_heap_dfloat* p = (cl_heap_dfloat*) cl_malloc_hook(sizeof(cl_heap_dfloat));
+ cl_heap_dfloat* p = (cl_heap_dfloat*) malloc_hook(sizeof(cl_heap_dfloat));
p->refcount = 1;
p->type = &cl_class_dfloat;
p->representation.eksplicit.semhi = semhi;
// maybe_underflow: Ergebnis sehr klein und /=0, liefert IEEE-Null
// maybe_divide_0: Ergebnis unbestimmt, liefert IEEE-Infinity
// maybe_nan: Ergebnis unbestimmt, liefert IEEE-NaN
- #include "cl_N.h"
- #include "cl_F.h"
#if (cl_word_size==64)
#define double_to_DF(expr,ergebnis_zuweisung,maybe_overflow,maybe_subnormal,maybe_underflow,maybe_divide_0,maybe_nan) \
{ var dfloatjanus _erg; _erg.machine_double = (expr); \
// wandelt ein Double-Float obj in ein IEEE-Double-Float val um.
extern void cl_DF_to_double (const cl_DF& obj, dfloatjanus* val_);
+} // namespace cln
+
#endif /* _CL_DF_H */
// Implementation.
+namespace cln {
+
cl_heap_dfloat* cl_double_to_DF_pointer (const dfloatjanus& val_)
{
var dfloat val = val_.eksplicit;
}
#endif
}
+
+} // namespace cln
// Implementation.
+namespace cln {
+
void cl_DF_to_double (const cl_DF& obj, dfloatjanus* val_)
{
var dfloat val = TheDfloat(obj)->dfloat_value;
#endif
val_->eksplicit = val;
}
+
+} // namespace cln
-// cl_double_approx().
+// double_approx().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_DS.h"
#include "cl_F.h"
-double cl_double_approx (const cl_I& x)
+namespace cln {
+
+double double_approx (const cl_I& x)
{
// Method: same as cl_I_to_DF().
if (eq(x,0)) { return 0.0; }
return u.machine_double;
#endif
}
+
+} // namespace cln
-// cl_double_approx().
+// double_approx().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_DF.h"
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_F.h"
-double cl_double_approx (const cl_RA& x)
+namespace cln {
+
+double double_approx (const cl_RA& x)
{
// Method: same as cl_RA_to_DF().
if (integerp(x)) {
DeclareType(cl_I,x);
- return cl_double_approx(x);
+ return double_approx(x);
}
{ // x Ratio
DeclareType(cl_RT,x);
return u.machine_double;
#endif
}}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF.h"
+namespace cln {
+
const cl_DF_div_t ceiling2 (const cl_DF& x, const cl_DF& y)
{
// Methode:
var cl_DF& r = q_r.remainder;
return cl_DF_div_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_DF_minusp.cc"
+namespace cln {
+
const cl_DF fceiling (const cl_DF& x)
{
if (minusp(x))
else
return futruncate(x);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF.h"
+namespace cln {
+
const cl_DF_div_t floor2 (const cl_DF& x, const cl_DF& y)
{
// Methode:
var cl_DF& r = q_r.remainder;
return cl_DF_div_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF.h"
+namespace cln {
+
const cl_DF recip (const cl_DF& x)
{
return cl_DF_1 / x;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF.h"
+namespace cln {
+
const cl_DF_div_t round2 (const cl_DF& x, const cl_DF& y)
{
// Methode:
var cl_DF& r = q_r.remainder;
return cl_DF_div_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF.h"
+namespace cln {
+
const cl_DF_div_t truncate2 (const cl_DF& x, const cl_DF& y)
{
// Methode:
var cl_DF& r = q_r.remainder;
return cl_DF_div_t(q,y*r);
}
+
+} // namespace cln
-// cl_compare().
+// compare().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF.h"
-cl_signean cl_compare (const cl_DF& x, const cl_DF& y)
+namespace cln {
+
+cl_signean compare (const cl_DF& x, const cl_DF& y)
{
// Methode:
// x und y haben verschiedenes Vorzeichen ->
}
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_low.h"
#include "cl_DS.h"
#include "cl_ieee.h"
-NEED_IEEE_FLOATS()
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
#include "cl_DF_zerop.cc"
+namespace cln {
+
+NEED_IEEE_FLOATS()
+
const cl_DF operator/ (const cl_DF& x1, const cl_DF& x2)
{
// Methode:
#endif
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_DF_minusp.cc"
+namespace cln {
+
const cl_DF ffloor (const cl_DF& x)
{
if (minusp(x))
else
return ftruncate(x);
}
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_DS.h"
#include "cl_F.h"
+namespace cln {
+
const cl_DF cl_I_to_DF (const cl_I& x)
{
// Methode:
return encode_DF(sign,(sintL)exp,manthi,mantlo);
#endif
}
+
+} // namespace cln
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_F.h"
+namespace cln {
+
const cl_DF cl_RA_to_DF (const cl_RA& x)
{
// Methode:
return encode_DF(sign,lendiff,manthi,mantlo);
#endif
}}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF.h"
+namespace cln {
+
const cl_DF fround (const cl_DF& x)
{
// Methode:
}
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF.h"
+namespace cln {
+
const cl_DF ftruncate (const cl_DF& x)
{
// Methode:
} }
#endif
}
+
+} // namespace cln
// Implementation.
+namespace cln {
+
const cl_DF futruncate (const cl_DF& x)
{
// Methode:
} }
#endif
}
+
+} // namespace cln
// Implementation.
+namespace cln {
+
#if (cl_word_size==64)
const cl_DF cl_DF_0 = allocate_dfloat(0); // 0.0d0
#endif
+} // namespace cln
+
CL_PROVIDE_END(cl_DF_globals)
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF.h"
#include "cl_ieee.h"
+
+namespace cln {
+
NEED_IEEE_FLOATS()
const cl_DF operator- (const cl_DF& x1, const cl_DF& x2)
#endif
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF.h"
+namespace cln {
+
MAYBE_INLINE
cl_boolean minusp (const cl_DF& x)
{
return (cl_boolean) ((sint32)TheDfloat(x)->dfloat_value_semhi < 0);
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_low.h"
#include "cl_DS.h"
#include "cl_ieee.h"
-NEED_IEEE_FLOATS()
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
#include "cl_DF_zerop.cc"
+namespace cln {
+
+NEED_IEEE_FLOATS()
+
const cl_DF operator* (const cl_DF& x1, const cl_DF& x2)
{
// Methode:
}
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF.h"
#include "cl_F.h"
#include "cl_ieee.h"
-NEED_IEEE_FLOATS()
#include "cl_xmacros.h"
+namespace cln {
+
+NEED_IEEE_FLOATS()
+
const cl_DF operator+ (const cl_DF& x1, const cl_DF& x2)
{
// Methode (nach [Knuth, II, Seminumerical Algorithms, Abschnitt 4.2.1., S.200]):
#endif
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF_minusp.cc"
#include "cl_DF_zerop.cc"
+namespace cln {
+
MAYBE_INLINE2
cl_boolean plusp (const cl_DF& x)
{
else
return cl_true; // sonst ist x>0.
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF.h"
#include "cl_F.h"
+namespace cln {
+
const cl_DF scale_float (const cl_DF& x, sintL delta)
{
// Methode:
{ return cl_DF_0; }
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_F.h"
#include "cl_I.h"
+namespace cln {
+
const cl_DF scale_float (const cl_DF& x, const cl_I& delta)
{
// Methode:
{ return cl_DF_0; }
}
}
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
+namespace cln {
+
const cl_I cl_DF_to_I (const cl_DF& x)
{
// Methode:
return ash( L2_to_I(manthi,mantlo), exp );
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF.h"
+namespace cln {
+
const cl_DF operator- (const cl_DF& x)
{
// Methode:
return allocate_dfloat( semhi ^ bit(31), mlo );
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF.h"
+namespace cln {
+
MAYBE_INLINE
cl_boolean zerop (const cl_DF& x)
{
return (cl_boolean) (TheDfloat(x)->dfloat_value_semhi == 0);
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat_class.h"
+#include "cln/dfloat_class.h"
// Implementation.
-#include "cl_dfloat.h"
-#include "cl_input.h"
-#include "cl_float_io.h"
+#include "cln/dfloat.h"
+#include "cln/input.h"
+#include "cln/float_io.h"
+
+namespace cln {
cl_read_flags cl_DF_read_flags = {
syntax_dfloat,
lsyntax_all,
10,
- { cl_float_format_dfloat, cl_float_format_lfloat_min, cl_false }
+ { float_format_dfloat, float_format_lfloat_min, cl_false }
};
cl_DF::cl_DF (const char * string)
pointer = as_cl_private_thing(
As(cl_DF)(read_float(cl_DF_read_flags,string,NULL,NULL)));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_DF_minusp.cc"
+namespace cln {
+
const cl_DF abs (const cl_DF& x)
{
// x<0 -> (- x), x>=0 -> x
if (minusp(x)) return -x; else return x;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_N.h"
+namespace cln {
+
inline cl_boolean cl_DF_p (const cl_number& x)
{
if (x.pointer_p())
} else
cl_as_error(x,"a double-float number",filename,line);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
+namespace cln {
+
cl_class cl_class_dfloat = {
NULL, // empty destructor
cl_class_flags_subclass_complex | cl_class_flags_subclass_real | cl_class_flags_subclass_float
};
+
+} // namespace cln
// Implementation.
-#include "cl_dfloat.h"
-#include "cl_io.h"
-#include "cl_float_io.h"
+#include "cln/dfloat.h"
+#include "cln/io.h"
+#include "cln/float_io.h"
+
+namespace cln {
static void dprint (cl_heap* pointer)
{
AT_INITIALIZATION(dprint_DF)
{ cl_register_type_printer(cl_class_dfloat,dprint); }
-// This dummy links in this module when <cl_dfloat.h> requires it.
+// This dummy links in this module when <cln/dfloat.h> requires it.
int cl_DF_debug_module;
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF.h"
#include "cl_I.h"
-const cl_decoded_dfloat decode_float (const cl_DF& x)
+namespace cln {
+
+const decoded_dfloat decode_float (const cl_DF& x)
{
// x entpacken:
var cl_signean sign;
var sintL exp;
#if (cl_word_size==64)
var uint64 mant;
- DF_decode(x, { return cl_decoded_dfloat(cl_DF_0, 0, cl_DF_1); },
+ DF_decode(x, { return decoded_dfloat(cl_DF_0, 0, cl_DF_1); },
sign=,exp=,mant=
);
- return cl_decoded_dfloat(
+ return decoded_dfloat(
encode_DF(0,0,mant), // (-1)^0 * 2^0 * m erzeugen
L_to_FN(exp), // e als Fixnum
encode_DF(sign,1,bit(DF_mant_len)) // (-1)^s erzeugen
#else
var uint32 manthi;
var uint32 mantlo;
- DF_decode2(x, { return cl_decoded_dfloat(cl_DF_0, 0, cl_DF_1); },
+ DF_decode2(x, { return decoded_dfloat(cl_DF_0, 0, cl_DF_1); },
sign=,exp=,manthi=,mantlo=
);
- return cl_decoded_dfloat(
+ return decoded_dfloat(
encode_DF(0,0,manthi,mantlo), // (-1)^0 * 2^0 * m erzeugen
L_to_FN(exp), // e als Fixnum
encode_DF(sign,1,bit(DF_mant_len-32),0) // (-1)^s erzeugen
);
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF.h"
+namespace cln {
+
MAYBE_INLINE
uintL float_digits (const cl_DF& x)
{
unused x;
return DF_mant_len+1; // 53
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_N.h"
#include "cl_DF.h"
+namespace cln {
+
MAYBE_INLINE
-uint32 cl_equal_hashcode (const cl_DF& x)
+uint32 equal_hashcode (const cl_DF& x)
{
var cl_signean sign;
var sintL exp;
#endif
return equal_hashcode_low(msd,exp,sign);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF.h"
+namespace cln {
+
MAYBE_INLINE
sintL float_exponent (const cl_DF& x)
{
if (uexp==0) { return 0; }
return (sintL)(uexp - DF_exp_mid);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF.h"
#include "cl_I.h"
+namespace cln {
+
MAYBE_INLINE
const cl_idecoded_float integer_decode_float (const cl_DF& x)
{
);
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
+namespace cln {
+
const cl_DF max (const cl_DF& x, const cl_DF& y)
{
return (x >= y ? x : y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
+namespace cln {
+
const cl_DF min (const cl_DF& x, const cl_DF& y)
{
return (x <= y ? x : y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_DF_zerop.cc"
+namespace cln {
+
MAYBE_INLINE2
uintL float_precision (const cl_DF& x)
{
if (zerop(x)) return 0;
return DF_mant_len+1; // 53
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_DF_minusp.cc"
+namespace cln {
+
MAYBE_INLINE2
const cl_DF float_sign (const cl_DF& x)
{
// Methode: x>=0 -> Ergebnis 1.0; x<0 -> Ergebnis -1.0
return (!minusp(x) ? cl_DF_1 : cl_DF_minus1);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#include "cl_DF_minusp.cc"
#include "cl_DF_zerop.cc"
+namespace cln {
+
MAYBE_INLINE2
const cl_DF signum (const cl_DF& x)
{
elif (zerop(x)) { return cl_DF_0; } // x=0 -> 0.0
else { return cl_DF_1; } // x>0 -> +1.0
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
+
+namespace cln {
const cl_I ceiling1 (const cl_F& x)
GEN_F_OP1(x, ceiling1, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_SF.h"
#include "cl_FF.h"
#include "cl_DF.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F_div_t ceiling2 (const cl_F& x)
{
floatcase(x
, var cl_LF q = fceiling(x); return cl_F_div_t(cl_LF_to_I(q),LF_LF_minus_LF(x,q));
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
+namespace cln {
+
const cl_F_div_t ceiling2 (const cl_F& x, const cl_F& y)
{
// Methode:
var cl_F& r = q_r.remainder;
return cl_F_div_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
+
+namespace cln {
const cl_F fceiling (const cl_F& x)
GEN_F_OP1(x, fceiling, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F_fdiv_t fceiling2 (const cl_F& x)
{
#if 0 // 3 type dispatches
);
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
+
+namespace cln {
const cl_F ffloor (const cl_F& x)
GEN_F_OP1(x, ffloor, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F_fdiv_t ffloor2 (const cl_F& x)
{
#if 0 // 3 type dispatches
);
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
+
+namespace cln {
const cl_I floor1 (const cl_F& x)
GEN_F_OP1(x, floor1, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_SF.h"
#include "cl_FF.h"
#include "cl_DF.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F_div_t floor2 (const cl_F& x)
{
floatcase(x
, var cl_LF q = ffloor(x); return cl_F_div_t(cl_LF_to_I(q),LF_LF_minus_LF(x,q));
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
+namespace cln {
+
const cl_F_div_t floor2 (const cl_F& x, const cl_F& y)
{
// Methode:
var cl_F& r = q_r.remainder;
return cl_F_div_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
+
+namespace cln {
const cl_F fround (const cl_F& x)
GEN_F_OP1(x, fround, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F_fdiv_t fround2 (const cl_F& x)
{
#if 0 // 3 type dispatches
);
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
+
+namespace cln {
const cl_F ftruncate (const cl_F& x)
GEN_F_OP1(x, ftruncate, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F_fdiv_t ftruncate2 (const cl_F& x)
{
#if 0 // 3 type dispatches
);
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
+
+namespace cln {
const cl_I round1 (const cl_F& x)
GEN_F_OP1(x, round1, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_SF.h"
#include "cl_FF.h"
#include "cl_DF.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F_div_t round2 (const cl_F& x)
{
floatcase(x
, var cl_LF q = fround(x); return cl_F_div_t(cl_LF_to_I(q),LF_LF_minus_LF(x,q));
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
+namespace cln {
+
const cl_F_div_t round2 (const cl_F& x, const cl_F& y)
{
// Methode:
var cl_F& r = q_r.remainder;
return cl_F_div_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
+
+namespace cln {
const cl_I truncate1 (const cl_F& x)
GEN_F_OP1(x, truncate1, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_SF.h"
#include "cl_FF.h"
#include "cl_DF.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F_div_t truncate2 (const cl_F& x)
{
floatcase(x
, var cl_LF q = ftruncate(x); return cl_F_div_t(cl_LF_to_I(q),LF_LF_minus_LF(x,q));
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
+namespace cln {
+
const cl_F_div_t truncate2 (const cl_F& x, const cl_F& y)
{
// Methode:
var cl_F& r = q_r.remainder;
return cl_F_div_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_F.h"
#include "cl_SF.h"
#include "cl_FF.h"
#include "cl_DF.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F operator/ (const cl_F& x, const cl_I& y)
{
floatcase(x
, /* LF */ return cl_LF_I_div(x,y);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_I.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_F.h"
#include "cl_SF.h"
#include "cl_FF.h"
#include "cl_DF.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_R cl_F_I_mul (const cl_F& x, const cl_I& y)
{
if (eq(y,0)) { return 0; } // x * 0 = exakte 0
, /* LF */ return cl_LF_I_mul(x,y);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_F.h"
#include "cl_SF.h"
#include "cl_FF.h"
#include "cl_DF.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F operator/ (const cl_F& x, const cl_RA& y)
{
floatcase(x
return cl_LF_RA_div(x,y);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_F.h"
#include "cl_SF.h"
#include "cl_FF.h"
#include "cl_DF.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_R cl_F_RA_mul (const cl_F& x, const cl_RA& y)
{
if (eq(y,0)) { return 0; } // x * 0 = exakte 0
, /* LF */ return cl_LF_RA_mul(x,y);
);
}
+
+} // namespace cln
-// cl_compare().
+// compare().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
-cl_signean cl_compare (const cl_F& x, const cl_F& y)
-GEN_F_OP2(x,y, cl_compare, 0, 1, return)
+namespace cln {
+
+cl_signean compare (const cl_F& x, const cl_F& y)
+GEN_F_OP2(x,y, compare, 0, 1, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
+namespace cln {
+
ALL_cl_LF_OPERATIONS_SAME_PRECISION()
const cl_F operator/ (const cl_F& x, const cl_F& y)
#define div(a,b) a/b
GEN_F_OP2(x,y, div, 1, 1, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
+namespace cln {
+
ALL_cl_LF_OPERATIONS_SAME_PRECISION()
const cl_F operator- (const cl_F& x, const cl_F& y)
#define minus(a,b) a-b
GEN_F_OP2(x,y, minus, 1, 0, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_DF_minusp.cc"
#include "cl_LF_minusp.cc"
+namespace cln {
+
cl_boolean minusp (const cl_F& x)
{
floatcase(x
, return minusp(x);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
+namespace cln {
+
ALL_cl_LF_OPERATIONS_SAME_PRECISION()
const cl_F operator* (const cl_F& x, const cl_F& y)
#define mul(a,b) a*b
GEN_F_OP2(x,y, mul, 1, 1, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
+namespace cln {
+
ALL_cl_LF_OPERATIONS_SAME_PRECISION()
const cl_F operator+ (const cl_F& x, const cl_F& y)
#define plus(a,b) a+b
GEN_F_OP2(x,y, plus, 1, 0, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_DF_plusp.cc"
#include "cl_LF_plusp.cc"
+namespace cln {
+
cl_boolean plusp (const cl_F& x)
{
floatcase(x
, return plusp(x);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
+
+namespace cln {
const cl_F recip (const cl_F& x)
GEN_F_OP1(x, recip, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_F.h"
+namespace cln {
+
const cl_F scale_float (const cl_F& x, sintL delta)
{
floatcase(x
, return scale_float(x,delta);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_F.h"
+namespace cln {
+
const cl_F scale_float (const cl_F& x, const cl_I& delta)
{
floatcase(x
, return scale_float(x,delta);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
+
+namespace cln {
const cl_F square (const cl_F& x)
GEN_F_OP1(x, square, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
+
+namespace cln {
const cl_F operator- (const cl_F& x)
#define minus(a) -a
GEN_F_OP1(x, minus, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_DF_zerop.cc"
#include "cl_LF_zerop.cc"
+namespace cln {
+
cl_boolean zerop (const cl_F& x)
{
floatcase(x
, return zerop(x);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_F.h"
#include "cl_SF.h"
#include "cl_FF.h"
#include "cl_DF.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_R operator/ (const cl_I& x, const cl_F& y)
{
if (eq(x,0)) { return 0; }
, /* LF */ return cl_I_to_LF(x,LFlen0(y)) / y; // cf. cl_I_LF_div
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_F.h"
#include "cl_SF.h"
#include "cl_FF.h"
#include "cl_DF.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_R operator/ (const cl_RA& x, const cl_F& y)
{
if (eq(x,0)) { return 0; }
return cl_RA_LF_div(x,y);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_F.h"
#include "cl_low.h"
+namespace cln {
+
const cl_FF sqrt (const cl_FF& x)
{
// Methode:
}
return encode_FF(0,exp,mant);
}
+
+} // namespace cln
#ifndef _CL_FF_H
#define _CL_FF_H
-#include "cl_number.h"
-#include "cl_malloc.h"
+#include "cln/number.h"
+#include "cln/malloc.h"
#include "cl_low.h"
#include "cl_F.h"
+#ifdef FAST_FLOAT
+#include "cl_N.h"
+#include "cl_F.h"
+#endif
+
+namespace cln {
+
typedef uint32 ffloat; // 32-bit float in IEEE format
union ffloatjanus {
#else
inline cl_heap_ffloat* allocate_ffloat (ffloat eksplicit)
{
- cl_heap_ffloat* p = (cl_heap_ffloat*) cl_malloc_hook(sizeof(cl_heap_ffloat));
+ cl_heap_ffloat* p = (cl_heap_ffloat*) malloc_hook(sizeof(cl_heap_ffloat));
p->refcount = 1;
p->type = &cl_class_ffloat;
p->representation.eksplicit = eksplicit;
// maybe_underflow: Ergebnis sehr klein und /=0, liefert IEEE-Null
// maybe_divide_0: Ergebnis unbestimmt, liefert IEEE-Infinity
// maybe_nan: Ergebnis unbestimmt, liefert IEEE-NaN
- #include "cl_N.h"
- #include "cl_F.h"
#define float_to_FF(expr,ergebnis_zuweisung,maybe_overflow,maybe_subnormal,maybe_underflow,maybe_divide_0,maybe_nan) \
{ var ffloatjanus _erg; _erg.machine_float = (expr); \
if ((_erg.eksplicit & ((uint32)bit(FF_exp_len+FF_mant_len)-bit(FF_mant_len))) == 0) /* e=0 ? */\
// wandelt ein Single-Float obj in ein IEEE-Single-Float val um.
extern void cl_FF_to_float (const cl_FF& obj, ffloatjanus* val_);
+} // namespace cln
+
#endif /* _CL_FF_H */
// Specification.
#include "cl_FF.h"
+namespace cln {
// Implementation.
#endif
}
}
+
+} // namespace cln
// Specification.
#include "cl_FF.h"
+namespace cln {
// Implementation.
}
val_->eksplicit = val;
}
+
+} // namespace cln
-// cl_float_approx().
+// float_approx().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_DS.h"
#include "cl_F.h"
-float cl_float_approx (const cl_I& x)
+namespace cln {
+
+float float_approx (const cl_I& x)
{
// Method: same as cl_I_to_FF().
if (eq(x,0)) { return 0.0; }
{ u.eksplicit = make_FF_word(sign,(sintL)exp+FF_exp_mid,mant); }
return u.machine_float;
}
+
+} // namespace cln
-// cl_float_approx().
+// float_approx().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_FF.h"
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_F.h"
-float cl_float_approx (const cl_RA& x)
+namespace cln {
+
+float float_approx (const cl_RA& x)
{
// Method: same as cl_RA_to_FF().
if (integerp(x)) {
DeclareType(cl_I,x);
- return cl_float_approx(x);
+ return float_approx(x);
}
{ // x Ratio
DeclareType(cl_RT,x);
{ u.eksplicit = make_FF_word(sign,lendiff+FF_exp_mid,mant); }
return u.machine_float;
}}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF.h"
+namespace cln {
+
const cl_FF_div_t ceiling2 (const cl_FF& x, const cl_FF& y)
{
// Methode:
var cl_FF& r = q_r.remainder;
return cl_FF_div_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_FF_minusp.cc"
+namespace cln {
+
const cl_FF fceiling (const cl_FF& x)
{
if (minusp(x))
else
return futruncate(x);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF.h"
+namespace cln {
+
const cl_FF_div_t floor2 (const cl_FF& x, const cl_FF& y)
{
// Methode:
var cl_FF& r = q_r.remainder;
return cl_FF_div_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF.h"
+namespace cln {
+
const cl_FF recip (const cl_FF& x)
{
return cl_FF_1 / x;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF.h"
+namespace cln {
+
const cl_FF_div_t round2 (const cl_FF& x, const cl_FF& y)
{
// Methode:
var cl_FF& r = q_r.remainder;
return cl_FF_div_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF.h"
+namespace cln {
+
const cl_FF_div_t truncate2 (const cl_FF& x, const cl_FF& y)
{
// Methode:
var cl_FF& r = q_r.remainder;
return cl_FF_div_t(q,y*r);
}
+
+} // namespace cln
-// cl_compare().
+// compare().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF.h"
-cl_signean cl_compare (const cl_FF& x, const cl_FF& y)
+namespace cln {
+
+cl_signean compare (const cl_FF& x, const cl_FF& y)
{
// Methode:
// x und y haben verschiedenes Vorzeichen ->
}
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_F.h"
#include "cl_low.h"
#include "cl_ieee.h"
-NEED_IEEE_FLOATS()
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
#include "cl_FF_zerop.cc"
+namespace cln {
+
+NEED_IEEE_FLOATS()
+
const cl_FF operator/ (const cl_FF& x1, const cl_FF& x2)
{
// Methode:
return encode_FF(sign1,exp1,mant);
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_FF_minusp.cc"
+namespace cln {
+
const cl_FF ffloor (const cl_FF& x)
{
if (minusp(x))
else
return ftruncate(x);
}
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_DS.h"
#include "cl_F.h"
+namespace cln {
+
const cl_FF cl_I_to_FF (const cl_I& x)
{
// Methode:
#endif
return encode_FF(sign,(sintL)exp,mant);
}
+
+} // namespace cln
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_F.h"
+namespace cln {
+
const cl_FF cl_RA_to_FF (const cl_RA& x)
{
// Methode:
// Fertig.
return encode_FF(sign,lendiff,mant);
}}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF.h"
+namespace cln {
+
const cl_FF fround (const cl_FF& x)
{
// Methode:
} }
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF.h"
+namespace cln {
+
const cl_FF ftruncate (const cl_FF& x)
{
// Methode:
);
} }
}
+
+} // namespace cln
// Implementation.
+namespace cln {
+
const cl_FF futruncate (const cl_FF& x)
{
// Methode:
);
} }
}
+
+} // namespace cln
// Implementation.
+namespace cln {
+
#if !defined(CL_WIDE_POINTERS)
const cl_FF cl_FF_0 = allocate_ffloat(0); // 0.0f0
#endif
+} // namespace cln
+
CL_PROVIDE_END(cl_FF_globals)
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF.h"
#include "cl_ieee.h"
+
+namespace cln {
+
NEED_IEEE_FLOATS()
const cl_FF operator- (const cl_FF& x1, const cl_FF& x2)
{ return x1 + allocate_ffloat(x2_ ^ bit(31)); }
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF.h"
+namespace cln {
+
MAYBE_INLINE
cl_boolean minusp (const cl_FF& x)
{
return (cl_boolean) ((sint32)cl_ffloat_value(x) < 0);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_F.h"
#include "cl_low.h"
#include "cl_ieee.h"
-NEED_IEEE_FLOATS()
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
#include "cl_FF_zerop.cc"
+namespace cln {
+
+NEED_IEEE_FLOATS()
+
const cl_FF operator* (const cl_FF& x1, const cl_FF& x2)
{
// Methode:
return encode_FF(sign1,exp1,manthi);
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF.h"
#include "cl_F.h"
#include "cl_ieee.h"
-NEED_IEEE_FLOATS()
#include "cl_xmacros.h"
+namespace cln {
+
+NEED_IEEE_FLOATS()
+
const cl_FF operator+ (const cl_FF& x1, const cl_FF& x2)
{
// Methode (nach [Knuth, II, Seminumerical Algorithms, Abschnitt 4.2.1., S.200]):
return encode_FF(sign1,exp1,mant1);
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF_minusp.cc"
#include "cl_FF_zerop.cc"
+namespace cln {
+
MAYBE_INLINE2
cl_boolean plusp (const cl_FF& x)
{
else
return cl_true; // sonst ist x>0.
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF.h"
#include "cl_F.h"
+namespace cln {
+
const cl_FF scale_float (const cl_FF& x, sintL delta)
{
// Methode:
{ return cl_FF_0; }
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_F.h"
#include "cl_I.h"
+namespace cln {
+
const cl_FF scale_float (const cl_FF& x, const cl_I& delta)
{
// Methode:
{ return cl_FF_0; }
}
}
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
+namespace cln {
+
const cl_I cl_FF_to_I (const cl_FF& x)
{
// Methode:
,exp
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF.h"
+namespace cln {
+
const cl_FF operator- (const cl_FF& x)
{
// Methode:
else
return allocate_ffloat( x_ ^ bit(31) );
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF.h"
+namespace cln {
+
MAYBE_INLINE
cl_boolean zerop (const cl_FF& x)
{
return (cl_boolean) (cl_ffloat_value(x) == 0);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat_class.h"
+#include "cln/ffloat_class.h"
// Implementation.
-#include "cl_ffloat.h"
-#include "cl_input.h"
-#include "cl_float_io.h"
+#include "cln/ffloat.h"
+#include "cln/input.h"
+#include "cln/float_io.h"
+
+namespace cln {
cl_read_flags cl_FF_read_flags = {
syntax_ffloat,
lsyntax_all,
10,
- { cl_float_format_ffloat, cl_float_format_lfloat_min, cl_false }
+ { float_format_ffloat, float_format_lfloat_min, cl_false }
};
cl_FF::cl_FF (const char * string)
pointer = as_cl_private_thing(
As(cl_FF)(read_float(cl_FF_read_flags,string,NULL,NULL)));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_FF_minusp.cc"
+namespace cln {
+
const cl_FF abs (const cl_FF& x)
{
// x<0 -> (- x), x>=0 -> x
if (minusp(x)) return -x; else return x;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_N.h"
+namespace cln {
+
inline cl_boolean cl_FF_p (const cl_number& x)
{
#if defined(CL_WIDE_POINTERS)
} else
cl_as_error(x,"a single-float number",filename,line);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
+namespace cln {
+
cl_class cl_class_ffloat = {
#ifdef CL_WIDE_POINTERS
NULL, // destructor not used, since not heap objects
cl_immediate_classes[cl_FF_tag] = &cl_class_ffloat;
}
#endif
+
+} // namespace cln
// Implementation.
-#include "cl_ffloat.h"
-#include "cl_io.h"
-#include "cl_float_io.h"
+#include "cln/ffloat.h"
+#include "cln/io.h"
+#include "cln/float_io.h"
+
+namespace cln {
static void dprint (cl_heap* pointer)
{
AT_INITIALIZATION(dprint_FF)
{ cl_register_type_printer(cl_class_ffloat,dprint); }
-// This dummy links in this module when <cl_ffloat.h> requires it.
+// This dummy links in this module when <cln/ffloat.h> requires it.
int cl_FF_debug_module;
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF.h"
#include "cl_I.h"
-const cl_decoded_ffloat decode_float (const cl_FF& x)
+namespace cln {
+
+const decoded_ffloat decode_float (const cl_FF& x)
{
// x entpacken:
var cl_signean sign;
var sintL exp;
var uint32 mant;
- FF_decode(x, { return cl_decoded_ffloat(cl_FF_0, 0, cl_FF_1); },
+ FF_decode(x, { return decoded_ffloat(cl_FF_0, 0, cl_FF_1); },
sign=,exp=,mant=
);
- return cl_decoded_ffloat(
+ return decoded_ffloat(
encode_FF(0,0,mant), // (-1)^0 * 2^0 * m erzeugen
L_to_FN(exp), // e als Fixnum
encode_FF(sign,1,bit(FF_mant_len)) // (-1)^s erzeugen
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF.h"
+namespace cln {
+
MAYBE_INLINE
uintL float_digits (const cl_FF& x)
{
unused x;
return FF_mant_len+1; // 24
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_N.h"
#include "cl_FF.h"
+namespace cln {
+
MAYBE_INLINE
-uint32 cl_equal_hashcode (const cl_FF& x)
+uint32 equal_hashcode (const cl_FF& x)
{
var cl_signean sign;
var sintL exp;
var uint32 msd = mant << (32-(FF_mant_len+1));
return equal_hashcode_low(msd,exp,sign);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF.h"
+namespace cln {
+
MAYBE_INLINE
sintL float_exponent (const cl_FF& x)
{
if (uexp==0) { return 0; }
return (sintL)(uexp - FF_exp_mid);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_F.h"
#include "dfloat/cl_DF.h"
+namespace cln {
+
MAYBE_INLINE
const cl_idecoded_float integer_decode_float (const cl_FF& x)
{
);
}
+} // namespace cln
+
#else
+namespace cln {
+
MAYBE_INLINE
const cl_idecoded_float integer_decode_float (const cl_FF& x)
{
);
}
+} // namespace cln
+
#endif
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
+namespace cln {
+
const cl_FF max (const cl_FF& x, const cl_FF& y)
{
return (x >= y ? x : y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
+namespace cln {
+
const cl_FF min (const cl_FF& x, const cl_FF& y)
{
return (x <= y ? x : y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_FF_zerop.cc"
+namespace cln {
+
MAYBE_INLINE2
uintL float_precision (const cl_FF& x)
{
if (zerop(x)) return 0;
return FF_mant_len+1; // 24
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_FF_minusp.cc"
+namespace cln {
+
MAYBE_INLINE2
const cl_FF float_sign (const cl_FF& x)
{
// Methode: x>=0 -> Ergebnis 1.0; x<0 -> Ergebnis -1.0
return (!minusp(x) ? cl_FF_1 : cl_FF_minus1);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
// Implementation.
#include "cl_FF_minusp.cc"
#include "cl_FF_zerop.cc"
+namespace cln {
+
MAYBE_INLINE2
const cl_FF signum (const cl_FF& x)
{
elif (zerop(x)) { return cl_FF_0; } // x=0 -> 0.0
else { return cl_FF_1; } // x>0 -> +1.0
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float_class.h"
+#include "cln/float_class.h"
// Implementation.
-#include "cl_float.h"
-#include "cl_input.h"
-#include "cl_float_io.h"
+#include "cln/float.h"
+#include "cln/input.h"
+#include "cln/float_io.h"
+
+namespace cln {
cl_read_flags cl_F_read_flags = {
syntax_float,
lsyntax_all,
10,
- { cl_float_format_ffloat, cl_float_format_lfloat_min, cl_true }
+ { float_format_ffloat, float_format_lfloat_min, cl_true }
};
cl_F::cl_F (const char * string)
pointer = as_cl_private_thing(
read_float(cl_F_read_flags,string,NULL,NULL));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float_io.h"
+#include "cln/float_io.h"
// Implementation.
#include <string.h>
-#include "cl_input.h"
-#include "cl_integer.h"
+#include "cln/input.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_F.h"
#undef floor
-#include <math.h>
+#include <cmath>
#define floor cln_floor
+namespace cln {
+
// Step forward over all digits, to the end of string or to the next non-digit.
static const char * skip_digits (const char * ptr, const char * string_limit, unsigned int base)
{
ASSERT((flags.syntax & ~(syntax_float|syntax_maybe_bad)) == 0);
// If no string_limit is given, it defaults to the end of the string.
if (!string_limit)
- string_limit = string + strlen(string);
+ string_limit = string + ::strlen(string);
if (flags.syntax & syntax_float) {
// Check for floating-point number syntax:
// {'+'|'-'|} {digit}+ {'.' {digit}* | } expo {'+'|'-'|} {digit}+
}
ptr = ptr_after_exponent;
var const char * ptr_after_prec = ptr;
- var cl_float_format_t prec;
+ var float_format_t prec;
if ((ptr != string_limit) && (*ptr == '_')) {
ptr++;
ptr_after_prec = skip_digits(ptr,string_limit,10);
if (ptr_after_prec == ptr) goto not_float_syntax;
var cl_I prec1 = digits_to_I(ptr,ptr_after_prec-ptr,10);
var uintL prec2 = cl_I_to_UL(prec1);
- prec = (float_base==10 ? cl_float_format(prec2)
- : (cl_float_format_t)((uintL)((1+prec2)*log((double)float_base)*1.442695041)+1)
+ prec = (float_base==10 ? float_format(prec2)
+ : (float_format_t)((uintL)((1+prec2)*::log((double)float_base)*1.442695041)+1)
);
} else {
switch (exponent_marker) {
- case 'S': prec = cl_float_format_sfloat; break;
- case 'F': prec = cl_float_format_ffloat; break;
- case 'D': prec = cl_float_format_dfloat; break;
+ case 'S': prec = float_format_sfloat; break;
+ case 'F': prec = float_format_ffloat; break;
+ case 'D': prec = float_format_dfloat; break;
case 'L': prec = flags.float_flags.default_lfloat_format; break;
case 'E': prec = flags.float_flags.default_float_format; break;
default: NOTREACHED
var uintL num_significant_digits =
(ptr_after_fracpart - ptr) - (ptr_before_fracpart > ptr ? 1 : 0);
var uintL prec2 = (num_significant_digits>=2 ? num_significant_digits-2 : 0);
- var cl_float_format_t precx =
- (float_base==10 ? cl_float_format(prec2)
- : (cl_float_format_t)((uintL)((1+prec2)*log((double)float_base)*1.442695041)+1)
+ var float_format_t precx =
+ (float_base==10 ? float_format(prec2)
+ : (float_format_t)((uintL)((1+prec2)*::log((double)float_base)*1.442695041)+1)
);
if ((uintL)precx > (uintL)prec)
prec = precx;
}
read_number_bad_syntax(string,string_limit);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float_io.h"
+#include "cln/float_io.h"
// Implementation.
-#include "cl_input.h"
-#include "cl_io.h"
+#include "cln/input.h"
+#include "cln/io.h"
#include "cl_spushstring.h"
+namespace cln {
+
// We read an entire token (or even more, if it begins with #C) into a
// buffer and then call read_float() on the buffer.
// Handle premature EOF.
eof: read_number_eof();
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float_io.h"
+#include "cln/float_io.h"
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
-#include "cl_rational.h"
+#include "cln/rational.h"
#include "cl_RA.h"
-#include "cl_float.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/float.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_F.h"
#include "cl_SF.h"
#include "cl_FF.h"
#include "cl_DF.h"
#include "cl_LF.h"
-const cl_F read_float (unsigned int base, cl_float_format_t prec, cl_signean sign, const char * string, uintL index1, uintL index4, uintL index2, uintL index3)
+namespace cln {
+
+const cl_F read_float (unsigned int base, float_format_t prec, cl_signean sign, const char * string, uintL index1, uintL index4, uintL index2, uintL index3)
{
var cl_I exponent;
{
}
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF_impl.h"
#include "cl_F.h"
#include "cl_DS.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
+
+namespace cln {
const cl_LF sqrt (const cl_LF& x)
{
}
// Bit complexity (N := length(x)): O(M(N)).
+} // namespace cln
#ifndef _CL_LF_H
#define _CL_LF_H
-#include "cl_number.h"
-#include "cl_lfloat_class.h"
-#include "cl_integer_class.h"
+#include "cln/number.h"
+#include "cln/lfloat_class.h"
+#include "cln/integer_class.h"
+
+namespace cln {
struct cl_heap_lfloat : cl_heap {
unsigned int len; // length of mantissa (in digits)
// 1 ulp(x) < y. y must be >0.
extern const cl_LF cl_LF_shortenwith (const cl_LF& x, const cl_LF& y);
+} // namespace cln
+
#endif /* _CL_LF_H */
#ifndef _CL_LF_IMPL_H
#define _CL_LF_IMPL_H
-#include "cl_number.h"
+#include "cln/number.h"
#include "cl_LF.h"
-#include "cl_malloc.h"
+#include "cln/malloc.h"
#include "cl_offsetof.h"
#include "cl_DS.h"
+namespace cln {
+
extern cl_class cl_class_lfloat;
// Builds a long-float, without filling the mantissa.
// The long-float is only complete when the mantissa has been filled in!
inline cl_heap_lfloat* allocate_lfloat (uintC len, uint32 expo, cl_signean sign)
{
- cl_heap_lfloat* p = (cl_heap_lfloat*) cl_malloc_hook(offsetofa(cl_heap_lfloat,data)+sizeof(uintD)*len);
+ cl_heap_lfloat* p = (cl_heap_lfloat*) malloc_hook(offsetofa(cl_heap_lfloat,data)+sizeof(uintD)*len);
p->refcount = 1;
p->type = &cl_class_lfloat;
p->len = len;
#define encode_LF_array(sign,exp,mantarr,mantlen) \
encode_LF(sign,exp,arrayMSDptr(mantarr,mantlen),mantlen)
+} // namespace cln
+
#endif /* _CL_LF_IMPL_H */
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF.h"
+namespace cln {
+
const cl_LF_div_t ceiling2 (const cl_LF& x, const cl_LF& y)
{
// Methode:
var cl_LF& r = q_r.remainder;
return cl_LF_div_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_LF_minusp.cc"
+namespace cln {
+
const cl_LF fceiling (const cl_LF& x)
{
if (minusp(x))
else
return futruncate(x);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF.h"
+namespace cln {
+
const cl_LF_div_t floor2 (const cl_LF& x, const cl_LF& y)
{
// Methode:
var cl_LF& r = q_r.remainder;
return cl_LF_div_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF.h"
#include "cl_LF_impl.h"
+namespace cln {
+
ALL_cl_LF_OPERATIONS_SAME_PRECISION()
const cl_LF recip (const cl_LF& x)
{
return encode_LF1(TheLfloat(x)->len) / x;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF.h"
+namespace cln {
+
const cl_LF_div_t round2 (const cl_LF& x, const cl_LF& y)
{
// Methode:
var cl_LF& r = q_r.remainder;
return cl_LF_div_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF.h"
+namespace cln {
+
const cl_LF_div_t truncate2 (const cl_LF& x, const cl_LF& y)
{
// Methode:
var cl_LF& r = q_r.remainder;
return cl_LF_div_t(q,y*r);
}
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF_impl.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_DS.h"
#include "cl_F.h"
#include "cl_N.h"
+namespace cln {
+
const cl_R cl_I_LF_div (const cl_I& x, const cl_LF& y)
{
// Method:
return cl_I_to_LF(x,len) / y;
}
// Bit complexity (N = max(length(x),length(y))): O(M(N)).
+
+} // namespace cln
#include "cl_LF_impl.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_LF LF_LF_minus_LF (const cl_LF& x1, const cl_LF& x2)
{
// Methode:
return LF_LF_plus_LF(x1,mx2);
}
}
+
+} // namespace cln
#include "cl_F.h"
#include "cl_xmacros.h"
+namespace cln {
+
const cl_LF LF_LF_plus_LF (const cl_LF& arg1, const cl_LF& arg2)
{
// Methode (nach [Knuth, II, Seminumerical Algorithms, Abschnitt 4.2.1., S.200]):
// y fertig.
return y;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF.h"
+namespace cln {
+
const cl_LF operator- (const cl_LF& x1, const cl_LF& x2)
{ GEN_LF_OP2(x1,x2,LF_LF_minus_LF,return) }
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF.h"
+namespace cln {
+
const cl_LF operator+ (const cl_LF& x1, const cl_LF& x2)
{ GEN_LF_OP2(x1,x2,LF_LF_plus_LF,return) }
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF_impl.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_DS.h"
#include "cl_F.h"
#include "cl_N.h"
+namespace cln {
+
const cl_LF cl_LF_I_div (const cl_LF& x, const cl_I& y)
{
// Method:
}
// Bit complexity (N := max(length(x),length(y))): O(M(N)).
+} // namespace cln
// Implementation.
#include "cl_LF_impl.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_DS.h"
#include "cl_F.h"
+namespace cln {
+
const cl_R cl_LF_I_mul (const cl_LF& x, const cl_I& y)
{
// Method:
}
// Bit complexity (N = max(length(x),length(y))): O(M(N)).
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_rational.h"
+#include "cln/lfloat.h"
+#include "cln/rational.h"
#include "cl_RA.h"
+namespace cln {
+
const cl_LF cl_LF_RA_div (const cl_LF& x, const cl_RA& y)
{
// Method:
return cl_LF_I_div(The(cl_LF)(cl_LF_I_mul(x,v)),u);
}
}
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_RA.h"
+namespace cln {
+
const cl_R cl_LF_RA_mul (const cl_LF& x, const cl_RA& y)
{
// Method:
// We see that the first approach is always better than the second, except if
// den_length = x_length && x_length <= num_length <= 2*x_length
// when both are equally fast.
+
+} // namespace cln
-// cl_compare().
+// compare().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_LF_minusp.cc"
-cl_signean cl_compare (const cl_LF& x, const cl_LF& y)
+namespace cln {
+
+cl_signean compare (const cl_LF& x, const cl_LF& y)
{
// Methode:
// x und y haben verschiedenes Vorzeichen ->
} }
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_F.h"
#include "cl_N.h"
-// Workaround gcc-2.7.0 bug on i386.
-#if defined(__GNUC__)
- #if (__GNUC__ == 2)
- #if (__GNUC_MINOR__ == 7)
- #define workaround_gcc_bug() *&uexp1 = *&uexp1;
- #endif
- #endif
-#endif
-#ifndef workaround_gcc_bug
- #define workaround_gcc_bug()
-#endif
+namespace cln {
const cl_LF operator/ (const cl_LF& x1, const cl_LF& x2)
{
// (uexp1-LF_exp_mid) - (uexp2-LF_exp_mid) = (uexp1-uexp2+LF_exp_mid)-LF_exp_mid
if (uexp1 >= uexp2)
{ uexp1 = uexp1 - uexp2; // kein Carry
- workaround_gcc_bug();
if (uexp1 > LF_exp_high-LF_exp_mid) { cl_error_floating_point_overflow(); }
uexp1 = uexp1 + LF_exp_mid;
}
else
{ uexp1 = uexp1 - uexp2; // Carry
- workaround_gcc_bug();
if (uexp1 < (uintL)(LF_exp_low-1-LF_exp_mid))
{ if (underflow_allowed())
{ cl_error_floating_point_underflow(); }
}
// Bit complexity (N := max(length(x1),length(x2))): O(M(N)).
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_LF_minusp.cc"
+namespace cln {
+
const cl_LF ffloor (const cl_LF& x)
{
if (minusp(x))
else
return ftruncate(x);
}
+
+} // namespace cln
// Implementation.
#include "cl_LF_impl.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_DS.h"
#include "cl_F.h"
+namespace cln {
+
const cl_LF cl_I_to_LF (const cl_I& x, uintC len)
{
// Methode:
}
return y;
}
+
+} // namespace cln
#include "cl_LF_impl.h"
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_F.h"
+namespace cln {
+
const cl_LF cl_RA_to_LF (const cl_RA& x, uintC len)
{
// Methode:
// num_length < 2*len && den_length < len
// whereas cl_I_to_LF(numerator,len)/cl_I_to_LF(denominator,len) is faster if
// num_length > 2*len || den_length > len
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF_impl.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_LF fround (const cl_LF& x)
{
// Methode:
}
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF_impl.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_LF ftruncate (const cl_LF& x)
{
// Methode:
return y;
#endif
}
+
+} // namespace cln
#include "cl_LF_impl.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_LF futruncate (const cl_LF& x)
{
// Methode:
return y;
#endif
}
+
+} // namespace cln
CL_PROVIDE(cl_LF_globals)
// Specification.
-#include "cl_number.h"
+#include "cln/number.h"
// Implementation.
#include "cl_LF.h"
#include "cl_LF_impl.h"
+namespace cln {
+
// Only needed for the default constructor of cl_LF.
const cl_LF cl_LF_0 = encode_LF0(LF_minlen); // 0.0L0
+} // namespace cln
+
CL_PROVIDE_END(cl_LF_globals)
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF.h"
+namespace cln {
+
ALL_cl_LF_OPERATIONS_SAME_PRECISION()
const cl_LF minus1 (const cl_LF& x)
{
return x + cl_I_to_LF(cl_I(-1),TheLfloat(x)->len);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF.h"
+namespace cln {
+
MAYBE_INLINE
cl_boolean minusp (const cl_LF& x)
{
return (cl_boolean) (- TheLfloat(x)->sign);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_DS.h"
#include "cl_F.h"
+namespace cln {
+
const cl_LF operator* (const cl_LF& x1, const cl_LF& x2)
{
// Methode:
}
// Bit complexity (N = max(length(x1),length(x2))): O(M(N)).
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF.h"
+namespace cln {
+
ALL_cl_LF_OPERATIONS_SAME_PRECISION()
const cl_LF plus1 (const cl_LF& x)
{
return x + cl_I_to_LF(cl_I(1),TheLfloat(x)->len);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF_minusp.cc"
#include "cl_LF_zerop.cc"
+namespace cln {
+
MAYBE_INLINE2
cl_boolean plusp (const cl_LF& x)
{
else
return cl_true; // sonst ist x>0.
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF_impl.h"
#include "cl_F.h"
+namespace cln {
+
const cl_LF scale_float (const cl_LF& x, sintL delta)
{
// Methode:
var uintC len = TheLfloat(x)->len;
return encode_LFu(TheLfloat(x)->sign,uexp,arrayMSDptr(TheLfloat(x)->data,len),len);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_F.h"
#include "cl_I.h"
+namespace cln {
+
const cl_LF scale_float (const cl_LF& x, const cl_I& delta)
{
// Methode:
var uintC len = TheLfloat(x)->len;
return encode_LFu(TheLfloat(x)->sign,uexp,arrayMSDptr(TheLfloat(x)->data,len),len);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_DS.h"
#include "cl_F.h"
+namespace cln {
+
const cl_LF square (const cl_LF& x)
{
// Methode: wie operator*(x,x).
}
// Bit complexity (N = length(x)): O(M(N)).
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_DS.h"
#define MAYBE_INLINE inline
#include "cl_LF_minusp.cc"
+namespace cln {
+
const cl_I cl_LF_to_I (const cl_LF& x)
{
// Methode:
minus(uexp, LF_exp_mid + intDsize*(uintL)len)
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF_impl.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_LF operator- (const cl_LF& x)
{
// Methode:
return mx;
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF.h"
+namespace cln {
+
MAYBE_INLINE
cl_boolean zerop (const cl_LF& x)
{
return (cl_boolean) (TheLfloat(x)->expo == 0);
}
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_RA.h"
+namespace cln {
+
const cl_R cl_RA_LF_div (const cl_RA& x, const cl_LF& y)
{
// Method:
// 5000 0.55 1.94 0.98 2.30 1.70 3.33 4.90 7.74 11.94 19.29
//
// We see that the first approach is always better than the second.
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat_class.h"
+#include "cln/lfloat_class.h"
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_input.h"
-#include "cl_float_io.h"
+#include "cln/lfloat.h"
+#include "cln/input.h"
+#include "cln/float_io.h"
+
+namespace cln {
cl_read_flags cl_LF_read_flags = {
syntax_lfloat,
lsyntax_all,
10,
- { cl_float_format_lfloat_min, cl_float_format_lfloat_min, cl_false }
+ { float_format_lfloat_min, float_format_lfloat_min, cl_false }
};
cl_LF::cl_LF (const char * string)
pointer = as_cl_private_thing(
As(cl_LF)(read_float(cl_LF_read_flags,string,NULL,NULL)));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_LF_minusp.cc"
+namespace cln {
+
const cl_LF abs (const cl_LF& x)
{
// x<0 -> (- x), x>=0 -> x
if (minusp(x)) return -x; else return x;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_N.h"
+namespace cln {
+
inline cl_boolean cl_LF_p (const cl_number& x)
{
if (x.pointer_p())
} else
cl_as_error(x,"a long-float number",filename,line);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
+namespace cln {
+
cl_class cl_class_lfloat = {
NULL, // empty destructor
cl_class_flags_subclass_complex | cl_class_flags_subclass_real | cl_class_flags_subclass_float
};
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_io.h"
-#include "cl_float_io.h"
+#include "cln/lfloat.h"
+#include "cln/io.h"
+#include "cln/float_io.h"
+
+namespace cln {
static void dprint (cl_heap* pointer)
{
AT_INITIALIZATION(dprint_LF)
{ cl_register_type_printer(cl_class_lfloat,dprint); }
-// This dummy links in this module when <cl_lfloat.h> requires it.
+// This dummy links in this module when <cln/lfloat.h> requires it.
int cl_LF_debug_module;
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF_impl.h"
#include "cl_I.h"
-const cl_decoded_lfloat decode_float (const cl_LF& x)
+namespace cln {
+
+const decoded_lfloat decode_float (const cl_LF& x)
{
// x entpacken:
var cl_signean sign;
var sintL exp;
var uintC mantlen;
var const uintD* mantMSDptr;
- LF_decode(x, { return cl_decoded_lfloat(x, 0, encode_LF1(mantlen)); },
+ LF_decode(x, { return decoded_lfloat(x, 0, encode_LF1(mantlen)); },
sign=,exp=,mantMSDptr=,mantlen=,);
- return cl_decoded_lfloat(
+ return decoded_lfloat(
encode_LFu(0,0+LF_exp_mid,mantMSDptr,mantlen), // (-1)^0 * 2^0 * m erzeugen
L_to_I(exp), // e als Fixnum
encode_LF1s(sign,mantlen) // (-1)^s erzeugen
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF.h"
+namespace cln {
+
MAYBE_INLINE
uintL float_digits (const cl_LF& x)
{
return intDsize*(uintL)(TheLfloat(x)->len);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF_impl.h"
#include "cl_DS.h"
+namespace cln {
+
MAYBE_INLINE
-uint32 cl_equal_hashcode (const cl_LF& x)
+uint32 equal_hashcode (const cl_LF& x)
{
var cl_signean sign;
var sintL exp;
#endif
return equal_hashcode_low(msd,exp,sign);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF.h"
+namespace cln {
+
MAYBE_INLINE
sintL float_exponent (const cl_LF& x)
{
if (uexp==0) { return 0; }
return (sintL)(uexp - LF_exp_mid);
}
+
+} // namespace cln
#include "cl_LF_impl.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_LF extend (const cl_LF& x, uintC len)
{
var Lfloat y = allocate_lfloat(len,TheLfloat(x)->expo,TheLfloat(x)->sign); // neues LF
}
return y;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
MAYBE_INLINE
const cl_idecoded_float integer_decode_float (const cl_LF& x)
{
(sign>=0 ? cl_I(1) : cl_I(-1)) // (-1)^s erzeugen
);
}
+
+} // namespace cln
// Implementation.
+namespace cln {
+
uintC cl_LF_len_incsqrt (uintC n)
{
// Methode bei intDsize=16:
// No TEST(14), because NMAX(1UL<<14) is already out of range.
n_max;
}
+
+} // namespace cln
// Implementation.
+namespace cln {
+
uintC cl_LF_len_incsqrtx (uintC n)
{
// Methode bei intDsize=16:
// No TEST(14), because NMAX(1UL<<14) is already out of range.
n_max;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
+namespace cln {
+
const cl_LF max (const cl_LF& x, const cl_LF& y)
{
return (x >= y ? x : y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
+namespace cln {
+
const cl_LF min (const cl_LF& x, const cl_LF& y)
{
return (x <= y ? x : y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_LF_zerop.cc"
+namespace cln {
+
MAYBE_INLINE2
uintL float_precision (const cl_LF& x)
{
if (zerop(x)) return 0;
return intDsize*(uintL)(TheLfloat(x)->len);
}
+
+} // namespace cln
#include "cl_DS.h"
#include "cl_F.h"
+namespace cln {
+
const cl_LF shorten (const cl_LF& x, uintC len)
{
// x = 0.0 braucht nicht abgefangen zu werden, da bei Mantisse 0 dann
}
return y;
}
+
+} // namespace cln
// Implementation.
-#include "cl_abort.h"
+#include "cln/abort.h"
#undef MAYBE_INLINE2
#define MAYBE_INLINE2 inline
#define MAYBE_INLINE inline
#include "cl_LF_exponent.cc"
+namespace cln {
+
const cl_LF cl_LF_shortenrelative (const cl_LF& x, const cl_LF& y)
{
// Methode:
else
return x;
}
+
+} // namespace cln
// Implementation.
-#include "cl_abort.h"
+#include "cln/abort.h"
#undef MAYBE_INLINE2
#define MAYBE_INLINE2 inline
#define MAYBE_INLINE inline
#include "cl_LF_exponent.cc"
+namespace cln {
+
const cl_LF cl_LF_shortenwith (const cl_LF& x, const cl_LF& y)
{
// Methode:
} else
return x;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_LF_minusp.cc"
+namespace cln {
+
MAYBE_INLINE2
const cl_LF float_sign (const cl_LF& x)
{
// Methode: x>=0 -> Ergebnis 1.0; x<0 -> Ergebnis -1.0
return encode_LF1s(TheLfloat(x)->sign,TheLfloat(x)->len);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
// Implementation.
#include "cl_LF_minusp.cc"
#include "cl_LF_zerop.cc"
+namespace cln {
+
MAYBE_INLINE2
const cl_LF signum (const cl_LF& x)
{
else // je nach Vorzeichen von x
{ return encode_LF1s(TheLfloat(x)->sign,TheLfloat(x)->len); }
}
+
+} // namespace cln
// Implementation.
+namespace cln {
+
const cl_LF LF_to_LF (const cl_LF& x, uintC len)
{
var uintC oldlen = TheLfloat(x)->len;
// len = oldlen
return x;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
#include "cl_DF_minusp.cc"
#include "cl_LF_minusp.cc"
+namespace cln {
+
const cl_F abs (const cl_F& x)
{
// x<0 -> (- x), x>=0 -> x
, if (minusp(x)) return -x; else return x;
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_N.h"
+namespace cln {
+
inline cl_boolean cl_F_p (const cl_number& x)
{
if (!x.pointer_p())
} else
cl_as_error(x,"a floating-point number",filename,line);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_I.h"
#include "cl_F.h"
-inline const cl_decoded_float decode_float (const cl_SF& x)
+namespace cln {
+
+inline const decoded_float decode_float (const cl_SF& x)
{
// x entpacken:
var cl_signean sign;
var sintL exp;
var uint32 mant;
- SF_decode(x, { return cl_decoded_float(SF_0, 0, SF_1); },
+ SF_decode(x, { return decoded_float(SF_0, 0, SF_1); },
sign=,exp=,mant=
);
- return cl_decoded_float(
+ return decoded_float(
encode_SF(0,0,mant), // (-1)^0 * 2^0 * m erzeugen
L_to_FN(exp), // e als Fixnum
encode_SF(sign,1,bit(SF_mant_len)) // (-1)^s erzeugen
);
}
-inline const cl_decoded_float decode_float (const cl_FF& x)
+inline const decoded_float decode_float (const cl_FF& x)
{
// x entpacken:
var cl_signean sign;
var sintL exp;
var uint32 mant;
- FF_decode(x, { return cl_decoded_float(cl_FF_0, 0, cl_FF_1); },
+ FF_decode(x, { return decoded_float(cl_FF_0, 0, cl_FF_1); },
sign=,exp=,mant=
);
- return cl_decoded_float(
+ return decoded_float(
encode_FF(0,0,mant), // (-1)^0 * 2^0 * m erzeugen
L_to_FN(exp), // e als Fixnum
encode_FF(sign,1,bit(FF_mant_len)) // (-1)^s erzeugen
);
}
-inline const cl_decoded_float decode_float (const cl_DF& x)
+inline const decoded_float decode_float (const cl_DF& x)
{
// x entpacken:
var cl_signean sign;
var sintL exp;
#if (cl_word_size==64)
var uint64 mant;
- DF_decode(x, { return cl_decoded_float(cl_DF_0, 0, cl_DF_1); },
+ DF_decode(x, { return decoded_float(cl_DF_0, 0, cl_DF_1); },
sign=,exp=,mant=
);
- return cl_decoded_float(
+ return decoded_float(
encode_DF(0,0,mant), // (-1)^0 * 2^0 * m erzeugen
L_to_FN(exp), // e als Fixnum
encode_DF(sign,1,bit(DF_mant_len)) // (-1)^s erzeugen
#else
var uint32 manthi;
var uint32 mantlo;
- DF_decode2(x, { return cl_decoded_float(cl_DF_0, 0, cl_DF_1); },
+ DF_decode2(x, { return decoded_float(cl_DF_0, 0, cl_DF_1); },
sign=,exp=,manthi=,mantlo=
);
- return cl_decoded_float(
+ return decoded_float(
encode_DF(0,0,manthi,mantlo), // (-1)^0 * 2^0 * m erzeugen
L_to_FN(exp), // e als Fixnum
encode_DF(sign,1,bit(DF_mant_len-32),0) // (-1)^s erzeugen
#endif
}
-inline const cl_decoded_float decode_float (const cl_LF& x)
+inline const decoded_float decode_float (const cl_LF& x)
{
// x entpacken:
var cl_signean sign;
var sintL exp;
var uintC mantlen;
var const uintD* mantMSDptr;
- LF_decode(x, { return cl_decoded_float(x, 0, encode_LF1(mantlen)); },
+ LF_decode(x, { return decoded_float(x, 0, encode_LF1(mantlen)); },
sign=,exp=,mantMSDptr=,mantlen=,);
- return cl_decoded_float(
+ return decoded_float(
encode_LFu(0,0+LF_exp_mid,mantMSDptr,mantlen), // (-1)^0 * 2^0 * m erzeugen
L_to_I(exp), // e als Fixnum
encode_LF1s(sign,mantlen) // (-1)^s erzeugen
);
}
-const cl_decoded_float decode_float (const cl_F& x)
+const decoded_float decode_float (const cl_F& x)
{
floatcase(x
, return decode_float(x);
, return decode_float(x);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_DF_digits.cc"
#include "cl_LF_digits.cc"
+namespace cln {
+
uintL float_digits (const cl_F& x)
{
floatcase(x
, return float_digits(x);
);
}
+
+} // namespace cln
CL_PROVIDE(cl_F_epsneg)
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_LF.h"
#include "cl_LF_impl.h"
+namespace cln {
+
// Bei Floats mit d Bits (incl. Hiddem Bit, also d = ?F_mant_len+1)
// ist ?F_negative_epsilon = 2^(-d-1)*(1+2^(1-d)),
// d.h. Mantisse 10...01, Vorzeichen +.
return erg;
}
-const cl_F float_negative_epsilon (cl_float_format_t f)
+const cl_F float_negative_epsilon (float_format_t f)
{
floatformatcase((uintL)f
, return SF_negative_epsilon;
);
}
+} // namespace cln
+
CL_PROVIDE_END(cl_F_epsneg)
CL_PROVIDE(cl_F_epspos)
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_LF.h"
#include "cl_LF_impl.h"
+namespace cln {
+
// Bei Floats mit d Bits (incl. Hiddem Bit, also d = ?F_mant_len+1)
// ist ?F_epsilon = 2^-d*(1+2^(1-d)), d.h. Mantisse 10...01, Vorzeichen +.
return erg;
}
-const cl_F float_epsilon (cl_float_format_t f)
+const cl_F float_epsilon (float_format_t f)
{
floatformatcase((uintL)f
, return SF_epsilon;
);
}
+} // namespace cln
+
CL_PROVIDE_END(cl_F_epspos)
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_DF_eqhashcode.cc"
#include "cl_LF_eqhashcode.cc"
-uint32 cl_equal_hashcode (const cl_F& x)
+namespace cln {
+
+uint32 equal_hashcode (const cl_F& x)
{
floatcase(x
- , return cl_equal_hashcode(x);
- , return cl_equal_hashcode(x);
- , return cl_equal_hashcode(x);
- , return cl_equal_hashcode(x);
+ , return equal_hashcode(x);
+ , return equal_hashcode(x);
+ , return equal_hashcode(x);
+ , return equal_hashcode(x);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_DF_exponent.cc"
#include "cl_LF_exponent.cc"
+namespace cln {
+
sintL float_exponent (const cl_F& x)
{
floatcase(x
, return float_exponent(x);
);
}
+
+} // namespace cln
#include "cl_SF.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F cl_F_extendsqrt (const cl_F& x)
{
// Methode:
, return extend(x,cl_LF_len_incsqrt(TheLfloat(x)->len));
);
}
+
+} // namespace cln
#include "cl_SF.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F cl_F_extendsqrtx (const cl_F& x)
{
// Methode:
, return extend(x,cl_LF_len_incsqrtx(TheLfloat(x)->len));
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_DF_idecode.cc"
#include "cl_LF_idecode.cc"
+namespace cln {
+
const cl_idecoded_float integer_decode_float (const cl_F& x)
{
floatcase(x
, return integer_decode_float(x);
);
}
+
+} // namespace cln
CL_PROVIDE(cl_F_leastneg)
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_LF.h"
#include "cl_LF_impl.h"
+namespace cln {
+
// Exponent so klein wie möglich, Mantisse 10...0, Vorzeichen -.
static const cl_SF least_negative_SF =
return erg;
}
-const cl_F least_negative_float (cl_float_format_t f)
+const cl_F least_negative_float (float_format_t f)
{
floatformatcase((uintL)f
, return least_negative_SF;
);
}
+} // namespace cln
+
CL_PROVIDE_END(cl_F_leastneg)
CL_PROVIDE(cl_F_leastpos)
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_LF.h"
#include "cl_LF_impl.h"
+namespace cln {
+
// Exponent so klein wie möglich, Mantisse 10...0, Vorzeichen +.
static const cl_SF least_positive_SF =
return erg;
}
-const cl_F least_positive_float (cl_float_format_t f)
+const cl_F least_positive_float (float_format_t f)
{
floatformatcase((uintL)f
, return least_positive_SF;
);
}
+} // namespace cln
+
CL_PROVIDE_END(cl_F_leastpos)
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
+namespace cln {
+
const cl_F max (const cl_F& x, const cl_F& y)
{
return (x >= y ? x : y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
+namespace cln {
+
const cl_F min (const cl_F& x, const cl_F& y)
{
return (x <= y ? x : y);
}
+
+} // namespace cln
CL_PROVIDE(cl_F_mostneg)
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_LF.h"
#include "cl_LF_impl.h"
+namespace cln {
+
// Exponent so groß wie möglich, Mantisse 1...1, Vorzeichen -.
static const cl_SF most_negative_SF =
return erg;
}
-const cl_F most_negative_float (cl_float_format_t f)
+const cl_F most_negative_float (float_format_t f)
{
floatformatcase((uintL)f
, return most_negative_SF;
);
}
+} // namespace cln
+
CL_PROVIDE_END(cl_F_mostneg)
CL_PROVIDE(cl_F_mostpos)
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_LF.h"
#include "cl_LF_impl.h"
+namespace cln {
+
// Exponent so groß wie möglich, Mantisse 1...1, Vorzeichen +.
static const cl_SF most_positive_SF =
return erg;
}
-const cl_F most_positive_float (cl_float_format_t f)
+const cl_F most_positive_float (float_format_t f)
{
floatformatcase((uintL)f
, return most_positive_SF;
);
}
+} // namespace cln
+
CL_PROVIDE_END(cl_F_mostpos)
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_DF_precision.cc"
#include "cl_LF_precision.cc"
+namespace cln {
+
uintL float_precision (const cl_F& x)
{
floatcase(x
, return float_precision(x);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_RA.h"
+namespace cln {
+
const cl_RA rational (const cl_F& x)
{
// Methode:
#endif
}
}
+
+} // namespace cln
// Implementation.
#include "cl_LF.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
+
+namespace cln {
const cl_F cl_F_shortenrelative (const cl_F& x, const cl_F& y)
{
return x;
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_DF_sign.cc"
#include "cl_LF_sign.cc"
+namespace cln {
+
const cl_F float_sign (const cl_F& x)
{
// Methode: x>=0 -> Ergebnis 1.0; x<0 -> Ergebnis -1.0
, return float_sign(x);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
+namespace cln {
+
const cl_F float_sign (const cl_F& x, const cl_F& y)
{
// Methode:
else
return y;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_DF_signum.cc"
#include "cl_LF_signum.cc"
+namespace cln {
+
const cl_F signum (const cl_F& x)
{
floatcase(x
, return signum(x);
);
}
+
+} // namespace cln
-// cl_float_format().
+// float_format().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
-cl_float_format_t cl_float_format (uintL n)
+namespace cln {
+
+float_format_t float_format (uintL n)
{
// Methode:
// Mindestens 1+n Dezimalstellen (inklusive Vorkommastelle)
// Durch diese Berechnungsmethode wird das Ergebnis sicher >= (1+n)*ln(10)/ln(2)
// sein, evtl. um ein paar Bit zu groß, aber nicht zu klein.
n = 1+n;
- return (cl_float_format_t)
+ return (float_format_t)
((n << 2)
- (n >> 1) - (n >> 3) - (n >> 5) - (n >> 6) - (n >> 8)
- (n >> 9) - (n >> 12) - (n >> 14) - (n >> 15)
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float_io.h"
+#include "cln/float_io.h"
// Implementation.
-#include "cl_output.h"
+#include "cln/output.h"
+
+namespace cln {
void print_float (cl_ostream stream, const cl_print_flags& flags, const cl_F& z)
{
print_float(stream,(const cl_print_number_flags&)flags,z);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float_io.h"
+#include "cln/float_io.h"
// Implementation.
-#include "cl_output.h"
+#include "cln/output.h"
+
+namespace cln {
void print_float (cl_ostream stream, const cl_print_number_flags& flags, const cl_F& z)
{
print_float(stream,(const cl_print_real_flags&)flags,z);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float_io.h"
+#include "cln/float_io.h"
// Implementation.
-#include "cl_output.h"
+#include "cln/output.h"
+
+namespace cln {
void print_float (cl_ostream stream, const cl_print_real_flags& flags, const cl_F& z)
{
print_float(stream,(const cl_print_float_flags&)flags,z);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float_io.h"
+#include "cln/float_io.h"
// Implementation.
CL_REQUIRE(cl_F_ln2_var)
CL_REQUIRE(cl_F_ln10_var)
#include <string.h>
-#include "cl_output.h"
+#include "cln/output.h"
#include "cl_sstring.h"
-#include "cl_float.h"
+#include "cln/float.h"
#include "cl_F.h"
#include "cl_LF.h"
#include "cl_F_tran.h"
-#include "cl_rational.h"
-#include "cl_integer.h"
-#include "cl_integer_io.h"
+#include "cln/rational.h"
+#include "cln/integer.h"
+#include "cln/integer_io.h"
#include "cl_I.h"
+namespace cln {
+
// Hauptfunktion zur Umwandlung von Floats ins Dezimalsystem:
// Zu einem Float x werden ein String as und drei Integers k,e,s
// berechnet mit folgenden Eigenschaften:
// e*log(2)-d*log(10) nötig. Dazu mit l'=integerlength(e)
// für log(2): g+7+l' Bits abs. Gen., g+7+l' Bits rel. Gen.,
// für log(10): g+7+l' Bits abs. Gen., g+7+l'+2 Bist rel. Gen.
- var cl_float_format_t gen = (cl_float_format_t)(g + integer_length(e) + 9); // Genauigkeit
+ var float_format_t gen = (float_format_t)(g + integer_length(e) + 9); // Genauigkeit
var cl_F f2g = exp(The(cl_F)(e * cl_ln2(gen)) - The(cl_F)(d * cl_ln10(gen))); // f/2^g
// Das so berechnete f/2^g ist >1, <100.
// Mit 2^g multiplizieren und auf eine ganze Zahl runden:
// Nun a in einen Dezimalstring umwandeln
// und dann Nullen am Schluß streichen:
var char* as = cl_decimal_string(a); // Ziffernfolge zu a>0
- var uintL las = strlen(as); // Länge der Ziffernfolge
+ var uintL las = ::strlen(as); // Länge der Ziffernfolge
var uintL k = las; // Länge ohne die gestrichenen Nullen am Schluß
var cl_I ee = k+d; // a * 10^d = a * 10^(-k+ee)
while (as[k-1] == '0') // eine 0 am Schluß?
}
}
var char* as = cl_decimal_string(a); // Ziffernfolge zu a>0
- var uintL k = strlen(as);
+ var uintL k = ::strlen(as);
ASSERT(as[k-1] != '0');
return cl_decimal_decoded_float(as,k,k+d,sign);
}
print_integer(stream,10,expo);
}
// Fertig. Aufräumen.
- cl_free_hook(mantstring);
+ free_hook(mantstring);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float_io.h"
+#include "cln/float_io.h"
// Implementation.
-#include "cl_float.h"
+#include "cln/float.h"
#include "cl_F.h"
-#include "cl_integer_io.h"
+#include "cln/integer_io.h"
#include "cl_I.h"
+namespace cln {
+
void print_float_binary (cl_ostream stream, const cl_F& z)
{
// Vorzeichen, Punkt, Mantisse (binär), (Zweiersystem-)Exponent (dezimal)
// Exponenten dezimal ausgeben:
print_integer(stream,10,cl_I(float_exponent(z)));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_DS.h"
#include "cl_I.h"
-const cl_F random_F (cl_random_state& randomstate, const cl_F& n)
+namespace cln {
+
+const cl_F random_F (random_state& randomstate, const cl_F& n)
{
var uintL d = float_digits(n); // d = (float-digits n) > 0
// Bilde neue UDS mit d Zufallsbits:
{ result = cl_float(0,result); }
return result;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF.h"
#include "cl_low.h"
+namespace cln {
+
const cl_SF sqrt (const cl_SF& x)
{
// Methode:
}
return encode_SF(0,exp,mant);
}
+
+} // namespace cln
#ifndef _CL_SF_H
#define _CL_SF_H
-#include "cl_number.h"
+#include "cln/number.h"
#include "cl_F.h"
+namespace cln {
+
// The immediate word contains:
// |..|.......|..........................|....|
// sign exponent mantissa tag
// und rundet dabei.
extern const cl_SF cl_RA_to_SF (const cl_RA& x);
+} // namespace cln
+
#endif /* _CL_SF_H */
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF.h"
+namespace cln {
+
const cl_SF_div_t ceiling2 (const cl_SF& x, const cl_SF& y)
{
// Methode:
var cl_SF& r = q_r.remainder;
return cl_SF_div_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_SF_minusp.cc"
+namespace cln {
+
const cl_SF fceiling (const cl_SF& x)
{
if (minusp(x))
else
return futruncate(x);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_SF_minusp.cc"
+namespace cln {
+
const cl_SF ffloor (const cl_SF& x)
{
if (minusp(x))
else
return ftruncate(x);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF.h"
+namespace cln {
+
const cl_SF_div_t floor2 (const cl_SF& x, const cl_SF& y)
{
// Methode:
var cl_SF& r = q_r.remainder;
return cl_SF_div_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF.h"
+namespace cln {
+
const cl_SF recip (const cl_SF& x)
{
return SF_1 / x;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF.h"
+namespace cln {
+
const cl_SF_div_t round2 (const cl_SF& x, const cl_SF& y)
{
// Methode:
var cl_SF& r = q_r.remainder;
return cl_SF_div_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF.h"
+namespace cln {
+
const cl_SF_div_t truncate2 (const cl_SF& x, const cl_SF& y)
{
// Methode:
var cl_SF& r = q_r.remainder;
return cl_SF_div_t(q,y*r);
}
+
+} // namespace cln
-// cl_compare().
+// compare().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_SF_minusp.cc"
-cl_signean cl_compare (const cl_SF& x, const cl_SF& y)
+namespace cln {
+
+cl_signean compare (const cl_SF& x, const cl_SF& y)
{
// Methode:
// x und y haben verschiedenes Vorzeichen ->
}
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_N.h"
#include "cl_low.h"
+namespace cln {
+
const cl_SF operator/ (const cl_SF& x1, const cl_SF& x2)
{
// Methode:
} }
return encode_SF(sign1,exp1,mant);
}
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_SF cl_I_to_SF (const cl_I& x)
{
// Methode:
#endif
return encode_SF(sign,(sintL)exp,mant);
}
+
+} // namespace cln
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
+namespace cln {
+
const cl_SF cl_RA_to_SF (const cl_RA& x)
{
// Methode:
// Fertig.
return encode_SF(sign,lendiff,mant);
}}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF.h"
+namespace cln {
+
const cl_SF fround (const cl_SF& x)
{
// Methode:
} }
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF.h"
+namespace cln {
+
const cl_SF ftruncate (const cl_SF& x)
{
// Methode:
}
}
}
+
+} // namespace cln
// Implementation.
+namespace cln {
+
const cl_SF futruncate (const cl_SF& x)
{
// Methode:
);
} }
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_SF_zerop.cc"
+namespace cln {
+
const cl_SF operator- (const cl_SF& x1, const cl_SF& x2)
{
// Methode:
else
return x1 + cl_SF_from_word(x2.word ^ bit(SF_sign_shift));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF.h"
+namespace cln {
+
MAYBE_INLINE
cl_boolean minusp (const cl_SF& x)
{
return (cl_boolean) ((x.word & bit(SF_sign_shift)) != 0);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF.h"
#include "cl_low.h"
+namespace cln {
+
const cl_SF operator* (const cl_SF& x1, const cl_SF& x2)
{
// Methode:
// Runden fertig, 2^SF_mant_len <= manthi < 2^(SF_mant_len+1)
return encode_SF(sign1,exp1,manthi);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF.h"
#include "cl_xmacros.h"
+namespace cln {
+
const cl_SF operator+ (const cl_SF& x1, const cl_SF& x2)
{
// Methode (nach [Knuth, II, Seminumerical Algorithms, Abschnitt 4.2.1., S.200]):
return encode_SF(sign1,exp1,mant1);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF_minusp.cc"
#include "cl_SF_zerop.cc"
+namespace cln {
+
MAYBE_INLINE2
cl_boolean plusp (const cl_SF& x)
{
else
return cl_true; // sonst ist x>0.
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF.h"
#include "cl_F.h"
+namespace cln {
+
const cl_SF scale_float (const cl_SF& x, sintL delta)
{
// Methode:
{ return SF_0; }
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_F.h"
#include "cl_I.h"
+namespace cln {
+
const cl_SF scale_float (const cl_SF& x, const cl_I& delta)
{
// Methode:
{ return SF_0; }
}
}
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
+namespace cln {
+
const cl_I cl_SF_to_I (const cl_SF& x)
{
// x entpacken:
exp
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_SF_zerop.cc"
+namespace cln {
+
const cl_SF operator- (const cl_SF& x)
{
// Methode:
return SF_0;
return cl_SF_from_word(x.word ^ ((cl_uint)1 << SF_sign_shift));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF.h"
+namespace cln {
+
MAYBE_INLINE
cl_boolean zerop (const cl_SF& x)
{
return (cl_boolean) (x.word == make_SF_word(0,0,0));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat_class.h"
+#include "cln/sfloat_class.h"
// Implementation.
-#include "cl_sfloat.h"
-#include "cl_input.h"
-#include "cl_float_io.h"
+#include "cln/sfloat.h"
+#include "cln/input.h"
+#include "cln/float_io.h"
+
+namespace cln {
cl_read_flags cl_SF_read_flags = {
syntax_sfloat,
lsyntax_all,
10,
- { cl_float_format_sfloat, cl_float_format_lfloat_min, cl_false }
+ { float_format_sfloat, float_format_lfloat_min, cl_false }
};
cl_SF::cl_SF (const char * string)
pointer = as_cl_private_thing(
As(cl_SF)(read_float(cl_SF_read_flags,string,NULL,NULL)));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_SF_minusp.cc"
+namespace cln {
+
const cl_SF abs (const cl_SF& x)
{
// x<0 -> (- x), x>=0 -> x
if (minusp(x)) return -x; else return x;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_N.h"
+namespace cln {
+
inline cl_boolean cl_SF_p (const cl_number& x)
{
if (!x.pointer_p())
} else
cl_as_error(x,"a short-float number",filename,line);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
+namespace cln {
+
cl_class cl_class_sfloat = {
NULL, // destructor not used, since not heap objects
cl_class_flags_subclass_complex | cl_class_flags_subclass_real | cl_class_flags_subclass_float
{
cl_immediate_classes[cl_SF_tag] = &cl_class_sfloat;
}
+
+} // namespace cln
// Implementation.
-#include "cl_sfloat.h"
-#include "cl_io.h"
-#include "cl_float_io.h"
+#include "cln/sfloat.h"
+#include "cln/io.h"
+#include "cln/float_io.h"
+
+namespace cln {
static void dprint (cl_heap* pointer)
{
AT_INITIALIZATION(dprint_SF)
{ cl_register_type_printer(cl_class_sfloat,dprint); }
-// This dummy links in this module when <cl_sfloat.h> requires it.
+// This dummy links in this module when <cln/sfloat.h> requires it.
int cl_SF_debug_module;
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF.h"
#include "cl_I.h"
-const cl_decoded_sfloat decode_float (const cl_SF& x)
+namespace cln {
+
+const decoded_sfloat decode_float (const cl_SF& x)
{
// x entpacken:
var cl_signean sign;
var sintL exp;
var uint32 mant;
- SF_decode(x, { return cl_decoded_sfloat(SF_0, 0, SF_1); },
+ SF_decode(x, { return decoded_sfloat(SF_0, 0, SF_1); },
sign=,exp=,mant=
);
- return cl_decoded_sfloat(
+ return decoded_sfloat(
encode_SF(0,0,mant), // (-1)^0 * 2^0 * m erzeugen
L_to_FN(exp), // e als Fixnum
encode_SF(sign,1,bit(SF_mant_len)) // (-1)^s erzeugen
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF.h"
+namespace cln {
+
MAYBE_INLINE
uintL float_digits (const cl_SF& x)
{
unused x;
return SF_mant_len+1; // 17
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_N.h"
#include "cl_SF.h"
+namespace cln {
+
MAYBE_INLINE
-uint32 cl_equal_hashcode (const cl_SF& x)
+uint32 equal_hashcode (const cl_SF& x)
{
var cl_signean sign;
var sintL exp;
var uint32 msd = mant << (32-(SF_mant_len+1));
return equal_hashcode_low(msd,exp,sign);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF.h"
+namespace cln {
+
MAYBE_INLINE
sintL float_exponent (const cl_SF& x)
{
if (uexp==0) { return 0; }
return (sintL)(uexp - SF_exp_mid);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF.h"
#include "cl_I.h"
+namespace cln {
+
MAYBE_INLINE
const cl_idecoded_float integer_decode_float (const cl_SF& x)
{
(sign>=0 ? cl_I(1) : cl_I(-1)) // (-1)^s erzeugen
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
+namespace cln {
+
const cl_SF max (const cl_SF& x, const cl_SF& y)
{
return (x >= y ? x : y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
+namespace cln {
+
const cl_SF min (const cl_SF& x, const cl_SF& y)
{
return (x <= y ? x : y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_SF_zerop.cc"
+namespace cln {
+
MAYBE_INLINE2
uintL float_precision (const cl_SF& x)
{
if (zerop(x)) return 0;
return SF_mant_len+1; // 17
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#define MAYBE_INLINE inline
#include "cl_SF_minusp.cc"
+namespace cln {
+
MAYBE_INLINE2
const cl_SF float_sign (const cl_SF& x)
{
// Methode: x>=0 -> Ergebnis 1.0; x<0 -> Ergebnis -1.0
return encode_SF(SF_sign(x),1,bit(SF_mant_len));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
// Implementation.
#include "cl_SF_minusp.cc"
#include "cl_SF_zerop.cc"
+namespace cln {
+
MAYBE_INLINE2
const cl_SF signum (const cl_SF& x)
{
elif (zerop(x)) { return SF_0; } // x=0 -> 0.0
else { return SF_1; } // x>0 -> +1.0
}
+
+} // namespace cln
// Specification.
#include "cl_F_tran.h"
#include "cl_F.h"
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
// Implementation.
-#include "cl_float.h"
+#include "cln/float.h"
#include "cl_low.h"
#undef MAYBE_INLINE
#include "cl_LF_minusp.cc"
#include "cl_LF_exponent.cc"
+namespace cln {
+
// cl_F atanhx (const cl_F& x)
// cl_LF atanhx (const cl_LF& x)
//
// 500 35.5 24.2 9.7
// 1000 168 116 29.6
// ==> using ln faster for N >= 34.
+
+} // namespace cln
// Implementation.
-#include "cl_float.h"
+#include "cln/float.h"
#include "cl_low.h"
#include "cl_F.h"
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
#include "cl_LF_minusp.cc"
#include "cl_LF_exponent.cc"
+namespace cln {
+
// cl_F atanx_naive (const cl_F& x)
// cl_LF atanx_naive (const cl_LF& x)
//
}
// Bit complexity (N = length(x)): O(log(N)^2*M(N)).
+} // namespace cln
-// cl_catalanconst().
+// catalanconst().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F_tran.h"
#include "cl_LF.h"
-const cl_F cl_catalanconst (const cl_F& y)
+namespace cln {
+
+const cl_F catalanconst (const cl_F& y)
{
floattypecase(y
, return cl_SF_catalanconst;
, return cl_FF_catalanconst;
, return cl_DF_catalanconst;
- , return cl_catalanconst(TheLfloat(y)->len);
+ , return catalanconst(TheLfloat(y)->len);
);
}
+
+} // namespace cln
-// cl_catalanconst().
+// catalanconst().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
#include "cl_F_tran.h"
-const cl_F cl_catalanconst (void)
+namespace cln {
+
+const cl_F catalanconst (void)
{
- floatformatcase(cl_default_float_format
+ floatformatcase(default_float_format
, return cl_SF_catalanconst;
, return cl_FF_catalanconst;
, return cl_DF_catalanconst;
- , return cl_catalanconst(len);
+ , return catalanconst(len);
);
}
+
+} // namespace cln
-// cl_catalanconst().
+// catalanconst().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
#include "cl_F_tran.h"
-const cl_F cl_catalanconst (cl_float_format_t f)
+namespace cln {
+
+const cl_F catalanconst (float_format_t f)
{
floatformatcase((uintL)f
, return cl_SF_catalanconst;
, return cl_FF_catalanconst;
, return cl_DF_catalanconst;
- , return cl_catalanconst(len);
+ , return catalanconst(len);
);
}
+
+} // namespace cln
#include "cl_LF_impl.h"
#include "cl_F.h"
+namespace cln {
+
// Mantisse der Catalanschen Konstante :
static const uintD catalanconst_mantisse [64/intDsize] =
#include "cl_F_catalanconst_var.h"
cl_LF cl_LF_catalanconst = encode_LF_array(0,0,catalanconst_mantisse,64/intDsize);
-// Problem: If someone changes cl_free_hook, the destructor of this
+// Problem: If someone changes free_hook, the destructor of this
// will call the new hook, passing it some pointer obtained by the old
-// cl_malloc_hook. ??
+// malloc_hook. ??
const cl_SF cl_SF_catalanconst = cl_LF_to_SF(cl_LF_catalanconst);
const cl_FF cl_FF_catalanconst = cl_LF_to_FF(cl_LF_catalanconst);
const cl_DF cl_DF_catalanconst = cl_LF_to_DF(cl_LF_catalanconst);
+} // namespace cln
+
CL_PROVIDE_END(cl_F_catalanconst_var)
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F_tran.h"
#include "cl_F.h"
-#include "cl_integer.h"
-#include "cl_lfloat.h"
+#include "cln/integer.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F cos (const cl_F& x)
{
// Methode:
// 1000 46 64
// 2500 239 260
// ==> ratseries faster for N >= 2850.
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F_tran.h"
#include "cl_F.h"
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F cosh (const cl_F& x)
{
// Methode:
if (TheLfloat(x)->len >= infty) {
var cl_LF xx = extend(x,TheLfloat(x)->len+1);
var cl_LF_cosh_sinh_t hyp = cl_coshsinh_ratseries(xx);
- return cl_float(hyp.cosh,x);
+ return cln/float.hyp.cosh,x);
} else
#endif
if (TheLfloat(x)->len >= 600) {
// 1000 46 61 35
// 2500 238 250 143
// ==> exp&recip fastest for N >= 600.
+
+} // namespace cln
-// cl_cosh_sinh().
+// cosh_sinh().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F_tran.h"
#include "cl_F.h"
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
-const cl_cosh_sinh_t cl_cosh_sinh (const cl_F& x)
+namespace cln {
+
+const cosh_sinh_t cosh_sinh (const cl_F& x)
{
// Methode:
// Genauigkeit erhöhen,
// e<0
if (zerop(x) || (e <= (1-(sintL)float_digits(x))>>1))
// e <= (1-d)/2 <==> e <= -ceiling((d-1)/2)
- return cl_cosh_sinh_t(cl_float(1,x),x);
+ return cosh_sinh_t(cl_float(1,x),x);
// Rechengenauigkeit erhöhen
if (longfloatp(x)) {
DeclareType(cl_LF,x);
if (TheLfloat(x)->len >= infty) {
var cl_LF xx = extend(x,TheLfloat(x)->len+1);
var cl_LF_cosh_sinh_t hyp = cl_coshsinh_ratseries(xx);
- return cl_cosh_sinh_t(
- cl_float(hyp.cosh,x),
- cl_float(hyp.sinh,x)
+ return cosh_sinh_t(
+ cln/float.hyp.cosh,x),
+ cln/float.hyp.sinh,x)
);
} else
#endif
var cl_LF xx = extend(x,TheLfloat(x)->len+ceiling((uintL)(-e),intDsize));
var cl_F y = exp(xx);
var cl_F y_inv = recip(y);
- return cl_cosh_sinh_t(
+ return cosh_sinh_t(
cl_float(scale_float(y + y_inv, -1), x),
cl_float(scale_float(y - y_inv, -1), x)
);
var cl_LF z = sqrt(y);
if (minusp(xx))
z = -z;
- return cl_cosh_sinh_t(
+ return cosh_sinh_t(
cl_float(sqrt(1+y),x), // sqrt(1+y)
cl_float(z,x)
);
} else {
var cl_F xx = cl_F_extendsqrt(x);
var cl_F y = sinhxbyx_naive(xx);
- return cl_cosh_sinh_t(
+ return cosh_sinh_t(
cl_float(sqrt(1+square(xx)*y),x), // sqrt(1+x^2*y)
cl_float(xx*sqrt(y),x)
);
// e>=0 -> verwende exp(x)
var cl_F y = exp(x);
var cl_F y_inv = recip(y);
- return cl_cosh_sinh_t(
+ return cosh_sinh_t(
scale_float(y+y_inv,-1),
scale_float(y-y_inv,-1)
);
}
}
+
+} // namespace cln
-// cl_cos_sin().
+// cos_sin().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F_tran.h"
#include "cl_F.h"
-#include "cl_integer.h"
-#include "cl_lfloat.h"
+#include "cln/integer.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
-const cl_cos_sin_t cl_cos_sin (const cl_F& x)
+namespace cln {
+
+const cos_sin_t cos_sin (const cl_F& x)
{
// Methode:
// Genauigkeit erhöhen,
}
// evtl. Vorzeichenwechsel oder Vertauschen:
switch (cl_I_to_UL(logand(q,3))) { // q mod 4
- case 0: return cl_cos_sin_t(cos_r,sin_r);
- case 1: return cl_cos_sin_t(-sin_r,cos_r);
- case 2: return cl_cos_sin_t(-cos_r,-sin_r);
- case 3: return cl_cos_sin_t(sin_r,-cos_r);
+ case 0: return cos_sin_t(cos_r,sin_r);
+ case 1: return cos_sin_t(-sin_r,cos_r);
+ case 2: return cos_sin_t(-cos_r,-sin_r);
+ case 3: return cos_sin_t(sin_r,-cos_r);
default: NOTREACHED
}
}
+
+} // namespace cln
-// cl_eulerconst().
+// eulerconst().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F_tran.h"
#include "cl_LF.h"
-const cl_F cl_eulerconst (const cl_F& y)
+namespace cln {
+
+const cl_F eulerconst (const cl_F& y)
{
floattypecase(y
, return cl_SF_eulerconst;
, return cl_FF_eulerconst;
, return cl_DF_eulerconst;
- , return cl_eulerconst(TheLfloat(y)->len);
+ , return eulerconst(TheLfloat(y)->len);
);
}
+
+} // namespace cln
-// cl_eulerconst().
+// eulerconst().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
#include "cl_F_tran.h"
-const cl_F cl_eulerconst (void)
+namespace cln {
+
+const cl_F eulerconst (void)
{
- floatformatcase(cl_default_float_format
+ floatformatcase(default_float_format
, return cl_SF_eulerconst;
, return cl_FF_eulerconst;
, return cl_DF_eulerconst;
- , return cl_eulerconst(len);
+ , return eulerconst(len);
);
}
+
+} // namespace cln
-// cl_eulerconst().
+// eulerconst().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
#include "cl_F_tran.h"
-const cl_F cl_eulerconst (cl_float_format_t f)
+namespace cln {
+
+const cl_F eulerconst (float_format_t f)
{
floatformatcase((uintL)f
, return cl_SF_eulerconst;
, return cl_FF_eulerconst;
, return cl_DF_eulerconst;
- , return cl_eulerconst(len);
+ , return eulerconst(len);
);
}
+
+} // namespace cln
#include "cl_LF_impl.h"
#include "cl_F.h"
+namespace cln {
+
// Mantisse der Eulerschen Konstante :
static const uintD eulerconst_mantisse [64/intDsize] =
#include "cl_F_eulerconst_var.h"
cl_LF cl_LF_eulerconst = encode_LF_array(0,0,eulerconst_mantisse,64/intDsize);
-// Problem: If someone changes cl_free_hook, the destructor of this
+// Problem: If someone changes free_hook, the destructor of this
// will call the new hook, passing it some pointer obtained by the old
-// cl_malloc_hook. ??
+// malloc_hook. ??
const cl_SF cl_SF_eulerconst = cl_LF_to_SF(cl_LF_eulerconst);
const cl_FF cl_FF_eulerconst = cl_LF_to_FF(cl_LF_eulerconst);
const cl_DF cl_DF_eulerconst = cl_LF_to_DF(cl_LF_eulerconst);
+} // namespace cln
+
CL_PROVIDE_END(cl_F_eulerconst_var)
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F_tran.h"
-#include "cl_float.h"
+#include "cln/float.h"
#include "cl_F.h"
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
#undef MAYBE_INLINE
#include "cl_LF_minusp.cc"
#include "cl_LF_exponent.cc"
+namespace cln {
+
// Division durch ln(2).
inline const cl_F_div_t cl_floor_ln2 (const cl_F& x)
{
return cl_float(scale_float(expx_naive(r),q),x);
}
}
+
+} // namespace cln
-// cl_exp1().
+// exp1().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
#include "cl_LF.h"
-const cl_F cl_exp1 (const cl_F& y)
+namespace cln {
+
+const cl_F exp1 (const cl_F& y)
{
floattypecase(y
, return cl_SF_exp1;
, return cl_FF_exp1;
, return cl_DF_exp1;
- , return cl_exp1(TheLfloat(y)->len);
+ , return exp1(TheLfloat(y)->len);
);
}
+
+} // namespace cln
-// cl_exp1().
+// exp1().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
#include "cl_F_tran.h"
-const cl_F cl_exp1 (void)
+namespace cln {
+
+const cl_F exp1 (void)
{
- floatformatcase(cl_default_float_format
+ floatformatcase(default_float_format
, return cl_SF_exp1;
, return cl_FF_exp1;
, return cl_DF_exp1;
- , return cl_exp1(len);
+ , return exp1(len);
);
}
+
+} // namespace cln
-// cl_exp1().
+// exp1().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F_tran.h"
#include "cl_F.h"
-const cl_F cl_exp1 (cl_float_format_t f)
+namespace cln {
+
+const cl_F exp1 (float_format_t f)
{
floatformatcase((uintL)f
, return cl_SF_exp1;
, return cl_FF_exp1;
, return cl_DF_exp1;
- , return cl_exp1(len);
+ , return exp1(len);
);
}
+
+} // namespace cln
#include "cl_LF_impl.h"
#include "cl_F.h"
+namespace cln {
+
// Mantisse von exp(1) :
static const uintD exp1_mantisse [64/intDsize] =
#include "cl_F_exp1_var.h"
cl_LF cl_LF_exp1 = encode_LF_array(0,2,exp1_mantisse,64/intDsize);
-// Problem: If someone changes cl_free_hook, the destructor of this
+// Problem: If someone changes free_hook, the destructor of this
// will call the new hook, passing it some pointer obtained by the old
-// cl_malloc_hook. ??
+// malloc_hook. ??
const cl_SF cl_SF_exp1 = cl_LF_to_SF(cl_LF_exp1);
const cl_FF cl_FF_exp1 = cl_LF_to_FF(cl_LF_exp1);
const cl_DF cl_DF_exp1 = cl_LF_to_DF(cl_LF_exp1);
+} // namespace cln
+
CL_PROVIDE_END(cl_F_exp1_var)
// Implementation.
-#include "cl_float.h"
+#include "cln/float.h"
#include "cl_low.h"
#include "cl_F.h"
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
#include "cl_LF_zerop.cc"
#include "cl_LF_exponent.cc"
+namespace cln {
+
// cl_F expx_naive (const cl_F& x)
// cl_LF expx_naive (const cl_LF& x)
//
// 500 16.3 9.3
// 1000 68 29
// ==> ratseries faster for N >= 84.
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F_tran.h"
#include "cl_F.h"
#include "cl_SF.h"
-#include "cl_integer.h"
-#include "cl_lfloat.h"
+#include "cln/integer.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F ln (const cl_F& x)
{
// Methode:
// Rechengenauigkeit erhöhen und m,e,s bestimmen:
if (longfloatp(x) && (TheLfloat(x)->len >= 110)) {
DeclareType(cl_LF,x);
- var cl_decoded_lfloat m_e_s = decode_float(extend(x,TheLfloat(x)->len+1));
+ var decoded_lfloat m_e_s = decode_float(extend(x,TheLfloat(x)->len+1));
var cl_LF& m = m_e_s.mantissa;
var cl_I& e = m_e_s.exponent;
if (m < make_SF(0,0+SF_exp_mid,floor(bit(SF_mant_len+2),3))) { // Short-Float 2/3
res = res + cl_float(e,m)*cl_ln2(m); // ln(m)+e*ln(2)
return cl_float(res,x);
} else {
- var cl_decoded_float m_e_s = decode_float(cl_F_extendsqrtx(x));
+ var decoded_float m_e_s = decode_float(cl_F_extendsqrtx(x));
var cl_F& m = m_e_s.mantissa;
var cl_I& e = m_e_s.exponent;
if (m < make_SF(0,0+SF_exp_mid,floor(bit(SF_mant_len+2),3))) { // Short-Float 2/3
return cl_float(res,x);
}
}
+
+} // namespace cln
#include "cl_F.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F cl_ln10 (const cl_F& y)
{
floattypecase(y
, return cl_ln10(TheLfloat(y)->len);
);
}
+
+} // namespace cln
#include "cl_F.h"
-const cl_F cl_ln10 (cl_float_format_t f)
+namespace cln {
+
+const cl_F cl_ln10 (float_format_t f)
{
floatformatcase((uintL)f
, return cl_SF_ln10;
, return cl_ln10(len);
);
}
+
+} // namespace cln
#include "cl_LF_impl.h"
#include "cl_F.h"
+namespace cln {
+
// Mantisse von ln(10) :
static const uintD ln10_mantisse [64/intDsize] =
#include "cl_F_ln10_var.h"
cl_LF cl_LF_ln10 = encode_LF_array(0,2,ln10_mantisse,64/intDsize);
-// Problem: If someone changes cl_free_hook, the destructor of this
+// Problem: If someone changes free_hook, the destructor of this
// will call the new hook, passing it some pointer obtained by the old
-// cl_malloc_hook. ??
+// malloc_hook. ??
const cl_SF cl_SF_ln10 = cl_LF_to_SF(cl_LF_ln10);
const cl_FF cl_FF_ln10 = cl_LF_to_FF(cl_LF_ln10);
const cl_DF cl_DF_ln10 = cl_LF_to_DF(cl_LF_ln10);
+} // namespace cln
+
CL_PROVIDE_END(cl_F_ln10_var)
#include "cl_F.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F cl_ln2 (const cl_F& y)
{
floattypecase(y
, return cl_ln2(TheLfloat(y)->len);
);
}
+
+} // namespace cln
#include "cl_F.h"
-const cl_F cl_ln2 (cl_float_format_t f)
+namespace cln {
+
+const cl_F cl_ln2 (float_format_t f)
{
floatformatcase((uintL)f
, return cl_SF_ln2;
, return cl_ln2(len);
);
}
+
+} // namespace cln
#include "cl_LF_impl.h"
#include "cl_F.h"
+namespace cln {
+
// Mantisse von ln(2) :
static const uintD ln2_mantisse [64/intDsize] =
#include "cl_F_ln2_var.h"
cl_LF cl_LF_ln2 = encode_LF_array(0,0,ln2_mantisse,64/intDsize);
-// Problem: If someone changes cl_free_hook, the destructor of this
+// Problem: If someone changes free_hook, the destructor of this
// will call the new hook, passing it some pointer obtained by the old
-// cl_malloc_hook. ??
+// malloc_hook. ??
const cl_SF cl_SF_ln2 = cl_LF_to_SF(cl_LF_ln2);
const cl_FF cl_FF_ln2 = cl_LF_to_FF(cl_LF_ln2);
const cl_DF cl_DF_ln2 = cl_LF_to_DF(cl_LF_ln2);
+} // namespace cln
+
CL_PROVIDE_END(cl_F_ln2_var)
// Implementation.
-#include "cl_float.h"
+#include "cln/float.h"
#include "cl_low.h"
#include "cl_F.h"
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
#include "cl_LF_minusp.cc"
#include "cl_LF_exponent.cc"
+namespace cln {
+
// cl_F lnx_naive (const cl_F& x)
// cl_LF lnx_naive (const cl_LF& x)
//
// 500 43.9 28.8 29.7 21.0 9.8
// 1000 223 149 144 107 30
// ==> ratseries faster for N >= 110. (N = length before extended by the caller.)
+
+} // namespace cln
-// cl_pi().
+// pi().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F_tran.h"
#include "cl_LF.h"
-const cl_F cl_pi (const cl_F& y)
+namespace cln {
+
+const cl_F pi (const cl_F& y)
{
floattypecase(y
, return cl_SF_pi;
, return cl_FF_pi;
, return cl_DF_pi;
- , return cl_pi(TheLfloat(y)->len);
+ , return pi(TheLfloat(y)->len);
);
}
+
+} // namespace cln
-// cl_pi().
+// pi().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
#include "cl_F_tran.h"
-const cl_F cl_pi (void)
+namespace cln {
+
+const cl_F pi (void)
{
- floatformatcase(cl_default_float_format
+ floatformatcase(default_float_format
, return cl_SF_pi;
, return cl_FF_pi;
, return cl_DF_pi;
- , return cl_pi(len);
+ , return pi(len);
);
}
+
+} // namespace cln
-// cl_pi().
+// pi().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F.h"
#include "cl_F_tran.h"
-const cl_F cl_pi (cl_float_format_t f)
+namespace cln {
+
+const cl_F pi (float_format_t f)
{
floatformatcase((uintL)f
, return cl_SF_pi;
, return cl_FF_pi;
, return cl_DF_pi;
- , return cl_pi(len);
+ , return pi(len);
);
}
+
+} // namespace cln
#include "cl_LF_impl.h"
#include "cl_F.h"
+namespace cln {
+
// Mantisse von pi :
static const uintD pi_mantisse [2048/intDsize] =
#include "cl_F_pi_var.h"
cl_LF cl_LF_pi = encode_LF_array(0,2,pi_mantisse,2048/intDsize);
-// Problem: If someone changes cl_free_hook, the destructor of this
+// Problem: If someone changes free_hook, the destructor of this
// will call the new hook, passing it some pointer obtained by the old
-// cl_malloc_hook. ??
+// malloc_hook. ??
const cl_SF cl_SF_pi = cl_LF_to_SF(cl_LF_pi);
const cl_FF cl_FF_pi = cl_LF_to_FF(cl_LF_pi);
const cl_DF cl_DF_pi = cl_LF_to_DF(cl_LF_pi);
+} // namespace cln
+
CL_PROVIDE_END(cl_F_pi_var)
// Implementation.
+namespace cln {
+
const cl_F_div_t cl_round_pi (const cl_F& x)
{
if (float_exponent(x) <= 0)
return cl_F_div_t(0,x); // Quotient 0, Rest x
else
// x durch pi (mit hinreichender Genauigkeit) dividieren
- return round2(x,cl_pi(x));
+ return round2(x,pi(x));
}
+
+} // namespace cln
// Implementation.
+namespace cln {
+
const cl_F_div_t cl_round_pi2 (const cl_F& x)
{
if (float_exponent(x) < 0)
return cl_F_div_t(0,x); // Quotient 0, Rest x
else
// x durch pi/2 (mit hinreichender Genauigkeit) dividieren
- return round2(x,scale_float(cl_pi(x),-1));
+ return round2(x,scale_float(pi(x),-1));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F_tran.h"
#include "cl_F.h"
-#include "cl_integer.h"
-#include "cl_lfloat.h"
+#include "cln/integer.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F sin (const cl_F& x)
{
// Methode:
// 1000 48 64
// 2500 243 261
// ==> ratseries faster for N >= 2750.
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F_tran.h"
#include "cl_F.h"
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F sinh (const cl_F& x)
{
// Methode:
if (TheLfloat(x)->len >= infty) {
var cl_LF xx = extend(x,TheLfloat(x)->len+1);
var cl_LF_cosh_sinh_t hyp = cl_coshsinh_ratseries(xx);
- return cl_float(hyp.sinh,x);
+ return cln/float.hyp.sinh,x);
} else
#endif
if ((TheLfloat(x)->len >= 500)
// 1000 59 61
// 2500 297 247
// ==> ratseries faster for N >= 1300.
+
+} // namespace cln
// Implementation.
-#include "cl_float.h"
+#include "cln/float.h"
#include "cl_low.h"
#include "cl_F.h"
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
#include "cl_LF_zerop.cc"
#include "cl_LF_exponent.cc"
+namespace cln {
+
// sinhxbyx is mainly for cl_SF, cl_FF, cl_DF, where we want to avoid underflow.
const cl_F sinhxbyx_naive (const cl_F& x)
// naive3 fastest for 6 <= N <= 500,
// exp&recip (which uses exp's own ratseries) fastest for N >= 500.
+} // namespace cln
// Implementation.
-#include "cl_float.h"
+#include "cln/float.h"
#include "cl_low.h"
#include "cl_F.h"
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
#include "cl_LF_zerop.cc"
#include "cl_LF_exponent.cc"
+namespace cln {
+
// sinxbyx is mainly for cl_SF, cl_FF, cl_DF, where we want to avoid underflow.
const cl_F sinxbyx_naive (const cl_F& x)
// 3500 339 303
// ==> ratseries faster for N >= 2750.
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
+namespace cln {
+
MAYBE_INLINE
const cl_F tan (const cl_F& x)
{
// Methode:
// (/ (sin x) (cos x))
- var cl_cos_sin_t trig = cl_cos_sin(x);
+ var cos_sin_t trig = cos_sin(x);
return The(cl_F)(trig.sin) / The(cl_F)(trig.cos);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
+namespace cln {
+
MAYBE_INLINE
const cl_F tanh (const cl_F& x)
{
// Methode:
// (/ (sinh x) (cosh x))
- var cl_cosh_sinh_t hyp = cl_cosh_sinh(x);
+ var cosh_sinh_t hyp = cosh_sinh(x);
return The(cl_F)(hyp.sinh) / The(cl_F)(hyp.cosh);
}
+
+} // namespace cln
#ifndef _CL_F_TRAN_H
#define _CL_F_TRAN_H
-#include "cl_number.h"
-#include "cl_float.h"
+#include "cln/number.h"
+#include "cln/float.h"
+
+namespace cln {
// pi.
extern const cl_SF cl_SF_pi;
extern const cl_FF cl_FF_pi;
extern const cl_DF cl_DF_pi;
extern cl_LF cl_LF_pi; // as long as it has ever been computed
-extern const cl_LF cl_pi (uintC len); // computes it even further
+extern const cl_LF pi (uintC len); // computes it even further
//CL_REQUIRE(cl_F_pi_var)
// cl_exp_aux(p,lq,len) liefert die Zahl exp(p/2^lq) mit len Digits.
// cl_ln2(y) liefert die Zahl ln(2) im Float-Format f.
// > f: eine Float-Format-Spezifikation
-extern const cl_F cl_ln2 (cl_float_format_t f);
+extern const cl_F cl_ln2 (float_format_t f);
// ln(10).
extern const cl_SF cl_SF_ln10;
// cl_ln10(y) liefert die Zahl ln(10) im Float-Format f.
// > f: eine Float-Format-Spezifikation
-extern const cl_F cl_ln10 (cl_float_format_t f);
+extern const cl_F cl_ln10 (float_format_t f);
// e = exp(1).
extern const cl_SF cl_SF_exp1;
extern const cl_FF cl_FF_exp1;
extern const cl_DF cl_DF_exp1;
extern cl_LF cl_LF_exp1; // as long as it has ever been computed
-extern const cl_LF cl_exp1 (uintC len); // computes it even further
+extern const cl_LF exp1 (uintC len); // computes it even further
// expx(x) liefert zu einem Float x (betragsmäßig <1) exp(x) als Float.
extern const cl_F expx_naive (const cl_F& x); // requires cl_F_extendsqrtx
extern const cl_FF cl_FF_eulerconst;
extern const cl_DF cl_DF_eulerconst;
extern cl_LF cl_LF_eulerconst; // as long as it has ever been computed
-extern const cl_LF cl_eulerconst (uintC len); // computes it even further
+extern const cl_LF eulerconst (uintC len); // computes it even further
// Catalansche Konstante.
extern const cl_SF cl_SF_catalanconst;
extern const cl_FF cl_FF_catalanconst;
extern const cl_DF cl_DF_catalanconst;
extern cl_LF cl_LF_catalanconst; // as long as it has ever been computed
-extern const cl_LF cl_catalanconst (uintC len); // computes it even further
+extern const cl_LF catalanconst (uintC len); // computes it even further
// Zeta-Funktion für s>1 ganzzahlig.
-extern const cl_LF cl_zeta (int s, uintC len);
+extern const cl_LF zeta (int s, uintC len);
// Zeta-Funktion für s=3.
-extern const cl_LF cl_zeta3 (uintC len);
+extern const cl_LF zeta3 (uintC len);
+
+} // namespace cln
#endif /* _CL_F_TRAN_H */
-// cl_zeta().
+// zeta().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F_tran.h"
#include "cl_LF.h"
-const cl_F cl_zeta (int s, const cl_F& y)
+namespace cln {
+
+const cl_F zeta (int s, const cl_F& y)
{
floattypecase(y
- , return cl_LF_to_SF(cl_zeta(s,LF_minlen));
- , return cl_LF_to_FF(cl_zeta(s,LF_minlen));
- , return cl_LF_to_DF(cl_zeta(s,LF_minlen));
- , return cl_zeta(s,TheLfloat(y)->len);
+ , return cl_LF_to_SF(zeta(s,LF_minlen));
+ , return cl_LF_to_FF(zeta(s,LF_minlen));
+ , return cl_LF_to_DF(zeta(s,LF_minlen));
+ , return zeta(s,TheLfloat(y)->len);
);
}
+
+} // namespace cln
-// cl_zeta().
+// zeta().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F_tran.h"
#include "cl_LF.h"
-const cl_F cl_zeta (int s)
+namespace cln {
+
+const cl_F zeta (int s)
{
- floatformatcase(cl_default_float_format
- , return cl_LF_to_SF(cl_zeta(s,LF_minlen));
- , return cl_LF_to_FF(cl_zeta(s,LF_minlen));
- , return cl_LF_to_DF(cl_zeta(s,LF_minlen));
- , return cl_zeta(s,len);
+ floatformatcase(default_float_format
+ , return cl_LF_to_SF(zeta(s,LF_minlen));
+ , return cl_LF_to_FF(zeta(s,LF_minlen));
+ , return cl_LF_to_DF(zeta(s,LF_minlen));
+ , return zeta(s,len);
);
}
+
+} // namespace cln
-// cl_zeta().
+// zeta().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_float.h"
+#include "cln/float.h"
// Implementation.
#include "cl_F_tran.h"
#include "cl_LF.h"
-const cl_F cl_zeta (int s, cl_float_format_t f)
+namespace cln {
+
+const cl_F zeta (int s, float_format_t f)
{
floatformatcase((uintL)f
- , return cl_LF_to_SF(cl_zeta(s,LF_minlen));
- , return cl_LF_to_FF(cl_zeta(s,LF_minlen));
- , return cl_LF_to_DF(cl_zeta(s,LF_minlen));
- , return cl_zeta(s,len);
+ , return cl_LF_to_SF(zeta(s,LF_minlen));
+ , return cl_LF_to_FF(zeta(s,LF_minlen));
+ , return cl_LF_to_DF(zeta(s,LF_minlen));
+ , return zeta(s,len);
);
}
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
-#include "cl_lfloat.h"
+#include "cln/integer.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
#include "cl_LF_tran.h"
#include "cl_alloca.h"
#undef floor
-#include <math.h>
+#include <cmath>
#define floor cln_floor
+namespace cln {
+
// Method:
// See examples/atan_recip.cc for a comparison of the algorithms.
// Here we take algorithm 2d. It's the fastest throughout the range.
{
var uintC actuallen = len + 1;
var cl_I m2 = m*m+1;
- var uintL N = (uintL)(0.69314718*intDsize*actuallen/log(cl_double_approx(m2))) + 1;
+ var uintL N = (uintL)(0.69314718*intDsize*actuallen/::log(double_approx(m2))) + 1;
CL_ALLOCA_STACK;
var cl_I* pv = (cl_I*) cl_alloca(N*sizeof(cl_I));
var cl_I* qv = (cl_I*) cl_alloca(N*sizeof(cl_I));
return shorten(result,len);
}
// Bit complexity (N = len): O(log(N)^2*M(N)).
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
-#include "cl_lfloat.h"
+#include "cln/integer.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
#include "cl_LF_tran.h"
#include "cl_alloca.h"
#undef floor
-#include <math.h>
+#include <cmath>
#define floor cln_floor
+namespace cln {
+
// Method:
// See examples/atanh_recip.cc for a comparison of the algorithms.
// Here we take algorithm 1d. It's the fastest throughout the range.
{
var uintC actuallen = len + 1;
var cl_I m2 = m*m;
- var uintL N = (uintL)(0.69314718*intDsize/2*actuallen/log(cl_double_approx(m))) + 1;
+ var uintL N = (uintL)(0.69314718*intDsize/2*actuallen/::log(double_approx(m))) + 1;
CL_ALLOCA_STACK;
var cl_I* bv = (cl_I*) cl_alloca(N*sizeof(cl_I));
var cl_I* qv = (cl_I*) cl_alloca(N*sizeof(cl_I));
return shorten(result,len);
}
// Bit complexity (N = len): O(log(N)^2*M(N)).
+
+} // namespace cln
-// cl_catalanconst().
+// catalanconst().
// General includes.
#include "cl_sysdep.h"
// Implementation.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF_tran.h"
#include "cl_LF.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_alloca.h"
+namespace cln {
+
const cl_LF compute_catalanconst_ramanujan (uintC len)
{
// [Jonathan M. Borwein, Peter B. Borwein: Pi and the AGM.
var cl_LF fsum = scale_float(cl_I_to_LF(sum,actuallen),-scale);
var cl_LF g =
scale_float(The(cl_LF)(3*fsum)
- + The(cl_LF)(cl_pi(actuallen))
+ + The(cl_LF)(pi(actuallen))
* ln(cl_I_to_LF(2,actuallen)+sqrt(cl_I_to_LF(3,actuallen))),
-3);
return shorten(g,len); // verkürzen und fertig
}
var cl_LF g =
scale_float(The(cl_LF)(3*fsum)
- + The(cl_LF)(cl_pi(actuallen))
+ + The(cl_LF)(pi(actuallen))
* ln(cl_I_to_LF(2,actuallen)+sqrt(cl_I_to_LF(3,actuallen))),
-3);
return shorten(g,len); // verkürzen und fertig
}
// Bit complexity (N := len): O(log(N)^2*M(N)).
-const cl_LF cl_catalanconst (uintC len)
+const cl_LF catalanconst (uintC len)
{
var uintC oldlen = TheLfloat(cl_LF_catalanconst)->len; // vorhandene Länge
if (len < oldlen)
cl_LF_catalanconst = compute_catalanconst(newlen);
return (len < newlen ? shorten(cl_LF_catalanconst,len) : cl_LF_catalanconst);
}
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
inline const cl_LF_cosh_sinh_t operator* (const cl_LF_cosh_sinh_t& a, const cl_LF_cosh_sinh_t& b)
{
return product;
}
// Bit complexity (N = length(x)): O(log(N)^2*M(N)).
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF_tran.h"
#include "cl_LF.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_alloca.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
#undef floor
-#include <math.h>
+#include <cmath>
#define floor cln_floor
+namespace cln {
+
// Computing cosh(x) = sqrt(1+sinh(x)^2) instead of computing separately
// by a power series evaluation brings 20% speedup, even more for small lengths.
#define TRIVIAL_SPEEDUP
// N2 = ceiling(M*log(2)/(log(N1)-1+lp*log(2))), slightly too large.
// N = N2+2, two more terms for safety.
var uintL N0 = intDsize*actuallen;
- var uintL N1 = (uintL)(0.693147*intDsize*actuallen/(log((double)N0)-1.0+0.693148*lp));
- var uintL N2 = (uintL)(0.693148*intDsize*actuallen/(log((double)N1)-1.0+0.693147*lp))+1;
+ var uintL N1 = (uintL)(0.693147*intDsize*actuallen/(::log((double)N0)-1.0+0.693148*lp));
+ var uintL N2 = (uintL)(0.693148*intDsize*actuallen/(::log((double)N1)-1.0+0.693147*lp))+1;
var uintL N = N2+2;
N = ceiling(N,2);
CL_ALLOCA_STACK;
// Bit complexity (N = len, and if p has length O(log N) and ql = O(log N)):
// O(log(N)*M(N)).
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
inline const cl_LF_cos_sin_t operator* (const cl_LF_cos_sin_t& a, const cl_LF_cos_sin_t& b)
{
return product;
}
// Bit complexity (N = length(x)): O(log(N)^2*M(N)).
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF_tran.h"
#include "cl_LF.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_alloca.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
#undef floor
-#include <math.h>
+#include <cmath>
#define floor cln_floor
+namespace cln {
+
// Computing cos(x) = sqrt(1-sin(x)^2) instead of computing separately
// by a power series evaluation brings 20% speedup, even more for small lengths.
#define TRIVIAL_SPEEDUP
// N2 = ceiling(M*log(2)/(log(N1)-1+lp*log(2))), slightly too large.
// N = N2+2, two more terms for safety.
var uintL N0 = intDsize*actuallen;
- var uintL N1 = (uintL)(0.693147*intDsize*actuallen/(log((double)N0)-1.0+0.693148*lp));
- var uintL N2 = (uintL)(0.693148*intDsize*actuallen/(log((double)N1)-1.0+0.693147*lp))+1;
+ var uintL N1 = (uintL)(0.693147*intDsize*actuallen/(::log((double)N0)-1.0+0.693148*lp));
+ var uintL N2 = (uintL)(0.693148*intDsize*actuallen/(::log((double)N1)-1.0+0.693147*lp))+1;
var uintL N = N2+2;
N = ceiling(N,2);
CL_ALLOCA_STACK;
// Bit complexity (N = len, and if p has length O(log N) and ql = O(log N)):
// O(log(N)*M(N)).
+} // namespace cln
-// cl_eulerconst().
+// eulerconst().
// General includes.
#include "cl_sysdep.h"
// Implementation.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF_tran.h"
#include "cl_LF.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_alloca.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
+
+namespace cln {
#if 0 // works, but besselintegral4 is always faster
return compute_eulerconst_besselintegral1(len);
}
-const cl_LF cl_eulerconst (uintC len)
+const cl_LF eulerconst (uintC len)
{
var uintC oldlen = TheLfloat(cl_LF_eulerconst)->len; // vorhandene Länge
if (len < oldlen)
cl_LF_eulerconst = compute_eulerconst(newlen);
return (len < newlen ? shorten(cl_LF_eulerconst,len) : cl_LF_eulerconst);
}
+
+} // namespace cln
-// cl_exp1().
+// exp1().
// General includes.
#include "cl_sysdep.h"
// Implementation.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF_tran.h"
#include "cl_LF.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_alloca.h"
#undef floor
-#include <math.h>
+#include <cmath>
#define floor cln_floor
+namespace cln {
+
const cl_LF compute_exp1 (uintC len)
{
// Evaluate a sum(0 <= n < N, a(n)/b(n) * (p(0)...p(n))/(q(0)...q(n)))
// N2 = ceiling(M*log(2)/(log(N1)-1)), slightly too large.
// N = N2+2, two more terms for safety.
var uintL N0 = intDsize*actuallen;
- var uintL N1 = (uintL)(0.693147*intDsize*actuallen/(log((double)N0)-1.0));
- var uintL N2 = (uintL)(0.693148*intDsize*actuallen/(log((double)N1)-1.0))+1;
+ var uintL N1 = (uintL)(0.693147*intDsize*actuallen/(::log((double)N0)-1.0));
+ var uintL N2 = (uintL)(0.693148*intDsize*actuallen/(::log((double)N1)-1.0))+1;
var uintL N = N2+2;
CL_ALLOCA_STACK;
var cl_I* qv = (cl_I*) cl_alloca(N*sizeof(cl_I));
// 25000 111
// 50000 254
-const cl_LF cl_exp1 (uintC len)
+const cl_LF exp1 (uintC len)
{
var uintC oldlen = TheLfloat(cl_LF_exp1)->len; // vorhandene Länge
if (len < oldlen)
cl_LF_exp1 = compute_exp1(newlen); // (exp 1)
return (len < newlen ? shorten(cl_LF_exp1,len) : cl_LF_exp1);
}
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF_tran.h"
#include "cl_LF.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_alloca.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
#undef floor
-#include <math.h>
+#include <cmath>
#define floor cln_floor
+namespace cln {
+
const cl_LF cl_exp_aux (const cl_I& p, uintL lq, uintC len)
{
{ Mutable(cl_I,p);
// N2 = ceiling(M*log(2)/(log(N1)-1+lp*log(2))), slightly too large.
// N = N2+2, two more terms for safety.
var uintL N0 = intDsize*actuallen;
- var uintL N1 = (uintL)(0.693147*intDsize*actuallen/(log((double)N0)-1.0+0.693148*lp));
- var uintL N2 = (uintL)(0.693148*intDsize*actuallen/(log((double)N1)-1.0+0.693147*lp))+1;
+ var uintL N1 = (uintL)(0.693147*intDsize*actuallen/(::log((double)N0)-1.0+0.693148*lp));
+ var uintL N2 = (uintL)(0.693148*intDsize*actuallen/(::log((double)N1)-1.0+0.693147*lp))+1;
var uintL N = N2+2;
CL_ALLOCA_STACK;
var cl_I* pv = (cl_I*) cl_alloca(N*sizeof(cl_I));
// Bit complexity (N = len, and if p has length O(log N) and ql = O(log N)):
// O(log(N)*M(N)).
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
+namespace cln {
+
static inline const cl_LF compute_ln10_old (uintC len)
{
return ln(cl_I_to_LF(10,len));
cl_LF_ln10 = compute_ln10(newlen);
return (len < newlen ? shorten(cl_LF_ln10,len) : cl_LF_ln10);
}
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
+namespace cln {
+
static inline const cl_LF compute_ln2_old (uintC len)
{
// Here, it is tricky to avoid a recursive loop. We assume that ln()
cl_LF_ln2 = compute_ln2(newlen);
return (len < newlen ? shorten(cl_LF_ln2,len) : cl_LF_ln2);
}
+
+} // namespace cln
-// cl_pi().
+// pi().
// General includes.
#include "cl_sysdep.h"
// Implementation.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF_tran.h"
#include "cl_LF.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_alloca.h"
+namespace cln {
+
ALL_cl_LF_OPERATIONS_SAME_PRECISION()
// For the next algorithms, I warmly recommend
a = new_a;
k++;
}
- var cl_LF pi = square(a)/t; // a^2/t
- return shorten(pi,len); // verkürzen und fertig
+ var cl_LF pires = square(a)/t; // a^2/t
+ return shorten(pires,len); // verkürzen und fertig
}
// Bit complexity (N := len): O(log(N)*M(N)).
b = new_b; wb = new_wb;
k += 2;
}
- var cl_LF pi = square(a)/t;
- return shorten(pi,len); // verkürzen und fertig
+ var cl_LF pires = square(a)/t;
+ return shorten(pires,len); // verkürzen und fertig
}
// Bit complexity (N := len): O(log(N)*M(N)).
}
var cl_LF fsum = scale_float(cl_I_to_LF(sum,actuallen),-scale);
static const cl_I J3 = "262537412640768000"; // -1728*J
- var cl_LF pi = sqrt(cl_I_to_LF(J3,actuallen)) / fsum;
- return shorten(pi,len); // verkürzen und fertig
+ var cl_LF pires = sqrt(cl_I_to_LF(J3,actuallen)) / fsum;
+ return shorten(pires,len); // verkürzen und fertig
}
// Bit complexity (N := len): O(N^2).
qv[n].~cl_I();
}
static const cl_I J3 = "262537412640768000"; // -1728*J
- var cl_LF pi = sqrt(cl_I_to_LF(J3,actuallen)) / fsum;
- return shorten(pi,len); // verkürzen und fertig
+ var cl_LF pires = sqrt(cl_I_to_LF(J3,actuallen)) / fsum;
+ return shorten(pires,len); // verkürzen und fertig
}
// Bit complexity (N := len): O(log(N)^2*M(N)).
// it using binary splitting, is an O(log N * M(N)) algorithm, and
// outperforms all of the others.
-const cl_LF cl_pi (uintC len)
+const cl_LF pi (uintC len)
{
var uintC oldlen = TheLfloat(cl_LF_pi)->len; // vorhandene Länge
if (len < oldlen)
cl_LF_pi = compute_pi_ramanujan_163_fast(newlen);
return (len < newlen ? shorten(cl_LF_pi,len) : cl_LF_pi);
}
+
+} // namespace cln
// Implementation.
+namespace cln {
+
// Subroutine.
// Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n)))
// and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1)
}
// Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))):
// O(log(N)^2*M(N)).
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
// Subroutine.
// Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n)))
// and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1)
}
// Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))):
// O(log(N)^2*M(N)).
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
// Subroutine.
// Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n)))
// and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1)
}
// Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))):
// O(log(N)^2*M(N)).
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
// Subroutine.
// Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n)))
// and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1)
}
// Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))):
// O(log(N)^2*M(N)).
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
// Subroutine.
// Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n)))
// and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1)
}
// Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))):
// O(log(N)^2*M(N)).
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
// Subroutine.
// Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n)))
// and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1)
}
// Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))):
// O(log(N)^2*M(N)).
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
// Subroutine.
// Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n)))
// and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1)
}
// Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))):
// O(log(N)^2*M(N)).
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
// Subroutine.
// Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n)))
// and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1)
}
// Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))):
// O(log(N)^2*M(N)).
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
// Subroutine.
// Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n)))
// and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1)
}
// Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))):
// O(log(N)^2*M(N)).
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
// Subroutine.
// Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n)))
// and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1)
}
// Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))):
// O(log(N)^2*M(N)).
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
// Subroutine.
// Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n)))
// and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1)
}
// Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))):
// O(log(N)^2*M(N)).
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
// Subroutine.
// Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n)))
// and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1)
}
// Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))):
// O(log(N)^2*M(N)).
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
// Subroutine.
// Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n)))
// and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1)
}
// Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))):
// O(log(N)^2*M(N)).
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
// Subroutine.
// Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n)))
// and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1)
}
// Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))):
// O(log(N)^2*M(N)).
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
// Subroutine.
// Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n)))
// and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1)
}
// Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))):
// O(log(N)^2*M(N)).
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
// Subroutine.
// Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n)))
// and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1)
}
// Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))):
// O(log(N)^2*M(N)).
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
// Subroutine.
// Evaluates S = sum(N1 <= n < N2, a(n)/b(n) * (p(N1)...p(n))/(q(N1)...q(n)))
// and returns P = p(N1)...p(N2-1), Q = q(N1)...q(N2-1), B = B(N1)...B(N2-1)
}
// Bit complexity (if p(n), q(n), a(n), b(n) have length O(log(n))):
// O(log(N)^2*M(N)).
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
static void eval_pq_series_aux (uintL N1, uintL N2,
cl_pq_series_stream& args,
cl_I* P, cl_I* Q, cl_I* T)
eval_pq_series_aux(0,N,args,NULL,&Q,&T);
return cl_I_to_LF(T,len) / cl_I_to_LF(Q,len);
}
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
static void eval_pqa_series_aux (uintL N1, uintL N2,
cl_pqa_series_stream& args,
cl_I* P, cl_I* Q, cl_I* T)
eval_pqa_series_aux(0,N,args,NULL,&Q,&T);
return cl_I_to_LF(T,len) / cl_I_to_LF(Q,len);
}
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
static void eval_pqab_series_aux (uintL N1, uintL N2,
cl_pqab_series_stream& args,
cl_I* P, cl_I* Q, cl_I* B, cl_I* T)
eval_pqab_series_aux(0,N,args,NULL,&Q,&B,&T);
return cl_I_to_LF(T,len) / cl_I_to_LF(B*Q,len);
}
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
static void eval_pqb_series_aux (uintL N1, uintL N2,
cl_pqb_series_stream& args,
cl_I* P, cl_I* Q, cl_I* B, cl_I* T)
eval_pqb_series_aux(0,N,args,NULL,&Q,&B,&T);
return cl_I_to_LF(T,len) / cl_I_to_LF(B*Q,len);
}
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_LF eval_pqcd_series (uintL N, cl_pqcd_series_term* args, uintC len)
{
if (N==0)
return
cl_I_to_LF(sums.V,len) / The(cl_LF)(sums.D * cl_I_to_LF(sums.T,len));
}
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
+
+namespace cln {
void eval_pqcd_series_aux (uintL N, cl_pqcd_series_term* args, cl_pqcd_series_result& Z, cl_boolean rightmost)
{
}
}
}
+
+} // namespace cln
// Implementation.
-#include "cl_lfloat.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/lfloat.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_LF eval_pqd_series (uintL N, cl_pqd_series_term* args, uintC len)
{
if (N==0)
return
cl_I_to_LF(sums.V,len) / The(cl_LF)(sums.D * cl_I_to_LF(sums.T,len));
}
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
+
+namespace cln {
void eval_pqd_series_aux (uintL N, cl_pqd_series_term* args, cl_pqd_series_result& Z, cl_boolean rightmost)
{
}
}
}
+
+} // namespace cln
#ifndef _CL_LF_TRAN_H
#define _CL_LF_TRAN_H
-#include "cl_integer.h"
-#include "cl_lfloat.h"
+#include "cln/integer.h"
+#include "cln/lfloat.h"
+namespace cln {
// Subroutine for evaluating
// sum(0 <= n < N, a(n)/b(n) * (p(0)...p(n))/(q(0)...q(n)))
// Ditto, but returns U/S.
extern const cl_LF eval_pqd_series (uintL N, cl_pqd_series_term* args, uintC len);
+} // namespace cln
#endif /* _CL_LF_TRAN_H */
-// cl_zeta3().
+// zeta3().
// General includes.
#include "cl_sysdep.h"
// Implementation.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF_tran.h"
#include "cl_LF.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_alloca.h"
-const cl_LF cl_zeta3 (uintC len)
+namespace cln {
+
+const cl_LF zeta3 (uintC len)
{
// Method:
// /infinity \
// 50000 3723
// asymp. FAST N^2 FAST FAST
// (FAST means O(log(N)^2*M(N)))
+
+} // namespace cln
-// cl_zeta().
+// zeta().
// General includes.
#include "cl_sysdep.h"
// Implementation.
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF_tran.h"
#include "cl_LF.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
#include "cl_alloca.h"
+namespace cln {
+
const cl_LF compute_zeta_exp (int s, uintC len)
{
// Method:
//
// The break-even point between cvz1 and cvz2 seems to grow linearly with s.
-const cl_LF cl_zeta (int s, uintC len)
+const cl_LF zeta (int s, uintC len)
{
if (!(s > 1))
cl_abort();
return compute_zeta_cvz2(s,len);
}
// Bit complexity (N = len): O(log(N)^2*M(N)).
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_2DS.h"
#include "cl_I_log.h"
+namespace cln {
+
const cl_I cl_div2adic (uintL n, const cl_I& x, const cl_I& y)
{
var uintL len = ceiling(n,intDsize);
}
// Bit complexity (N := n): O(M(N)).
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_2DS.h"
#include "cl_I_log.h"
+namespace cln {
+
const cl_I cl_recip2adic (uintL n, const cl_I& x)
{
var uintL len = ceiling(n,intDsize);
}
// Bit complexity (N := n): O(M(N)).
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
+namespace cln {
+
// Methode:
// Falls x=0 oder x=1: x = x^n -> JA, x als Ergebnis.
// Hier also x>1. Suche ein Integer y > 1 mit x=y^n.
{ return cl_false; }
return cl_rootp_aux(x,n,w);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
+namespace cln {
+
// Methode:
// Falls x=0 oder x=1: x = x^n -> JA, x als Ergebnis.
// Hier also x>1. Suche ein Integer y > 1 mit x=y^n.
// Nun ist n < (integer-length x). Also paßt n in ein uintL.
return cl_rootp_aux(x,cl_I_to_UL(n),w);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_2D.h"
#include "cl_2DS.h"
+namespace cln {
+
// Stellt fest, ob ein Integer >=0 eine n-te Potenz ist.
// rootp(x,n,&w)
// > x: ein Integer >=0
return cl_true;
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
-#include "cl_number.h"
-#include "cl_io.h"
-#include "cl_integer_io.h"
-#include "cl_abort.h"
+#include "cln/number.h"
+#include "cln/io.h"
+#include "cln/integer_io.h"
+#include "cln/abort.h"
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
cl_boolean isqrt (const cl_I& x, cl_I* w)
{
if (minusp(x)) {
- fprint(cl_stderr, "isqrt: applied to negative number: ");
- fprint(cl_stderr, x);
- fprint(cl_stderr, "\n");
+ fprint(stderr, "isqrt: applied to negative number: ");
+ fprint(stderr, x);
+ fprint(stderr, "\n");
cl_abort();
}
CL_ALLOCA_STACK;
}
// Bit complexity (x of length N): O(M(N)).
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
cl_boolean sqrtp (const cl_I& x, cl_I* w)
{
// Methode:
}
// Bit complexity (x of length N): O(M(N)).
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_DS.h"
#include "cl_I_ash.h"
+namespace cln {
+
const cl_I ash (const cl_I& x, sintL y)
{
// Methode:
sign: // Ergebnis ist 0, falls x>=0, und -1, falls x<0:
return (minusp(x) ? cl_I(-1) : cl_I(0));
}
+
+} // namespace cln
#ifndef _CL_I_ASH_H
#define _CL_I_ASH_H
-#include "cl_number.h"
-#include "cl_integer_class.h"
+#include "cln/number.h"
+#include "cln/integer_class.h"
#include "cl_macros.h"
+namespace cln {
+
nonreturning_function(extern, cl_ash_error, (const cl_I& badamount));
+} // namespace cln
+
#endif /* _CL_I_ASH_H */
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_DS.h"
#include "cl_I_ash.h"
+namespace cln {
+
const cl_I ash (const cl_I& x, const cl_I& y)
{
// Methode:
sign: // Ergebnis ist 0, falls x>=0, und -1, falls x<0:
return (minusp(x) ? cl_I(-1) : cl_I(0));
}
+
+} // namespace cln
// Implementation.
-#include "cl_number.h"
-#include "cl_io.h"
-#include "cl_integer_io.h"
-#include "cl_abort.h"
+#include "cln/number.h"
+#include "cln/io.h"
+#include "cln/integer_io.h"
+#include "cln/abort.h"
+
+namespace cln {
void cl_ash_error (const cl_I& badamount)
{
- fprint(cl_stderr, "ash: too large shift amount: ");
- fprint(cl_stderr, badamount);
- fprint(cl_stderr, "\n");
+ fprint(stderr, "ash: too large shift amount: ");
+ fprint(stderr, badamount);
+ fprint(stderr, "\n");
cl_abort();
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
+namespace cln {
+
const cl_I boole (cl_boole op, const cl_I& x, const cl_I& y)
{
switch (op) {
NOTREACHED
}
}
+
+} // namespace cln
#ifndef _CL_I_BYTE_H
#define _CL_I_BYTE_H
-#include "cl_number.h"
-#include "cl_integer_class.h"
+#include "cln/number.h"
+#include "cln/integer_class.h"
+
+namespace cln {
// cl_fullbyte(p,q) liefert zu p,q die Zahl 2^q-2^p als Integer,
// wobei p und q uintL sind. Bei p<=q ist das Ergebnis also
// Ergebnis (wie bei MASK-FIELD) ein Integer >=0.
extern const cl_I mkf_extract (const cl_I& x, uintL p, uintL q);
+} // namespace cln
+
#endif /* _CL_I_BYTE_H */
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
+namespace cln {
+
const cl_I dpb (const cl_I& newbyte, const cl_I& n, const cl_byte& b)
{
// Methode:
// = (DEPOSIT-FIELD (ASH newbyte p) (byte s p) integer)
return deposit_field(ash(newbyte,b.position),n,b);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
+namespace cln {
+
const cl_I deposit_field (const cl_I& newbyte, const cl_I& n, const cl_byte& b)
{
// Methode:
// ) )
return logxor(n, ash(logxor(ldb(newbyte,b),ldb(n,b)), b.position));
}
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
+namespace cln {
+
const cl_I cl_fullbyte (uintL p, uintL q)
{
if (p==q)
else
return ash(-1,UL_to_I(p)) + ash(1,UL_to_I(q));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
uintL integer_length (const cl_I& x)
{
if (fixnump(x))
return bitcount; // 0 <= bitcount < intDsize*2^intCsize.
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_I_byte.h"
+namespace cln {
+
const cl_I ldb (const cl_I& n, const cl_byte& b)
{
// Methode:
return erg;
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_I_byte.h"
+namespace cln {
+
cl_boolean ldb_test (const cl_I& n, const cl_byte& b)
{
// Methode:
return ldb_extract_test(n,p,ps);
}
}
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_I ldb_extract (const cl_I& x, uintL p, uintL q)
{ CL_ALLOCA_STACK;
var const uintD* MSDptr;
// Jetzt enthält die UDS newMSDptr/len/.. die extrahierten Bits.
return UDS_to_I(newMSDptr,len); // UDS in Integer umwandeln
}
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
cl_boolean ldb_extract_test (const cl_I& x, uintL p, uintL q)
{ var const uintD* MSDptr;
var uintC len;
if (DS_test_loop(MSDptr,len,LSDptr)) { return cl_true; } else { return cl_false; }
}
+} // namespace cln
#ifndef _CL_I_LOG_H
#define _CL_I_LOG_H
-#include "cl_number.h"
+#include "cln/number.h"
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
// Liefert die Anzahl Digits, die ein Integer als DS bräuchte.
// (Leicht aufgerundet.)
inline uintC I_to_DS_need (const cl_I& x)
}
extern uintD* I_to_DS_n_aux (const cl_I& obj, uintC n, uintD* destptr);
+} // namespace cln
+
#endif /* _CL_I_LOG_H */
// Implementation.
-#include "cl_number.h"
+#include "cln/number.h"
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
uintD* I_to_DS_n_aux (const cl_I& obj, uintC n, uintD* destptr)
{ // Nun sind unterhalb von destptr n Digits Platz.
// oberen Teil der DS aus obj füllen, dabei destptr erniedrigen:
// destptr zeigt nun aufs untere Ende der DS.
return destptr;
}
+
+} // namespace cln
+
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_DS.h"
#include "cl_I_log.h"
+namespace cln {
+
// Logische Operationen auf Integers:
// Methode: aus den Längen der beiden Argumente eine obere Schranke für
// die Länge des Ergebnisses berechnen (das Maximum der beiden Längen und
and_loop_msp(xptr,yptr,n); // mit AND verknüpfen
return DS_to_I(zptr,n); // Ergebnis als Integer
} }}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_DS.h"
#include "cl_I_log.h"
+namespace cln {
+
// Logische Operationen auf Integers:
// Methode: aus den Längen der beiden Argumente eine obere Schranke für
// die Länge des Ergebnisses berechnen (das Maximum der beiden Längen und
andc2_loop_msp(xptr,yptr,n); // mit AND NOT verknüpfen
return DS_to_I(zptr,n); // Ergebnis als Integer
} }}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
cl_boolean logbitp (uintL x, const cl_I& y)
{
// Methode:
else
return cl_false;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
-#include "cl_io.h"
-#include "cl_integer_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/integer_io.h"
+#include "cln/abort.h"
+
+namespace cln {
cl_boolean logbitp (const cl_I& x, const cl_I& y)
{
}
else
// x<0
- { fprint(cl_stderr, "logbitp: Index is negative: ");
- fprint(cl_stderr, x);
- fprint(cl_stderr, "\n");
+ { fprint(stderr, "logbitp: Index is negative: ");
+ fprint(stderr, x);
+ fprint(stderr, "\n");
cl_abort();
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_D.h"
#include "cl_low.h"
+namespace cln {
+
uintL logcount (const cl_I& x)
{
if (fixnump(x))
return bitcount;
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_DS.h"
#include "cl_I_log.h"
+namespace cln {
+
// Logische Operationen auf Integers:
// Methode: aus den Längen der beiden Argumente eine obere Schranke für
// die Länge des Ergebnisses berechnen (das Maximum der beiden Längen und
eqv_loop_msp(xptr,yptr,n); // mit NOT XOR verknüpfen
return DS_to_I(zptr,n); // Ergebnis als Integer
} }}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_DS.h"
#include "cl_I_log.h"
+namespace cln {
+
// Logische Operationen auf Integers:
// Methode: aus den Längen der beiden Argumente eine obere Schranke für
// die Länge des Ergebnisses berechnen (das Maximum der beiden Längen und
or_loop_msp(xptr,yptr,n); // mit OR verknüpfen
return DS_to_I(zptr,n); // Ergebnis als Integer
} }}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_DS.h"
#include "cl_I_log.h"
+namespace cln {
+
// Logische Operationen auf Integers:
// Methode: aus den Längen der beiden Argumente eine obere Schranke für
// die Länge des Ergebnisses berechnen (das Maximum der beiden Längen und
nand_loop_msp(xptr,yptr,n); // mit NOT AND verknüpfen
return DS_to_I(zptr,n); // Ergebnis als Integer
} }}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_DS.h"
#include "cl_I_log.h"
+namespace cln {
+
// Logische Operationen auf Integers:
// Methode: aus den Längen der beiden Argumente eine obere Schranke für
// die Länge des Ergebnisses berechnen (das Maximum der beiden Längen und
nor_loop_msp(xptr,yptr,n); // mit NOT OR verknüpfen
return DS_to_I(zptr,n); // Ergebnis als Integer
} }}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_DS.h"
#include "cl_I_log.h"
+namespace cln {
+
const cl_I lognot (const cl_I& x)
{ if (fixnump(x)) // Fixnum -> ganz einfach:
{ // bitweise als Fixnum zurück
// und die ersten intDsize+1 Bit nicht alle gleich sind.
return NDS_to_I(MSDptr,n); // Ergebnis als Integer
} }
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_DS.h"
#include "cl_I_log.h"
+namespace cln {
+
// Logische Operationen auf Integers:
// Methode: aus den Längen der beiden Argumente eine obere Schranke für
// die Länge des Ergebnisses berechnen (das Maximum der beiden Längen und
orc2_loop_msp(xptr,yptr,n); // mit OR NOT verknüpfen
return DS_to_I(zptr,n); // Ergebnis als Integer
} }}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
cl_boolean logtest (const cl_I& x, const cl_I& y)
{
// Methode:
return and_test_loop_msp(xMSDptr,yMSDptr,xlen);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_DS.h"
#include "cl_I_log.h"
+namespace cln {
+
// Logische Operationen auf Integers:
// Methode: aus den Längen der beiden Argumente eine obere Schranke für
// die Länge des Ergebnisses berechnen (das Maximum der beiden Längen und
xor_loop_msp(xptr,yptr,n); // mit XOR verknüpfen
return DS_to_I(zptr,n); // Ergebnis als Integer
} }}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_I_byte.h"
+namespace cln {
+
const cl_I mask_field (const cl_I& n, const cl_byte& b)
{
// Methode:
return erg;
} }
}
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_I mkf_extract (const cl_I& x, uintL p, uintL q)
{
CL_ALLOCA_STACK;
// Jetzt enthält die UDS newMSDptr/len/.. die extrahierten Bits.
return UDS_to_I(newMSDptr,len);
}
+
+} // namespace cln
#ifndef _CL_I_H
#define _CL_I_H
-#include "cl_number.h"
-#include "cl_integer.h"
+#include "cln/number.h"
+#include "cln/integer.h"
#include "cl_macros.h"
-#include "cl_malloc.h"
-#include "cl_abort.h"
+#include "cln/malloc.h"
+#include "cln/abort.h"
#include "cl_offsetof.h"
#include "cl_DS.h"
+namespace cln {
// maximal needed length of a digit sequence for a fixnum
#define FN_maxlength ceiling(cl_value_len,intDsize)
inline cl_heap_bignum* allocate_bignum (unsigned int length)
{
- cl_heap_bignum* p = (cl_heap_bignum*) cl_malloc_hook(offsetofa(cl_heap_bignum,data)+sizeof(uintD)*length);
+ cl_heap_bignum* p = (cl_heap_bignum*) malloc_hook(offsetofa(cl_heap_bignum,data)+sizeof(uintD)*length);
p->refcount = 1;
p->type = &cl_class_bignum;
p->length = length;
inline cl_boolean zerop (const cl_BN& x)
{ unused x; return cl_false; }
+} // namespace cln
+
#endif /* _CL_I_H */
// Implementation.
+namespace cln {
+
uintL cl_digits_need (const cl_I& x, uintL base)
{
if (fixnump(x))
return need;
}
}
+
+} // namespace cln
// Implementation.
-#include "cl_number.h"
+#include "cln/number.h"
#include "cl_DS.h"
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
#include "cl_I_from_NDS.cc"
+namespace cln {
+
MAYBE_INLINE2
const cl_I DS_to_I (const uintD* MSDptr, uintC len)
{
// aber NDS_to_I wird auch damit fertig.
return NDS_to_I(MSDptr,len);
}
+
+} // namespace cln
// Implementation.
-#include "cl_number.h"
+#include "cln/number.h"
#if (cl_value_len < 32)
#include "cl_DS.h"
+namespace cln {
+
cl_private_thing cl_I_constructor_from_L (sint32 wert)
{
var uint32 test = wert & minus_bit(cl_value_len-1);
}
}
+} // namespace cln
+
#endif
// Implementation.
-#include "cl_number.h"
+#include "cln/number.h"
#include "cl_DS.h"
+namespace cln {
+
cl_private_thing cl_I_constructor_from_L2 (sint32 wert_hi, uint32 wert_lo)
{
if (wert_hi == 0) {
#undef IF_LENGTH
}
}
+
+} // namespace cln
// Implementation.
-#include "cl_number.h"
+#include "cln/number.h"
#include "cl_DS.h"
+namespace cln {
+
MAYBE_INLINE
const cl_I NDS_to_I (const uintD* MSDptr, uintC len)
{
return result;
}
}
+
+} // namespace cln
// Implementation.
-#include "cl_number.h"
+#include "cln/number.h"
#include "cl_DS.h"
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
#include "cl_I_from_NDS.cc"
+namespace cln {
+
MAYBE_INLINE2
const cl_I NUDS_to_I (uintD* MSDptr, uintC len)
{
{ lsprefnext(MSDptr) = 0; len++; }
return NDS_to_I(MSDptr,len);
}
+
+} // namespace cln
// Implementation.
-#include "cl_number.h"
+#include "cln/number.h"
#ifdef intQsize
#include "cl_DS.h"
+namespace cln {
+
cl_private_thing cl_I_constructor_from_Q (sint64 wert)
{
var uint64 test = wert & (sint64)minus_bit(cl_value_len-1);
}
}
+} // namespace cln
+
#endif
// Implementation.
-#include "cl_number.h"
+#include "cln/number.h"
#include "cl_DS.h"
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
#include "cl_I_from_NDS.cc"
+namespace cln {
+
MAYBE_INLINE2
const cl_I UDS_to_I (uintD* MSDptr, uintC len)
{
{ lsprefnext(MSDptr) = 0; len++; }
return NDS_to_I(MSDptr,len);
}
+
+} // namespace cln
// Implementation.
-#include "cl_number.h"
+#include "cln/number.h"
#if (cl_value_len <= 32)
#include "cl_DS.h"
+namespace cln {
+
cl_private_thing cl_I_constructor_from_UL (uint32 wert)
{
if ((wert & minus_bit(cl_value_len-1)) == 0)
#undef UL_maxlength
}
+} // namespace cln
+
#endif
// Implementation.
-#include "cl_number.h"
+#include "cln/number.h"
#include "cl_DS.h"
+namespace cln {
+
cl_private_thing cl_I_constructor_from_UL2 (uint32 wert_hi, uint32 wert_lo)
{
if ((wert_hi == 0)
#undef IF_LENGTH
#undef UL2_maxlength
}
+
+} // namespace cln
// Implementation.
-#include "cl_number.h"
+#include "cln/number.h"
#ifdef intQsize
#include "cl_DS.h"
+namespace cln {
+
cl_private_thing cl_I_constructor_from_UQ (uint64 wert)
{
if ((wert & (sint64)minus_bit(cl_value_len-1)) == 0)
#undef UQ_maxlength
}
+} // namespace cln
+
#endif
#include "cl_DS.h"
+namespace cln {
+
const cl_I digits_to_I (const char * MSBptr, uintL len, uintD base)
{
CL_ALLOCA_STACK;
}
return NUDS_to_I(erg_MSDptr,erg_len);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_I mul_10_plus_x (const cl_I& y, unsigned char x)
{
CL_ALLOCA_STACK;
{ lsprefnext(MSDptr) = carry; len++; }
return UDS_to_I(MSDptr,len); // UDS als Integer zurück
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
-#include "cl_number.h"
+#include "cln/number.h"
#include "cl_I.h"
#include "cl_DS.h"
-#include "cl_io.h"
-#include "cl_integer_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/integer_io.h"
+#include "cln/abort.h"
+
+namespace cln {
sint32 cl_I_to_L (const cl_I& obj)
{
#undef IF_LENGTH
}
bad: // unpassendes Objekt
- fprint(cl_stderr, "Not a 32-bit integer: ");
- fprint(cl_stderr, obj);
- fprint(cl_stderr, "\n");
+ fprint(stderr, "Not a 32-bit integer: ");
+ fprint(stderr, obj);
+ fprint(stderr, "\n");
cl_abort();
}
}
+
+} // namespace cln
#ifdef intQsize
-#include "cl_number.h"
+#include "cln/number.h"
#include "cl_DS.h"
-#include "cl_io.h"
-#include "cl_integer_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/integer_io.h"
+#include "cln/abort.h"
+
+namespace cln {
sint64 cl_I_to_Q (const cl_I& obj)
{
#undef IF_LENGTH
}
bad: // unpassendes Objekt
- fprint(cl_stderr, "Not a 64-bit integer: ");
- fprint(cl_stderr, obj);
- fprint(cl_stderr, "\n");
+ fprint(stderr, "Not a 64-bit integer: ");
+ fprint(stderr, obj);
+ fprint(stderr, "\n");
cl_abort();
}
}
+} // namespace cln
+
#endif
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
-#include "cl_number.h"
+#include "cln/number.h"
#include "cl_I.h"
#include "cl_DS.h"
-#include "cl_io.h"
-#include "cl_integer_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/integer_io.h"
+#include "cln/abort.h"
+
+namespace cln {
uint32 cl_I_to_UL (const cl_I& obj)
{
#undef IF_LENGTH
}
bad: // unpassendes Objekt
- fprint(cl_stderr, "Not a 32-bit integer: ");
- fprint(cl_stderr, obj);
- fprint(cl_stderr, "\n");
+ fprint(stderr, "Not a 32-bit integer: ");
+ fprint(stderr, obj);
+ fprint(stderr, "\n");
cl_abort();
}
+
+} // namespace cln
#ifdef intQsize
-#include "cl_number.h"
+#include "cln/number.h"
#include "cl_DS.h"
-#include "cl_io.h"
-#include "cl_integer_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/integer_io.h"
+#include "cln/abort.h"
+
+namespace cln {
uint64 cl_I_to_UQ (const cl_I& obj)
{
#undef IF_LENGTH
}
bad: // unpassendes Objekt
- fprint(cl_stderr, "Not a 64-bit integer: ");
- fprint(cl_stderr, obj);
- fprint(cl_stderr, "\n");
+ fprint(stderr, "Not a 64-bit integer: ");
+ fprint(stderr, obj);
+ fprint(stderr, "\n");
cl_abort();
}
+} // namespace cln
+
#endif
#include "cl_DS.h"
+namespace cln {
+
// Tabelle: enthält zu jeder Basis b (2 <= b <= 36)
// - eine Kettenbruchapproximation num/den von intDsize*log(2)/log(b)
// (num/den >= intDsize*log(2)/log(b), mit num <= 2^10)
cached_power_table () {}
~cached_power_table () {}
// Allocation and deallocation.
- void* operator new (size_t size) { return cl_malloc_hook(size); }
- void operator delete (void* ptr) { cl_free_hook(ptr); }
+ void* operator new (size_t size) { return malloc_hook(size); }
+ void operator delete (void* ptr) { free_hook(ptr); }
};
static cached_power_table* ctable [36-2+1] =
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
}
// Bit complexity (N := length(X)): O(log(N)*M(N)).
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
+namespace cln {
+
const cl_I ceiling1 (const cl_I& x, const cl_I& y)
{
// Methode:
{ q = -q; }
return q;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
+namespace cln {
+
const cl_I_div_t ceiling2 (const cl_I& x, const cl_I& y)
{
// Methode:
{ q = -q; }
return q_r;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
+namespace cln {
+
const cl_I exquo (const cl_I& x, const cl_I& y)
{
// Methode:
else
{ return -q_r.quotient; }
}
+
+} // namespace cln
// Implementation.
-#include "cl_io.h"
-#include "cl_integer_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/integer_io.h"
+#include "cln/abort.h"
+
+namespace cln {
void cl_error_exquo (const cl_I& x, const cl_I& y)
{
- fprint(cl_stderr, "Quotient ");
- fprint(cl_stderr, x);
- fprint(cl_stderr, " / ");
- fprint(cl_stderr, y);
- fprint(cl_stderr, " is not an integer.\n");
+ fprint(stderr, "Quotient ");
+ fprint(stderr, x);
+ fprint(stderr, " / ");
+ fprint(stderr, y);
+ fprint(stderr, " is not an integer.\n");
cl_abort();
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
+namespace cln {
+
const cl_I exquopos (const cl_I& x, const cl_I& y)
{
// Methode:
if (!zerop(q_r.remainder)) { cl_error_exquo(x,y); }
return q_r.quotient;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
+namespace cln {
+
const cl_I floor1 (const cl_I& x, const cl_I& y)
{
// Methode:
}
return q;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
+namespace cln {
+
const cl_I_div_t floor2 (const cl_I& x, const cl_I& y)
{
// Methode:
{ q = -q; }
return q_r;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
+namespace cln {
+
const cl_I mod (const cl_I& x, const cl_I& y)
{
// Methode:
}
if (minusp(x)) { return -r; } else { return r; }
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
+namespace cln {
+
const cl_I rem (const cl_I& x, const cl_I& y)
{
// Methode:
var cl_I r = cl_divide(abs(x),abs(y)).remainder;
if (minusp(x)) { return -r; } else { return r; }
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
+namespace cln {
+
const cl_I round1 (const cl_I& x, const cl_I& y)
{
// Methode:
{ q = -q; }
return q;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
+namespace cln {
+
const cl_I_div_t round2 (const cl_I& x, const cl_I& y)
{
// Methode:
{ q = -q; }
return q_r;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
+namespace cln {
+
const cl_I truncate1 (const cl_I& x, const cl_I& y)
{
// Methode:
{ q = -q; }
return q;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
+namespace cln {
+
const cl_I_div_t truncate2 (const cl_I& x, const cl_I& y)
{
// Methode:
{ q = -q; }
return q_r;
}
+
+} // namespace cln
-// cl_compare().
+// compare().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
-cl_signean cl_compare (const cl_I& x, const cl_I& y)
+namespace cln {
+
+cl_signean compare (const cl_I& x, const cl_I& y)
{
// Methode:
// x und y haben verschiedenes Vorzeichen ->
return (xlen > ylen ? signean_minus : signean_plus);
}
}
+
+} // namespace cln
#include "cl_N.h"
+namespace cln {
+
// Dividiert zwei Integers x,y >=0 und liefert Quotient und Rest
// der Division x/y. Bei y=0 Error.
// cl_divide(x,y)
}
// Bit complexity (N = length(x)): O(M(N)).
+} // namespace cln
-// cl_equal().
+// equal().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
-cl_boolean cl_equal (const cl_I& x, const cl_I& y)
+namespace cln {
+
+cl_boolean equal (const cl_I& x, const cl_I& y)
{
// Methode:
// x und y haben gleiches Vorzeichen ->
return cl_false;
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_I operator- (const cl_I& x, const cl_I& y)
{
// Methode:
}
} }
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_I minus1 (const cl_I& x)
{
if (fixnump(x))
return DS_to_I(MSDptr,len); // wieder zum Integer machen
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#undef minusp
+namespace cln {
+
cl_boolean minusp (const cl_I& x)
{
return inline_minusp(x);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_DS.h"
#include "cl_low.h"
+namespace cln {
+
const cl_I operator* (const cl_I& x, const cl_I& y)
{
// Methode:
}
// Bit complexity (x,y of length N): O(M(N)).
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_I operator+ (const cl_I& x, const cl_I& y)
{
// Methode:
}
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_I plus1 (const cl_I& x)
{
if (fixnump(x))
return DS_to_I(MSDptr,len); // wieder zum Integer machen
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#undef zerop
#undef minusp
+namespace cln {
+
cl_boolean plusp (const cl_I& x)
{
if (inline_minusp(x))
else
return cl_true; // sonst ist x>0.
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_DS.h"
#include "cl_low.h"
+namespace cln {
+
const cl_I square (const cl_I& x)
{
// Methode:
}
// Bit complexity (x of length N): O(M(N)).
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
const cl_I operator- (const cl_I& x)
{
if (fixnump(x)) {
return DS_to_I(MSDptr,len); // DS wieder zum Integer machen
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#undef zerop
+namespace cln {
+
cl_boolean zerop (const cl_I& x)
{
return inline_zerop(x);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_D.h"
#include "cl_xmacros.h"
+namespace cln {
+
#define GCD_ALGO 3 // 1: binär, 2: Schulmethode, 3: Lehmer
{ // bleibt Fixnum, da (gcd a b) <= (min a b)
return L_to_FN(gcd(FN_to_UL(a),FN_to_UL(b)));
}
- { var cl_signean vergleich = cl_compare(a,b);
+ { var cl_signean vergleich = compare(a,b);
if (vergleich == 0) { return a; } // a=b -> fertig
if (vergleich < 0) { var cl_I tmp = a; a = b; b = a; } // a<b -> a,b vertauschen
}
}
#endif /* GCD_ALGO == 3 */
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_D.h"
+namespace cln {
+
void partial_gcd (uintD z1, uintD z2, partial_gcd_result* erg)
{ var uintD x1 = 1;
var uintD y1 = 0;
// Keine Subtraktion mehr möglich.
erg->x1 = x1; erg->y1 = y1; erg->x2 = x2; erg->y2 = y2; // Ergebnis
}
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_D.h"
+namespace cln {
+
// Dasselbe wie partial_gcd(z1,z2,erg), nur daß z1 und z2 Doppelworte sind.
// Bevor im Ergebnis erg ein Überlauf eintritt, wird abgebrochen.
}
#endif
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
+namespace cln {
+
const cl_I lcm (const cl_I& a, const cl_I& b)
{
// Methode:
return a*b;
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_D.h"
#include "cl_xmacros.h"
+namespace cln {
+
#define GCD_ALGO 3 // 1: binär, 2: Schulmethode, 3: Lehmer
{ *u = ua; *v = va; return a; }
if (eq(a,0)) // a=0 -> g=b, (u,v) = (ub,vb)
{ *u = ub; *v = vb; return b; }
- { var cl_signean vergleich = cl_compare(a,b);
+ { var cl_signean vergleich = compare(a,b);
if (vergleich == 0) // a=b -> fertig
{ *u = ua; *v = va; return a; }
if (vergleich < 0) // a<b -> a,b vertauschen
}
#endif /* GCD_ALGO == 3 */
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
+namespace cln {
+
// Liefert den ggT zweier Integers.
// gcd(a,b)
// > a,b: zwei Integers
// a=b>0
return a;
}
+
+} // namespace cln
#include "cl_I.h"
#include "cl_hash1.h"
+namespace cln {
+
static void cl_hashtable_from_integer_to_gcobject_destructor (cl_heap* pointer)
{
#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug
((cl_heap_hashtable_from_integer_to_gcobject*)pointer)->put(x,y);
}
+} // namespace cln
#ifndef _CL_I_HASH_GCOBJECT_H
#define _CL_I_HASH_GCOBJECT_H
-#include "cl_number.h"
-#include "cl_integer.h"
-
-// For the sake of gcc-2.7.x, this declaration must come before cl_hash1.h.
-extern unsigned long hashcode (const cl_I& x);
-
+#include "cln/number.h"
+#include "cln/integer.h"
#include "cl_hash1.h"
-// Equality.
-static inline bool equal (const cl_I& x, const cl_I& y)
-{ return (bool)cl_equal(x,y); }
+namespace cln {
typedef cl_htentry1<cl_I,cl_gcobject> cl_htentry_from_integer_to_gcobject;
void put (const cl_I& x, const cl_gcobject& y) const;
};
+} // namespace cln
+
#endif /* _CL_I_HASH_GCOBJECT_H */
#include "cl_I.h"
#include "cl_hash1.h"
+namespace cln {
+
static void cl_hashtable_from_integer_to_gcpointer_destructor (cl_heap* pointer)
{
#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug
((cl_heap_hashtable_from_integer_to_gcpointer*)pointer)->put(x,y);
}
+} // namespace cln
#ifndef _CL_I_HASH_GCPOINTER_H
#define _CL_I_HASH_GCPOINTER_H
-#include "cl_number.h"
-#include "cl_integer.h"
-
-// For the sake of gcc-2.7.x, this declaration must come before cl_hash1.h.
-extern unsigned long hashcode (const cl_I& x);
-
+#include "cln/number.h"
+#include "cln/integer.h"
#include "cl_hash1.h"
-// Equality.
-static inline bool equal (const cl_I& x, const cl_I& y)
-{ return (bool)cl_equal(x,y); }
+namespace cln {
typedef cl_htentry1<cl_I,cl_gcpointer> cl_htentry_from_integer_to_gcpointer;
void put (const cl_I& x, const cl_gcpointer& y) const;
};
+} // namespace cln
+
#endif /* _CL_I_HASH_GCPOINTER_H */
#include "cl_I.h"
#include "cl_hash1.h"
+namespace cln {
+
static void cl_hashtable_from_integer_to_pointer_destructor (cl_heap* pointer)
{
#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug
((cl_heap_hashtable_from_integer_to_pointer*)pointer)->put(x,y);
}
+} // namespace cln
#ifndef _CL_I_HASH_POINTER_H
#define _CL_I_HASH_POINTER_H
-#include "cl_number.h"
-#include "cl_integer.h"
-
-// For the sake of gcc-2.7.x, this declaration must come before cl_hash1.h.
-extern unsigned long hashcode (const cl_I& x);
-
+#include "cln/number.h"
+#include "cln/integer.h"
#include "cl_hash1.h"
-// Equality.
-static inline bool equal (const cl_I& x, const cl_I& y)
-{ return (bool)cl_equal(x,y); }
+namespace cln {
typedef cl_htentry1<cl_I,void*> cl_htentry_from_integer_to_pointer;
void put (const cl_I& x, void* y) const;
};
+} // namespace cln
+
#endif /* _CL_I_HASH_POINTER_H */
#include "cl_I.h"
#include "cl_hash1.h"
+namespace cln {
+
static void cl_hashtable_from_integer_to_rcobject_destructor (cl_heap* pointer)
{
#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug
((cl_heap_hashtable_from_integer_to_rcobject*)pointer)->put(x,y);
}
+} // namespace cln
#ifndef _CL_I_HASH_RCOBJECT_H
#define _CL_I_HASH_RCOBJECT_H
-#include "cl_number.h"
-#include "cl_integer.h"
-
-// For the sake of gcc-2.7.x, this declaration must come before cl_hash1.h.
-extern unsigned long hashcode (const cl_I& x);
-
+#include "cln/number.h"
+#include "cln/integer.h"
#include "cl_hash1.h"
-// Equality.
-static inline bool equal (const cl_I& x, const cl_I& y)
-{ return (bool)cl_equal(x,y); }
+namespace cln {
typedef cl_htentry1<cl_I,cl_rcobject> cl_htentry_from_integer_to_rcobject;
void put (const cl_I& x, const cl_rcobject& y) const;
};
+} // namespace cln
+
#endif /* _CL_I_HASH_RCOBJECT_H */
#include "cl_I.h"
#include "cl_hash1.h"
+namespace cln {
+
static void cl_hashtable_from_integer_to_rcpointer_destructor (cl_heap* pointer)
{
#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug
((cl_heap_hashtable_from_integer_to_rcpointer*)pointer)->put(x,y);
}
+} // namespace cln
#ifndef _CL_I_HASH_RCPOINTER_H
#define _CL_I_HASH_RCPOINTER_H
-#include "cl_number.h"
-#include "cl_integer.h"
-
-// For the sake of gcc-2.7.x, this declaration must come before cl_hash1.h.
-extern unsigned long hashcode (const cl_I& x);
-
+#include "cln/number.h"
+#include "cln/integer.h"
#include "cl_hash1.h"
-// Equality.
-static inline bool equal (const cl_I& x, const cl_I& y)
-{ return (bool)cl_equal(x,y); }
+namespace cln {
typedef cl_htentry1<cl_I,cl_rcpointer> cl_htentry_from_integer_to_rcpointer;
void put (const cl_I& x, const cl_rcpointer& y) const;
};
+} // namespace cln
+
#endif /* _CL_I_HASH_RCPOINTER_H */
// Implementation.
+namespace cln {
+
unsigned long hashcode (const cl_I& x)
{
var unsigned long code = 0x814BE3A5;
}
return code;
}
+
+} // namespace cln
#include "cl_I.h"
#include "cl_hash1weak.h"
+namespace cln {
+
static void cl_weak_hashtable_from_integer_to_rcpointer_destructor (cl_heap* pointer)
{
#if (defined(__mips__) || defined(__mips64__)) && !defined(__GNUC__) // workaround SGI CC bug
((cl_heap_weak_hashtable_from_integer_to_rcpointer*)pointer)->put(x,y);
}
+} // namespace cln
#ifndef _CL_I_HASHWEAK_RCPOINTER_H
#define _CL_I_HASHWEAK_RCPOINTER_H
-#include "cl_number.h"
-#include "cl_integer.h"
-
-// For the sake of gcc-2.7.x, this declaration must come before cl_hash1.h.
-extern unsigned long hashcode (const cl_I& x);
-
+#include "cln/number.h"
+#include "cln/integer.h"
#include "cl_hash1weak.h"
-// Equality.
-static inline bool equal (const cl_I& x, const cl_I& y)
-{ return (bool)cl_equal(x,y); }
+namespace cln {
typedef cl_htentry1<cl_I,cl_rcpointer> cl_htentry_from_integer_to_rcpointer;
void put (const cl_I& x, const cl_rcpointer& y) const;
};
+} // namespace cln
+
#endif /* _CL_I_HASHWEAK_RCPOINTER_H */
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer_class.h"
+#include "cln/integer_class.h"
// Implementation.
-#include "cl_input.h"
-#include "cl_integer_io.h"
+#include "cln/input.h"
+#include "cln/integer_io.h"
+
+namespace cln {
cl_read_flags cl_I_read_flags = {
syntax_integer,
lsyntax_all,
10,
- { cl_float_format_ffloat, cl_float_format_lfloat_min, cl_true }
+ { float_format_ffloat, float_format_lfloat_min, cl_true }
};
cl_I::cl_I (const char * string)
pointer = as_cl_private_thing(
read_integer(cl_I_read_flags,string,NULL,NULL));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer_io.h"
+#include "cln/integer_io.h"
// Implementation.
#include <string.h>
-#include "cl_input.h"
-#include "cl_integer.h"
+#include "cln/input.h"
+#include "cln/integer.h"
#include "cl_I.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
-#undef floor
-#include <math.h>
-#define floor cln_floor
+namespace cln {
// Step forward over all digits, to the end of string or to the next non-digit.
static const char * skip_digits (const char * ptr, const char * string_limit, unsigned int base)
ASSERT((flags.syntax & ~(syntax_integer|syntax_maybe_bad)) == 0);
// If no string_limit is given, it defaults to the end of the string.
if (!string_limit)
- string_limit = string + strlen(string);
+ string_limit = string + ::strlen(string);
if (flags.syntax & syntax_integer) {
// Check for integer syntax.
var unsigned int rational_base = flags.rational_base;
goto not_integer_syntax;
var cl_I base = read_integer(10,0,ptr,0,base_end_ptr-ptr);
if (!((base >= 2) && (base <= 36))) {
- fprint(cl_stderr, "Base must be an integer in the range from 2 to 36, not ");
- fprint(cl_stderr, base);
- fprint(cl_stderr, "\n");
+ fprint(stderr, "Base must be an integer in the range from 2 to 36, not ");
+ fprint(stderr, base);
+ fprint(stderr, "\n");
cl_abort();
}
rational_base = FN_to_UL(base); ptr = base_end_ptr;
}
read_number_bad_syntax(string,string_limit);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer_io.h"
+#include "cln/integer_io.h"
// Implementation.
-#include "cl_input.h"
-#include "cl_io.h"
+#include "cln/input.h"
+#include "cln/io.h"
#include "cl_spushstring.h"
+namespace cln {
+
// We read an entire token (or even more, if it begins with #C) into a
// buffer and then call read_integer() on the buffer.
// Handle premature EOF.
eof: read_number_eof();
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer_io.h"
+#include "cln/integer_io.h"
// Implementation.
#include "cl_I.h"
+namespace cln {
+
const cl_I read_integer (unsigned int base, cl_signean sign, const char * string, uintL index1, uintL index2)
{
var cl_I x = digits_to_I(&string[index1],index2-index1,(uintD)base);
else
return -x; // negatives Vorzeichen -> Vorzeichenwechsel
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
+namespace cln {
+
cl_class cl_class_bignum = {
NULL, // empty destructor
cl_class_flags_subclass_complex | cl_class_flags_subclass_real | cl_class_flags_subclass_rational
};
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
+namespace cln {
+
cl_class cl_class_fixnum = {
NULL, // destructor not used, since not heap objects
cl_class_flags_subclass_complex | cl_class_flags_subclass_real | cl_class_flags_subclass_rational
{
cl_immediate_classes[cl_FN_tag] = &cl_class_fixnum;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
+namespace cln {
+
const cl_I abs (const cl_I& x)
{
// Methode:
else
return x;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_N.h"
+namespace cln {
+
// Cf. cl_I_p in cl_I_ring.cc.
// But here, for better inlining in g++, it is preferrable to finish every
// alternative with either "return cl_true;" or "return cl_false;".
} else
cl_as_error(x,"an integer",filename,line);
}
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
-#include "cl_io.h"
-#include "cl_integer_io.h"
+#include "cln/integer.h"
+#include "cln/io.h"
+#include "cln/integer_io.h"
+
+namespace cln {
static void dprint (cl_heap* pointer)
{
cl_register_type_printer(cl_class_bignum,dprint);
}
-// This dummy links in this module when <cl_integer.h> requires it.
+// This dummy links in this module when <cln/integer.h> requires it.
int cl_I_debug_module;
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_N.h"
#include "cl_I.h"
-inline uint32 cl_equal_hashcode (const cl_FN& x)
+namespace cln {
+
+inline uint32 equal_hashcode (const cl_FN& x)
{
var cl_signean sign;
var uint32 x32 = FN_to_L(x); // x als 32-Bit-Zahl
return equal_hashcode_low(msd,exp,sign);
}
-inline uint32 cl_equal_hashcode (const cl_BN& x)
+inline uint32 equal_hashcode (const cl_BN& x)
{
var const uintD* MSDptr;
var uintC len;
}
MAYBE_INLINE
-uint32 cl_equal_hashcode (const cl_I& x)
+uint32 equal_hashcode (const cl_I& x)
{
if (fixnump(x)) {
DeclareType(cl_FN,x);
- return cl_equal_hashcode(x);
+ return equal_hashcode(x);
} else {
DeclareType(cl_BN,x);
- return cl_equal_hashcode(x);
+ return equal_hashcode(x);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
+namespace cln {
+
const cl_I expt_pos (const cl_I& x, uintL y)
{
// Methode:
}
// Bit complexity (x of length N): O(M(N*y)).
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
+namespace cln {
+
const cl_I expt_pos (const cl_I& x, const cl_I& y)
{
// Methode:
}
// Bit complexity (x of length N): O(M(N*y)).
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
+namespace cln {
+
const cl_I max (const cl_I& x, const cl_I& y)
{
return (x >= y ? x : y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
+namespace cln {
+
const cl_I min (const cl_I& x, const cl_I& y)
{
return (x <= y ? x : y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
cl_boolean oddp (const cl_I& x)
{
if (fixnump(x)) {
return cl_false;
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
// Methode 1a:
// Sei n = ord2(x). Dann ist logxor(x,x-1) = 2^n + (2^n-1) = 2^(n+1)-1.
// Also (ord2 x) = (1- (integer-length (logxor x (1- x)))) .
return bitcount;
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
uintL power2p (const cl_I& x) // x > 0
{
// Methode 1: Wenn ord2(x) = integer_length(x)-1.
return intDsize*(uintL)(len-1) + msdlen; // integer_length(x) als Ergebnis
}}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
+namespace cln {
+
MAYBE_INLINE
const cl_I signum (const cl_I& x)
{
elif (zerop(x)) { return 0; } // x=0 -> 0
else { return 1; } // x>0 -> +1
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I_combin.h"
+namespace cln {
+
const cl_I binomial (uintL n, uintL k)
{
// Method:
prod = prod << (k + logcount(m) - logcount(n));
return exquopos(prod,factorial(k));
}
+
+} // namespace cln
#ifndef _CL_I_COMBIN_H
#define _CL_I_COMBIN_H
-#include "cl_number.h"
-#include "cl_integer_class.h"
+#include "cln/number.h"
+#include "cln/integer_class.h"
+
+namespace cln {
// UP für Fakultät:
// Bilde das Produkt prod(a < i <= b, 2*i+1), wobei 0 <= a < b klein.
extern const cl_I cl_I_prod_ungerade (uintL a, uintL b);
+} // namespace cln
+
#endif /* _CL_I_COMBIN_H */
CL_PROVIDE(cl_I_doublefactorial)
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_I_combin.h"
+namespace cln {
+
// Method:
// n <= 19 -> Get result (Fixnum) from table
// Else:
}
// Bit complexity (N := n): O(log(N)^2*M(N)).
+} // namespace cln
+
CL_PROVIDE_END(cl_I_doublefactorial)
CL_PROVIDE(cl_I_factorial)
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_I_combin.h"
+namespace cln {
+
// Methode:
// n <= 10 -> Ergebnis (Fixnum) aus Tabelle
// Sonst:
}
// Bit complexity (N := n): O(log(N)^2*M(N)).
+} // namespace cln
+
CL_PROVIDE_END(cl_I_factorial)
#include "cl_I.h"
+namespace cln {
+
const cl_I cl_I_prod_ungerade (uintL a, uintL b)
{
var uintL diff = b-a; // Anzahl der Faktoren
return cl_I_prod_ungerade(a,c) * cl_I_prod_ungerade(c,b); // zwei Teilprodukte
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer_io.h"
+#include "cln/integer_io.h"
// Implementation.
-#include "cl_output.h"
+#include "cln/output.h"
+
+namespace cln {
void print_integer (cl_ostream stream, const cl_print_flags& flags, const cl_I& z)
{
print_integer(stream,(const cl_print_number_flags&)flags,z);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer_io.h"
+#include "cln/integer_io.h"
// Implementation.
-#include "cl_output.h"
+#include "cln/output.h"
+
+namespace cln {
void print_integer (cl_ostream stream, const cl_print_number_flags& flags, const cl_I& z)
{
print_integer(stream,(const cl_print_real_flags&)flags,z);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer_io.h"
+#include "cln/integer_io.h"
// Implementation.
-#include "cl_output.h"
+#include "cln/output.h"
+
+namespace cln {
void print_integer (cl_ostream stream, const cl_print_real_flags& flags, const cl_I& z)
{
print_integer(stream,(const cl_print_rational_flags&)flags,z);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer_io.h"
+#include "cln/integer_io.h"
// Implementation.
#include "cl_DS.h"
#include "cl_sstring.h"
+namespace cln {
+
char * cl_decimal_string (const cl_I& x)
{
CL_ALLOCA_STACK;
var char* result = cl_sstring((char*)erg.MSBptr,erg.len); // Ziffern in String schreiben
return result;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer_io.h"
+#include "cln/integer_io.h"
// Implementation.
-#include "cl_output.h"
+#include "cln/output.h"
+
+namespace cln {
void print_integer (cl_ostream stream, const cl_print_rational_flags& flags, const cl_I& z)
{
// Integer in Basis base ausgeben:
print_integer(stream,base,z);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer_io.h"
+#include "cln/integer_io.h"
// Implementation.
-#include "cl_io.h"
+#include "cln/io.h"
#include "cl_I.h"
#include "cl_DS.h"
+namespace cln {
+
void print_integer (cl_ostream stream, unsigned int base, const cl_I& z)
{
var cl_I abs_z;
do { fprintchar(stream,*ptr++); } until (--count==0);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer_io.h"
+#include "cln/integer_io.h"
// Implementation.
#include "cl_DS.h"
#include "cl_sstring.h"
+namespace cln {
+
char * print_integer_to_string (unsigned int base, const cl_I& z)
{
var cl_boolean minus_p = cl_false;
var char* result = cl_sstring(ergptr,erglen); // Ziffern in String schreiben
return result;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
-const cl_I random_I (cl_random_state& randomstate, const cl_I& n)
+namespace cln {
+
+const cl_I random_I (random_state& randomstate, const cl_I& n)
{
CL_ALLOCA_STACK;
var const uintD* n_MSDptr;
// Rest in Integer umwandeln:
return NUDS_to_I(r.MSDptr,r.len);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_integer.h"
+#include "cln/integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
-const cl_I testrandom_I (cl_random_state& randomstate)
+namespace cln {
+
+const cl_I testrandom_I (random_state& randomstate)
{
var uint32 ran = random32(randomstate);
var cl_boolean negative = (cl_boolean)(ran & 1);
var cl_I x = UDS_to_I(MSDptr,len);
return (negative ? -x : x);
}
+
+} // namespace cln
CL_PROVIDE(cl_0_ring)
// Specification.
-#include "cl_null_ring.h"
+#include "cln/null_ring.h"
// Implementation.
-#include "cl_integer_class.h"
+#include "cln/integer_class.h"
+
+namespace cln {
static const _cl_ring_element null_op0 (cl_heap_ring* R)
{
const cl_null_ring cl_0_ring;
+} // namespace cln
+
CL_PROVIDE_END(cl_0_ring)
CL_PROVIDE(cl_I_ring)
// Specification.
-#include "cl_integer_ring.h"
+#include "cln/integer_ring.h"
// Implementation.
-#include "cl_integer.h"
-#include "cl_integer_io.h"
+#include "cln/integer.h"
+#include "cln/integer_io.h"
#include "cl_I.h"
+namespace cln {
+
static void I_fprint (cl_heap_ring* R, cl_ostream stream, const _cl_ring_element& x)
{
unused R;
static cl_boolean I_equal (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y)
{
unused R;
- return cl_equal(The(cl_I)(x),The(cl_I)(y));
+ return equal(The(cl_I)(x),The(cl_I)(y));
}
static const _cl_ring_element I_zero (cl_heap_ring* R)
static cl_number_ring_ops<cl_I> I_ops = {
cl_I_p,
- cl_equal,
+ equal,
zerop,
operator+,
operator-,
const cl_integer_ring cl_I_ring;
+} // namespace cln
+
CL_PROVIDE_END(cl_I_ring)
CL_PROVIDE(cl_MI)
// Specification.
-#include "cl_modinteger.h"
+#include "cln/modinteger.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
#include "cl_2DS.h"
-#include "cl_io.h"
-#include "cl_integer_io.h"
+#include "cln/io.h"
+#include "cln/integer_io.h"
#include "cl_N.h"
#include "cl_MI.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
#include "cl_alloca.h"
+namespace cln {
cl_heap_modint_ring::cl_heap_modint_ring (cl_I m, cl_modint_setops* setopv, cl_modint_addops* addopv, cl_modint_mulops* mulopv)
: setops (setopv), addops (addopv), mulops (mulopv), modulus (m)
refcount = 0; // will be incremented by the `cl_modint_ring' constructor
type = &cl_class_modint_ring;
if (minusp(m)) cl_abort();
- if (!::zerop(m)) {
+ if (!cln::zerop(m)) {
var uintL b = integer_length(m-1);
// m <= 2^b, hence one needs b bits for a representative mod m.
if (b <= 1) {
static cl_boolean modint_equal (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y)
{
unused R;
- return cl_equal(x.rep,y.rep);
+ return equal(x.rep,y.rep);
}
+} // namespace cln
#include "cl_MI_int.h"
#include "cl_MI_std.h"
#include "cl_MI_fix16.h"
#include "cl_MI_pow2m1.h"
#include "cl_MI_pow2p1.h"
#include "cl_MI_montgom.h"
+namespace cln {
static inline cl_heap_modint_ring* make_modint_ring (const cl_I& m) // m >= 0
// A weak hash table cl_I -> cl_modint_ring.
// (It could also be a weak hashuniq table cl_I -> cl_modint_ring.)
+} // namespace cln
#include "cl_I_hashweak_rcpointer.h"
+namespace cln {
// An entry can be collected when the value (the ring) isn't referenced any more
// except from the hash table, and when the key (the modulus) isn't referenced
}
-const cl_modint_ring cl_find_modint_ring (const cl_I& m)
+const cl_modint_ring find_modint_ring (const cl_I& m)
{
{ Mutable(cl_I,m);
m = abs(m);
}}
-const cl_modint_ring cl_modint0_ring = cl_find_modint_ring(0);
+const cl_modint_ring cl_modint0_ring = find_modint_ring(0);
+
+} // namespace cln
CL_PROVIDE_END(cl_MI)
#ifndef _CL_MI_H
#define _CL_MI_H
-#include "cl_modinteger.h"
+#include "cln/modinteger.h"
+
+namespace cln {
extern cl_composite_condition* cl_notify_composite (const cl_modint_ring& R, const cl_I& nonunit);
+} // namespace cln
+
#endif /* _CL_MI_H */
#include "cl_sysdep.h"
// Specification.
-#include "cl_modinteger.h"
+#include "cln/modinteger.h"
// Implementation.
-#include "cl_io.h"
-#include "cl_integer_io.h"
+#include "cln/io.h"
+#include "cln/integer_io.h"
+
+namespace cln {
const char * cl_composite_condition::name () const
{ return "cl_composite_condition"; }
}
fprint(strm, "\n");
}
+
+} // namespace cln
// Implementation.
-#include "cl_modinteger.h"
-#include "cl_io.h"
-#include "cl_integer_io.h"
+#include "cln/modinteger.h"
+#include "cln/io.h"
+#include "cln/integer_io.h"
+
+namespace cln {
static void dprint (cl_heap* pointer)
{
fprint(cl_debugout, "\n");
}
-// This dummy links in this module when <cl_modinteger.h> requires it.
+// This dummy links in this module when <cln/modinteger.h> requires it.
int cl_MI_debug_module;
+
+} // namespace cln
// Implementation.
-#include "cl_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/abort.h"
+
+namespace cln {
cl_composite_condition* cl_notify_composite (const cl_modint_ring& R, const cl_I& nonunit)
{
return new cl_composite_condition(R->modulus,gcd(R->modulus,nonunit));
}
+
+} // namespace cln
// 1 < m < 2^16, standard representation
+namespace cln {
+
static const _cl_MI fix16_plus (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y)
{
var uint32 zr = FN_to_UL(x.rep) + FN_to_UL(y.rep);
// Virtual destructor.
~cl_heap_modint_ring_fix16 () {}
};
+
+} // namespace cln
// 1 < m < 2^(cl_value_len-1), standard representation
// Assuming (cl_value_len <= 32).
+namespace cln {
+
static const _cl_MI fix29_plus (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y)
{
var uint32 zr = FN_to_UL(x.rep) + FN_to_UL(y.rep);
// Virtual destructor.
~cl_heap_modint_ring_fix29 () {}
};
+
+} // namespace cln
// 1 < m < 2^32, standard representation
// Assuming (cl_value_len > 32).
+namespace cln {
+
static const _cl_MI fix32_plus (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y)
{
var uint32 xr = FN_to_UL(x.rep);
// Virtual destructor.
~cl_heap_modint_ring_fix32 () {}
};
+
+} // namespace cln
// m = 0 : Z/mZ \isomorph Z
+namespace cln {
+
static void int_fprint (cl_heap_modint_ring* R, cl_ostream stream, const _cl_MI &x)
{
fprint(stream,R->_retract(x));
}
// This is the only case where random yields an error.
-static const _cl_MI int_random (cl_heap_modint_ring* R, cl_random_state& randomstate)
+static const _cl_MI int_random (cl_heap_modint_ring* R, random_state& randomstate)
{
unused R;
unused randomstate;
- fprint(cl_stderr, "Z / 0 Z not a finite set - no equidistributed random function.\n");
+ fprint(stderr, "Z / 0 Z not a finite set - no equidistributed random function.\n");
cl_abort();
#if ((defined(__sparc__) || defined(__sparc64__)) && !defined(__GNUC__)) // Sun CC wants a return value
return _cl_MI(R, 0);
// Virtual destructor.
~cl_heap_modint_ring_int () {}
};
+
+} // namespace cln
// 1 < m < 2^32, standard representation
+namespace cln {
+
static const _cl_MI int32_plus (cl_heap_modint_ring* R, const _cl_MI& x, const _cl_MI& y)
{
var uint32 xr = cl_I_to_UL(x.rep);
// Virtual destructor.
~cl_heap_modint_ring_int32 () {}
};
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_modinteger.h"
+#include "cln/modinteger.h"
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_MI operator<< (const cl_MI& x, sintL y) // assume 0 <= y < 2^31
{
else
return x * expt_pos(R->canonhom(2), (cl_I)(long)y);
}
+
+} // namespace cln
// m > 1 odd, Montgomery representation
+namespace cln {
+
// We use Montgomery's modular multiplication trick
// [Peter L. Montgomery: Modular multiplication without trial division,
// Mathematics of Computation 44 (1985), 519-521.]
var cl_I V = V_N >> n;
return new cl_heap_modint_ring_montgom(M,m,n,V);
}
+
+} // namespace cln
// m > 0, m = 2^m1
+namespace cln {
+
class cl_heap_modint_ring_pow2 : public cl_heap_modint_ring {
SUBCLASS_cl_heap_modint_ring()
public:
uintL m1;
};
-static
-#if !(defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ <= 90)) // workaround g++-2.7.2 and egcs-1.0.2-prerelease bug
-inline
-#endif
-const cl_I pow2_reduce_modulo (cl_heap_modint_ring* _R, const cl_I& x)
+static inline const cl_I pow2_reduce_modulo (cl_heap_modint_ring* _R, const cl_I& x)
{
var cl_heap_modint_ring_pow2* R = (cl_heap_modint_ring_pow2*)_R;
return ldb(x,cl_byte(R->m1,0));
// Constructor.
inline cl_heap_modint_ring_pow2::cl_heap_modint_ring_pow2 (const cl_I& m, uintL _m1)
: cl_heap_modint_ring (m, &std_setops, &pow2_addops, &pow2_mulops), m1 (_m1) {}
+
+} // namespace cln
// m > 0, m = 2^m1 - 1 (m1 > 1)
+namespace cln {
+
class cl_heap_modint_ring_pow2m1 : public cl_heap_modint_ring {
SUBCLASS_cl_heap_modint_ring()
public:
uintL m1;
};
-static
-#if !(defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ <= 90)) // workaround g++-2.7.2 and egcs-1.0.2-prerelease bug
-inline
-#endif
-const cl_I pow2m1_reduce_modulo (cl_heap_modint_ring* _R, const cl_I& x)
+static inline const cl_I pow2m1_reduce_modulo (cl_heap_modint_ring* _R, const cl_I& x)
{
var cl_heap_modint_ring_pow2m1* R = (cl_heap_modint_ring_pow2m1*)_R;
// Method:
// Constructor.
inline cl_heap_modint_ring_pow2m1::cl_heap_modint_ring_pow2m1 (const cl_I& m, uintL _m1)
: cl_heap_modint_ring (m, &std_setops, &pow2m1_addops, &pow2m1_mulops), m1 (_m1) {}
+
+} // namespace cln
// m > 0, m = 2^m1 + 1 (m1 > 1)
+namespace cln {
+
class cl_heap_modint_ring_pow2p1 : public cl_heap_modint_ring {
SUBCLASS_cl_heap_modint_ring()
public:
uintL m1;
};
-static
-#if !(defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ <= 90)) // workaround g++-2.7.2 and egcs-1.0.2-prerelease bug
-inline
-#endif
-const cl_I pow2p1_reduce_modulo (cl_heap_modint_ring* _R, const cl_I& x)
+static inline const cl_I pow2p1_reduce_modulo (cl_heap_modint_ring* _R, const cl_I& x)
{
var cl_heap_modint_ring_pow2p1* R = (cl_heap_modint_ring_pow2p1*)_R;
// Method:
// Constructor.
inline cl_heap_modint_ring_pow2p1::cl_heap_modint_ring_pow2p1 (const cl_I& m, uintL _m1)
: cl_heap_modint_ring (m, &std_setops, &pow2p1_addops, &pow2p1_mulops), m1 (_m1) {}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_modinteger.h"
+#include "cln/modinteger.h"
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_N.h"
#include "cl_MI.h"
+namespace cln {
+
const cl_MI operator>> (const cl_MI& x, sintL y) // assume 0 <= y < 2^31
{
if (y == 0)
#endif
return R->div(x, expt_pos(R->canonhom(2), (cl_I)(long)y));
}
+
+} // namespace cln
// m > 1, standard representation, no tricks
+namespace cln {
+
static void std_fprint (cl_heap_modint_ring* R, cl_ostream stream, const _cl_MI &x)
{
fprint(stream,R->_retract(x));
return x.rep;
}
-static const _cl_MI std_random (cl_heap_modint_ring* R, cl_random_state& randomstate)
+static const _cl_MI std_random (cl_heap_modint_ring* R, random_state& randomstate)
{
return _cl_MI(R, random_I(randomstate,R->modulus));
}
// Virtual destructor.
~cl_heap_modint_ring_std () {}
};
+
+} // namespace cln
#ifndef _CL_IF_H
#define _CL_IF_H
-#include "cl_number.h"
-#include "cl_integer.h"
+#include "cln/number.h"
+#include "cln/integer.h"
+
+namespace cln {
// Table of primes > 2, < 2^16
const uint32 cl_small_prime_table_limit = 65536;
// nontrivial factor or 0.
extern cl_boolean cl_miller_rabin_test (const cl_I& n, int count, cl_I* factor);
+} // namespace cln
#endif /* _CL_IF_H */
// Implementation.
-#include "cl_modinteger.h"
+#include "cln/modinteger.h"
+
+namespace cln {
cl_boolean cl_miller_rabin_test (const cl_I& n, int count, cl_I* factor)
{
// [Cohen], section 8.2, algorithm 8.2.2.
- var cl_modint_ring R = cl_find_modint_ring(n); // Z/nZ
+ var cl_modint_ring R = find_modint_ring(n); // Z/nZ
var cl_I m = n-1;
var uintL e = ord2(m);
m = m>>e;
}
return cl_true;
}
+
+} // namespace cln
// Implementation.
+namespace cln {
+
uint16 cl_small_prime_table[cl_small_prime_table_size] = {
3, 5, 7, 11, 13, 17, 19, 23, 29, 31,
37, 41, 43, 47, 53, 59, 61, 67, 71, 73,
65407, 65413, 65419, 65423, 65437, 65447, 65449, 65479, 65497, 65519,
65521,
};
+
+} // namespace cln
#error "intDsize too small for trialdivision!"
#endif
+namespace cln {
+
uint32 cl_trialdivision (const cl_I& n, uint32 d1, uint32 d2)
{
var uintL i = cl_small_prime_table_search(d1);
}
return 0;
}
+
+} // namespace cln
#include "cl_low.h"
+namespace cln {
+
uint32 cl_trialdivision (uint32 n, uint32 d1, uint32 d2)
{
var uintL i = cl_small_prime_table_search(d1);
}
return 0;
}
+
+} // namespace cln
#include "cl_low.h"
+namespace cln {
+
uint32 cl_trialdivision (uint32 nhi, uint32 nlo, uint32 d1, uint32 d2)
{
var uintL i = cl_small_prime_table_search(d1);
}
return 0;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_numtheory.h"
+#include "cln/numtheory.h"
// Implementation.
#include "cl_xmacros.h"
+namespace cln {
+
// [Cohen], section 1.5.2, algorithm 1.5.2.
// For proofs refer to [F. Morain, J.-L. Nicolas: On Cornacchia's algorithm
// for solving the diophantine equation u^2+v*d^2=m].
break;
}
// Compute x with x^2+d == 0 mod p.
- var cl_modint_ring R = cl_find_modint_ring(p);
+ var cl_modint_ring R = find_modint_ring(p);
var sqrt_mod_p_t init = sqrt_mod_p(R,R->canonhom(-d));
if (init.condition)
return init.condition;
return cornacchia_t(0);
return cornacchia_t(1, x,y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_numtheory.h"
+#include "cln/numtheory.h"
// Implementation.
#include "cl_I.h"
+namespace cln {
+
// [Cohen], section 1.5.2, algorithm 1.5.3.
// For proofs refer to [F. Morain, J.-L. Nicolas: On Cornacchia's algorithm
// for solving the diophantine equation u^2+v*d^2=m].
break;
}
// Compute x with x^2+d == 0 mod p.
- var cl_modint_ring R = cl_find_modint_ring(p);
+ var cl_modint_ring R = find_modint_ring(p);
var sqrt_mod_p_t init = sqrt_mod_p(R,R->canonhom(-d));
if (init.condition)
return init.condition;
return cornacchia_t(0);
return cornacchia_t(1, x,y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_numtheory.h"
+#include "cln/numtheory.h"
// Implementation.
#include "cl_IF.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
+
+namespace cln {
cl_boolean isprobprime (const cl_I& n)
{
// Step 2: Miller-Rabin test.
return cl_miller_rabin_test(n,count,NULL);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_numtheory.h"
+#include "cln/numtheory.h"
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
#include "cl_xmacros.h"
+namespace cln {
+
int jacobi (const cl_I& a, const cl_I& b)
{
// Check b > 0, b odd.
{ a = a-b; do { a = a-b; } while (a >= b); }
}
}}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_numtheory.h"
+#include "cln/numtheory.h"
// Implementation.
-#include "cl_abort.h"
+#include "cln/abort.h"
#include "cl_xmacros.h"
+namespace cln {
+
// Assume 0 <= a < b.
inline int jacobi_aux (uint32 a, uint32 b)
{
a = b-1-((uint32)(~a) % (uint32)b);
return jacobi_aux(a,b);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_numtheory.h"
+#include "cln/numtheory.h"
// Implementation.
-#include "cl_real.h"
+#include "cln/real.h"
+
+namespace cln {
const cl_I nextprobprime (const cl_R& x)
{
n = n+2;
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_numtheory.h"
+#include "cln/numtheory.h"
// Implementation.
#include "cl_I.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
#undef floor
-#include <math.h>
+#include <cmath>
#define floor cln_floor
+namespace cln {
+
// Algorithm 1 (for very small p only):
// Try different values.
// Assume p is prime and a nonzero square in Z/pZ.
}
const pol2 square (const pol2& u)
{
- return pol2(::square(u.c0) + ::square(u.c1)*a, (u.c0*u.c1)<<1);
+ return pol2(cln::square(u.c0) + cln::square(u.c1)*a, (u.c0*u.c1)<<1);
}
const pol2 expt_pos (const pol2& x, const cl_I& y)
{
if (c1inv.condition)
return c1inv.condition;
var cl_MI z = -u.c0*c1inv;
- if (::square(z) == a)
+ if (cln::square(z) == a)
return gcd_result(1,z);
else
return gcd_result(0);
var uintL l = integer_length(p);
var uintL e = ord2(p-1);
//if (e > 30 && e > l/(log((double)l)*0.72-1))
- if (e > 30 && e > l/(log((double)l)*0.92-2.41))
+ if (e > 30 && e > l/(::log((double)l)*0.92-2.41))
// Algorithm 2.
return cantor_zassenhaus_sqrt(R,a);
else
// Algorithm 3.
return tonelli_shanks_sqrt(R,a);
}
+
+} // namespace cln
#ifndef _CL_UP_H
#define _CL_UP_H
-#include "cl_univpoly.h"
-#include "cl_output.h"
+#include "cln/univpoly.h"
+#include "cln/output.h"
+
+namespace cln {
extern cl_heap_univpoly_ring* cl_make_univpoly_ring (const cl_ring& r);
if (p)
return ((cl_varname_property*)p)->varname;
else
- return cl_default_print_flags.univpoly_varname;
+ return default_print_flags.univpoly_varname;
}
+} // namespace cln
+
#endif /* _CL_UP_H */
// Specification.
#define CL_GV_NO_RANGECHECKS
#define CL_SV_NO_RANGECHECKS
-#include "cl_univpoly.h"
+#include "cln/univpoly.h"
#include "cl_UP.h"
// Implementation.
-#include "cl_output.h"
+#include "cln/output.h"
+
+namespace cln {
cl_symbol cl_univpoly_varname_key = (cl_symbol)(cl_string)"variable name";
type& __tmp_##x = *(type*) &(x).rep; \
type& x = __tmp_##x;
+} // namespace cln
+
// Four different implementations of the polynomial operations, for efficiency:
#include "cl_UP_number.h" // polynomials over number rings
#include "cl_UP_MI.h" // polynomials over modular integer rings
#include "cl_UP_GF2.h" // polynomials over the modular integer ring GF(2)
#include "cl_UP_gen.h" // polynomials over all other rings
+namespace cln {
+
cl_heap_univpoly_ring::cl_heap_univpoly_ring (const cl_ring& r, cl_univpoly_setops* setopv, cl_univpoly_addops* addopv, cl_univpoly_mulops* mulopv, cl_univpoly_modulops* modulopv, cl_univpoly_polyops* polyopv)
: setops (setopv), addops (addopv), mulops (mulopv), modulops (modulopv), polyops (polyopv),
_basering (r)
return new cl_heap_gen_univpoly_ring(r);
}
+} // namespace cln
+
CL_PROVIDE_END(cl_UP)
// Univariate Polynomials over the ring GF(2) = Z/2Z.
-#include "cl_GV_modinteger.h"
-#include "cl_modinteger.h"
-#include "cl_GV_integer.h"
+#include "cln/GV_modinteger.h"
+#include "cln/modinteger.h"
+#include "cln/GV_integer.h"
#include "cl_DS.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
+namespace cln {
// This is actually defined in cl_GV_I.cc (*ugh*).
struct cl_heap_GV_I_bits1 : public cl_heap_GV_I {
cl_heap_gf2_univpoly_ring (const cl_ring& r)
: cl_heap_univpoly_ring (r, &gf2_setops, &gf2_addops, &gf2_mulops, &gf2_modulops, &gf2_polyops) {}
};
+
+} // namespace cln
// Univariate Polynomials over a ring of modular integers.
-#include "cl_GV_modinteger.h"
-#include "cl_modinteger.h"
-#include "cl_abort.h"
+#include "cln/GV_modinteger.h"
+#include "cln/modinteger.h"
+#include "cln/abort.h"
+
+namespace cln {
// Assume a ring is a modint ring.
inline cl_heap_modint_ring* TheModintRing (const cl_ring& R)
cl_heap_modint_univpoly_ring (const cl_ring& r)
: cl_heap_univpoly_ring (r, &modint_setops, &modint_addops, &modint_mulops, &modint_modulops, &modint_polyops) {}
};
+
+} // namespace cln
// Univariate Polynomials over a general ring.
-#include "cl_SV_ringelt.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/SV_ringelt.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
+
+namespace cln {
// Assume a ring is a ring.
inline cl_heap_ring* TheRing (const cl_ring& R)
cl_heap_gen_univpoly_ring (const cl_ring& r)
: cl_heap_univpoly_ring (r, &gen_setops, &gen_addops, &gen_mulops, &gen_modulops, &gen_polyops) {}
};
+
+} // namespace cln
-// cl_find_univpoly_ring().
+// find_univpoly_ring().
// General includes.
#include "cl_sysdep.h"
CL_PROVIDE(cl_UP_named)
// Specification.
-#include "cl_univpoly.h"
+#include "cln/univpoly.h"
// Implementation.
#include "cl_UP.h"
+namespace cln {
+
// Create a new univariate polynomial ring with a named variable.
static inline cl_heap_univpoly_ring* cl_make_univpoly_ring (const cl_ring& r, const cl_symbol& varname)
return UPR;
}
+} // namespace cln
// The table of univariate polynomial rings with named variable.
// A weak hash table (cl_ring,cl_symbol) -> cl_univpoly_ring.
#include "cl_rcpointer2_hashweak_rcpointer.h"
+namespace cln {
+
// An entry can be collected when the value (the ring) isn't referenced any more
// except from the hash table, and when the keys (the base ring and the name)
// are't referenced any more except from the hash table and the ring. Note that
}
-const cl_univpoly_ring cl_find_univpoly_ring (const cl_ring& r, const cl_symbol& varname)
+const cl_univpoly_ring find_univpoly_ring (const cl_ring& r, const cl_symbol& varname)
{
var cl_univpoly_ring* ring_in_table = get_univpoly_ring(r,varname);
if (!ring_in_table) {
return *ring_in_table;
}
+} // namespace cln
+
CL_PROVIDE_END(cl_UP_named)
CL_PROVIDE(cl_UP_no_ring)
// Specification.
-#include "cl_univpoly.h"
+#include "cln/univpoly.h"
// Implementation.
-#include "cl_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/abort.h"
+
+namespace cln {
nonreturning_function(static, uninitialized_ring, (void));
static void uninitialized_ring ()
{
- fprint(cl_stderr, "Uninitialized ring operation called\n");
+ fprint(stderr, "Uninitialized ring operation called\n");
cl_abort();
}
nonreturning_function(static, uninitialized_error, (const _cl_UP&));
static void uninitialized_error (const _cl_UP& obj)
{
- fprint(cl_stderr, "Uninitialized ring element @0x");
- fprinthexadecimal(cl_stderr, (unsigned long)(void*)&obj);
- fprint(cl_stderr, ": 0x");
- fprinthexadecimal(cl_stderr, (unsigned long)obj.rep.word);
- fprint(cl_stderr, "\n");
+ fprint(stderr, "Uninitialized ring element @0x");
+ fprinthexadecimal(stderr, (unsigned long)(void*)&obj);
+ fprint(stderr, ": 0x");
+ fprinthexadecimal(stderr, (unsigned long)obj.rep.word);
+ fprint(stderr, "\n");
cl_abort();
}
const cl_univpoly_ring cl_no_univpoly_ring = cl_univpoly_ring (new cl_heap_no_univpoly_ring());
+} // namespace cln
+
CL_PROVIDE_END(cl_UP_no_ring)
// Univariate Polynomials over some subring of the numbers.
-#include "cl_SV_number.h"
-#include "cl_number.h"
-#include "cl_integer.h"
-#include "cl_abort.h"
+#include "cln/SV_number.h"
+#include "cln/number.h"
+#include "cln/integer.h"
+#include "cln/abort.h"
+
+namespace cln {
// Assume a ring is a number ring.
inline cl_heap_number_ring* TheNumberRing (const cl_ring& R)
cl_heap_num_univpoly_ring (const cl_ring& r)
: cl_heap_univpoly_ring (r, &num_setops, &num_addops, &num_mulops, &num_modulops, &num_polyops) {}
};
+
+} // namespace cln
-// cl_find_univpoly_ring().
+// find_univpoly_ring().
// General includes.
#include "cl_sysdep.h"
CL_PROVIDE(cl_UP_unnamed)
// Specification.
-#include "cl_univpoly.h"
+#include "cln/univpoly.h"
// Implementation.
#include "cl_rcpointer_hashweak_rcpointer.h"
+namespace cln {
+
// An entry can be collected when the value (the ring) isn't referenced any more
// except from the hash table, and when the key (the base ring) isn't referenced
// any more except from the hash table and the ring. Note that the ring contains
}
-const cl_univpoly_ring cl_find_univpoly_ring (const cl_ring& r)
+const cl_univpoly_ring find_univpoly_ring (const cl_ring& r)
{
var cl_univpoly_ring* ring_in_table = get_univpoly_ring(r);
if (!ring_in_table) {
return *ring_in_table;
}
+} // namespace cln
+
CL_PROVIDE_END(cl_UP_unnamed)
// Includes the CPU specific cl_asm_*.cc file.
-#include "cl_config.h"
+#include "cln/config.h"
#if defined(__sparc__) || defined(__sparc64__)
#include "cl_asm_sparc_GF2.cc"
-// cl_hermite().
+// hermite().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_univpoly_integer.h"
+#include "cln/univpoly_integer.h"
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
-const cl_UP_I cl_hermite (sintL n)
+namespace cln {
+
+const cl_UP_I hermite (sintL n)
{
// The Hermite polynomials H_n(x) are defined as
//
//
// H_n(x) = sum(j=0..floor(n/2), (-1)^j n!/j!(n-2j)! 2^(n-2j) x^(n-2j))
//
- var cl_univpoly_integer_ring R = cl_find_univpoly_ring(cl_I_ring);
+ var cl_univpoly_integer_ring R = find_univpoly_ring(cl_I_ring);
var cl_UP_I h = R->create(n);
var sintL k = n;
var cl_I c_k = ash(1,n);
h.finalize();
return h;
}
+
+} // namespace cln
-// cl_laguerre().
+// laguerre().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_univpoly_integer.h"
+#include "cln/univpoly_integer.h"
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
-const cl_UP_I cl_laguerre (sintL n)
+namespace cln {
+
+const cl_UP_I laguerre (sintL n)
{
// The Laguerre polynomials L_n(x) are defined as
//
//
// L_n(x) = sum(j=0..n, (-1)^(n-j) n!^2/j!(n-j)!^2 x^(n-j))
//
- var cl_univpoly_integer_ring R = cl_find_univpoly_ring(cl_I_ring);
+ var cl_univpoly_integer_ring R = find_univpoly_ring(cl_I_ring);
var cl_UP_I l = R->create(n);
var sintL k = n;
var cl_I c_k = (evenp(n) ? 1 : -1);
l.finalize();
return l;
}
+
+} // namespace cln
-// cl_tschebychev().
+// tschebychev().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_univpoly_integer.h"
+#include "cln/univpoly_integer.h"
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
-const cl_UP_I cl_tschebychev (sintL n)
+namespace cln {
+
+const cl_UP_I tschebychev (sintL n)
{
// The Tschebychev polynomials (of the 1st kind) T_n(x) are defined
// through the recurrence relation
//
// T_n(x) = sum(j=0..floor(n/2), (-1)^j (n-j-1)!n/j!(n-2j)! 2^(n-2j-1) x^(n-2j))
//
- var cl_univpoly_integer_ring R = cl_find_univpoly_ring(cl_I_ring);
+ var cl_univpoly_integer_ring R = find_univpoly_ring(cl_I_ring);
if (n == 0)
return R->one();
var cl_UP_I t = R->create(n);
t.finalize();
return t;
}
+
+} // namespace cln
-// cl_legendre().
+// legendre().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_univpoly_rational.h"
+#include "cln/univpoly_rational.h"
// Implementation.
-#include "cl_integer.h"
-#include "cl_rational.h"
+#include "cln/integer.h"
+#include "cln/rational.h"
-const cl_UP_RA cl_legendre (sintL n)
+namespace cln {
+
+const cl_UP_RA legendre (sintL n)
{
// The Legendre polynomials P_n(x) are defined as
//
//
// P_n(x) = sum(j=0..floor(n/2), (-1)^j (2n-2j)!/j!(n-2j)!(n-j)! 2^-n x^(n-2j))
//
- var cl_univpoly_rational_ring R = cl_find_univpoly_ring(cl_RA_ring);
+ var cl_univpoly_rational_ring R = find_univpoly_ring(cl_RA_ring);
var cl_UP_RA p = R->create(n);
var cl_I denom = ash(1,n);
var sintL k = n;
p.finalize();
return p;
}
+
+} // namespace cln
// Implementation.
-#include "cl_univpoly.h"
+#include "cln/univpoly.h"
#include "cl_UP.h"
-#include "cl_io.h"
+#include "cln/io.h"
+
+namespace cln {
static void dprint (cl_heap* pointer)
{
// This dummy links in this module when <cl_univpoly_ring.h> requires it.
int cl_UP_debug_module;
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_univpoly.h"
+#include "cln/univpoly.h"
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_UP deriv (const cl_UP& x)
{
return y;
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
cl_boolean rootp (const cl_RA& x, uintL n, cl_RA* w)
{
// beides n-te Potenzen -> Quotient der Wurzeln bilden
*w = I_I_to_RT(c,d); return cl_true;
}}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
cl_boolean rootp (const cl_RA& x, const cl_I& n, cl_RA* w)
{
// beides n-te Potenzen -> Quotient der Wurzeln bilden
*w = I_I_to_RT(c,d); return cl_true;
}}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
cl_boolean sqrtp (const cl_RA& x, cl_RA* w)
{
// beides Quadratzahlen -> Quotient der Wurzeln bilden
*w = I_I_to_RT(c,d); return cl_true;
}}
+
+} // namespace cln
#ifndef _CL_RA_H
#define _CL_RA_H
-#include "cl_number.h"
-#include "cl_rational.h"
+#include "cln/number.h"
+#include "cln/rational.h"
#include "cl_macros.h"
-#include "cl_malloc.h"
+#include "cln/malloc.h"
#include "cl_I.h"
+namespace cln {
+
struct cl_heap_ratio : cl_heap {
cl_I numerator;
cl_I denominator;
inline cl_heap_ratio* allocate_ratio (const cl_I& num, const cl_I& den)
{
- cl_heap_ratio* p = (cl_heap_ratio*) cl_malloc_hook(sizeof(cl_heap_ratio));
+ cl_heap_ratio* p = (cl_heap_ratio*) malloc_hook(sizeof(cl_heap_ratio));
p->refcount = 1;
p->type = &cl_class_ratio;
p->numerator.pointer = num.pointer; cl_inc_refcount(num);
} \
}
+} // namespace cln
#endif /* _CL_RA_H */
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_I ceiling1 (const cl_RA& x)
{
return ceiling1(a,b);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_I ceiling1 (const cl_RA& x, const cl_RA& y)
{
}
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_RA_div_t ceiling2 (const cl_RA& x)
{
return cl_RA_div_t(q,I_I_to_RT(r,b));
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_RA_div_t ceiling2 (const cl_RA& x, const cl_RA& y)
{
return cl_RA_div_t(q,y*r);
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_I floor1 (const cl_RA& x)
{
return floor1(a,b);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_I floor1 (const cl_RA& x, const cl_RA& y)
{
}
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_RA_div_t floor2 (const cl_RA& x)
{
return cl_RA_div_t(q,I_I_to_RT(r,b));
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_RA_div_t floor2 (const cl_RA& x, const cl_RA& y)
{
return cl_RA_div_t(q,y*r);
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_I round1 (const cl_RA& x)
{
return round1(a,b);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_I round1 (const cl_RA& x, const cl_RA& y)
{
}
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_RA_div_t round2 (const cl_RA& x)
{
return cl_RA_div_t(q,I_I_to_RT(r,b));
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_RA_div_t round2 (const cl_RA& x, const cl_RA& y)
{
return cl_RA_div_t(q,y*r);
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_I truncate1 (const cl_RA& x)
{
return truncate1(a,b);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_I truncate1 (const cl_RA& x, const cl_RA& y)
{
}
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_RA_div_t truncate2 (const cl_RA& x)
{
return cl_RA_div_t(q,I_I_to_RT(r,b));
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_RA_div_t truncate2 (const cl_RA& x, const cl_RA& y)
{
return cl_RA_div_t(q,y*r);
#endif
}
+
+} // namespace cln
-// cl_compare().
+// compare().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
-cl_signean cl_compare (const cl_RA& r, const cl_RA& s)
+namespace cln {
+
+cl_signean compare (const cl_RA& r, const cl_RA& s)
{
// Methode:
// r,s Integer -> klar
if (integerp(r) && integerp(s)) {
DeclareType(cl_I,r);
DeclareType(cl_I,s);
- return cl_compare(r,s);
+ return compare(r,s);
}
// r,s nicht beide Integers.
// 2. Schritt: Test, ob die Vorzeichen bereits das Ergebnis hergeben:
var const cl_I& a = r;
var const cl_I& b = numerator(s);
var const cl_I& c = denominator(s);
- return cl_compare(a*c,b);
+ return compare(a*c,b);
}
elif (integerp(s)) {
DeclareType(cl_I,s);
var const cl_I& a = numerator(r);
var const cl_I& b = denominator(r);
var const cl_I& c = s;
- return cl_compare(a,b*c);
+ return compare(a,b*c);
}
else {
DeclareType(cl_RT,r);
var const cl_I& b = denominator(r);
var const cl_I& c = numerator(s);
var const cl_I& d = denominator(s);
- return cl_compare(a*d,b*c);
+ return compare(a*d,b*c);
}
}
// Beschleunigung durch Konversion zu Short-Floats diese zuerst vergleichen??
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
#undef denominator
+namespace cln {
+
const cl_I denominator (const cl_RA& r)
{
return inline_denominator(r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_RA operator/ (const cl_RA& r, const cl_RA& s)
{
}
return r * recip(s);
}
+
+} // namespace cln
-// cl_equal().
+// equal().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
-cl_boolean cl_equal (const cl_RA& r, const cl_RA& s)
+namespace cln {
+
+cl_boolean equal (const cl_RA& r, const cl_RA& s)
{
// Methode:
// r,s Integer -> klar
// r,s beide Integer
DeclareType(cl_I,r);
DeclareType(cl_I,s);
- return cl_equal(r,s);
+ return equal(r,s);
} else
// r Integer, s Ratio
return cl_false;
DeclareType(cl_RT,r);
DeclareType(cl_RT,s);
// r,s Ratios
- if (!cl_equal(numerator(r),numerator(s)))
+ if (!equal(numerator(r),numerator(s)))
return cl_false;
- if (!cl_equal(denominator(r),denominator(s)))
+ if (!equal(denominator(r),denominator(s)))
return cl_false;
return cl_true;
}
}
+
+} // namespace cln
#include "cl_I.h"
#include "cl_N.h"
+namespace cln {
+
const cl_RA I_I_div_RA (const cl_I& a, const cl_I& b)
{
// Methode:
else
return I_posI_div_RA(a,b);
}
+
+} // namespace cln
#include "cl_I.h"
+namespace cln {
+
const cl_RA I_I_to_RA (const cl_I& a, const cl_I& b)
{
// Methode:
else
return allocate_ratio(a,b);
}
+
+} // namespace cln
// Implementation.
+namespace cln {
+
const cl_RA I_I_to_RT (const cl_I& a, const cl_I& b)
{
return allocate_ratio(a,b);
}
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
+namespace cln {
+
const cl_RA I_posI_div_RA (const cl_I& a, const cl_I& b)
{
// Methode:
else
return I_I_to_RA(exquo(a,d),exquopos(b,d));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
+namespace cln {
+
const cl_RA operator- (const cl_RA& r, const cl_RA& s)
{
#if 0
}
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_RA minus1 (const cl_RA& r)
{
return I_I_to_RT(a-b,b);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
#undef minusp
+namespace cln {
+
cl_boolean minusp (const cl_RA& x)
{
return inline_minusp(x);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
+namespace cln {
+
const cl_RA operator* (const cl_RA& r, const cl_RA& s)
{
// Methode (vgl. [Buchberger, Collins, Loos: Computer Algebra, S.201])
}
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
#undef numerator
+namespace cln {
+
const cl_I numerator (const cl_RA& r)
{
return inline_numerator(r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
+namespace cln {
+
const cl_RA operator+ (const cl_RA& r, const cl_RA& s)
{
// Methode (vgl. [Buchberger, Collins, Loos: Computer Algebra, S.200-201])
}
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_RA plus1 (const cl_RA& r)
{
return I_I_to_RT(a+b,b);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#undef zerop
#undef minusp
+namespace cln {
+
cl_boolean plusp (const cl_RA& x)
{
if (inline_minusp(x))
else
return cl_true; // sonst ist x>0.
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_N.h"
#include "cl_I.h"
+namespace cln {
+
const cl_RA recip (const cl_RA& r)
{
// Methode:
// a<0
return I_I_to_RA(-b,-a);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_RA square (const cl_RA& r)
{
return I_I_to_RT(square(a),square(b));
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_RA operator- (const cl_RA& r)
{
return I_I_to_RT(-a,b);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
#undef zerop
+namespace cln {
+
cl_boolean zerop (const cl_RA& x)
{
return inline_zerop(x);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational_class.h"
+#include "cln/rational_class.h"
// Implementation.
-#include "cl_input.h"
-#include "cl_rational_io.h"
+#include "cln/input.h"
+#include "cln/rational_io.h"
+
+namespace cln {
cl_read_flags cl_RA_read_flags = {
syntax_rational,
lsyntax_all,
10,
- { cl_float_format_ffloat, cl_float_format_lfloat_min, cl_true }
+ { float_format_ffloat, float_format_lfloat_min, cl_true }
};
cl_RA::cl_RA (const char * string)
pointer = as_cl_private_thing(
read_rational(cl_RA_read_flags,string,NULL,NULL));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational_io.h"
+#include "cln/rational_io.h"
// Implementation.
#include <string.h>
-#include "cl_input.h"
-#include "cl_integer.h"
-#include "cl_integer_io.h"
+#include "cln/input.h"
+#include "cln/integer.h"
+#include "cln/integer_io.h"
#include "cl_I.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
-#undef floor
-#include <math.h>
-#define floor cln_floor
+namespace cln {
// Step forward over all digits, to the end of string or to the next non-digit.
static const char * skip_digits (const char * ptr, const char * string_limit, unsigned int base)
ASSERT((flags.syntax & ~(syntax_rational|syntax_maybe_bad)) == 0);
// If no string_limit is given, it defaults to the end of the string.
if (!string_limit)
- string_limit = string + strlen(string);
+ string_limit = string + ::strlen(string);
if (flags.syntax & syntax_rational) {
// Check for rational number syntax.
var unsigned int rational_base = flags.rational_base;
goto not_rational_syntax;
var cl_I base = read_integer(10,0,ptr,0,base_end_ptr-ptr);
if (!((base >= 2) && (base <= 36))) {
- fprint(cl_stderr, "Base must be an integer in the range from 2 to 36, not ");
- fprint(cl_stderr, base);
- fprint(cl_stderr, "\n");
+ fprint(stderr, "Base must be an integer in the range from 2 to 36, not ");
+ fprint(stderr, base);
+ fprint(stderr, "\n");
cl_abort();
}
rational_base = FN_to_UL(base); ptr = base_end_ptr;
}
read_number_bad_syntax(string,string_limit);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational_io.h"
+#include "cln/rational_io.h"
// Implementation.
-#include "cl_input.h"
-#include "cl_io.h"
+#include "cln/input.h"
+#include "cln/io.h"
#include "cl_spushstring.h"
+namespace cln {
+
// We read an entire token (or even more, if it begins with #C) into a
// buffer and then call read_rational() on the buffer.
// Handle premature EOF.
eof: read_number_eof();
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational_io.h"
+#include "cln/rational_io.h"
// Implementation.
#include "cl_I.h"
#include "cl_N.h"
+namespace cln {
+
const cl_RA read_rational (unsigned int base, cl_signean sign, const char * string, uintL index1, uintL index3, uintL index2)
{
var uintL index3_1 = index3+1; // Index der ersten Nennerziffer
num = -num; // incl. Vorzeichen
return I_posI_div_RA(num,den);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_RA abs (const cl_RA& r)
{
else
return r;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_N.h"
+namespace cln {
+
// Cf. cl_RA_p in cl_RA_ring.cc.
// But here, for better inlining in g++, it is preferrable to finish every
// alternative with either "return cl_true;" or "return cl_false;".
} else
cl_as_error(x,"a rational number",filename,line);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
+namespace cln {
+
static void ratio_destructor (cl_heap* pointer)
{
(*(cl_heap_ratio*)pointer).~cl_heap_ratio();
ratio_destructor,
cl_class_flags_subclass_complex | cl_class_flags_subclass_real | cl_class_flags_subclass_rational
};
+
+} // namespace cln
// Implementation.
-#include "cl_rational.h"
-#include "cl_io.h"
-#include "cl_rational_io.h"
+#include "cln/rational.h"
+#include "cln/io.h"
+#include "cln/rational_io.h"
+
+namespace cln {
static void dprint (cl_heap* pointer)
{
AT_INITIALIZATION(dprint_RA)
{ cl_register_type_printer(cl_class_ratio,dprint); }
-// This dummy links in this module when <cl_rational.h> requires it.
+// This dummy links in this module when <cln/rational.h> requires it.
int cl_RA_debug_module;
extern int cl_I_debug_module;
static void* dummy[] = { &dummy,
&cl_I_debug_module
};
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_N.h"
#include "cl_RA.h"
-uint32 cl_equal_hashcode (const cl_RA& r)
+namespace cln {
+
+uint32 equal_hashcode (const cl_RA& r)
{
if (integerp(r)) {
DeclareType(cl_I,r);
- return cl_equal_hashcode(r);
+ return equal_hashcode(r);
} else {
// Making sure that a float and its rational equivalent have
// the same hash code is tricky. This code depends on the fact
// that the equal_hashcode_low macro is linear in `exp'.
DeclareType(cl_RT,r);
- return cl_equal_hashcode(numerator(r))
- - cl_equal_hashcode(denominator(r))
+ return equal_hashcode(numerator(r))
+ - equal_hashcode(denominator(r))
+ equal_hashcode_one;
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
+namespace cln {
+
const cl_RA expt (const cl_RA& x, sintL y)
{
// Methode:
else // y < 0
return recip(expt_pos(x,(uintL)(-y)));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
+namespace cln {
+
const cl_RA expt (const cl_RA& x, const cl_I& y)
{
// Methode:
else // y > 0
return expt_pos(x,y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_RA expt_pos (const cl_RA& x, uintL y)
{
return I_I_to_RT(expt_pos(a,y),expt_pos(b,y));
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_RA expt_pos (const cl_RA& x, const cl_I& y)
{
return I_I_to_RT(expt_pos(a,y),expt_pos(b,y));
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
+namespace cln {
+
const cl_RA max (const cl_RA& x, const cl_RA& y)
{
return (x >= y ? x : y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
+namespace cln {
+
const cl_RA min (const cl_RA& x, const cl_RA& y)
{
return (x <= y ? x : y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
#include "cl_I.h"
+namespace cln {
+
MAYBE_INLINE
const cl_RA signum (const cl_RA& x)
{
elif (zerop(x)) { return 0; } // x=0 -> 0
else { return 1; } // x>0 -> +1
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational_io.h"
+#include "cln/rational_io.h"
// Implementation.
-#include "cl_output.h"
+#include "cln/output.h"
+
+namespace cln {
void print_rational (cl_ostream stream, const cl_print_flags& flags, const cl_RA& z)
{
print_rational(stream,(const cl_print_number_flags&)flags,z);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational_io.h"
+#include "cln/rational_io.h"
// Implementation.
-#include "cl_output.h"
+#include "cln/output.h"
+
+namespace cln {
void print_rational (cl_ostream stream, const cl_print_number_flags& flags, const cl_RA& z)
{
print_rational(stream,(const cl_print_real_flags&)flags,z);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational_io.h"
+#include "cln/rational_io.h"
// Implementation.
-#include "cl_output.h"
+#include "cln/output.h"
+
+namespace cln {
void print_rational (cl_ostream stream, const cl_print_real_flags& flags, const cl_RA& z)
{
print_rational(stream,(const cl_print_rational_flags&)flags,z);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational_io.h"
+#include "cln/rational_io.h"
// Implementation.
-#include "cl_output.h"
-#include "cl_integer_io.h"
-#include "cl_rational.h"
+#include "cln/output.h"
+#include "cln/integer_io.h"
+#include "cln/rational.h"
#include "cl_RA.h"
+namespace cln {
+
void print_rational (cl_ostream stream, const cl_print_rational_flags& flags, const cl_RA& z)
{
var unsigned int base = flags.rational_base;
print_integer(stream,base,denominator(z));
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational_io.h"
+#include "cln/rational_io.h"
// Implementation.
-#include "cl_integer_io.h"
-#include "cl_rational.h"
+#include "cln/integer_io.h"
+#include "cln/rational.h"
#include "cl_RA.h"
+namespace cln {
+
void print_rational (cl_ostream stream, unsigned int base, const cl_RA& z)
{
if (integerp(z)) {
print_integer(stream,base,den); // Nenner ausgeben
}
}
+
+} // namespace cln
CL_PROVIDE(cl_RA_ring)
// Specification.
-#include "cl_rational_ring.h"
+#include "cln/rational_ring.h"
// Implementation.
-#include "cl_rational.h"
-#include "cl_rational_io.h"
+#include "cln/rational.h"
+#include "cln/rational_io.h"
#include "cl_RA.h"
+namespace cln {
+
static void RA_fprint (cl_heap_ring* R, cl_ostream stream, const _cl_ring_element& x)
{
unused R;
static cl_boolean RA_equal (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y)
{
unused R;
- return cl_equal(The(cl_RA)(x),The(cl_RA)(y));
+ return equal(The(cl_RA)(x),The(cl_RA)(y));
}
static const _cl_ring_element RA_zero (cl_heap_ring* R)
static cl_number_ring_ops<cl_RA> RA_ops = {
cl_RA_p,
- cl_equal,
+ equal,
zerop,
operator+,
operator-,
const cl_rational_ring cl_RA_ring;
+} // namespace cln
+
CL_PROVIDE_END(cl_RA_ring)
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_RA.h"
#include "cl_xmacros.h"
+namespace cln {
+
cl_boolean logp (const cl_I& a, const cl_I& b, cl_RA* l)
{
// Methode:
// a=1 -> c=0,d=1 -> Ergebnis ud/vd
*l = I_I_to_RA(UL_to_I(ud),UL_to_I(vd)); return cl_true;
}}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_I.h"
#include "cl_RA.h"
+namespace cln {
+
cl_boolean logp (const cl_RA& a, const cl_RA& b, cl_RA* pl)
{
// Methode:
return cl_false;
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
-#include "cl_rational.h"
-#include "cl_float.h"
+#include "cln/rational.h"
+#include "cln/float.h"
+
+namespace cln {
MAYBE_INLINE
const cl_R sqrt (const cl_RA& x)
// x in Float umwandeln, dann die Wurzel ziehen:
return sqrt(cl_float(x));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_float.h"
-#include "cl_rational.h"
+#include "cln/float.h"
+#include "cln/rational.h"
+
+namespace cln {
#undef MAYBE_INLINE
#define MAYBE_INLINE inline
const cl_R sqrt (const cl_R& x)
GEN_R_OP1_2(x, sqrt, return)
+
+} // namespace cln
#ifndef _CL_R_H
#define _CL_R_H
-#include "cl_number.h"
-#include "cl_real.h"
+#include "cln/number.h"
+#include "cln/real.h"
+
+namespace cln {
extern cl_class cl_class_bignum;
extern cl_class cl_class_ratio;
}
}
+} // namespace cln
+
#endif /* _CL_R_H */
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#if 0
+namespace cln {
+
const cl_F cl_float (const cl_R& x, const cl_F& y)
{
if (rationalp(x)) {
}
}
+} // namespace cln
+
#else // less type dispatch overhead
#include "cl_F.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_F cl_float (const cl_R& x, const cl_F& y)
{
floattypecase(y
);
}
+} // namespace cln
+
#endif
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
+namespace cln {
+
MAYBE_INLINE
const cl_F cl_float (const cl_R& x)
{
return x;
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_float.h"
+#include "cln/float.h"
#include "cl_F.h"
-const cl_F cl_float (const cl_R& x, cl_float_format_t f)
+namespace cln {
+
+const cl_F cl_float (const cl_R& x, float_format_t f)
{
floatformatcase((uintL)f
, return cl_R_to_SF(x);
, return cl_R_to_LF(x,len);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#if 0
+namespace cln {
+
const cl_DF cl_R_to_DF (const cl_R& x)
{
if (rationalp(x)) {
}
}
+} // namespace cln
+
#else // fully inlined, faster
#include "cl_RA.h"
#include "cl_I.h"
+namespace cln {
+
const cl_DF cl_R_to_DF (const cl_R& x)
{
realcase6(x
);
}
+} // namespace cln
+
#endif
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#if 0
+namespace cln {
+
const cl_FF cl_R_to_FF (const cl_R& x)
{
if (rationalp(x)) {
}
}
+} // namespace cln
+
#else // fully inlined, faster
#include "cl_RA.h"
#include "cl_I.h"
+namespace cln {
+
const cl_FF cl_R_to_FF (const cl_R& x)
{
realcase6(x
);
}
+} // namespace cln
+
#endif
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#if 0
+namespace cln {
+
const cl_LF cl_R_to_LF (const cl_R& x, uintC len)
{
if (rationalp(x)) {
}
}
+} // namespace cln
+
#else // fully inlined, faster
#include "cl_RA.h"
#include "cl_I.h"
+namespace cln {
+
const cl_LF cl_R_to_LF (const cl_R& x, uintC len)
{
realcase6(x
);
}
+} // namespace cln
+
#endif
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#if 0
+namespace cln {
+
const cl_SF cl_R_to_SF (const cl_R& x)
{
if (rationalp(x)) {
}
}
+} // namespace cln
+
#else // fully inlined, faster
#include "cl_RA.h"
#include "cl_I.h"
+namespace cln {
+
const cl_SF cl_R_to_SF (const cl_R& x)
{
realcase6(x
);
}
+} // namespace cln
+
#endif
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
#include "cl_F.h"
-#include "cl_integer.h"
-#include "cl_rational.h"
-#include "cl_float.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/integer.h"
+#include "cln/rational.h"
+#include "cln/float.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#if 0
-double cl_double_approx (const cl_R& x)
+namespace cln {
+
+double double_approx (const cl_R& x)
{
if (rationalp(x)) {
DeclareType(cl_RA,x);
- return cl_double_approx(x);
+ return double_approx(x);
} else {
DeclareType(cl_F,x);
- return cl_double_approx(x);
+ return double_approx(x);
}
}
+} // namespace cln
+
#else // fully inlined, faster
#include "cl_RA.h"
#include "cl_I.h"
-double cl_double_approx (const cl_R& x)
+namespace cln {
+
+double double_approx (const cl_R& x)
{
realcase6(x
- , return cl_double_approx(x);
- , return cl_double_approx(x);
- , return cl_double_approx(x);
- , return cl_double_approx(x);
- , return cl_double_approx(x);
- , return cl_double_approx(x);
+ , return double_approx(x);
+ , return double_approx(x);
+ , return double_approx(x);
+ , return double_approx(x);
+ , return double_approx(x);
+ , return double_approx(x);
);
}
+} // namespace cln
+
#endif
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
#include "cl_F.h"
-#include "cl_integer.h"
-#include "cl_rational.h"
-#include "cl_float.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/integer.h"
+#include "cln/rational.h"
+#include "cln/float.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#if 0
-float cl_float_approx (const cl_R& x)
+namespace cln {
+
+float float_approx (const cl_R& x)
{
if (rationalp(x)) {
DeclareType(cl_RA,x);
- return cl_float_approx(x);
+ return float_approx(x);
} else {
DeclareType(cl_F,x);
- return cl_float_approx(x);
+ return float_approx(x);
}
}
+} // namespace cln
+
#else // fully inlined, faster
#include "cl_RA.h"
#include "cl_I.h"
-float cl_float_approx (const cl_R& x)
+namespace cln {
+
+float float_approx (const cl_R& x)
{
realcase6(x
- , return cl_float_approx(x);
- , return cl_float_approx(x);
- , return cl_float_approx(x);
- , return cl_float_approx(x);
- , return cl_float_approx(x);
- , return cl_float_approx(x);
+ , return float_approx(x);
+ , return float_approx(x);
+ , return float_approx(x);
+ , return float_approx(x);
+ , return float_approx(x);
+ , return float_approx(x);
);
}
+} // namespace cln
+
#endif
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
-#include "cl_float.h"
+#include "cln/rational.h"
+#include "cln/float.h"
+
+namespace cln {
const cl_I ceiling1 (const cl_R& x)
GEN_R_OP1_2(x, ceiling1, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
+#include "cln/rational.h"
+
+namespace cln {
const cl_I ceiling1 (const cl_R& x, const cl_R& y)
{
}
return ceiling1(x/y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
-#include "cl_float.h"
+#include "cln/rational.h"
+#include "cln/float.h"
#include "cl_R_div_t.h"
+namespace cln {
+
const cl_R_div_t ceiling2 (const cl_R& x)
GEN_R_OP1_2(x, ceiling2, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
+#include "cln/rational.h"
#include "cl_R_div_t.h"
+namespace cln {
+
const cl_R_div_t ceiling2 (const cl_R& x, const cl_R& y)
{
// Methode:
var cl_R& r = q_r.remainder;
return cl_R_div_t(q,y*r);
}
+
+} // namespace cln
#ifndef _CL_R_DIV_T_H
#define _CL_R_DIV_T_H
-#include "cl_real.h"
+#include "cln/real.h"
#include "cl_RA.h"
-#include "cl_float.h"
+#include "cln/float.h"
+
+namespace cln {
inline cl_R_div_t::cl_R_div_t (const cl_I_div_t& result)
: quotient(result.quotient), remainder(result.remainder) {}
inline cl_R_fdiv_t::cl_R_fdiv_t (const cl_F_fdiv_t& result)
: quotient(result.quotient), remainder(result.remainder) {}
+} // namespace cln
+
#endif /* _CL_R_DIV_T_H */
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
#include "cl_RA.h"
-#include "cl_integer.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/integer.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
+
+namespace cln {
const cl_F fceiling (const cl_R& x)
{
, return fceiling(x);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
+namespace cln {
+
const cl_F fceiling (const cl_R& x, const cl_R& y)
{
// Methode:
}
return fceiling(x/y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#if 0 // 2 type dispatches
-#include "cl_rational.h"
-#include "cl_float.h"
+#include "cln/rational.h"
+#include "cln/float.h"
#include "cl_R_div_t.h"
+namespace cln {
+
const cl_R_fdiv_t fceiling2 (const cl_R& x)
{
if (rationalp(x)) {
}
}
+} // namespace cln
+
#else // 1 type dispatch
#include "cl_RA.h"
-#include "cl_integer.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/integer.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_R_fdiv_t fceiling2 (const cl_R& x)
{
realcase6(x
);
}
+} // namespace cln
+
#endif
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
#include "cl_R_div_t.h"
+namespace cln {
+
const cl_R_fdiv_t fceiling2 (const cl_R& x, const cl_R& y)
{
// Methode:
var cl_R& r = q_r.remainder;
return cl_R_fdiv_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
#include "cl_RA.h"
-#include "cl_integer.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/integer.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
+
+namespace cln {
const cl_F ffloor (const cl_R& x)
{
, return ffloor(x);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
+namespace cln {
+
const cl_F ffloor (const cl_R& x, const cl_R& y)
{
// Methode:
}
return ffloor(x/y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#if 0 // 2 type dispatches
-#include "cl_rational.h"
-#include "cl_float.h"
+#include "cln/rational.h"
+#include "cln/float.h"
#include "cl_R_div_t.h"
+namespace cln {
+
const cl_R_fdiv_t ffloor2 (const cl_R& x)
{
if (rationalp(x)) {
}
}
+} // namespace cln
+
#else // 1 type dispatch
#include "cl_RA.h"
-#include "cl_integer.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/integer.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_R_fdiv_t ffloor2 (const cl_R& x)
{
realcase6(x
);
}
+} // namespace cln
+
#endif
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
#include "cl_R_div_t.h"
+namespace cln {
+
const cl_R_fdiv_t ffloor2 (const cl_R& x, const cl_R& y)
{
// Methode:
var cl_R& r = q_r.remainder;
return cl_R_fdiv_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
-#include "cl_float.h"
+#include "cln/rational.h"
+#include "cln/float.h"
+
+namespace cln {
const cl_I floor1 (const cl_R& x)
GEN_R_OP1_2(x, floor1, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
+#include "cln/rational.h"
+
+namespace cln {
const cl_I floor1 (const cl_R& x, const cl_R& y)
{
}
return floor1(x/y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
-#include "cl_float.h"
+#include "cln/rational.h"
+#include "cln/float.h"
#include "cl_R_div_t.h"
+namespace cln {
+
const cl_R_div_t floor2 (const cl_R& x)
GEN_R_OP1_2(x, floor2, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
+#include "cln/rational.h"
#include "cl_R_div_t.h"
+namespace cln {
+
const cl_R_div_t floor2 (const cl_R& x, const cl_R& y)
{
// Methode:
var cl_R& r = q_r.remainder;
return cl_R_div_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
#include "cl_RA.h"
-#include "cl_integer.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/integer.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
+
+namespace cln {
const cl_F fround (const cl_R& x)
{
, return fround(x);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
+namespace cln {
+
const cl_F fround (const cl_R& x, const cl_R& y)
{
// Methode:
}
return fround(x/y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#if 0 // 2 type dispatches
-#include "cl_rational.h"
-#include "cl_float.h"
+#include "cln/rational.h"
+#include "cln/float.h"
#include "cl_R_div_t.h"
+namespace cln {
+
const cl_R_fdiv_t fround2 (const cl_R& x)
{
if (rationalp(x)) {
}
}
+} // namespace cln
+
#else // 1 type dispatch
#include "cl_RA.h"
-#include "cl_integer.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/integer.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_R_fdiv_t fround2 (const cl_R& x)
{
realcase6(x
);
}
+} // namespace cln
+
#endif
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
#include "cl_R_div_t.h"
+namespace cln {
+
const cl_R_fdiv_t fround2 (const cl_R& x, const cl_R& y)
{
// Methode:
var cl_R& r = q_r.remainder;
return cl_R_fdiv_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
#include "cl_RA.h"
-#include "cl_integer.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/integer.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
+
+namespace cln {
const cl_F ftruncate (const cl_R& x)
{
, return ftruncate(x);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
+namespace cln {
+
const cl_F ftruncate (const cl_R& x, const cl_R& y)
{
// Methode:
}
return ftruncate(x/y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#if 0 // 2 type dispatches
-#include "cl_rational.h"
-#include "cl_float.h"
+#include "cln/rational.h"
+#include "cln/float.h"
#include "cl_R_div_t.h"
+namespace cln {
+
const cl_R_fdiv_t ftruncate2 (const cl_R& x)
{
if (rationalp(x)) {
}
}
+} // namespace cln
+
#else // 1 type dispatch
#include "cl_RA.h"
-#include "cl_integer.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/integer.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
+namespace cln {
+
const cl_R_fdiv_t ftruncate2 (const cl_R& x)
{
realcase6(x
);
}
+} // namespace cln
+
#endif
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
#include "cl_R_div_t.h"
+namespace cln {
+
const cl_R_fdiv_t ftruncate2 (const cl_R& x, const cl_R& y)
{
// Methode:
var cl_R& r = q_r.remainder;
return cl_R_fdiv_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_R mod (const cl_R& x, const cl_R& y)
{
}
return y * floor2(x/y).remainder;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
const cl_R rem (const cl_R& x, const cl_R& y)
{
}
return y * truncate2(x/y).remainder;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
-#include "cl_float.h"
+#include "cln/rational.h"
+#include "cln/float.h"
+
+namespace cln {
const cl_I round1 (const cl_R& x)
GEN_R_OP1_2(x, round1, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
+#include "cln/rational.h"
+
+namespace cln {
const cl_I round1 (const cl_R& x, const cl_R& y)
{
}
return round1(x/y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
-#include "cl_float.h"
+#include "cln/rational.h"
+#include "cln/float.h"
#include "cl_R_div_t.h"
+namespace cln {
+
const cl_R_div_t round2 (const cl_R& x)
GEN_R_OP1_2(x, round2, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
+#include "cln/rational.h"
#include "cl_R_div_t.h"
+namespace cln {
+
const cl_R_div_t round2 (const cl_R& x, const cl_R& y)
{
// Methode:
var cl_R& r = q_r.remainder;
return cl_R_div_t(q,y*r);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
-#include "cl_float.h"
+#include "cln/rational.h"
+#include "cln/float.h"
+
+namespace cln {
const cl_I truncate1 (const cl_R& x)
GEN_R_OP1_2(x, truncate1, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
+#include "cln/rational.h"
+
+namespace cln {
const cl_I truncate1 (const cl_R& x, const cl_R& y)
{
}
return truncate1(x/y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
-#include "cl_float.h"
+#include "cln/rational.h"
+#include "cln/float.h"
#include "cl_R_div_t.h"
+namespace cln {
+
const cl_R_div_t truncate2 (const cl_R& x)
GEN_R_OP1_2(x, truncate2, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
+#include "cln/rational.h"
#include "cl_R_div_t.h"
+namespace cln {
+
const cl_R_div_t truncate2 (const cl_R& x, const cl_R& y)
{
// Methode:
var cl_R& r = q_r.remainder;
return cl_R_div_t(q,y*r);
}
+
+} // namespace cln
-// cl_compare().
+// compare().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
-#include "cl_float.h"
+#include "cln/rational.h"
+#include "cln/float.h"
-cl_signean cl_compare (const cl_R& x, const cl_R& y)
+namespace cln {
+
+cl_signean compare (const cl_R& x, const cl_R& y)
{
// Methode:
// Beide rational oder beide Floats -> klar.
realcase2(x
, realcase2(y
, // beides rationale Zahlen
- return cl_compare(x,y);
+ return compare(x,y);
, // x rational, y Float -> x in Float umwandeln
- var cl_signean result = cl_compare(cl_float(x,y),y);
+ var cl_signean result = compare(cl_float(x,y),y);
if (result != signean_null)
return result;
- return cl_compare(x,rational(y));
+ return compare(x,rational(y));
);
, realcase2(y
, // x Float, y rational -> y in Float umwandeln
- var cl_signean result = cl_compare(x,cl_float(y,x));
+ var cl_signean result = compare(x,cl_float(y,x));
if (result != signean_null)
return result;
- return cl_compare(rational(x),y);
+ return compare(rational(x),y);
, // beides Floats
- return cl_compare(x,y);
+ return compare(x,y);
);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
+#include "cln/rational.h"
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_F.h"
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
#include "cl_SF.h"
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
#include "cl_FF.h"
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
#include "cl_DF.h"
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
#include "cl_N.h"
+namespace cln {
+
ALL_cl_LF_OPERATIONS_SAME_PRECISION()
const cl_R operator/ (const cl_R& x, const cl_R& y)
);
);
}
+
+} // namespace cln
-// cl_equal().
+// equal().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
-inline cl_boolean cl_equal (const cl_F& x, const cl_F& y)
+namespace cln {
+
+inline cl_boolean equal (const cl_F& x, const cl_F& y)
{
- return (cl_boolean) (cl_compare(x,y) == 0);
+ return (cl_boolean) (compare(x,y) == 0);
}
-cl_boolean cl_equal (const cl_R& x, const cl_R& y)
+cl_boolean equal (const cl_R& x, const cl_R& y)
{
// Methode:
// Beide rational oder beide Floats -> klar.
realcase2(x
, realcase2(y
, // beides rationale Zahlen
- return cl_equal(x,y);
+ return equal(x,y);
, // x rational, y Float -> x in Float umwandeln
if (!power2p(denominator(x)))
return cl_false;
- if (!cl_equal(cl_float(x,y),y))
+ if (!equal(cl_float(x,y),y))
return cl_false;
- return cl_equal(x,rational(y));
+ return equal(x,rational(y));
);
, realcase2(y
, // x Float, y rational -> y in Float umwandeln
if (!power2p(denominator(y)))
return cl_false;
- if (!cl_equal(x,cl_float(y,x)))
+ if (!equal(x,cl_float(y,x)))
return cl_false;
- return cl_equal(rational(x),y);
+ return equal(rational(x),y);
, // beides Floats
- return cl_equal(x,y);
+ return equal(x,y);
);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
-#include "cl_float.h"
+#include "cln/rational.h"
+#include "cln/float.h"
+
+namespace cln {
const cl_R operator- (const cl_R& x, const cl_R& y)
{
#define minus(a,b) a-b
GEN_R_OP2_2(x,y, minus, return)
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
-#include "cl_float.h"
+#include "cln/rational.h"
+#include "cln/float.h"
+
+namespace cln {
const cl_R minus1 (const cl_R& x)
GEN_R_OP1_2(x, minus1, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_DF_minusp.cc"
#include "cl_LF_minusp.cc"
+namespace cln {
+
cl_boolean minusp (const cl_R& x)
#if 0
GEN_R_OP1_2(x, minusp, return)
#else // fully inlined, faster
GEN_R_OP1_7(x, minusp, return)
#endif
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
+#include "cln/rational.h"
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_F.h"
-#include "cl_sfloat.h"
+#include "cln/sfloat.h"
#include "cl_SF.h"
-#include "cl_ffloat.h"
+#include "cln/ffloat.h"
#include "cl_FF.h"
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
#include "cl_DF.h"
-#include "cl_lfloat.h"
+#include "cln/lfloat.h"
#include "cl_LF.h"
#include "cl_N.h"
+namespace cln {
+
ALL_cl_LF_OPERATIONS_SAME_PRECISION()
const cl_R operator* (const cl_R& x, const cl_R& y)
);
);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
-#include "cl_float.h"
+#include "cln/rational.h"
+#include "cln/float.h"
+
+namespace cln {
const cl_R operator+ (const cl_R& x, const cl_R& y)
{
#define plus(a,b) a+b
GEN_R_OP2_2(x,y, plus, return)
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
-#include "cl_float.h"
+#include "cln/rational.h"
+#include "cln/float.h"
+
+namespace cln {
const cl_R plus1 (const cl_R& x)
GEN_R_OP1_2(x, plus1, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
+namespace cln {
+
cl_boolean plusp (const cl_R& x)
{
if (minusp(x))
else
return cl_true; // sonst ist x>0.
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
-#include "cl_float.h"
+#include "cln/rational.h"
+#include "cln/float.h"
+
+namespace cln {
const cl_R recip (const cl_R& x)
GEN_R_OP1_2(x, recip, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
-#include "cl_integer.h"
-#include "cl_float.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/rational.h"
+#include "cln/integer.h"
+#include "cln/float.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_RA.h"
#include "cl_I.h"
+namespace cln {
+
const cl_R square (const cl_R& x)
#if 0
GEN_R_OP1_2(x, square, return)
#else // fully inlined, faster
GEN_R_OP1_7(x, square, return)
#endif
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
-#include "cl_integer.h"
-#include "cl_float.h"
-#include "cl_sfloat.h"
-#include "cl_ffloat.h"
-#include "cl_dfloat.h"
-#include "cl_lfloat.h"
+#include "cln/rational.h"
+#include "cln/integer.h"
+#include "cln/float.h"
+#include "cln/sfloat.h"
+#include "cln/ffloat.h"
+#include "cln/dfloat.h"
+#include "cln/lfloat.h"
#include "cl_RA.h"
#include "cl_I.h"
+namespace cln {
+
const cl_R operator- (const cl_R& x)
#define minus(a) -a
#if 0
#else // fully inlined, faster
GEN_R_OP1_7(x, minus, return)
#endif
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_DF_zerop.cc"
#include "cl_LF_zerop.cc"
+namespace cln {
+
cl_boolean zerop (const cl_R& x)
#if 0
GEN_R_OP1_2(x, zerop, return)
#else // fully inlined, faster
GEN_R_OP1_7(x, zerop, return)
#endif
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
-#include "cl_integer_io.h"
-#include "cl_abort.h"
+#include "cln/integer.h"
+#include "cln/integer_io.h"
+#include "cln/abort.h"
+
+namespace cln {
static const char * const cl_format_ones [20] = {
NULL,
var uintL * small_piece_ptr = &small_pieces[0];
do {
if (*illion_ptr == NULL) {
- fprint(cl_stderr, "format_cardinal: argument too large: ");
- fprint(cl_stderr, argument);
- fprint(cl_stderr, "\n");
+ fprint(stderr, "format_cardinal: argument too large: ");
+ fprint(stderr, argument);
+ fprint(stderr, "\n");
cl_abort();
}
var cl_I_div_t div = floor2(arg,1000);
} until (illion_ptr == &illions[0]);
}
}
+
+} // namespace cln
// BUGS:
// - This is slow.
-#include "cl_output.h"
-#include "cl_malloc.h"
-#include "cl_float.h"
-#include "cl_integer.h"
+#include "cln/output.h"
+#include "cln/malloc.h"
+#include "cln/float.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_spushstring.h"
+namespace cln {
+
// format_float_to_string(arg,width,d,k,dmin)
// ergibt einen String zum Floating-point arg:
// er hat den Wert von abs(arg)*expt(10,k), dabei mind. d Nachkommastellen
if (places >= width)
places = width-1;
// ein Punkt und places Nullen
- var char* string = (char *) cl_malloc_hook(1+places+1);
+ var char* string = (char *) malloc_hook(1+places+1);
string[0] = '.';
for (sintL i = 1; i <= places; i++) string[i] = '0';
string[1+places] = '\0';
);
}
+} // namespace cln
+
CL_PROVIDE_END(cl_fmt_floatstring)
// Implementation.
-#include "cl_integer_io.h"
+#include "cln/integer_io.h"
#include <string.h>
#include "cl_I.h"
+namespace cln {
+
void format_integer (cl_ostream stream, const cl_I& arg,
unsigned int base, sintL mincol, char padchar,
char commachar, uintL commainterval, cl_boolean commaflag,
return;
}
var char* oldstring = print_integer_to_string(base,arg);
- var uintL oldstring_length = strlen(oldstring);
+ var uintL oldstring_length = ::strlen(oldstring);
var uintL number_of_digits = (minusp(arg) ? oldstring_length-1 : oldstring_length);
var uintL number_of_commas = (commaflag ? floor(number_of_digits-1,commainterval) : 0);
var cl_boolean positive_sign = (cl_boolean) (positive_sign_flag && (arg > 0));
var uintL newstring_length = (positive_sign ? 1 : 0) + oldstring_length + number_of_commas;
- var char* newstring = (char *) cl_malloc_hook(newstring_length+1);
+ var char* newstring = (char *) malloc_hook(newstring_length+1);
newstring[newstring_length] = '\0'; // newstring termination
// newstring füllen:
{
format_padding(stream,mincol-newstring_length,padchar);
fprint(stream,newstring);
#endif
- cl_free_hook(newstring);
- cl_free_hook(oldstring);
+ free_hook(newstring);
+ free_hook(oldstring);
}
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
-#include "cl_integer_io.h"
-#include "cl_abort.h"
+#include "cln/integer.h"
+#include "cln/integer_io.h"
+#include "cln/abort.h"
+
+namespace cln {
void format_new_roman (cl_ostream stream, const cl_I& arg)
{
if (!(0 < arg && arg < 4000)) {
- fprint(cl_stderr, "format_new_roman: argument should be in the range 1 - 3999, not ");
- fprint(cl_stderr, arg);
- fprint(cl_stderr, ".\n");
+ fprint(stderr, "format_new_roman: argument should be in the range 1 - 3999, not ");
+ fprint(stderr, arg);
+ fprint(stderr, ".\n");
cl_abort();
}
var uintL value = cl_I_to_UL(arg);
}
}
}
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
-#include "cl_integer_io.h"
-#include "cl_abort.h"
+#include "cln/integer.h"
+#include "cln/integer_io.h"
+#include "cln/abort.h"
+
+namespace cln {
void format_old_roman (cl_ostream stream, const cl_I& arg)
{
if (!(0 < arg && arg < 5000)) {
- fprint(cl_stderr, "format_old_roman: argument should be in the range 1 - 4999, not ");
- fprint(cl_stderr, arg);
- fprint(cl_stderr, ".\n");
+ fprint(stderr, "format_old_roman: argument should be in the range 1 - 4999, not ");
+ fprint(stderr, arg);
+ fprint(stderr, ".\n");
cl_abort();
}
var uintL value = cl_I_to_UL(arg);
}
}
}
+
+} // namespace cln
// Implementation.
-#include "cl_integer.h"
+#include "cln/integer.h"
+
+namespace cln {
static const char * const cl_format_ordinal_ones [20] = {
NULL,
}
}
}
+
+} // namespace cln
#include <string.h>
+namespace cln {
+
void format_padded_string (cl_ostream stream, sintL mincol, sintL colinc, sintL minpad, char padchar, cl_boolean padleftflag, const char * str)
{
- var sintL need = strlen(str) + minpad; // so viele Zeichen mindestens
+ var sintL need = ::strlen(str) + minpad; // so viele Zeichen mindestens
var uintL auxpad = (need < mincol
? ceiling((uintL)(mincol - need), colinc) * colinc
: 0
if (padleftflag)
fprint(stream,str);
}
+
+} // namespace cln
// Implementation.
-#include "cl_real.h"
-#include "cl_integer.h"
-#include "cl_float.h"
+#include "cln/real.h"
+#include "cln/integer.h"
+#include "cln/float.h"
#include "cl_F.h"
#include "cl_SF.h"
#include "cl_FF.h"
#include "cl_DF.h"
#include "cl_LF.h"
+namespace cln {
+
// NOTE: This may introduce roundoff-errors, through the use of *, /, expt.
// But this doesn't matter since format_float_to_string() works with
// exact integers, starting with integer_decode_float().
);
}
-const cl_decoded_float format_scale_exponent (const cl_F& arg)
+const decoded_float format_scale_exponent (const cl_F& arg)
{
// Get float format parameters.
var const float_format_params params = get_float_params(arg);
var const cl_F& lg2 = params.lg2;
// Decode arg.
if (zerop(arg))
- return cl_decoded_float(zero,0,one);
+ return decoded_float(zero,0,one);
var cl_F abs_arg = abs(arg);
- var cl_decoded_float decoded = decode_float(abs_arg);
+ var decoded_float decoded = decode_float(abs_arg);
var cl_I& expon = decoded.exponent;
var cl_I expon10a = truncate1(expon*lg2); // nicht round, um Überlauf zu vermeiden
var cl_F signif10a = abs_arg / expt(ten,expon10a);
tenpow = tenpow * ten;
}
}
- return cl_decoded_float(signif10c,expon10c,float_sign(arg));
+ return decoded_float(signif10c,expon10c,float_sign(arg));
}
+} // namespace cln
+
CL_PROVIDE_END(cl_fmt_scaleexp)
// Implementation.
+namespace cln {
+
const char * const cl_format_tens [10] = {
NULL,
NULL,
"eighty",
"ninety",
};
+
+} // namespace cln
#ifndef _CL_FORMAT_H
#define _CL_FORMAT_H
-#include "cl_number.h"
-#include "cl_io.h"
-#include "cl_float.h"
+#include "cln/number.h"
+#include "cln/io.h"
+#include "cln/float.h"
+
+namespace cln {
// gibt arg als römische Zahl auf stream aus, z.B. 4 als IIII.
extern void format_old_roman (cl_ostream stream, const cl_I& arg);
// ganzem n und mantissa floating-point, 0.1 <= mantissa < 1,
// arg = mantissa * 10^n * sign (also 10^(n-1) <= abs(arg) < 10^n ).
// (Bei arg=0.0: 0.0 und n=0.)
-extern const cl_decoded_float format_scale_exponent (const cl_F& arg);
+extern const decoded_float format_scale_exponent (const cl_F& arg);
CL_REQUIRE(cl_fmt_scaleexp)
// format_float_to_string(arg,width,d,k,dmin)
// und höchstens die Länge width (width<=0 -> keine Einschränkung).
// Trotzdem wird nicht auf weniger als dmin Stellen gerundet.
struct digits_with_dot {
- char * string; // Mit cl_malloc_hook() alloziert, mit cl_free_hook() freizugeben.
+ char * string; // Mit malloc_hook() alloziert, mit free_hook() freizugeben.
uintL length; // strlen(string)
cl_boolean dot_comes_first; // string[0] == '.' ?
cl_boolean dot_comes_last; // string[strlen(string)-1] == '.' ?
extern const digits_with_dot format_float_to_string (const cl_F& arg, const sintL width, const sintL d, const sintL k, const sintL dmin);
CL_REQUIRE(cl_fmt_floatstring)
+} // namespace cln
#endif /* _CL_FORMAT_H */
#include "cl_sysdep.h"
// Specification.
-#include "cl_real_class.h"
+#include "cln/real_class.h"
// Implementation.
-#include "cl_input.h"
-#include "cl_real_io.h"
+#include "cln/input.h"
+#include "cln/real_io.h"
+
+namespace cln {
cl_read_flags cl_R_read_flags = {
syntax_real,
lsyntax_all,
10,
- { cl_float_format_ffloat, cl_float_format_lfloat_min, cl_true }
+ { float_format_ffloat, float_format_lfloat_min, cl_true }
};
cl_R::cl_R (const char * string)
pointer = as_cl_private_thing(
read_real(cl_R_read_flags,string,NULL,NULL));
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real_io.h"
+#include "cln/real_io.h"
// Implementation.
#include <string.h>
-#include "cl_input.h"
-#include "cl_rational_io.h"
-#include "cl_integer_io.h"
-#include "cl_float_io.h"
-#include "cl_integer.h"
+#include "cln/input.h"
+#include "cln/rational_io.h"
+#include "cln/integer_io.h"
+#include "cln/float_io.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_F.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
#undef floor
-#include <math.h>
+#include <cmath>
#define floor cln_floor
+namespace cln {
+
// Step forward over all digits, to the end of string or to the next non-digit.
static const char * skip_digits (const char * ptr, const char * string_limit, unsigned int base)
{
ASSERT((flags.syntax & ~(syntax_real|syntax_maybe_bad)) == 0);
// If no string_limit is given, it defaults to the end of the string.
if (!string_limit)
- string_limit = string + strlen(string);
+ string_limit = string + ::strlen(string);
if (flags.syntax & syntax_rational) {
// Check for rational number syntax.
var unsigned int rational_base = flags.rational_base;
goto not_rational_syntax;
var cl_I base = read_integer(10,0,ptr,0,base_end_ptr-ptr);
if (!((base >= 2) && (base <= 36))) {
- fprint(cl_stderr, "Base must be an integer in the range from 2 to 36, not ");
- fprint(cl_stderr, base);
- fprint(cl_stderr, "\n");
+ fprint(stderr, "Base must be an integer in the range from 2 to 36, not ");
+ fprint(stderr, base);
+ fprint(stderr, "\n");
cl_abort();
}
rational_base = FN_to_UL(base); ptr = base_end_ptr;
}
ptr = ptr_after_exponent;
var const char * ptr_after_prec = ptr;
- var cl_float_format_t prec;
+ var float_format_t prec;
if ((ptr != string_limit) && (*ptr == '_')) {
ptr++;
ptr_after_prec = skip_digits(ptr,string_limit,10);
if (ptr_after_prec == ptr) goto not_float_syntax;
var cl_I prec1 = digits_to_I(ptr,ptr_after_prec-ptr,10);
var uintL prec2 = cl_I_to_UL(prec1);
- prec = (float_base==10 ? cl_float_format(prec2)
- : (cl_float_format_t)((uintL)((1+prec2)*log((double)float_base)*1.442695041)+1)
+ prec = (float_base==10 ? float_format(prec2)
+ : (float_format_t)((uintL)((1+prec2)*::log((double)float_base)*1.442695041)+1)
);
} else {
switch (exponent_marker) {
- case 'S': prec = cl_float_format_sfloat; break;
- case 'F': prec = cl_float_format_ffloat; break;
- case 'D': prec = cl_float_format_dfloat; break;
+ case 'S': prec = float_format_sfloat; break;
+ case 'F': prec = float_format_ffloat; break;
+ case 'D': prec = float_format_dfloat; break;
case 'L': prec = flags.float_flags.default_lfloat_format; break;
case 'E': prec = flags.float_flags.default_float_format; break;
default: NOTREACHED
var uintL num_significant_digits =
(ptr_after_fracpart - ptr) - (ptr_before_fracpart > ptr ? 1 : 0);
var uintL prec2 = (num_significant_digits>=2 ? num_significant_digits-2 : 0);
- var cl_float_format_t precx =
- (float_base==10 ? cl_float_format(prec2)
- : (cl_float_format_t)((uintL)((1+prec2)*log((double)float_base)*1.442695041)+1)
+ var float_format_t precx =
+ (float_base==10 ? float_format(prec2)
+ : (float_format_t)((uintL)((1+prec2)*::log((double)float_base)*1.442695041)+1)
);
if ((uintL)precx > (uintL)prec)
prec = precx;
}
read_number_bad_syntax(string,string_limit);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real_io.h"
+#include "cln/real_io.h"
// Implementation.
-#include "cl_io.h"
+#include "cln/io.h"
#include "cl_spushstring.h"
-#include "cl_input.h"
+#include "cln/input.h"
+
+namespace cln {
// We read an entire token (or even more, if it begins with #C) into a
// buffer and then call read_real() on the buffer.
// Handle premature EOF.
eof: read_number_eof();
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
+namespace cln {
+
const cl_R abs (const cl_R& x)
{
// Methode:
else
return x;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_N.h"
+namespace cln {
+
// Cf. cl_R_p in cl_R_ring.cc.
// But here, for better inlining in g++, it is preferrable to finish every
// alternative with either "return cl_true;" or "return cl_false;".
} else
cl_as_error(x,"a real number",filename,line);
}
+
+} // namespace cln
#include "cl_LF.h"
+namespace cln {
+
const cl_R contagion (const cl_R& x, const cl_R& y)
{
#define X { return x; }
);
#endif
}
+
+} // namespace cln
// Implementation.
-// This dummy links in this module when <cl_real.h> requires it.
+namespace cln {
+
+// This dummy links in this module when <cln/real.h> requires it.
int cl_R_debug_module;
extern int cl_SF_debug_module;
&cl_LF_debug_module,
&cl_RA_debug_module
};
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_DF_eqhashcode.cc"
#include "cl_LF_eqhashcode.cc"
-uint32 cl_equal_hashcode (const cl_R& x)
-GEN_R_OP1_7(x, cl_equal_hashcode, return)
+namespace cln {
+
+uint32 equal_hashcode (const cl_R& x)
+GEN_R_OP1_7(x, equal_hashcode, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
-#include "cl_integer.h"
+#include "cln/rational.h"
+#include "cln/integer.h"
+
+namespace cln {
// Methode:
// Für y>0:
var cl_R z = expt_pos(x,abs_y); // (expt x (abs y))
return (y<0 ? recip(z) : z); // evtl. noch Kehrwert nehmen
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_rational.h"
-#include "cl_integer.h"
+#include "cln/rational.h"
+#include "cln/integer.h"
#include "cl_I.h"
+namespace cln {
+
// Methode:
// Für y>0:
// a:=x, b:=y.
var cl_R z = expt_pos(x,abs_y); // (expt x (abs y))
return (y_negative ? recip(z) : z); // evtl. noch Kehrwert nehmen
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
+namespace cln {
+
const cl_R max (const cl_R& x, const cl_R& y)
{
return (x >= y ? x : y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
+namespace cln {
+
const cl_R min (const cl_R& x, const cl_R& y)
{
return (x <= y ? x : y);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
+namespace cln {
+
const cl_RA rational (const cl_R& x)
GEN_R_OP1_2(x, rational, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
-#include "cl_float.h"
-#include "cl_rational.h"
-#include "cl_integer.h"
+#include "cln/float.h"
+#include "cln/rational.h"
+#include "cln/integer.h"
#include "cl_RA.h"
#include "cl_I.h"
+namespace cln {
+
// Methode (rekursiv dargestellt):
// Falls x rational ist: x.
// Falls x=0.0: 0.
const cl_RA rationalize (const cl_R& x)
GEN_R_OP1_2(x, rationalize, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_DF_signum.cc"
#include "cl_LF_signum.cc"
+namespace cln {
+
const cl_R signum (const cl_R& x)
GEN_R_OP1_7(x, signum, return)
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real_io.h"
+#include "cln/real_io.h"
// Implementation.
-#include "cl_output.h"
+#include "cln/output.h"
+
+namespace cln {
void print_real (cl_ostream stream, const cl_print_flags& flags, const cl_R& z)
{
print_real(stream,(const cl_print_number_flags&)flags,z);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real_io.h"
+#include "cln/real_io.h"
// Implementation.
-#include "cl_output.h"
+#include "cln/output.h"
+
+namespace cln {
void print_real (cl_ostream stream, const cl_print_number_flags& flags, const cl_R& z)
{
print_real(stream,(const cl_print_real_flags&)flags,z);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real_io.h"
+#include "cln/real_io.h"
// Implementation.
-#include "cl_real.h"
+#include "cln/real.h"
#include "cl_R.h"
-#include "cl_rational_io.h"
-#include "cl_float_io.h"
+#include "cln/rational_io.h"
+#include "cln/float_io.h"
+
+namespace cln {
void print_real (cl_ostream stream, const cl_print_real_flags& flags, const cl_R& z)
{
print_float(stream,flags,z);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_R.h"
#include "cl_RA.h"
-#include "cl_io.h"
-#include "cl_real_io.h"
-#include "cl_abort.h"
+#include "cln/io.h"
+#include "cln/real_io.h"
+#include "cln/abort.h"
-const cl_R random_R (cl_random_state& r, const cl_R& n)
+namespace cln {
+
+const cl_R random_R (random_state& r, const cl_R& n)
{
// n muß eine reelle Zahl sein, >0 und Float oder Integer
if (plusp(n)) {
}
}
}
- fprint(cl_stderr, "random: argument should be positive and an integer or float: ");
- fprint(cl_stderr, n);
- fprint(cl_stderr, "\n");
+ fprint(stderr, "random: argument should be positive and an integer or float: ");
+ fprint(stderr, n);
+ fprint(stderr, "\n");
cl_abort();
}
+
+} // namespace cln
CL_PROVIDE(cl_R_ring)
// Specification.
-#include "cl_real_ring.h"
+#include "cln/real_ring.h"
// Implementation.
-#include "cl_real.h"
+#include "cln/real.h"
#include "cl_R.h"
-#include "cl_io.h"
-#include "cl_real_io.h"
+#include "cln/io.h"
+#include "cln/real_io.h"
+
+namespace cln {
static void R_fprint (cl_heap_ring* R, cl_ostream stream, const _cl_ring_element& x)
{
static cl_boolean R_equal (cl_heap_ring* R, const _cl_ring_element& x, const _cl_ring_element& y)
{
unused R;
- return cl_equal(The(cl_R)(x),The(cl_R)(y));
+ return equal(The(cl_R)(x),The(cl_R)(y));
}
static const _cl_ring_element R_zero (cl_heap_ring* R)
static cl_number_ring_ops<cl_R> R_ops = {
cl_R_p,
- cl_equal,
+ equal,
exact_zerop,
operator+,
operator-,
const cl_real_ring cl_R_ring;
+} // namespace cln
+
CL_PROVIDE_END(cl_R_ring)
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
+namespace cln {
+
const cl_R atan (const cl_R& x)
{
// Methode:
// arctan(x) = arctan(X=1,Y=x).
return atan(1,x);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
-#include "cl_float.h"
+#include "cln/float.h"
#include "cl_F_tran.h"
#include "cl_N.h"
#include "cl_R.h"
+namespace cln {
+
const cl_R atan (const cl_R& x, const cl_R& y)
{
// Methode:
if (zerop(x)) // x=0 -> Error
{ cl_error_division_by_0(); }
if (minusp(x)) // x<0 -> pi in Default-Float-Genauigkeit
- { return cl_pi(); }
+ { return pi(); }
return 0; // x>0 -> 0
}
elif (eq(x,0)) {
if (zerop(y)) // y=0 -> Error
{ cl_error_division_by_0(); }
if (minusp(y)) // y<0 -> -pi/2
- { return - scale_float(cl_pi(),-1); }
- return scale_float(cl_pi(),-1); // y>0 -> pi/2
+ { return - scale_float(pi(),-1); }
+ return scale_float(pi(),-1); // y>0 -> pi/2
} else {
Mutable(cl_R,x);
Mutable(cl_R,y);
// x<0 -> pi bzw. -pi addieren:
if (!minusp(y))
// y>=0 -> atan(y/x) + pi
- return z + cl_pi(z);
+ return z + pi(z);
else
// y<0 -> atan(y/x) - pi
- return z - cl_pi(z);
+ return z - pi(z);
else
return z;
} else {
// von pi/2 bzw. -pi/2 subtrahieren:
if (!minusp(y))
// y>=0 -> pi/2 - atan(x/y)
- return scale_float(cl_pi(z),-1) - z;
+ return scale_float(pi(z),-1) - z;
else
// y<0 -> -pi/2 - atan(x/y)
- return - scale_float(cl_pi(z),-1) - z;
+ return - scale_float(pi(z),-1) - z;
}
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
-#include "cl_float.h"
+#include "cln/float.h"
#include "cl_R.h"
+namespace cln {
+
const cl_R cos (const cl_R& x)
{
// Methode:
return cos(x);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
-#include "cl_float.h"
+#include "cln/float.h"
#include "cl_R.h"
+namespace cln {
+
const cl_R cosh (const cl_R& x)
{
// Methode:
return cosh(x);
}
}
+
+} // namespace cln
-// cl_cosh_sinh().
+// cosh_sinh().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
-#include "cl_float.h"
+#include "cln/float.h"
#include "cl_R.h"
-const cl_cosh_sinh_t cl_cosh_sinh (const cl_R& x)
+namespace cln {
+
+const cosh_sinh_t cosh_sinh (const cl_R& x)
{
// Methode:
// x rational -> bei x=0 (1,0) als Ergebnis, sonst x in Float umwandeln.
if (rationalp(x)) {
DeclareType(cl_RA,x);
if (zerop(x)) // x=0 -> (1,0) als Ergebnis
- return cl_cosh_sinh_t(1,0);
- return cl_cosh_sinh(cl_float(x)); // sonst in Float umwandeln
+ return cosh_sinh_t(1,0);
+ return cosh_sinh(cl_float(x)); // sonst in Float umwandeln
} else {
DeclareType(cl_F,x);
- return cl_cosh_sinh(x);
+ return cosh_sinh(x);
}
}
+
+} // namespace cln
-// cl_cos_sin().
+// cos_sin().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
-#include "cl_float.h"
+#include "cln/float.h"
#include "cl_R.h"
-const cl_cos_sin_t cl_cos_sin (const cl_R& x)
+namespace cln {
+
+const cos_sin_t cos_sin (const cl_R& x)
{
// Methode:
// x rational -> bei x=0 (1,0) als Ergebnis, sonst x in Float umwandeln.
if (rationalp(x)) {
DeclareType(cl_RA,x);
if (zerop(x)) // x=0 -> (1,0) als Ergebnis
- return cl_cos_sin_t(1,0);
- return cl_cos_sin(cl_float(x)); // sonst in Float umwandeln
+ return cos_sin_t(1,0);
+ return cos_sin(cl_float(x)); // sonst in Float umwandeln
} else {
DeclareType(cl_F,x);
- return cl_cos_sin(x);
+ return cos_sin(x);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
-#include "cl_float.h"
+#include "cln/float.h"
#include "cl_R.h"
+namespace cln {
+
const cl_R exp (const cl_R& x)
{
// Methode:
return exp(x);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
-#include "cl_float.h"
+#include "cln/float.h"
#include "cl_R.h"
+namespace cln {
+
const cl_R ln (const cl_R& x)
{
// Methode:
return ln(x);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
#include "cl_N.h"
#include "cl_R.h"
-#include "cl_rational.h"
-#include "cl_float.h"
+#include "cln/rational.h"
+#include "cln/float.h"
+
+namespace cln {
const cl_R log (const cl_R& a, const cl_R& b)
{
// Nun a,b beide Floats.
return ln(The(cl_F)(a)) / ln(The(cl_F)(b));
}}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
-#include "cl_float.h"
+#include "cln/float.h"
#include "cl_R.h"
+namespace cln {
+
const cl_R sin (const cl_R& x)
{
// Methode:
return sin(x);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
-#include "cl_float.h"
+#include "cln/float.h"
#include "cl_R.h"
+namespace cln {
+
const cl_R sinh (const cl_R& x)
{
// Methode:
return sinh(x);
}
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
+namespace cln {
+
MAYBE_INLINE
const cl_R tan (const cl_R& x)
{
// Methode:
// (/ (sin x) (cos x))
- var cl_cos_sin_t trig = cl_cos_sin(x);
+ var cos_sin_t trig = cos_sin(x);
return trig.sin / trig.cos;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_real.h"
+#include "cln/real.h"
// Implementation.
+namespace cln {
+
MAYBE_INLINE
const cl_R tanh (const cl_R& x)
{
// Methode:
// (/ (sinh x) (cosh x))
- var cl_cosh_sinh_t hyp = cl_cosh_sinh(x);
+ var cosh_sinh_t hyp = cosh_sinh(x);
return hyp.sinh / hyp.cosh;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_timing.h"
+#include "cln/timing.h"
// Implementation.
+namespace cln {
+
static void report_accu (const cl_timing& t)
{
var const cl_time_consumption usage_end = cl_current_time_consumption();
report_fn = report_accu; report_destination = &accumulator;
tmp = cl_current_time_consumption();
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_timing.h"
+#include "cln/timing.h"
// Implementation.
+namespace cln {
+
static void report_stream (const cl_timing& t)
{
var const cl_time_consumption usage_end = cl_current_time_consumption();
usage.realtime = usage_end.realtime - usage_start.realtime;
usage.usertime = usage_end.usertime - usage_start.usertime;
- var cl_ostream destination =
-#if defined(CL_IO_STDIO)
- (FILE*) t.report_destination;
-#endif
-#if defined(CL_IO_IOSTREAM)
- *(ostream*) t.report_destination;
-#endif
+ var cl_ostream destination = *(std::ostream*) t.report_destination;
if (t.comment)
fprint(destination,t.comment);
cl_timing_report(destination,usage);
cl_timing::cl_timing (cl_ostream destination)
{
report_fn = report_stream;
-#if defined(CL_IO_STDIO)
- report_destination = destination;
-#endif
-#if defined(CL_IO_IOSTREAM)
report_destination = &destination;
-#endif
comment = NULL;
tmp = cl_current_time_consumption();
}
cl_timing::cl_timing (const char * msg, cl_ostream destination)
{
report_fn = report_stream;
-#if defined(CL_IO_STDIO)
- report_destination = destination;
-#endif
-#if defined(CL_IO_IOSTREAM)
report_destination = &destination;
-#endif
comment = msg;
tmp = cl_current_time_consumption();
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_timing.h"
+#include "cln/timing.h"
// Implementation.
#include "cl_t_config.h"
+
#if defined(HAVE_GETTIMEOFDAY)
#include <sys/time.h>
#ifdef GETTIMEOFDAY_DOTS
extern "C" int perror (const char *);
#endif
+namespace cln {
+
const cl_timespec cl_current_time ()
{
#if defined(HAVE_GETTIMEOFDAY)
return cl_timespec(time(NULL),0);
#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_timing.h"
+#include "cln/timing.h"
// Implementation.
extern "C" int perror (const char *);
#endif
+namespace cln {
+
const cl_time_consumption cl_current_time_consumption ()
{
var cl_time_consumption result;
return result;
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_timing.h"
+#include "cln/timing.h"
// Implementation.
+namespace cln {
+
cl_timing::~cl_timing ()
{
report_fn(*this);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_timing.h"
+#include "cln/timing.h"
// Implementation.
+namespace cln {
+
const cl_timespec operator- (const cl_timespec& a, const cl_time_duration& b)
{
var uintL sec = a.tv_sec - b.tv_sec;
}
return cl_timespec(sec,nsec);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_timing.h"
+#include "cln/timing.h"
// Implementation.
+namespace cln {
+
const cl_timespec operator+ (const cl_timespec& a, const cl_time_duration& b)
{
var uintL sec = a.tv_sec + b.tv_sec;
}
return cl_timespec(sec,nsec);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_timing.h"
+#include "cln/timing.h"
// Implementation.
+namespace cln {
+
const cl_time_duration operator- (const cl_timespec& a, const cl_timespec& b)
{
var sintL sec = a.tv_sec - b.tv_sec;
}
return cl_time_duration(sec,nsec);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_timing.h"
+#include "cln/timing.h"
// Implementation.
+namespace cln {
+
// Round to 3 decimal places.
#define CL_HZ 1000
#define CL_HZ_NSECS (1000000000/CL_HZ)
var uintL user_sec = t.usertime.tv_sec;
var uintL user_msec = (t.usertime.tv_nsec + (CL_HZ_NSECS-1)/2) / CL_HZ_NSECS;
if (user_msec >= CL_HZ) { user_msec -= CL_HZ; user_sec += 1; }
-#if defined(CL_IO_STDIO)
- fprintf(stream, "real time: %4u.%03u s, run time: %4u.%03u s",
- real_sec, real_msec, user_sec, user_msec);
-#endif
-#if defined(CL_IO_IOSTREAM)
var char oldfill = stream.fill();
var int oldwidth = stream.width();
stream << "real time: ";
stream.fill(oldfill);
stream << " s";
stream.width(oldwidth);
-#endif
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_timing.h"
+#include "cln/timing.h"
// Implementation.
+namespace cln {
+
const cl_time_duration operator- (const cl_time_duration& a, const cl_time_duration& b)
{
var sintL sec = a.tv_sec - b.tv_sec;
}
return cl_time_duration(sec,nsec);
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_timing.h"
+#include "cln/timing.h"
// Implementation.
+namespace cln {
+
const cl_time_duration operator+ (const cl_time_duration& a, const cl_time_duration& b)
{
var uintL sum_sec = a.tv_sec + b.tv_sec;
}
return cl_time_duration(sum_sec,sum_nsec);
}
+
+} // namespace cln
CL_PROVIDE(cl_GV_I)
// Specification.
-#include "cl_GV_integer.h"
+#include "cln/GV_integer.h"
// Implementation.
#include "cl_I.h"
#include "cl_DS.h"
-#include "cl_abort.h"
+#include "cln/abort.h"
#include "cl_offsetof.h"
+namespace cln {
// Memory-efficient integer vectors: If all entries are known in advance to
// be >= 0 and < 2^m, we reserve only m bits for each entry. (m=1,2,4,8,16,32).
cl_heap_GV_I* cl_make_heap_GV_I (uintL len)
{
- var cl_heap_GV_I_general* hv = (cl_heap_GV_I_general*) cl_malloc_hook(offsetofa(cl_heap_GV_I_general,data)+sizeof(cl_I)*len);
+ var cl_heap_GV_I_general* hv = (cl_heap_GV_I_general*) malloc_hook(offsetofa(cl_heap_GV_I_general,data)+sizeof(cl_I)*len);
hv->refcount = 1;
hv->type = &cl_class_gvector_integer;
new (&hv->v) cl_GV_inner<cl_I> (len,&general_vectorops.ops);
// For room allocation purposes, be pessimistic: assume the uintD case (since intDsize>=32).
var uintL words = // ceiling(len*2^log2_bits,intDsize)
(((sintL)len-1)>>(log2_intDsize-log2_bits))+1;
- var cl_heap_GV_I_bits32* hv = (cl_heap_GV_I_bits32*) cl_malloc_hook(offsetofa(cl_heap_GV_I_bits32,data)+sizeof(uintD)*words);
+ var cl_heap_GV_I_bits32* hv = (cl_heap_GV_I_bits32*) malloc_hook(offsetofa(cl_heap_GV_I_bits32,data)+sizeof(uintD)*words);
hv->refcount = 1;
hv->type = &cl_class_gvector_integer;
new (&hv->v) cl_GV_inner<cl_I> (len,&bits_vectorops[log2_bits]->ops);
// An empty vector.
const cl_GV_I cl_null_GV_I = cl_GV_I((uintL)0);
+} // namespace cln
+
CL_PROVIDE_END(cl_GV_I)
// Specification.
#define CL_GV_NO_RANGECHECKS
-#include "cl_GV_integer.h"
+#include "cln/GV_integer.h"
// Implementation.
+namespace cln {
+
const cl_GV_I copy (const cl_GV_I& v)
{
var uintL len = v.length();
cl_GV_I::copy_elements(v,0,w,0,len);
return w;
}
+
+} // namespace cln
// Implementation.
-#include "cl_GV_integer.h"
-#include "cl_io.h"
+#include "cln/GV_integer.h"
+#include "cln/io.h"
+
+namespace cln {
static void dprint (cl_heap* pointer)
{
AT_INITIALIZATION(dprint_GV_I)
{ cl_register_type_printer(cl_class_gvector_integer,dprint); }
-// This dummy links in this module when <cl_GV_integer.h> requires it.
+// This dummy links in this module when <cln/GV_integer.h> requires it.
int cl_GV_I_debug_module;
+
+} // namespace cln
#ifndef _CL_GV_IO_H
#define _CL_GV_IO_H
-#include "cl_number_io.h"
-#include "cl_GV.h"
-#include "cl_GV_complex.h"
+#include "cln/number_io.h"
+#include "cln/GV.h"
+#include "cln/GV_complex.h"
+namespace cln {
// Gibt einen Vektor aus.
// print_vector(stream,flags,fun,z);
// > vector: Vektor
extern void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* fun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_GV_number& vector);
+} // namespace cln
#endif /* _CL_GV_IO_H */
CL_PROVIDE(cl_GV_number)
// Specification.
-#include "cl_GV_number.h"
+#include "cln/GV_number.h"
// Implementation.
-#include "cl_abort.h"
+#include "cln/abort.h"
#include "cl_offsetof.h"
+namespace cln {
static void cl_gvector_number_destructor (cl_heap* pointer)
{
cl_heap_GV_number* cl_make_heap_GV_number (uintL len)
{
- var cl_heap_GV_number_general* hv = (cl_heap_GV_number_general*) cl_malloc_hook(offsetofa(cl_heap_GV_number_general,data)+sizeof(cl_number)*len);
+ var cl_heap_GV_number_general* hv = (cl_heap_GV_number_general*) malloc_hook(offsetofa(cl_heap_GV_number_general,data)+sizeof(cl_number)*len);
hv->refcount = 1;
hv->type = &cl_class_gvector_number;
new (&hv->v) cl_GV_inner<cl_number> (len,&general_vectorops);
// An empty vector.
const cl_GV_number cl_null_GV_number = cl_GV_number((uintL)0);
+} // namespace cln
+
CL_PROVIDE_END(cl_GV_number)
// Specification.
#define CL_GV_NO_RANGECHECKS
-#include "cl_GV_number.h"
+#include "cln/GV_number.h"
// Implementation.
+namespace cln {
+
const cl_GV_number copy (const cl_GV_number& v)
{
var uintL len = v.length();
cl_GV_number::copy_elements(v,0,w,0,len);
return w;
}
+
+} // namespace cln
// Implementation.
-#include "cl_output.h"
-#include "cl_GV_number.h"
-#include "cl_io.h"
+#include "cln/output.h"
+#include "cln/GV_number.h"
+#include "cln/io.h"
#include "cl_GV_io.h"
+namespace cln {
+
static void print_for_debug (cl_ostream stream, const cl_print_flags& flags, const cl_number& z)
{
unused stream; // must be cl_debugout
- unused flags; // must be cl_default_print_flags
+ unused flags; // must be default_print_flags
z.debug_print();
}
{
var const cl_GV_number& obj = *(const cl_GV_number*)&pointer;
fprint(cl_debugout, "(cl_GV_number) ");
- print_vector(cl_debugout,cl_default_print_flags,&print_for_debug,obj);
+ print_vector(cl_debugout,default_print_flags,&print_for_debug,obj);
}
AT_INITIALIZATION(dprint_GV_number)
{ cl_register_type_printer(cl_class_gvector_number,dprint); }
-// This dummy links in this module when <cl_GV_number.h> requires it.
+// This dummy links in this module when <cln/GV_number.h> requires it.
int cl_GV_number_debug_module;
extern int cl_GV_I_debug_module;
static void* dummy[] = { &dummy,
&cl_GV_I_debug_module
};
+
+} // namespace cln
// Specification.
#define CL_SV_NO_RANGECHECKS
-#include "cl_SV.h"
+#include "cln/SV.h"
// Implementation.
-#include "cl_malloc.h"
+#include "cln/malloc.h"
+
+namespace cln {
const cl_SV_any copy (const cl_SV_any& src)
{
var uintL len = src.length();
- var cl_heap_SV_any* hv = (cl_heap_SV_any*) cl_malloc_hook(sizeof(cl_heap_SV_any)+sizeof(cl_gcobject)*len);
+ var cl_heap_SV_any* hv = (cl_heap_SV_any*) malloc_hook(sizeof(cl_heap_SV_any)+sizeof(cl_gcobject)*len);
hv->refcount = 1;
hv->type = src.pointer_type();
new (&hv->v) cl_SV_inner<cl_gcobject> (len);
init1(cl_gcobject, hv->v[i]) (src[i]);
return hv;
}
+
+} // namespace cln
#ifndef _CL_SV_IO_H
#define _CL_SV_IO_H
-#include "cl_number_io.h"
-#include "cl_SV.h"
-#include "cl_SV_number.h"
+#include "cln/number_io.h"
+#include "cln/SV.h"
+#include "cln/SV_number.h"
+namespace cln {
// Gibt einen Vektor aus.
// print_vector(stream,flags,fun,z);
// > vector: Vektor
extern void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* fun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_SV_number& vector);
+} // namespace cln
#endif /* _CL_SV_IO_H */
CL_PROVIDE(cl_SV_number)
// Specification.
-#include "cl_SV_number.h"
+#include "cln/SV_number.h"
// Implementation.
-#include "cl_abort.h"
+#include "cln/abort.h"
+namespace cln {
static void cl_svector_number_destructor (cl_heap* pointer)
{
cl_heap_SV_number* cl_make_heap_SV_number_uninit (uintL len)
{
- var cl_heap_SV_number* hv = (cl_heap_SV_number*) cl_malloc_hook(sizeof(cl_heap_SV_number)+sizeof(cl_number)*len);
+ var cl_heap_SV_number* hv = (cl_heap_SV_number*) malloc_hook(sizeof(cl_heap_SV_number)+sizeof(cl_number)*len);
hv->refcount = 1;
hv->type = &cl_class_svector_number;
new (&hv->v) cl_SV_inner<cl_number> (len);
cl_heap_SV_number* cl_make_heap_SV_number (uintL len)
{
- var cl_heap_SV_number* hv = (cl_heap_SV_number*) cl_malloc_hook(sizeof(cl_heap_SV_number)+sizeof(cl_number)*len);
+ var cl_heap_SV_number* hv = (cl_heap_SV_number*) malloc_hook(sizeof(cl_heap_SV_number)+sizeof(cl_number)*len);
hv->refcount = 1;
hv->type = &cl_class_svector_number;
new (&hv->v) cl_SV_inner<cl_number> (len);
// An empty vector.
const cl_SV_number cl_null_SV_number = cl_SV_number((uintL)0);
+} // namespace cln
+
CL_PROVIDE_END(cl_SV_number)
// Implementation.
-#include "cl_output.h"
-#include "cl_SV_number.h"
-#include "cl_io.h"
+#include "cln/output.h"
+#include "cln/SV_number.h"
+#include "cln/io.h"
#include "cl_SV_io.h"
+namespace cln {
+
static void print_for_debug (cl_ostream stream, const cl_print_flags& flags, const cl_number& z)
{
unused stream; // must be cl_debugout
- unused flags; // must be cl_default_print_flags
+ unused flags; // must be default_print_flags
z.debug_print();
}
{
var const cl_SV_number& obj = *(const cl_SV_number*)&pointer;
fprint(cl_debugout, "(cl_SV_number) ");
- print_vector(cl_debugout,cl_default_print_flags,&print_for_debug,obj);
+ print_vector(cl_debugout,default_print_flags,&print_for_debug,obj);
}
AT_INITIALIZATION(dprint_SV_number)
{ cl_register_type_printer(cl_class_svector_number,dprint); }
-// This dummy links in this module when <cl_SV_number.h> requires it.
+// This dummy links in this module when <cln/SV_number.h> requires it.
int cl_SV_number_debug_module;
+
+} // namespace cln
CL_PROVIDE(cl_SV_ringelt)
// Specification.
-#include "cl_SV_ringelt.h"
+#include "cln/SV_ringelt.h"
// Implementation.
-#include "cl_abort.h"
+#include "cln/abort.h"
+namespace cln {
static void cl_svector_ringelt_destructor (cl_heap* pointer)
{
cl_heap_SV_ringelt* cl_make_heap_SV_ringelt_uninit (uintL len)
{
- var cl_heap_SV_ringelt* hv = (cl_heap_SV_ringelt*) cl_malloc_hook(sizeof(cl_heap_SV_ringelt)+sizeof(_cl_ring_element)*len);
+ var cl_heap_SV_ringelt* hv = (cl_heap_SV_ringelt*) malloc_hook(sizeof(cl_heap_SV_ringelt)+sizeof(_cl_ring_element)*len);
hv->refcount = 1;
hv->type = &cl_class_svector_ringelt;
new (&hv->v) cl_SV_inner<_cl_ring_element> (len);
cl_heap_SV_ringelt* cl_make_heap_SV_ringelt (uintL len)
{
- var cl_heap_SV_ringelt* hv = (cl_heap_SV_ringelt*) cl_malloc_hook(sizeof(cl_heap_SV_ringelt)+sizeof(_cl_ring_element)*len);
+ var cl_heap_SV_ringelt* hv = (cl_heap_SV_ringelt*) malloc_hook(sizeof(cl_heap_SV_ringelt)+sizeof(_cl_ring_element)*len);
hv->refcount = 1;
hv->type = &cl_class_svector_ringelt;
new (&hv->v) cl_SV_inner<_cl_ring_element> (len);
// An empty vector.
const cl_SV_ringelt cl_null_SV_ringelt = cl_SV_ringelt((uintL)0);
+} // namespace cln
+
CL_PROVIDE_END(cl_SV_ringelt)
// Implementation.
-#include "cl_SV_ringelt.h"
-#include "cl_io.h"
+#include "cln/SV_ringelt.h"
+#include "cln/io.h"
+
+namespace cln {
extern void cl_dprint_unknown (cl_heap* pointer);
static void dprint (cl_heap* pointer)
AT_INITIALIZATION(dprint_SV_ringelt)
{ cl_register_type_printer(cl_class_svector_ringelt,dprint); }
-// This dummy links in this module when <cl_SV_ringelt.h> requires it.
+// This dummy links in this module when <cln/SV_ringelt.h> requires it.
int cl_SV_ringelt_debug_module;
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_GV_complex.h"
-#include "cl_GV_real.h"
-#include "cl_GV_rational.h"
-#include "cl_GV_integer.h"
+#include "cln/GV_complex.h"
+#include "cln/GV_real.h"
+#include "cln/GV_rational.h"
+#include "cln/GV_integer.h"
#include "cl_GV_io.h"
// Implementation.
-#include "cl_output.h"
+#include "cln/output.h"
+
+namespace cln {
void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* printfun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_GV_number& vector)
{
else
fprintchar(stream,']');
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_SV_ringelt.h"
+#include "cln/SV_ringelt.h"
// Implementation.
-#include "cl_output.h"
+#include "cln/output.h"
+
+namespace cln {
void fprint (cl_ostream stream, const cl_ring& R, const cl_SV_ringelt& vector)
{
- var const cl_print_flags& flags = cl_default_print_flags;
+ var const cl_print_flags& flags = default_print_flags;
var uintL len = vector.length();
if (flags.vector_syntax == vsyntax_commonlisp) {
fprintchar(stream,'#');
else
fprintchar(stream,']');
}
+
+} // namespace cln
#include "cl_sysdep.h"
// Specification.
-#include "cl_SV_complex.h"
-#include "cl_SV_real.h"
-#include "cl_SV_rational.h"
-#include "cl_SV_integer.h"
+#include "cln/SV_complex.h"
+#include "cln/SV_real.h"
+#include "cln/SV_rational.h"
+#include "cln/SV_integer.h"
#include "cl_SV_io.h"
// Implementation.
-#include "cl_output.h"
+#include "cln/output.h"
+
+namespace cln {
void print_vector (cl_ostream stream, const cl_print_flags& flags, void (* printfun) (cl_ostream, const cl_print_flags&, const cl_number&), const cl_SV_number& vector)
{
else
fprintchar(stream,']');
}
+
+} // namespace cln
clean : force
$(RM) *.s *.o *.a exam tests main a.out core
+ $(RM) -r .libs _libs
distclean : clean
$(RM) config.status config.log config.cache Makefile
#include <stdlib.h>
-#include <cl_io.h>
-#include <cl_real.h>
+#include <cln/io.h>
+#include <cln/real.h>
+
+using namespace std;
+using namespace cln;
extern int test_integer();
extern int test_rational();
int main ()
{
if (!test_all()) {
- fprint (cl_stdout, "Tests passed.\n");
+ cout << "Tests passed." << endl;
exit(0);
} else {
- fprint (cl_stdout, "Tests failed.\n");
+ cout << "Tests failed" << endl;
exit(1);
}
}
#ifndef _EXAM_H
#define _EXAM_H
-#include <cl_number.h>
-#include <cl_io.h>
+#include <cln/number.h>
+#include <cln/io.h>
+using namespace std;
+using namespace cln;
// Michael Stoll 23. 3. 1993
// C++ version: Bruno Haible 1.11.1995
rtype computed_result = arg1 op arg2; \
rtype result = rtype(test.result); \
if (computed_result != result) { \
- fprint(cl_stderr, "Error in " #typename "_" #opname "_tests["); \
- fprintdecimal(cl_stderr, i); \
- fprint(cl_stderr, "] !\n"); \
- fprint(cl_stderr, "Result should be: "); \
- fprint(cl_stderr, result); \
- fprint(cl_stderr, "\n"); \
- fprint(cl_stderr, "Result computed : "); \
- fprint(cl_stderr, computed_result); \
- fprint(cl_stderr, "\n"); \
- fprint(cl_stderr, "\n"); \
+ stderr << "Error in " #typename "_" #opname "_tests[" << i << "] !" << endl; \
+ stderr << "Result should be: " << result << endl; \
+ stderr << "Result computed : " << computed_result << endl << endl; \
error = 1; \
} \
} \
cl_I result1 = cl_I(test.result1); \
type result2 = type(test.result2); \
if ((computed_result.quotient != result1) || (computed_result.remainder != result2)) { \
- fprint(cl_stderr, "Error in " #typename "_floor_tests["); \
- fprintdecimal(cl_stderr, i); \
- fprint(cl_stderr, "] !\n"); \
- fprint(cl_stderr, "Results should be: "); \
- fprint(cl_stderr, result1); \
- fprint(cl_stderr, ", "); \
- fprint(cl_stderr, result2); \
- fprint(cl_stderr, "\n"); \
- fprint(cl_stderr, "Results computed : "); \
- fprint(cl_stderr, computed_result.quotient); \
- fprint(cl_stderr, ", "); \
- fprint(cl_stderr, computed_result.remainder); \
- fprint(cl_stderr, "\n"); \
- fprint(cl_stderr, "\n"); \
+ stderr << "Error in " #typename "_floor_tests[" << i << endl; \
+ stderr << "Results should be: " << result1 << ", " << result2 << endl; \
+ stderr << "Results computed : " << computed_result.quotient << ", " << computed_result.remainder << endl << endl; \
error = 1; \
} \
} \
#include "exam.h"
-#include <cl_dfloat.h>
-#include <cl_dfloat_io.h>
+#include <cln/dfloat.h>
+#include <cln/dfloat_io.h>
static div_test dfloat_div_tests[] = {
#include "exam.h"
-#include <cl_dfloat.h>
-#include <cl_dfloat_io.h>
-#include <cl_integer.h>
-#include <cl_integer_io.h>
+#include <cln/dfloat.h>
+#include <cln/dfloat_io.h>
+#include <cln/integer.h>
+#include <cln/integer_io.h>
static floor_test dfloat_floor_tests[] = {
#include "exam.h"
-#include <cl_dfloat.h>
-#include <cl_dfloat_io.h>
+#include <cln/dfloat.h>
+#include <cln/dfloat_io.h>
static minus_test dfloat_minus_tests[] = {
#include "exam.h"
-#include <cl_dfloat.h>
-#include <cl_dfloat_io.h>
+#include <cln/dfloat.h>
+#include <cln/dfloat_io.h>
static mul_test dfloat_mul_tests[] = {
#include "exam.h"
-#include <cl_dfloat.h>
-#include <cl_dfloat_io.h>
+#include <cln/dfloat.h>
+#include <cln/dfloat_io.h>
static plus_test dfloat_plus_tests[] = {
#include "exam.h"
-#include <cl_ffloat.h>
-#include <cl_ffloat_io.h>
+#include <cln/ffloat.h>
+#include <cln/ffloat_io.h>
static div_test ffloat_div_tests[] = {
#include "exam.h"
-#include <cl_ffloat.h>
-#include <cl_ffloat_io.h>
-#include <cl_integer.h>
-#include <cl_integer_io.h>
+#include <cln/ffloat.h>
+#include <cln/ffloat_io.h>
+#include <cln/integer.h>
+#include <cln/integer_io.h>
static floor_test ffloat_floor_tests[] = {
#include "exam.h"
-#include <cl_ffloat.h>
-#include <cl_ffloat_io.h>
+#include <cln/ffloat.h>
+#include <cln/ffloat_io.h>
static minus_test ffloat_minus_tests[] = {
#include "exam.h"
-#include <cl_ffloat.h>
-#include <cl_ffloat_io.h>
+#include <cln/ffloat.h>
+#include <cln/ffloat_io.h>
static mul_test ffloat_mul_tests[] = {
#include "exam.h"
-#include <cl_ffloat.h>
-#include <cl_ffloat_io.h>
+#include <cln/ffloat.h>
+#include <cln/ffloat_io.h>
static plus_test ffloat_plus_tests[] = {
#include "exam.h"
-#include <cl_integer.h>
-#include <cl_integer_io.h>
-#include <cl_rational.h>
-#include <cl_rational_io.h>
+#include <cln/integer.h>
+#include <cln/integer_io.h>
+#include <cln/rational.h>
+#include <cln/rational_io.h>
static div_test integer_div_tests[] = {
#include "exam.h"
-#include <cl_integer.h>
-#include <cl_integer_io.h>
+#include <cln/integer.h>
+#include <cln/integer_io.h>
static floor_test integer_floor_tests[] = {
-#include <cl_integer.h>
-#include <cl_integer_io.h>
-#include <cl_io.h>
+#include <cln/integer.h>
+#include <cln/integer_io.h>
+#include <cln/io.h>
+
+using namespace std;
+using namespace cln;
#define ASSERT(expr) \
- if (!(expr)) { \
- fprint(cl_stderr,"Assertion failed! File "); \
- fprint(cl_stderr,__FILE__); \
- fprint(cl_stderr,", line "); \
- fprintdecimal(cl_stderr,__LINE__); \
- fprint(cl_stderr,".\n"); \
- error = 1; \
+ if (!(expr)) { \
+ stderr << "Assertion failed! File " << __FILE__ << ", line " << __LINE__ << endl; \
+ error = 1; \
}
struct gcd_test {
const char * arg1;
- const char * arg2;
- const char * result;
+ const char * arg2;
+ const char * result;
};
#define num_elements(array) (sizeof(array)/sizeof(array[0]))
rtype computed_result = opname(arg1,arg2); \
rtype result = rtype(test.result); \
if (computed_result != result) { \
- fprint(cl_stderr, "Error in " #typename "_" #opname "_tests["); \
- fprintdecimal(cl_stderr, i); \
- fprint(cl_stderr, "] !\n"); \
- fprint(cl_stderr, "Result should be: "); \
- fprint(cl_stderr, result); \
- fprint(cl_stderr, "\n"); \
- fprint(cl_stderr, "Result computed : "); \
- fprint(cl_stderr, computed_result); \
- fprint(cl_stderr, "\n"); \
- fprint(cl_stderr, "\n"); \
+ stderr << "Error in " #typename "_" #opname "_tests[" << i << "] !" << endl; \
+ stderr << "Result should be: " << result << endl; \
+ stderr << "Result computed : " << computed_result << endl << endl; \
error = 1; \
} \
} \
#include "exam.h"
-#include <cl_integer.h>
-#include <cl_integer_io.h>
+#include <cln/integer.h>
+#include <cln/integer_io.h>
static minus_test integer_minus_tests[] = {
#include "exam.h"
-#include <cl_integer.h>
-#include <cl_integer_io.h>
+#include <cln/integer.h>
+#include <cln/integer_io.h>
static mul_test integer_mul_tests[] = {
#include "exam.h"
-#include <cl_integer.h>
-#include <cl_integer_io.h>
+#include <cln/integer.h>
+#include <cln/integer_io.h>
static plus_test integer_plus_tests[] = {
#include "exam.h"
-#include <cl_lfloat.h>
-#include <cl_lfloat_io.h>
+#include <cln/lfloat.h>
+#include <cln/lfloat_io.h>
static div_test lfloat_div_tests[] = {
#include "exam.h"
-#include <cl_lfloat.h>
-#include <cl_lfloat_io.h>
-#include <cl_integer.h>
-#include <cl_integer_io.h>
+#include <cln/lfloat.h>
+#include <cln/lfloat_io.h>
+#include <cln/integer.h>
+#include <cln/integer_io.h>
static floor_test lfloat_floor_tests[] = {
#include "exam.h"
-#include <cl_lfloat.h>
-#include <cl_lfloat_io.h>
+#include <cln/lfloat.h>
+#include <cln/lfloat_io.h>
static minus_test lfloat_minus_tests[] = {
#include "exam.h"
-#include <cl_lfloat.h>
-#include <cl_lfloat_io.h>
+#include <cln/lfloat.h>
+#include <cln/lfloat_io.h>
static mul_test lfloat_mul_tests[] = {
#include "exam.h"
-#include <cl_lfloat.h>
-#include <cl_lfloat_io.h>
+#include <cln/lfloat.h>
+#include <cln/lfloat_io.h>
static plus_test lfloat_plus_tests[] = {
#include "exam.h"
-#include <cl_rational.h>
-#include <cl_rational_io.h>
+#include <cln/rational.h>
+#include <cln/rational_io.h>
static div_test rational_div_tests[] = {
#include "exam.h"
-#include <cl_rational.h>
-#include <cl_rational_io.h>
-#include <cl_integer.h>
-#include <cl_integer_io.h>
+#include <cln/rational.h>
+#include <cln/rational_io.h>
+#include <cln/integer.h>
+#include <cln/integer_io.h>
static floor_test rational_floor_tests[] = {
#include "exam.h"
-#include <cl_rational.h>
-#include <cl_rational_io.h>
+#include <cln/rational.h>
+#include <cln/rational_io.h>
static minus_test rational_minus_tests[] = {
#include "exam.h"
-#include <cl_rational.h>
-#include <cl_rational_io.h>
+#include <cln/rational.h>
+#include <cln/rational_io.h>
static mul_test rational_mul_tests[] = {
#include "exam.h"
-#include <cl_rational.h>
-#include <cl_rational_io.h>
+#include <cln/rational.h>
+#include <cln/rational_io.h>
static plus_test rational_plus_tests[] = {
#include "exam.h"
-#include <cl_sfloat.h>
-#include <cl_sfloat_io.h>
+#include <cln/sfloat.h>
+#include <cln/sfloat_io.h>
static div_test sfloat_div_tests[] = {
#include "exam.h"
-#include <cl_sfloat.h>
-#include <cl_sfloat_io.h>
-#include <cl_integer.h>
-#include <cl_integer_io.h>
+#include <cln/sfloat.h>
+#include <cln/sfloat_io.h>
+#include <cln/integer.h>
+#include <cln/integer_io.h>
static floor_test sfloat_floor_tests[] = {
#include "exam.h"
-#include <cl_sfloat.h>
-#include <cl_sfloat_io.h>
+#include <cln/sfloat.h>
+#include <cln/sfloat_io.h>
static minus_test sfloat_minus_tests[] = {
#include "exam.h"
-#include <cl_sfloat.h>
-#include <cl_sfloat_io.h>
+#include <cln/sfloat.h>
+#include <cln/sfloat_io.h>
static mul_test sfloat_mul_tests[] = {
#include "exam.h"
-#include <cl_sfloat.h>
-#include <cl_sfloat_io.h>
+#include <cln/sfloat.h>
+#include <cln/sfloat_io.h>
static plus_test sfloat_plus_tests[] = {
//#define WANT_OBFUSCATING_OPERATORS
-#include <cl_number.h>
-#include <cl_io.h>
-//#include <cl_complex.h>
-//#include <cl_real.h>
-//#include <cl_real_io.h>
-//#include <cl_output.h>
-//#include <cl_ffloat.h>
-#include <cl_integer.h>
-#include <cl_integer_io.h>
-//#include <cl_modinteger.h>
-//#include <cl_numtheory.h>
-#include <cl_timing.h>
+#include <cln/number.h>
+#include <cln/io.h>
+//#include <cln/complex.h>
+//#include <cln/real.h>
+//#include <cln/real_io.h>
+//#include <cln/output.h>
+//#include <cln/ffloat.h>
+#include <cln/integer.h>
+#include <cln/integer_io.h>
+//#include <cln/modinteger.h>
+//#include <cln/numtheory.h>
+#include <cln/timing.h>
#define DUMP(expr) \
- fprint(cl_stdout, #expr" = "); fprint(cl_stdout, expr); fprint(cl_stdout, "\n");
+ fprint(stdout, #expr" = "); fprint(stdout, expr); fprint(stdout, "\n");
int main (int argc, char* argv[])
{
(void)argc; (void)argv;
#if 0
- cl_F pi = cl_pi((cl_float_format_t)10000);
- fprint(cl_stdout, pi);
- fprint(cl_stdout, "\n");
+ cl_F archimedes = pi((float_format_t)10000);
+ fprint(stdout, archimedes);
+ fprint(stdout, "\n");
#endif
#if 0
cl_FF x1 = "-0.2173f0";
cl_FF x2 = "5.5084f9";
cl_FF y = "-1.19698f9";
- fprint(cl_stdout, "x1 = "); print_float_binary(cl_stdout,x1); fprint(cl_stdout, " = "); fprint(cl_stdout,x1); fprint(cl_stdout, "\n");
- fprint(cl_stdout, "x2 = "); print_float_binary(cl_stdout,x2); fprint(cl_stdout, " = "); fprint(cl_stdout,x2); fprint(cl_stdout, "\n");
- fprint(cl_stdout, "y = "); print_float_binary(cl_stdout,y); fprint(cl_stdout, " = "); fprint(cl_stdout,y); fprint(cl_stdout, "\n");
+ fprint(stdout, "x1 = "); print_float_binary(stdout,x1); fprint(stdout, " = "); fprint(stdout,x1); fprint(stdout, "\n");
+ fprint(stdout, "x2 = "); print_float_binary(stdout,x2); fprint(stdout, " = "); fprint(stdout,x2); fprint(stdout, "\n");
+ fprint(stdout, "y = "); print_float_binary(stdout,y); fprint(stdout, " = "); fprint(stdout,y); fprint(stdout, "\n");
cl_FF x = x1*x2;
- fprint(cl_stdout, "x1*x2 = "); print_float_binary(cl_stdout,x); fprint(cl_stdout, " = "); fprint(cl_stdout,x); fprint(cl_stdout, "\n");
+ fprint(stdout, "x1*x2 = "); print_float_binary(stdout,x); fprint(stdout, " = "); fprint(stdout,x); fprint(stdout, "\n");
#endif
#if 0
cl_I y = ++x;
x *= 2;
x++;
- fprint(cl_stdout, "x = "); fprint(cl_stdout, x); fprint(cl_stdout, "\n");
- fprint(cl_stdout, "y = "); fprint(cl_stdout, y); fprint(cl_stdout, "\n");
+ fprint(stdout, "x = "); fprint(stdout, x); fprint(stdout, "\n");
+ fprint(stdout, "y = "); fprint(stdout, y); fprint(stdout, "\n");
#endif
#if 0
#if 0
cl_I m = "79228162513111556826425457664";
cl_I a = "19787815858762768436681494528";
- cl_modint_ring R = cl_find_modint_ring(m);
+ cl_modint_ring R = find_modint_ring(m);
cl_I b = R->retract(R->canonhom(a));
cl_I c = mod(a,abs(m));
DUMP(b);
#endif
#if 0
- cl_float_format_t f = cl_float_format(atoi(argv[1]));
- extern cl_LF cl_zeta3 (uintC len);
+ float_format_t f = float_format(atoi(argv[1]));
+ extern cl_LF zeta3 (uintC len);
uintC len = (uintL)f/intDsize+1;
- { CL_TIMING; cout << cl_zeta(2,f) << endl; }
- { CL_TIMING; cout << expt(cl_pi(f),2)/6 << endl; }
- { CL_TIMING; cout << cl_zeta(3,f) << endl; }
- { CL_TIMING; cout << cl_zeta3(len) << endl; }
- { CL_TIMING; cout << cl_zeta(4,f) << endl; }
+ { CL_TIMING; cout << zeta(2,f) << endl; }
+ { CL_TIMING; cout << expt(pi(f),2)/6 << endl; }
+ { CL_TIMING; cout << zeta(3,f) << endl; }
+ { CL_TIMING; cout << zeta3(len) << endl; }
+ { CL_TIMING; cout << zeta(4,f) << endl; }
#endif
cl_I a = cl_I(argv[1]);
-#include <cl_io.h>
+#include <cln/io.h>
+using namespace std;
+using namespace cln;
#define ASSERT(expr) \
if (!(expr)) { \
- fprint(cl_stderr,"Assertion failed! File "); \
- fprint(cl_stderr,__FILE__); \
- fprint(cl_stderr,", line "); \
- fprintdecimal(cl_stderr,__LINE__); \
- fprint(cl_stderr,".\n"); \
+ stderr << "Assertion failed! File " << __FILE__ << ", line " << __LINE__ << endl; \
error = 1; \
}
#define ASSERT1(expr,a) \
if (!(expr)) { \
- fprint(cl_stderr,"Assertion failed! File "); \
- fprint(cl_stderr,__FILE__); \
- fprint(cl_stderr,", line "); \
- fprintdecimal(cl_stderr,__LINE__); \
- fprint(cl_stderr,".\n"); \
- fprint(cl_stderr,#a" = "); \
- fprint(cl_stderr,a); \
- fprint(cl_stderr,"\n"); \
+ stderr << "Assertion failed! File " << __FILE__ << ", line " << __LINE__ << endl; \
+ stderr << #a" = " << a << endl; \
error = 1; \
}
#define ASSERT2(expr,a,b) \
if (!(expr)) { \
- fprint(cl_stderr,"Assertion failed! File "); \
- fprint(cl_stderr,__FILE__); \
- fprint(cl_stderr,", line "); \
- fprintdecimal(cl_stderr,__LINE__); \
- fprint(cl_stderr,".\n"); \
- fprint(cl_stderr,#a" = "); \
- fprint(cl_stderr,a); \
- fprint(cl_stderr,"\n"#b" = "); \
- fprint(cl_stderr,b); \
- fprint(cl_stderr,"\n"); \
+ stderr << "Assertion failed! File " << __FILE__ << ", line " << __LINE__ << endl; \
+ stderr << #a" = " << a << endl; \
+ stderr << #b" = " << b << endl; \
error = 1; \
}
#define ASSERT3(expr,a,b,c) \
if (!(expr)) { \
- fprint(cl_stderr,"Assertion failed! File "); \
- fprint(cl_stderr,__FILE__); \
- fprint(cl_stderr,", line "); \
- fprintdecimal(cl_stderr,__LINE__); \
- fprint(cl_stderr,".\n"); \
- fprint(cl_stderr,#a" = "); \
- fprint(cl_stderr,a); \
- fprint(cl_stderr,"\n"#b" = "); \
- fprint(cl_stderr,b); \
- fprint(cl_stderr,"\n"#c" = "); \
- fprint(cl_stderr,c); \
- fprint(cl_stderr,"\n"); \
+ stderr << "Assertion failed! File " << __FILE__ << ", line " << __LINE__ << endl; \
+ stderr << #a" = " << a << endl; \
+ stderr << #b" = " << b << endl; \
+ stderr << #c" = " << c << endl; \
error = 1; \
}
#define ASSERT4(expr,a,b,c,d) \
if (!(expr)) { \
- fprint(cl_stderr,"Assertion failed! File "); \
- fprint(cl_stderr,__FILE__); \
- fprint(cl_stderr,", line "); \
- fprintdecimal(cl_stderr,__LINE__); \
- fprint(cl_stderr,".\n"); \
- fprint(cl_stderr,#a" = "); \
- fprint(cl_stderr,a); \
- fprint(cl_stderr,"\n"#b" = "); \
- fprint(cl_stderr,b); \
- fprint(cl_stderr,"\n"#c" = "); \
- fprint(cl_stderr,c); \
- fprint(cl_stderr,"\n"#d" = "); \
- fprint(cl_stderr,d); \
- fprint(cl_stderr,"\n"); \
+ stderr << "Assertion failed! File " << __FILE__ << ", line " << __LINE__ << endl; \
+ stderr << #a" = " << a << endl; \
+ stderr << #b" = " << b << endl; \
+ stderr << #c" = " << c << endl; \
+ stderr << #d" = " << d << endl; \
error = 1; \
}
-
-#include <cl_io.h>
+#include <iostream>
// Elementary operations.
extern int test_I_abs (int iterations);
extern int test_I_GV (int iterations);
#define RUN(tester,iterations) \
- fprint(cl_stdout,"Testing "#tester"...\n"); \
+ std::cout << "Testing "#tester"..." << std::endl; \
error |= tester (iterations);
+
int test_I (int iterations)
{
int error = 0;
-#include <cl_integer.h>
-#include <cl_integer_io.h>
+#include <cln/integer.h>
+#include <cln/integer_io.h>
#include "test.h"
#include "test_I.h"
-#include "cl_GV_integer.h"
+#include "cln/GV_integer.h"
int test_I_GV (int iterations)
{
for (j = 0; j < len; j++)
v[j] = mod(a*(j*j),M);
for (j = len-1; j >= 0; j--)
-#if !(defined(__GNUC__) && (__GNUC_MINOR__ < 8))
ASSERT4(v[j] == mod(a*(j*j),M), m,len,M,j);
-#else // work around g++ 2.7.2 bug
- ASSERT4(v[j] == mod(a*(j*j),M), (cl_I)m,(cl_I)len,M,(cl_I)j);
-#endif
}
return error;
}
for (i = iterations; i > 0; i--) {
cl_I a = testrandom_I();
cl_I b = testrandom_I();
- ASSERT2(cl_compare(a,b) == -cl_compare(b,a), a,b);
+ ASSERT2(compare(a,b) == -compare(b,a), a,b);
}
// Check a < b <==> a+c < b+c .
for (i = iterations; i > 0; i--) {
cl_I a = testrandom_I();
cl_I b = testrandom_I();
cl_I c = testrandom_I();
- ASSERT3(cl_compare(a,b) == cl_compare(a+c,b+c), a,b,c);
+ ASSERT3(compare(a,b) == compare(a+c,b+c), a,b,c);
}
return error;
}
cl_I a = testrandom_I();
uintL l = integer_length(a);
if (a >= 0) {
-#if !(defined(__GNUC__) && (__GNUC_MINOR__ < 8))
- ASSERT1(a < ash(1,l) && (a == 0 ? l == 0 : l > 0 && a >= ash(1,l-1)), a);
-#else // work around g++ 2.7.0 bug
int b = 0;
if (a < ash(1,l)) {
if (a == 0)
b = (l > 0 && a >= ash(1,l-1));
}
ASSERT1(b, a);
-#endif
} else {
-#if !(defined(__GNUC__) && (__GNUC_MINOR__ < 8))
- ASSERT1(a >= ash(-1,l) && (a == -1 ? l == 0 : l > 0 && a < ash(-1,l-1)), a);
-#else // work around g++ 2.7.0 bug
int b = 0;
if (a >= ash(-1,l)) {
if (a == -1)
b = (l > 0 && a < ash(-1,l-1));
}
ASSERT1(b, a);
-#endif
}
}
return error;
-#include <cl_io.h>
+#include <iostream>
#include "cl_macros.h"
extern int test_MI_canonhom (int iterations);
extern int test_MI_expt (int iterations);
#define RUN(tester,iterations) \
- fprint(cl_stdout,"Testing "#tester"...\n"); \
+ std::cout << "Testing "#tester"..." << std::endl; \
error |= tester (iterations);
int test_MI (int iterations)
-#include <cl_modinteger.h>
-#include <cl_integer.h>
-#include <cl_integer_io.h>
+#include <cln/modinteger.h>
+#include <cln/integer.h>
+#include <cln/integer_io.h>
#include "test.h"
// Check canonhom followed by retract.
for (i = iterations; i > 0; i--) {
cl_I m = testrandom_I();
- cl_modint_ring R = cl_find_modint_ring(m);
+ cl_modint_ring R = find_modint_ring(m);
cl_I a = testrandom_I();
ASSERT2(R->retract(R->canonhom(a)) == (m==0 ? a : mod(a,abs(m))), m,a);
}
// Check against multiplication.
for (i = iterations; i > 0; i--) {
cl_I m = testrandom_I();
- cl_modint_ring R = cl_find_modint_ring(m);
+ cl_modint_ring R = find_modint_ring(m);
cl_I ai = testrandom_I();
if (gcd(m,ai)==1) {
cl_MI a = R->canonhom(ai);
{
int error = 0;
int i;
- // Check special cases 0, 1, 2.
+ // Check special caSes 0, 1, 2.
for (i = iterations; i > 0; i--) {
cl_I m = testrandom_I();
- cl_modint_ring R = cl_find_modint_ring(m);
+ cl_modint_ring R = find_modint_ring(m);
cl_MI a = R->canonhom(testrandom_I());
ASSERT2(expt(a,0) == R->one(), m,a);
ASSERT2(expt(a,1) == a, m,a);
// Check special cases -1, -2.
for (i = iterations; i > 0; i--) {
cl_I m = testrandom_I();
- cl_modint_ring R = cl_find_modint_ring(m);
+ cl_modint_ring R = find_modint_ring(m);
cl_I ai = testrandom_I();
if (gcd(m,ai)==1) {
cl_MI a = R->canonhom(ai);
for (i = iterations; i > 0; i--) {
cl_I m = testrandom_I();
if (!zerop(m)) { // avoid generating huge numbers
- cl_modint_ring R = cl_find_modint_ring(m);
+ cl_modint_ring R = find_modint_ring(m);
cl_MI a = R->canonhom(testrandom_I());
cl_MI b = R->canonhom(testrandom_I());
cl_I e = abs(testrandom_I());
for (i = iterations; i > 0; i--) {
cl_I m = testrandom_I();
if (!zerop(m)) { // avoid generating huge numbers
- cl_modint_ring R = cl_find_modint_ring(m);
+ cl_modint_ring R = find_modint_ring(m);
cl_MI a = R->canonhom(testrandom_I());
cl_I e = abs(testrandom_I());
cl_I f = abs(testrandom_I());
// Check anti-commutativity.
for (i = iterations; i > 0; i--) {
cl_I m = testrandom_I();
- cl_modint_ring R = cl_find_modint_ring(m);
+ cl_modint_ring R = find_modint_ring(m);
cl_MI a = R->canonhom(testrandom_I());
cl_MI b = R->canonhom(testrandom_I());
cl_MI z = R->zero();
// Check associativity.
for (i = iterations; i > 0; i--) {
cl_I m = testrandom_I();
- cl_modint_ring R = cl_find_modint_ring(m);
+ cl_modint_ring R = find_modint_ring(m);
cl_MI a = R->canonhom(testrandom_I());
cl_MI b = R->canonhom(testrandom_I());
cl_MI c = R->canonhom(testrandom_I());
// Check special case 0.
for (i = iterations; i > 0; i--) {
cl_I m = testrandom_I();
- cl_modint_ring R = cl_find_modint_ring(m);
+ cl_modint_ring R = find_modint_ring(m);
cl_MI a = R->canonhom(testrandom_I());
cl_MI z = R->zero();
ASSERT2(a-z == a, m,a);
// Check commutativity.
for (i = iterations; i > 0; i--) {
cl_I m = testrandom_I();
- cl_modint_ring R = cl_find_modint_ring(m);
+ cl_modint_ring R = find_modint_ring(m);
cl_MI a = R->canonhom(testrandom_I());
cl_MI b = R->canonhom(testrandom_I());
ASSERT3(a*b == b*a, m,a,b);
// Check associativity.
for (i = iterations; i > 0; i--) {
cl_I m = testrandom_I();
- cl_modint_ring R = cl_find_modint_ring(m);
+ cl_modint_ring R = find_modint_ring(m);
cl_MI a = R->canonhom(testrandom_I());
cl_MI b = R->canonhom(testrandom_I());
cl_MI c = R->canonhom(testrandom_I());
// Check second binomial formula.
for (i = iterations; i > 0; i--) {
cl_I m = testrandom_I();
- cl_modint_ring R = cl_find_modint_ring(m);
+ cl_modint_ring R = find_modint_ring(m);
cl_MI a = R->canonhom(testrandom_I());
cl_MI b = R->canonhom(testrandom_I());
ASSERT3((a+b)*(a-b) == a*a-b*b, m,a,b);
// Check distributive formula.
for (i = iterations; i > 0; i--) {
cl_I m = testrandom_I();
- cl_modint_ring R = cl_find_modint_ring(m);
+ cl_modint_ring R = find_modint_ring(m);
cl_MI a = R->canonhom(testrandom_I());
cl_MI b = R->canonhom(testrandom_I());
cl_MI c = R->canonhom(testrandom_I());
// Check special cases 0, 1, -1.
for (i = iterations; i > 0; i--) {
cl_I m = testrandom_I();
- cl_modint_ring R = cl_find_modint_ring(m);
+ cl_modint_ring R = find_modint_ring(m);
cl_MI a = R->canonhom(testrandom_I());
cl_MI z = R->zero();
cl_MI o = R->one();
// Check commutativity.
for (i = iterations; i > 0; i--) {
cl_I m = testrandom_I();
- cl_modint_ring R = cl_find_modint_ring(m);
+ cl_modint_ring R = find_modint_ring(m);
cl_MI a = R->canonhom(testrandom_I());
cl_MI b = R->canonhom(testrandom_I());
ASSERT3(a+b == b+a, m,a,b);
// Check associativity.
for (i = iterations; i > 0; i--) {
cl_I m = testrandom_I();
- cl_modint_ring R = cl_find_modint_ring(m);
+ cl_modint_ring R = find_modint_ring(m);
cl_MI a = R->canonhom(testrandom_I());
cl_MI b = R->canonhom(testrandom_I());
cl_MI c = R->canonhom(testrandom_I());
// Check special case 0.
for (i = iterations; i > 0; i--) {
cl_I m = testrandom_I();
- cl_modint_ring R = cl_find_modint_ring(m);
+ cl_modint_ring R = find_modint_ring(m);
cl_MI a = R->canonhom(testrandom_I());
cl_MI z = R->zero();
ASSERT2(a+z == a, m,a);
// Check against multiplication.
for (i = iterations; i > 0; i--) {
cl_I m = testrandom_I();
- cl_modint_ring R = cl_find_modint_ring(m);
+ cl_modint_ring R = find_modint_ring(m);
cl_I ai = testrandom_I();
if (gcd(m,ai)==1) {
cl_MI a = R->canonhom(ai);
-#include <cl_io.h>
+#include <iostream>
extern int test_nt_jacobi (int iterations);
#define RUN(tester,iterations) \
- fprint(cl_stdout,"Testing "#tester"...\n"); \
+ std::cout << "Testing "#tester"..." << std::endl; \
error |= tester (iterations);
int test_nt (int iterations)
-#include <cl_integer.h>
-#include <cl_integer_io.h>
-#include <cl_numtheory.h>
+#include <cln/integer.h>
+#include <cln/integer_io.h>
+#include <cln/numtheory.h>
#include "test.h"
#include <stdlib.h>
#include <string.h>
-#include <cl_io.h>
+#include <cln/io.h>
extern int test_I (int iterations);
extern int test_MI (int iterations);
extern int test_nt (int iterations);
+using namespace std;
+using namespace cln;
+
int test_all (int iterations)
{
int error = 0;
exit(1);
if (!test_all(iterations)) {
- fprint (cl_stdout, "Tests passed.\n");
+ cout << "Tests passed." << endl;
exit(0);
} else {
- fprint (cl_stdout, "Tests failed.\n");
+ cout << "Tests failed." << endl;
exit(1);
}
}
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_lfloat.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/lfloat.h>
#include "cl_LF.h"
-#include <cl_rational.h>
-#include <cl_float_io.h>
-#include <cl_random.h>
+#include <cln/rational.h>
+#include <cln/float_io.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_float.h>
-#include <cl_lfloat.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/float.h>
+#include <cln/lfloat.h>
#include "cl_LF.h"
-#include <cl_real.h>
-#include <cl_random.h>
+#include <cln/real.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_float.h>
-#include <cl_float_io.h>
-#include <cl_lfloat.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/float.h>
+#include <cln/float_io.h>
+#include <cln/lfloat.h>
#include "cl_LF.h"
-#include <cl_real.h>
-#include <cl_random.h>
+#include <cln/real.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_float.h>
-#include <cl_lfloat.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/float.h>
+#include <cln/lfloat.h>
#include "cl_LF.h"
-#include <cl_complex.h>
-#include <cl_real.h>
-#include <cl_random.h>
+#include <cln/complex.h>
+#include <cln/real.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_float.h>
-#include <cl_lfloat.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/float.h>
+#include <cln/lfloat.h>
#include "cl_LF.h"
-#include <cl_complex.h>
-#include <cl_complex_io.h>
-#include <cl_real.h>
-#include <cl_random.h>
+#include <cln/complex.h>
+#include <cln/complex_io.h>
+#include <cln/real.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_float.h>
-#include <cl_lfloat.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/float.h>
+#include <cln/lfloat.h>
#include "cl_LF.h"
-#include <cl_real.h>
-#include <cl_random.h>
+#include <cln/real.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_float.h>
-#include <cl_float_io.h>
-#include <cl_lfloat.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/float.h>
+#include <cln/float_io.h>
+#include <cln/lfloat.h>
#include "cl_LF.h"
-#include <cl_real.h>
-#include <cl_random.h>
+#include <cln/real.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_float.h>
-#include <cl_float_io.h>
-#include <cl_lfloat.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/float.h>
+#include <cln/float_io.h>
+#include <cln/lfloat.h>
#include "cl_LF.h"
-#include <cl_real.h>
-#include <cl_random.h>
+#include <cln/real.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_float.h>
-#include <cl_lfloat.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/float.h>
+#include <cln/lfloat.h>
#include "cl_LF.h"
-#include <cl_real.h>
-#include <cl_random.h>
+#include <cln/real.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_float.h>
-#include <cl_float_io.h>
-#include <cl_lfloat.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/float.h>
+#include <cln/float_io.h>
+#include <cln/lfloat.h>
#include "cl_LF.h"
-#include <cl_real.h>
-#include <cl_random.h>
+#include <cln/real.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_float.h>
-#include <cl_lfloat.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/float.h>
+#include <cln/lfloat.h>
#include "cl_LF.h"
-#include <cl_real.h>
-#include <cl_random.h>
+#include <cln/real.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_float.h>
-#include <cl_float_io.h>
-#include <cl_lfloat.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/float.h>
+#include <cln/float_io.h>
+#include <cln/lfloat.h>
#include "cl_LF.h"
-#include <cl_real.h>
-#include <cl_random.h>
+#include <cln/real.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_float.h>
-#include <cl_lfloat.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/float.h>
+#include <cln/lfloat.h>
#include "cl_LF.h"
-#include <cl_real.h>
-#include <cl_random.h>
+#include <cln/real.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_float.h>
-#include <cl_float_io.h>
-#include <cl_lfloat.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/float.h>
+#include <cln/float_io.h>
+#include <cln/lfloat.h>
#include "cl_LF.h"
-#include <cl_real.h>
-#include <cl_random.h>
+#include <cln/real.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_float.h>
-#include <cl_float_io.h>
-#include <cl_lfloat.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/float.h>
+#include <cln/float_io.h>
+#include <cln/lfloat.h>
#include "cl_LF.h"
-#include <cl_real.h>
-#include <cl_random.h>
+#include <cln/real.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_float.h>
-#include <cl_float_io.h>
-#include <cl_lfloat.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/float.h>
+#include <cln/float_io.h>
+#include <cln/lfloat.h>
#include "cl_LF.h"
-#include <cl_real.h>
-#include <cl_random.h>
+#include <cln/real.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_modinteger.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/modinteger.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
if (argc < 1)
exit(1);
cl_I p = "1269281897404513557783934075031171555202695168107";
- cl_modint_ring R = cl_find_modint_ring(p);
+ cl_modint_ring R = find_modint_ring(p);
{
cl_MI a = R->canonhom("1111111111111111111111111111111111111111111111111");
cl_MI b = R->canonhom("777777777777777777777777777777777777777777777777");
- cl_stdout << "product modulo p" << endl;
+ stdout << "product modulo p" << endl;
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
{ cl_MI c = R->mul(a,b); }
}
- cl_stdout << "square modulo p" << endl;
+ stdout << "square modulo p" << endl;
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
{ cl_MI c = R->square(a); }
}
- cl_stdout << "quotient modulo p" << endl;
+ stdout << "quotient modulo p" << endl;
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
{ cl_MI c = R->div(a,b); }
{
cl_MI a = R->canonhom("1234567890123456789012345678901234567890123456789");
cl_MI b = R->canonhom("909090909090909090909090909090909090909090909090");
- cl_stdout << "product modulo p" << endl;
+ stdout << "product modulo p" << endl;
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
{ cl_MI c = R->mul(a,b); }
}
- cl_stdout << "square modulo p" << endl;
+ stdout << "square modulo p" << endl;
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
{ cl_MI c = R->square(a); }
}
- cl_stdout << "quotient modulo p" << endl;
+ stdout << "quotient modulo p" << endl;
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
{ cl_MI c = R->div(a,b); }
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_modinteger.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/modinteger.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
if (argc < 2)
exit(1);
uintL len = atoi(argv[1]);
- cl_modint_ring R = cl_find_modint_ring((cl_I)1 << (intDsize*len));
+ cl_modint_ring R = find_modint_ring((cl_I)1 << (intDsize*len));
cl_MI a = R->random();
cl_MI b;
do { b = R->random(); } while (!oddp(R->retract(b)));
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_modinteger.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/modinteger.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
if (argc < 2)
exit(1);
uintL len = atoi(argv[1]);
- cl_modint_ring R = cl_find_modint_ring((cl_I)1 << (intDsize*len));
+ cl_modint_ring R = find_modint_ring((cl_I)1 << (intDsize*len));
cl_MI a;
do { a = R->random(); } while (!oddp(R->retract(a)));
{ CL_TIMING;
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_lfloat.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/lfloat.h>
#include "cl_LF.h"
-#include <cl_rational.h>
-#include <cl_float_io.h>
-#include <cl_random.h>
+#include <cln/rational.h>
+#include <cln/float_io.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_lfloat.h>
-#include <cl_rational.h>
-#include <cl_float_io.h>
-#include <cl_random.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/lfloat.h>
+#include <cln/rational.h>
+#include <cln/float_io.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
cl_I M2 = (cl_I)1 << (intDsize*m2);
cl_I m3 = cl_I(argv[3]);
cl_I M3 = (cl_I)1 << (intDsize*m3);
- cl_float_format_t M1 = (cl_float_format_t)(m1*intDsize);
+ float_format_t M1 = (float_format_t)(m1*intDsize);
cl_I u;
cl_I v;
do { u = random_I(M2); } while (zerop(u));
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_modinteger.h>
-#include <cl_univpoly.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/modinteger.h>
+#include <cln/univpoly.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
cl_I m = 100001;
int i;
- cl_modint_ring R1 = cl_find_modint_ring(m);
- cl_univpoly_ring PR1 = cl_find_univpoly_ring(R1);
+ cl_modint_ring R1 = find_modint_ring(m);
+ cl_univpoly_ring PR1 = find_univpoly_ring(R1);
cl_UP p1 = PR1->create(n-1);
for (i = 0; i < n; i++)
p1.set_coeff(i, R1->canonhom((int)(1.618033989*i*i)));
p1.finalize();
- cl_stdout << p1 << endl;
+ stdout << p1 << endl;
cl_UP sp1 = PR1->zero();
{ CL_TIMING;
{ sp1 = square(p1); }
}
- cl_stdout << sp1 << endl;
+ stdout << sp1 << endl;
}
// Time:
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_float.h>
-#include <cl_real.h>
-#include <cl_random.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/float.h>
+#include <cln/real.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
#include "cl_LF.h"
int main (int argc, char * argv[])
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_random.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
#include "cl_DS.h"
#include "cl_2DS.h"
-#include <cl_random.h>
+#include <cln/random.h>
#include "cl_random_impl.h"
-#include <cl_abort.h>
+#include <cln/abort.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
num_stack_alloc(b_len,b_MSDptr=,b_LSDptr=);
num_stack_alloc(a_len,q_MSDptr=,q_LSDptr=);
num_stack_alloc(a_len,q1_MSDptr=,q1_LSDptr=);
- random_UDS(cl_default_random_state,a_MSDptr,a_len);
- random_UDS(cl_default_random_state,b_MSDptr,b_len);
+ random_UDS(default_random_state,a_MSDptr,a_len);
+ random_UDS(default_random_state,b_MSDptr,b_len);
lspref(b_LSDptr,0) |= 1; // force b to be odd
extern int div2adic_algo;
// Check.
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
#include "cl_DS.h"
#include "cl_2DS.h"
-#include <cl_random.h>
+#include <cln/random.h>
#include "cl_random_impl.h"
-#include <cl_abort.h>
+#include <cln/abort.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
num_stack_alloc(b_len,b_MSDptr=,b_LSDptr=);
num_stack_alloc(a_len,q_MSDptr=,q_LSDptr=);
num_stack_alloc(a_len,q1_MSDptr=,q1_LSDptr=);
- random_UDS(cl_default_random_state,a_MSDptr,a_len);
- random_UDS(cl_default_random_state,b_MSDptr,b_len);
+ random_UDS(default_random_state,a_MSDptr,a_len);
+ random_UDS(default_random_state,b_MSDptr,b_len);
lspref(b_LSDptr,0) |= 1; // force b to be odd
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_float.h>
-#include <cl_real.h>
-#include <cl_random.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/float.h>
+#include <cln/real.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
#include "cl_LF.h"
int main (int argc, char * argv[])
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_float.h>
-#include <cl_real.h>
-#include <cl_random.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/float.h>
+#include <cln/real.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_random.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/random.h>
#include "cl_I.h"
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_random.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_random.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_random.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_float.h>
-#include <cl_float_io.h>
-#include <cl_real.h>
-#include <cl_random.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/float.h>
+#include <cln/float_io.h>
+#include <cln/real.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
+
+using namespace std;
+using namespace cln;
int main (int argc, char * argv[])
{
#else
// Here the argument is N *decimal* digits, not N*32 bits!
int n = atoi(argv[1]);
- cl_float_format_t prec = cl_float_format(n);
+ float_format_t prec = float_format(n);
cl_F p;
- fprint(cl_stderr, "Computing pi\n");
- { CL_TIMING; p = cl_pi(prec); }
- fprint(cl_stderr, "Converting pi to decimal\n");
+ stderr << "Computing pi" << endl;
+ { CL_TIMING; p = pi(prec); }
+ stderr << "Converting pi to decimal" << endl;
{ CL_TIMING; cout << p << endl << endl; }
#endif
}
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_random.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
#include <cl_print.h>
-#include <cl_malloc.h>
-#include <cl_abort.h>
+#include <cln/malloc.h>
+#include <cln/abort.h>
int main (int argc, char * argv[])
{
char* p = (cl_digits_algo = 0, cl_decimal_string(a));
char* q = (cl_digits_algo = 1, cl_decimal_string(a));
if (strcmp(p,q)) cl_abort();
- cl_free_hook(p);
- cl_free_hook(q);
+ free_hook(p);
+ free_hook(q);
}
// Now start the timing.
cl_digits_algo = 0;
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
- { char* p = cl_decimal_string(a); cl_free_hook(p); }
+ { char* p = cl_decimal_string(a); free_hook(p); }
}
cl_digits_algo = 1;
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
- { char* p = cl_decimal_string(a); cl_free_hook(p); }
+ { char* p = cl_decimal_string(a); free_hook(p); }
}
}
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_integer_io.h>
-#include <cl_random.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/integer_io.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
-#include <cl_malloc.h>
-#include <cl_abort.h>
+#include <cln/timing.h>
+#include <cln/malloc.h>
+#include <cln/abort.h>
int main (int argc, char * argv[])
{
// One run to fill the cache.
{
char* p = cl_decimal_string(a);
- cl_free_hook(p);
+ free_hook(p);
}
// Now start the timing.
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
- { char* p = cl_decimal_string(a); cl_free_hook(p); }
+ { char* p = cl_decimal_string(a); free_hook(p); }
}
}
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
#include "cl_DS.h"
#include "cl_2DS.h"
-#include <cl_random.h>
+#include <cln/random.h>
#include "cl_random_impl.h"
-#include <cl_abort.h>
+#include <cln/abort.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
num_stack_alloc(len,a_MSDptr=,a_LSDptr=);
num_stack_alloc(len,b_MSDptr=,b_LSDptr=);
num_stack_alloc(len,bn_MSDptr=,bn_LSDptr=);
- random_UDS(cl_default_random_state,a_MSDptr,len);
+ random_UDS(default_random_state,a_MSDptr,len);
lspref(a_LSDptr,0) |= 1; // force a to be odd
extern int recip2adic_threshold;
// Check.
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
#include "cl_DS.h"
#include "cl_2DS.h"
-#include <cl_random.h>
+#include <cln/random.h>
#include "cl_random_impl.h"
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
uintD* b_LSDptr;
num_stack_alloc(len,a_MSDptr=,a_LSDptr=);
num_stack_alloc(len,b_MSDptr=,b_LSDptr=);
- random_UDS(cl_default_random_state,a_MSDptr,len);
+ random_UDS(default_random_state,a_MSDptr,len);
lspref(a_LSDptr,0) |= 1; // force a to be odd
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_random.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_integer_io.h>
-#include <cl_modinteger.h>
-#include <cl_numtheory.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/integer_io.h>
+#include <cln/modinteger.h>
+#include <cln/numtheory.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
p = ((random_I((cl_I)1 << (len-1-e))*2+1) << e) + 1;
} while (!isprobprime(p));
cout << "p = " << p << endl;
- cl_modint_ring R = cl_find_modint_ring(p);
+ cl_modint_ring R = find_modint_ring(p);
cl_MI x = R->random();
cl_MI a = square(x);
sqrt_mod_p_t sol;
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_integer.h>
-#include <cl_random.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/integer.h>
+#include <cln/random.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
int main (int argc, char * argv[])
{
cl_I M2 = (cl_I)1 << (intDsize*m2);
cl_I a = random_I(M1);
cl_I b = random_I(M2);
- fprint(cl_stderr, "Squaring: ");
+ fprint(stderr, "Squaring: ");
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
{ cl_I p = a * a; }
}
- fprint(cl_stderr, "Multiplication: ");
+ fprint(stderr, "Multiplication: ");
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
{ cl_I p = a * b; }
-#include <cl_number.h>
-#include <cl_io.h>
-#include <cl_float.h>
-#include <cl_real.h>
+#include <cln/number.h>
+#include <cln/io.h>
+#include <cln/float.h>
+#include <cln/real.h>
#include <stdlib.h>
#include <string.h>
-#include <cl_timing.h>
+#include <cln/timing.h>
#include "cl_LF.h"
int main (int argc, char * argv[])
if (argc < 2)
exit(1);
uintL len = atoi(argv[1]);
- extern cl_LF cl_zeta (int s, uintC len);
+ extern cl_LF zeta (int s, uintC len);
extern cl_LF compute_zeta_exp (int s, uintC len);
extern cl_LF compute_zeta_cvz1 (int s, uintC len);
extern cl_LF compute_zeta_cvz2 (int s, uintC len);
- extern cl_LF cl_zeta3 (uintC len);
+ extern cl_LF zeta3 (uintC len);
cl_LF p;
ln(cl_I_to_LF(1000,len+10)); // fill cache
{ CL_TIMING;
cout << p << endl;
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
- { p = cl_zeta3(len); }
+ { p = zeta3(len); }
}
cout << p << endl;
}