|
|
第1行: |
第1行: |
− | <noinclude>{{Manual Page|version=4.2}}</noinclude>
| + | #REDIRECT [內建函數與運算子] |
− | 要利用[[指令列]]建立數值、座標或方程式,您可使用下列 內建 的 函數與運算子 。與邏輯相關的運算子與函數列表請參閱「[[:en:Boolean values|真假值]]」。
| |
− | | |
− | {{Note|使用內建函數必須使用圓括號而不是方括號,且函數名稱和圓括號之間不可空白。}}
| |
− | | |
− |
| |
− | {| class="pretty" width="95%"
| |
− | |-
| |
− | !運算子/函數
| |
− | !指令
| |
− | |-
| |
− | |ℯ ([http://zh.wikipedia.org/wiki/E_(数学常数) 尤拉數])
| |
− | | {{KeyCode|Alt+e}}
| |
− | |-
| |
− | |ί ([http://zh.wikipedia.org/wiki/虛數單位 虛數單位])
| |
− | | {{KeyCode|Alt+i}}
| |
− | |-
| |
− | |π
| |
− | | {{KeyCode|Alt+p}} 或 pi
| |
− | |-
| |
− | |° ([[w:Degree symbol|度數符號]])
| |
− | | {{KeyCode|Alt+o}}
| |
− | |-
| |
− | |加法
| |
− | | +
| |
− | |-
| |
− | |減法
| |
− | | -
| |
− | |-
| |
− | |乘法
| |
− | |* 或 空白鍵
| |
− | |-
| |
− | |內積(純量積)
| |
− | |* 或 空白鍵
| |
− | |-
| |
− | |外積(向量積,請參閱「[[:en:Points and Vectors#Vector Product|點與向量]]」)
| |
− | |⊗
| |
− | |-
| |
− | |除法
| |
− | |/
| |
− | |-
| |
− | |次方
| |
− | |^ 或 上標 (<code>x^2</code> 或 <code>x<sup>2</sup></code>)
| |
− | |-
| |
− | |階乘
| |
− | |!
| |
− | |-
| |
− | |小括號
| |
− | |( )
| |
− | |-
| |
− | |取點或向量的「''x'' 座標」
| |
− | |x( )
| |
− | |-
| |
− | |取點或向量的「''y'' 座標」
| |
− | |y( )
| |
− | |-
| |
− | |求複數的「幅角 (Argument)」
| |
− | |arg( )
| |
− | |-
| |
− | |求「共軛複數 (Conjugate)」
| |
− | |conjugate( )
| |
− | |-
| |
− | |取「絕對值 (Absolute value)」
| |
− | |abs( )
| |
− | |-
| |
− | |求「正負號 (Sign)」(回傳 1、0、-1)
| |
− | |sgn( ) 或 sign()
| |
− | |-
| |
− | |求「平方根 (Square root)」
| |
− | |sqrt( )
| |
− | |-
| |
− | |求「立方根 (Cubic root)」
| |
− | |cbrt( )
| |
− | |-
| |
− | |隨機 (Random) 函數(回傳 0 到 1 之間的亂數)
| |
− | |random( )
| |
− | |-
| |
− | |自然指數函數(以尤拉數為底)
| |
− | |exp( ) 或 ℯ<sup>x</sup>
| |
− | |-
| |
− | |自然對數函數(以尤拉數為底)
| |
− | |ln( ) 或 log( )
| |
− | |-
| |
− | |對數函數(以 2 為底)
| |
− | |ld( )
| |
− | |-
| |
− | |對數函數(以 10 為底)
| |
− | |lg( )
| |
− | |-
| |
− | |對數函數(以 ''b'' 為底)
| |
− | |log(b, x )
| |
− | |-
| |
− | |餘弦 (Cosine) 函數
| |
− | |cos( )
| |
− | |-
| |
− | |正弦 (Sine) 函數
| |
− | |sin( )
| |
− | |-
| |
− | |正切 (Tangent) 函數
| |
− | |tan( )
| |
− | |-
| |
− | |正割 (Secant)函數
| |
− | |sec()
| |
− | |-
| |
− | |餘割 (Cosecant) 函數
| |
− | |cosec()
| |
− | |-
| |
− | |餘切 (Cotangent) 函數
| |
− | |cot()
| |
− | |-
| |
− | |反餘弦 (Arc cosine) 函數
| |
− | |acos( ) 或 arccos( )
| |
− | |-
| |
− | |反正弦 (Arc sine) 函數
| |
− | |asin( ) 或 arcsin( )
| |
− | |-
| |
− | |反正切 (Arc tangent) 函數(回傳值介於 -π/2 和 π/2 之間)
| |
− | |atan( ) 或 arctan( )
| |
− | |-
| |
− | |[http://zh.wikipedia.org/wiki/Atan2 反正切 (Arc tangent) 函數(回傳值介於 -π 和 π 之間)]
| |
− | |atan2(y, x)
| |
− | |-
| |
− | |雙曲餘弦 (Hyperbolic cosine) 函數
| |
− | |cosh( )
| |
− | |-
| |
− | |雙曲正弦 (Hyperbolic sine) 函數
| |
− | |sinh( )
| |
− | |-
| |
− | |雙曲正切 (Hyperbolic tangent) 函數
| |
− | |tanh( )
| |
− | |-
| |
− | |雙曲正割 (Hyperbolic secant) 函數
| |
− | |sech( )
| |
− | |-
| |
− | |雙曲餘割 (Hyperbolic cosecant) 函數
| |
− | |cosech( )
| |
− | |-
| |
− | |雙曲餘切 (Hyperbolic cotangent) 函數
| |
− | |coth( )
| |
− | |-
| |
− | |反雙曲餘弦 (Antihyperbolic cosine) 函數
| |
− | |acosh( ) 或 arccosh( )
| |
− | |-
| |
− | |反雙曲正弦 (Antihyperbolic sine) 函數
| |
− | |asinh( ) 或 arcsinh( )
| |
− | |-
| |
− | |反雙曲正切 (Antihyperbolic tangent) 函數
| |
− | |atanh( ) 或 arctanh( )
| |
− | |-
| |
− | |不大於某數的最大整數(等同「高斯符號」)
| |
− | |floor( )
| |
− | |-
| |
− | |不小於某數的的最小整數
| |
− | |ceil( )
| |
− | |-
| |
− | |(四捨五入)取最近的整數
| |
− | |round( )
| |
− | |-
| |
− | |[http://mathworld.wolfram.com/BetaFunction.html Beta function] Β(a, b)
| |
− | |beta(a, b)
| |
− | |-
| |
− | |[http://mathworld.wolfram.com/IncompleteBetaFunction.html Incomplete beta function] Β(x;a, b)
| |
− | |beta(a, b, x)
| |
− | |-
| |
− | |[http://mathworld.wolfram.com/RegularizedBetaFunction.html Incomplete regularized beta function] I(x; a, b)
| |
− | |betaRegularized(a, b, x)
| |
− | |-
| |
− | |[[w:Gamma function|Gamma function Γ(x)]]
| |
− | |gamma( x)
| |
− | |-
| |
− | | (Lower) [http://mathworld.wolfram.com/IncompleteGammaFunction.html incomplete gamma function] γ(a, x)
| |
− | |gamma(a, x)
| |
− | |-
| |
− | |(Lower) [http://mathworld.wolfram.com/RegularizedGammaFunction.html incomplete regularized gamma function P(a,x) = γ(a, x) / Γ(a) ]
| |
− | |gammaRegularized(a, x)
| |
− | |-
| |
− | |[[w:Error_function|Gaussian Error Function]]
| |
− | |erf(x)
| |
− | |-
| |
− | |取複數的「[[real_函式|實部]]」
| |
− | |real( )
| |
− | |-
| |
− | |取複數的「[[imaginary_函式|虛部]]」
| |
− | |imaginary( )
| |
− | |-
| |
− | | [[w:Digamma_function|Digamma function]]
| |
− | | psi(x)
| |
− | |-
| |
− | | The [http://en.wikipedia.org/wiki/Polygamma_function Polygamma function] is the (m+1)th derivative of the natural logarithm of the [http://en.wikipedia.org/wiki/Gamma_function Gamma function, gamma(x)] (m=0,1)
| |
− | | polygamma(m, x)
| |
− | |-
| |
− | | The [http://mathworld.wolfram.com/SineIntegral.html Sine Integral] function
| |
− | | sinIntegral(x)
| |
− | |-
| |
− | | The [http://mathworld.wolfram.com/CosineIntegral.html Cosine Integral] function
| |
− | | cosIntegral(x)
| |
− | |-
| |
− | | The [http://mathworld.wolfram.com/ExponentialIntegral.html Exponential Integral] function
| |
− | | expIntegral(x)
| |
− | |-
| |
− | | The [http://en.wikipedia.org/wiki/Riemann_zeta_function Reimann-Zeta] function ζ(x)
| |
− | | zeta(x)
| |
− | |}
| |
− | :{{example|1=<div>輸入<code><nowiki>Conjugate(17 + 3 * ί)</nowiki></code>會得到 ''-3 ί + 17'',即複數 ''17 + 3 ί''。</div> 更進一步資訊請參閱「[[:en:Complex Numbers|複數]] 」。}}
| |