| 234 | } |
| 235 | |
| 236 | static inline float8 |
| 237 | float8_div(const float8 val1, const float8 val2) |
| 238 | { |
| 239 | float8 result; |
| 240 | |
| 241 | if (unlikely(val2 == 0.0) && !isnan(val1)) |
| 242 | float_zero_divide_error(); |
| 243 | result = val1 / val2; |
| 244 | if (unlikely(isinf(result)) && !isinf(val1)) |
| 245 | float_overflow_error(); |
| 246 | if (unlikely(result == 0.0) && val1 != 0.0 && !isinf(val2)) |
| 247 | float_underflow_error(); |
| 248 | |
| 249 | return result; |
| 250 | } |
| 251 | |
| 252 | /* |
| 253 | * Routines for NaN-aware comparisons |
no test coverage detected