ホーム
おまかせ表示
ログイン
設定
脳科学辞典について
免責事項
脳科学辞典
検索
テンプレート:Round0のソースを表示
←
テンプレート:Round0
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
<includeonly>{{#ifexpr:({{{1}}})>=2^52or({{{1}}})<-(2^52)|({{{1}}})|(({{{1}}})round0)}}</includeonly><noinclude> This template produces an expression for the value of a given expression, rounded to an integer. If the value is in the range of integer-type numbers, the resulting expression is of type integer. Thus, when applying <code>#expr</code>, if the value is in the range of [[Help:Calculation#General|integer-type numbers]] the exact result is produced. The reason for not applying <code>#expr</code> in this template is: *for integer-type numbers: in subsequent use in another expression the value would be rounded to float *for floats: they would be rounded to 14 digits Examples: *{{xpsoc|round0|123.45}} *{{xpsoc|round0|10/7}} *{{xpsoc|round0|123.45e20}} Advantages compared with the operator round with second argument 0: *that operator gives wrong results for odd numbers between 2^52 and 2^53, even though the exact results are representable as float *for integer-type numbers with an absolute value between 2^53 and 2^63 the operator rounds to float, while the template gives the integer-type expression for the exact result [[Category:Mathematical templates|{{PAGENAME}}]]</noinclude>
テンプレート:Round0
に戻る。