x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;y \le -7.360592058960857 \cdot 10^{-45}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\mathbf{elif}\;y \le 2.210437770349525 \cdot 10^{-37}:\\
\;\;\;\;\frac{\left(z - t\right) \cdot y}{a - t} + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r22961546 = x;
double r22961547 = y;
double r22961548 = z;
double r22961549 = t;
double r22961550 = r22961548 - r22961549;
double r22961551 = r22961547 * r22961550;
double r22961552 = a;
double r22961553 = r22961552 - r22961549;
double r22961554 = r22961551 / r22961553;
double r22961555 = r22961546 + r22961554;
return r22961555;
}
double f(double x, double y, double z, double t, double a) {
double r22961556 = y;
double r22961557 = -7.360592058960857e-45;
bool r22961558 = r22961556 <= r22961557;
double r22961559 = x;
double r22961560 = z;
double r22961561 = t;
double r22961562 = r22961560 - r22961561;
double r22961563 = a;
double r22961564 = r22961563 - r22961561;
double r22961565 = r22961562 / r22961564;
double r22961566 = r22961556 * r22961565;
double r22961567 = r22961559 + r22961566;
double r22961568 = 2.210437770349525e-37;
bool r22961569 = r22961556 <= r22961568;
double r22961570 = r22961562 * r22961556;
double r22961571 = r22961570 / r22961564;
double r22961572 = r22961571 + r22961559;
double r22961573 = r22961569 ? r22961572 : r22961567;
double r22961574 = r22961558 ? r22961567 : r22961573;
return r22961574;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 10.2 |
|---|---|
| Target | 1.2 |
| Herbie | 0.4 |
if y < -7.360592058960857e-45 or 2.210437770349525e-37 < y Initial program 18.7
Simplified2.3
rmApplied div-inv2.4
rmApplied fma-udef2.4
Simplified0.5
if -7.360592058960857e-45 < y < 2.210437770349525e-37Initial program 0.3
Simplified3.2
rmApplied div-inv3.2
rmApplied fma-udef3.2
Simplified2.3
rmApplied associate-*l/0.3
Final simplification0.4
herbie shell --seed 2019162 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:herbie-target
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))