2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
2 \cdot \left(\left(\left(t \cdot z + x \cdot y\right) - a \cdot \left(i \cdot c\right)\right) - c \cdot \left(\left(i \cdot c\right) \cdot b\right)\right)
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (- (+ (* t z) (* x y)) (* a (* i c))) (* c (* (* i c) b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * ((((t * z) + (x * y)) - (a * (i * c))) - (c * ((i * c) * b)));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus i
Results
| Original | 6.2 |
|---|---|
| Target | 1.7 |
| Herbie | 1.4 |
Initial program 6.2
Taylor expanded around 0 8.5
Simplified5.1
rmApplied distribute-rgt-in_binary64_174195.1
Applied distribute-rgt-in_binary64_174195.1
Applied associate--r+_binary64_174055.1
Simplified2.3
rmApplied associate-*l*_binary64_174101.4
Simplified1.4
Final simplification1.4
herbie shell --seed 2021044
(FPCore (x y z t a b c i)
:name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
:precision binary64
:herbie-target
(* 2.0 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i))))
(* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))