Mathematical functions

The following mathematical functions are provided by PipeDream.

ABS

ABS(number)

Returns the absolute positive value of number.

BETA

BETA(a,b)

Returns the value of the Beta function for arguments a,b.

One definition of the Beta function is

beta(a, b) = gamma(a) × gamma(b) ÷ gamma(a + b)

This special function is actually evaluated by PipeDream using the formula

beta(a, b) = exp( gammaln(a) + gammaln(b) - gammaln(a + b) )

COMBIN

COMBIN(n,k)

This function yields the number of combinations of n unlike things taken k at a time.

The formula used is:

nCk = n! ÷ ((n - k)! × k!)

For very large n this is an approximation achieved using logarithms.

EXP

EXP(number)

Returns the constant e (2.71828184..) raised to the specified power.

FACT

FACT(n)

This function yields the factorial of n (most commonly shortened to n!). n must be an integer greater than or equal to zero.

The formula used is:

n! = n × (n - 1) ... × 2 × 1, ie n! = Πi=n i

If the result is too big to fit in an integer it becomes floating point.

For very large n this is an approximation achieved using logarithms.

GAMMALN

GAMMALN(number)

This special function yields the natural logarithm of the gamma function of number.

INT

INT(number)

Returns the integer part of number.

LN

LN(number)

Returns the natural logarithm of number. The number must be positive.

LOG

LOG(number)

Returns the logarithm to base 10 of number. The number must be positive.

MOD

MOD(a,b)

Gives the remainder after division of a by b.

PERMUT

PERMUT(n,k)

This function yields the number of permutations of n unlike things taken k at a time.

The formula used is:

nPk = n! ÷ (n - k)!

For very large n this is an approximation achieved using logarithms.

SGN

SGN(number)

Returns -1, 0, or 1 depending on whether number is negative, zero, or positive, non-zero respectively.

SQR

SQR(number)

Returns the positive square root of number. The number cannot be less than zero.

SUM

SUM(list)

Sum of the values in list.