sqrt
OPL square root
function
Purpose
OPL function to return the square root.
| type |
|---|
float |
Syntax
sqrt(float f)
Description
Returns the square root of a given floating-point value. You can use this function within IBM ILOG Script statements by specifying the OPL namespace:
( Opl.xxx() )
Example
float s1=sqrt(4);
float s2=sqrt(10);
execute
{
writeln("sqrt(4) gives ",s1);
writeln("sqrt(10) gives ",s2);
}
Result
sqrt(4) gives 2
sqrt(10) gives 3.16227766016838