serve/vendor/markbaker/complex/classes/src/functionslog2.php

Function code for the complex log2() function

Functions

log2()

log2(\Complex\Complex|mixed  $complex) : \Complex\Complex

Returns the base-2 logarithm of a complex number.

Parameters

\Complex\Complex|mixed $complex

Complex number or a numeric value.

Throws

\Complex\Exception

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

\InvalidArgumentException

If the real and the imaginary parts are both zero

Returns

\Complex\Complex —

The base-2 logarithm of the complex argument.