| 3 | #include <cfloat> |
| 4 | |
| 5 | bool ratio(float a, float b, float & c) |
| 6 | { |
| 7 | if (fabs(a + b) < FLT_EPSILON) |
| 8 | { |
| 9 | std::cerr << "The sum of the two arguments is close to zero." << std::endl; |
| 10 | return false; |
| 11 | } |
| 12 | c = (a - b) / (a + b); |
| 13 | return true; |
| 14 | } |
| 15 | |
| 16 | int main() |
| 17 | { |