\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;z \le -4.30440867097708453 \cdot 10^{-106} \lor \neg \left(z \le 4.5683127974833349 \cdot 10^{-53}\right):\\
\;\;\;\;x \cdot \frac{y - z}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{x}{t - z}\\
\end{array}double f(double x, double y, double z, double t) {
double r625941 = x;
double r625942 = y;
double r625943 = z;
double r625944 = r625942 - r625943;
double r625945 = r625941 * r625944;
double r625946 = t;
double r625947 = r625946 - r625943;
double r625948 = r625945 / r625947;
return r625948;
}
double f(double x, double y, double z, double t) {
double r625949 = z;
double r625950 = -4.3044086709770845e-106;
bool r625951 = r625949 <= r625950;
double r625952 = 4.568312797483335e-53;
bool r625953 = r625949 <= r625952;
double r625954 = !r625953;
bool r625955 = r625951 || r625954;
double r625956 = x;
double r625957 = y;
double r625958 = r625957 - r625949;
double r625959 = t;
double r625960 = r625959 - r625949;
double r625961 = r625958 / r625960;
double r625962 = r625956 * r625961;
double r625963 = r625956 / r625960;
double r625964 = r625958 * r625963;
double r625965 = r625955 ? r625962 : r625964;
return r625965;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 11.9 |
|---|---|
| Target | 2.2 |
| Herbie | 2.4 |
if z < -4.3044086709770845e-106 or 4.568312797483335e-53 < z Initial program 15.3
rmApplied *-un-lft-identity15.3
Applied times-frac0.5
Simplified0.5
if -4.3044086709770845e-106 < z < 4.568312797483335e-53Initial program 5.6
rmApplied associate-/l*5.3
rmApplied div-sub5.3
rmApplied div-inv5.4
Applied div-inv5.4
Applied distribute-rgt-out--5.4
Applied *-un-lft-identity5.4
Applied times-frac6.1
Simplified6.0
Final simplification2.4
herbie shell --seed 2020036
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
:precision binary64
:herbie-target
(/ x (/ (- t z) (- y z)))
(/ (* x (- y z)) (- t z)))