Template:SciNum

From Nonkiki Wiki
Jump to navigation Jump to search
You are viewing the documentation for Template:SciNum, which has been automatically transcluded from its documentation page. You may:
  • edit the template; or:
  • edit the documentation

This is a presentation template, designed to make it easy for you to ensure that your numbers are correctly formatted.

What it does

This template renders a number in "scientific" notation. Such a number has up to three parts:

  1. the number
  2. an error estimate
  3. a power of 10

Usage

{{SciNum
 |num=<number to be formatted>
 |err=<error estimate>
 |pow=<power of 10>}}
 

The num parameter is required; the others are optional.

It is required to quote the error estimate, if present, to the same magnitude (power of 10) as the number. It is customary to quote it to the same accuracy (number of decimal places).

Example

For example, the specification for a particular widget requires that it be 5 millimetres long, with a tolerance of 10 microns. There are various ways to express this:

  • 5 mm +/- 10 um
  • 5 mm +/- 0.01 mm
  • (5.00 +/- 0.01) mm

... and so on. Messy, inconsistent and, often, inaccurate.

This template makes it easy to get it right:

{{SciNum|num=5.00|err=0.01}} mm

Which has the result:

(5.00±0.01) mm

In some circumstances, it is customary to use strict SI units, without prefixes and with a multiplying power of 10. Hence:

{{SciNum|num=5.00|err=0.01|pow=-3}} m

Which has the result:

(5.00±0.01)×10-3 m