Documentation

MathTrig

Tags
deprecated
1.18.0

Table of Contents

ACOT()  : array<string|int, mixed>|float|string
ACOT.
ACOTH()  : array<string|int, mixed>|float|string
ACOTH.
ARABIC()  : array<string|int, mixed>|int|string
ARABIC.
ATAN2()  : array<string|int, mixed>|float|string
ATAN2.
BASE()  : array<string|int, mixed>|string
BASE.
builtinABS()  : array<string|int, mixed>|float|int|string
ABS.
builtinACOS()  : array<string|int, mixed>|float|string
ACOS.
builtinACOSH()  : array<string|int, mixed>|float|string
ACOSH.
builtinASIN()  : array<string|int, mixed>|float|string
ASIN.
builtinASINH()  : array<string|int, mixed>|float|string
ASINH.
builtinATAN()  : array<string|int, mixed>|float|string
ATAN.
builtinATANH()  : array<string|int, mixed>|float|string
ATANH.
builtinCOS()  : array<string|int, mixed>|float|string
COS.
builtinCOSH()  : array<string|int, mixed>|float|string
COSH.
builtinDEGREES()  : array<string|int, mixed>|float|string
DEGREES.
builtinEXP()  : array<string|int, mixed>|float|string
EXP.
builtinLN()  : array<string|int, mixed>|float|string
LN.
builtinLOG10()  : array<string|int, mixed>|float|string
LOG10.
builtinRADIANS()  : array<string|int, mixed>|float|string
RADIANS.
builtinROUND()  : array<string|int, mixed>|float|string
ROUND.
builtinSIN()  : array<string|int, mixed>|float|string
SIN.
builtinSINH()  : array<string|int, mixed>|float|string
SINH.
builtinSQRT()  : array<string|int, mixed>|float|string
SQRT.
builtinTAN()  : array<string|int, mixed>|float|string
TAN.
builtinTANH()  : array<string|int, mixed>|float|string
TANH.
CEILING()  : array<string|int, mixed>|float|string
CEILING.
COMBIN()  : array<string|int, mixed>|float|int|string
COMBIN.
COT()  : array<string|int, mixed>|float|string
COT.
COTH()  : array<string|int, mixed>|float|string
COTH.
CSC()  : array<string|int, mixed>|float|string
CSC.
CSCH()  : array<string|int, mixed>|float|string
CSCH.
EVEN()  : array<string|int, mixed>|float|int|string
EVEN.
FACT()  : array<string|int, mixed>|float|int|string
FACT.
FACTDOUBLE()  : array<string|int, mixed>|float|int|string
FACTDOUBLE.
FLOOR()  : array<string|int, mixed>|float|string
FLOOR.
FLOORMATH()  : array<string|int, mixed>|float|string
FLOOR.MATH.
FLOORPRECISE()  : array<string|int, mixed>|float|string
FLOOR.PRECISE.
GCD()  : int|mixed|string
GCD.
getEven()  : int
Helper function for Even.
INT()  : array<string|int, mixed>|int|string
INT.
LCM()  : int|string
LCM.
logBase()  : array<string|int, mixed>|float|string
LOG_BASE.
MDETERM()  : float|string
MDETERM.
MINVERSE()  : array<string|int, mixed>|string
MINVERSE.
MMULT()  : array<string|int, mixed>|string
MMULT.
MOD()  : array<string|int, mixed>|float|int|string
MOD.
MROUND()  : array<string|int, mixed>|float|string
MROUND.
MULTINOMIAL()  : float|string
MULTINOMIAL.
nullFalseTrueToNumber()  : void
Many functions accept null/false/true argument treated as 0/0/1.
numberOrNan()  : float|string
Return NAN or value depending on argument.
ODD()  : array<string|int, mixed>|float|int|string
ODD.
POWER()  : array<string|int, mixed>|float|int|string
POWER.
PRODUCT()  : float|string
PRODUCT.
QUOTIENT()  : array<string|int, mixed>|int|string
QUOTIENT.
RAND()  : array<string|int, mixed>|float|int|string
RAND/RANDBETWEEN.
returnSign()  : int
returnSign = returns 0/-1/+1.
ROMAN()  : array<string|int, mixed>|string
ROMAN.
ROUNDDOWN()  : array<string|int, mixed>|float|string
ROUNDDOWN.
ROUNDUP()  : array<string|int, mixed>|float|string
ROUNDUP.
SEC()  : array<string|int, mixed>|float|string
SEC.
SECH()  : array<string|int, mixed>|float|string
SECH.
SERIESSUM()  : array<string|int, mixed>|float|string
SERIESSUM.
SIGN()  : array<string|int, mixed>|int|string
SIGN.
SQRTPI()  : array<string|int, mixed>|float|string
SQRTPI.
SUBTOTAL()  : float|string
SUBTOTAL.
SUM()  : float|string
SUM.
SUMIF()  : float|string
SUMIF.
SUMIFS()  : null|float|string
SUMIFS.
SUMPRODUCT()  : float|string
SUMPRODUCT.
SUMSQ()  : float|string
SUMSQ.
SUMX2MY2()  : float|string
SUMX2MY2.
SUMX2PY2()  : float|string
SUMX2PY2.
SUMXMY2()  : float|string
SUMXMY2.
TRUNC()  : array<string|int, mixed>|float|string
TRUNC.

