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




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 7.4 |
|---|---|
| Target | 3.9 |
| Herbie | 0.6 |
Initial program 7.4
Applied clear-num_binary647.5
Taylor expanded in z around 0 6.6
Applied *-un-lft-identity_binary646.6
Applied times-frac_binary641.6
Applied add-cube-cbrt_binary642.1
Applied add-cube-cbrt_binary641.8
Applied times-frac_binary641.8
Applied associate-*r*_binary640.6
Final simplification0.6
herbie shell --seed 2021313
(FPCore (x y z)
:name "Graphics.Rendering.Chart.Backend.Diagrams:calcFontMetrics from Chart-diagrams-1.5.1, A"
:precision binary64
:herbie-target
(if (< y -3.7429310762689856e+171) (* (/ (+ y x) (- y)) z) (if (< y 3.5534662456086734e+168) (/ (+ x y) (- 1.0 (/ y z))) (* (/ (+ y x) (- y)) z)))
(/ (+ x y) (- 1.0 (/ y z))))