Overview

Packages

  • JAMA
  • None
  • PHP
  • PHPExcel
    • CachedObjectStorage
    • Calculation
    • Cell
    • Chart
      • Renderer
    • Reader
      • Excel2007
      • Excel5
    • RichText
    • Settings
    • Shared
      • Escher
      • OLE
      • Trend
      • ZipArchive
    • Style
    • Worksheet
      • Drawing
    • Writer
      • 2007
      • CSV
      • Excel2007
      • Excel5
      • HTML
      • PDF

Classes

  • PHPExcel_CalcEngine_CyclicReferenceStack
  • PHPExcel_CalcEngine_Logger
  • PHPExcel_Calculation
  • PHPExcel_Calculation_Database
  • PHPExcel_Calculation_DateTime
  • PHPExcel_Calculation_Engineering
  • PHPExcel_Calculation_ExceptionHandler
  • PHPExcel_Calculation_Financial
  • PHPExcel_Calculation_FormulaParser
  • PHPExcel_Calculation_FormulaToken
  • PHPExcel_Calculation_Function
  • PHPExcel_Calculation_Functions
  • PHPExcel_Calculation_Logical
  • PHPExcel_Calculation_LookupRef
  • PHPExcel_Calculation_MathTrig
  • PHPExcel_Calculation_Statistical
  • PHPExcel_Calculation_TextData
  • PHPExcel_Calculation_Token_Stack

Exceptions

  • PHPExcel_Calculation_Exception

Functions

  • acosh
  • asinh
  • atanh
  • mb_str_replace
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download

Class PHPExcel_Calculation_MathTrig

PHPExcel_Calculation_MathTrig

Package: PHPExcel\Calculation
Category: PHPExcel
Copyright: Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
License: LGPL
Located at controlador/include/phpexcel/PHPExcel/Calculation/MathTrig.php
Methods summary
private static
# _factors( $value )
private static
# _romanCut( $num, $n )
public static float
# ATAN2( float $xCoordinate = NULL, float $yCoordinate = NULL )

ATAN2

ATAN2

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
The x-coordinate of the point.
$yCoordinate
The y-coordinate of the point.

Returns

float
The inverse tangent of the specified x- and y-coordinates.

Category

Mathematical and Trigonometric Functions
public static float
# CEILING( float $number, float $significance = NULL )

CEILING

CEILING

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
The number you want to round.
$significance
The multiple to which you want to round.

Returns

float
Rounded Number

Category

Mathematical and Trigonometric Functions
public static integer
# COMBIN( integer $numObjs, integer $numInSet )

COMBIN

COMBIN

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
Number of different objects
$numInSet
Number of objects in each combination

Returns

integer
Number of combinations

Category

Mathematical and Trigonometric Functions
public static integer
# EVEN( float $number )

EVEN

EVEN

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
Number to round

Returns

integer
Rounded Number

Category

Mathematical and Trigonometric Functions
public static integer
# FACT( float $factVal )

FACT

FACT

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

Excel Function: FACT(factVal)

Parameters

$factVal
Factorial Value

Returns

integer
Factorial

Category

Mathematical and Trigonometric Functions
public static integer
# FACTDOUBLE( float $factVal )

FACTDOUBLE

FACTDOUBLE

Returns the double factorial of a number.

Excel Function: FACTDOUBLE(factVal)

Parameters

$factVal
Factorial Value

Returns

integer
Double Factorial

Category

Mathematical and Trigonometric Functions
public static float
# FLOOR( float $number, float $significance = NULL )

FLOOR

FLOOR

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

Excel Function: FLOOR(number[,significance])

Parameters

$number
Number to round
$significance
Significance

Returns

float
Rounded Number

Category

Mathematical and Trigonometric Functions
public static integer
# GCD( )

GCD

GCD

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[, ...]])

Returns

integer
Greatest Common Divisor

Category

Mathematical and Trigonometric Functions
public static integer
# INT( float $number )

INT

INT

Casts a floating point value to an integer

Excel Function: INT(number)

Parameters

$number
Number to cast to an integer

Returns

integer
Integer value

Category

Mathematical and Trigonometric Functions
public static integer
# LCM( )

LCM

LCM

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[, ...]])

Returns

integer
Lowest Common Multiplier

Category

Mathematical and Trigonometric Functions
public static float
# LOG_BASE( float $number = NULL, float $base = 10 )

LOG_BASE

LOG_BASE

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

Excel Function: LOG(number[,base])

Parameters

$number
The positive real number for which you want the logarithm
$base
The base of the logarithm. If base is omitted, it is assumed to be 10.

Returns

float

Category

Mathematical and Trigonometric Functions
public static float
# MDETERM( array $matrixValues )

MDETERM

MDETERM

Returns the matrix determinant of an array.

Excel Function: MDETERM(array)

Parameters

$matrixValues
A matrix of values

Returns

float

Category

Mathematical and Trigonometric Functions
public static array
# MINVERSE( array $matrixValues )

