HumHub Documentation (unofficial)

Functions
in package

Table of Contents

Methods

abs()  : float
Returns the absolute value (modulus) of a complex number.
acos()  : Complex
Returns the inverse cosine of a complex number.
acosh()  : Complex
Returns the inverse hyperbolic cosine of a complex number.
acot()  : Complex
Returns the inverse cotangent of a complex number.
acoth()  : Complex
Returns the inverse hyperbolic cotangent of a complex number.
acsc()  : Complex
Returns the inverse cosecant of a complex number.
acsch()  : Complex
Returns the inverse hyperbolic cosecant of a complex number.
argument()  : float
Returns the argument of a complex number.
asec()  : Complex
Returns the inverse secant of a complex number.
asech()  : Complex
Returns the inverse hyperbolic secant of a complex number.
asin()  : Complex
Returns the inverse sine of a complex number.
asinh()  : Complex
Returns the inverse hyperbolic sine of a complex number.
atan()  : Complex
Returns the inverse tangent of a complex number.
atanh()  : Complex
Returns the inverse hyperbolic tangent of a complex number.
conjugate()  : Complex
Returns the complex conjugate of a complex number
cos()  : Complex
Returns the cosine of a complex number.
cosh()  : Complex
Returns the hyperbolic cosine of a complex number.
cot()  : Complex
Returns the cotangent of a complex number.
coth()  : Complex
Returns the hyperbolic cotangent of a complex number.
csc()  : Complex
Returns the cosecant of a complex number.
csch()  : Complex
Returns the hyperbolic cosecant of a complex number.
exp()  : Complex
Returns the exponential of a complex number.
inverse()  : Complex
Returns the inverse of a complex number.
ln()  : Complex
Returns the natural logarithm of a complex number.
log10()  : Complex
Returns the common logarithm (base 10) of a complex number.
log2()  : Complex
Returns the base-2 logarithm of a complex number.
negative()  : Complex
Returns the negative of a complex number.
pow()  : Complex
Returns a complex number raised to a power.
rho()  : float
Returns the rho of a complex number.
sec()  : Complex
Returns the secant of a complex number.
sech()  : Complex
Returns the hyperbolic secant of a complex number.
sin()  : Complex
Returns the sine of a complex number.
sinh()  : Complex
Returns the hyperbolic sine of a complex number.
sqrt()  : Complex
Returns the square root of a complex number.
tan()  : Complex
Returns the tangent of a complex number.
tanh()  : Complex
Returns the hyperbolic tangent of a complex number.
theta()  : float
Returns the theta of a complex number.

Methods

abs()

Returns the absolute value (modulus) of a complex number.

public static abs(Complex|mixed $complex) : float

Also known as the rho of the complex number, i.e. the distance/radius from the centrepoint to the representation of the number in polar coordinates.

This function is a synonym for rho()

Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

see
rho
Return values
float

The absolute (or rho) value of the complex argument.

acos()

Returns the inverse cosine of a complex number.

