A Project of the Center for Advanced Study in the Visual Arts, National Gallery of Art
History of Early American Landscape Design

Template:Order of magnitude/doc

[http://www.nga.gov/content/ngaweb/research/casva/research-projects.html A Project of the National Gallery of Art, Center for Advanced Study in the Visual Arts ]

{{#invoke:Fallback | autotranslate

      |base = Documentation subpage
      |lang = 
      |page = Template:Order of magnitude
    }}

Usage

This template calculates the (decimal) order of magnitude of numbers within the ranges 10300 to 10−300 and −10−300 to −10300.

The acceptable input and the output produced are optimised for use in other templates.

  • The hyphen (not a true minus sign) is used for negative numbers.
  • No separator is used for thousands.
  • 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 {{convert}} 0 °C or 0 °F is considered to be on the same order of magnitude as ±1 °C or ±1 °F respectively.

Examples

Incorrect usage

The input must be an unformatted number, or the template will emit errors:

  • {{Order of magnitude|}}Expression error: Unexpected = operator
  • {{Order of magnitude|123,400}}Expression error: Unrecognised punctuation character ","
  • {{Order of magnitude|foo}}Expression error: Unrecognised word "foo"


Retrieved from "https://heald.nga.gov/mediawiki/index.php?title=Template:Order_of_magnitude/doc&oldid=1214"

History of Early American Landscape Design contributors, "Template:Order of magnitude/doc," History of Early American Landscape Design, , https://heald.nga.gov/mediawiki/index.php?title=Template:Order_of_magnitude/doc&oldid=1214 (accessed October 16, 2021).

A Project of the Center for Advanced Study in the Visual Arts

National Gallery of Art, Washington