Open main menu

Changes

m
add {{documentation subpage}}
{{documentation subpage}}
{{template shortcut|sigfig}}
This template has two different functions dependent on input.

#If only one parameter is given the template counts the number of [[significant figures]] of the given number within the ranges 10<sup>12</sup> to 10<sup>−12</sup> and -10<sup>−12</sup> to -10<sup>12</sup>. It ignores any digits outside this range<!--... maybe -->.
#If two parameters are given the template rounds the first number to the number of significant figures given by the second.

== Examples ==
=== Two parameters ===
*{{xpdop3p3c|d=|significant figures|123.456|||7}}
*{{xpdop3p3c|d=|significant figures|123.456|||6}}
*{{xpdop3p3c|d=|significant figures|123.456|||5}}
*{{xpdop3p3c|d=|significant figures|123.456|||4}}
----
*{{xpdop3p3c|d=|significant figures|123,456|||3}}
*{{xpdop3p3c|d=|significant figures|12345.6|||3}}
*{{xpdop3p3c|d=|significant figures|1234.56|||3}}
*{{xpdop3p3c|d=|significant figures|12.3456|||3}}
*{{xpdop3p3c|d=|significant figures|1.23456|||3}}
----
*{{xpdop3p3c|d=|significant figures|.123456|||3}}
*{{xpdop3p3c|d=|significant figures|.0123456|||3}}
*{{xpdop3p3c|d=|significant figures|.00123456|||3}}
*{{xpdop3p3c|d=|significant figures|0.123456|||3}}
*{{xpdop3p3c|d=|significant figures|0.0123456|||3}}
*{{xpdop3p3c|d=|significant figures|0.00123456|||3}}
----
*{{xpdop3p3c|d=|significant figures|123.456|||2}}
*{{xpdop3p3c|d=|significant figures|123.456|||1}}
*{{xpdop3p3c|d=|significant figures|123.456|||0}}
----
*{{xpdop3p3c|d=|significant figures|987654321|||9}}
*{{xpdop3p3c|d=|significant figures|987654321|||8}}
*{{xpdop3p3c|d=|significant figures|987654321|||7}}
*{{xpdop3p3c|d=|significant figures|987654321|||6}}
*{{xpdop3p3c|d=|significant figures|987654321|||5}}
*{{xpdop3p3c|d=|significant figures|987654321|||4}}
*{{xpdop3p3c|d=|significant figures|987654321|||3}}
*{{xpdop3p3c|d=|significant figures|987654321|||2}}
*{{xpdop3p3c|d=|significant figures|987654321|||1}}

=== One parameter ===
*{{xpdop3c|d=|significant figures|123400}}
*{{xpdop3c|d=|significant figures|12340}}
*{{xpdop3c|d=|significant figures|1234}}
*{{xpdop3c|d=|significant figures|123.4}}
*{{xpdop3c|d=|significant figures|12.34}}
*{{xpdop3c|d=|significant figures|1.234}}
----
*{{xpdop3c|d=|significant figures|0.1234}}
*{{xpdop3c|d=|significant figures|0.01234}}
*{{xpdop3c|d=|significant figures|0.001234}}
*{{xpdop3c|d=|significant figures|.1234}}
*{{xpdop3c|d=|significant figures|.01234}}
*{{xpdop3c|d=|significant figures|.001234}}
----
*{{xpdop3c|d=|significant figures|-123.4}}
*{{xpdop3c|d=|significant figures|-12.34}}
*{{xpdop3c|d=|significant figures|-1.234}}

<includeonly>
[[Category:Mathematical function templates]]
</includeonly>
Anonymous user