User:Wikid77/Template:Convert/E/doc
This is a documentation subpage for User:Wikid77/Template:Convert/E. It may contain usage information, categories and other content that is not part of the original user template page. |
Usage
[edit]The converter Template:Convert/E will convert an amount and display large numbers in x10 format ("3.4×1017") rather than E-format scientific notation: 3.4E+17. A resulting large 2nd amount will also be shown in x10 notation, when greater than 10 billion. To set the rounding precision, the output unit must be stated, or put "0" to default.
- Usage: {{convert/E |3.4E17|m|ft}}
- {{convert/E |1,234|km|mi|abbr=on}}
- {{convert/E |7,000,000,000|L|usgal|3}}
- {{convert/E |65E9|km|mi|disp=x|long (|)}} - custom output
The template has the same parameters as Template:Convert, and so it allows abbreviation abbr=in or abbr=out or abbr=none, wikilinks lk=in or lk=out, and adjective mode adj=on or adj=mid. The separator can also be a semicolon: disp=semi, disp=or, disp=comma, disp=x (customized), disp=br (brackets), disp=b (default as parentheses), disp=2 (or disp=out) and disp=# (or disp=number).
Examples
[edit]The examples show various options of conversions:
- {{convert/E |3.4E17|km|mi}} → 3.4×1017 kilometres* (
)This userpage has been blanked. If this is your userpage, you can retrieve the contents of this page in the page history. Alternatively, if you would like it deleted, simply replace the content of this page with {{db-u1}}. - {{convert/E |123|km|mi|abbr=on}} → 123 km* (
)This userpage has been blanked. If this is your userpage, you can retrieve the contents of this page in the page history. Alternatively, if you would like it deleted, simply replace the content of this page with {{db-u1}}. - {{convert/E |95.1|km|mi|lk=out}} → 95.1 kilometres* (
)This userpage has been blanked. If this is your userpage, you can retrieve the contents of this page in the page history. Alternatively, if you would like it deleted, simply replace the content of this page with {{db-u1}}. - {{convert/E |1.88E19|ft|m|0}} → 1.88×1019 feet* (
)This userpage has been blanked. If this is your userpage, you can retrieve the contents of this page in the page history. Alternatively, if you would like it deleted, simply replace the content of this page with {{db-u1}}. - {{convert/E |140|ft|m}} → 140 feet* (
)This userpage has been blanked. If this is your userpage, you can retrieve the contents of this page in the page history. Alternatively, if you would like it deleted, simply replace the content of this page with {{db-u1}}.
Display types: disp=comma, disp=semi, disp=or, disp=out, disp=number, disp=x and disp=b. The numeric results are identical to using Template:Convert to show scientific notation, rather than x10 notation.
Common problems
[edit]Note the name of this template is "convert/E" and omitting the suffix "/E" will not show x10 notation for very large numbers (instead, they will show as E-notation: 5E+13). Also, putting "E" as parameter 1 will cause the number to be treated as a template name "Convert/<number>" such as {{convert|E|7E13|km}} will show "[convert: invalid number]".
The amount is followed by a unit-code (such as "|m") as the 2nd parameter. The output unit-code can be "0" as the 3rd parameter, to allow the default output unit to be triggered, while setting parameter 4 to a rounding precision (such as "|5") or use r=5 to set the rounding level.