Created attachment 305 [details] queries computing wrong values The model has two variables always set to zero: int i=0; double d=0.0; Then the following queries: simulate 1 [<=10] { i, pow(0.5*i, 2.0) + 2.0, 2.0 + pow(i*0.5, 2.0), 2.0 + pow(0.5*i, 2.0) } simulate 1 [<=10] { d, pow(0.5*d, 2.0) + 2.0, 2.0 + pow(d*0.5, 2.0), 2.0 + pow(0.5*d, 2.0) } should compute {0, 2, 2, 2} but both compute {0, 2, 0.25, 0.5} There is some strange interaction with variables and pow function. Wrong values are also computed when these expressions are used in the model (where it is even more difficult to find).