\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\begin{array}{l}
\mathbf{if}\;b \le -2.2442947297478706 \cdot 10^{79} \lor \neg \left(b \le 1.3998214706111869 \cdot 10^{-169}\right):\\
\;\;\;\;\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;y \cdot z + \left(x + \frac{a}{\frac{1}{t + z \cdot b}}\right)\\
\end{array}double code(double x, double y, double z, double t, double a, double b) {
return (((x + (y * z)) + (t * a)) + ((a * z) * b));
}
double code(double x, double y, double z, double t, double a, double b) {
double VAR;
if (((b <= -2.2442947297478706e+79) || !(b <= 1.399821470611187e-169))) {
VAR = (((x + (y * z)) + (t * a)) + ((a * z) * b));
} else {
VAR = ((y * z) + (x + (a / (1.0 / (t + (z * b))))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b
Results
| Original | 2.4 |
|---|---|
| Target | 0.3 |
| Herbie | 0.8 |
if b < -2.2442947297478706e+79 or 1.399821470611187e-169 < b Initial program 1.2
if -2.2442947297478706e+79 < b < 1.399821470611187e-169Initial program 3.7
Simplified0.3
rmApplied flip-+15.8
Applied associate-*r/18.9
rmApplied associate-/l*15.9
rmApplied clear-num15.8
Simplified0.4
Final simplification0.8
herbie shell --seed 2020103
(FPCore (x y z t a b)
:name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
:precision binary64
:herbie-target
(if (< z -11820553527347888000) (+ (* z (+ (* b a) y)) (+ x (* t a))) (if (< z 4.7589743188364287e-122) (+ (* (+ (* b z) t) a) (+ (* z y) x)) (+ (* z (+ (* b a) y)) (+ x (* t a)))))
(+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))