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




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.2 |
|---|---|
| Target | 3.1 |
| Herbie | 1.1 |
Initial program 12.2
rmApplied *-un-lft-identity_binary6412.2
Applied times-frac_binary643.5
Simplified3.5
rmApplied add-cube-cbrt_binary644.7
Applied add-cube-cbrt_binary644.0
Applied times-frac_binary644.0
Applied associate-*r*_binary641.1
Final simplification1.1
herbie shell --seed 2021207
(FPCore (x y z)
:name "Numeric.SpecFunctions:choose from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(/ x (/ z (+ y z)))
(/ (* x (+ y z)) z))