From Template Wiki, a repository of MediaWiki templates.
Jump to navigation Jump to search
Template documentation[view] [edit] [history] [purge]

The {{e}} and {{10^}} templates are intended to facilitate and make uniform scientific notation numbers. The {{10^}} template works exactly as described below except that it does not generate a multiplication (“×”) symbol.


To render 3.14×1012, instead of writing 3.14&nbsp;&times;&nbsp;10<sup>&minus;12</sup> you can write 3.14{{e|-12}}:





The first output character for {{e}} is a non-breaking thin-space (“]” and “[” are used to illustrate the effects):






The template uses gaps or commas, per {{val/delimitnum}}.

See #Forcing text display to turn this off.

Text and number recognition

By default, the template recognizes both text and numbers. That is, typing 3.14{{e|-12}} will produce 3.14×1012, with the proper minus sign (“”), rather than with a hyphen (“-”). However, typing A{{e|-BC}} will produce A×10BC since BC is not a number. In those cases, you need to write A{{e|&minus;BC}} to produce the correct A×10Lua error in Module:Gapnum at line 16: Unable to convert "&minus;BC" to a number..

A minus sign also has to be provided for cases like 1.2×10Lua error in Module:Gapnum at line 16: Unable to convert "1 &minus; 2" to a number. (1.2{{e|1 &minus; 2}}).

Explicit plus sign

To explicitly display the + character, write 1.2{{e|4|plus}} which will produce 1.2×10+4.

Forcing text display

To force the template to display the input as text, and forgo the automatic delimitation and the recognition of the hyphen as a minus sign, write 1.2{{e|&minus;42342|text}}, which will display 1.2×10−42342 instead of 1.2×1042342. This can also be used as an alternative to explicitly display the plus sign (1.2{{e|+4|text}} gives 1.2×10+4), but remember that you also lose delimitation if you do it this way.

Tracking category

See also