"Round" operator broken
Open, LowPublic


Author: zocky

{{#expr: 45 round 2}} returns "45" instead of "45.00" which would be the
expected behaviour and useful for aligning numbers.

Version: unspecified
Severity: normal


bzimport set Reference to bz6529.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Jul 3 2006, 3:01 PM

omniplex wrote:

Not really "broken", all expression results COULD
go through the same normalization at the end, and
that would strip trailing or leading zeros, force
scientific format below E-5 / above 1E12, etc.

Oddity, "round" does return -0 in some cases, so
if you'd want normalized results (the opposite of
your bug report) you have to add 0 to get rid of
the bogus minus sign in -0.

I didn't look at the new "formatnum" magic word,
does it help?

drspui wrote:

If the number of decimal places is given, it should round to that many places to
make it clear that the number is given with that precision. This is broken behavior.

Add Comment