\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\begin{array}{l}
\mathbf{if}\;a \le -4.23331323304797557 \cdot 10^{-168} \lor \neg \left(a \le 1.5582813309178771 \cdot 10^{-23}\right):\\
\;\;\;\;\mathsf{fma}\left(y \cdot \frac{1}{a - t}, t - z, 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 r503476 = x;
double r503477 = y;
double r503478 = r503476 + r503477;
double r503479 = z;
double r503480 = t;
double r503481 = r503479 - r503480;
double r503482 = r503481 * r503477;
double r503483 = a;
double r503484 = r503483 - r503480;
double r503485 = r503482 / r503484;
double r503486 = r503478 - r503485;
return r503486;
}
double f(double x, double y, double z, double t, double a) {
double r503487 = a;
double r503488 = -4.2333132330479756e-168;
bool r503489 = r503487 <= r503488;
double r503490 = 1.558281330917877e-23;
bool r503491 = r503487 <= r503490;
double r503492 = !r503491;
bool r503493 = r503489 || r503492;
double r503494 = y;
double r503495 = 1.0;
double r503496 = t;
double r503497 = r503487 - r503496;
double r503498 = r503495 / r503497;
double r503499 = r503494 * r503498;
double r503500 = z;
double r503501 = r503496 - r503500;
double r503502 = x;
double r503503 = r503502 + r503494;
double r503504 = fma(r503499, r503501, r503503);
double r503505 = r503500 / r503496;
double r503506 = fma(r503505, r503494, r503502);
double r503507 = r503493 ? r503504 : r503506;
return r503507;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
| Original | 16.9 |
|---|---|
| Target | 8.4 |
| Herbie | 10.2 |
if a < -4.2333132330479756e-168 or 1.558281330917877e-23 < a Initial program 15.3
Simplified9.1
rmApplied div-inv9.1
if -4.2333132330479756e-168 < a < 1.558281330917877e-23Initial program 20.2
Simplified19.4
rmApplied fma-udef19.5
rmApplied div-inv19.5
Applied associate-*l*19.3
Simplified19.2
Taylor expanded around inf 14.0
Simplified12.5
Final simplification10.2
herbie shell --seed 2020035 +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))))