Last modified: 2011-04-14 15:12:56 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T8529, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 6529 - "Round" operator broken
"Round" operator broken
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
ParserFunctions (Other open bugs)
unspecified
All All
: Low normal with 3 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-03 15:01 UTC by Zoran Obradovic
Modified: 2011-04-14 15:12 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Zoran Obradovic 2006-07-03 15:01:38 UTC
{{#expr: 45 round 2}} returns "45" instead of "45.00" which would be the
expected behaviour and useful for aligning numbers.
Comment 1 omniplex 2006-07-08 00:41:13 UTC
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? 
Comment 2 SPUI 2006-07-08 09:16:22 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links