mul_helper_zero_exclusive

Function mul_helper_zero_exclusive 

Source
fn mul_helper_zero_exclusive(
    dt: &DataType,
    lhs: &Interval,
    rhs: &Interval,
    zero: ScalarValue,
) -> Interval
Expand description

Multiplies two intervals when neither of them contains zero.

This function takes in two intervals (lhs and rhs) as arguments and returns their product (whose data type is known to be dt). It is specifically designed to handle intervals that do not contain zero within their ranges. Returns an error if the multiplication of bounds fails.

Left-hand side:  <--======----0------------>
Right-hand side: <--======----0------------>

                   or

Left-hand side:  <--======----0------------>
Right-hand side: <------------0--======---->

                   or

Left-hand side:  <------------0--======---->
Right-hand side: <--======----0------------>

                   or

Left-hand side:  <------------0--======---->
Right-hand side: <------------0--======---->

Caution: This function contains multiple calls to unwrap(). Therefore, it should be used with caution. Currently, it is used in contexts where the DataType (dt) is validated prior to calling this function.