x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;y \le -5.610173163155118 \cdot 10^{-108} \lor \neg \left(y \le 59977.7525706290544\right):\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t} + x\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(z - t\right) \cdot y}{a - t} + x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r504848 = x;
double r504849 = y;
double r504850 = z;
double r504851 = t;
double r504852 = r504850 - r504851;
double r504853 = r504849 * r504852;
double r504854 = a;
double r504855 = r504854 - r504851;
double r504856 = r504853 / r504855;
double r504857 = r504848 + r504856;
return r504857;
}
double f(double x, double y, double z, double t, double a) {
double r504858 = y;
double r504859 = -5.610173163155118e-108;
bool r504860 = r504858 <= r504859;
double r504861 = 59977.752570629054;
bool r504862 = r504858 <= r504861;
double r504863 = !r504862;
bool r504864 = r504860 || r504863;
double r504865 = z;
double r504866 = t;
double r504867 = r504865 - r504866;
double r504868 = a;
double r504869 = r504868 - r504866;
double r504870 = r504858 / r504869;
double r504871 = r504867 * r504870;
double r504872 = x;
double r504873 = r504871 + r504872;
double r504874 = r504867 * r504858;
double r504875 = r504874 / r504869;
double r504876 = r504875 + r504872;
double r504877 = r504864 ? r504873 : r504876;
return r504877;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 11.0 |
|---|---|
| Target | 1.3 |
| Herbie | 1.6 |
if y < -5.610173163155118e-108 or 59977.752570629054 < y Initial program 19.9
Simplified2.6
rmApplied div-inv2.7
rmApplied fma-udef2.7
Simplified2.6
if -5.610173163155118e-108 < y < 59977.752570629054Initial program 0.3
Simplified3.4
rmApplied div-inv3.4
rmApplied fma-udef3.4
Simplified3.4
rmApplied associate-*r/0.3
Final simplification1.6
herbie shell --seed 2020036 +o rules:numerics
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(+ x (/ y (/ (- a t) (- z t))))
(+ x (/ (* y (- z t)) (- a t))))