Name

Ln Function

Syntax

function Ln(X: Floating-point type): Extended;

Description

Ln returns the natural logarithm of X. The Ln function is built-in.

Tips and Tricks

  • Delphi automatically converts Integer and Variant arguments to floating point. To convert an Int64 argument to floating point, add 0.0.

  • If X is a signaling NaN or negative (including negative infinity), Delphi reports runtime error 6 (EInvalidOp).

  • If X is zero, Delphi reports runtime error 7 (EZeroDivide).

  • If X is positive infinity, the result is positive infinity.

  • If X is a quiet NaN, the result is X.

See Also

Exp Function

Get Delphi in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.