Methods

ACOT()

ACOT.

public static ACOT(array<string|int, mixed>|float $number) : array<string|int, mixed>|float|string

Returns the arccotangent of a number.

Parameters
$number : array<string|int, mixed>|float

Number

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Cotangent::acot() Use the acot method in the MathTrig\Trig\Cotangent class instead

Return values
array<string|int, mixed>|float|string

The arccotangent of the number

ACOTH()

ACOTH.

public static ACOTH(array<string|int, mixed>|float $number) : array<string|int, mixed>|float|string

Returns the hyperbolic arccotangent of a number.

Parameters
$number : array<string|int, mixed>|float

Number

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Cotangent::acoth() Use the acoth method in the MathTrig\Trig\Cotangent class instead

Return values
array<string|int, mixed>|float|string

The hyperbolic arccotangent of the number

ARABIC()

ARABIC.

public static ARABIC(array<string|int, mixed>|string $roman) : array<string|int, mixed>|int|string

Converts a Roman numeral to an Arabic numeral.

Excel Function: ARABIC(text)

Parameters
$roman : array<string|int, mixed>|string
Tags
Deprecated

1.18.0

See

MathTrig\Arabic::evaluate() Use the evaluate method in the MathTrig\Arabic class instead

Return values
array<string|int, mixed>|int|string

the arabic numberal contrived from the roman numeral

ATAN2()

ATAN2.

public static ATAN2([array<string|int, mixed>|float $xCoordinate = null ][, array<string|int, mixed>|float $yCoordinate = null ]) : array<string|int, mixed>|float|string

This function calculates the arc tangent of the two variables x and y. It is similar to calculating the arc tangent of y รท x, except that the signs of both arguments are used to determine the quadrant of the result. The arctangent is the angle from the x-axis to a line containing the origin (0, 0) and a point with coordinates (xCoordinate, yCoordinate). The angle is given in radians between -pi and pi, excluding -pi.

Note that the Excel ATAN2() function accepts its arguments in the reverse order to the standard PHP atan2() function, so we need to reverse them here before calling the PHP atan() function.

Excel Function: ATAN2(xCoordinate,yCoordinate)

Parameters
$xCoordinate : array<string|int, mixed>|float = null

the x-coordinate of the point

$yCoordinate : array<string|int, mixed>|float = null

the y-coordinate of the point

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Tangent::atan2() Use the atan2 method in the MathTrig\Trig\Tangent class instead

Return values
array<string|int, mixed>|float|string

the inverse tangent of the specified x- and y-coordinates, or a string containing an error

BASE()

BASE.

public static BASE(float $number, float $radix[, int $minLength = null ]) : array<string|int, mixed>|string

Converts a number into a text representation with the given radix (base).

Excel Function: BASE(Number, Radix [Min_length])

Parameters
$number : float
$radix : float
$minLength : int = null
Tags
Deprecated

1.18.0

See

MathTrig\Base::evaluate() Use the evaluate method in the MathTrig\Base class instead

Return values
array<string|int, mixed>|string

the text representation with the given radix (base)

builtinABS()

ABS.

public static builtinABS(array<string|int, mixed>|mixed $number) : array<string|int, mixed>|float|int|string

Returns the result of builtin function abs after validating args.

Parameters
$number : array<string|int, mixed>|mixed

Should be numeric

Tags
Deprecated

1.18.0

See

MathTrig\Absolute::evaluate() Use the evaluate method in the MathTrig\Absolute class instead

Return values
array<string|int, mixed>|float|int|string

Rounded number

builtinACOS()

ACOS.

public static builtinACOS(array<string|int, mixed>|float $number) : array<string|int, mixed>|float|string
Parameters
$number : array<string|int, mixed>|float

Should be numeric

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Cosine::acos() Use the acos method in the MathTrig\Trig\Cosine class instead

Returns the result of builtin function acos after validating args.

Return values
array<string|int, mixed>|float|string

Rounded number

builtinACOSH()

ACOSH.

public static builtinACOSH(array<string|int, mixed>|float $number) : array<string|int, mixed>|float|string

Returns the result of builtin function acosh after validating args.

Parameters
$number : array<string|int, mixed>|float

Should be numeric

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Cosine::acosh() Use the acosh method in the MathTrig\Trig\Cosine class instead

Return values
array<string|int, mixed>|float|string

Rounded number

builtinASIN()

ASIN.

public static builtinASIN(array<string|int, mixed>|float $number) : array<string|int, mixed>|float|string

Returns the result of builtin function asin after validating args.

Parameters
$number : array<string|int, mixed>|float

Should be numeric

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Sine::asin() Use the asin method in the MathTrig\Trig\Sine class instead

Return values
array<string|int, mixed>|float|string

Rounded number

builtinASINH()

ASINH.

public static builtinASINH(array<string|int, mixed>|float $number) : array<string|int, mixed>|float|string

Returns the result of builtin function asinh after validating args.

