Index conversion bug
There seems to be a bug with the conversion from EMA indices to Cpp indices. In the following example it looks like the ceil function was mistaken for an array as the generator applies the decrementation twice to the inputarray index.
Input Code:
implementation Math {
for i=1:3
outputarray(i) = ceil(inputarray(i));
end
}
Output Code:
void execute()
{
for( auto i=1;i<=3;++i){
outputarray(i-1) = ceil(inputarray(i-1-1));
}
}
The same Problem occurs when there is no actual array inside the function brackets.
Input Code:
implementation Math {
for i=1:3
Q x = inputarray(i);
outputarray(i) = ceil(x);
end
}
Output Code:
void execute()
{
for( auto i=1;i<=3;++i){
double x = inputarray(i-1);
outputarray(i-1) = ceil(x-1);
}
}