User Guide Cancel

Log

 

Description

Calculates the natural logarithm of a number. Natural logarithms are based on the constant e (2.71828182845904).

Returns

The natural logarithm of a number.

Category

Mathematical functions

Function syntax

Log(number)
Log(number)
Log(number)

See also

Exp, Log10

Parameters

Parameter

Description

number

Positive real number for which to calculate the natural logarithm

Example

<cfscript>
val=5
writeOutput("Log of " & val & " is: " & log(val))
</cfscript>
<cfscript> val=5 writeOutput("Log of " & val & " is: " & log(val)) </cfscript>
<cfscript>
    val=5
    writeOutput("Log of " & val &  " is: " & log(val))
</cfscript>

Output

Log of 5 is: 1.60943791243

Get help faster and easier

New user?