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 r522284 = x;
double r522285 = y;
double r522286 = z;
double r522287 = t;
double r522288 = r522286 - r522287;
double r522289 = r522285 * r522288;
double r522290 = a;
double r522291 = r522290 - r522287;
double r522292 = r522289 / r522291;
double r522293 = r522284 + r522292;
return r522293;
}
double f(double x, double y, double z, double t, double a) {
double r522294 = y;
double r522295 = -5.610173163155118e-108;
bool r522296 = r522294 <= r522295;
double r522297 = 59977.752570629054;
bool r522298 = r522294 <= r522297;
double r522299 = !r522298;
bool r522300 = r522296 || r522299;
double r522301 = z;
double r522302 = t;
double r522303 = r522301 - r522302;
double r522304 = a;
double r522305 = r522304 - r522302;
double r522306 = r522294 / r522305;
double r522307 = r522303 * r522306;
double r522308 = x;
double r522309 = r522307 + r522308;
double r522310 = r522303 * r522294;
double r522311 = r522310 / r522305;
double r522312 = r522311 + r522308;
double r522313 = r522300 ? r522309 : r522312;
return r522313;
}




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))))