Open main menu

Extension:MathStatFunctions

MediaWiki extensions manual
OOjs UI icon advanced.svg
MathStatFunction
Release status: unmaintained
Implementation Parser function
Description Provides math-specific and statistic specific parser functions.
Author(s) Carl Fürstenberg (AzaTothtalk)
MediaWiki 1.8+
License No license specified
Download Template:WikimediaDownload/svn
Translate the MathStatFunctions extension if it is available at translatewiki.net
Check usage and version matrix.

The MathStatFunctions extension is a collection of Math and Statistical functions.

InstallationEdit

  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/MathStatFunctions/MathStatFunctions.php";
    
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

FunctionsEdit

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

{{ #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 functionsEdit

#mean:Edit

{{ #mean: expr|expr|... }}

Calculates the mean value of given expressions


#median:Edit

{{ #median: expr|expr|... }}

Calculates the median value of given expressions

trigonometric functionsEdit

#tan:Edit

{{ #tan: expr }}

Calculates the tangents of given expression

#cot:Edit

{{ #cot: expr }}

Calculates the cotangents of given expression

#acot:Edit

{{ #acot: expr }}
{{ #arccot: expr }}

Calculates the arccotangents of given expression

#atan:Edit

{{ #atan: expr }}
{{ #arctan: expr }}

Calculates the arctangents of given expression

#tanh:Edit

{{ #tanh: expr }}

Calculates the hyperbolic tangents of given expression

#atanh:Edit

{{ #atanh: expr }}
{{ #arctanh: expr }}

Calculates the hyperbolic arctangents of given expression

#cos:Edit

{{ #cos: expr }}

Calculates the cosinus of given expression

#sec:Edit

{{ #sec: expr }}

Calculates the secant of given expression

#asec:Edit

{{ #asec: expr }}
{{ #arcsec: expr }}

Calculates the arcsecant of given expression

#acos:Edit

{{ #acos: expr }}
{{ #arccos: expr }}

Calculates the arccosinus of given expression

#cosh:Edit

{{ #cosh: expr }}

Calculates the hyperbolic cosinus of given expression

#acosh:Edit

{{ #acosh: expr }}
{{ #arccosh: expr }}

Calculates the hyperbolic arccosinus of given expression


#sin:Edit

{{ #sin: expr }}

Calculates the sinus of given expression

#csc:Edit

{{ #csc: expr }}

Calculates the cosecant of given expression


#acsc:Edit

{{ #acsc: expr }}
{{ #arccsc: expr }}

Calculates the arccosecant of given expression

#asin:Edit

{{ #asin: expr }}
{{ #arcsin: expr }}

Calculates the arcsinus of given expression

#sinh:Edit

{{ #sinh: expr }}

Calculates the hyperbolic sinus of given expression

#asinh:Edit

{{ #asinh: expr }}
{{ #arcsinh: expr }}

Calculates the hyperbolic arcsinus of given expression

logarithmic and exponential functionsEdit

#ln:Edit

{{ #ln: expr }}

Calculates the natural logarithm of given expression


#log:Edit

{{ #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

{{ #exp: expr }}

Calculates the value of  

See alsoEdit