Understanding the Floating-Point Environment in C++
1 Introduction Floating-point exceptions are unrelated to C++ exceptions; C++ programs cannot catch and handle floating-point exceptions such as division by zero or overflow. For example, consider the following code: double i_am_zero = 0.0; try { double kia = 120.0 / i_am_zero; std::cout << "kia = " << kia << std::endl;}catch (…) { std::cout << … Read more