Include floats in bounds for unspecified numbers

This commit is contained in:
ayazhafiz 2022-02-06 12:31:37 -05:00
parent 3fffca48bb
commit c5d918e68c
8 changed files with 129 additions and 180 deletions

View file

@ -324,8 +324,11 @@ impl TypedNumericBound for NumericBound {
fn bounded_range(&self) -> Vec<Variable> {
match self {
NumericBound::None => vec![],
NumericBound::Int(ib) => ib.bounded_range(),
NumericBound::Float(fb) => fb.bounded_range(),
&NumericBound::AtLeastIntOrFloat { sign, width } => {
let mut range = IntBound::AtLeast { sign, width }.bounded_range();
range.extend_from_slice(&[Variable::F32, Variable::F64, Variable::DEC]);
range
}
}
}
}