MathTrig
Table of Contents
| factors() | mixed | |
|---|---|---|
| strSplit() | array | |
| ARABIC() | ARABIC. | int|string |
| calculateArabic() | Recursively calculate the arabic value of a roman numeral. | int |
| ATAN2() | ATAN2. | float|string |
| BASE() | BASE. | string |
| CEILING() | CEILING. | float|string |
| COMBIN() | COMBIN. | int|string |
| EVEN() | EVEN. | int|string |
| getEven() | int | |
| FACT() | FACT. | int|string |
| FACTDOUBLE() | FACTDOUBLE. | int|string |
| FLOOR() | FLOOR. | float|string |
| FLOORMATH() | FLOOR.MATH. | float|string |
| FLOORPRECISE() | FLOOR.PRECISE. | float|string |
| evaluateGCD() | mixed | |
| INT() | INT. | int|string |
| GCD() | GCD. | int|mixed|string |
| LCM() | LCM. | int|string |
| logBase() | LOG_BASE. | float|string |
| MDETERM() | MDETERM. | float|string |
| MINVERSE() | MINVERSE. | array|string |
| MMULT() | MMULT. | array|string |
| MOD() | MOD. | int|string |
| MROUND() | MROUND. | float|string |
| MULTINOMIAL() | MULTINOMIAL. | float|string |
| ODD() | ODD. | int|string |
| POWER() | POWER. | float|string |
| PRODUCT() | PRODUCT. | float |
| QUOTIENT() | QUOTIENT. | float |
| RAND() | RAND. | int |
| ROMAN() | ROMAN. | string |
| ROUNDUP() | ROUNDUP. | float|string |
| ROUNDDOWN() | ROUNDDOWN. | float|string |
| SERIESSUM() | SERIESSUM. | float|string |
| SIGN() | SIGN. | int|string |
| returnSign() | int | |
| SQRTPI() | SQRTPI. | float|string |
| filterHiddenArgs() | mixed | |
| filterFormulaArgs() | mixed | |
| SUBTOTAL() | SUBTOTAL. | float|string |
| SUM() | SUM. | float |
| SUMIF() | SUMIF. | float |
| SUMIFS() | SUMIFS. | float |
| SUMPRODUCT() | SUMPRODUCT. | float|string |
| SUMSQ() | SUMSQ. | float |
| SUMX2MY2() | SUMX2MY2. | float |
| SUMX2PY2() | SUMX2PY2. | float |
| SUMXMY2() | SUMXMY2. | float |
| TRUNC() | TRUNC. | float|string |
| SEC() | SEC. | float|string |
| SECH() | SECH. | float|string |
| CSC() | CSC. | float|string |
| CSCH() | CSCH. | float|string |
| COT() | COT. | float|string |
| COTH() | COTH. | float|string |
| ACOT() | ACOT. | float|string |
| numberOrNan() | Return NAN or value depending on argument. | float|string |
| ACOTH() | ACOTH. | float|string |
| builtinROUND() | ROUND. | float|string |
| builtinABS() | ABS. | float|int|string |
| builtinACOS() | ACOS. | float|string |
| builtinACOSH() | ACOSH. | float|string |
| builtinASIN() | ASIN. | float|string |
| builtinASINH() | ASINH. | float|string |
| builtinATAN() | ASIN. | float|string |
| builtinATANH() | ATANH. | float|string |
| builtinCOS() | COS. | float|string |
| builtinCOSH() | COSH. | float|string |
| builtinDEGREES() | DEGREES. | float|string |
| builtinEXP() | EXP. | float|string |
| builtinLN() | LN. | float|string |
| builtinLOG10() | LOG10. | float|string |
| builtinRADIANS() | RADIANS. | float|string |
| builtinSIN() | SIN. | float|string |
| builtinSINH() | SINH. | float|string |
| builtinSQRT() | SQRT. | float|string |
| builtinTAN() | TAN. | float|string |
| builtinTANH() | TANH. | float|string |
| verySmallDivisor() | bool | |
| nullFalseTrueToNumber() | Many functions accept null/false/true argument treated as 0/0/1. | void |
Methods
factors()
private
static factors(
$value :
mixed
)
: mixed
Parameters
- $value : mixed
Return values
mixedstrSplit()
private
static strSplit(
$roman :
string
)
: array
Parameters
- $roman : string
Return values
arrayARABIC()
ARABIC.
public
static ARABIC(
$roman :
string
)
: int|string
Converts a Roman numeral to an Arabic numeral.
Excel Function: ARABIC(text)
Parameters
- $roman : string
Return values
int|string —the arabic numberal contrived from the roman numeral
calculateArabic()
Recursively calculate the arabic value of a roman numeral.
protected
static calculateArabic(
$roman :
array
, &$sum :
int
, $subtract :
int
)
: int
Parameters
- $roman : array
- $sum : int
- $subtract : int
Return values
intATAN2()
ATAN2.
public
static ATAN2(
[ $xCoordinate :
float
= null ]
[, $yCoordinate :
float
= null ]
)
: 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 : float = null
the x-coordinate of the point
- $yCoordinate : float = null
the y-coordinate of the point
Return values
float|string —the inverse tangent of the specified x- and y-coordinates, or a string containing an error
BASE()
BASE.
public
static BASE(
$number :
float
, $radix :
float
[, $minLength :
int
= null ]
)
: 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
Return values
string —the text representation with the given radix (base)
CEILING()
CEILING.
public
static CEILING(
$number :
float
[, $significance :
float
= null ]
)
: 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
Return values
float|string —Rounded Number, or a string containing an error
COMBIN()
COMBIN.
public
static COMBIN(
$numObjs :
int
, $numInSet :
int
)
: 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 : int
Number of different objects
- $numInSet : int
Number of objects in each combination
Return values
int|string —Number of combinations, or a string containing an error
EVEN()
EVEN.
public
static EVEN(
$number :
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 : float
Number to round
Return values
int|string —Rounded Number, or a string containing an error
getEven()
public
static getEven(
$number :
float
)
: int
Parameters
- $number : float
Return values
intFACT()
FACT.
public
static FACT(
$factVal :
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 : float
Factorial Value
Return values
int|string —Factorial, or a string containing an error
FACTDOUBLE()
FACTDOUBLE.
public
static FACTDOUBLE(
$factVal :
float
)
: int|string
Returns the double factorial of a number.
Excel Function: FACTDOUBLE(factVal)
Parameters
- $factVal : float
Factorial Value
Return values
int|string —Double Factorial, or a string containing an error
FLOOR()
FLOOR.
public
static FLOOR(
$number :
float
[, $significance :
float
= null ]
)
: 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
Return values
float|string —Rounded Number, or a string containing an error
FLOORMATH()
FLOOR.MATH.
public
static FLOORMATH(
$number :
float
[, $significance :
float
= null ]
, $mode :
int
)
: 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
Return values
float|string —Rounded Number, or a string containing an error
FLOORPRECISE()
FLOOR.PRECISE.
public
static FLOORPRECISE(
$number :
float
[, $significance :
float
= 1 ]
)
: 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
Return values
float|string —Rounded Number, or a string containing an error
evaluateGCD()
private
static evaluateGCD(
$a :
mixed
, $b :
mixed
)
: mixed
Parameters
- $a : mixed
- $b : mixed
Return values
mixedINT()
INT.
public
static INT(
$number :
float
)
: int|string
Casts a floating point value to an integer
Excel Function: INT(number)
Parameters
- $number : float
Number to cast to an integer
Tags
Return values
int|string —Integer value, or a string containing an error
GCD()
GCD.
public
static GCD(
...$args :
mixed
)
: 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
Return values
int|mixed|string —Greatest Common Divisor, or a string containing an error
LCM()
LCM.
public
static LCM(
...$args :
mixed
)
: 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
Return values
int|string —Lowest Common Multiplier, or a string containing an error
logBase()
LOG_BASE.
public
static logBase(
[ $number :
float
= null ]
[, $base :
float
= 10 ]
)
: 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 = null
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.
Return values
float|string —The result, or a string containing an error
MDETERM()
MDETERM.
public
static MDETERM(
$matrixValues :
array
)
: float|string
Returns the matrix determinant of an array.
Excel Function: MDETERM(array)
Parameters
- $matrixValues : array
A matrix of values
Return values
float|string —The result, or a string containing an error
MINVERSE()
MINVERSE.
public
static MINVERSE(
$matrixValues :
array
)
: array|string
Returns the inverse matrix for the matrix stored in an array.
Excel Function: MINVERSE(array)
Parameters
- $matrixValues : array
A matrix of values
Return values
array|string —The result, or a string containing an error
MMULT()
MMULT.
public
static MMULT(
$matrixData1 :
array
, $matrixData2 :
array
)
: array|string
Parameters
- $matrixData1 : array
A matrix of values
- $matrixData2 : array
A matrix of values
Return values
array|string —The result, or a string containing an error
MOD()
MOD.
public
static MOD(
[ $a :
int
= 1 ]
[, $b :
int
= 1 ]
)
: int|string
Parameters
- $a : int = 1
Dividend
- $b : int = 1
Divisor
Return values
int|string —Remainder, or a string containing an error
MROUND()
MROUND.
public
static MROUND(
$number :
float
, $multiple :
int
)
: float|string
Rounds a number to the nearest multiple of a specified value
Parameters
- $number : float
Number to round
- $multiple : int
Multiple to which you want to round $number
Tags
Return values
float|string —Rounded Number, or a string containing an error
MULTINOMIAL()
MULTINOMIAL.
public
static MULTINOMIAL(
...$args :
array
)
: float|string
Returns the ratio of the factorial of a sum of values to the product of factorials.
Parameters
- $args : array
An array of mixed values for the Data Series
Return values
float|string —The result, or a string containing an error
ODD()
ODD.
public
static ODD(
$number :
float
)
: int|string
Returns number rounded up to the nearest odd integer.
Parameters
- $number : float
Number to round
Return values
int|string —Rounded Number, or a string containing an error
POWER()
POWER.
public
static POWER(
$x :
float
[, $y :
float
= 2 ]
)
: float|string
Computes x raised to the power y.
Parameters
- $x : float
- $y : float = 2
Return values
float|string —The result, or a string containing an error
PRODUCT()
PRODUCT.
public
static PRODUCT(
...$args :
mixed
)
: float
PRODUCT returns the product of all the values and cells referenced in the argument list.
Excel Function: PRODUCT(value1[,value2[, ...]])
Parameters
- $args : mixed
Data values
Return values
floatQUOTIENT()
QUOTIENT.
public
static QUOTIENT(
...$args :
mixed
)
: float
QUOTIENT function returns the integer portion of a division. Numerator is the divided number and denominator is the divisor.
Excel Function: QUOTIENT(value1[,value2[, ...]])
Parameters
- $args : mixed
Data values
Return values
floatRAND()
RAND.
public
static RAND(
$min :
int
, $max :
int
)
: int
Parameters
- $min : int
Minimal value
- $max : int
Maximal value
Return values
int —Random number
ROMAN()
ROMAN.
public
static ROMAN(
$aValue :
mixed
, $style :
mixed
)
: string
Converts a number to Roman numeral
Parameters
- $aValue : mixed
Number to convert
- $style : mixed
Number indicating one of five possible forms
Tags
Return values
string —Roman numeral, or a string containing an error
ROUNDUP()
ROUNDUP.
public
static ROUNDUP(
$number :
float
, $digits :
int
)
: float|string
Rounds a number up to a specified number of decimal places
Parameters
- $number : float
Number to round
- $digits : int
Number of digits to which you want to round $number
Tags
Return values
float|string —Rounded Number, or a string containing an error
ROUNDDOWN()
ROUNDDOWN.
public
static ROUNDDOWN(
$number :
float
, $digits :
int
)
: float|string
Rounds a number down to a specified number of decimal places
Parameters
- $number : float
Number to round
- $digits : int
Number of digits to which you want to round $number
Tags
Return values
float|string —Rounded Number, or a string containing an error
SERIESSUM()
SERIESSUM.
public
static SERIESSUM(
...$args :
array
)
: float|string
Returns the sum of a power series
Parameters
- $args : array
An array of mixed values for the Data Series
Return values
float|string —The result, or a string containing an error
SIGN()
SIGN.
public
static SIGN(
$number :
float
)
: 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 : float
Number to round
Return values
int|string —sign value, or a string containing an error
returnSign()
public
static returnSign(
$number :
float
)
: int
Parameters
- $number : float
Return values
intSQRTPI()
SQRTPI.
public
static SQRTPI(
$number :
float
)
: float|string
Returns the square root of (number * pi).
Parameters
- $number : float
Number
Return values
float|string —Square Root of Number * Pi, or a string containing an error
filterHiddenArgs()
protected
static filterHiddenArgs(
$cellReference :
mixed
, $args :
mixed
)
: mixed
Parameters
- $cellReference : mixed
- $args : mixed
Return values
mixedfilterFormulaArgs()
protected
static filterFormulaArgs(
$cellReference :
mixed
, $args :
mixed
)
: mixed
Parameters
- $cellReference : mixed
- $args : mixed
Return values
mixedSUBTOTAL()
SUBTOTAL.
public
static SUBTOTAL(
$functionType :
int
, ...$args :
array
)
: 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
A mixed data series of values
Return values
float|stringSUM()
SUM.
public
static SUM(
...$args :
mixed
)
: float
SUM computes the sum of all the values and cells referenced in the argument list.
Excel Function: SUM(value1[,value2[, ...]])
Parameters
- $args : mixed
Data values
Return values
floatSUMIF()
SUMIF.
public
static SUMIF(
$range :
mixed
, $criteria :
string
[, $sumRange :
mixed
= [] ]
)
: float
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
Return values
floatSUMIFS()
SUMIFS.
public
static SUMIFS(
...$args :
mixed
)
: float
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
Return values
floatSUMPRODUCT()
SUMPRODUCT.
public
static SUMPRODUCT(
...$args :
mixed
)
: float|string
Excel Function: SUMPRODUCT(value1[,value2[, ...]])
Parameters
- $args : mixed
Data values
Return values
float|string —The result, or a string containing an error
SUMSQ()
SUMSQ.
public
static SUMSQ(
...$args :
mixed
)
: float
SUMSQ returns the sum of the squares of the arguments
Excel Function: SUMSQ(value1[,value2[, ...]])
Parameters
- $args : mixed
Data values
Return values
floatSUMX2MY2()
SUMX2MY2.
public
static SUMX2MY2(
$matrixData1 :
array
, $matrixData2 :
array
)
: float
Parameters
- $matrixData1 : array
Matrix #1
- $matrixData2 : array
Matrix #2
Return values
floatSUMX2PY2()
SUMX2PY2.
public
static SUMX2PY2(
$matrixData1 :
array
, $matrixData2 :
array
)
: float
Parameters
- $matrixData1 : array
Matrix #1
- $matrixData2 : array
Matrix #2
Return values
floatSUMXMY2()
SUMXMY2.
public
static SUMXMY2(
$matrixData1 :
array
, $matrixData2 :
array
)
: float
Parameters
- $matrixData1 : array
Matrix #1
- $matrixData2 : array
Matrix #2
Return values
floatTRUNC()
TRUNC.
public
static TRUNC(
$value :
float
, $digits :
int
)
: float|string
Truncates value to the number of fractional digits by number_digits.
Parameters
- $value : float
- $digits : int
Tags
Return values
float|string —Truncated value, or a string containing an error
SEC()
SEC.
public
static SEC(
$angle :
float
)
: float|string
Returns the secant of an angle.
Parameters
- $angle : float
Number
Return values
float|string —The secant of the angle
SECH()
SECH.
public
static SECH(
$angle :
float
)
: float|string
Returns the hyperbolic secant of an angle.
Parameters
- $angle : float
Number
Return values
float|string —The hyperbolic secant of the angle
CSC()
CSC.
public
static CSC(
$angle :
float
)
: float|string
Returns the cosecant of an angle.
Parameters
- $angle : float
Number
Return values
float|string —The cosecant of the angle
CSCH()
CSCH.
public
static CSCH(
$angle :
float
)
: float|string
Returns the hyperbolic cosecant of an angle.
Parameters
- $angle : float
Number
Return values
float|string —The hyperbolic cosecant of the angle
COT()
COT.
public
static COT(
$angle :
float
)
: float|string
Returns the cotangent of an angle.
Parameters
- $angle : float
Number
Return values
float|string —The cotangent of the angle
COTH()
COTH.
public
static COTH(
$angle :
float
)
: float|string
Returns the hyperbolic cotangent of an angle.
Parameters
- $angle : float
Number
Return values
float|string —The hyperbolic cotangent of the angle
ACOT()
ACOT.
public
static ACOT(
$number :
float
)
: float|string
Returns the arccotangent of a number.
Parameters
- $number : float
Number
Return values
float|string —The arccotangent of the number
numberOrNan()
Return NAN or value depending on argument.
public
static numberOrNan(
$result :
float
)
: float|string
Parameters
- $result : float
Number
Return values
float|stringACOTH()
ACOTH.
public
static ACOTH(
$number :
float
)
: float|string
Returns the hyperbolic arccotangent of a number.
Parameters
- $number : float
Number
Return values
float|string —The hyperbolic arccotangent of the number
builtinROUND()
ROUND.
public
static builtinROUND(
$number :
mixed
, $precision :
mixed
)
: float|string
Returns the result of builtin function round after validating args.
Parameters
- $number : mixed
Should be numeric
- $precision : mixed
Should be int
Tags
Return values
float|string —Rounded number
builtinABS()
ABS.
public
static builtinABS(
$number :
mixed
)
: float|int|string
Returns the result of builtin function abs after validating args.
Parameters
- $number : mixed
Should be numeric
Return values
float|int|string —Rounded number
builtinACOS()
ACOS.
public
static builtinACOS(
$number :
mixed
)
: float|string
Returns the result of builtin function acos after validating args.
Parameters
- $number : mixed
Should be numeric
Return values
float|string —Rounded number
builtinACOSH()
ACOSH.
public
static builtinACOSH(
$number :
mixed
)
: float|string
Returns the result of builtin function acosh after validating args.
Parameters
- $number : mixed
Should be numeric
Return values
float|string —Rounded number
builtinASIN()
ASIN.
public
static builtinASIN(
$number :
mixed
)
: float|string
Returns the result of builtin function asin after validating args.
Parameters
- $number : mixed
Should be numeric
Return values
float|string —Rounded number
builtinASINH()
ASINH.
public
static builtinASINH(
$number :
mixed
)
: float|string
Returns the result of builtin function asinh after validating args.
Parameters
- $number : mixed
Should be numeric
Return values
float|string —Rounded number
builtinATAN()
ASIN.
public
static builtinATAN(
$number :
mixed
)
: float|string
Returns the result of builtin function atan after validating args.
Parameters
- $number : mixed
Should be numeric
Return values
float|string —Rounded number
builtinATANH()
ATANH.
public
static builtinATANH(
$number :
mixed
)
: float|string
Returns the result of builtin function atanh after validating args.
Parameters
- $number : mixed
Should be numeric
Return values
float|string —Rounded number
builtinCOS()
COS.
public
static builtinCOS(
$number :
mixed
)
: float|string
Returns the result of builtin function cos after validating args.
Parameters
- $number : mixed
Should be numeric
Return values
float|string —Rounded number
builtinCOSH()
COSH.
public
static builtinCOSH(
$number :
mixed
)
: float|string
Returns the result of builtin function cos after validating args.
Parameters
- $number : mixed
Should be numeric
Return values
float|string —Rounded number
builtinDEGREES()
DEGREES.
public
static builtinDEGREES(
$number :
mixed
)
: float|string
Returns the result of builtin function rad2deg after validating args.
Parameters
- $number : mixed
Should be numeric
Return values
float|string —Rounded number
builtinEXP()
EXP.
public
static builtinEXP(
$number :
mixed
)
: float|string
Returns the result of builtin function exp after validating args.
Parameters
- $number : mixed
Should be numeric
Return values
float|string —Rounded number
builtinLN()
LN.
public
static builtinLN(
$number :
mixed
)
: float|string
Returns the result of builtin function log after validating args.
Parameters
- $number : mixed
Should be numeric
Return values
float|string —Rounded number
builtinLOG10()
LOG10.
public
static builtinLOG10(
$number :
mixed
)
: float|string
Returns the result of builtin function log after validating args.
Parameters
- $number : mixed
Should be numeric
Return values
float|string —Rounded number
builtinRADIANS()
RADIANS.
public
static builtinRADIANS(
$number :
mixed
)
: float|string
Returns the result of builtin function deg2rad after validating args.
Parameters
- $number : mixed
Should be numeric
Return values
float|string —Rounded number
builtinSIN()
SIN.
public
static builtinSIN(
$number :
mixed
)
: float|string
Returns the result of builtin function sin after validating args.
Parameters
- $number : mixed
Should be numeric
Return values
float|string —Rounded number
builtinSINH()
SINH.
public
static builtinSINH(
$number :
mixed
)
: float|string
Returns the result of builtin function sinh after validating args.
Parameters
- $number : mixed
Should be numeric
Return values
float|string —Rounded number
builtinSQRT()
SQRT.
public
static builtinSQRT(
$number :
mixed
)
: float|string
Returns the result of builtin function sqrt after validating args.
Parameters
- $number : mixed
Should be numeric
Return values
float|string —Rounded number
builtinTAN()
TAN.
public
static builtinTAN(
$number :
mixed
)
: float|string
Returns the result of builtin function tan after validating args.
Parameters
- $number : mixed
Should be numeric
Return values
float|string —Rounded number
builtinTANH()
TANH.
public
static builtinTANH(
$number :
mixed
)
: float|string
Returns the result of builtin function sinh after validating args.
Parameters
- $number : mixed
Should be numeric
Return values
float|string —Rounded number
verySmallDivisor()
private
static verySmallDivisor(
$number :
float
)
: bool
Parameters
- $number : float
Return values
boolnullFalseTrueToNumber()
Many functions accept null/false/true argument treated as 0/0/1.
public
static nullFalseTrueToNumber(
&$number :
mixed
)
: void
Parameters
- $number : mixed