You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.
This is an old revision of the document!
The float value whose natural logarithm is to be calculated.
The natural logarithm of the argument.
llLog(number)/llLog(2)
. Since the latter is constant, to save calculations and memory you can instead pre-calculate the reciprocal and multiply by it, like this: llLog(number)*1.44269504
will give you the logarithm in base 2, because 1/llLog(2)
equals approx. 1.44269504.float f; f = llLog(2.7182818); // sets f to 1 approx. f = llLog(1); // sets f to 0 f = llLog(2); // sets f to 0.693147 approx. f = llLog(0.5); // sets f to -0.693147 approx. f = llLog(-1); // sets f to 0 f = llLog(8)*1.44269504; // sets f to 3 approx.