Difference between revisions of "Template:Rnd/doc"

From Teampedia
Jump to: navigation, search
(Created page with "<noinclude>{{Documentation subpage|種類=Template}}</noinclude> {{Template shortcut|Round|Decimals}} <includeonly>{{pp-template}}{{Templates with many uses|...")
(No difference)

Revision as of 00:46, 11 April 2020

This is calledRoundingIt is a template that performs the following functions

コード
出力
{{#expr:2.0004 round 3}} 2
{{rnd|2.0004|3}} Template:Rnd/b1
{{rnd|0.000020004|7}} Template:Rnd/b1
{{rnd|0|8}} Template:Rnd/b0
{{rnd|154268|-3}} Template:Rnd/b1
{{rnd|1542689271|-7}} Template:Rnd/b1
{{rnd|1.23e-4|5}} Template:Rnd/b1
{{rnd|1.23e4|5}} Template:Rnd/b1
{{rnd|{{rnd/bExpression error: Unexpected < operator.|Expression error: Unexpected < operator.|Expression error: Unrecognized punctuation character "[".|Expression error: Unexpected < operator.}}×10−4|5}} Expression error: Unrecognized punctuation character "{".|5|1}}
{{rnd|{{rnd/bExpression error: Unexpected < operator.|Expression error: Unexpected < operator.|Expression error: Unrecognized punctuation character "[".|Expression error: Unexpected < operator.}}×104|5}} Expression error: Unrecognized punctuation character "{".|5|1}}

出力形式は109 から科学的記数法となる

コード
出力
{{rnd|1234567|-4}} Template:Rnd/b1
{{rnd|12345678|-5}} Template:Rnd/b1
{{rnd|123456789|-6}} Template:Rnd/b1
{{rnd|1234567890|-7}} Template:Rnd/b1
{{rnd|12345678901|-8}} Template:Rnd/b1
{{rnd|123456789012|-9}} Template:Rnd/b1

The output format is 10−4 Less is a scientific record.

コード
出力
{{rnd|0.0123456|4}} Template:Rnd/b1
{{rnd|0.00123456|5}} Template:Rnd/b1
{{rnd|0.000123456|6}} Template:Rnd/b1
{{rnd|0.0000123456|7}} Template:Rnd/b1
{{rnd|0.00000123456|8}} Template:Rnd/b1
{{rnd|0.000000123456|9}} Template:Rnd/b1

Related items