next | previous | forward | backward | up | top | index | toc | Macaulay2 website
TestIdeals :: adicDigit

adicDigit -- compute a digit of the non-terminating expansion of a number in the unit interval in a given base

Synopsis

Description

The command adicDigit(p, e, 0) returns 0. If $x$ is a rational number in the interval (0,1], then adicDigit(p, e, x) returns the coefficient of $p^{-e}$ in the non-terminating base $p$ expansion of $x$.

i1 : adicDigit(5, 4, 1/3)

o1 = 3

If $L$ is a list of rational numbers in the unit interval, adicDigit(p, e, L) returns a list containing the $e^{th}$ digits (base $p$) of the elements of $L$.

i2 : adicDigit(5, 4, {1/3, 1/7, 2/3})

o2 = {3, 4, 1}

o2 : List

See also

Ways to use adicDigit :

For the programmer

The object adicDigit is a method function.