XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

exp


Type:   -   function (subr)
Source:   -   xlmath.c

Syntax

(exp power)
power - floating point number/expression
returns - e to the x power

Description

The 'exp' function calculates e [2.7128] raised to the specified 'power' and returns the result.

Examples

(exp 0.0)   ; returns 1
(exp 1.0)   ; returns 2.71828 - e
(exp 2.0)   ; returns 7.38906
(exp 10.0)  ; returns 22026.5
(exp 0)     ; error: bad integer operation

Note: 'exp' with a large 'power' like 1000.0 causes an incorrect value to be generated, with no error. The returned value will be a very large floating point number near the computer's limit [something like 1.79000e+308].

See the exp function in the XLISP 2.0 manual.

  Back to Top


XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next