\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;a \le -9.8452756963430972 \cdot 10^{-282} \lor \neg \left(a \le 3.50539185129691427 \cdot 10^{-186}\right):\\
\;\;\;\;x + \left(y - \frac{\sqrt[3]{z - t} \cdot \sqrt[3]{z - t}}{\sqrt[3]{a - t}} \cdot \left(\frac{\sqrt[3]{z - t}}{\sqrt[3]{a - t}} \cdot \frac{y}{\sqrt[3]{a - t}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot y}{t} + x\\
\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 VAR;
if (((a <= -9.845275696343097e-282) || !(a <= 3.5053918512969143e-186))) {
VAR = (x + (y - (((cbrt((z - t)) * cbrt((z - t))) / cbrt((a - t))) * ((cbrt((z - t)) / cbrt((a - t))) * (y / cbrt((a - t)))))));
} else {
VAR = (((z * y) / t) + x);
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 16.6 |
|---|---|
| Target | 8.6 |
| Herbie | 7.5 |
if a < -9.845275696343097e-282 or 3.5053918512969143e-186 < a Initial program 16.2
rmApplied *-un-lft-identity16.2
Applied times-frac11.5
Simplified11.5
rmApplied associate--l+8.7
rmApplied add-cube-cbrt11.0
Applied *-un-lft-identity11.0
Applied times-frac11.1
Applied associate-*r*10.2
Simplified10.2
rmApplied add-cube-cbrt7.8
Applied times-frac7.8
Applied associate-*l*7.4
if -9.845275696343097e-282 < a < 3.5053918512969143e-186Initial program 19.5
Taylor expanded around inf 7.9
Final simplification7.5
herbie shell --seed 2020078
(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))))