"Round" operator broken


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 added a subscriber: wikibugs-l.
bzimport set Reference to bz6529.
bzimport created this task.Via LegacyJul 3 2006, 3:01 PM
bzimport added a comment.Via ConduitJul 8 2006, 12:41 AM

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?

bzimport added a comment.Via ConduitJul 8 2006, 9:16 AM

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

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.