x - \frac{\left(y \cdot 2\right) \cdot z}{\left(z \cdot 2\right) \cdot z - y \cdot t}\begin{array}{l}
\mathbf{if}\;z \le -2.57127147346290313 \cdot 10^{197}:\\
\;\;\;\;x - \left(y \cdot 2\right) \cdot 0\\
\mathbf{else}:\\
\;\;\;\;x - \left(\left(y \cdot 2\right) \cdot \frac{\sqrt[3]{z} \cdot \sqrt[3]{z}}{\sqrt[3]{2 \cdot {z}^{2} - t \cdot y} \cdot \sqrt[3]{2 \cdot {z}^{2} - t \cdot y}}\right) \cdot \frac{\sqrt[3]{z}}{\sqrt[3]{2 \cdot {z}^{2} - t \cdot y}}\\
\end{array}double code(double x, double y, double z, double t) {
return (x - (((y * 2.0) * z) / (((z * 2.0) * z) - (y * t))));
}
double code(double x, double y, double z, double t) {
double temp;
if ((z <= -2.571271473462903e+197)) {
temp = (x - ((y * 2.0) * 0.0));
} else {
temp = (x - (((y * 2.0) * ((cbrt(z) * cbrt(z)) / (cbrt(((2.0 * pow(z, 2.0)) - (t * y))) * cbrt(((2.0 * pow(z, 2.0)) - (t * y)))))) * (cbrt(z) / cbrt(((2.0 * pow(z, 2.0)) - (t * y))))));
}
return temp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 12.0 |
|---|---|
| Target | 0.1 |
| Herbie | 6.5 |
if z < -2.571271473462903e+197Initial program 27.9
rmApplied *-un-lft-identity27.9
Applied times-frac14.4
Simplified14.4
Simplified14.4
Taylor expanded around 0 12.0
if -2.571271473462903e+197 < z Initial program 10.5
rmApplied *-un-lft-identity10.5
Applied times-frac6.2
Simplified6.2
Simplified6.2
rmApplied add-cube-cbrt6.4
Applied add-cube-cbrt6.5
Applied times-frac6.5
Applied associate-*r*6.0
Final simplification6.5
herbie shell --seed 2020049 +o rules:numerics
(FPCore (x y z t)
:name "Numeric.AD.Rank1.Halley:findZero from ad-4.2.4"
:precision binary64
:herbie-target
(- x (/ 1 (- (/ z y) (/ (/ t 2) z))))
(- x (/ (* (* y 2) z) (- (* (* z 2) z) (* y t)))))