numtheory[pdexpand] - compute the periodic expansion of a rational number
|
Calling Sequence
|
|
pdexpand(n)
|
|
Description
|
|
•
|
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 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
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
|
|
Download Help Document
Was this information helpful?