exp

OPL“指数”函数

用途

用于返回 e f 的 OPL 函数。

类型
float

语法

exp(float f)

描述

返回 e f。您可以通过指定 OPL 名称空间,在 IBM ILOG Script 语句中使用此函数:

( Opl.xxx() )

示例

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); 
}

结果

exp(1) gives 2.718281828459045
exp(2) gives 7.38905609893065
exp(4.5) gives 90.01713130052181