Skip to content
Reference > Methods

log(Value,Base)

Definition

Double log(Number Value, Number Base)

Description

Returns a Double the log of a double value in a given base.

Parameter Definition

Name Type Description
Value Number value to get log for
Base Number base to use when calculating log

Examples

1
2
3
4
5
Double r1 = log(100,10); // r1 == 2.0
Double r2 = log(1000,10); // r2 == 2.9999999999999996
Double r3 = log(4,2); // r3 == 2.0
Double r4 = log(8,2); // r4 == 3.0
Double r5 = log(16,2); // r5 == 4.0