Extension:MathStatFunctions
MathStatFunction Release status: beta |
|
---|---|
Implementation | Parser function |
Description | Addition of math-specific and statistic specific parser functions. |
Author(s) | Carl Fürstenberg (AzaTothtalk) |
Latest version | continuous updating |
MediaWiki | > 1.8 |
License | No license specified |
Download | |
Translate the MathStatFunctions extension if it is available at translatewiki.net |
|
Check usage and version matrix; code metrics |
MathStatFunctions is a MediaWiki extension that is a collection of Math and Statistical functions.
Contents
Functions[edit | edit source]
This module defines the following functions: {{ #const: key }}, {{ #mean: expr|expr|... }}, {{ #median: expr|expr|... }}, {{ #tan: expr }}, {{ #atan: expr }}, {{ #tanh: expr }} ,{{ #atanh: expr }}, {{ #cot: expr }}, {{ #cos: expr }}, {{ #acos: expr }}, {{ #cosh: expr }}, {{ #acosh: expr }}, {{ #sec: expr }}, {{ #sin: expr }}, {{ #asin: expr }}, {{ #sinh: expr }}, {{ #asinh: expr }}, {{ #csc: expr }}, {{ #ln: expr }}, {{ #log: expr }}, {{ #exp: expr }}, {{ #acot: expr }}, {{ #acsc: expr }}, {{ #asec: expr }}
#const:[edit | edit source]
{{ #const: key }}
returns the constant based on a key, which are:
- pi
- pi/2
- pi/4
- 1/pi
- 2/pi
- sqrt(pi)
- 2/sqrt(pi)
- e
- log_2(e)
- log_10(e)
- ln(2)
- ln(10)
- sqrt(2)
- sqrt(10)
- 1/sqrt(2) or sqrt(1/2)
- ln(pi)
- euler
- brion
statistical functions[edit | edit source]
#mean:[edit | edit source]
{{ #mean: expr|expr|... }}
Calculates the mean value of given expressions
#median:[edit | edit source]
{{ #median: expr|expr|... }}
Calculates the median value of given expressions
trigonometric functions[edit | edit source]
#tan:[edit | edit source]
{{ #tan: expr }}
Calculates the tangents of given expression
#cot:[edit | edit source]
{{ #cot: expr }}
Calculates the cotangents of given expression
#acot:[edit | edit source]
{{ #acot: expr }} {{ #arccot: expr }}
Calculates the arccotangents of given expression
#atan:[edit | edit source]
{{ #atan: expr }} {{ #arctan: expr }}
Calculates the arctangents of given expression
#tanh:[edit | edit source]
{{ #tanh: expr }}
Calculates the hyperbolic tangents of given expression
#atanh:[edit | edit source]
{{ #atanh: expr }} {{ #arctanh: expr }}
Calculates the hyperbolic arctangents of given expression
#cos:[edit | edit source]
{{ #cos: expr }}
Calculates the cosinus of given expression
#sec:[edit | edit source]
{{ #sec: expr }}
Calculates the secant of given expression
#asec:[edit | edit source]
{{ #asec: expr }} {{ #arcsec: expr }}
Calculates the arcsecant of given expression
#acos:[edit | edit source]
{{ #acos: expr }} {{ #arccos: expr }}
Calculates the arccosinus of given expression
#cosh:[edit | edit source]
{{ #cosh: expr }}
Calculates the hyperbolic cosinus of given expression
#acosh:[edit | edit source]
{{ #acosh: expr }} {{ #arccosh: expr }}
Calculates the hyperbolic arccosinus of given expression
#sin:[edit | edit source]
{{ #sin: expr }}
Calculates the sinus of given expression
#csc:[edit | edit source]
{{ #csc: expr }}
Calculates the cosecant of given expression
#acsc:[edit | edit source]
{{ #acsc: expr }} {{ #arccsc: expr }}
Calculates the arccosecant of given expression
#asin:[edit | edit source]
{{ #asin: expr }} {{ #arcsin: expr }}
Calculates the arcsinus of given expression
#sinh:[edit | edit source]
{{ #sinh: expr }}
Calculates the hyperbolic sinus of given expression
#asinh:[edit | edit source]
{{ #asinh: expr }} {{ #arcsinh: expr }}
Calculates the hyperbolic arcsinus of given expression
logarithmic and exponential functions[edit | edit source]
#ln:[edit | edit source]
{{ #ln: expr }}
Calculates the natural logarithm of given expression
#log:[edit | edit source]
{{ #log: expr }}
Calculates the logarithm in base 10 for given expression
{{ #log: expr|base }}
Calculates the logarithm in base base for given expression
#exp:[edit | edit source]
{{ #exp: expr }}
Calculates the value of
Installation[edit | edit source]
Requires MediaWiki 1.8 or later, also requires an active installation of ParserFunctions
Download both the files and put them in a new directory called MathStatFunctions in your extensions directory.
The MathStatFunctions extension requires MediaWiki 1.8 or above.
- For MediaWiki 1.11.0 and above, use the trunk version
- For the MediaWiki 1,8, 1.9 and 1.10 series, use the branched version
Then put the following at the end of your LocalSettings.php:
require_once( "$IP/extensions/MathStatFunctions/MathStatFunctions.php" );