 numtheory(deprecated)/invcfrac - Maple Help

numtheory(deprecated)

 invcfrac
 convert a simple periodical continued fraction expansion to a quadratic surd Calling Sequence invcfrac(cf) Parameters

 cf - simple periodical continued fraction expansion with its pre-period and period (in either list or fraction form) Description

 • 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](..). Examples

Important: The numtheory package has been deprecated.  Use the superseding command NumberTheory[ContinuedFraction][Value] instead.

 > $\mathrm{with}\left(\mathrm{numtheory}\right):$
 > $f≔\mathrm{cfrac}\left({31}^{\frac{1}{2}},\mathrm{periodic}\right)$
 ${f}{≔}{5}{+}\frac{{1}}{{1}{+}\frac{{1}}{{1}{+}\frac{{1}}{{3}{+}\frac{{1}}{{5}{+}\frac{{1}}{{3}{+}\frac{{1}}{{1}{+}\frac{{1}}{{1}{+}\frac{{1}}{{10}{+}\frac{{1}}{{1}{+}\frac{{1}}{{1}{+}\frac{{1}}{{3}{+}\frac{{1}}{{5}{+}\frac{{1}}{{3}{+}\frac{{1}}{{1}{+}\frac{{1}}{{1}{+}\frac{{1}}{{10}{+}{\mathrm{...}}}}}}}}}}}}}}}}}}$ (1)
 > $\mathrm{invcfrac}\left(f\right)$
 $\sqrt{{31}}$ (2)
 > $g≔\mathrm{cfrac}\left(\frac{3}{5}+{29}^{\frac{1}{2}},\mathrm{periodic},\mathrm{quotients}\right)$
 ${g}{≔}\left[\left[{5}\right]{,}\left[{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}\right]\right]$ (3)
 > $\mathrm{invcfrac}\left(g\right)$
 $\frac{{3}}{{5}}{+}\sqrt{{29}}$ (4)