https://heald.nga.gov/mediawiki/index.php?title=Template:Order_of_magnitude/doc&feed=atom&action=historyTemplate:Order of magnitude/doc - Revision history2024-03-28T21:17:14ZRevision history for this page on the wikiMediaWiki 1.35.2https://heald.nga.gov/mediawiki/index.php?title=Template:Order_of_magnitude/doc&diff=1214&oldid=prevEmily Pugh: 1 revision2012-04-18T17:31:21Z<p>1 revision</p>
<p><b>New page</b></p><div>{{Documentation subpage}}<br />
<br />
===Usage===<br />
This template calculates the (decimal) [[order of magnitude]] of numbers within the ranges 10<sup>300</sup> to 10<sup>−300</sup> and −10<sup>−300</sup> to −10<sup>300</sup>.<br />
<br />
The acceptable input and the output produced are optimised for use in other templates. <br />
*The hyphen (not a true minus sign) is used for negative numbers.<br />
*No separator is used for thousands. <br />
*The template gives 0 for 0. Although, strictly speaking, this is mathematically incorrect it has been designed this way so as to be more useful in other templates. An important example of this is that when used by {{tl|convert}} 0&nbsp;°C or 0&nbsp;°F is considered to be on the same order of magnitude as ±1&nbsp;°C or ±1&nbsp;°F respectively.<br />
<br />
===Examples===<br />
*{{Xpdop3c|d=|Order of magnitude|123400}}<br />
*{{Xpdop3c|d=|Order of magnitude|12340}}<br />
*{{Xpdop3c|d=|Order of magnitude|1234}}<br />
*{{Xpdop3c|d=|Order of magnitude|123.4}}<br />
*{{Xpdop3c|d=|Order of magnitude|12.34}}<br />
*{{Xpdop3c|d=|Order of magnitude|1.234}}<br />
*{{Xpdop3c|d=|Order of magnitude|.1234}}<br />
*{{Xpdop3c|d=|Order of magnitude|.01234}}<br />
*{{Xpdop3c|d=|Order of magnitude|0}}<br />
*{{Xpdoc|d=|Order of magnitude}}<br />
<br />
===Incorrect usage===<br />
The input must be an unformatted number, or the template will emit errors:<br />
*<code><nowiki>{{Order of magnitude|}}</nowiki></code> → <strong class="error">Expression error: Unexpected = operator</strong><br />
*<code><nowiki>{{Order of magnitude|123,400}}</nowiki></code> → <strong class="error">Expression error: Unrecognised punctuation character ","</strong><br />
*<code><nowiki>{{Order of magnitude|foo}}</nowiki></code> → <strong class="error">Expression error: Unrecognised word "foo"</strong><br />
<br />
<br />
<includeonly><br />
[[Category:Mathematical function templates|Order of magnitude]]<br />
<br />
[[da:Skabelon:Ordomag]]<br />
[[ja:Template:Ordomag]]<br />
[[no:Mal:Ordomag]]<br />
[[pt:Predefinição:Ordem de magnitude]]<br />
[[sr:Шаблон:Ordomag]]<br />
[[vi:Tiêu bản:Ordomag]]<br />
</includeonly></div>Emily Pugh