x + \frac{y \cdot \left(z - t\right)}{a - t}\begin{array}{l}
\mathbf{if}\;x \le -5.993850181954760056083277772969421378107 \cdot 10^{-198}:\\
\;\;\;\;\frac{y}{a - t} \cdot \left(z - t\right) + x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t} + x\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r391941 = x;
double r391942 = y;
double r391943 = z;
double r391944 = t;
double r391945 = r391943 - r391944;
double r391946 = r391942 * r391945;
double r391947 = a;
double r391948 = r391947 - r391944;
double r391949 = r391946 / r391948;
double r391950 = r391941 + r391949;
return r391950;
}
double f(double x, double y, double z, double t, double a) {
double r391951 = x;
double r391952 = -5.99385018195476e-198;
bool r391953 = r391951 <= r391952;
double r391954 = y;
double r391955 = a;
double r391956 = t;
double r391957 = r391955 - r391956;
double r391958 = r391954 / r391957;
double r391959 = z;
double r391960 = r391959 - r391956;
double r391961 = r391958 * r391960;
double r391962 = r391961 + r391951;
double r391963 = r391960 / r391957;
double r391964 = r391954 * r391963;
double r391965 = r391964 + r391951;
double r391966 = r391953 ? r391962 : r391965;
return r391966;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 11.3 |
|---|---|
| Target | 1.4 |
| Herbie | 1.7 |
if x < -5.99385018195476e-198Initial program 11.1
Simplified2.0
rmApplied fma-udef2.0
if -5.99385018195476e-198 < x Initial program 11.5
Simplified4.0
rmApplied fma-udef4.0
rmApplied div-inv4.0
Applied associate-*l*1.6
Simplified1.6
Final simplification1.7
herbie shell --seed 2019322 +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))))