Parameters
$number : array<string|int, mixed>|float

Should be numeric

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Sine::asinh() Use the asinh method in the MathTrig\Trig\Sine class instead

Return values
array<string|int, mixed>|float|string

Rounded number

builtinATAN()

ATAN.

public static builtinATAN(array<string|int, mixed>|float $number) : array<string|int, mixed>|float|string

Returns the result of builtin function atan after validating args.

Parameters
$number : array<string|int, mixed>|float

Should be numeric

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Tangent::atan() Use the atan method in the MathTrig\Trig\Tangent class instead

Return values
array<string|int, mixed>|float|string

Rounded number

builtinATANH()

ATANH.

public static builtinATANH(array<string|int, mixed>|float $number) : array<string|int, mixed>|float|string

Returns the result of builtin function atanh after validating args.

Parameters
$number : array<string|int, mixed>|float

Should be numeric

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Tangent::atanh() Use the atanh method in the MathTrig\Trig\Tangent class instead

Return values
array<string|int, mixed>|float|string

Rounded number

builtinCOS()

COS.

public static builtinCOS(array<string|int, mixed>|mixed $number) : array<string|int, mixed>|float|string

Returns the result of builtin function cos after validating args.

Parameters
$number : array<string|int, mixed>|mixed

Should be numeric

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Cosine::cos() Use the cos method in the MathTrig\Trig\Cosine class instead

Return values
array<string|int, mixed>|float|string

Rounded number

builtinCOSH()

COSH.

public static builtinCOSH(array<string|int, mixed>|mixed $number) : array<string|int, mixed>|float|string

Returns the result of builtin function cos after validating args.

Parameters
$number : array<string|int, mixed>|mixed

Should be numeric

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Cosine::cosh() Use the cosh method in the MathTrig\Trig\Cosine class instead

Return values
array<string|int, mixed>|float|string

Rounded number

builtinDEGREES()

DEGREES.

public static builtinDEGREES(array<string|int, mixed>|mixed $number) : array<string|int, mixed>|float|string

Returns the result of builtin function rad2deg after validating args.

Parameters
$number : array<string|int, mixed>|mixed

Should be numeric

Tags
Deprecated

1.18.0

See

MathTrig\Angle::toDegrees() Use the toDegrees method in the MathTrig\Angle class instead

Return values
array<string|int, mixed>|float|string

Rounded number

builtinEXP()

EXP.

public static builtinEXP(array<string|int, mixed>|mixed $number) : array<string|int, mixed>|float|string

Returns the result of builtin function exp after validating args.

Parameters
$number : array<string|int, mixed>|mixed

Should be numeric

Tags
Deprecated

1.18.0

See

MathTrig\Exp::evaluate() Use the evaluate method in the MathTrig\Exp class instead

Return values
array<string|int, mixed>|float|string

Rounded number

builtinLN()

LN.

public static builtinLN(mixed $number) : array<string|int, mixed>|float|string

Returns the result of builtin function log after validating args.

Parameters
$number : mixed

Should be numeric

Tags
Deprecated

1.18.0

See

MathTrig\Logarithms::natural() Use the natural method in the MathTrig\Logarithms class instead

Return values
array<string|int, mixed>|float|string

Rounded number

builtinLOG10()

LOG10.

public static builtinLOG10(mixed $number) : array<string|int, mixed>|float|string

Returns the result of builtin function log after validating args.

Parameters
$number : mixed

Should be numeric

Tags
Deprecated

1.18.0

See

MathTrig\Logarithms::base10() Use the natural method in the MathTrig\Logarithms class instead

Return values
array<string|int, mixed>|float|string

Rounded number

builtinRADIANS()

RADIANS.

public static builtinRADIANS(array<string|int, mixed>|mixed $number) : array<string|int, mixed>|float|string

Returns the result of builtin function deg2rad after validating args.

Parameters
$number : array<string|int, mixed>|mixed

Should be numeric

Tags
Deprecated

1.18.0

See

MathTrig\Angle::toRadians() Use the toRadians method in the MathTrig\Angle class instead

Return values
array<string|int, mixed>|float|string

Rounded number

builtinROUND()

ROUND.

public static builtinROUND(array<string|int, mixed>|mixed $number, array<string|int, mixed>|mixed $precision) : array<string|int, mixed>|float|string

Returns the result of builtin function round after validating args.

Parameters
$number : array<string|int, mixed>|mixed

Should be numeric

$precision : array<string|int, mixed>|mixed

Should be int

Tags
Deprecated

1.17.0

See

MathTrig\Round::round() Use the round() method in the MathTrig\Round class instead

Return values
array<string|int, mixed>|float|string

Rounded number

builtinSIN()

SIN.

public static builtinSIN(array<string|int, mixed>|mixed $number) : array<string|int, mixed>|float|string

Returns the result of builtin function sin after validating args.

Parameters
$number : array<string|int, mixed>|mixed

Should be numeric

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Sine::evaluate() Use the sin method in the MathTrig\Trig\Sine class instead

Return values
array<string|int, mixed>|float|string

sine

builtinSINH()

SINH.

