x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;y \le -1.270112277700152 \cdot 10^{-89} \lor \neg \left(y \le 5.4933827527075371 \cdot 10^{24}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t} + x\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(z - t\right)}{a - t} + x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r548093 = x;
double r548094 = y;
double r548095 = z;
double r548096 = t;
double r548097 = r548095 - r548096;
double r548098 = r548094 * r548097;
double r548099 = a;
double r548100 = r548099 - r548096;
double r548101 = r548098 / r548100;
double r548102 = r548093 + r548101;
return r548102;
}
double f(double x, double y, double z, double t, double a) {
double r548103 = y;
double r548104 = -1.270112277700152e-89;
bool r548105 = r548103 <= r548104;
double r548106 = 5.493382752707537e+24;
bool r548107 = r548103 <= r548106;
double r548108 = !r548107;
bool r548109 = r548105 || r548108;
double r548110 = z;
double r548111 = t;
double r548112 = r548110 - r548111;
double r548113 = a;
double r548114 = r548113 - r548111;
double r548115 = r548112 / r548114;
double r548116 = r548103 * r548115;
double r548117 = x;
double r548118 = r548116 + r548117;
double r548119 = r548103 * r548112;
double r548120 = r548119 / r548114;
double r548121 = r548120 + r548117;
double r548122 = r548109 ? r548118 : r548121;
return r548122;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 10.6 |
|---|---|
| Target | 1.1 |
| Herbie | 0.4 |
if y < -1.270112277700152e-89 or 5.493382752707537e+24 < y Initial program 20.3
Simplified2.4
rmApplied fma-udef2.4
rmApplied div-inv2.5
Applied associate-*l*0.6
Simplified0.5
if -1.270112277700152e-89 < y < 5.493382752707537e+24Initial program 0.4
Simplified3.5
rmApplied fma-udef3.5
rmApplied div-inv3.6
Applied associate-*l*2.0
Simplified2.0
rmApplied associate-*r/0.4
Final simplification0.4
herbie shell --seed 2020062 +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))))