\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;a \le -3.6101465856808473 \cdot 10^{-162}:\\
\;\;\;\;\left(x + y\right) - \frac{z - t}{\frac{a - t}{y}}\\
\mathbf{elif}\;a \le 1.54427068928062914 \cdot 10^{-53}:\\
\;\;\;\;\frac{z \cdot y}{t} + x\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - \frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}} \cdot \frac{z - t}{\frac{\sqrt[3]{a - t}}{\sqrt[3]{y}}}\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((double) (((double) (x + y)) - ((double) (((double) (((double) (z - t)) * y)) / ((double) (a - t))))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if ((a <= -3.6101465856808473e-162)) {
VAR = ((double) (((double) (x + y)) - ((double) (((double) (z - t)) / ((double) (((double) (a - t)) / y))))));
} else {
double VAR_1;
if ((a <= 1.5442706892806291e-53)) {
VAR_1 = ((double) (((double) (((double) (z * y)) / t)) + x));
} else {
VAR_1 = ((double) (((double) (x + y)) - ((double) (((double) (((double) (((double) cbrt(y)) * ((double) cbrt(y)))) / ((double) (((double) cbrt(((double) (a - t)))) * ((double) cbrt(((double) (a - t)))))))) * ((double) (((double) (z - t)) / ((double) (((double) cbrt(((double) (a - t)))) / ((double) cbrt(y))))))))));
}
VAR = VAR_1;
}
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.4 |
|---|---|
| Target | 8.1 |
| Herbie | 9.8 |
if a < -3.6101465856808473e-162Initial program 15.3
rmApplied associate-/l*10.0
if -3.6101465856808473e-162 < a < 1.5442706892806291e-53Initial program 19.3
Taylor expanded around inf 12.0
if 1.5442706892806291e-53 < a Initial program 14.8
rmApplied associate-/l*8.1
rmApplied add-cube-cbrt8.2
Applied add-cube-cbrt8.3
Applied times-frac8.3
Applied *-un-lft-identity8.3
Applied times-frac7.3
Simplified7.3
Final simplification9.8
herbie shell --seed 2020123
(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))))