\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;t \le -2.10120344687679351 \cdot 10^{108} \lor \neg \left(t \le 2.7030262370830962 \cdot 10^{76}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\sqrt[3]{t - z} \cdot \sqrt[3]{t - z}}{\frac{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}}{\sqrt[3]{y} \cdot \sqrt[3]{y}}}, \frac{\sqrt[3]{t - z}}{\frac{\sqrt[3]{a - t}}{\sqrt[3]{y}}}, 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 (((t <= -2.1012034468767935e+108) || !(t <= 2.7030262370830962e+76))) {
temp = fma((z / t), y, x);
} else {
temp = fma(((cbrt((t - z)) * cbrt((t - z))) / ((cbrt((a - t)) * cbrt((a - t))) / (cbrt(y) * cbrt(y)))), (cbrt((t - z)) / (cbrt((a - t)) / cbrt(y))), (x + y));
}
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.0 |
|---|---|
| Target | 8.6 |
| Herbie | 7.4 |
if t < -2.1012034468767935e+108 or 2.7030262370830962e+76 < t Initial program 30.3
Simplified21.1
rmApplied clear-num21.1
rmApplied fma-udef21.2
Simplified21.2
Taylor expanded around inf 17.6
Simplified12.1
if -2.1012034468767935e+108 < t < 2.7030262370830962e+76Initial program 7.6
Simplified6.0
rmApplied clear-num6.1
rmApplied fma-udef6.1
Simplified5.9
rmApplied add-cube-cbrt6.1
Applied add-cube-cbrt6.2
Applied times-frac6.2
Applied add-cube-cbrt6.2
Applied times-frac4.6
Applied fma-def4.6
Final simplification7.4
herbie shell --seed 2020057 +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))))