MyChat Scripts Engine: Ln
Computing the natural logarithm from a specified number.
Syntax
function Ln(x: extended): extended;
Parameters and return values
Parameter |
Type |
Value |
x |
extended |
number from which you need to compute the natural logarithm. |
Function result
Natural logarithm of a number.
Example
var
i: integer;
begin
for i := 1 to 16 do
mLogScript(floattostr(Ln(i)), inttostr(i));
end.
Script work result
[22:03:09] (Log "Ln"): [1] 0.000000000000
[22:03:09] (Log "Ln"): [2] 0.693147180560
[22:03:09] (Log "Ln"): [3] 1.098612288668
[22:03:09] (Log "Ln"): [4] 1.386294361120
[22:03:09] (Log "Ln"): [5] 1.609437912434
[22:03:09] (Log "Ln"): [6] 1.791759469228
[22:03:09] (Log "Ln"): [7] 1.945910149055
[22:03:09] (Log "Ln"): [8] 2.079441541680
[22:03:09] (Log "Ln"): [9] 2.197224577336
[22:03:09] (Log "Ln"): [10] 2.302585092994
[22:03:09] (Log "Ln"): [11] 2.397895272798
[22:03:09] (Log "Ln"): [12] 2.484906649788
[22:03:09] (Log "Ln"): [13] 2.564949357462
[22:03:09] (Log "Ln"): [14] 2.639057329615
[22:03:09] (Log "Ln"): [15] 2.708050201102
[22:03:09] (Log "Ln"): [16] 2.772588722240
[22:03:09] (Run "Ln"): Script operation time: 2 ms
[22:03:09] (Run "Ln"): Script done successfully.