Well honestly, you have a TON of great info there, which is why I was suprised to see you say use $com to use a base 2 log... There is an incredibly simple formula that allows you to take the log of any base.

To take the log2(N) (log base 2 of N) you do log(N)/log(2)

Or more generally logB(N) = log(N)/log(B)

Thats the "change of base" formula, it's very easy to use, and you can easily make an mIRC alias for it:

alias nlog { return $calc($log($1)/$log($2)) } (Note that due to mIRC's methods of rounding, it won't give 100% precise answers. But, anyway,
For Racoons question,

Quote:

So what if I have %x ^ %y = %z, where %x = 2 and %z = 256, how do I solve for %y (8) using $log?

$calc($log(256)/$log(2)) = 8. Or, using the alias I included just $nlog(256,2) As I said, due to mIRC's rounding method it doesn't give you an exact answer, mIRC says it is 8.000001, but if you do that same expression in calc.exe, you get 8.