\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.8497576025764338 \cdot 10^{-180} \lor \neg \left(\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \le 6.29235312 \cdot 10^{-302}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{\sqrt[3]{y} \cdot \left(\sqrt[3]{\sqrt[3]{y} \cdot \sqrt[3]{y}} \cdot \sqrt[3]{\sqrt[3]{y}}\right)}{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}}, \frac{\sqrt[3]{y}}{\sqrt[3]{a - t}} \cdot \left(t - z\right), x + y\right)\\
\mathbf{else}:\\
\;\;\;\;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 (((((x + y) - (((z - t) * y) / (a - t))) <= -2.849757602576434e-180) || !(((x + y) - (((z - t) * y) / (a - t))) <= 6.29235311668827e-302))) {
VAR = fma(((cbrt(y) * (cbrt((cbrt(y) * cbrt(y))) * cbrt(cbrt(y)))) / (cbrt((a - t)) * cbrt((a - t)))), ((cbrt(y) / cbrt((a - t))) * (t - z)), (x + y));
} else {
VAR = 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.2 |
|---|---|
| Target | 8.7 |
| Herbie | 9.2 |
if (- (+ x y) (/ (* (- z t) y) (- a t))) < -2.849757602576434e-180 or 6.29235311668827e-302 < (- (+ x y) (/ (* (- z t) y) (- a t))) Initial program 12.6
Simplified8.0
rmApplied fma-udef8.0
rmApplied add-cube-cbrt8.2
Applied add-cube-cbrt8.3
Applied times-frac8.2
Applied associate-*l*6.7
rmApplied fma-def6.7
rmApplied add-cube-cbrt6.7
Applied cbrt-prod6.7
if -2.849757602576434e-180 < (- (+ x y) (/ (* (- z t) y) (- a t))) < 6.29235311668827e-302Initial program 51.6
Simplified52.2
Taylor expanded around 0 34.5
Final simplification9.2
herbie shell --seed 2020100 +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))))