diff --git a/src/GeographicLib/Geodesic.cpp b/src/GeographicLib/Geodesic.cpp index d4d95348fe..f0df5fc613 100644 --- a/src/GeographicLib/Geodesic.cpp +++ b/src/GeographicLib/Geodesic.cpp @@ -206,7 +206,7 @@ namespace GeographicLib { // check, e.g., on verifying quadrants in atan2. In addition, this // enforces some symmetries in the results returned. - real sbet1, cbet1, sbet2, cbet2, s12x, m12x; + real sbet1, cbet1, sbet2, cbet2, s12x, m12x = Math::NaN(); Math::sincosd(lat1, sbet1, cbet1); sbet1 *= _f1; // Ensure cbet1 = +epsilon at poles; doing the fix on beta means that sig12 diff --git a/src/JSBSim.cpp b/src/JSBSim.cpp index c4d3f69fee..1eb665ea85 100644 --- a/src/JSBSim.cpp +++ b/src/JSBSim.cpp @@ -292,7 +292,7 @@ int main(int argc, char* argv[]) _controlfp(_controlfp(0, 0) & ~(_EM_INVALID | _EM_ZERODIVIDE | _EM_OVERFLOW), _MCW_EM); #elif defined(__GNUC__) && !defined(sgi) && !defined(__APPLE__) - feenableexcept(FE_DIVBYZERO | FE_INVALID); + feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW); #endif try {