Skip to content

rounddown

Round toward zero with specified precision.

v = rounddown(number, num_digits)

Rounds number toward zero. num_digits controls precision: positive = decimal places kept, 0 = integer, negative = round to tens/hundreds.

rounddown(3.7, 0) % 3
rounddown(31415, -2) % 31400
  • roundup — Round away from zero with specified precision.
  • trunc — Truncate toward zero.
  • round — Round to the nearest integer (or to a specified number of digits).