\frac{x}{y} \cdot \left(z - t\right) + t
\begin{array}{l}
t_1 := \sqrt[3]{z - t}\\
t + \left(x \cdot \frac{t_1 \cdot t_1}{\sqrt[3]{y} \cdot \sqrt[3]{y}}\right) \cdot \frac{t_1}{\sqrt[3]{y}}
\end{array}
(FPCore (x y z t) :precision binary64 (+ (* (/ x y) (- z t)) t))
(FPCore (x y z t) :precision binary64 (let* ((t_1 (cbrt (- z t)))) (+ t (* (* x (/ (* t_1 t_1) (* (cbrt y) (cbrt y)))) (/ t_1 (cbrt y))))))
double code(double x, double y, double z, double t) {
return ((x / y) * (z - t)) + t;
}
double code(double x, double y, double z, double t) {
double t_1 = cbrt((z - t));
return t + ((x * ((t_1 * t_1) / (cbrt(y) * cbrt(y)))) * (t_1 / cbrt(y)));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 2.0 |
|---|---|
| Target | 2.3 |
| Herbie | 1.5 |
Initial program 2.0
Simplified2.0
Applied fma-udef_binary642.0
Simplified6.6
Applied add-cube-cbrt_binary647.0
Applied add-cube-cbrt_binary647.1
Applied times-frac_binary647.1
Applied associate-*r*_binary641.5
Final simplification1.5
herbie shell --seed 2022125
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cget from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(if (< z 2.759456554562692e-282) (+ (* (/ x y) (- z t)) t) (if (< z 2.326994450874436e-110) (+ (* x (/ (- z t) y)) t) (+ (* (/ x y) (- z t)) t)))
(+ (* (/ x y) (- z t)) t))