numtheory(deprecated)
invcfrac
convert a simple periodical continued fraction expansion to a quadratic surd
Calling Sequence
Parameters
Description
Examples
invcfrac(cf)
cf
-
simple periodical continued fraction expansion with its pre-period and period (in either list or fraction form)
Important: The numtheory package has been deprecated. Use the superseding command NumberTheory[ContinuedFraction][Value] instead.
The invcfrac function returns a quadratic surd which has a simple periodical continued fraction expansion cf.
This function is part of the numtheory package, and so can be used in the form invcfrac(..) only after performing the command with(numtheory). The function can always be accessed in the long form numtheory[invcfrac](..).
with⁡numtheory:
f≔cfrac⁡3112,periodic
f≔5+11+11+13+15+13+11+11+110+11+11+13+15+13+11+11+110+...
invcfrac⁡f
31
g≔cfrac⁡35+2912,periodic,quotients
g≔5,1,66,2,2,5,10,1,1,2,2,3,2,1,1,1,268,1,1,1,2,3,2,2,1,1,10,5,2,2,66,1,9,1,3,1,1,1,8,1,1,1,3,1,9
invcfrac⁡g
35+29
See Also
NumberTheory[ContinuedFraction][Value]
numtheory(deprecated)[cfrac]
numtheory(deprecated)[nthconver]
Download Help Document