ホーム
おまかせ表示
ログイン
設定
脳科学辞典について
免責事項
脳科学辞典
検索
テンプレート:Evalnsのソースを表示
←
テンプレート:Evalns
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
<includeonly>{{{{{subst|}}}#if:{{{{{subst|}}}#ifexpr:{{{{{subst|}}}#expr:{{{1}}}}}}}|({{{1}}})|{{{{{subst|}}}#expr:{{{1}}}}}}}</includeonly><noinclude><pre>{{{{{subst|}}}#if:{{{{{subst|}}}#ifexpr:{{{{{subst|}}}#expr:{{{1}}}}}}}|({{{1}}})|{{{{{subst|}}}#expr:{{{1}}}}}}}</pre> '''EVAL'''uate, but '''N'''o '''S'''cientific notation. This template can be used to evaluate an expression, if the result has to be suitable as input for further expressions. If the output is not valid as input, the expression is just reproduced, enclosed in parentheses. Note that numbers in scientific notations were initially NOT suitable for input of expressions, hence the name of this template. This is no longer the case as demonstrated below. *<code><nowiki>{{evalns|3*4}}</nowiki></code> gives {{evalns|3*4}}. *<code><nowiki>{{evalns|1234567890*12}}</nowiki></code> gives {{evalns|1234567890*12}}. *<code><nowiki>{{evalns|1234567890*1234567890}}</nowiki></code> gives {{evalns|1234567890*1234567890}}. *<code><nowiki>{{eval|2*{{evalns|1234567890*1234567890}}}}</nowiki></code> gives {{eval|2*{{evalns|1234567890*1234567890}}}}. The case where evalns returns the input expression in parentheses is when it detects an error when trying to evaluate it as an numeric expression: *<code><nowiki>{{eval|2*{{evalns|1234567890*1x2.34567890}}}}</nowiki></code> gives {{eval|2*{{evalns|1234567890*1x2.34567890}}}}. But it cannot detect all errors: *<code><nowiki>{{eval|2*{{evalns|1234567890*1.2}}}}</nowiki></code> gives {{eval|2*{{evalns|1234567890*1.2}}}}. *<code><nowiki>{{eval|2*{{evalns|1234567890*1.2.3}}}}</nowiki></code> also gives {{eval|2*{{evalns|1234567890*1.2.3}}}} ! *<code><nowiki>{{eval|2*{{evalns|1234567890*1.2.3.4567890}}}}</nowiki></code> also gives {{eval|2*{{evalns|1234567890*1.2.3.4567890}}}} ! *<code><nowiki>{{eval|2*{{evalns|1234567890*1.2.3.4.5.6.7.8.9.0}}}}</nowiki></code> also gives {{eval|2*{{evalns|1234567890*1.2.3.4.5.6.7.8.9.0}}}} ! *<code><nowiki>{{eval|2*{{evalns|1234567890*1.2.3.4.5.6.7.8.e-1}}}}</nowiki></code> also gives {{eval|2*{{evalns|1234567890*1.2.3.4.5.6.7.8.e-1}}}} ! *<code><nowiki>{{eval|2*{{evalns|1234567890*1.2e3.4.5.6.7.8.e-1}}}}</nowiki></code> now gives {{eval|2*{{evalns|1234567890*1.2e3.4.5.6.7.8.e-1}}}} ! *<code><nowiki>{{eval|2*{{evalns|1234567890*1.2e3.e.5.6.7.8.e-1}}}}</nowiki></code> now gives {{eval|2*{{evalns|1234567890*1.2e3.e.5.6.7.8.e.1}}}} ! *<code><nowiki>{{eval|2*{{evalns|1234567890*1.2e3.4e5.6.7.8.e-1}}}}</nowiki></code> now gives {{eval|2*{{evalns|1234567890*1.2e3.4e5.6.7.8.e-1}}}} ! In other words, the evaluation of constant numbers stops at the second dot found, and the rest is simply ignored if it only contains superfluous characters that may be acceptable in constant numbers, but if there's a "e", it is treated to compute a "strange" product... This just reveals that in fact the scientific notation is still not recognized as such, but instead "e" is handled like a binary operator between two numbers that are evaluated separately. [[Category:Mathematical templates|{{PAGENAME}}]] </noinclude>
テンプレート:Evalns
に戻る。