The shift-L (
ln] command computes the natural
logarithm of the real or complex number on the top of the stack. With
the Inverse flag it computes the exponential function instead, although
this is redundant with the E command.
The shift-E (
exp] command computes the
exponential, i.e., ‘e’ raised to the power of the number on the stack.
The meanings of the Inverse and Hyperbolic flags follow from those for
The H L (
log10] command computes the common
(base-10) logarithm of a number. (With the Inverse flag [
it raises ten to a given power.) Note that the common logarithm of a
complex number is computed by taking the natural logarithm and dividing
The B (
log] command computes a logarithm
to any base. For example, 1024 RET 2 B produces 10, since
‘2^10 = 1024’.
In certain cases like ‘log(3,9)’, the result
will be either ‘1:2’ or ‘0.5’ depending on the current Fraction
mode setting. With the Inverse flag [
alog], this command is
similar to ^ except that the order of the arguments is reversed.
The f I (
ilog] command computes the
integer logarithm of a number to any base. The number and the base must
themselves be positive integers. This is the true logarithm, rounded
down to an integer. Thus ilog(x,10) is 3 for all ‘x’ in the
range from 1000 to 9999. If both arguments are positive integers, exact
integer arithmetic is used; otherwise, this is equivalent to
The f E (
expm1] command computes
but using an algorithm that produces a more accurate
answer when the result is close to zero, i.e., when
is close to one.
The f L (
lnp1] command computes
producing a more accurate answer when ‘x’ is close to zero.