MINVERSE

MINVERSE

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

Excel Function: MINVERSE(array)

Parameters

$matrixValues
A matrix of values

Returns

array

Category

Mathematical and Trigonometric Functions
public static array
# MMULT( array $matrixData1, array $matrixData2 )

MMULT

MMULT

Parameters

$matrixData1
A matrix of values
$matrixData2
A matrix of values

Returns

array
public static integer
# MOD( integer $a = 1, integer $b = 1 )

MOD

MOD

Parameters

$a
Dividend
$b
Divisor

Returns

integer
Remainder
public static float
# MROUND( float $number, integer $multiple )

MROUND

MROUND

Rounds a number to the nearest multiple of a specified value

Parameters

$number
Number to round
$multiple
Multiple to which you want to round $number

Returns

float
Rounded Number
public static float
# MULTINOMIAL( )

MULTINOMIAL

MULTINOMIAL

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

Returns

float
public static integer
# ODD( float $number )

ODD

ODD

Returns number rounded up to the nearest odd integer.

Parameters

$number
Number to round

Returns

integer
Rounded Number
public static float
# POWER( float $x = 0, float $y = 2 )

POWER

POWER

Computes x raised to the power y.

Parameters

$x
$y

Returns

float
public static float
# PRODUCT( )

PRODUCT

PRODUCT

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

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

Returns

float

Category

Mathematical and Trigonometric Functions
public static float
# QUOTIENT( )

QUOTIENT

QUOTIENT

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

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

Returns

float

Category

Mathematical and Trigonometric Functions
public static integer
# RAND( integer $min = 0, integer $max = 0 )

RAND

RAND

Parameters

$min
Minimal value
$max
Maximal value

Returns

integer
Random number
public static
# ROMAN( $aValue, $style = 0 )
public static float
# ROUNDUP( float $number, integer $digits )

ROUNDUP

ROUNDUP

Rounds a number up to a specified number of decimal places

Parameters

$number
Number to round
$digits
Number of digits to which you want to round $number

Returns

float
Rounded Number
public static float
# ROUNDDOWN( float $number, integer $digits )

ROUNDDOWN

ROUNDDOWN

Rounds a number down to a specified number of decimal places

Parameters

$number
Number to round
$digits
Number of digits to which you want to round $number

Returns

float
Rounded Number
public static float
# SERIESSUM( float $x,…, float $n,…, float $m,… )

SERIESSUM

SERIESSUM

Returns the sum of a power series

Parameters

$x,…
Input value to the power series
$n,…
Initial power to which you want to raise $x
$m,…
Step by which to increase $n for each term in the series

Returns

float
public static integer
# SIGN( float $number )

SIGN

SIGN

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
Number to round

Returns

integer
sign value
public static float
# SQRTPI( float $number )

SQRTPI

SQRTPI

Returns the square root of (number * pi).

Parameters

$number
Number

Returns

float
Square Root of Number * Pi
public static float
# SUBTOTAL( )

SUBTOTAL

SUBTOTAL

Returns a subtotal in a list or database.

Returns

float
public static float
# SUM( )

SUM

SUM

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

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

Returns

float

Category

Mathematical and Trigonometric Functions
public static float
# SUMIF( mixed $aArgs, string $condition, $sumArgs = array() )

SUMIF

SUMIF

Counts the number of cells that contain numbers within the list of arguments

Excel Function: SUMIF(value1[,value2[, ...]],condition)

Parameters

$aArgs
$arg,... Data values
$condition
The criteria that defines which cells will be summed.
$sumArgs

Returns

float

Category

Mathematical and Trigonometric Functions
public static float
# SUMPRODUCT( )

SUMPRODUCT

SUMPRODUCT

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

Returns

float

Category

Mathematical and Trigonometric Functions
public static float
# SUMSQ( )

SUMSQ

SUMSQ

SUMSQ returns the sum of the squares of the arguments

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

Returns

float

Category

Mathematical and Trigonometric Functions
public static float
# SUMX2MY2( mixed[] $matrixData1, mixed[] $matrixData2 )

SUMX2MY2

SUMX2MY2

Parameters

$matrixData1
Matrix #1
$matrixData2
Matrix #2

Returns

float
public static float
# SUMX2PY2( mixed[] $matrixData1, mixed[] $matrixData2 )

SUMX2PY2

SUMX2PY2

Parameters

$matrixData1
Matrix #1
$matrixData2
Matrix #2

Returns

float
public static float
# SUMXMY2( mixed[] $matrixData1, mixed[] $matrixData2 )

SUMXMY2

SUMXMY2

Parameters

$matrixData1
Matrix #1
$matrixData2
Matrix #2

Returns

float
public static float
# TRUNC( float $value = 0, integer $digits = 0 )

TRUNC

TRUNC

Truncates value to the number of fractional digits by number_digits.

Parameters

$value
$digits

Returns

float
Truncated value
Autene API documentation generated by ApiGen