Commit fc81bc3
committed
FDiv constant folding for divide-by-zero produces IEEE 754 NaN/Inf
Remove the (!= b 0.0) guard from FDiv constant folding, allowing
divide-by-zero to produce correct IEEE 754 results: 0.0/0.0 → NaN,
x/0.0 → ±Inf. Egglog's native f64 division follows IEEE 754 semantics,
and FConst already supports NaN/Inf values in parsing and extraction.
This matches the C++ FoldFPScalarDivideByZero behavior.1 parent 529e110 commit fc81bc3
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
0 commit comments