home *** CD-ROM | disk | FTP | other *** search
- \title{Appendix D : Summary of available Constants}
-
- In this appendix we give the list of predefined constants available in the
- PARI library.
-
- {\obeylines\parskip=0pt plus 1pt
- \hbox{}
- {\bf gzero (zero)} see 4.1.1.
- {\bf gun (un)} see 4.1.1.
- {\bf gdeux (deux)} see 4.1.1.
- {\bf ghalf (lhalf)} see 4.1.1.
- {\bf gi} see 4.1.1.
- {\bf polun[] (lpolun[])} see 4.1.1.
- {\bf polx[] (lpolx[])} see 4.1.1.}
-
- {\bf geuler}. This is Euler's constant, and is in the heap, {\it not\/}
- in the PARI stack. It is not initialized, and if you want to use it you must
- call {\bf consteuler}(prec) ( see 3.3.18.).
-
- {\bf gpi}. This is the number pi, and is in the heap, {\it not\/}
- in the PARI stack. It is not initialized, and if you want to use it you must
- call {\bf constpi}(prec) (see 3.3.27.).
-
- {\bf bern}(i). This is the $2i$-th Bernoulli number ($B_0=1$, $B_2=1/6$,
- $B_4=-1/30$, etc\dots) The Bernoulli numbers are
- in the heap and {\it not\/} in the PARI stack, and are not initialized.
- To initialize them you must use the function {\bf mpbern} which has the following
- syntax:
-
- {\tt void mpbern(long n, long prec);}
-
- The effect of this function is to create the even numbered bernoulli numbers up
- to $B_{2n-2}$ {\bf as real numbers} of precision prec. They can then be used with
- the macro {\bf bern}(i). Note that this is not a function but simply an abbreviation,
- hence care must be taken that i is inside the right bounds (i.e. $0\le i\le n-1$)
- before using it, since no checking is done in PARI itself.
-
- Finally, one has access to a table of (differences of) primes through the
- pointer {\bf diffptr}. This is used as follows: after {\tt init} has been
- called, this table is initialized with the differences of primes up to $500000$
- (default which can trivially be changed by calling {\tt init} with different
- arguments, see 4.1.1). Then one declares {\tt byteptr d=diffptr;}, where d is
- the name of the pointer that one uses. This will point to the first difference
- in the table, i.e. 2. To get to the next difference, just do {\tt d++}.
-
- In addition, some single or double-precision real numbers are predefined,
- and their list is in the file {\tt gencom.h}
-
-
- \vfill\eject
-