dfc takes as argument a real or a rational or a
floating point number a and an integer n
(or a real epsilon).
dfc returns the list of the continued fraction representation
of a of order n (or with precision epsilon i.e.
the continued fraction representation which
approximates a or evalf(a) with precision
epsilon, by default epsilon is the value of the epsilon
defined in the cas configuration with the menu
Cfg▸Cas Configuration).
convert with the option confrac has a similar
functionality: in that case
the value of epsilon is the value of the epsilon
defined in the cas configuration with the menu
Cfg▸Cas Configuration (see
5.21.24)
and the answer may be stored in an optional third argument.
Remarks
If dfc(a)=[a0,a1,a2,[b0,b1]] that means :
a=a0+ |
|
If dfc(a)=[a0,a1,a2,r] that means :
a=a0+ |
|
Input :
Output :
Input :
or :
Output :
Input :
Output (if in the cas configuration epsilon=1e-9) :
and [1,2,2,2,2,2,2,2,2,2,2,2,2] is stored in dev.
Input :
Output :
Input to verify:
Output :
Input :
Output (if in the cas configuration epsilon=1e-9) :
and [1,2,3,4,5,6,7] is stored in l
Input :
Output :
Input :
Output (if floats are hardware floats, e.g. for Digits=12) :
Input :
or :
or (if in the cas configuration epsilon=1e-9) :
Output :