\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;y \le -20.880869517792441 \lor \neg \left(y \le 1.4492178043474947 \cdot 10^{-6}\right):\\
\;\;\;\;x + y \cdot \frac{1 - {\left(\frac{z - t}{a - t}\right)}^{3}}{\frac{z - t}{a - t} \cdot \left(\frac{z - t}{a - t} + 1\right) + 1}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - \frac{\left(z - t\right) \cdot y}{a - t}\right)\\
\end{array}double code(double x, double y, double z, double t, double a) {
return ((double) (((double) (x + y)) - ((double) (((double) (((double) (z - t)) * y)) / ((double) (a - t))))));
}
double code(double x, double y, double z, double t, double a) {
double VAR;
if (((y <= -20.88086951779244) || !(y <= 1.4492178043474947e-06))) {
VAR = ((double) (x + ((double) (y * ((double) (((double) (1.0 - ((double) pow(((double) (((double) (z - t)) / ((double) (a - t)))), 3.0)))) / ((double) (((double) (((double) (((double) (z - t)) / ((double) (a - t)))) * ((double) (((double) (((double) (z - t)) / ((double) (a - t)))) + 1.0)))) + 1.0))))))));
} else {
VAR = ((double) (x + ((double) (y - ((double) (((double) (((double) (z - t)) * y)) / ((double) (a - t))))))));
}
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.2 |
| Herbie | 8.9 |
if y < -20.880869517792441 or 1.4492178043474947e-6 < y Initial program 29.1
rmApplied associate-/l*18.6
rmApplied associate--l+13.8
rmApplied associate-/r/11.7
Applied *-un-lft-identity11.7
Applied distribute-rgt-out--11.7
rmApplied flip3--16.1
Simplified16.1
Simplified16.1
if -20.880869517792441 < y < 1.4492178043474947e-6Initial program 4.8
rmApplied associate--l+2.6
Final simplification8.9
herbie shell --seed 2020163
(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.0 (- 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.0 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))