Template:Rnd/b1/doc

From Meta, a Wikimedia project coordination wiki

This is an auxiliary template of Template:Rnd, called if the number, after rounding, is positive.

Its first parameter is the rounded number and its second the rounding parameter.

It calls Template:Oom.

Internal details[edit]

In this template the already rounded number is rounded again, because, for example, {{#expr:4100000}} → 4100000, but in an expression 4.1E+6 evaluates to a number that is not exactly 4,100,000, see m:Help:Calculation#Numbers as output.

If the round function has a negative second argument, the result is not always exactly the required multiple of the corresponding power of 10, see m:Help:Round#Errors with positive second argument, even though that is always a representable float, up to some large limit (see m:Help:Calculation accuracy#Integers). Therefore for a negative second argument an additional round0 is applied.