Rev Language Reference


ln - Natural log function

Returns the natural log of a (positive) value.

Usage

ln(RealPos x)

Arguments

x : RealPos (pass by const reference)
The value.

Return Type

Example

# create a stochastic node with an exponential distribution
x ~ dnExponential(1)

# create a determinstic node that takes the natural log of x
y := ln(x)

# print the values for x and y
x # x has the stochastic value of 2.940149
y # y has the determined value of 1.07846

See Also