\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;t \le 3.4126882859688763 \cdot 10^{232}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{1}, \frac{\sqrt[3]{\sqrt[3]{y} \cdot \sqrt[3]{y}} \cdot \sqrt[3]{\sqrt[3]{y}}}{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 ((t <= 3.4126882859688763e+232)) {
VAR = fma(((cbrt(y) * cbrt(y)) / 1.0), (((cbrt((cbrt(y) * cbrt(y))) * cbrt(cbrt(y))) / (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.3 |
|---|---|
| Target | 8.6 |
| Herbie | 10.8 |
if t < 3.4126882859688763e+232Initial program 14.7
Simplified10.7
rmApplied fma-udef10.7
rmApplied *-un-lft-identity10.7
Applied add-cube-cbrt10.9
Applied times-frac10.9
Applied associate-*l*10.2
rmApplied fma-def10.2
rmApplied add-cube-cbrt10.2
Applied cbrt-prod10.2
if 3.4126882859688763e+232 < t Initial program 37.5
Simplified26.6
Taylor expanded around 0 18.3
Final simplification10.8
herbie shell --seed 2020091 +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))))