numtheory(deprecated)
cfracpol
compute simple continued fraction expansions for all real roots of a rational polynomial
Calling Sequence
Parameters
Description
Examples
cfracpol(pol, n)
cfracpol(pol)
pol
-
rational polynomial
n
integer (n + 1 is the number of partial quotients)
Important: The numtheory package has been deprecated. Use the superseding command NumberTheory[ContinuedFractionPolynomial] instead.
The cfracpol function returns simple continued fraction expansions of all real roots of a rational polynomial pol. Each expansion is given in list form with at most n+1 quotients. If the second argument n is not present, it defaults to 10.
The command with(numtheory,cfracpol) allows the use of the abbreviated form of this command.
with⁡numtheory:
cfracpol⁡x4−x3−4⁢x2+4⁢x+1,20
−2,22,1,7,2,1,1,2,1,2,1,17,4,4,1,1,4,2,18,1,10,...,−1,1,3,1,3,1,1,1,1,1,1,4,1,1,1,4,1,2,4,5,18,...,1,2,1,21,1,7,2,1,1,2,1,2,1,17,4,4,1,1,4,2,18,...,1,1,4,1,3,1,1,1,1,1,1,4,1,1,1,4,1,2,4,5,18,...
cfracpol⁡x6−x5−6⁢x4+6⁢x3+8⁢x2−8⁢x+1
−2,44,1,3,3,1,1,1,3,2,3,...,−2,1,1,6,1,7,34,1,12,1,5,...,0,6,1,2,4,3,1,1,3,1,63,...,0,1,2,1,2,2,16,1,1,5,11,...,1,1,1,1,7,6,10,2,29,20,1,...,1,1,10,3,1,13,1,1,3,1,4,...
a≔−117260219⁢x6+139540883⁢x5+17033080⁢x4+800302⁢x3+18628⁢x2+216⁢x+1:
cfracpol⁡a
−1,1,41,7,1,7,34,1,12,1,5,...,−1,1,42,1,1,6,1,2,4,3,1,...,−1,1,42,1,1,1,2,1,2,2,16,...,−1,1,42,1,2,1,1,1,7,6,10,...,−1,1,42,1,2,1,10,3,1,13,1,...,1,3,3,1,1,1,3,2,3,4,1,...
cfracpol⁡232⁢x+543⁢x6−x5−6⁢x4+6⁢x3+8⁢x2−8⁢x+1,10
−3,1,1,1,14,1,4,−2,44,1,3,3,1,1,1,3,2,3,...,−2,1,1,6,1,7,34,1,12,1,5,...,0,6,1,2,4,3,1,1,3,1,63,...,0,1,2,1,2,2,16,1,1,5,11,...,1,1,1,1,7,6,10,2,29,20,1,...,1,1,10,3,1,13,1,1,3,1,4,...
cfracpol⁡x6−3⁢x5+5⁢x3−3⁢x+1
See Also
convert/confrac
NumberTheory[ContinuedFractionPolynomial]
numtheory(deprecated)[cfrac]
numtheory(deprecated)[nthconver]
Download Help Document