MCPcopy Create free account
hub / github.com/apache/cloudberry / float8_div

Function float8_div

src/include/utils/float.h:236–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236static inline float8
237float8_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

Callers 15

box_cnFunction · 0.85
line_perpFunction · 0.85
line_eqFunction · 0.85
line_slFunction · 0.85
line_invslFunction · 0.85
line_distanceFunction · 0.85
line_interpt_lineFunction · 0.85
path_areaFunction · 0.85
point_slFunction · 0.85
point_invslFunction · 0.85
lseg_centerFunction · 0.85
lseg_inside_polyFunction · 0.85

Calls 3

float_zero_divide_errorFunction · 0.85
float_overflow_errorFunction · 0.85
float_underflow_errorFunction · 0.85

Tested by

no test coverage detected