Goto main content

expm1

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

EXPM1

NAME

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

SYNOPSIS

expm1 (number)

DESCRIPTION

This mathematical function allows the user to compute the value of e multiplied by itself x times minus 1, 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 expm1(-1)=(1/exp(1))-1.

PARAMETERS

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

RETURN

The value of e multiplied by itself x times minus 1, 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;
expm1(0);
}>.),
q(res=0.));

With a trigonometric function:

test(q(res=<{
%include "/includes/extenso.sn";
a=cos(PI);
expm1(a);
}>.),
q(res=-.632121.));

With integers :

test(q(res=<{expm1(2);}>.),q(res=6.38906.));

With negative numbers:

test(q(res=<{expm1(-1);}>.),q(res=-.632121.));

With floats:

test(q(res=<{expm1(3.4);}>.),q(res=28.9641.));

With an array:

test(q(res=<{expm1(0,-2,4);}>.),q(res=\[0,-.864665,53.5982\].));

One can also consider the limits:

test(q(res=<{expm1(-INF);}>.),q(res=-1.));
test(q(res=<{expm1(INF);}>.),q(res=INF.));

SEE ALSO

{{ include("includes/maths.sn") }}

AUTHOR

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

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.