0

Template documentation[view] [edit] [history] [purge]

This template has two different functions dependent on input.

  1. 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.
  2. 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 १२३.४५६0 [१]
  • {{significant figures|123.456|6}} gives १२३.४५६ [२]
  • {{significant figures|123.456|5}} gives १२३.४६ [३]
  • {{significant figures|123.456|4}} gives १२३.५ [४]

  • {{significant figures|123,456|3}} gives १२३,००० [५]
  • {{significant figures|12345.6|3}} gives १२,३०० [६]
  • {{significant figures|1234.56|3}} gives १,२३० [७]
  • {{significant figures|12.3456|3}} gives १२.३ [८]
  • {{significant figures|1.23456|3}} gives १.२३ [९]

  • {{significant figures|.123456|3}} gives ०.१२३ [१०]
  • {{significant figures|.0123456|3}} gives ०.०१२३ [११]
  • {{significant figures|.00123456|3}} gives ०.००१२३ [१२]
  • {{significant figures|0.123456|3}} gives ०.१२३ [१३]
  • {{significant figures|0.0123456|3}} gives ०.०१२३ [१४]
  • {{significant figures|0.00123456|3}} gives ०.००१२३ [१५]

  • {{significant figures|123.456|2}} gives १२० [१६]
  • {{significant figures|123.456|1}} gives १०० [१७]
  • {{significant figures|123.456|0}} gives ० [१८]

  • {{significant figures|987654321|9}} gives ९८७,६५४,३२१ [१९]
  • {{significant figures|987654321|8}} gives ९८७,६५४,३२० [२०]
  • {{significant figures|987654321|7}} gives ९८७,६५४,३०० [२१]
  • {{significant figures|987654321|6}} gives ९८७,६५४,००० [२२]
  • {{significant figures|987654321|5}} gives ९८७,६५०,००० [२३]
  • {{significant figures|987654321|4}} gives ९८७,७००,००० [२४]
  • {{significant figures|987654321|3}} gives ९८८,०००,००० [२५]
  • {{significant figures|987654321|2}} gives ९९०,०००,००० [२६]
  • {{significant figures|987654321|1}} gives १,०००,०००,००० [२७]

One parameter सम्पादन

  • {{significant figures|123400}} → 4 [२८]
  • {{significant figures|12340}} → 4 [२९]
  • {{significant figures|1234}} → 4 [३०]
  • {{significant figures|123.4}} → 4 [३१]
  • {{significant figures|12.34}} → 4 [३२]
  • {{significant figures|1.234}} → 4 [३३]

  • {{significant figures|0.1234}} → 4 [३४]
  • {{significant figures|0.01234}} → 4 [३५]
  • {{significant figures|0.001234}} → 4 [३६]
  • {{significant figures|.1234}} → 4 [३७]
  • {{significant figures|.01234}} → 4 [३८]
  • {{significant figures|.001234}} → 4 [३९]

  • {{significant figures|-123.4}} → 4 [४०]
  • {{significant figures|-12.34}} → 4 [४१]
  • {{significant figures|-1.234}} → 4 [४२]