Browse Source

- Added lots of @cindex to produce an index.

- Minor updates / fixed typos.
master
Richard Kreckel 25 years ago
parent
commit
a7f39918ee
  1. BIN
      doc/cln.dvi
  2. 420
      doc/cln.html
  3. 489
      doc/cln.info
  4. 5519
      doc/cln.ps
  5. 358
      doc/cln.tex
  6. 358
      doc/cln.texi
  7. 13
      doc/cln_1.html
  8. 18
      doc/cln_10.html
  9. 20
      doc/cln_11.html
  10. 17
      doc/cln_12.html
  11. 2
      doc/cln_13.html
  12. 16
      doc/cln_2.html
  13. 39
      doc/cln_3.html
  14. 211
      doc/cln_4.html
  15. 14
      doc/cln_5.html
  16. 2
      doc/cln_6.html
  17. 34
      doc/cln_7.html
  18. 18
      doc/cln_8.html
  19. 38
      doc/cln_9.html
  20. 4
      doc/cln_toc.html

BIN
doc/cln.dvi

420
doc/cln.html
File diff suppressed because it is too large
View File

489
doc/cln.info

@ -215,8 +215,8 @@ CLN is speed efficient:
* The kernel of CLN has been written in assembly language for some
CPUs (`i386', `m68k', `sparc', `mips', `arm').
* On all CPUs, CLN uses the superefficient low-level routines from
GNU GMP version 2.
* On all CPUs, CLN may be configured to use the superefficient
low-level routines from GNU GMP version 3.
* It uses Karatsuba multiplication, which is significantly faster
for large numbers than the standard multiplication algorithm.
@ -267,7 +267,7 @@ C++ compiler
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 `egcs 1.1' or newer.
recommend GNU `g++ 2.95' or newer.
The following C++ features are used: classes, member functions,
overloading of functions and operators, constructors and destructors,
@ -375,9 +375,6 @@ add either `-O' or `-O2 -fno-schedule-insns' to the CXXFLAGS. With
full `-O2', `g++' miscompiles the division routines. Also, for
-enable-shared to work, you need egcs-1.1.2 or newer.
On MIPS (SGI Irix 6), pass option `--without-gmp' to configure. gmp does
not work when compiled in `n32' binary format on Irix.
By default, only a static library is built. You can build CLN as a
shared library too, by calling `configure' with the option
`--enable-shared'. To get it built as a shared library only, call
@ -1310,7 +1307,8 @@ Trigonometric functions
numbers with `realpart = -pi/2' and `imagpart >= 0' and the numbers
with `realpart = pi/2' and `imagpart <= 0'.
The constant pi = 3.14... is returned by the following functions:
Archimedes' constant pi = 3.14... is returned by the following
functions:
`cl_F cl_pi (cl_float_format_t f)'
Returns pi as a float of format `f'.
@ -1943,7 +1941,7 @@ number, for example, "20.0" and "20.000".
Converting an internal to an external representation is called
"printing", converting an external to an internal representation is
called "reading". In CLN, is it always true that conversion of an
called "reading". 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: `read(print(x)) == x'. This is called "print-read
@ -2186,7 +2184,7 @@ The structure type `cl_print_flags' contains the following fields:
printed using this variable name. Default is `"x"'.
The global variable `cl_default_print_flags' contains the default
values, used by the function `fprint',
values, used by the function `fprint'.

File: cln.info, Node: Rings, Next: Modular integers, Prev: Input/Output, Up: Top
@ -2755,7 +2753,7 @@ Using C++ as an implementation language provides
* Type safety: The C++ compilers knows about the number types and
complains if, for example, you try to assign a float to an integer
variable. However, a drawback is that C++ doesn't know about
generic types, hence a restriction like that `operation+ (const
generic types, hence a restriction like that `operator+ (const
cl_MI&, const cl_MI&)' requires that both arguments belong to the
same modular ring cannot be expressed as a compile-time
information.
@ -2808,8 +2806,8 @@ and algorithms:
* The kernel of CLN has been written in assembly language for some
CPUs (`i386', `m68k', `sparc', `mips', `arm').
* On all CPUs, CLN uses the superefficient low-level routines from
GNU GMP version 2.
* On all CPUs, CLN may be configured to use the superefficient
low-level routines from GNU GMP version 3.
* For large numbers, CLN uses, instead of the standard `O(N^2)'
algorithm, the Karatsuba multiplication, which is an `O(N^1.6)'
@ -3138,6 +3136,9 @@ When the function returns, all the local variables in the function are
automatically reclaimed (garbage collected). Only the result survives
and gets passed to the caller.
The file `fibonacci.cc' in the subdirectory `examples' contains this
implementation together with an even faster algorithm.

File: cln.info, Node: Debugging support, Prev: An Example, Up: Using the library
@ -3275,81 +3276,401 @@ Index
* Menu:
* abs (): Elementary functions.
* abstract class: Ordinary number types.
* acos (): Trigonometric functions.
* acosh (): Hyperbolic functions.
* advocacy: Why C++ ?.
* Archimedes' constant: Trigonometric functions.
* As() (): Conversions.
* ash (): Logical functions.
* asin: Trigonometric functions.
* asin (): Trigonometric functions.
* asinh (): Hyperbolic functions.
* atan: Trigonometric functions.
* atan (): Trigonometric functions.
* atanh (): Hyperbolic functions.
* basering (): Functions on univariate polynomials.
* binomial (): Combinatorial functions.
* boole (): Logical functions.
* boole_1: Logical functions.
* boole_2: Logical functions.
* boole_and: Logical functions.
* boole_andc1: Logical functions.
* boole_andc2: Logical functions.
* boole_c1: Logical functions.
* boole_c2: Logical functions.
* boole_clr: Logical functions.
* boole_eqv: Logical functions.
* boole_nand: Logical functions.
* boole_nor: Logical functions.
* boole_orc1: Logical functions.
* boole_orc2: Logical functions.
* boole_set: Logical functions.
* boole_xor: Logical functions.
* canonhom () <1>: Functions on univariate polynomials.
* canonhom (): Functions on modular integers.
* Catalan's constant: Euler gamma.
* ceiling1 (): Rounding functions.
* ceiling2 (): Rounding functions.
* 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_double_approx (): Conversions.
* cl_equal_hashcode (): Comparisons.
* cl_eulerconst (): Euler gamma.
* cl_F <1>: Floating-point numbers.
* cl_F: Ordinary number types.
* cl_FF: Floating-point numbers.
* 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_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_malloc_hook (): Customizing the memory allocator.
* cl_N: Ordinary number types.
* cl_number: Ordinary number types.
* cl_pi: Trigonometric functions.
* cl_R: Ordinary number types.
* cl_RA: Ordinary number types.
* cl_SF: Floating-point numbers.
* cl_string (): Strings.
* cl_symbol (): Symbols.
* cl_tschebychev (): Special polynomials.
* cl_zeta (): Riemann zeta.
* coeff (): Functions on univariate polynomials.
* comparison: Comparisons.
* compiler options: Compiler options.
* complex (): Elementary complex functions.
* complex number <1>: Complex numbers.
* complex number: Ordinary number types.
* conjugate (): Elementary complex functions.
* conversion <1>: Conversion functions.
* conversion: Conversions.
* cos (): Trigonometric functions.
* cosh (): Hyperbolic functions.
* create (): Functions on univariate polynomials.
* customizing: Customizing.
* debug_print (): Debugging support.
* debugging: Debugging support.
* decode_float (): Functions on floating-point numbers.
* degree (): Functions on univariate polynomials.
* denominator (): Elementary rational functions.
* deposit_field (): Logical functions.
* deriv (): Functions on univariate polynomials.
* div (): Functions on modular integers.
* doublefactorial (): Combinatorial functions.
* dpb (): Logical functions.
* equal () <1>: Symbols.
* equal (): Strings.
* etract (): Functions on modular integers.
* Euler's constant: Euler gamma.
* evenp (): Logical functions.
* exact number: Exact numbers.
* exp (): Exponential and logarithmic functions.
* exp1 (): Exponential and logarithmic functions.
* expt () <1>: Functions on modular integers.
* expt () <2>: Exponential and logarithmic functions.
* expt (): Elementary functions.
* expt_pos () <1>: Functions on univariate polynomials.
* expt_pos () <2>: Functions on modular integers.
* expt_pos (): Elementary functions.
* exquo (): Elementary functions.
* factorial (): Combinatorial functions.
* fceiling (): Rounding functions.
* fceiling2 (): Rounding functions.
* ffloor (): Rounding functions.
* ffloor2 (): Rounding functions.
* Fibonacci number: An Example.
* finalize (): Functions on univariate polynomials.
* float_digits (): Functions on floating-point numbers.
* float_epsilon (): Conversion to floating-point numbers.
* float_exponent (): Functions on floating-point numbers.
* float_negative_epsilon (): Conversion to floating-point numbers.
* float_precision (): Functions on floating-point numbers.
* float_radix (): Functions on floating-point numbers.
* float_sign (): Functions on floating-point numbers.
* floating-point number: Floating-point numbers.
* floor1 (): Rounding functions.
* floor2 (): Rounding functions.
* fprint () <1>: Functions on univariate polynomials.
* fprint (): Functions on modular integers.
* fround (): Rounding functions.
* fround2 (): Rounding functions.
* ftruncate (): Rounding functions.
* ftruncate2 (): Rounding functions.
* garbage collection <1>: Garbage collection.
* garbage collection: Memory efficiency.
* gcd (): Number theoretic functions.
* GMP: Introduction.
* header files: Include files.
* Hermite polynomial: Special polynomials.
* imagpart (): Elementary complex functions.
* include files: Include files.
* Input/Output: Input/Output.
* installation: Installing the library.
* integer: Ordinary number types.
* integer_decode_float (): Functions on floating-point numbers.
* integer_length (): Logical functions.
* isqrt (): Roots.
* Laguerre polynomial: Special polynomials.
* lcm (): Number theoretic functions.
* ldb (): Logical functions.
* ldb_test (): Logical functions.
* least_negative_float (): Conversion to floating-point numbers.
* least_positive_float (): Conversion to floating-point numbers.
* Legende polynomial: Special polynomials.
* length (): Strings.
* ln (): Exponential and logarithmic functions.
* log (): Exponential and logarithmic functions.
* logand (): Logical functions.
* logandc1 (): Logical functions.
* logandc2 (): Logical functions.
* logbitp (): Logical functions.
* logcount (): Logical functions.
* logeqv (): Logical functions.
* logior (): Logical functions.
* lognand (): Logical functions.
* lognor (): Logical functions.
* lognot (): Logical functions.
* logorc1 (): Logical functions.
* logorc2 (): Logical functions.
* logp (): Number theoretic functions.
* logtest (): Logical functions.
* logxor (): Logical functions.
* make: C++ compiler.
* mask_field (): Logical functions.
* max (): Comparisons.
* min (): Comparisons.
* minus1 (): Elementary functions.
* minusp (): Comparisons.
* mod (): Rounding functions.
* modifying operators: Obfuscating operators.
* modular integer: Modular integers.
* modulus: Functions on modular integers.
* monomial (): Functions on univariate polynomials.
* Montgomery multiplication: Modular integer rings.
* most_negative_float (): Conversion to floating-point numbers.
* most_positive_float (): Conversion to floating-point numbers.
* numerator (): Elementary rational functions.
* oddp (): Logical functions.
* one () <1>: Functions on univariate polynomials.
* one (): Functions on modular integers.
* operator != () <1>: Functions on univariate polynomials.
* operator != () <2>: Functions on modular integers.
* operator != () <3>: Modular integer rings.
* operator != (): Comparisons.
* operator & (): Logical functions.
* operator &= (): Obfuscating operators.
* operator () (): Functions on univariate polynomials.
* operator * () <1>: Functions on univariate polynomials.
* operator * () <2>: Functions on modular integers.
* operator * (): Elementary functions.
* operator *= (): Obfuscating operators.
* operator + () <1>: Functions on univariate polynomials.
* operator + () <2>: Functions on modular integers.
* operator + (): Elementary functions.
* operator ++ (): Obfuscating operators.
* operator += (): Obfuscating operators.
* operator - () <1>: Functions on univariate polynomials.
* operator - () <2>: Functions on modular integers.
* operator - (): Elementary functions.
* operator -- (): Obfuscating operators.
* operator -= (): Obfuscating operators.
* operator / (): Elementary functions.
* operator /= (): Obfuscating operators.
* operator < (): Comparisons.
* operator << () <1>: Functions on univariate polynomials.
* operator << () <2>: Functions on modular integers.
* operator << (): Logical functions.
* operator <<= (): Obfuscating operators.
* operator <= (): Comparisons.
* operator == () <1>: Functions on univariate polynomials.
* operator == () <2>: Functions on modular integers.
* operator == () <3>: Modular integer rings.
* operator == (): Comparisons.
* operator > (): Comparisons.
* operator >= (): Comparisons.
* operator >> () <1>: Functions on modular integers.
* operator >> (): Logical functions.
* operator >>= (): Obfuscating operators.
* operator [] (): Strings.
* operator ^ (): Logical functions.
* operator ^= (): Obfuscating operators.
* operator | (): Logical functions.
* operator |= (): Obfuscating operators.
* operator ~ (): Logical functions.
* ord2 (): Logical functions.
* phase (): Exponential and logarithmic functions.
* pi: Trigonometric functions.
* plus1 (): Elementary functions.
* plusp (): Comparisons.
* polynomial: Univariate polynomials.
* portability: Why C++ ?.
* power2p (): Logical functions.
* printing: Internal and printed representation.
* random (): Functions on modular integers.
* random32 (): Random number generators.
* random_F (): Random number generators.
* random_I (): Random number generators.
* random_R (): Random number generators.
* rational (): Conversion to rational numbers.
* rational number: Ordinary number types.
* rationalize (): Conversion to rational numbers.
* reading: Internal and printed representation.
* real number: Ordinary number types.
* realpart (): Elementary complex functions.
* recip () <1>: Functions on modular integers.
* recip (): Elementary functions.
* reference counting: Memory efficiency.
* rem (): Rounding functions.
* representation: Internal and printed representation.
* Riemann's zeta: Riemann zeta.
* ring: Modular integer rings.
* ring (): Functions on univariate polynomials.
* ring(): Functions on modular integers.
* rootp (): Roots.
* round1 (): Rounding functions.
* round2 (): Rounding functions.
* rounding: Rounding functions.
* rounding error: Floating-point numbers.
* Rubik's cube: Conversions.
* scale_float (): Functions on floating-point numbers.
* Schönhage-Strassen: Speed efficiency.
* Schönhage-Strassen multiplication: Introduction.
* sed: Make utility.
* set_coeff (): Functions on univariate polynomials.
* signum (): Elementary functions.
* sin (): Trigonometric functions.
* sinh (): Hyperbolic functions.
* sqrt (): Roots.
* sqrtp (): Roots.
* square () <1>: Functions on univariate polynomials.
* square () <2>: Functions on modular integers.
* square (): Elementary functions.
* string: Strings.
* strlen (): Strings.
* symbol: Symbols.
* symbolic type: Symbolic data types.
* tan (): Trigonometric functions.
* tanh (): Hyperbolic functions.
* The() (): Conversions.
* transcendental functions: Transcendental functions.
* truncate1 (): Rounding functions.
* truncate2 (): Rounding functions.
* Tschebychev polynomial: Special polynomials.
* 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.
* zerop () <1>: Functions on univariate polynomials.
* zerop () <2>: Functions on modular integers.
* zerop (): Comparisons.

Tag Table:
Node: Top957
Node: Introduction3124
Node: Installation5626
Node: Prerequisites5920
Node: C++ compiler6118
Node: Make utility6833
Node: Sed utility7019
Node: Building the library7339
Node: Installing the library10650
Node: Cleaning up11373
Node: Ordinary number types11698
Node: Exact numbers14045
Node: Floating-point numbers15210
Node: Complex numbers18789
Node: Conversions19286
Node: Functions on numbers22752
Node: Constructing numbers23455
Node: Constructing integers23827
Node: Constructing rational numbers24117
Node: Constructing floating-point numbers24592
Node: Constructing complex numbers25712
Node: Elementary functions26076
Node: Elementary rational functions28543
Node: Elementary complex functions29115
Node: Comparisons29943
Node: Rounding functions31842
Node: Roots37619
Node: Transcendental functions39500
Node: Exponential and logarithmic functions40056
Node: Trigonometric functions42073
Node: Hyperbolic functions45416
Node: Euler gamma47489
Node: Riemann zeta48405
Node: Functions on integers48961
Node: Logical functions49249
Node: Number theoretic functions55202
Node: Combinatorial functions56569
Node: Functions on floating-point numbers57247
Node: Conversion functions60478
Node: Conversion to floating-point numbers60758
Node: Conversion to rational numbers62981
Node: Random number generators64035
Node: Obfuscating operators65709
Node: Input/Output67439
Node: Internal and printed representation67649
Node: Input functions70191
Node: Output functions74742
Node: Rings78478
Node: Modular integers80402
Node: Modular integer rings80602
Node: Functions on modular integers82692
Node: Symbolic data types85702
Node: Strings85965
Node: Symbols87030
Node: Univariate polynomials87932
Node: Univariate polynomial rings88190
Node: Functions on univariate polynomials93144
Node: Special polynomials96925
Node: Internals97645
Node: Why C++ ?97859
Node: Memory efficiency99360
Node: Speed efficiency100058
Node: Garbage collection101122
Node: Using the library101949
Node: Compiler options102483
Node: Include files103401
Node: An Example107042
Node: Debugging support110067
Node: Customizing112417
Node: Error handling112645
Node: Floating-point underflow113219
Node: Customizing I/O113858
Node: Customizing the memory allocator114151
Node: Index115108
Node: Installation5646
Node: Prerequisites5940
Node: C++ compiler6138
Node: Make utility6853
Node: Sed utility7039
Node: Building the library7359
Node: Installing the library10541
Node: Cleaning up11264
Node: Ordinary number types11589
Node: Exact numbers13936
Node: Floating-point numbers15101
Node: Complex numbers18680
Node: Conversions19177
Node: Functions on numbers22643
Node: Constructing numbers23346
Node: Constructing integers23718
Node: Constructing rational numbers24008
Node: Constructing floating-point numbers24483
Node: Constructing complex numbers25603
Node: Elementary functions25967
Node: Elementary rational functions28434
Node: Elementary complex functions29006
Node: Comparisons29834
Node: Rounding functions31733
Node: Roots37510
Node: Transcendental functions39391
Node: Exponential and logarithmic functions39947
Node: Trigonometric functions41964
Node: Hyperbolic functions45315
Node: Euler gamma47388
Node: Riemann zeta48304
Node: Functions on integers48860
Node: Logical functions49148
Node: Number theoretic functions55101
Node: Combinatorial functions56468
Node: Functions on floating-point numbers57146
Node: Conversion functions60377
Node: Conversion to floating-point numbers60657
Node: Conversion to rational numbers62880
Node: Random number generators63934
Node: Obfuscating operators65608
Node: Input/Output67338
Node: Internal and printed representation67548
Node: Input functions70090
Node: Output functions74641
Node: Rings78377
Node: Modular integers80301
Node: Modular integer rings80501
Node: Functions on modular integers82591
Node: Symbolic data types85601
Node: Strings85864
Node: Symbols86929
Node: Univariate polynomials87831
Node: Univariate polynomial rings88089
Node: Functions on univariate polynomials93043
Node: Special polynomials96824
Node: Internals97544
Node: Why C++ ?97758
Node: Memory efficiency99258
Node: Speed efficiency99956
Node: Garbage collection101040
Node: Using the library101867
Node: Compiler options102401
Node: Include files103319
Node: An Example106960
Node: Debugging support110110
Node: Customizing112460
Node: Error handling112688
Node: Floating-point underflow113262
Node: Customizing I/O113901
Node: Customizing the memory allocator114194
Node: Index115151

End Tag Table

5519
doc/cln.ps
File diff suppressed because it is too large
View File

358
doc/cln.tex
File diff suppressed because it is too large
View File

358
doc/cln.texi
File diff suppressed because it is too large
View File

13
doc/cln_1.html

@ -1,6 +1,6 @@
<HTML>
<HEAD>
<!-- Created by texi2html 1.56k from cln.texi on 14 January 2000 -->
<!-- Created by texi2html 1.56k from cln.texi on 4 May 2000 -->
<TITLE>CLN, a Class Library for Numbers - 1. Introduction</TITLE>
</HEAD>
@ -134,8 +134,9 @@ The kernel of CLN has been written in assembly language for some CPUs
(<CODE>i386</CODE>, <CODE>m68k</CODE>, <CODE>sparc</CODE>, <CODE>mips</CODE>, <CODE>arm</CODE>).
<LI>
On all CPUs, CLN uses the superefficient low-level routines from GNU
GMP version 2.
<A NAME="IDX1"></A>
On all CPUs, CLN may be configured to use the superefficient low-level
routines from GNU GMP version 3.
<LI>
It uses Karatsuba multiplication, which is significantly faster
@ -144,9 +145,9 @@ for large numbers than the standard multiplication algorithm.
For very large numbers (more than 12000 decimal digits), it uses
Schönhage-Strassen
multiplication, which is an asymptotically
optimal multiplication algorithm, for multiplication, division and
radix conversion.
<A NAME="IDX2"></A>
multiplication, which is an asymptotically optimal multiplication
algorithm, for multiplication, division and radix conversion.
</UL>
<P>

18
doc/cln_10.html

@ -1,6 +1,6 @@
<HTML>
<HEAD>
<!-- Created by texi2html 1.56k from cln.texi on 14 January 2000 -->
<!-- Created by texi2html 1.56k from cln.texi on 4 May 2000 -->
<TITLE>CLN, a Class Library for Numbers - 10. Internals</TITLE>
</HEAD>
@ -14,6 +14,9 @@ Go to the <A HREF="cln_1.html">first</A>, <A HREF="cln_9.html">previous</A>, <A
<H2><A NAME="SEC59" HREF="cln_toc.html#TOC59">10.1 Why C++ ?</A></H2>
<P>
<A NAME="IDX303"></A>
<P>
Using C++ as an implementation language provides
@ -27,6 +30,7 @@ Efficiency: It compiles to machine code.
<LI>
<A NAME="IDX304"></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.
@ -36,7 +40,7 @@ of the availability of GNU C++, this includes all currently used 32-bit and
Type safety: The C++ compilers knows about the number types and complains if,
for example, you try to assign a float to an integer variable. However,
a drawback is that C++ doesn't know about generic types, hence a restriction
like that <CODE>operation+ (const cl_MI&#38;, const cl_MI&#38;)</CODE> requires that both
like that <CODE>operator+ (const cl_MI&#38;, const cl_MI&#38;)</CODE> requires that both
arguments belong to the same modular ring cannot be expressed as a compile-time
information.
@ -72,6 +76,8 @@ Object sharing: An operation like <CODE>x+0</CODE> returns <CODE>x</CODE> withou
it.
<LI>
<A NAME="IDX305"></A>
<A NAME="IDX306"></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.
@ -104,8 +110,8 @@ The kernel of CLN has been written in assembly language for some CPUs
(<CODE>i386</CODE>, <CODE>m68k</CODE>, <CODE>sparc</CODE>, <CODE>mips</CODE>, <CODE>arm</CODE>).
<LI>
On all CPUs, CLN uses the superefficient low-level routines from GNU
GMP version 2.
On all CPUs, CLN may be configured to use the superefficient low-level
routines from GNU GMP version 3.
<LI>
For large numbers, CLN uses, instead of the standard <CODE>O(N^2)</CODE>
@ -116,6 +122,7 @@ algorithm.
For very large numbers (more than 12000 decimal digits), CLN uses
Schönhage-Strassen
<A NAME="IDX307"></A>
multiplication, which is an asymptotically
optimal multiplication algorithm.
<LI>
@ -127,6 +134,9 @@ of division and radix conversion.
<H2><A NAME="SEC62" HREF="cln_toc.html#TOC62">10.4 Garbage collection</A></H2>
<P>
<A NAME="IDX308"></A>
<P>
All the number classes are reference count classes: They only contain a pointer

20
doc/cln_11.html

@ -1,6 +1,6 @@
<HTML>
<HEAD>
<!-- Created by texi2html 1.56k from cln.texi on 14 January 2000 -->
<!-- Created by texi2html 1.56k from cln.texi on 4 May 2000 -->
<TITLE>CLN, a Class Library for Numbers - 11. Using the library</TITLE>
</HEAD>
@ -22,6 +22,9 @@ environment variables, or directly substitute the appropriate values.
<H2><A NAME="SEC64" HREF="cln_toc.html#TOC64">11.1 Compiler options</A></H2>
<P>
<A NAME="IDX309"></A>
<P>
Until you have installed CLN in a public place, the following options are
@ -58,6 +61,10 @@ linking a CLN application it is sufficient to give the flag <CODE>-lcln</CODE>.
<H2><A NAME="SEC65" HREF="cln_toc.html#TOC65">11.2 Include files</A></H2>
<P>
<A NAME="IDX310"></A>
<A NAME="IDX311"></A>
<P>
Here is a summary of the include files and their contents.
@ -253,6 +260,7 @@ Includes all of the above.
<P>
A function which computes the nth Fibonacci number can be written as follows.
<A NAME="IDX312"></A>
@ -329,9 +337,17 @@ automatically reclaimed (garbage collected). Only the result survives and
gets passed to the caller.
<P>
The file <CODE>fibonacci.cc</CODE> in the subdirectory <CODE>examples</CODE>
contains this implementation together with an even faster algorithm.
<H2><A NAME="SEC67" HREF="cln_toc.html#TOC67">11.4 Debugging support</A></H2>
<P>
<A NAME="IDX313"></A>
<P>
When debugging a CLN application with GNU <CODE>gdb</CODE>, two facilities are
@ -364,6 +380,7 @@ CLN offers a function <CODE>cl_print</CODE>, callable from the debugger,
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="IDX314"></A>
<PRE>
#define CL_DEBUG
@ -390,6 +407,7 @@ only with number objects and similar. Therefore CLN offers a member function
<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="IDX315"></A>
<PRE>
(gdb) print s

17
doc/cln_12.html

@ -1,6 +1,6 @@
<HTML>
<HEAD>
<!-- Created by texi2html 1.56k from cln.texi on 14 January 2000 -->
<!-- Created by texi2html 1.56k from cln.texi on 4 May 2000 -->
<TITLE>CLN, a Class Library for Numbers - 12. Customizing</TITLE>
</HEAD>
@ -10,6 +10,9 @@ Go to the <A HREF="cln_1.html">first</A>, <A HREF="cln_11.html">previous</A>, <A
<H1><A NAME="SEC68" HREF="cln_toc.html#TOC68">12. Customizing</A></H1>
<P>
<A NAME="IDX316"></A>
@ -28,12 +31,16 @@ void cl_abort (void);
</PRE>
<P>
<A NAME="IDX317"></A>
This function must not return control to its caller.
<H2><A NAME="SEC70" HREF="cln_toc.html#TOC70">12.2 Floating-point underflow</A></H2>
<P>
<A NAME="IDX318"></A>
<P>
Floating point underflow denotes the situation when a floating-point number
@ -47,9 +54,8 @@ cl_boolean cl_inhibit_floating_point_underflow
<P>
to <CODE>cl_true</CODE>, the error will be inhibited, and a floating-point zero
will be generated instead.
The default value of <CODE>cl_inhibit_floating_point_underflow</CODE> is
<CODE>cl_false</CODE>.
will be generated instead. The default value of
<CODE>cl_inhibit_floating_point_underflow</CODE> is <CODE>cl_false</CODE>.
@ -59,6 +65,7 @@ The default value of <CODE>cl_inhibit_floating_point_underflow</CODE> is
<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="IDX319"></A>
@ -82,6 +89,8 @@ void (*cl_free_hook) (void* ptr) = ...;
</PRE>
<P>
<A NAME="IDX320"></A>
<A NAME="IDX321"></A>
The <CODE>cl_malloc_hook</CODE> function must not return a <CODE>NULL</CODE> pointer.

2
doc/cln_13.html

@ -1,6 +1,6 @@
<HTML>
<HEAD>
<!-- Created by texi2html 1.56k from cln.texi on 14 January 2000 -->
<!-- Created by texi2html 1.56k from cln.texi on 4 May 2000 -->
<TITLE>CLN, a Class Library for Numbers - Index</TITLE>
</HEAD>

16
doc/cln_2.html

@ -1,6 +1,6 @@
<HTML>
<HEAD>
<!-- Created by texi2html 1.56k from cln.texi on 14 January 2000 -->
<!-- Created by texi2html 1.56k from cln.texi on 4 May 2000 -->
<TITLE>CLN, a Class Library for Numbers - 2. Installation</TITLE>
</HEAD>
@ -27,7 +27,7 @@ This section describes how to install the CLN package on your system.
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.
I recommend GNU <CODE>egcs 1.1</CODE> or newer.
I recommend GNU <CODE>g++ 2.95</CODE> or newer.
<P>
@ -50,6 +50,8 @@ of static and global variables, a feature which I could
implement for GNU g++ only.
<P>
<A NAME="IDX3"></A>
<H3><A NAME="SEC5" HREF="cln_toc.html#TOC5">2.1.2 Make utility</A></H3>
@ -58,6 +60,8 @@ implement for GNU g++ only.
To build CLN, you also need to have GNU <CODE>make</CODE> installed.
<P>
<A NAME="IDX4"></A>
<H3><A NAME="SEC6" HREF="cln_toc.html#TOC6">2.1.3 Sed utility</A></H3>
@ -181,11 +185,6 @@ With full <SAMP>`-O2'</SAMP>, <CODE>g++</CODE> miscompiles the division routines
--enable-shared to work, you need egcs-1.1.2 or newer.
<P>
On MIPS (SGI Irix 6), pass option <CODE>--without-gmp</CODE> to configure. gmp does
not work when compiled in <SAMP>`n32'</SAMP> binary format on Irix.
<P>
By default, only a static library is built. You can build CLN as a shared
library too, by calling <CODE>configure</CODE> with the option <SAMP>`--enable-shared'</SAMP>.
@ -202,6 +201,9 @@ library.
<H2><A NAME="SEC8" HREF="cln_toc.html#TOC8">2.3 Installing the library</A></H2>
<P>
<A NAME="IDX5"></A>
<P>
As with any autoconfiguring GNU software, installation is as easy as this:

39
doc/cln_3.html

@ -1,6 +1,6 @@
<HTML>
<HEAD>
<!-- Created by texi2html 1.56k from cln.texi on 14 January 2000 -->
<!-- Created by texi2html 1.56k from cln.texi on 4 May 2000 -->
<TITLE>CLN, a Class Library for Numbers - 3. Ordinary number types</TITLE>
</HEAD>
@ -45,6 +45,8 @@ Rational number Floating-point number
</PRE>
<P>
<A NAME="IDX6"></A>
<A NAME="IDX7"></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
@ -52,17 +54,24 @@ checking instead.
<P>
<A NAME="IDX8"></A>
<A NAME="IDX9"></A>
<A NAME="IDX10"></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="IDX11"></A>
The class <CODE>cl_R</CODE> comprises real numbers of different kinds. It is an
abstract class.
<P>
<A NAME="IDX12"></A>
<A NAME="IDX13"></A>
<A NAME="IDX14"></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
@ -70,6 +79,7 @@ to integers.
<P>
<A NAME="IDX15"></A>
The class <CODE>cl_F</CODE> implements floating-point approximations to real numbers.
It is an abstract class.
@ -77,6 +87,9 @@ It is an abstract class.
<H2><A NAME="SEC11" HREF="cln_toc.html#TOC11">3.1 Exact numbers</A></H2>
<P>
<A NAME="IDX16"></A>
<P>
Some numbers are represented as exact numbers: there is no loss of information
@ -118,6 +131,9 @@ is completely transparent.
<H2><A NAME="SEC12" HREF="cln_toc.html#TOC12">3.2 Floating-point numbers</A></H2>
<P>
<A NAME="IDX17"></A>
<P>
Not all real numbers can be represented exactly. (There is an easy mathematical
@ -128,6 +144,7 @@ CLN implements ordinary floating-point numbers, with mantissa and exponent.
<P>
<A NAME="IDX18"></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
@ -158,6 +175,7 @@ Floating point numbers come in four flavors:
<UL>
<LI>
<A NAME="IDX19"></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).
@ -165,6 +183,7 @@ They don't consume heap allocation.
<LI>
<A NAME="IDX20"></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).
@ -173,6 +192,7 @@ This corresponds closely to the C/C++ type <SAMP>`float'</SAMP>.
<LI>
<A NAME="IDX21"></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).
@ -181,6 +201,7 @@ This corresponds closely to the C/C++ type <SAMP>`double'</SAMP>.
<LI>
<A NAME="IDX22"></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 &#62;= 64.
@ -201,6 +222,7 @@ with larger exponent range.
<P>
<A NAME="IDX23"></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
@ -216,6 +238,9 @@ the floating point contagion rule happened to change in the future.)
<H2><A NAME="SEC13" HREF="cln_toc.html#TOC13">3.3 Complex numbers</A></H2>
<P>
<A NAME="IDX24"></A>
<P>
Complex numbers, as implemented by the class <CODE>cl_N</CODE>, have a real
@ -232,6 +257,9 @@ through application of <CODE>sqrt</CODE> or transcendental functions.
<H2><A NAME="SEC14" HREF="cln_toc.html#TOC14">3.4 Conversions</A></H2>
<P>
<A NAME="IDX25"></A>
<P>
Conversions from any class to any its superclasses ("base classes" in
@ -289,6 +317,7 @@ Conversions from <SAMP>`const char *'</SAMP> are provided for the classes
<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="IDX26"></A>
<PRE>
cl_I order_of_rubiks_cube_group = "43252003274489856000";
@ -308,12 +337,16 @@ the functions
<DT><CODE>int cl_I_to_int (const cl_I&#38; x)</CODE>
<DD>
<A NAME="IDX27"></A>
<DT><CODE>unsigned int cl_I_to_uint (const cl_I&#38; x)</CODE>
<DD>
<A NAME="IDX28"></A>
<DT><CODE>long cl_I_to_long (const cl_I&#38; x)</CODE>
<DD>
<A NAME="IDX29"></A>
<DT><CODE>unsigned long cl_I_to_ulong (const cl_I&#38; x)</CODE>
<DD>
<A NAME="IDX30"></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>
@ -330,8 +363,10 @@ the functions
<DT><CODE>float cl_float_approx (const <VAR>type</VAR>&#38; x)</CODE>
<DD>
<A NAME="IDX31"></A>
<DT><CODE>double cl_double_approx (const <VAR>type</VAR>&#38; x)</CODE>
<DD>
<A NAME="IDX32"></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.
@ -342,8 +377,10 @@ Conversions from any class to any of its subclasses ("derived classes" in
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="IDX33"></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="IDX34"></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.

211
doc/cln_4.html
File diff suppressed because it is too large
View File

14
doc/cln_5.html

@ -1,6 +1,6 @@
<HTML>
<HEAD>
<!-- Created by texi2html 1.56k from cln.texi on 14 January 2000 -->
<!-- Created by texi2html 1.56k from cln.texi on 4 May 2000 -->
<TITLE>CLN, a Class Library for Numbers - 5. Input/Output</TITLE>
</HEAD>
@ -10,10 +10,16 @@ Go to the <A HREF="cln_1.html">first</A>, <A HREF="cln_4.html">previous</A>, <A
<H1><A NAME="SEC43" HREF="cln_toc.html#TOC43">5. Input/Output</A></H1>
<P>
<A NAME="IDX227"></A>
<H2><A NAME="SEC44" HREF="cln_toc.html#TOC44">5.1 Internal and printed representation</A></H2>
<P>
<A NAME="IDX228"></A>
<P>
All computations deal with the internal representations of the numbers.
@ -27,8 +33,10 @@ Several external representations may denote the same number, for example,
<P>
Converting an internal to an external representation is called "printing",
<A NAME="IDX229"></A>
converting an external to an internal representation is called "reading".
In CLN, is it always true that conversion of an internal to an external
<A NAME="IDX230"></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>.
This is called "print-read consistency".
@ -409,7 +417,7 @@ using this variable name. Default is <CODE>"x"</CODE>.
<P>
The global variable <CODE>cl_default_print_flags</CODE> contains the default values,
used by the function <CODE>fprint</CODE>,
used by the function <CODE>fprint</CODE>.
<P><HR><P>

2
doc/cln_6.html

@ -1,6 +1,6 @@
<HTML>
<HEAD>
<!-- Created by texi2html 1.56k from cln.texi on 14 January 2000 -->
<!-- Created by texi2html 1.56k from cln.texi on 4 May 2000 -->
<TITLE>CLN, a Class Library for Numbers - 6. Rings</TITLE>
</HEAD>

34
doc/cln_7.html

@ -1,6 +1,6 @@
<HTML>
<HEAD>
<!-- Created by texi2html 1.56k from cln.texi on 14 January 2000 -->
<!-- Created by texi2html 1.56k from cln.texi on 4 May 2000 -->
<TITLE>CLN, a Class Library for Numbers - 7. Modular integers</TITLE>
</HEAD>
@ -10,10 +10,16 @@ Go to the <A HREF="cln_1.html">first</A>, <A HREF="cln_6.html">previous</A>, <A
<H1><A NAME="SEC48" HREF="cln_toc.html#TOC48">7. Modular integers</A></H1>
<P>
<A NAME="IDX231"></A>
<H2><A NAME="SEC49" HREF="cln_toc.html#TOC49">7.1 Modular integer rings</A></H2>
<P>
<A NAME="IDX232"></A>
<P>
CLN implements modular integers, i.e. integers modulo a fixed integer N.
@ -59,9 +65,11 @@ Modular integer rings are constructed using the function
<DT><CODE>cl_modint_ring cl_find_modint_ring (const cl_I&#38; N)</CODE>
<DD>
<A NAME="IDX233"></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="IDX234"></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
@ -76,8 +84,10 @@ Modular integer rings can be compared for equality:
<DT><CODE>bool operator== (const cl_modint_ring&#38;, const cl_modint_ring&#38;)</CODE>
<DD>
<A NAME="IDX235"></A>
<DT><CODE>bool operator!= (const cl_modint_ring&#38;, const cl_modint_ring&#38;)</CODE>
<DD>
<A NAME="IDX236"></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
same ring because it is memoized in the cache table.
@ -95,22 +105,27 @@ Given a modular integer ring <CODE>R</CODE>, the following members can be used.
<DT><CODE>cl_I R-&#62;modulus</CODE>
<DD>
<A NAME="IDX237"></A>
This is the ring's modulus, normalized to be nonnegative: <CODE>abs(N)</CODE>.
<DT><CODE>cl_MI R-&#62;zero()</CODE>
<DD>
<A NAME="IDX238"></A>
This returns <CODE>0 mod N</CODE>.
<DT><CODE>cl_MI R-&#62;one()</CODE>
<DD>
<A NAME="IDX239"></A>
This returns <CODE>1 mod N</CODE>.
<DT><CODE>cl_MI R-&#62;canonhom (const cl_I&#38; x)</CODE>
<DD>
<A NAME="IDX240"></A>
This returns <CODE>x mod N</CODE>.
<DT><CODE>cl_I R-&#62;retract (const cl_MI&#38; x)</CODE>
<DD>
<A NAME="IDX241"></A>
This is a partial inverse function to <CODE>R-&#62;canonhom</CODE>. It returns the
standard representative (<CODE>&#62;=0</CODE>, <CODE>&#60;N</CODE>) of <CODE>x</CODE>.
@ -118,6 +133,7 @@ standard representative (<CODE>&#62;=0</CODE>, <CODE>&#60;N</CODE>) of <CODE>x</
<DD>
<DT><CODE>cl_MI R-&#62;random()</CODE>
<DD>
<A NAME="IDX242"></A>
This returns a random integer modulo <CODE>N</CODE>.
</DL>
@ -129,15 +145,18 @@ The following operations are defined on modular integers.
<DT><CODE>cl_modint_ring x.ring ()</CODE>
<DD>
<A NAME="IDX243"></A>
Returns the ring to which the modular integer <CODE>x</CODE> belongs.
<DT><CODE>cl_MI operator+ (const cl_MI&#38;, const cl_MI&#38;)</CODE>
<DD>
<A NAME="IDX244"></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&#38;, const cl_MI&#38;)</CODE>
<DD>
<A NAME="IDX245"></A>
Returns the difference of two modular integers. One of the arguments may also be
a plain integer.
@ -147,50 +166,61 @@ Returns the negative of a modular integer.
<DT><CODE>cl_MI operator* (const cl_MI&#38;, const cl_MI&#38;)</CODE>
<DD>
<A NAME="IDX246"></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&#38;)</CODE>
<DD>
<A NAME="IDX247"></A>
Returns the square of a modular integer.
<DT><CODE>cl_MI recip (const cl_MI&#38; x)</CODE>
<DD>
<A NAME="IDX248"></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&#38; x, const cl_MI&#38; y)</CODE>
<DD>
<A NAME="IDX249"></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&#38; x, const cl_I&#38; y)</CODE>
<DD>
<A NAME="IDX250"></A>
<CODE>y</CODE> must be &#62; 0. Returns <CODE>x^y</CODE>.
<DT><CODE>cl_MI expt (const cl_MI&#38; x, const cl_I&#38; y)</CODE>
<DD>
<A NAME="IDX251"></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&#60;&#60; (const cl_MI&#38; x, const cl_I&#38; y)</CODE>
<DD>
<A NAME="IDX252"></A>
Returns <CODE>x*2^y</CODE>.
<DT><CODE>cl_MI operator&#62;&#62; (const cl_MI&#38; x, const cl_I&#38; y)</CODE>
<DD>
<A NAME="IDX253"></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&#38;, const cl_MI&#38;)</CODE>
<DD>
<A NAME="IDX254"></A>
<DT><CODE>bool operator!= (const cl_MI&#38;, const cl_MI&#38;)</CODE>
<DD>
<A NAME="IDX255"></A>
Compares two modular integers, belonging to the same modular integer ring,
for equality.
<DT><CODE>cl_boolean zerop (const cl_MI&#38; x)</CODE>
<DD>
<A NAME="IDX256"></A>
Returns true if <CODE>x</CODE> is <CODE>0 mod N</CODE>.
</DL>
@ -203,8 +233,10 @@ input/output).
<DT><CODE>void fprint (cl_ostream stream, const cl_MI&#38; x)</CODE>
<DD>
<A NAME="IDX257"></A>
<DT><CODE>cl_ostream operator&#60;&#60; (cl_ostream stream, const cl_MI&#38; x)</CODE>
<DD>
<A NAME="IDX258"></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>.
</DL>

18
doc/cln_8.html

@ -1,6 +1,6 @@
<HTML>
<HEAD>
<!-- Created by texi2html 1.56k from cln.texi on 14 January 2000 -->
<!-- Created by texi2html 1.56k from cln.texi on 4 May 2000 -->
<TITLE>CLN, a Class Library for Numbers - 8. Symbolic data types</TITLE>
</HEAD>
@ -10,6 +10,9 @@ Go to the <A HREF="cln_1.html">first</A>, <A HREF="cln_7.html">previous</A>, <A
<H1><A NAME="SEC51" HREF="cln_toc.html#TOC51">8. Symbolic data types</A></H1>
<P>
<A NAME="IDX259"></A>
<P>
CLN implements two symbolic (non-numeric) data types: strings and symbols.
@ -18,6 +21,9 @@ CLN implements two symbolic (non-numeric) data types: strings and symbols.
<H2><A NAME="SEC52" HREF="cln_toc.html#TOC52">8.1 Strings</A></H2>
<P>
<A NAME="IDX260"></A>
<P>
The class
@ -42,6 +48,7 @@ Strings are constructed through the following constructors:
<DT><CODE>cl_string (const char * s)</CODE>
<DD>
<A NAME="IDX261"></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>
@ -62,17 +69,21 @@ Assignment from <CODE>cl_string</CODE> and <CODE>const char *</CODE>.
<DT><CODE>s.length()</CODE>
<DD>
<A NAME="IDX262"></A>
<DT><CODE>strlen(s)</CODE>
<DD>
<A NAME="IDX263"></A>
Returns the length of the string <CODE>s</CODE>.
<DT><CODE>s[i]</CODE>
<DD>
<A NAME="IDX264"></A>
Returns the <CODE>i</CODE>th character of the string <CODE>s</CODE>.
<CODE>i</CODE> must be in the range <CODE>0 &#60;= i &#60; s.length()</CODE>.
<DT><CODE>bool equal (const cl_string&#38; s1, const cl_string&#38; s2)</CODE>
<DD>
<A NAME="IDX265"></A>
Compares two strings for equality. One of the arguments may also be a
plain <CODE>const char *</CODE>.
</DL>
@ -80,6 +91,9 @@ plain <CODE>const char *</CODE>.
<H2><A NAME="SEC53" HREF="cln_toc.html#TOC53">8.2 Symbols</A></H2>
<P>
<A NAME="IDX266"></A>
<P>
Symbols are uniquified strings: all symbols with the same name are shared.
@ -98,6 +112,7 @@ Symbols are constructed through the following constructor:
<DT><CODE>cl_symbol (const cl_string&#38; s)</CODE>
<DD>
<A NAME="IDX267"></A>
Looks up or creates a new symbol with a given name.
</DL>
@ -114,6 +129,7 @@ Conversion to <CODE>cl_string</CODE>: Returns the string which names the symbol
<DT><CODE>bool equal (const cl_symbol&#38; sym1, const cl_symbol&#38; sym2)</CODE>
<DD>
<A NAME="IDX268"></A>
Compares two symbols for equality. This is very fast.
</DL>

38
doc/cln_9.html

@ -1,6 +1,6 @@
<HTML>
<HEAD>
<!-- Created by texi2html 1.56k from cln.texi on 14 January 2000 -->
<!-- Created by texi2html 1.56k from cln.texi on 4 May 2000 -->
<TITLE>CLN, a Class Library for Numbers - 9. Univariate polynomials</TITLE>
</HEAD>
@ -10,6 +10,10 @@ Go to the <A HREF="cln_1.html">first</A>, <A HREF="cln_8.html">previous</A>, <A
<H1><A NAME="SEC54" HREF="cln_toc.html#TOC54">9. Univariate polynomials</A></H1>
<P>
<A NAME="IDX269"></A>
<A NAME="IDX270"></A>
@ -121,6 +125,7 @@ return the same polynomial ring.
<DT><CODE>cl_univpoly_complex_ring cl_find_univpoly_ring (const cl_complex_ring&#38; R)</CODE>
<DD>
<A NAME="IDX271"></A>
<DT><CODE>cl_univpoly_complex_ring cl_find_univpoly_ring (const cl_complex_ring&#38; R, const cl_symbol&#38; varname)</CODE>
<DD>
<DT><CODE>cl_univpoly_real_ring cl_find_univpoly_ring (const cl_real_ring&#38; R)</CODE>
@ -155,27 +160,33 @@ Given a univariate polynomial ring <CODE>R</CODE>, the following members can be
<DT><CODE>cl_ring R-&#62;basering()</CODE>
<DD>
<A NAME="IDX272"></A>
This returns the base ring, as passed to <SAMP>`cl_find_univpoly_ring'</SAMP>.
<DT><CODE>cl_UP R-&#62;zero()</CODE>
<DD>
<A NAME="IDX273"></A>
This returns <CODE>0 in R</CODE>, a polynomial of degree -1.
<DT><CODE>cl_UP R-&#62;one()</CODE>
<DD>
<A NAME="IDX274"></A>
This returns <CODE>1 in R</CODE>, a polynomial of degree &#60;= 0.
<DT><CODE>cl_UP R-&#62;canonhom (const cl_I&#38; x)</CODE>
<DD>
<A NAME="IDX275"></A>
This returns <CODE>x in R</CODE>, a polynomial of degree &#60;= 0.
<DT><CODE>cl_UP R-&#62;monomial (const cl_ring_element&#38; x, uintL e)</CODE>
<DD>
<A NAME="IDX276"></A>
This returns a sparse polynomial: <CODE>x * X^e</CODE>, where <CODE>X</CODE> is the
indeterminate.
<DT><CODE>cl_UP R-&#62;create (sintL degree)</CODE>
<DD>
<A NAME="IDX277"></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>
@ -190,12 +201,14 @@ The following are the only destructive operations on univariate polynomials.
<DT><CODE>void set_coeff (cl_UP&#38; x, uintL index, const cl_ring_element&#38; y)</CODE>
<DD>
<A NAME="IDX278"></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&#38; x)</CODE>
<DD>
<A NAME="IDX279"></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
@ -210,14 +223,17 @@ The following operations are defined on univariate polynomials.
<DT><CODE>cl_univpoly_ring x.ring ()</CODE>
<DD>
<A NAME="IDX280"></A>
Returns the ring to which the univariate polynomial <CODE>x</CODE> belongs.
<DT><CODE>cl_UP operator+ (const cl_UP&#38;, const cl_UP&#38;)</CODE>
<DD>
<A NAME="IDX281"></A>
Returns the sum of two univariate polynomials.
<DT><CODE>cl_UP operator- (const cl_UP&#38;, const cl_UP&#38;)</CODE>
<DD>
<A NAME="IDX282"></A>
Returns the difference of two univariate polynomials.
<DT><CODE>cl_UP operator- (const cl_UP&#38;)</CODE>
@ -226,44 +242,54 @@ Returns the negative of a univariate polynomial.
<DT><CODE>cl_UP operator* (const cl_UP&#38;, const cl_UP&#38;)</CODE>
<DD>
<A NAME="IDX283"></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&#38;)</CODE>
<DD>
<A NAME="IDX284"></A>
Returns the square of a univariate polynomial.
<DT><CODE>cl_UP expt_pos (const cl_UP&#38; x, const cl_I&#38; y)</CODE>
<DD>
<A NAME="IDX285"></A>
<CODE>y</CODE> must be &#62; 0. Returns <CODE>x^y</CODE>.
<DT><CODE>bool operator== (const cl_UP&#38;, const cl_UP&#38;)</CODE>
<DD>
<A NAME="IDX286"></A>
<DT><CODE>bool operator!= (const cl_UP&#38;, const cl_UP&#38;)</CODE>
<DD>
<A NAME="IDX287"></A>
Compares two univariate polynomials, belonging to the same univariate
polynomial ring, for equality.
<DT><CODE>cl_boolean zerop (const cl_UP&#38; x)</CODE>
<DD>
<A NAME="IDX288"></A>
Returns true if <CODE>x</CODE> is <CODE>0 in R</CODE>.
<DT><CODE>sintL degree (const cl_UP&#38; x)</CODE>
<DD>
<A NAME="IDX289"></A>
Returns the degree of the polynomial. The zero polynomial has degree <CODE>-1</CODE>.
<DT><CODE>cl_ring_element coeff (const cl_UP&#38; x, uintL index)</CODE>
<DD>
<A NAME="IDX290"></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&#38; y)</CODE>
<DD>
<A NAME="IDX291"></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&#38; x)</CODE>
<DD>
<A NAME="IDX292"></A>
Returns the derivative of the polynomial <CODE>x</CODE> with respect to the
indeterminate <CODE>X</CODE>.
</DL>
@ -277,8 +303,10 @@ input/output).
<DT><CODE>void fprint (cl_ostream stream, const cl_UP&#38; x)</CODE>
<DD>
<A NAME="IDX293"></A>
<DT><CODE>cl_ostream operator&#60;&#60; (cl_ostream stream, const cl_UP&#38; x)</CODE>
<DD>
<A NAME="IDX294"></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>.
@ -296,18 +324,26 @@ The following functions return special polynomials.
<DT><CODE>cl_UP_I cl_tschebychev (sintL n)</CODE>
<DD>
<A NAME="IDX295"></A>
<A NAME="IDX296"></A>
Returns the n-th Tchebychev polynomial (n &#62;= 0).
<DT><CODE>cl_UP_I cl_hermite (sintL n)</CODE>
<DD>
<A NAME="IDX297"></A>
<A NAME="IDX298"></A>
Returns the n-th Hermite polynomial (n &#62;= 0).
<DT><CODE>cl_UP_RA cl_legendre (sintL n)</CODE>
<DD>
<A NAME="IDX299"></A>
<A NAME="IDX300"></A>
Returns the n-th Legendre polynomial (n &#62;= 0).
<DT><CODE>cl_UP_I cl_laguerre (sintL n)</CODE>
<DD>
<A NAME="IDX301"></A>
<A NAME="IDX302"></A>
Returns the n-th Laguerre polynomial (n &#62;= 0).
</DL>

4
doc/cln_toc.html

@ -1,6 +1,6 @@
<HTML>
<HEAD>
<!-- Created by texi2html 1.56k from cln.texi on 14 January 2000 -->
<!-- Created by texi2html 1.56k from cln.texi on 4 May 2000 -->
<TITLE>CLN, a Class Library for Numbers - Table of Contents</TITLE>
</HEAD>
@ -115,7 +115,7 @@
<LI><A NAME="TOC73" HREF="cln_13.html#SEC73">Index</A>
</UL>
<P><HR><P>
This document was generated on 14 January 2000 using
This document was generated on 4 May 2000 using
<A HREF="http://wwwinfo.cern.ch/dis/texi2html/">texi2html</A>&nbsp;1.56k.
</BODY>
</HTML>
Loading…
Cancel
Save