next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
TestIdeals :: adicTruncation

adicTruncation -- truncation of a non-terminating adic expansion

Synopsis

Description

This function computes the e-th truncation of the p-adic expansion of a rational number.

i1 : adicTruncation(5, 2, 1/100)

o1 = 0

o1 : QQ
i2 : adicTruncation(5, 4, 1/100)

      6
o2 = ---
     625

o2 : QQ
i3 : adicTruncation(5, 5, 1/1000)

       3
o3 = ----
     3125

o3 : QQ

If you pass it zero, it returns zero.

i4 : adicTruncation(4,2,0)

o4 = 0

You can also pass it a list of numbers, in which case it returns the list of the truncations.

i5 : adicTruncation(5, 5, {1/100, 1/1000})

       31     3
o5 = {----, ----}
      3125  3125

o5 : List

See also

Ways to use adicTruncation :