Method log
log(UInt32)
Replaces the value on top of the stack with it's natural (base e) logarithm. Non-positive values result in NaN.
Declaration
public void log(uint c)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | c | The desired precision. |
Remarks
The desired precision is controlled by the parameter c
where c represents a break criteria of the internal iteration.
For a desired precesission of decimal digits c can be calculated as:
msb(pow(10, digits)) or
(uint)Math.Ceiling(digits * 3.321928094887362) // * (log(2) + log(5)) / log(2)).
The result however has to be rounded explicitely to get an exact decimal representation.