Help:计算:修订间差异

帮助页面
添加的内容 删除的内容
(已从zhwiki:Help:计算导入1个版本:​[页面文字原许可:CC BY-SA 3.0])
 

(未显示2个用户的3个中间版本)

第1行: 第1行:
{{操作指南|shortcut1=H:CALC}}{{Other uses
{{Hh}}
{{Meta|Help:Calculation}}
{{Other uses
|subject = 關於僅需要使用簡單的'''[[實數]]運算'''的場合
|subject = 關於僅需要使用簡單的'''[[實數]]運算'''的場合
|other = 需要使用到[[複數 (數學)|複數]]、[[複分析|複變數]]、[[四元數]]或特殊[[代數]]運算的場合
|other = 需要使用到[[複數 (數學)|複數]]、[[複分析|複變數]]、[[四元數]]或特殊[[代數]]運算的場合
|Template:複變運算
|Template:複變運算
}}
}}
借助于Mediawiki的扩展“函数解析器”,进行计算变得可行。
借助于Mediawiki的扩展“函数解析器”,进行计算变得可行。<tt>expr解析器</tt>函数可以用于计算代数表达式。语法为:{{Squote|

;注意:目前此功能还有bug,详情见[[meta:Talk:ParserFunctions#Bugs]]。

<tt>expr</tt>函数,计算数学表达式。语法为:
{{Squote|
:{{((}}#expr: ''表达式'' {{))}}
:{{((}}#expr: ''表达式'' {{))}}
}}
}}
第105行: 第98行:
|}
|}
|-
|-
| {{anchor|科學記號}}'''<code>e</code>'''<br/> (位於子表達式之間)|| 2 || *10^<br/>以10為底的指數<br/>[[科學記號]] || [http://php.net/manual/en/language.operators.arithmetic.php *] [http://php.net/manual/en/function.pow.php pow] (10,..) || 浮點數,除非左邊的參數是整數且指數是非負整數 || {{nts|10}}
| {{anchor|科學記號}}'''<code>e</code>'''<br/> (位於子表達式之間)|| 2 || *10^<br/>以10為底的指數<br/>[[科學記號]]|| [http://php.net/manual/en/language.operators.arithmetic.php *] [http://php.net/manual/en/function.pow.php pow] (10,..) || 浮點數,除非左邊的參數是整數且指數是非負整數 || {{nts|10}}


|
|
第122行: 第115行:
{| class="wikitable"
{| class="wikitable"
|{{xpett|e4}}
|{{xpett|e4}}

|}
|}
|-
|-
第137行: 第131行:
{| class="wikitable"
{| class="wikitable"
|{{xpett|e^43}}
|{{xpett|e^43}}

|-
|-
|{{xpett|trunc exp43}}
|{{xpett|trunc exp43}}

|}
|}
|-
|-
第153行: 第149行:
{| class="wikitable"
{| class="wikitable"
|{{xpett|ln2/ln10}}
|{{xpett|ln2/ln10}}

|}
|}
|-
|-
第219行: 第216行:
{| class="wikitable"
{| class="wikitable"
|{{xpett|sin(30*pi/180)}}
|{{xpett|sin(30*pi/180)}}

|}
|}
|-
|-
第300行: 第298行:
|-
|-
| '''<code>/</code>''' (或寫作'''div''') || 2
| '''<code>/</code>''' (或寫作'''div''') || 2
|| [[除法]] <br/>(div非整數除法<ref name="divmod">'''<code>div</code>''' and '''<code>mod</code>''' are different from all programming languages, see [[phab:T8068]]</ref>)
|| [[除法]] <br/>(div非整數除法<ref name="divmod">'''<code>div</code>''''''<code>mod</code>''' 在几乎所有编程语言中都不同。</ref>
| [http://php.net/manual/en/language.operators.arithmetic.php /] || 原則上為浮點數。若兩參數皆為整數且[[整除]]則為整數 || {{nts|7}} ||
| [http://php.net/manual/en/language.operators.arithmetic.php /] || 原則上為浮點數。若兩參數皆為整數且[[整除]]則為整數 || {{nts|7}} ||
{| class="wikitable"
{| class="wikitable"
第388行: 第386行:
{| class="wikitable"
{| class="wikitable"
|{{xpett|a{{=}}a}}
|{{xpett|a{{=}}a}}

|}
|}
|-
|-
第468行: 第467行:
{| class="wikitable"
{| class="wikitable"
| {{xpett|1234567890123456789}}
| {{xpett|1234567890123456789}}

|-
|-
| {{xpett|123456789.0123456789}}
| {{xpett|123456789.0123456789}}

|}
|}
|-
|-
第477行: 第478行:
{| class="wikitable"
{| class="wikitable"
| {{xpett|e}}
| {{xpett|e}}

|}
|}
|-
|-
第484行: 第486行:
{| class="wikitable"
{| class="wikitable"
| {{xpett|pi}}
| {{xpett|pi}}

|}
|}
|}
|}
第529行: 第532行:
*[[Template:複變運算]]:MediaWiki原生的運算功能僅支援[[實數]]的運算。若需要[[複數 (數學)|複數]]或[[複分析|複變數]]甚至[[四元數]]的計算可使用[[Template:複變運算]]模板,如上述示例中對負值取平方根時。
*[[Template:複變運算]]:MediaWiki原生的運算功能僅支援[[實數]]的運算。若需要[[複數 (數學)|複數]]或[[複分析|複變數]]甚至[[四元數]]的計算可使用[[Template:複變運算]]模板,如上述示例中對負值取平方根時。
*[[Help:模板扩展语法]]
*[[Help:模板扩展语法]]
*更多资料可参见[[:m:help:Calculation]]{{English}}。

{{-}}
{{H-f Help}}


== 注释 ==
[[Category:維基百科文字幫助文檔|JS]]
{{reflist}}{{-}}{{帮助页面}}