]> www.ginac.de Git - cln.git/blobdiff - doc/cln.texi
64-bit mingw port: Fix undefined references to cl_I_constructor_from_[U]L.
[cln.git] / doc / cln.texi
index 813ce4af28ff52e994c67bbb16a964dab5078299..1d676decf369fd18a72c8a417ce83951678cafdd 100644 (file)
 @synindex pg my
 @synindex tp my
 
+@ifnottex
+@node Top
+@top CLN
+@end ifnottex
 
 @c For `info' only.
-@ifinfo
-This file documents @sc{cln}, a Class Library for Numbers.
+@ifnottex
+This manual documents @sc{cln}, a Class Library for Numbers.
 
 Published by Bruno Haible, @code{<haible@@clisp.cons.org>} and
 Richard B. Kreckel, @code{<kreckel@@ginac.de>}.
 
 Copyright (C)  Bruno Haible 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008.
-Copyright (C)  Richard B. Kreckel 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008.
+Copyright (C)  Richard B. Kreckel 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2017.
+Copyright (C)  Alexei Sheplyakov 2008, 2010.
 
 Permission is granted to make and distribute verbatim copies of
 this manual provided the copyright notice and this permission notice
@@ -54,7 +59,7 @@ Permission is granted to copy and distribute translations of this manual
 into another language, under the above conditions for modified versions,
 except that this permission notice may be stated in a translation approved
 by the author.
-@end ifinfo
+@end ifnottex
 
 
 @c For TeX only.
@@ -68,7 +73,9 @@ by the author.
 @vskip 0pt plus 1filll
 Copyright @copyright{} Bruno Haible 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008.
 @sp 0
-Copyright @copyright{} Richard B. Kreckel 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008.
+Copyright @copyright{} Richard B. Kreckel 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014.
+@sp 0
+Copyright @copyright{} Alexei Sheplyakov 2008, 2010.
 
 @sp 2
 Published by Bruno Haible, @code{<haible@@clisp.cons.org>} and
@@ -96,11 +103,6 @@ by the authors.
 @contents
 @end iftex
 
-@ifinfo
-@node Top
-@top CLN
-@end ifinfo
-
 
 @menu
 * Introduction::                
@@ -117,6 +119,7 @@ by the authors.
 * Customizing::                 
 * Index::
 
+@detailmenu
  --- The Detailed Node Listing ---
 
 Installation
@@ -229,6 +232,7 @@ Customizing
 * Customizing I/O::             
 * Customizing the memory allocator::  
 
+@end detailmenu
 @end menu
 
 @node Introduction
@@ -391,8 +395,8 @@ This section describes how to install the CLN package on your system.
 @node C++ compiler
 @subsection C++ compiler
 
-To build CLN, you need a C++ compiler.
-Actually, you need GNU @code{g++ 3.0.0} or newer.
+To build CLN, you need a C++11 compiler.
+GNU @code{g++ 4.8.1} or newer is recommended.
 
 The following C++ features are used:
 classes, member functions, overloading of functions and operators,
@@ -413,8 +417,6 @@ on all platforms when a non-GNU assembler is being used.
 
 To build CLN, you also need to have GNU @code{make} installed.
 
-Only GNU @code{make} 3.77 is unusable for CLN; other versions work fine.
-
 @node Sed utility
 @subsection Sed utility
 @cindex @code{sed}
@@ -482,12 +484,12 @@ Examples:
 $ CC="gcc" CFLAGS="-O" CXX="g++" CXXFLAGS="-O" ./configure
 @end example
 @example
-$ CC="gcc -V 3.2.3" CFLAGS="-O2 -finline-limit=1000" \
-  CXX="g++ -V 3.2.3" CXXFLAGS="-O2 -finline-limit=1000" \
+$ CC=gcc CFLAGS="-O2 -finline-limit=1000" \
+  CXX=g++ CXXFLAGS="-O2 -finline-limit=1000" \
   CPPFLAGS="-DNO_ASM" ./configure
 @end example
 @example
-$ CC="gcc-4.2" CFLAGS="-O2" CXX="g++-4.2" CXXFLAGS="-O2" ./configure
+$ CC="gcc-9" CFLAGS="-O2" CXX="g++-9" CXXFLAGS="-O2" ./configure
 @end example
 
 Note that for these environment variables to take effect, you have to set
@@ -1166,7 +1168,7 @@ Returns the complex conjugate of @code{x}.
 
 We have the relations
 
-@itemize @asis
+@itemize @w{}
 @item
 @code{x = complex(realpart(x), imagpart(x))}
 @item
@@ -1281,7 +1283,7 @@ down exactly as often as it rounds up.
 
 The functions are related like this:
 
-@itemize @asis
+@itemize @w{}
 @item
 @code{ceiling(m/n) = floor((m+n-1)/n) = floor((m-1)/n)+1}
 for rational numbers @code{m/n} (@code{m}, @code{n} integers, @code{n}>0), and
@@ -2090,7 +2092,7 @@ come from @code{newbyte} and the other bits come from @code{n}.
 
 The following relations hold:
 
-@itemize @asis
+@itemize @w{}
 @item
 @code{ldb (n, b) = mask_field(n, b) >> b.position},
 @item
@@ -2229,7 +2231,7 @@ doublefactorial @code{n}!! = @code{1*3*@dots{}*n} or
 @code{n} and @code{k} must be small integers >= 0. This function returns the
 binomial coefficient
 @tex
-${n \choose k} = {n! \over n! (n-k)!}$
+${n \choose k} = {n! \over k! (n-k)!}$
 @end tex
 @ifinfo
 (@code{n} choose @code{k}) = @code{n}! / @code{k}! @code{(n-k)}!
@@ -2453,7 +2455,7 @@ If @code{x} is already an exact number, this function returns @code{x}.
 
 If @code{x} is any float, one has
 
-@itemize @asis
+@itemize @w{}
 @item
 @code{cl_float(rational(x),x) = x}
 @item
@@ -2627,7 +2629,7 @@ one digit in the non-exponent part. The exponent has the syntax
 @var{expmarker} @var{expsign} @{@var{digit}@}+.
 The exponent marker is
 
-@itemize @asis
+@itemize @w{}
 @item
 @samp{s} for short-floats,
 @item
@@ -2645,7 +2647,7 @@ function @samp{float_format}.
 
 @item Complex numbers
 External representation:
-@itemize @asis
+@itemize @w{}
 @item
 In algebraic notation: @code{@var{realpart}+@var{imagpart}i}. Of course,
 if @var{imagpart} is negative, its printed representation begins with
@@ -2662,30 +2664,7 @@ In Common Lisp notation: @code{#C(@var{realpart} @var{imagpart})}.
 @node Input functions
 @section Input functions
 
-Including @code{<cln/io.h>} defines a number of simple input functions
-that read from @code{std::istream&}:
-
-@table @code
-@item int freadchar (std::istream& stream)
-Reads a character from @code{stream}. Returns @code{cl_EOF} (not a @samp{char}!)
-if the end of stream was encountered or an error occurred.
-
-@item int funreadchar (std::istream& stream, int c)
-Puts back @code{c} onto @code{stream}. @code{c} must be the result of the
-last @code{freadchar} operation on @code{stream}.
-@end table
-
-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{<cln/@var{type}_io.h>}, the following input function:
-
-@table @code
-@item std::istream& operator>> (std::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{<cln/@var{type}_io.h>},
-are the following:
+Including @code{<cln/io.h>} defines flexible input functions:
 
 @table @code
 @item cl_N read_complex (std::istream& stream, const cl_read_flags& flags)
@@ -3152,8 +3131,8 @@ The following functions are available on strings:
 @item operator =
 Assignment from @code{cl_string} and @code{const char *}.
 
-@item s.length()
-@cindex @code{length ()}
+@item s.size()
+@cindex @code{size()}
 @itemx strlen(s)
 @cindex @code{strlen ()}
 Returns the length of the string @code{s}.
@@ -3161,7 +3140,7 @@ Returns the length of the string @code{s}.
 @item s[i]
 @cindex @code{operator [] ()}
 Returns the @code{i}th character of the string @code{s}.
-@code{i} must be in the range @code{0 <= i < s.length()}.
+@code{i} must be in the range @code{0 <= i < s.size()}.
 
 @item bool equal (const cl_string& s1, const cl_string& s2)
 @cindex @code{equal ()}
@@ -3306,17 +3285,17 @@ There is a cache table of rings, indexed by @code{R} and @code{varname}.
 This ensures that two calls of this function with the same arguments will
 return the same polynomial ring.
 
-@itemx cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& R)
+@item 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)
+@item cl_univpoly_complex_ring find_univpoly_ring (const cl_complex_ring& R, const cl_symbol& varname)
+@item cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& R)
+@item cl_univpoly_real_ring find_univpoly_ring (const cl_real_ring& R, const cl_symbol& varname)
+@item cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& R)
+@item cl_univpoly_rational_ring find_univpoly_ring (const cl_rational_ring& R, const cl_symbol& varname)
+@item cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& R)
+@item cl_univpoly_integer_ring find_univpoly_ring (const cl_integer_ring& R, const cl_symbol& varname)
+@item cl_univpoly_modint_ring find_univpoly_ring (const cl_modint_ring& R)
+@item 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