[BACK]Return to EXPLAIN CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / pari / examples

Annotation of OpenXM_contrib/pari/examples/EXPLAIN, Revision 1.1.1.1

1.1       maekawa     1: This directory contains:
                      2:
                      3: * the C program mattrans.c using the Pari library described in Chapter 4 of
                      4: the users' manual. A generic Makefile (adapted to your system by Configure)
                      5: for PARI programs is included.
                      6:
                      7: * Inputrc: an example of .inputrc file for the readline library.
                      8:
                      9: * Several examples of complete and non-trivial GP programs. The rest of this
                     10: file gives a brief description of these programs. They should be read into GP
                     11: by the command \r file.
                     12:
                     13: 1) bench.gp: This program computes the first 1000 terms of the Fibonacci
                     14: sequence, the product p of successive terms, and the lowest common multiple
                     15: q. It outputs the ratio log(p)/log(q) every 50 terms (this ratio tends to
                     16: pi^2/6 as k tends to infinity). The name bench.gp comes from the fact that
                     17: this program is one (among many) examples where GP/PARI performs orders of
                     18: magnitude faster than systems such as Maple or Mathematica (try it!).
                     19:
                     20: 2) cl.gp: Written entirely in the GP language without using bnfclassunit, the
                     21: programs included in this file allows you in many cases to compute the class
                     22: number, the structure of the class group and a system of fundamental units of
                     23: a general number field (they sometimes fail to give an answer). It can work
                     24: only if nfinit finds a power basis. Evidently it is much less powerful and
                     25: much slower than bnfinit, but it is given as an example of a sophisticated
                     26: use of GP.  The first thing to do is to call the function clareg(pol,
                     27: {limp},{lima},{extra}) where pol is the monic irreducible polynomial defining
                     28: the number field, limp is the prime factor base limit (try values between 19
                     29: and 113), lima is another search limit (try 50 or 100) and extra is the
                     30: number of desired extra relations (try 2 to 10). Default values are provided,
                     31: so that you need only supply pol.
                     32:
                     33:   The program prints the number of relations that it needs, and tries to find
                     34: them. If you see that clearly it slows down too much before succeeding, abort
                     35: and try other values. If it succeeds, it will print the class number, class
                     36: group, regulator. These are tentative values. Then use the function
                     37: check(lim) (lim=200 is the default value) to check if the value is consistent
                     38: with the value of the L-series (the value returned by check should be close
                     39: to 1). Finally, the function fu() (no parameters) returns a family of units
                     40: which generates the unit group (you must extract a system of fundamental
                     41: units yourself).
                     42:
                     43: 3) classno.gp: A very simple function to compute analytically the class
                     44: number of imaginary quadratic fields (written by Fernando Rodriguez Villegas)
                     45:
                     46: 4) lucas.gp: The function lucas(p) defined in this file performs the
                     47: Lucas-Lehmer primality test on the Mersenne number 2^p-1. If the result is
                     48: 1, the Mersenne number is prime, otherwise not.
                     49:
                     50: 5) rho.gp: A simple implementation of Pollard's rho method. The function
                     51: rho(n) outputs the complete factorization of n in the same format as factor.
                     52:
                     53: 6) squfof.gp: This defines a function squfof of a positive integer variable
                     54: n, which may allow you to factor the number n. SQUFOF is a very nice
                     55: factoring method invented in the 70's by D. Shanks for factoring integers,
                     56: and is reasonably fast for numbers having up to 15 or 16 digits. The squfof
                     57: program which is given is a very crude implementation. It also prints out
                     58: some intermediate information as it goes along. The final result is some
                     59: factor of the number to be factored.
                     60:
                     61: 7) taylor.gp: Given a user function f (e.g defined by f(x) = sin(x)), defines
                     62: a function plot_taylor(xmin,xmax, ordlim, first,step) plots f together with
                     63: its Taylor polynomials T_i (truncated series expansion of order i) in the
                     64: interval [xmin,xmax]; i goes from first to ordlim in increments of steps.
                     65: Sensible default values are provided for all arguments (written by Ilya
                     66: Zakharevich)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>