\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;y \le -65179893516015337000:\\
\;\;\;\;\left(x + y\right) - \frac{z - t}{\frac{a - t}{y}}\\
\mathbf{elif}\;y \le 3.4489295074513532 \cdot 10^{-114}:\\
\;\;\;\;x + \left(y - \frac{\left(z - t\right) \cdot y}{a - t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - {\left(\frac{y}{a - t} \cdot \left(z - t\right)\right)}^{1}\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 ((y <= -6.517989351601534e+19)) {
VAR = ((x + y) - ((z - t) / ((a - t) / y)));
} else {
double VAR_1;
if ((y <= 3.448929507451353e-114)) {
VAR_1 = (x + (y - (((z - t) * y) / (a - t))));
} else {
VAR_1 = (x + (y - pow(((y / (a - t)) * (z - t)), 1.0)));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 15.9 |
|---|---|
| Target | 8.7 |
| Herbie | 8.9 |
if y < -6.517989351601534e+19Initial program 31.2
rmApplied associate-/l*20.0
if -6.517989351601534e+19 < y < 3.448929507451353e-114Initial program 4.0
rmApplied associate--l+2.1
if 3.448929507451353e-114 < y Initial program 22.6
rmApplied add-cube-cbrt22.8
Applied times-frac14.6
rmApplied associate--l+13.8
rmApplied pow113.8
Applied pow113.8
Applied pow-prod-down13.8
Simplified11.2
Final simplification8.9
herbie shell --seed 2020105
(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))))