Template:Precision

From NationStates Sports Wiki
Revision as of 17:21, 15 August 2010 by wikipedia>Wikid77 (more examples; added section "Known bugs")
Jump to navigation Jump to search

Expression error: Unrecognised punctuation character "[".
The Template:Getprecision determines the precision (as a count of decimal digits) for any amount, large or negative, using a fast algorithm. It can also handle a trailing decimal point (such as "15." or "-41.") or trailing zeroes (such as "15.34000" having precision as 5 decimal digits).

Examples

Some examples:

{{precision| -15.123}} → Expression error: Unrecognised punctuation character "[". [ Getprecision handles negatives, but not {precision} ]

Known bugs

  • For numbers in scientific notation, the precision is typically returned as too low by 1 decimal place. Example: {{getprecision |7.1234E+06}} → Template:Getprecision (should be precision as 4 decimal digits, not 3).

See also