9.15 DecimalExpansion
All rationals have repeating decimal expansions. Operations to access
the individual digits of a decimal expansion can be obtained by
converting the value to RadixExpansion(10). More examples of
expansions are available in
BinaryExpansionXmpPage ,
HexadecimalExpansionXmpPage , and
RadixExpansionXmpPage .
The operation decimaldecimalDecimalExpansion is used to create
this expansion of type DecimalExpansion.
Type: DecimalExpansion
Arithmetic is exact.
Type: DecimalExpansion
The period of the expansion can be short or long ...
[decimal(1/i) for i in 350..354]
|
Type: List DecimalExpansion
or very long.
|
Type: DecimalExpansion
These numbers are bona fide algebraic objects.
p := decimal(1/4)*x**2 + decimal(2/3)*x + decimal(4/9)
|
Type: Polynomial DecimalExpansion
Type: Polynomial DecimalExpansion
Type: Polynomial DecimalExpansion