\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;a \le -8.94712349400520929 \cdot 10^{-168} \lor \neg \left(a \le 8.2322134775541335 \cdot 10^{-92}\right):\\
\;\;\;\;y \cdot \left(\left(t - z\right) \cdot \frac{1}{a - t}\right) + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{t}, y, x\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r567383 = x;
double r567384 = y;
double r567385 = r567383 + r567384;
double r567386 = z;
double r567387 = t;
double r567388 = r567386 - r567387;
double r567389 = r567388 * r567384;
double r567390 = a;
double r567391 = r567390 - r567387;
double r567392 = r567389 / r567391;
double r567393 = r567385 - r567392;
return r567393;
}
double f(double x, double y, double z, double t, double a) {
double r567394 = a;
double r567395 = -8.94712349400521e-168;
bool r567396 = r567394 <= r567395;
double r567397 = 8.232213477554133e-92;
bool r567398 = r567394 <= r567397;
double r567399 = !r567398;
bool r567400 = r567396 || r567399;
double r567401 = y;
double r567402 = t;
double r567403 = z;
double r567404 = r567402 - r567403;
double r567405 = 1.0;
double r567406 = r567394 - r567402;
double r567407 = r567405 / r567406;
double r567408 = r567404 * r567407;
double r567409 = r567401 * r567408;
double r567410 = x;
double r567411 = r567410 + r567401;
double r567412 = r567409 + r567411;
double r567413 = r567403 / r567402;
double r567414 = fma(r567413, r567401, r567410);
double r567415 = r567400 ? r567412 : r567414;
return r567415;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 16.5 |
|---|---|
| Target | 8.5 |
| Herbie | 8.6 |
if a < -8.94712349400521e-168 or 8.232213477554133e-92 < a Initial program 14.9
Simplified9.1
rmApplied fma-udef9.2
rmApplied div-inv9.2
Applied associate-*l*8.5
Simplified8.5
rmApplied div-inv8.5
if -8.94712349400521e-168 < a < 8.232213477554133e-92Initial program 20.7
Simplified19.9
rmApplied fma-udef19.9
rmApplied div-inv19.9
Applied associate-*l*19.5
Simplified19.5
Taylor expanded around inf 10.1
Simplified8.9
Final simplification8.6
herbie shell --seed 2020047 +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))))