Template:Precision
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:
- {{getprecision| 22.45}} → Template:Getprecision
- {{getprecision| 22.12345}} → Template:Getprecision
- {{getprecision| -15.275}} → Template:Getprecision
- {{getprecision| -15.2500}} → Template:Getprecision
- {{Getprecision |23000222000111.432}} → Template:Getprecision
- {{getprecision| -15.123}} → Template:Getprecision
- {{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
- Template:Precision - get precision of positive numbers