GPipe-Core
GPipe-Core copied to clipboard
Shader function produces wrong result
f :: (FFloat, FFloat) -> (FFloat, FFloat)
f (zr,zi) = (zr * 0, zi + zr + 0.1)
--f (zr,zi) = (zr + zi + 0.1, zi * 0)
This function sets zr to zero before evaluation of the second element of the tuple if applied in a while loop. This does not happen if the order of elements is switched(commented version). Expected behavior: It should evaluate both elements of the tuple and only then replace old values with new if applied in a while loop. (f (1.0, 1.0) = (0.0, 2.1)) Actual behavior: It replaces the first element of the tuple and uses it as input value to evaluate the second element. (f (1.0, 1.0) = (0.0, 1.1))