
18 Sep
2008
18 Sep
'08
3:11 p.m.
Roberto Bagnara wrote:
#include <fenv.h> #include <cstdio>
int main() { float x = 2; float y = 3; feclearexcept(FE_INEXACT); x = x / y; printf("%d %.1000g\n", fetestexcept(FE_INEXACT) != 0, x); }
Is this a way of testing whether the division is performed at compile time? Do you call it a bug if constant propagation occurs when you don't take action to prevent it?