public static builtinSINH(array<string|int, mixed>|mixed $number) : array<string|int, mixed>|float|string

Returns the result of builtin function sinh after validating args.

Parameters
$number : array<string|int, mixed>|mixed

Should be numeric

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Sine::sinh() Use the sinh method in the MathTrig\Trig\Sine class instead

Return values
array<string|int, mixed>|float|string

Rounded number

builtinSQRT()

SQRT.

public static builtinSQRT(array<string|int, mixed>|mixed $number) : array<string|int, mixed>|float|string

Returns the result of builtin function sqrt after validating args.

Parameters
$number : array<string|int, mixed>|mixed

Should be numeric

Tags
Deprecated

1.18.0

See

MathTrig\Sqrt::sqrt() Use the sqrt method in the MathTrig\Sqrt class instead

Return values
array<string|int, mixed>|float|string

Rounded number

builtinTAN()

TAN.

public static builtinTAN(array<string|int, mixed>|mixed $number) : array<string|int, mixed>|float|string

Returns the result of builtin function tan after validating args.

Parameters
$number : array<string|int, mixed>|mixed

Should be numeric

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Tangent::tan() Use the tan method in the MathTrig\Trig\Tangent class instead

Return values
array<string|int, mixed>|float|string

Rounded number

builtinTANH()

TANH.

public static builtinTANH(array<string|int, mixed>|mixed $number) : array<string|int, mixed>|float|string

Returns the result of builtin function sinh after validating args.

Parameters
$number : array<string|int, mixed>|mixed

Should be numeric

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Tangent::tanh() Use the tanh method in the MathTrig\Trig\Tangent class instead

Return values
array<string|int, mixed>|float|string

Rounded number

CEILING()

CEILING.

public static CEILING(float $number[, float $significance = null ]) : array<string|int, mixed>|float|string

Returns number rounded up, away from zero, to the nearest multiple of significance. For example, if you want to avoid using pennies in your prices and your product is priced at $4.42, use the formula =CEILING(4.42,0.05) to round prices up to the nearest nickel.

Excel Function: CEILING(number[,significance])

Parameters
$number : float

the number you want to round

$significance : float = null

the multiple to which you want to round

Tags
Deprecated

1.17.0

see
Ceiling::ceiling()

Use the ceiling() method in the MathTrig\Ceiling class instead

Return values
array<string|int, mixed>|float|string

Rounded Number, or a string containing an error

COMBIN()

COMBIN.

public static COMBIN(array<string|int, mixed>|int $numObjs, array<string|int, mixed>|int $numInSet) : array<string|int, mixed>|float|int|string

Returns the number of combinations for a given number of items. Use COMBIN to determine the total possible number of groups for a given number of items.

Excel Function: COMBIN(numObjs,numInSet)

Parameters
$numObjs : array<string|int, mixed>|int

Number of different objects

$numInSet : array<string|int, mixed>|int

Number of objects in each combination

Tags
Deprecated

1.18.0

see
Combinations::withoutRepetition()

Use the withoutRepetition() method in the MathTrig\Combinations class instead

Return values
array<string|int, mixed>|float|int|string

Number of combinations, or a string containing an error

COT()

COT.

public static COT(array<string|int, mixed>|float $angle) : array<string|int, mixed>|float|string

Returns the cotangent of an angle.

Parameters
$angle : array<string|int, mixed>|float

Number

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Cotangent::cot() Use the cot method in the MathTrig\Trig\Cotangent class instead

Return values
array<string|int, mixed>|float|string

The cotangent of the angle

COTH()

COTH.

public static COTH(array<string|int, mixed>|float $angle) : array<string|int, mixed>|float|string

Returns the hyperbolic cotangent of an angle.

Parameters
$angle : array<string|int, mixed>|float

Number

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Cotangent::coth() Use the coth method in the MathTrig\Trig\Cotangent class instead

Return values
array<string|int, mixed>|float|string

The hyperbolic cotangent of the angle

CSC()

CSC.

public static CSC(array<string|int, mixed>|float $angle) : array<string|int, mixed>|float|string

Returns the cosecant of an angle.

Parameters
$angle : array<string|int, mixed>|float

Number

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Cosecant::csc() Use the csc method in the MathTrig\Trig\Cosecant class instead

Return values
array<string|int, mixed>|float|string

The cosecant of the angle

CSCH()

CSCH.

public static CSCH(array<string|int, mixed>|float $angle) : array<string|int, mixed>|float|string

Returns the hyperbolic cosecant of an angle.

Parameters
$angle : array<string|int, mixed>|float

Number

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Cosecant::csch() Use the csch method in the MathTrig\Trig\Cosecant class instead

Return values
array<string|int, mixed>|float|string

The hyperbolic cosecant of the angle

EVEN()

EVEN.

public static EVEN(array<string|int, mixed>|float $number) : array<string|int, mixed>|float|int|string

Returns number rounded up to the nearest even integer. You can use this function for processing items that come in twos. For example, a packing crate accepts rows of one or two items. The crate is full when the number of items, rounded up to the nearest two, matches the crate's capacity.

Excel Function: EVEN(number)

Parameters
$number : array<string|int, mixed>|float

