Function Log(x)

Log

Log(
    x             ! (input) numerical expression
    )

Arguments

x

A scalar numerical expression in the range \((0,\infty)\).

Return Value

The function Log returns the natural logarithm \(\ln(x)\).

Graph

../../_images/log.png

Example

p_return := Log(10);
! Result is 2.302585093

Note

  • A run-time error results if x is outside the range \((0,\infty)\).

  • The function Log can be used in constraints of nonlinear mathematical programs.

See also

The functions Exp, Log10. Arithmetic functions are discussed in full detail in Arithmetic Functions of the Language Reference.