x + y \cdot \frac{z - t}{a - t}\begin{array}{l}
\mathbf{if}\;y \le -2.0685894439031453 \cdot 10^{101} \lor \neg \left(y \le 1.8958912622994213 \cdot 10^{-91}\right):\\
\;\;\;\;\frac{y}{\frac{a - t}{z - t}} + x\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{a - t} \cdot \left(y \cdot \left(z - t\right)\right) + x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r438364 = x;
double r438365 = y;
double r438366 = z;
double r438367 = t;
double r438368 = r438366 - r438367;
double r438369 = a;
double r438370 = r438369 - r438367;
double r438371 = r438368 / r438370;
double r438372 = r438365 * r438371;
double r438373 = r438364 + r438372;
return r438373;
}
double f(double x, double y, double z, double t, double a) {
double r438374 = y;
double r438375 = -2.0685894439031453e+101;
bool r438376 = r438374 <= r438375;
double r438377 = 1.8958912622994213e-91;
bool r438378 = r438374 <= r438377;
double r438379 = !r438378;
bool r438380 = r438376 || r438379;
double r438381 = a;
double r438382 = t;
double r438383 = r438381 - r438382;
double r438384 = z;
double r438385 = r438384 - r438382;
double r438386 = r438383 / r438385;
double r438387 = r438374 / r438386;
double r438388 = x;
double r438389 = r438387 + r438388;
double r438390 = 1.0;
double r438391 = r438390 / r438383;
double r438392 = r438374 * r438385;
double r438393 = r438391 * r438392;
double r438394 = r438393 + r438388;
double r438395 = r438380 ? r438389 : r438394;
return r438395;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 1.3 |
|---|---|
| Target | 0.4 |
| Herbie | 1.1 |
if y < -2.0685894439031453e+101 or 1.8958912622994213e-91 < y Initial program 0.6
Simplified0.6
rmApplied clear-num0.7
rmApplied fma-udef0.7
Simplified0.6
if -2.0685894439031453e+101 < y < 1.8958912622994213e-91Initial program 1.9
Simplified1.9
rmApplied clear-num1.9
rmApplied fma-udef1.9
Simplified1.5
rmApplied div-inv1.6
Applied *-un-lft-identity1.6
Applied times-frac1.6
Simplified1.6
Final simplification1.1
herbie shell --seed 2019198 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
:herbie-target
(if (< y -8.508084860551241e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.894426862792089e-49) (+ x (* (* y (- z t)) (/ 1.0 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))
(+ x (* y (/ (- z t) (- a t)))))