numtheory(deprecated)/pdexpand - Maple Help

numtheory(deprecated)

 pdexpand
 compute the periodic expansion of a rational number

 Calling Sequence pdexpand(n)

Parameters

 n - rational number

Description

 • Important: The numtheory package has been deprecated.  Use the superseding command NumberTheory[RepeatingDecimal] instead.
 • pdexpand returns the periodic decimal expansion of the given rational number n.
 • Every rational number has a periodic (or terminating) decimal expansion. The converse is also true; a periodic expansion always represents a rational number.
 • The result is returned as in the form $'\mathrm{PDEXPAND}'\left(s,q,\mathrm{np},p\right)$ where s is the sign of n, q the positive integer part, np the non-periodic part, and p the periodic part of n.
 • Use convert/rational to find the rational number of a periodic decimal expansion.
 • The command with(numtheory,pdexpand) allows the use of the abbreviated form of this command.

Examples

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

 > $\mathrm{with}\left(\mathrm{numtheory}\right):$
 > $\mathrm{pdexpand}\left(\frac{1}{7}\right)$
 ${\mathrm{PDEXPAND}}{}\left({1}{,}{0}{,}\left[\right]{,}\left[{1}{,}{4}{,}{2}{,}{8}{,}{5}{,}{7}\right]\right)$ (1)
 > $\mathrm{convert}\left(,\mathrm{rational}\right)$
 $\frac{{1}}{{7}}$ (2)
 > $\mathrm{pdexpand}\left(-\frac{83}{74}\right)$
 ${\mathrm{PDEXPAND}}{}\left({-1}{,}{1}{,}\left[{1}\right]{,}\left[{2}{,}{1}{,}{6}\right]\right)$ (3)
 > $\mathrm{convert}\left(,\mathrm{rational}\right)$
 ${-}\frac{{83}}{{74}}$ (4)