home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / progs / pari / pari_137 / tex / appd.tex < prev    next >
Encoding:
Text File  |  1992-05-20  |  2.1 KB  |  51 lines

  1. \title{Appendix D : Summary of available Constants}
  2.  
  3. In this appendix we give the list of predefined constants available in the
  4. PARI library. 
  5.  
  6. {\obeylines\parskip=0pt plus 1pt
  7. \hbox{}
  8. {\bf gzero (zero)} see 4.1.1.
  9. {\bf gun (un)} see 4.1.1.
  10. {\bf gdeux (deux)} see 4.1.1.
  11. {\bf ghalf (lhalf)} see 4.1.1.
  12. {\bf gi} see 4.1.1.
  13. {\bf polun[] (lpolun[])} see 4.1.1.
  14. {\bf polx[] (lpolx[])} see 4.1.1.}
  15.  
  16. {\bf geuler}. This is Euler's constant, and is in the heap, {\it not\/}
  17. in the PARI stack. It is not initialized, and if you want to use it you must
  18. call {\bf consteuler}(prec) ( see 3.3.18.).
  19.  
  20. {\bf gpi}. This is the number pi, and is in the heap, {\it not\/}
  21. in the PARI stack. It is not initialized, and if you want to use it you must
  22. call {\bf constpi}(prec) (see 3.3.27.).
  23.  
  24. {\bf bern}(i). This is the $2i$-th Bernoulli number ($B_0=1$, $B_2=1/6$,
  25. $B_4=-1/30$, etc\dots) The Bernoulli numbers are
  26. in the heap and {\it not\/} in the PARI stack, and are not initialized.
  27. To initialize them you must use the function {\bf mpbern} which has the following
  28. syntax:
  29.  
  30. {\tt void mpbern(long n, long prec);}
  31.  
  32. The effect of this function is to create the even numbered bernoulli numbers up
  33. to $B_{2n-2}$ {\bf as real numbers} of precision prec. They can then be used with
  34. the macro {\bf bern}(i). Note that this is not a function but simply an abbreviation,
  35. hence care must be taken that i is inside the right bounds (i.e. $0\le i\le n-1$)
  36. before using it, since no checking is done in PARI itself.
  37.  
  38. Finally, one has access to a table of (differences of) primes through the
  39. pointer {\bf diffptr}. This is used as follows: after {\tt init} has been
  40. called, this table is initialized with the differences of primes up to $500000$
  41. (default which can trivially be changed by calling {\tt init} with different
  42. arguments, see 4.1.1). Then one declares {\tt byteptr d=diffptr;}, where d is
  43. the name of the pointer that one uses. This will point to the first difference
  44. in the table, i.e. 2. To get to the next difference, just do {\tt d++}.
  45.  
  46. In addition, some single or double-precision real numbers are predefined,
  47. and their list is in the file {\tt gencom.h}
  48.  
  49.  
  50. \vfill\eject
  51.