Template:ExactlyOrAbout: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
: <code><nowiki>{{ExactlyOrAbout|16.667}}</nowiki></code> | : <code><nowiki>{{ExactlyOrAbout|16.667}}</nowiki></code> | ||
: <code><nowiki>{{ExactlyOrAbout|16.667|sigfigs=4}}</nowiki></code> | : <code><nowiki>{{ExactlyOrAbout|16.667|sigfigs=4}}</nowiki></code> | ||
: <code><nowiki>{{ExactlyOrAbout|16.67|sigfigs=4}}</nowiki></code> | |||
; You get | ; You get | ||
Line 12: | Line 13: | ||
: {{{{PAGENAME}}|16.667}} | : {{{{PAGENAME}}|16.667}} | ||
: {{{{PAGENAME}}|16.667|sigfigs=4}} | : {{{{PAGENAME}}|16.667|sigfigs=4}} | ||
: {{ExactlyOrAbout|16.67|sigfigs=4}} | |||
== See also == | == See also == | ||
* [[Template:Sigfig]] – the template that rounds a number to a given number of significant figures | * [[Template:Sigfig]] – the template that rounds a number to a given number of significant figures |
Revision as of 23:05, 21 May 2023
If the input value x to {{{sigfigs}}} (3 by default) significant figures = the exact value, display "exactly x"; otherwise display "about x" (rounded to {{{sigfigs}}} significant figures).
Usage
- You type
{{ExactlyOrAbout|24}}
{{ExactlyOrAbout|16.667}}
{{ExactlyOrAbout|16.667|sigfigs=4}}
{{ExactlyOrAbout|16.67|sigfigs=4}}
- You get
- exactly 24
- about 16.7
- about 16.67
- exactly 16.67
See also
- Template:Sigfig – the template that rounds a number to a given number of significant figures