I've been trying to reproduce the reported problem in FGInitialCondition and would like to have floating point exceptions enabled to do that. The trouble is that I can't seem to get it to work like I expect. On linux, if I either the method in src/Main/main.cxx:
fpu_control_t fpe_flags; _FPU_GETCW(fpe_flags); fpe_flags &= ~_FPU_MASK_IM; // invalid operation fpe_flags &= ~_FPU_MASK_DM; // denormalized operand fpe_flags &= ~_FPU_MASK_ZM; // zero-divide fpe_flags &= ~_FPU_MASK_OM; // overflow fpe_flags &= ~_FPU_MASK_UM; // underflow fpe_flags &= ~_FPU_MASK_PM; // precision (inexact result) _FPU_SETCW(fpe_flags); or that defined in fenv.h: feenableexcepts(FE_ALL_EXCEPT) I'll get an exception for float a= 3/0 but *not* for float a=3/0.0 even though both div by zero and overflow are enabled, AFAICT. Does anyone understand what's happening here? -- Tony Peden [EMAIL PROTECTED] We all know Linux is great ... it does infinite loops in 5 seconds. -- attributed to Linus Torvalds _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
