x + y \cdot \frac{z - t}{z - a}\begin{array}{l}
\mathbf{if}\;y \le -901067.937205575406551361083984375 \lor \neg \left(y \le 5.163724188916300428001985018951606340548 \cdot 10^{-43}\right):\\
\;\;\;\;\frac{y}{\frac{z - a}{z - t}} + x\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(z - t\right)}{z - a} + x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r606517 = x;
double r606518 = y;
double r606519 = z;
double r606520 = t;
double r606521 = r606519 - r606520;
double r606522 = a;
double r606523 = r606519 - r606522;
double r606524 = r606521 / r606523;
double r606525 = r606518 * r606524;
double r606526 = r606517 + r606525;
return r606526;
}
double f(double x, double y, double z, double t, double a) {
double r606527 = y;
double r606528 = -901067.9372055754;
bool r606529 = r606527 <= r606528;
double r606530 = 5.1637241889163004e-43;
bool r606531 = r606527 <= r606530;
double r606532 = !r606531;
bool r606533 = r606529 || r606532;
double r606534 = z;
double r606535 = a;
double r606536 = r606534 - r606535;
double r606537 = t;
double r606538 = r606534 - r606537;
double r606539 = r606536 / r606538;
double r606540 = r606527 / r606539;
double r606541 = x;
double r606542 = r606540 + r606541;
double r606543 = r606527 * r606538;
double r606544 = r606543 / r606536;
double r606545 = r606544 + r606541;
double r606546 = r606533 ? r606542 : r606545;
return r606546;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 1.4 |
|---|---|
| Target | 1.2 |
| Herbie | 0.5 |
if y < -901067.9372055754 or 5.1637241889163004e-43 < y Initial program 0.6
Simplified0.6
rmApplied clear-num0.7
rmApplied fma-udef0.7
Simplified0.6
if -901067.9372055754 < y < 5.1637241889163004e-43Initial program 2.1
Simplified2.1
rmApplied add-cube-cbrt2.3
rmApplied fma-udef2.3
Simplified0.3
Final simplification0.5
herbie shell --seed 2020002 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (* y (/ (- z t) (- z a)))))