div_helper_lhs_zero_inclusive

Function div_helper_lhs_zero_inclusive 

Source
fn div_helper_lhs_zero_inclusive(
    dt: &DataType,
    lhs: &Interval,
    rhs: &Interval,
    zero_point: &Interval,
) -> Interval
Expand description

Divides the left-hand side interval by the right-hand side interval when the former contains zero.

This function takes in two intervals (lhs and rhs) as arguments and returns their quotient (whose data type is known to be dt). This function serves as a subroutine that handles the specific case when only lhs contains zero within its range. Returns an error if the division of bounds fails.

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.