handle_float_intervals

Macro handle_float_intervals 

Source
macro_rules! handle_float_intervals {
    ($scalar_type:ident, $primitive_type:ident, $lower:expr, $upper:expr) => { ... };
}
Expand description

This macro handles the NaN and INF floating point values.

  • NaN values are always converted to unbounded i.e. NULL values.
  • For lower bounds:
    • A NEG_INF value is converted to a NULL.
    • An INF value is conservatively converted to the maximum representable number for the floating-point type in question. In this case, converting to NULL doesn’t make sense as it would be interpreted as a NEG_INF.
  • For upper bounds:
    • An INF value is converted to a NULL.
    • An NEG_INF value is conservatively converted to the minimum representable number for the floating-point type in question. In this case, converting to NULL doesn’t make sense as it would be interpreted as an INF.