\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;t \le -1.2963627054695715 \cdot 10^{105} \lor \neg \left(t \le 2.2171165764838755 \cdot 10^{119}\right):\\
\;\;\;\;\frac{z \cdot y}{t} + x\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - \frac{\frac{\sqrt[3]{z - t} \cdot \sqrt[3]{z - t}}{\sqrt[3]{a - t} \cdot \sqrt[3]{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}}} \cdot \left(\sqrt[3]{z - t} \cdot y\right)}{\sqrt[3]{\sqrt[3]{a - t}} \cdot \sqrt[3]{a - t}}\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((x + y) - (((z - t) * y) / (a - t)));
}
double code(double x, double y, double z, double t, double a) {
double temp;
if (((t <= -1.2963627054695715e+105) || !(t <= 2.2171165764838755e+119))) {
temp = (((z * y) / t) + x);
} else {
temp = ((x + y) - ((((cbrt((z - t)) * cbrt((z - t))) / (cbrt((a - t)) * cbrt((cbrt((a - t)) * cbrt((a - t)))))) * (cbrt((z - t)) * y)) / (cbrt(cbrt((a - t))) * cbrt((a - t)))));
}
return temp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 16.4 |
|---|---|
| Target | 8.5 |
| Herbie | 10.3 |
if t < -1.2963627054695715e+105 or 2.2171165764838755e+119 < t Initial program 30.3
Taylor expanded around inf 17.2
if -1.2963627054695715e+105 < t < 2.2171165764838755e+119Initial program 9.2
rmApplied add-cube-cbrt9.3
Applied times-frac6.2
rmApplied add-cube-cbrt6.2
Applied cbrt-prod6.3
Applied associate-*r*6.3
rmApplied add-cube-cbrt6.3
Applied times-frac6.3
Applied associate-*l*5.4
rmApplied frac-times6.0
Applied associate-*r/6.7
Final simplification10.3
herbie shell --seed 2020060
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-07) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))