rational number in repeating decimal form
q := RepeatingDecimal(x)
NonRepeatingPart(q, output = o)
RepeatingPart(q, output = o)
variable name to use for the returned object
output = o
(optional) name; either list, rational, or float; defaults to list
name; either rational or float
The RepeatingDecimal(x) command computes the repeating decimal form of a rational number x. The return value is an object q that represents x exactly in decimal form. The object q can be used with the commands shown on this help page, but in order to use it with other commands you will typically need to convert it to a rational number or a floating-point number.
When q is displayed, if interface⁡prettyprint is greater than or equal to 2, then the repeating part is denoted by a vinculum. Otherwise, the repeating part is delimited by a pair of parentheses.
The Sign command returns 1 if q is positive and −1 if q is negative. If q is zero, then the return value is _Envsignum0 if it is assigned or 0 if it is not assigned. (See signum)
The IntegralPart command returns the unsigned integer part of q.
The NonRepeatingPart command returns the non-repeating fractional part of q.
The RepeatingPart command returns the repeating part of q.
For NonRepeatingPart and RepeatingPart, if the keyword argument output is omitted or set to list, then the return value is a list of decimal digits that represents the corresponding part. If output is set to rational, then the return value is the rational number that represents the corresponding part. If output is set to float, then the return value is a floating-point number with the number of significant digits equal to the length of the non-repeating part or the length of the repeating part, depending on the command that was called.
The convert command can be used to convert q into either fractional form or a floating-point number.
evalf may also be used to convert q to a floating-point number. If evalf has an index n, then the output will have n significant digits.
Three operators, +, *, and ^ are defined for q. They can be used with other rational numbers in decimal or fractional form, and with floating-point numbers.
The equality operator = can also be used with q and will recognize equality among rational numbers in different forms and floating-point numbers representing terminating decimals or approximating repeating decimals.
A rational number in repeating decimal form can be converted back to fractional form.
The NumberTheory[RepeatingDecimal] command was introduced in Maple 2016.
For more information on Maple 2016 changes, see Updates in Maple 2016.
Download Help Document
What kind of issue would you like to report? (Optional)