]> www.ginac.de Git - cln.git/blobdiff - doc/cln.tex
Make out of the box build on x86_64 system with complete 32 bit
[cln.git] / doc / cln.tex
index 63bdd0871eea9941a1a110260cf6ffef0d84b9da..146f81b52d23b3922fda2437da965a1e1468b0f1 100644 (file)
@@ -34,7 +34,7 @@ This file 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.
+Copyright (C)  Bruno Haible 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004.
 Copyright (C)  Richard B. Kreckel 2000, 2001, 2002, 2003, 2004.
 
 Permission is granted to make and distribute verbatim copies of
@@ -69,9 +69,9 @@ by the author.
 @author by Bruno Haible
 @page
 @vskip 0pt plus 1filll
-Copyright @copyright{} Bruno Haible 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002.
+Copyright @copyright{} Bruno Haible 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004.
 @sp 0
-Copyright @copyright{} Richard Kreckel 2000, 2001, 2002.
+Copyright @copyright{} Richard Kreckel 2000, 2001, 2002, 2003, 2004.
 
 @sp 2
 Published by Bruno Haible, @code{<haible@@clisp.cons.org>} and
@@ -95,6 +95,10 @@ by the author.
 @page
 
 
+@c Table of contents
+@contents
+
+
 @node Top, Introduction, (dir), (dir)
 
 @c @menu
@@ -210,8 +214,8 @@ Sch{@"o}nhage-Strassen
 @cindex Sch{@"o}nhage-Strassen multiplication
 @end iftex
 @ifinfo
-Schönhage-Strassen
-@cindex Schönhage-Strassen multiplication
+Schnhage-Strassen
+@cindex Schnhage-Strassen multiplication
 @end ifinfo
 multiplication, which is an asymptotically optimal multiplication
 algorithm, for multiplication, division and radix conversion.
@@ -771,6 +775,7 @@ 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} and @samp{The} macros.
+@cindex cast
 @cindex @code{As()()}
 @code{As(@var{type})(@var{value})} checks that @var{value} belongs to
 @var{type} and returns it as such.
@@ -2000,6 +2005,29 @@ normalized to be >= 0.
 @code{a} must be > 0. @code{b} must be >0 and != 1. If log(a,b) is
 rational number, this function returns true and sets *l = log(a,b), else
 it returns false.
+
+@item int jacobi (sint32 a, sint32 b)
+@cindex @code{jacobi()}
+@itemx int jacobi (const cl_I& a, const cl_I& b)
+Returns the Jacobi symbol 
+@tex 
+$\left({a\over b}\right)$,
+@end tex
+@ifnottex 
+(a/b),
+@end ifnottex
+@code{a,b} must be integers, @code{b>0} and odd. The result is 0
+iff gcd(a,b)>1.
+
+@item cl_boolean isprobprime (const cl_I& n)
+@cindex prime
+@cindex @code{isprobprime()}
+Returns true if @code{n} is a small prime or passes the Miller-Rabin 
+primality test. The probability of a false positive is 1:10^30.
+
+@item cl_I nextprobprime (const cl_R& x)
+@cindex @code{nextprobprime()}
+Returns the smallest probable prime >=@code{x}.
 @end table
 
 
@@ -3335,8 +3363,8 @@ Sch{@"o}nhage-Strassen
 @cindex Sch{@"o}nhage-Strassen multiplication
 @end iftex
 @ifinfo
-Schönhage-Strassen
-@cindex Schönhage-Strassen multiplication
+Schnhage-Strassen
+@cindex Schnhage-Strassen multiplication
 @end ifinfo
 multiplication, which is an asymptotically optimal multiplication 
 algorithm.
@@ -3805,8 +3833,4 @@ global variables.
 @printindex my
 
 
-@c Table of contents
-@contents
-
-
 @bye