Number to round

Tags
Deprecated

1.18.0

see
Round::even()

Use the even() method in the MathTrig\Round class instead

Return values
array<string|int, mixed>|float|int|string

Rounded Number, or a string containing an error

FACT()

FACT.

public static FACT(array<string|int, mixed>|float $factVal) : array<string|int, mixed>|float|int|string

Returns the factorial of a number. The factorial of a number is equal to 123*...* number.

Excel Function: FACT(factVal)

Parameters
$factVal : array<string|int, mixed>|float

Factorial Value

Tags
Deprecated

1.18.0

see
Factorial::fact()

Use the fact() method in the MathTrig\Factorial class instead

Return values
array<string|int, mixed>|float|int|string

Factorial, or a string containing an error

FACTDOUBLE()

FACTDOUBLE.

public static FACTDOUBLE(array<string|int, mixed>|float $factVal) : array<string|int, mixed>|float|int|string

Returns the double factorial of a number.

Excel Function: FACTDOUBLE(factVal)

Parameters
$factVal : array<string|int, mixed>|float

Factorial Value

Tags
Deprecated

1.18.0

see
Factorial::factDouble()

Use the factDouble() method in the MathTrig\Factorial class instead

Return values
array<string|int, mixed>|float|int|string

Double Factorial, or a string containing an error

FLOOR()

FLOOR.

public static FLOOR(float $number[, float $significance = null ]) : array<string|int, mixed>|float|string

Rounds number down, toward zero, to the nearest multiple of significance.

Excel Function: FLOOR(number[,significance])

Parameters
$number : float

Number to round

$significance : float = null

Significance

Tags
Deprecated

1.17.0

see
Floor::floor()

Use the floor() method in the MathTrig\Floor class instead

Return values
array<string|int, mixed>|float|string

Rounded Number, or a string containing an error

FLOORMATH()

FLOOR.MATH.

public static FLOORMATH(float $number[, float $significance = null ], int $mode) : array<string|int, mixed>|float|string

Round a number down to the nearest integer or to the nearest multiple of significance.

Excel Function: FLOOR.MATH(number[,significance[,mode]])

Parameters
$number : float

Number to round

$significance : float = null

Significance

$mode : int

direction to round negative numbers

Tags
Deprecated

1.17.0

see
Floor::math()

Use the math() method in the MathTrig\Floor class instead

Return values
array<string|int, mixed>|float|string

Rounded Number, or a string containing an error

FLOORPRECISE()

FLOOR.PRECISE.

public static FLOORPRECISE(float $number[, float $significance = 1 ]) : array<string|int, mixed>|float|string

Rounds number down, toward zero, to the nearest multiple of significance.

Excel Function: FLOOR.PRECISE(number[,significance])

Parameters
$number : float

Number to round

$significance : float = 1

Significance

Tags
Deprecated

1.17.0

see
Floor::precise()

Use the precise() method in the MathTrig\Floor class instead

Return values
array<string|int, mixed>|float|string

Rounded Number, or a string containing an error

GCD()

GCD.

public static GCD(mixed ...$args) : int|mixed|string

Returns the greatest common divisor of a series of numbers. The greatest common divisor is the largest integer that divides both number1 and number2 without a remainder.

Excel Function: GCD(number1[,number2[, ...]])

Parameters
$args : mixed

Data values

Tags
Deprecated

1.18.0

see
Gcd::evaluate()

Use the evaluate() method in the MathTrig\Gcd class instead

Return values
int|mixed|string

Greatest Common Divisor, or a string containing an error

getEven()

Helper function for Even.

public static getEven(float $number) : int
Parameters
$number : float
Tags
Deprecated

1.18.0

see
Helpers::getEven()

Use the evaluate() method in the MathTrig\Helpers class instead

Return values
int

INT()

INT.

public static INT(array<string|int, mixed>|float $number) : array<string|int, mixed>|int|string

Casts a floating point value to an integer

Excel Function: INT(number)

Parameters
$number : array<string|int, mixed>|float

Number to cast to an integer

Tags
Deprecated

1.17.0

see
IntClass::evaluate()

Use the evaluate() method in the MathTrig\IntClass class instead

Return values
array<string|int, mixed>|int|string

Integer value, or a string containing an error

LCM()

LCM.

public static LCM(mixed ...$args) : int|string

Returns the lowest common multiplier of a series of numbers The least common multiple is the smallest positive integer that is a multiple of all integer arguments number1, number2, and so on. Use LCM to add fractions with different denominators.

Excel Function: LCM(number1[,number2[, ...]])

Parameters
$args : mixed

Data values

Tags
Deprecated

1.18.0

see
Lcm::evaluate()

Use the evaluate() method in the MathTrig\Lcm class instead

Return values
int|string

Lowest Common Multiplier, or a string containing an error

logBase()

LOG_BASE.

public static logBase(float $number[, float $base = 10 ]) : array<string|int, mixed>|float|string

Returns the logarithm of a number to a specified base. The default base is 10.

Excel Function: LOG(number[,base])

Parameters
$number : float

The positive real number for which you want the logarithm

$base : float = 10

