\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;t \le -1.1300734185978326 \cdot 10^{79} \lor \neg \left(t \le 1.87955801658874242 \cdot 10^{143}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot \frac{1}{a - t}, t - z, 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 <= -1.1300734185978326e+79) || !(t <= 1.8795580165887424e+143))) {
VAR = fma((z / t), y, x);
} else {
VAR = fma((y * (1.0 / (a - t))), (t - z), (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.6 |
|---|---|
| Target | 8.6 |
| Herbie | 8.6 |
if t < -1.1300734185978326e+79 or 1.8795580165887424e+143 < t Initial program 31.1
Simplified22.8
rmApplied div-inv22.8
rmApplied fma-udef22.9
Simplified22.9
Taylor expanded around inf 17.6
Simplified12.1
if -1.1300734185978326e+79 < t < 1.8795580165887424e+143Initial program 9.1
Simplified6.8
rmApplied div-inv6.8
Final simplification8.6
herbie shell --seed 2020078 +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))))