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




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 1.2 |
|---|---|
| Target | 1.4 |
| Herbie | 1.1 |
Initial program 1.2
Simplified1.2
Applied fma-udef_binary641.2
Simplified4.4
Applied add-cube-cbrt_binary644.8
Applied add-cube-cbrt_binary644.9
Applied times-frac_binary644.9
Applied associate-*r*_binary641.1
Final simplification1.1
herbie shell --seed 2022088
(FPCore (x y z t)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:tickPosition from plot-0.2.3.4"
:precision binary64
:herbie-target
(if (< (* (- y x) (/ z t)) -1013646692435.8867) (+ x (/ (- y x) (/ t z))) (if (< (* (- y x) (/ z t)) 0.0) (+ x (/ (* (- y x) z) t)) (+ x (/ (- y x) (/ t z)))))
(+ x (* (- y x) (/ z t))))