Continuo da qui, copio dal Reference Manual, PDF scaricabile da qui, sono a p.513.

**Funzioni e variabili**

`bern (n)`

Returns the ** n**’th Bernoulli number for integer

**. Bernoulli numbers equal to zero are**

`n`

suppressed if

**is**

`zerobern`

**.**

`false`

`(%i1) `**zerobern: true$**
(%i2) **map (bern, [0, 1, 2, 3, 4, 5, 6, 7, 8]);**
1 1 1 1 1
(%o2) [1, - -, -, 0, - --, 0, --, 0, - --]
2 6 30 42 30
(%i3) **zerobern: false$**
(%i4) **map (bern, [0, 1, 2, 3, 4, 5, 6, 7, 8]);**
1 1 1 1 1 5 691 7
(%o4) [1, - -, -, - --, --, - --, --, - ----, -]
2 6 30 42 30 66 2730 6

`bernpoly (x, n)`

Returns the ** n**’th Bernoulli polynomial in the variable

**.**

`x`

`bfzeta (s, n)`

Returns the Riemann zeta function for the argument ** s**. The return value is a big float (bfloat);

**is the number of digits in the return value.**

`n`

`bfhzeta (s, h, n)`

Returns the Hurwitz zeta function for the arguments ** s** and

**. The return value is a big float (bfloat);**

`h`

**is the number of digits in the return value.**

`n`

The Hurwitz zeta function is defined as

** load ("bffac")** loads this function.

`burn (n)`

Returns a rational number, which is an approximation of the ** n**’th Bernoulli number for integer

**.**

`n`

**exploits the observation that (rational) Bernoulli numbers can be approximated by (transcendental) zetas with tolerable efficiency:**

`burn`

** n - 1 1 - 2 n
(- 1) 2 zeta(2 n) (2 n)!
B(2 n) = ------------------------------------
2 n
%pi**

** burn** may be more efficient than bern for large, isolated

**as**

`n`

**computes all the Bernoulli numbers up to index**

`bern`

**before returning.**

`n`

**invokes the approximation for even integers**

`burn`

**. For odd integers and**

`n > 255`

**the function bern is called.**

`n <= 255`

** load ("bffac")** loads this function. See also

**.**

`bern`

`chinese ([r_1, ..., r_n], [m_1, ..., m_n])`

Chinese remainder theorem.

Solves the system of congruences ** x = r_1 mod m_1, ..., x = r_n mod m_n**. The remainders

**may be arbitrary integers while the moduli**

`r_n`

**have to be positive and pairwise coprime integers.**

`m_n`

`(%i5) `**mods : [1000, 1001, 1003, 1007];**
(%o5) [1000, 1001, 1003, 1007]
(%i6) **lreduce('gcd, mods);**
(%o6) 1
(%i7) **x : random(apply("*", mods));**
(%o7) 685124877004
(%i8) **rems : map(lambda([z], mod(x, z)), mods);**
(%o8) [4, 568, 54, 624]
(%i9) **chinese(rems, mods);**
(%o9) 685124877004
(%i10) **chinese([1, 2], [3, n]);**
(%o10) chinese([1, 2], [3, n])
(%i11) **%, n = 4;**
(%o11) 10

`cf (expr)`

Computes a continued fraction approximation. ** expr** is an expression comprising continued fractions, square roots of integers, and literal real numbers (integers, rational numbers, ordinary floats, and bigfloats).

**computes exact expansions for rational numbers, but expansions are truncated at**

`cf`

**for ordinary floats and**

`ratepsilon`

**for bigfloats.**

`10^(-fpprec)`

Operands in the expression may be combined with arithmetic operators. Maxima does not know about operations on continued fractions outside of ** cf**.

** cf** evaluates its arguments after binding

**to**

`listarith`

**.**

`false`

**returns a continued fraction, represented as a list.**

`cf`

A continued fraction ** a + 1/(b + 1/(c + ...)**) is represented by the list

**. The list elements**

`[a, b, c, ...]`

**must evaluate to integers.**

`a, b, c, ...`

**may also contain**

`expr`

**where**

`sqrt (n)`

**is an integer. In this case**

`n`

**will give as many terms of the continued fraction as the value of the variable**

`cf`

**times the period.**

`cflength`

A continued fraction can be evaluated to a number by evaluating the arithmetic representation returned by ** cfdisrep**. See also

**for another way to evaluate a continued fraction.**

`cfexpand`

See also ** cfdisrep**,

**, and**

`cfexpand`

**.**

`cflength`

* Nota*: non riesco a riprodurre gli esempi della Reference, ottengo errori sulle radici p.es: “

*cf: argument of sqrt must be an integer; found [0, 11] — an error. To debug this try: debugmode(true);*“. Modifico gli esempi, semplicandoli.

** expr** is an expression comprising continued fractions.

`(%i1) `**cf ([5, 3, 1]*[11, 9, 7]);**
(%o1) [58, 3, 11, 1, 6]
(%i2) **cf ((3/17)*[1, -2, 5] + (8/13));**
(%o2) [0, 1, 2, 3, 1, 3, 6, 2]

** cflength** controls how many periods of the continued fraction are computed for algebraic, irrational numbers.

`(%i3) `**cflength: 1$**
(%i4) **cf ((1 + sqrt(5))/2);**
(%o4) [1, 1, 1, 1, 2]
(%i5) **cflength: 2$**
(%i6) **cf ((1 + sqrt(5))/2);**
(%o6) [1, 1, 1, 1, 1, 1, 1, 2]
(%i7) **cflength: 3$**
(%i8) **cf ((1 + sqrt(5))/2);**
(%o8) [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]

A continued fraction can be evaluated by evaluating the arithmetic representation returned by ** cfdisrep**.

`(%i9) `**cflength: 3$**
(%i10) **cfdisrep (cf (sqrt (3)))$**
(%i11) **ev (%, numer);**
(%o11) 1.73170731707317

Maxima does not know about operations on continued fractions outside of ** cf**.

`(%i12) `**cf ([1,1,1,1,1,2] * 3);**
(%o12) [4, 1, 5, 2]
(%i13) **cf ([1,1,1,1,1,2]) * 3;**
(%o13) [3, 3, 3, 3, 3, 6]

⭕