Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Cfexpand Calculator

Cfexpand

Function: cfexpand (<x>) Returns a matrix of the numerators and denominators of the last (column 1) and next-to-last (column 2) convergents of the continued fraction <x>.

          (%i1) cf (rat (ev (%pi, numer)));

rat replaced 3.141592653589793 by 103993/33102 =3.141592653011902

          (%o1)                  [3, 7, 15, 1, 292]
          (%i2) cfexpand (%);
                                   [ 103993  355 ]
          (%o2)                    [             ]
                                   [ 33102   113 ]
          (%i3) %[1,1]/%[2,1], numer;
          (%o3)                   3.141592653011902

(%o1)                                true
(%i2) 

Cfexpand Example

Related Examples

cfexpand-cflength-flength-sqrt

cflength: 5;

cfexpand(cf(sqrt(2)));

Calculate

cfexpand-cflength-flength-sqrt

cflength: 10;

cfexpand(cf(sqrt(2)));

Calculate

cfexpand-cflength-flength-sqrt

cflength: 7;

cfexpand(cf(sqrt(2)));

Calculate

cfexpand-cflength-flength-sqrt

cflength: 5;

cfexpand(cf(sqrt(2)));

Calculate

cfexpand-cflength-flength-sqrt

cflength: 8;

cfexpand(cf(sqrt(2)));

Calculate

cfexpand-sqrt

cfexpand(cf(sqrt(2)));

Calculate

cfexpand-cflength-flength-sqrt

cflength: 5;

cfexpand(cf(sqrt(2)));

Calculate

cfexpand-cflength-flength-sqrt

cflength: 8;

cfexpand(cf(sqrt(2)));

Calculate