public static acos(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

Return values
Complex

The inverse cosine of the complex argument.

acosh()

Returns the inverse hyperbolic cosine of a complex number.

public static acosh(Complex|mixed $complex) : Complex

Formula from Wolfram Alpha: cosh^(-1)z = ln(z + sqrt(z + 1) sqrt(z - 1)).

Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

Return values
Complex

The inverse hyperbolic cosine of the complex argument.

acot()

Returns the inverse cotangent of a complex number.

public static acot(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

throws
InvalidArgumentException

If function would result in a division by zero

Return values
Complex

The inverse cotangent of the complex argument.

acoth()

Returns the inverse hyperbolic cotangent of a complex number.

public static acoth(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

throws
InvalidArgumentException

If function would result in a division by zero

Return values
Complex

The inverse hyperbolic cotangent of the complex argument.

acsc()

Returns the inverse cosecant of a complex number.

public static acsc(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

throws
InvalidArgumentException

If function would result in a division by zero

Return values
Complex

The inverse cosecant of the complex argument.

acsch()

Returns the inverse hyperbolic cosecant of a complex number.

public static acsch(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

throws
InvalidArgumentException

If function would result in a division by zero

Return values
Complex

The inverse hyperbolic cosecant of the complex argument.

argument()

Returns the argument of a complex number.

public static argument(Complex|mixed $complex) : float

Also known as the theta of the complex number, i.e. the angle in radians from the real axis to the representation of the number in polar coordinates.

This function is a synonym for theta()

Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

see
theta
Return values
float

The argument (or theta) value of the complex argument.

asec()

Returns the inverse secant of a complex number.

public static asec(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

throws
InvalidArgumentException

If function would result in a division by zero

Return values
Complex

The inverse secant of the complex argument.

asech()

Returns the inverse hyperbolic secant of a complex number.

public static asech(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

throws
InvalidArgumentException

If function would result in a division by zero

Return values
Complex

The inverse hyperbolic secant of the complex argument.

asin()

Returns the inverse sine of a complex number.

public static asin(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

Return values
Complex

The inverse sine of the complex argument.

asinh()

Returns the inverse hyperbolic sine of a complex number.

public static asinh(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

Return values
Complex

The inverse hyperbolic sine of the complex argument.

atan()

Returns the inverse tangent of a complex number.

public static atan(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

throws
InvalidArgumentException

If function would result in a division by zero

Return values
Complex

The inverse tangent of the complex argument.

atanh()

Returns the inverse hyperbolic tangent of a complex number.

public static atanh(Complex|mixed $complex) : Complex

Formula from Wolfram Alpha: tanh^(-1)z = 1/2 [ln(1 + z) - ln(1 - z)].

Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

Return values
Complex

The inverse hyperbolic tangent of the complex argument.

conjugate()

Returns the complex conjugate of a complex number

public static conjugate(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

Return values
Complex

The conjugate of the complex argument.

cos()

Returns the cosine of a complex number.

public static cos(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

Return values
Complex

The cosine of the complex argument.

cosh()

Returns the hyperbolic cosine of a complex number.

public static cosh(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

Return values
Complex

The hyperbolic cosine of the complex argument.

cot()

Returns the cotangent of a complex number.

public static cot(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

throws
InvalidArgumentException

If function would result in a division by zero

Return values
Complex

The cotangent of the complex argument.

coth()

Returns the hyperbolic cotangent of a complex number.

public static coth(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

throws
InvalidArgumentException

If function would result in a division by zero

Return values
Complex

The hyperbolic cotangent of the complex argument.

csc()

Returns the cosecant of a complex number.

public static csc(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

throws
InvalidArgumentException

If function would result in a division by zero

Return values
Complex

The cosecant of the complex argument.

csch()

Returns the hyperbolic cosecant of a complex number.

public static csch(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

throws
InvalidArgumentException

If function would result in a division by zero

Return values
Complex

The hyperbolic cosecant of the complex argument.

exp()

Returns the exponential of a complex number.

public static exp(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

Return values
Complex

The exponential of the complex argument.

inverse()

Returns the inverse of a complex number.

public static inverse(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

throws
InvalidArgumentException

If function would result in a division by zero

Return values
Complex

The inverse of the complex argument.

ln()

Returns the natural logarithm of a complex number.

public static ln(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

throws
InvalidArgumentException

If the real and the imaginary parts are both zero

Return values
Complex

The natural logarithm of the complex argument.

log10()

Returns the common logarithm (base 10) of a complex number.

public static log10(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

throws
InvalidArgumentException

If the real and the imaginary parts are both zero

Return values
Complex

The common logarithm (base 10) of the complex argument.

log2()

Returns the base-2 logarithm of a complex number.

public static log2(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

throws
InvalidArgumentException

If the real and the imaginary parts are both zero

Return values
Complex

The base-2 logarithm of the complex argument.

negative()

Returns the negative of a complex number.

public static negative(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

see
rho
Return values
Complex

The negative value of the complex argument.

pow()

Returns a complex number raised to a power.

public static pow(Complex|mixed $complex, float|int $power) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

$power : float|int

The power to raise this value to

Tags
throws
Exception

If the power argument isn't a valid real

Return values
Complex

The complex argument raised to the real power.

rho()

Returns the rho of a complex number.

public static rho(Complex|mixed $complex) : float

This is the distance/radius from the centrepoint to the representation of the number in polar coordinates.

Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

Return values
float

The rho value of the complex argument.

sec()

Returns the secant of a complex number.

public static sec(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

throws
InvalidArgumentException

If function would result in a division by zero

Return values
Complex

The secant of the complex argument.

sech()

Returns the hyperbolic secant of a complex number.

public static sech(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

throws
InvalidArgumentException

If function would result in a division by zero

Return values
Complex

The hyperbolic secant of the complex argument.

sin()

Returns the sine of a complex number.

public static sin(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

Return values
Complex

The sine of the complex argument.

sinh()

Returns the hyperbolic sine of a complex number.

public static sinh(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

Return values
Complex

The hyperbolic sine of the complex argument.

sqrt()

Returns the square root of a complex number.

public static sqrt(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

Return values
Complex

The Square root of the complex argument.

tan()

Returns the tangent of a complex number.

public static tan(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

throws
InvalidArgumentException

If function would result in a division by zero

Return values
Complex

The tangent of the complex argument.

tanh()

Returns the hyperbolic tangent of a complex number.

public static tanh(Complex|mixed $complex) : Complex
Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

throws
InvalidArgumentException

If function would result in a division by zero

Return values
Complex

The hyperbolic tangent of the complex argument.

theta()

Returns the theta of a complex number.

public static theta(Complex|mixed $complex) : float

This is the angle in radians from the real axis to the representation of the number in polar coordinates.

Parameters
$complex : Complex|mixed

Complex number or a numeric value.

Tags
throws
Exception

If argument isn't a valid real or complex number.

Return values
float

The theta value of the complex argument.


        
On this page

Search results