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




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 1.4 |
|---|---|
| Target | 0.5 |
| Herbie | 1.0 |
Initial program 1.4
Simplified1.4
Taylor expanded in y around 0 10.5
Simplified3.1
Applied add-cube-cbrt_binary643.5
Applied add-cube-cbrt_binary643.7
Applied times-frac_binary643.7
Applied associate-*l*_binary641.0
Final simplification1.0
herbie shell --seed 2021215
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< y -8.508084860551241e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.894426862792089e-49) (+ x (* (* y (- z t)) (/ 1.0 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))
(+ x (* y (/ (- z t) (- a t)))))