Template:ExactlyOrAbout: Difference between revisions

Inthar (talk | contribs)
Added a sigfigs parameter.
Inthar (talk | contribs)
No edit summary
Line 1: Line 1:
<includeonly>{{#ifeq: {{#expr: {{sigfig| {{{1}}} }} - {{{1}}} |{{{sigfigs|3}}}}} | 0 |exactly|about}} {{sigfig| {{{1}}} }}</includeonly><noinclude>
<includeonly>{{#ifeq: {{#expr: {{sigfig| {{{1}}} }} - {{{1}}} |{{{sigfigs|3}}}}} | 0 |exactly|about}} {{sigfig| {{{1}}} }}</includeonly><noinclude>
If the input value ''x'' to {{{sigfigs}}} significant figures (3 by default) [[Wikipedia: Significant figures|significant figures]] = the exact value, display "exactly ''x''"; otherwise display "about ''x''".  
If the input value ''x'' to {{{sigfigs}}} (3 by default) [[Wikipedia: Significant figures|significant figures]] = the exact value, display "exactly ''x''"; otherwise display "about ''x''".  


== Usage ==
== Usage ==