Retro Rocket OS
BASIC-Powered Operating System
Loading...
Searching...
No Matches
EXP Function
EXP(real-expression)

Returns e (Euler’s number, approximately 2.71828) raised to the power of the given expression. In other words, EXP(x) = e^x.


Examples

PRINT EXP(1)

Produces approximately 2.71828.

PRINT EXP(0)

Produces 1.

PRINT EXP(2)

Produces approximately 7.38906.

REM Demonstrate inverse with LOG
x# = 5
PRINT "x = "; x#; " log(exp(x)) = "; LOG(EXP(x#))

Notes

  • Argument may be any real number (positive, negative, or zero).
  • Return value is always positive.
  • For natural logarithm (inverse of EXP), use LOG.

See also: LOG · SQR · POW