> C++ does not guarantee floating point operations happen the same every time...
Can you elaborate more on this? Are you implying that two identical calculations will return different results?
Can you elaborate more on this? Are you implying that two identical calculations will return different results?
double foo(double x) { return x*3.3; }
double bar1(double x) { return foo(x); }
double bar2(double x) { return foo(x); }
void t_bar(double x) { assert(bar1(x) == bar2(x)); }
t_bar can fail depending on how bar1 and bar2 are compiled.