\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \le -2.922927865251897 \cdot 10^{-288}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{1}, \frac{\sqrt[3]{y}}{a - t} \cdot \left(t - z\right), x + y\right)\\
\mathbf{elif}\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \le 2.71333 \cdot 10^{-166}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\left(\sqrt[3]{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}} \cdot \sqrt[3]{\sqrt[3]{a - t}}\right) \cdot \sqrt[3]{a - t}}, \frac{\sqrt[3]{y}}{\sqrt[3]{a - t}} \cdot \left(t - z\right), x + y\right)\\
\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 ((((x + y) - (((z - t) * y) / (a - t))) <= -2.922927865251897e-288)) {
temp = fma(((cbrt(y) * cbrt(y)) / 1.0), ((cbrt(y) / (a - t)) * (t - z)), (x + y));
} else {
double temp_1;
if ((((x + y) - (((z - t) * y) / (a - t))) <= 2.7133285516175262e-166)) {
temp_1 = x;
} else {
temp_1 = fma(((cbrt(y) * cbrt(y)) / ((cbrt((cbrt((a - t)) * cbrt((a - t)))) * cbrt(cbrt((a - t)))) * cbrt((a - t)))), ((cbrt(y) / cbrt((a - t))) * (t - z)), (x + y));
}
temp = temp_1;
}
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.5 |
|---|---|
| Target | 8.7 |
| Herbie | 9.4 |
if (- (+ x y) (/ (* (- z t) y) (- a t))) < -2.922927865251897e-288Initial program 12.9
Simplified7.4
rmApplied fma-udef7.4
rmApplied *-un-lft-identity7.4
Applied add-cube-cbrt7.7
Applied times-frac7.7
Applied associate-*l*7.1
Applied fma-def7.1
if -2.922927865251897e-288 < (- (+ x y) (/ (* (- z t) y) (- a t))) < 2.7133285516175262e-166Initial program 50.3
Simplified50.8
Taylor expanded around 0 33.1
if 2.7133285516175262e-166 < (- (+ x y) (/ (* (- z t) y) (- a t))) Initial program 12.6
Simplified7.3
rmApplied fma-udef7.3
rmApplied add-cube-cbrt7.6
Applied add-cube-cbrt7.6
Applied times-frac7.6
Applied associate-*l*6.3
Applied fma-def6.3
rmApplied add-cube-cbrt6.3
Applied cbrt-prod6.3
Final simplification9.4
herbie shell --seed 2020066 +o rules:numerics
(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))))