साँचा:Significant figures/doc
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 1012 to 10-12 and -10-12 to -1012. It ignores any digits outside of this range.
- If two parameters are given the template rounds the first number to the number of significant figures given by the second.
Examples
संपादित करेंTwo parameters
संपादित करें{{significant figures|123.456|7}}
gives 123.4560 [1]{{significant figures|123.456|6}}
gives 123.456 [2]{{significant figures|123.456|5}}
gives 123.46 [3]{{significant figures|123.456|4}}
gives 123.5 [4]
{{significant figures|123,456|3}}
gives 1,23,000 [5]{{significant figures|12345.6|3}}
gives 12,300 [6]{{significant figures|1234.56|3}}
gives 1,230 [7]{{significant figures|12.3456|3}}
gives 12.3 [8]{{significant figures|1.23456|3}}
gives 1.23 [9]
{{significant figures|.123456|3}}
gives 0.123 [10]{{significant figures|.0123456|3}}
gives 0.0123 [11]{{significant figures|.00123456|3}}
gives 0.00123 [12]{{significant figures|0.123456|3}}
gives 0.123 [13]{{significant figures|0.0123456|3}}
gives 0.0123 [14]{{significant figures|0.00123456|3}}
gives 0.00123 [15]
{{significant figures|123.456|2}}
gives 120 [16]{{significant figures|123.456|1}}
gives 100 [17]{{significant figures|123.456|0}}
gives 0 [18]
{{significant figures|987654321|9}}
gives 98,76,54,321 [19]{{significant figures|987654321|8}}
gives 98,76,54,320 [20]{{significant figures|987654321|7}}
gives 98,76,54,300 [21]{{significant figures|987654321|6}}
gives 98,76,54,000 [22]{{significant figures|987654321|5}}
gives 98,76,50,000 [23]{{significant figures|987654321|4}}
gives 98,77,00,000 [24]{{significant figures|987654321|3}}
gives 98,80,00,000 [25]{{significant figures|987654321|2}}
gives 99,00,00,000 [26]{{significant figures|987654321|1}}
gives 1,00,00,00,000 [27]
One parameter
संपादित करें{{significant figures|123400}}
→ साँचा:Significant figures/sum [28]{{significant figures|12340}}
→ साँचा:Significant figures/sum [29]{{significant figures|1234}}
→ साँचा:Significant figures/sum [30]{{significant figures|123.4}}
→ साँचा:Significant figures/sum [31]{{significant figures|12.34}}
→ साँचा:Significant figures/sum [32]{{significant figures|1.234}}
→ साँचा:Significant figures/sum [33]
{{significant figures|0.1234}}
→ साँचा:Significant figures/sum [34]{{significant figures|0.01234}}
→ साँचा:Significant figures/sum [35]{{significant figures|0.001234}}
→ साँचा:Significant figures/sum [36]{{significant figures|.1234}}
→ साँचा:Significant figures/sum [37]{{significant figures|.01234}}
→ साँचा:Significant figures/sum [38]{{significant figures|.001234}}
→ साँचा:Significant figures/sum [39]
{{significant figures|-123.4}}
→ साँचा:Significant figures/sum [40]{{significant figures|-12.34}}
→ साँचा:Significant figures/sum [41]{{significant figures|-1.234}}
→ साँचा:Significant figures/sum [42]