~ubuntu-branches/debian/squeeze/maxima/squeeze

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
@menu
* Functions and Variables for ggf::
@end menu

@node Functions and Variables for ggf,  , ggf, ggf
@section Functions and Variables for ggf

@defvr {Option variable} GGFINFINITY
Default value: 3

This is an option variable for function @code{ggf}.

When computing the continued fraction of the
generating function, a partial quotient having a degree
(strictly) greater than @var{GGFINFINITY} will be discarded and
the current convergent will be considered as the exact value
of the generating function; most often the degree of all
partial quotients will be 0 or 1; if you use a greater value,
then you should give enough terms in order to make the
computation accurate enough.


See also @code{ggf}.

@opencatbox
@category{Package ggf}
@closecatbox

@end defvr


@defvr {Option variable} GGFCFMAX
Default value: 3

This is an option variable for function @code{ggf}.

When computing the continued fraction of the
generating function, if no good result has been found (see
the @var{GGFINFINITY} flag) after having computed @var{GGFCFMAX} partial
quotients, the generating function will be considered as
not being a fraction of two polynomials and the function will
exit. Put freely a greater value for more complicated
generating functions.

See also @code{ggf}.

@opencatbox
@category{Package ggf}
@closecatbox

@end defvr

@deffn {Function} ggf (@var{l})
Compute the generating function (if it is a fraction of two
polynomials) of a sequence, its first terms being given. @var{l}
is a list of numbers.

The solution is returned as a fraction of two polynomials.
If no solution has been found, it returns with @code{done}.

This function is controlled by global variables @var{GGFINFINITY} and @var{GGFCFMAX}. See also @var{GGFINFINITY} and @var{GGFCFMAX}.

To use this function write first @code{load("ggf")}.

@opencatbox
@category{Generating functions} @category{Share packages} @category{Package ggf}
@closecatbox

@end deffn