HH\Lib\Math\log
Returns the logarithm base $base
of $arg
namespace HH\Lib\Math;
function log(
num $arg,
?num $base = NULL,
): float;
For the exponential function, see Math\exp()
.
Parameters
num $arg
?num $base = NULL
Returns
float
Examples
$x = 10;
$log = Math\log($x);
echo "Log is $log \n"; // Output: Log is 2.302585092994