As I said before, $log() is a natural logarithm; that means it doesn't use %x = 2, nor %x = 10, but rather %x = e...which is calculated as an infinite series, like this:

e = 1 + 1/(1!) + 1/(2!) + 1/(3!) + 1/(4!) + 1/(5!) + 1/(6!) + 1/(7!) + 1/(8!) + 1/(9!) + •••

or more simply,

e = 2.71828182845904523536028747135266249775724709369995

This is your %x (base). This number appears very, very often in calculus.

That is why $log(256) returns 5.545177 instead of 8, which would be true of a base-2 logarithm. If you needed a base-2 logarithm, you might be able to $com over to Excel.Application (or ADODB.Connection and use a connection string to get to an Excel worksheet!) and use Excel's =Log(256,2) to return 8.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C