<< Click to Display Table of Contents >> Math Functions |
![]() ![]() ![]() |
Math Functions
Pi() Dimensionless <- ()
|
π (Ratio of circumference to diameter for a circle). Pi is dimensionless.
|
Min(a,b[,c,d,e]), Max(a,b[,c,d,e]), Bound(x,a,b) |
Min and Max return the minimum or maximum of up to five supplied arguments. All arguments must have the same units, and the result will be in those units. Bound returns a if x<a, x if a≤x≤b, and b if x>b and is equivalent to min(max(a,x),b). Result will be in units of x, a, and b, which must be the same.
|
Modulo(a,b) |
Remainder when a is divided by b. a and b must be in the same units, and result will be in those units.
|
Sin(a), Cos(a), Tan(a) |
Sine, cosine or tangent of radian angle a, which must be dimensionless.
|
Asin(x), Acos(x), Atan(x) |
Inverse sine, cosine or tangent of x, in radians. Both x and the result are dimensionless.
|
Sinh(x), Cosh(x), Tanh(x) |
Hyperbolic sine, cosine or tangent of x. Result is dimensionless.
|
Abs(x), Sign(x) |
Absolute value of x, Signum (sign) function of x. ABS will return units of x, sign will return dimensionless units.
|
Exp(x), Pow(b,x) |
Exp raises e to the argument, Pow raises base b to power x. b^x is the equivalent of pow(b,x). Power must be dimensionless. Base must usually be dimensionless, but in simple cases units are accepted. For example, if b has units of meters, the result of b^2 will have units of meters*meters.
|
GammaLn(x) |
Computes the logarithm of the gamma function. The gamma function can be thought of as a generalized factorial that interpolates non-integer inputs. Gamma(n) = (n-1)!, so x! = Exp(GammaLn(x+1)). Computing factorials directly should be done with caution, as Exp(GammaLn(.)) becomes large very quickly.
|
Sqrt(x) SquareRoot(x) |
Returns the positive square root of x. Normally, x must be dimensionless, as will be the result. When x has a simple squared unit (such as meters*meters), the result will have the appropriate units (meters).
|
Log(x), Log10(x) |
Natural (base e) logarithm, or base 10 logarithm of x. Input and result must be dimensionless.
|
Xidz(a,b,x) Zidz(a,b) |
Xidz ("x if divide by zero") returns x if b=0, or a/b otherwise. Zidz ("zero if divide by zero") is equivalent to Xidz(a,b,0). Returns units of a/b.
|
ValidOrX(value,x), ValidOrZero(value) |
Return the input value, or a specified value if the input is invalid. See also: IsValid. |