function

exp . math . sncode

VERSIONlatest This function computes the value of e, the natural exponential, multiplied by itself x times.

EXP

NAME

exp - This function computes the value of e, the natural exponential, multiplied by itself x times.

SYNOPSIS

exp(argument)

DESCRIPTION

This mathematical function allows the user to compute the value of e multiplied by itself x times, x being the variable chosen by the user. X can be either positive or negative, an integer or a float, but it has to be a real number. If x is a negative number, then exp(-1)=1/exp(1).

PARAMETERS

number
Specifies the number (float) used as argument for the exp function.

RETURN

The value of e multiplied by itself x times, x is the var chosen by the user.

EXAMPLES

Note: In the followings examples, the _ between the { should be removed to make it work.

One can use this function with another variable:

test(q(res={_{
%include "/includes/extenso.sn";
a=0;
exp(0);
}}.),
q(res=1.));

With a trigonometric function:

test(q(res={_{
%include "/includes/extenso.sn";
a=cos(PI);
exp(a);
}}.),
q(res=.367879.));


With integers :

test(q(res={_{exp(2);}}.),q(res=7.38906.));

With negative numbers:

test(q(res={_{exp(-1);}}.),q(res=.367879.));

With floats:

test(q(res={_{exp(3.4);}}.),q(res=29.9641.));

With an array:

test(q(res={_{exp(0,-1,2);}}.),q(res=\[1,.367879,7.38906\].));

One can also consider the limits:

test(q(res={_{exp(-INF);}}.),q(res=0.));
test(q(res={_{exp(INF);}}.),q(res=INF.));

AUTHOR

Written by Caroline Laplante, <claplante@sednove.com>