The base of the logarithm. If base is omitted, it is assumed to be 10.

Tags
Deprecated

1.18.0

see
Logarithms::withBase()

Use the withBase() method in the MathTrig\Logarithms class instead

Return values
array<string|int, mixed>|float|string

The result, or a string containing an error

MDETERM()

MDETERM.

public static MDETERM(array<string|int, mixed> $matrixValues) : float|string

Returns the matrix determinant of an array.

Excel Function: MDETERM(array)

Parameters
$matrixValues : array<string|int, mixed>

A matrix of values

Tags
Deprecated

1.18.0

see
MatrixFunctions::determinant()

Use the determinant() method in the MathTrig\MatrixFunctions class instead

Return values
float|string

The result, or a string containing an error

MINVERSE()

MINVERSE.

public static MINVERSE(array<string|int, mixed> $matrixValues) : array<string|int, mixed>|string

Returns the inverse matrix for the matrix stored in an array.

Excel Function: MINVERSE(array)

Parameters
$matrixValues : array<string|int, mixed>

A matrix of values

Tags
Deprecated

1.18.0

see
MatrixFunctions::inverse()

Use the inverse() method in the MathTrig\MatrixFunctions class instead

Return values
array<string|int, mixed>|string

The result, or a string containing an error

MMULT()

MMULT.

public static MMULT(array<string|int, mixed> $matrixData1, array<string|int, mixed> $matrixData2) : array<string|int, mixed>|string
Parameters
$matrixData1 : array<string|int, mixed>

A matrix of values

$matrixData2 : array<string|int, mixed>

A matrix of values

Tags
Deprecated

1.18.0

see
MatrixFunctions::multiply()

Use the multiply() method in the MathTrig\MatrixFunctions class instead

Return values
array<string|int, mixed>|string

The result, or a string containing an error

MOD()

MOD.

public static MOD([int $a = 1 ][, int $b = 1 ]) : array<string|int, mixed>|float|int|string
Parameters
$a : int = 1

Dividend

$b : int = 1

Divisor

Tags
Deprecated

1.18.0

see
Operations::mod()

Use the mod() method in the MathTrig\Operations class instead

Return values
array<string|int, mixed>|float|int|string

Remainder, or a string containing an error

MROUND()

MROUND.

public static MROUND(float $number, array<string|int, mixed>|int $multiple) : array<string|int, mixed>|float|string

Rounds a number to the nearest multiple of a specified value

Parameters
$number : float

Number to round

$multiple : array<string|int, mixed>|int

Multiple to which you want to round $number

Tags
Deprecated

1.17.0

see
Round::multiple()

Use the multiple() method in the MathTrig\Mround class instead

Return values
array<string|int, mixed>|float|string

Rounded Number, or a string containing an error

MULTINOMIAL()

MULTINOMIAL.

public static MULTINOMIAL(array<string|int, mixed> ...$args) : float|string

Returns the ratio of the factorial of a sum of values to the product of factorials.

Parameters
$args : array<string|int, mixed>

An array of mixed values for the Data Series

Tags
Deprecated

1.18.0

See

MathTrig\Factorial::multinomial() Use the multinomial method in the MathTrig\Factorial class instead

Return values
float|string

The result, or a string containing an error

nullFalseTrueToNumber()

Many functions accept null/false/true argument treated as 0/0/1.

public static nullFalseTrueToNumber(mixed &$number) : void
Parameters
$number : mixed
Tags
Deprecated

1.18.0

See

MathTrig\Helpers::validateNumericNullBool() Use the validateNumericNullBool method in the MathTrig\Helpers class instead

Return values
void

numberOrNan()

Return NAN or value depending on argument.

public static numberOrNan(float $result) : float|string
Parameters
$result : float

Number

Tags
Deprecated

1.18.0

See

MathTrig\Helpers::numberOrNan() Use the numberOrNan method in the MathTrig\Helpers class instead

Return values
float|string

ODD()

ODD.

public static ODD(array<string|int, mixed>|float $number) : array<string|int, mixed>|float|int|string

Returns number rounded up to the nearest odd integer.

Parameters
$number : array<string|int, mixed>|float

Number to round

Tags
Deprecated

1.18.0

See

MathTrig\Round::odd() Use the odd method in the MathTrig\Round class instead

Return values
array<string|int, mixed>|float|int|string

Rounded Number, or a string containing an error

POWER()

POWER.

public static POWER(float $x[, float $y = 2 ]) : array<string|int, mixed>|float|int|string

Computes x raised to the power y.

Parameters
$x : float
$y : float = 2
Tags
Deprecated

1.18.0

See

MathTrig\Operations::power() Use the evaluate method in the MathTrig\Power class instead

Return values
array<string|int, mixed>|float|int|string

The result, or a string containing an error

PRODUCT()

PRODUCT.

public static PRODUCT(mixed ...$args) : float|string

PRODUCT returns the product of all the values and cells referenced in the argument list.

Parameters
$args : mixed

Data values

Tags
Deprecated

1.18.0

See

MathTrig\Operations::product() Use the product method in the MathTrig\Operations class instead

Excel Function: PRODUCT(value1[,value2[, ...]])

