← All docs

log()

Natural logarithm.

log()

function log(float $num, float $base = 2.718281828459045): float

Natural logarithm.

Parameters:

  • $num (float)
  • $base (float), default 2.718281828459045, optional

Returns: float

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how log is implemented in the compiler, see the internals page.