Navigation

Operators and Keywords

Function List:

C++ API

: chop (x, ndigits, base)

Truncate elements of x to a length of ndigits such that the resulting numbers are exactly divisible by base.

If base is not specified it defaults to 10.

chop (-pi, 5, 10)
   ⇒ -3.14200000000000
chop (-pi, 5, 5)
   ⇒ -3.14150000000000

Package: octave