]> www.ginac.de Git - cln.git/blobdiff - doc/cln.texi
Replace CL_REQUIRE/CL_PROVIDE(cl_RA_ring) with portable code.
[cln.git] / doc / cln.texi
index 7d60d9f794ee432465cd90991a2401e324f8910e..d0b079c6e7b7083f3c13d147d5945c2de63a6adf 100644 (file)
@@ -157,7 +157,7 @@ Functions on numbers
 * Functions on floating-point numbers::  
 * Conversion functions::        
 * Random number generators::    
-* Obfuscating operators::       
+* Modifying operators::       
 
 Constructing numbers
 
@@ -471,6 +471,9 @@ Flags to be given to the C++ compiler when compiling programs (not when linking)
 
 @item CPPFLAGS
 Flags to be given to the C/C++ preprocessor.
+
+@item LDFLAGS
+Flags to be given to the linker.
 @end table
 
 Examples:
@@ -538,25 +541,31 @@ libraries so runtime-critical applications should be linked statically.
 @subsection Using the GNU MP Library
 @cindex GMP
 
-Starting with version 1.1, CLN may be configured to make use of a
-preinstalled @code{gmp} library for some low-level routines.  Please
-make sure that you have at least @code{gmp} version 3.0 installed
-since earlier versions are unsupported and likely not to work.  This
-feature is known to be quite a boost for CLN's performance.
+CLN may be configured to make use of a preinstalled @code{gmp} library
+for some low-level routines.  Please make sure that you have at least
+@code{gmp} version 3.0 installed since earlier versions are unsupported
+and likely not to work.  Using @code{gmp} is known to be quite a boost
+for CLN's performance.
+
+By default, CLN will autodetect @code{gmp} and use it. If you do not
+want CLN to make use of a preinstalled @code{gmp} library, then you can
+explicitly specify so by calling @code{configure} with the option
+@samp{--without-gmp}.
 
-By default, CLN will autodetect @code{gmp} and use it. But if you have
-installed the @code{gmp} library and its header file in some place where
-your compiler cannot find it by default, you must help @code{configure}
-by setting @code{CPPFLAGS} and @code{LDFLAGS}.  Here is an example:
+If you have installed the @code{gmp} library and its header files in
+some place where the compiler cannot find it by default, you must help
+@code{configure} and specify the prefix that was used when @code{gmp}
+was configured. Here is an example:
 
 @example
-$ CFLAGS="-O2" CXXFLAGS="-O2" CPPFLAGS="-I/opt/gmp/include" \
-  LDFLAGS="-L/opt/gmp/lib" ./configure --with-gmp
+$ ./configure --with-gmp=/opt/gmp-4.2.2
 @end example
 
-If you do not want CLN to make use of a preinstalled @code{gmp}
-library, then you can explicitly specify so by calling
-@code{configure} with the option @samp{--without-gmp}.
+This assumes that the @code{gmp} header files have been installed in
+@file{/opt/gmp-4.2.2/include/} and the library in
+@file{/opt/gmp-4.2.2/lib/}. More uncommon GMP installations can be
+handled by setting CPPFLAGS and LDFLAGS appropriately prior to running
+@code{configure}.
 
 
 @node Installing the library
@@ -931,7 +940,7 @@ objects of type @code{cl_I}, it should @code{#include <cln/integer.h>}.
 * Functions on floating-point numbers::  
 * Conversion functions::        
 * Random number generators::    
-* Obfuscating operators::       
+* Modifying operators::       
 @end menu
 
 @node Constructing numbers
@@ -2220,7 +2229,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)}!
@@ -2501,22 +2510,13 @@ if @code{n} is a float.
 @end table
 
 
-@node Obfuscating operators
-@section Obfuscating operators
+@node Modifying operators
+@section Modifying operators
 @cindex modifying operators
 
 The modifying C/C++ operators @code{+=}, @code{-=}, @code{*=}, @code{/=},
 @code{&=}, @code{|=}, @code{^=}, @code{<<=}, @code{>>=}
-are not available by default because their
-use tends to make programs unreadable. It is trivial to get away without
-them. However, if you feel that you absolutely need these operators
-to get happy, then add
-@example
-#define WANT_OBFUSCATING_OPERATORS
-@end example
-@cindex @code{WANT_OBFUSCATING_OPERATORS}
-to the beginning of your source files, before the inclusion of any CLN
-include files. This flag will enable the following operators:
+are all available.
 
 For the classes @code{cl_N}, @code{cl_R}, @code{cl_RA},
 @code{cl_F}, @code{cl_SF}, @code{cl_FF}, @code{cl_DF}, @code{cl_LF}:
@@ -2569,7 +2569,7 @@ The prefix operator @code{--x}.
 The postfix operator @code{x--}.
 @end table
 
-Note that by using these obfuscating operators, you wouldn't gain efficiency:
+Note that by using these modifying operators, you don't gain efficiency:
 In CLN @samp{x += y;} is exactly the same as  @samp{x = x+y;}, not more
 efficient.