0

I want to get the tan inverse of a function. The rest of the function works ok but as soon as I add the atan part I get error. I am now trying with a small expression

float a = Math.atan(1);

But still I get an error: syntax error, unexpected '('

I have also tried Opl.atan math.atan opl.atan but get the same error.

Ranajit
  • 49
  • 6

1 Answers1

0

atan is available in OPL scripting so you could do

float a;

execute
{
a=Math.atan(1);
}

execute
{
writeln(a);
}

in OPL

If you want to have trigonometric functions directly in the modeling part you can vote for an existing AHA CPLEX wish : https://ibm-data-and-ai.ideas.aha.io/ideas/CPLEX-I-6

Alex Fleischer
  • 9,276
  • 2
  • 12
  • 15