PHPExcel_Calculation_MathTrig
category | PHPExcel |
---|---|
package | PHPExcel_Calculation |
copyright | Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) |
ATAN2(float $xCoordinate, float $yCoordinate) : float
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)
access | public |
---|---|
category | Mathematical and Trigonometric Functions |
float
The x-coordinate of the point.
float
The y-coordinate of the point.
float
The inverse tangent of the specified x- and y-coordinates.CEILING(float $number, float $significance) : float
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])
access | public |
---|---|
category | Mathematical and Trigonometric Functions |
float
The number you want to round.
float
The multiple to which you want to round.
float
Rounded NumberCOMBIN(int $numObjs, int $numInSet) : int
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)
access | public |
---|---|
category | Mathematical and Trigonometric Functions |
int
Number of different objects
int
Number of objects in each combination
int
Number of combinationsEVEN(float $number) : int
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)
access | public |
---|---|
category | Mathematical and Trigonometric Functions |
float
Number to round
int
Rounded NumberFACT(float $factVal) : int
Returns the factorial of a number. The factorial of a number is equal to 123... number.
Excel Function: FACT(factVal)
access | public |
---|---|
category | Mathematical and Trigonometric Functions |
float
Factorial Value
int
FactorialFACTDOUBLE(float $factVal) : int
Returns the double factorial of a number.
Excel Function: FACTDOUBLE(factVal)
access | public |
---|---|
category | Mathematical and Trigonometric Functions |
float
Factorial Value
int
Double FactorialFLOOR(float $number, float $significance) : float
Rounds number down, toward zero, to the nearest multiple of significance.
Excel Function: FLOOR(number[,significance])
access | public |
---|---|
category | Mathematical and Trigonometric Functions |
float
Number to round
float
Significance
float
Rounded NumberGCD() : integer
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[, ...]])
access | public |
---|---|
category | Mathematical and Trigonometric Functions |
integer
Greatest Common DivisorINT(float $number) : integer
Casts a floating point value to an integer
Excel Function: INT(number)
access | public |
---|---|
category | Mathematical and Trigonometric Functions |
float
Number to cast to an integer
integer
Integer valueLCM() : int
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[, ...]])
access | public |
---|---|
category | Mathematical and Trigonometric Functions |
int
Lowest Common MultiplierLOG_BASE(float $number, float $base) : float
Returns the logarithm of a number to a specified base. The default base is 10.
Excel Function: LOG(number[,base])
access | public |
---|---|
category | Mathematical and Trigonometric Functions |
float
The positive real number for which you want the logarithm
float
The base of the logarithm. If base is omitted, it is assumed to be 10.
float
MDETERM(array $matrixValues) : float
Returns the matrix determinant of an array.
Excel Function: MDETERM(array)
access | public |
---|---|
category | Mathematical and Trigonometric Functions |
array
A matrix of values
float
MINVERSE(array $matrixValues) : array
Returns the inverse matrix for the matrix stored in an array.
Excel Function: MINVERSE(array)
access | public |
---|---|
category | Mathematical and Trigonometric Functions |
array
A matrix of values
array
MMULT(array $matrixData1, array $matrixData2) : array
array
A matrix of values
array
A matrix of values
array
MOD(int $a, int $b) : int
int
Dividend
int
Divisor
int
RemainderMROUND(float $number, int $multiple) : float
Rounds a number to the nearest multiple of a specified value
float
Number to round
int
Multiple to which you want to round $number
float
Rounded NumberMULTINOMIAL() : float
Returns the ratio of the factorial of a sum of values to the product of factorials.
float
ODD(float $number) : int
Returns number rounded up to the nearest odd integer.
float
Number to round
int
Rounded NumberPOWER(float $x, float $y) : float
Computes x raised to the power y.
float
float
float
PRODUCT() : float
PRODUCT returns the product of all the values and cells referenced in the argument list.
Excel Function: PRODUCT(value1[,value2[, ...]])
access | public |
---|---|
category | Mathematical and Trigonometric Functions |
float
QUOTIENT() : 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[, ...]])
access | public |
---|---|
category | Mathematical and Trigonometric Functions |
float
RAND(int $min, int $max) : int
int
Minimal value
int
Maximal value
int
Random numberROMAN($aValue, $style)
ROUNDDOWN(float $number, int $digits) : float
Rounds a number down to a specified number of decimal places
float
Number to round
int
Number of digits to which you want to round $number
float
Rounded NumberROUNDUP(float $number, int $digits) : float
Rounds a number up to a specified number of decimal places
float
Number to round
int
Number of digits to which you want to round $number
float
Rounded NumberSERIESSUM() : float
Returns the sum of a power series
float
SIGN(float $number) : int
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.
float
Number to round
int
sign valueSQRTPI(float $number) : float
Returns the square root of (number * pi).
float
Number
float
Square Root of Number * PiSUBTOTAL() : float
Returns a subtotal in a list or database.
float
SUM() : float
SUM computes the sum of all the values and cells referenced in the argument list.
Excel Function: SUM(value1[,value2[, ...]])
access | public |
---|---|
category | Mathematical and Trigonometric Functions |
float
SUMIF($aArgs, string $condition, $sumArgs) : float
Counts the number of cells that contain numbers within the list of arguments
Excel Function: SUMIF(value1[,value2[, ...]],condition)
access | public |
---|---|
category | Mathematical and Trigonometric Functions |
string
The criteria that defines which cells will be summed.
float
SUMPRODUCT() : float
Excel Function: SUMPRODUCT(value1[,value2[, ...]])
access | public |
---|---|
category | Mathematical and Trigonometric Functions |
float
SUMSQ() : float
SUMSQ returns the sum of the squares of the arguments
Excel Function: SUMSQ(value1[,value2[, ...]])
access | public |
---|---|
category | Mathematical and Trigonometric Functions |
float
SUMX2MY2(mixed[] $matrixData1, mixed[] $matrixData2) : float
mixed[]
Matrix #1
mixed[]
Matrix #2
float
SUMX2PY2(mixed[] $matrixData1, mixed[] $matrixData2) : float
mixed[]
Matrix #1
mixed[]
Matrix #2
float
SUMXMY2(mixed[] $matrixData1, mixed[] $matrixData2) : float
mixed[]
Matrix #1
mixed[]
Matrix #2
float
TRUNC(float $value, int $digits) : float
Truncates value to the number of fractional digits by number_digits.
float
int
float
Truncated value_factors($value)
_romanCut($num, $n)