Template:Order of magnitude/doc

From WikiSwire
Jump to navigation Jump to search

Usage

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

The template currently gives 0 for 0. Do not rely on this, however, because this mathematically incorrect result is under review (see talk).

Examples

  • {{Order of magnitude|123400}} → 5 [1]
  • {{Order of magnitude|12340}} → 4 [2]
  • {{Order of magnitude|1234}} → 3 [3]
  • {{Order of magnitude|123.4}} → 2 [4]
  • {{Order of magnitude|12.34}} → 1 [5]
  • {{Order of magnitude|1.234}} → 0 [6]
  • {{Order of magnitude|.1234}} → -1 [7]
  • {{Order of magnitude|.01234}} → -2 [8]
  • {{Order of magnitude|0}} → 0 [9]
  • {{Order of magnitude|}}Expression error: Unexpected = operator. [10]
  • {{Order of magnitude}} gives 0 [11]