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

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 6529 - "Round" operator broken
"Round" operator broken
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
ParserFunctions (Other open bugs)
All All
: Low normal with 3 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  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: ---


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.