Documentation

Logarithms

Table of Contents

withBase() LOG_BASE. float|string
base10() LOG10. float|string
natural() LN. float|string

Methods

withBase()

LOG_BASE.

public static withBase( $number : mixed [, $base : mixed = 10 ] ) : float|string

Returns the logarithm of a number to a specified base. The default base is 10.

Excel Function: LOG(number[,base])

Parameters
$number : mixed

The positive real number for which you want the logarithm

$base : mixed = 10

The base of the logarithm. If base is omitted, it is assumed to be 10.

Return values
float|string —

The result, or a string containing an error

base10()

LOG10.

public static base10( $number : mixed ) : float|string

Returns the result of builtin function log after validating args.

Parameters
$number : mixed

Should be numeric

Return values
float|string —

Rounded number

natural()

LN.

public static natural( $number : mixed ) : float|string

Returns the result of builtin function log after validating args.

Parameters
$number : mixed

Should be numeric

Return values
float|string —

Rounded number

Search results