ln - multiple declarations
Function ln
Calculates natural logarithm of x.
Unqual!T ln(T)
(
T x
)
if (isFloatingPoint!T);
Parameters
Name | Description |
---|---|
T | Argument type. |
x | Argument. |
Returns
Natural logarithm of x.
Function ln
Calculates natural logarithm of x.
Unqual!T ln(T)
(
T x
)
if (isFloatingPoint!T);
Parameters
Name | Description |
---|---|
T | Argument type. |
x | Argument. |
Returns
Natural logarithm of x.
Example
import tanya .math;
assert(isNaN(ln(-7.389f)));
assert(isNaN(ln(-7.389)));
assert(isNaN(ln(-7.389L)));
assert(isInfinity(ln(0.0f)));
assert(isInfinity(ln(0.0)));
assert(isInfinity(ln(0.0L)));
assert(ln(1.0f) == 0.0f);
assert(ln(1.0) == 0.0);
assert(ln(1.0L) == 0.0L);