\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\begin{array}{l}
t_1 := \mathsf{fma}\left(a \cdot z, b, \mathsf{fma}\left(a, t, \mathsf{fma}\left(z, y, x\right)\right)\right)\\
\mathbf{if}\;b \leq -9.112644010531083 \cdot 10^{+36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 2.4356118753451166 \cdot 10^{+116}:\\
\;\;\;\;\mathsf{fma}\left(y, z, \mathsf{fma}\left(a, \mathsf{fma}\left(z, b, t\right), x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (* a z) b (fma a t (fma z y x)))))
(if (<= b -9.112644010531083e+36)
t_1
(if (<= b 2.4356118753451166e+116) (fma y z (fma a (fma z b t) x)) t_1))))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 t_1 = fma((a * z), b, fma(a, t, fma(z, y, x)));
double tmp;
if (b <= -9.112644010531083e+36) {
tmp = t_1;
} else if (b <= 2.4356118753451166e+116) {
tmp = fma(y, z, fma(a, fma(z, b, t), x));
} else {
tmp = t_1;
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b
| Original | 2.1 |
|---|---|
| Target | 0.4 |
| Herbie | 0.5 |
if b < -9.11264401053108332e36 or 2.43561187534511665e116 < b Initial program 0.9
Applied egg-rr0.9
if -9.11264401053108332e36 < b < 2.43561187534511665e116Initial program 2.7
Simplified0.3
Final simplification0.5
herbie shell --seed 2022125
(FPCore (x y z t a b)
:name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
:precision binary64
:herbie-target
(if (< z -11820553527347888000.0) (+ (* 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)))