Cheers pBe
How long have you got?
To briefly explain, the AutoLISP log function returns the natural logarithm (usually written 'ln') of the supplied number, that is, the logarithm with base e (2.718...), or the inverse exponential function.
For logarithms in general we have:
That is, the logarithm base a of b results in a number such that a raised to that number will equal b.
In my function, I am calculating a value x such that:
Using a logarithm of base 10 this can be easily calculated (since log_x(x) = 1):
- n = 10^xlog_10(n) = log_10(10^x)log_10(n) = x(log_10(10))=> x = log_10(n)
However, since we only have access to the natural logarithm function (log), we must proceed in the following way:
- n = 10^xlog(n) = log(10^x)log(n) = x(log(10))=> x = log(n)/log(10)
|