\left(d1 \cdot d2 + \left(d3 + 5\right) \cdot d1\right) + d1 \cdot 32
d1 \cdot d2 + d1 \cdot \left(\left(d3 + 5\right) + 32\right)
double code(double d1, double d2, double d3) {
return (((d1 * d2) + ((d3 + 5.0) * d1)) + (d1 * 32.0));
}
double code(double d1, double d2, double d3) {
return ((d1 * d2) + (d1 * ((d3 + 5.0) + 32.0)));
}




Bits error versus d1




Bits error versus d2




Bits error versus d3
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
Simplified0.0
rmApplied distribute-lft-in0.0
Final simplification0.0
herbie shell --seed 2020071
(FPCore (d1 d2 d3)
:name "FastMath dist3"
:precision binary64
:herbie-target
(* d1 (+ (+ 37 d3) d2))
(+ (+ (* d1 d2) (* (+ d3 5) d1)) (* d1 32)))