Rounding
Package:
FUNCTION_PACKAGE. Registered bycreateEngine(); for a slimmer engine, register it explicitly (see choosing packages).
Rounding replaces a number with a nearby simpler one: the nearest whole number, a set number of decimal places, or the nearest ten, hundred or thousand. Solve has a form for each, in symbols and in words, so you can say the one you mean.
round on its own goes to the nearest whole number. Give it a place count, or
say to N dp, to round to that many decimal places and show exactly that many,
trailing zeros kept.
round(3.7) // 4round(3.14159, 2) // 3.143.14159 to 4 dp // 3.14161.5 to 2 dp // 1.50100 to 2 dp // 100.00The place count is a precision you set on the value, not a global display setting, so a rounded number reads the way you asked and carries that precision into the next line. The rounding is exact where the number has an exact decimal, so a half at the last place goes up rather than down.
1.005 to 2 dp // 1.01round(2.675, 2) // 2.68Rounding to a magnitude reads the way it is said. rounded with no target is the
nearest whole; up and down force the direction; to nearest <n> rounds to a
multiple, and the round magnitude words (ten, hundred, thousand, …) stand
in for the number.
5.5 rounded // 65.4 rounded up // 65.6 rounded down // 537 to nearest 10 // 40490 rounded to nearest hundred // 50021 rounded up to nearest 5 // 25