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.
$\mathrm{with}\left(\mathrm{numtheory}\right)\:$
$\mathrm{cfracpol}\left({x}^{4}{x}^{3}4{x}^{2}+4x+1\,20\right)$
$\left[{\mathrm{2}}{\,}{22}{\,}{1}{\,}{7}{\,}{2}{\,}{1}{\,}{1}{\,}{2}{\,}{1}{\,}{2}{\,}{1}{\,}{17}{\,}{4}{\,}{4}{\,}{1}{\,}{1}{\,}{4}{\,}{2}{\,}{18}{\,}{1}{\,}{10}{\,}{\mathrm{...}}\right]{,}\left[{\mathrm{1}}{\,}{1}{\,}{3}{\,}{1}{\,}{3}{\,}{1}{\,}{1}{\,}{1}{\,}{1}{\,}{1}{\,}{1}{\,}{4}{\,}{1}{\,}{1}{\,}{1}{\,}{4}{\,}{1}{\,}{2}{\,}{4}{\,}{5}{\,}{18}{\,}{\mathrm{...}}\right]{,}\left[{1}{\,}{2}{\,}{1}{\,}{21}{\,}{1}{\,}{7}{\,}{2}{\,}{1}{\,}{1}{\,}{2}{\,}{1}{\,}{2}{\,}{1}{\,}{17}{\,}{4}{\,}{4}{\,}{1}{\,}{1}{\,}{4}{\,}{2}{\,}{18}{\,}{\mathrm{...}}\right]{,}\left[{1}{\,}{1}{\,}{4}{\,}{1}{\,}{3}{\,}{1}{\,}{1}{\,}{1}{\,}{1}{\,}{1}{\,}{1}{\,}{4}{\,}{1}{\,}{1}{\,}{1}{\,}{4}{\,}{1}{\,}{2}{\,}{4}{\,}{5}{\,}{18}{\,}{\mathrm{...}}\right]$
$\mathrm{cfracpol}\left({x}^{6}{x}^{5}6{x}^{4}+6{x}^{3}+8{x}^{2}8x+1\right)$
$\left[{\mathrm{2}}{\,}{44}{\,}{1}{\,}{3}{\,}{3}{\,}{1}{\,}{1}{\,}{1}{\,}{3}{\,}{2}{\,}{3}{\,}{\mathrm{...}}\right]{,}\left[{\mathrm{2}}{\,}{1}{\,}{1}{\,}{6}{\,}{1}{\,}{7}{\,}{34}{\,}{1}{\,}{12}{\,}{1}{\,}{5}{\,}{\mathrm{...}}\right]{,}\left[{0}{\,}{6}{\,}{1}{\,}{2}{\,}{4}{\,}{3}{\,}{1}{\,}{1}{\,}{3}{\,}{1}{\,}{63}{\,}{\mathrm{...}}\right]{,}\left[{0}{\,}{1}{\,}{2}{\,}{1}{\,}{2}{\,}{2}{\,}{16}{\,}{1}{\,}{1}{\,}{5}{\,}{11}{\,}{\mathrm{...}}\right]{,}\left[{1}{\,}{1}{\,}{1}{\,}{1}{\,}{7}{\,}{6}{\,}{10}{\,}{2}{\,}{29}{\,}{20}{\,}{1}{\,}{\mathrm{...}}\right]{,}\left[{1}{\,}{1}{\,}{10}{\,}{3}{\,}{1}{\,}{13}{\,}{1}{\,}{1}{\,}{3}{\,}{1}{\,}{4}{\,}{\mathrm{...}}\right]$
$a\u2254117260219{x}^{6}+139540883{x}^{5}+17033080{x}^{4}+800302{x}^{3}+18628{x}^{2}+216x+1\:$
$\mathrm{cfracpol}\left(a\right)$
$\left[{\mathrm{1}}{\,}{1}{\,}{41}{\,}{7}{\,}{1}{\,}{7}{\,}{34}{\,}{1}{\,}{12}{\,}{1}{\,}{5}{\,}{\mathrm{...}}\right]{,}\left[{\mathrm{1}}{\,}{1}{\,}{42}{\,}{1}{\,}{1}{\,}{6}{\,}{1}{\,}{2}{\,}{4}{\,}{3}{\,}{1}{\,}{\mathrm{...}}\right]{,}\left[{\mathrm{1}}{\,}{1}{\,}{42}{\,}{1}{\,}{1}{\,}{1}{\,}{2}{\,}{1}{\,}{2}{\,}{2}{\,}{16}{\,}{\mathrm{...}}\right]{,}\left[{\mathrm{1}}{\,}{1}{\,}{42}{\,}{1}{\,}{2}{\,}{1}{\,}{1}{\,}{1}{\,}{7}{\,}{6}{\,}{10}{\,}{\mathrm{...}}\right]{,}\left[{\mathrm{1}}{\,}{1}{\,}{42}{\,}{1}{\,}{2}{\,}{1}{\,}{10}{\,}{3}{\,}{1}{\,}{13}{\,}{1}{\,}{\mathrm{...}}\right]{,}\left[{1}{\,}{3}{\,}{3}{\,}{1}{\,}{1}{\,}{1}{\,}{3}{\,}{2}{\,}{3}{\,}{4}{\,}{1}{\,}{\mathrm{...}}\right]$
$\mathrm{cfracpol}\left(\left(232x+543\right)\left({x}^{6}{x}^{5}6{x}^{4}+6{x}^{3}+8{x}^{2}8x+1\right)\,10\right)$
$\left[{\mathrm{3}}{\,}{1}{\,}{1}{\,}{1}{\,}{14}{\,}{1}{\,}{4}\right]{,}\left[{\mathrm{2}}{\,}{44}{\,}{1}{\,}{3}{\,}{3}{\,}{1}{\,}{1}{\,}{1}{\,}{3}{\,}{2}{\,}{3}{\,}{\mathrm{...}}\right]{,}\left[{\mathrm{2}}{\,}{1}{\,}{1}{\,}{6}{\,}{1}{\,}{7}{\,}{34}{\,}{1}{\,}{12}{\,}{1}{\,}{5}{\,}{\mathrm{...}}\right]{,}\left[{0}{\,}{6}{\,}{1}{\,}{2}{\,}{4}{\,}{3}{\,}{1}{\,}{1}{\,}{3}{\,}{1}{\,}{63}{\,}{\mathrm{...}}\right]{,}\left[{0}{\,}{1}{\,}{2}{\,}{1}{\,}{2}{\,}{2}{\,}{16}{\,}{1}{\,}{1}{\,}{5}{\,}{11}{\,}{\mathrm{...}}\right]{,}\left[{1}{\,}{1}{\,}{1}{\,}{1}{\,}{7}{\,}{6}{\,}{10}{\,}{2}{\,}{29}{\,}{20}{\,}{1}{\,}{\mathrm{...}}\right]{,}\left[{1}{\,}{1}{\,}{10}{\,}{3}{\,}{1}{\,}{13}{\,}{1}{\,}{1}{\,}{3}{\,}{1}{\,}{4}{\,}{\mathrm{...}}\right]$
$\mathrm{cfracpol}\left({x}^{6}3{x}^{5}+5{x}^{3}3x+1\right)$
See Also
convert/confrac
NumberTheory[ContinuedFractionPolynomial]
numtheory(deprecated)[cfrac]
numtheory(deprecated)[nthconver]
Download Help Document
What kind of issue would you like to report? (Optional)