This discussion is getting side tracked.
The real complaint here is that
{{#expr:(0.00007 * 1000 * 1000) mod 1000}} is giving 69 when it should give 70.
This is NOT a formatting issue, but rather it is bug in the #expr
parser function, presumably caused by some kind of round-off error.
-Robert Rohde
On Sat, Jan 31, 2009 at 2:27 PM, Greg L <greg_l_at_wikipedia(a)comcast.net> wrote:
Yes, {val} is a tool for making attractive and
convenient scientific
notation. The look of {{tl|val}} was discussed at length on both
WT:MOSNUM and WT:MOS and achieved broad support for how it works and
renders numbers. It delimits numbers with narrow spaces that aren't
really "spaces"; they use CSS <span> tags to move characters. Thus,
the significands can be copied and pasted into Excel where they will
be treated as real numbers without the need to first hand-delete spaces.
The problem with it {val} is outlined here at…
http://en.wikipedia.org/w/index.php?title=User_talk:Jimbo_Wales&oldid=2…
-
Developer_support_for_parser_function
In a nutshell, about 5 to 10% of the time, {val} gives rounding
errors. For instance, the expression {{val|0.55007|e=6}} will return
a significand of 0.550069.
This is the product of the buggy math-based parser functions it must
use. To date, notwithstanding that Jimbo is solidly behind this, and
that Erik supports the production of the required parser function, no
volunteer developer has stepped up to the plate with a parser function
that can character-counting parser function.
Greg
On Jan 31, 2009, at 2:17 PM, Platonides wrote:
Greg L wrote:
All,
Can anyone figure out how to fix {{tl|val}} so an expression like
{{val|0.55007|e=6}}
…works properly?
Greg L
You can't figure out what it should do just from the description.
I imagine you mean
http://en.wikipedia.org/wiki/Template:Val "Set of
templates that can be used to easily present values in scientific
notation, including uncertainty"
Another ugly template...
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l