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 |
floatThe x-coordinate of the point.
floatThe y-coordinate of the point.
floatThe 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 |
floatThe number you want to round.
floatThe multiple to which you want to round.
floatRounded 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 |
intNumber of different objects
intNumber of objects in each combination
intNumber 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 |
floatNumber to round
intRounded 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 |
floatFactorial Value
intFactorialFACTDOUBLE(float $factVal) : int
Returns the double factorial of a number.
Excel Function: FACTDOUBLE(factVal)
| access | public |
|---|---|
| category | Mathematical and Trigonometric Functions |
floatFactorial Value
intDouble 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 |
floatNumber to round
floatSignificance
floatRounded 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 |
integerGreatest Common DivisorINT(float $number) : integer
Casts a floating point value to an integer
Excel Function: INT(number)
| access | public |
|---|---|
| category | Mathematical and Trigonometric Functions |
floatNumber to cast to an integer
integerInteger 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 |
intLowest 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 |
floatThe positive real number for which you want the logarithm
floatThe base of the logarithm. If base is omitted, it is assumed to be 10.
floatMDETERM(array $matrixValues) : float
Returns the matrix determinant of an array.
Excel Function: MDETERM(array)
| access | public |
|---|---|
| category | Mathematical and Trigonometric Functions |
arrayA matrix of values
floatMINVERSE(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 |
arrayA matrix of values
arrayMMULT(array $matrixData1, array $matrixData2) : array
arrayA matrix of values
arrayA matrix of values
arrayMOD(int $a, int $b) : int
intDividend
intDivisor
intRemainderMROUND(float $number, int $multiple) : float
Rounds a number to the nearest multiple of a specified value
floatNumber to round
intMultiple to which you want to round $number
floatRounded NumberMULTINOMIAL() : float
Returns the ratio of the factorial of a sum of values to the product of factorials.
floatODD(float $number) : int
Returns number rounded up to the nearest odd integer.
floatNumber to round
intRounded NumberPOWER(float $x, float $y) : float
Computes x raised to the power y.
float
float
floatPRODUCT() : 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 |
floatQUOTIENT() : 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 |
floatRAND(int $min, int $max) : int
intMinimal value
intMaximal value
intRandom numberROMAN($aValue, $style)
ROUNDDOWN(float $number, int $digits) : float
Rounds a number down to a specified number of decimal places
floatNumber to round
intNumber of digits to which you want to round $number
floatRounded NumberROUNDUP(float $number, int $digits) : float
Rounds a number up to a specified number of decimal places
floatNumber to round
intNumber of digits to which you want to round $number
floatRounded NumberSERIESSUM() : float
Returns the sum of a power series
floatSIGN(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.
floatNumber to round
intsign valueSQRTPI(float $number) : float
Returns the square root of (number * pi).
floatNumber
floatSquare Root of Number * PiSUBTOTAL() : float
Returns a subtotal in a list or database.
floatSUM() : 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 |
floatSUMIF($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 |
stringThe criteria that defines which cells will be summed.
floatSUMPRODUCT() : float
Excel Function: SUMPRODUCT(value1[,value2[, ...]])
| access | public |
|---|---|
| category | Mathematical and Trigonometric Functions |
floatSUMSQ() : float
SUMSQ returns the sum of the squares of the arguments
Excel Function: SUMSQ(value1[,value2[, ...]])
| access | public |
|---|---|
| category | Mathematical and Trigonometric Functions |
floatSUMX2MY2(mixed[] $matrixData1, mixed[] $matrixData2) : float
mixed[]Matrix #1
mixed[]Matrix #2
floatSUMX2PY2(mixed[] $matrixData1, mixed[] $matrixData2) : float
mixed[]Matrix #1
mixed[]Matrix #2
floatSUMXMY2(mixed[] $matrixData1, mixed[] $matrixData2) : float
mixed[]Matrix #1
mixed[]Matrix #2
floatTRUNC(float $value, int $digits) : float
Truncates value to the number of fractional digits by number_digits.
float
int
floatTruncated value_factors($value)
_romanCut($num, $n)