11-13-2022, 05:46 PM
(11-13-2022, 03:24 PM)bplus Wrote: I don't use it much either but I did use it recently as is an alternate way to do powers.
This Log is the natural Log e AKA Ln, Not Log base 10.
I used this idea for String Math to do powers:
Code: (Select All)' alternate to power 5 ^ 5
Print 5 ^ 5
Print Exp(5 * Log(5))
PS I think I recall Steve using it to get the number of digits in a number?
Update: that's in Wiki for a long pos integer.
It's an easy way to get the number of binary digits in a number.
Code: (Select All)
Print "Number of BINARY digits required to represent a value:"
For i = 1 To 20
Print i, _Ceil(Log(i + .001) / Log(2)), _Bin$(i)
Next