Return values
float|string

QUOTIENT()

QUOTIENT.

public static QUOTIENT(mixed $numerator, mixed $denominator) : array<string|int, mixed>|int|string

QUOTIENT function returns the integer portion of a division. Numerator is the divided number and denominator is the divisor.

Parameters
$numerator : mixed
$denominator : mixed
Tags
Deprecated

1.18.0

See

MathTrig\Operations::quotient() Use the quotient method in the MathTrig\Operations class instead

Excel Function: QUOTIENT(value1[,value2[, ...]])

Return values
array<string|int, mixed>|int|string

RAND()

RAND/RANDBETWEEN.

public static RAND(int $min, int $max) : array<string|int, mixed>|float|int|string
Parameters
$min : int

Minimal value

$max : int

Maximal value

Tags
Deprecated

1.18.0

See

MathTrig\Random::randBetween() Use the randBetween or randBetween method in the MathTrig\Random class instead

Return values
array<string|int, mixed>|float|int|string

Random number

returnSign()

returnSign = returns 0/-1/+1.

public static returnSign(float $number) : int
Parameters
$number : float
Tags
Deprecated

1.18.0

See

MathTrig\Helpers::returnSign() Use the returnSign method in the MathTrig\Helpers class instead

Return values
int

ROMAN()

ROMAN.

public static ROMAN(mixed $aValue, mixed $style) : array<string|int, mixed>|string

Converts a number to Roman numeral

Parameters
$aValue : mixed

Number to convert

$style : mixed

Number indicating one of five possible forms

Tags
Deprecated

1.17.0

Ssee

MathTrig\Roman::evaluate() Use the evaluate() method in the MathTrig\Roman class instead

Return values
array<string|int, mixed>|string

Roman numeral, or a string containing an error

ROUNDDOWN()

ROUNDDOWN.

public static ROUNDDOWN(array<string|int, mixed>|float $number, array<string|int, mixed>|int $digits) : array<string|int, mixed>|float|string

Rounds a number down to a specified number of decimal places

Parameters
$number : array<string|int, mixed>|float

Number to round

$digits : array<string|int, mixed>|int

Number of digits to which you want to round $number

Tags
Deprecated

1.17.0

See

MathTrig\Round::down() Use the down() method in the MathTrig\Round class instead

Return values
array<string|int, mixed>|float|string

Rounded Number, or a string containing an error

ROUNDUP()

ROUNDUP.

public static ROUNDUP(array<string|int, mixed>|float $number, array<string|int, mixed>|int $digits) : array<string|int, mixed>|float|string

Rounds a number up to a specified number of decimal places

Parameters
$number : array<string|int, mixed>|float

Number to round

$digits : array<string|int, mixed>|int

Number of digits to which you want to round $number

Tags
Deprecated

1.17.0

See

MathTrig\Round::up() Use the up() method in the MathTrig\Round class instead

Return values
array<string|int, mixed>|float|string

Rounded Number, or a string containing an error

SEC()

SEC.

public static SEC(array<string|int, mixed>|float $angle) : array<string|int, mixed>|float|string

Returns the secant of an angle.

Parameters
$angle : array<string|int, mixed>|float

Number

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Secant::sec() Use the sec method in the MathTrig\Trig\Secant class instead

Return values
array<string|int, mixed>|float|string

The secant of the angle

SECH()

SECH.

public static SECH(array<string|int, mixed>|float $angle) : array<string|int, mixed>|float|string

Returns the hyperbolic secant of an angle.

Parameters
$angle : array<string|int, mixed>|float

Number

Tags
Deprecated

1.18.0

See

MathTrig\Trig\Secant::sech() Use the sech method in the MathTrig\Trig\Secant class instead

Return values
array<string|int, mixed>|float|string

The hyperbolic secant of the angle

SERIESSUM()

SERIESSUM.

public static SERIESSUM(mixed $x, mixed $n, mixed $m, array<string|int, mixed> ...$args) : array<string|int, mixed>|float|string

Returns the sum of a power series

Parameters
$x : mixed

Input value

$n : mixed

Initial power

$m : mixed

Step

$args : array<string|int, mixed>

An array of coefficients for the Data Series

Tags
Deprecated

1.18.0

See

MathTrig\SeriesSum::evaluate() Use the evaluate method in the MathTrig\SeriesSum class instead

Return values
array<string|int, mixed>|float|string

The result, or a string containing an error

SIGN()

SIGN.

public static SIGN(array<string|int, mixed>|float $number) : array<string|int, mixed>|int|string

Determines the sign of a number. Returns 1 if the number is positive, zero (0) if the number is 0, and -1 if the number is negative.

Parameters
$number : array<string|int, mixed>|float

Number to round

Tags
Deprecated

1.18.0

See

MathTrig\Sign::evaluate() Use the evaluate method in the MathTrig\Sign class instead

Return values
array<string|int, mixed>|int|string

sign value, or a string containing an error

SQRTPI()

SQRTPI.

public static SQRTPI(array<string|int, mixed>|float $number) : array<string|int, mixed>|float|string

Returns the square root of (number * pi).

