Exponents and Logs


Syntax:

for X^2:

X dup mul

for X^(1/2):

X sqrt

for e^X:

X eexp

for log (base 10) X:

X log

for ln X:

X ln

for X^Y:

X Y exch ln mul eexp

Examples:

  • 2^3
  • 2^2
  • Potential Temperature (atmosphere)
  • Blackbody irradiance over all wavelengths (Stefan-Boltzmann law)
  • Surface saturation humidity
  • Troubleshooting:

    Put data before operation. X^Y uses the trick of X^Y=e^(Y*ln(X)).