\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;t \le -5.69603370545272536 \cdot 10^{73} \lor \neg \left(t \le 1.9681526611044615 \cdot 10^{149}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot \frac{\sqrt[3]{\frac{t - z}{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}}} \cdot \sqrt[3]{\frac{t - z}{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}}}}{\sqrt[3]{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}}}\right) \cdot \frac{\sqrt[3]{\frac{t - z}{\sqrt[3]{a - t} \cdot \sqrt[3]{a - t}}}}{\sqrt[3]{\sqrt[3]{a - t}}} + \left(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 VAR;
if (((t <= -5.696033705452725e+73) || !(t <= 1.9681526611044615e+149))) {
VAR = fma((z / t), y, x);
} else {
VAR = (((y * ((cbrt(((t - z) / (cbrt((a - t)) * cbrt((a - t))))) * cbrt(((t - z) / (cbrt((a - t)) * cbrt((a - t)))))) / cbrt((cbrt((a - t)) * cbrt((a - t)))))) * (cbrt(((t - z) / (cbrt((a - t)) * cbrt((a - t))))) / cbrt(cbrt((a - t))))) + (x + y));
}
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.3 |
|---|---|
| Target | 8.1 |
| Herbie | 8.2 |
if t < -5.696033705452725e+73 or 1.9681526611044615e+149 < t Initial program 30.2
Simplified21.3
rmApplied fma-udef21.4
rmApplied div-inv21.4
Applied associate-*l*20.1
Simplified20.1
Taylor expanded around inf 16.5
Simplified11.5
if -5.696033705452725e+73 < t < 1.9681526611044615e+149Initial program 9.2
Simplified6.9
rmApplied fma-udef6.9
rmApplied div-inv7.0
Applied associate-*l*6.8
Simplified6.8
rmApplied add-cube-cbrt7.0
Applied associate-/r*7.0
rmApplied add-cube-cbrt7.0
Applied cbrt-prod7.1
Applied add-cube-cbrt7.1
Applied times-frac7.1
Applied associate-*r*6.5
Final simplification8.2
herbie shell --seed 2020075 +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))))