Documentation

Erf
in package
uses ArrayEnabled

Table of Contents

Constants

TWO_SQRT_PI  = 1.1283791670955126

Properties

$arrayArgumentHelper  : ArrayArgumentHelper
$initializationNeeded  : bool

Methods

ERF()  : array<string|int, mixed>|float|string
ERF.
ERFPRECISE()  : array<string|int, mixed>|float|string
ERFPRECISE.
erfValue()  : float
Method to calculate the erf value.
evaluateArrayArguments()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument.
evaluateArrayArgumentsIgnore()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument except for the one specified by ignore.
evaluateArrayArgumentsSubset()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, but only the first few (up to limit) can be an array arguments.
evaluateArrayArgumentsSubsetFrom()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, but only the last few (from start) can be an array arguments.
evaluateSingleArgumentArray()  : array<string|int, mixed>
Handles array argument processing when the function accepts a single argument that can be an array argument.
initialiseHelper()  : void
makeFloat()  : float
testFalse()  : bool

Constants

TWO_SQRT_PI

private mixed TWO_SQRT_PI = 1.1283791670955126

Properties

$initializationNeeded

private static bool $initializationNeeded = true

Methods

ERF()

ERF.

public static ERF(mixed $lower[, mixed $upper = null ]) : array<string|int, mixed>|float|string

Returns the error function integrated between the lower and upper bound arguments.

Note: In Excel 2007 or earlier, if you input a negative value for the upper or lower bound arguments, the function would return a #NUM! error. However, in Excel 2010, the function algorithm was improved, so that it can now calculate the function for both positive and negative ranges. PhpSpreadsheet follows Excel 2010 behaviour, and accepts negative arguments.

Excel Function: ERF(lower[,upper])

Parameters
$lower : mixed

Lower bound float for integrating ERF Or can be an array of values

$upper : mixed = null

Upper bound float for integrating ERF. If omitted, ERF integrates between zero and lower_limit Or can be an array of values

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

If an array of numbers is passed as an argument, then the returned result will also be an array with the same dimensions

ERFPRECISE()

ERFPRECISE.

public static ERFPRECISE(mixed $limit) : array<string|int, mixed>|float|string

Returns the error function integrated between the lower and upper bound arguments.

Excel Function: ERF.PRECISE(limit)

Parameters
$limit : mixed

Float bound for integrating ERF, other bound is zero Or can be an array of values

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

If an array of numbers is passed as an argument, then the returned result will also be an array with the same dimensions

erfValue()

Method to calculate the erf value.

public static erfValue(float|int|string $value) : float
Parameters
$value : float|int|string
Return values
float

evaluateArrayArguments()

Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument.

protected static evaluateArrayArguments(callable $method, mixed ...$arguments) : array<string|int, mixed>

Example use for: ROUND() or DATE().

Parameters
$method : callable
$arguments : mixed
Return values
array<string|int, mixed>

evaluateArrayArgumentsIgnore()

Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument except for the one specified by ignore.

protected static evaluateArrayArgumentsIgnore(callable $method, int $ignore, mixed ...$arguments) : array<string|int, mixed>

Example use for: HLOOKUP() and VLOOKUP(), where argument 1 is a matrix that needs to be treated as a database rather than as an array argument.

Parameters
$method : callable
$ignore : int
$arguments : mixed
Return values
array<string|int, mixed>

evaluateArrayArgumentsSubset()

Handles array argument processing when the function accepts multiple arguments, but only the first few (up to limit) can be an array arguments.

protected static evaluateArrayArgumentsSubset(callable $method, int $limit, mixed ...$arguments) : array<string|int, mixed>

Example use for: NETWORKDAYS() or CONCATENATE(), where the last argument is a matrix (or a series of values) that need to be treated as a such rather than as an array arguments.

Parameters
$method : callable
$limit : int
$arguments : mixed
Return values
array<string|int, mixed>

evaluateArrayArgumentsSubsetFrom()

Handles array argument processing when the function accepts multiple arguments, but only the last few (from start) can be an array arguments.

protected static evaluateArrayArgumentsSubsetFrom(callable $method, int $start, mixed ...$arguments) : array<string|int, mixed>

Example use for: Z.TEST() or INDEX(), where the first argument 1 is a matrix that needs to be treated as a dataset rather than as an array argument.

Parameters
$method : callable
$start : int
$arguments : mixed
Return values
array<string|int, mixed>

evaluateSingleArgumentArray()

Handles array argument processing when the function accepts a single argument that can be an array argument.

protected static evaluateSingleArgumentArray(callable $method, array<string|int, mixed> $values) : array<string|int, mixed>

Example use for: DAYOFMONTH() or FACT().

Parameters
$method : callable
$values : array<string|int, mixed>
Return values
array<string|int, mixed>

initialiseHelper()

private static initialiseHelper(array<string|int, mixed>|false $arguments) : void
Parameters
$arguments : array<string|int, mixed>|false

Can be changed to array for Php8.1+

makeFloat()

private static makeFloat(mixed $value) : float
Parameters
$value : mixed
Return values
float

testFalse()

private static testFalse(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

        
On this page

Search results