exp
OPL exponent
function
Purpose
OPL function to return e f.
| type |
|---|
float |
Syntax
exp(float f)
Description
Returns e f. You can use this function within IBM ILOG Script statements by specifying the OPL namespace:
( Opl.xxx() )
Example
float a=1;
float b=2;
float c=4.5;
float expofa=exp(a);
float expofb=exp(b);
float expofc=exp(c);
execute
{
writeln("exp(",a,") gives ",expofa);
writeln("exp(",b,") gives ",expofb);
writeln("exp(",c,") gives ",expofc);
}
Result
exp(1) gives 2.718281828459045
exp(2) gives 7.38905609893065
exp(4.5) gives 90.01713130052181