Parameters
$number : array<string|int, mixed>|float

Number

Tags
Deprecated

1.18.0

See

MathTrig\Sqrt::sqrt() Use the pi method in the MathTrig\Sqrt class instead

Return values
array<string|int, mixed>|float|string

Square Root of Number * Pi, or a string containing an error

SUBTOTAL()

SUBTOTAL.

public static SUBTOTAL(int $functionType, array<string|int, mixed> ...$args) : float|string

Returns a subtotal in a list or database.

Parameters
$functionType : int

A number 1 to 11 that specifies which function to use in calculating subtotals within a range list Numbers 101 to 111 shadow the functions of 1 to 11 but ignore any values in the range that are in hidden rows or columns

$args : array<string|int, mixed>

A mixed data series of values

Tags
Deprecated

1.18.0

See

MathTrig\Subtotal::evaluate() Use the evaluate method in the MathTrig\Subtotal class instead

Return values
float|string

SUM()

SUM.

public static SUM(mixed ...$args) : float|string

SUM computes the sum of all the values and cells referenced in the argument list.

Parameters
$args : mixed

Data values

Tags
Deprecated

1.18.0

See

MathTrig\Sum::sumErroringStrings() Use the sumErroringStrings method in the MathTrig\Sum class instead

Excel Function: SUM(value1[,value2[, ...]])

Return values
float|string

SUMIF()

SUMIF.

public static SUMIF(mixed $range, string $criteria[, mixed $sumRange = [] ]) : float|string

Totals the values of cells that contain numbers within the list of arguments

Excel Function: SUMIF(range, criteria, [sum_range])

Parameters
$range : mixed

Data values

$criteria : string

the criteria that defines which cells will be summed

$sumRange : mixed = []
Tags
Deprecated

1.17.0

see
Conditional::SUMIF()

Use the SUMIF() method in the Statistical\Conditional class instead

Return values
float|string

SUMIFS()

SUMIFS.

public static SUMIFS(mixed ...$args) : null|float|string

Totals the values of cells that contain numbers within the list of arguments

Excel Function: SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)

Parameters
$args : mixed

Data values

Tags
Deprecated

1.17.0

see
Conditional::SUMIFS()

Use the SUMIFS() method in the Statistical\Conditional class instead

Return values
null|float|string

SUMPRODUCT()

SUMPRODUCT.

public static SUMPRODUCT(mixed ...$args) : float|string

Excel Function: SUMPRODUCT(value1[,value2[, ...]])

Parameters
$args : mixed

Data values

Tags
Deprecated

1.18.0

See

MathTrig\Sum::product() Use the product method in the MathTrig\Sum class instead

Return values
float|string

The result, or a string containing an error

SUMSQ()

SUMSQ.

public static SUMSQ(mixed ...$args) : float|string

SUMSQ returns the sum of the squares of the arguments

Parameters
$args : mixed

Data values

Tags
Deprecated

1.18.0

See

MathTrig\SumSquares::sumSquare() Use the sumSquare method in the MathTrig\SumSquares class instead

Excel Function: SUMSQ(value1[,value2[, ...]])

Return values
float|string

SUMX2MY2()

SUMX2MY2.

public static SUMX2MY2(array<string|int, mixed> $matrixData1, array<string|int, mixed> $matrixData2) : float|string
Parameters
$matrixData1 : array<string|int, mixed>

Matrix #1

$matrixData2 : array<string|int, mixed>

Matrix #2

Tags
Deprecated

1.18.0

See

MathTrig\SumSquares::sumXSquaredMinusYSquared() Use the sumXSquaredMinusYSquared method in the MathTrig\SumSquares class instead

Return values
float|string

SUMX2PY2()

SUMX2PY2.

public static SUMX2PY2(array<string|int, mixed> $matrixData1, array<string|int, mixed> $matrixData2) : float|string
Parameters
$matrixData1 : array<string|int, mixed>

Matrix #1

$matrixData2 : array<string|int, mixed>

Matrix #2

Tags
Deprecated

1.18.0

See

MathTrig\SumSquares::sumXSquaredPlusYSquared() Use the sumXSquaredPlusYSquared method in the MathTrig\SumSquares class instead

Return values
float|string

SUMXMY2()

SUMXMY2.

public static SUMXMY2(array<string|int, mixed> $matrixData1, array<string|int, mixed> $matrixData2) : float|string
Parameters
$matrixData1 : array<string|int, mixed>

Matrix #1

$matrixData2 : array<string|int, mixed>

Matrix #2

Tags
Deprecated

1.18.0

See

MathTrig\SumSquares::sumXMinusYSquared() Use the sumXMinusYSquared method in the MathTrig\SumSquares class instead

Return values
float|string

TRUNC()

TRUNC.

public static TRUNC(float $value, int $digits) : array<string|int, mixed>|float|string

Truncates value to the number of fractional digits by number_digits.

Parameters
$value : float
$digits : int
Tags
Deprecated

1.17.0

see
Trunc::evaluate()

Use the evaluate() method in the MathTrig\Trunc class instead

Return values
array<string|int, mixed>|float|string

Truncated value, or a string containing an error

Search results