\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;z \le -1.2131459224267867 \cdot 10^{-6} \lor \neg \left(z \le 1.363066750823439 \cdot 10^{-188}\right):\\
\;\;\;\;x \cdot \frac{y - z}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{t - z}}{\frac{\frac{1}{y - z}}{x}}\\
\end{array}double f(double x, double y, double z, double t) {
double r653860 = x;
double r653861 = y;
double r653862 = z;
double r653863 = r653861 - r653862;
double r653864 = r653860 * r653863;
double r653865 = t;
double r653866 = r653865 - r653862;
double r653867 = r653864 / r653866;
return r653867;
}
double f(double x, double y, double z, double t) {
double r653868 = z;
double r653869 = -1.2131459224267867e-06;
bool r653870 = r653868 <= r653869;
double r653871 = 1.3630667508234389e-188;
bool r653872 = r653868 <= r653871;
double r653873 = !r653872;
bool r653874 = r653870 || r653873;
double r653875 = x;
double r653876 = y;
double r653877 = r653876 - r653868;
double r653878 = t;
double r653879 = r653878 - r653868;
double r653880 = r653877 / r653879;
double r653881 = r653875 * r653880;
double r653882 = 1.0;
double r653883 = r653882 / r653879;
double r653884 = r653882 / r653877;
double r653885 = r653884 / r653875;
double r653886 = r653883 / r653885;
double r653887 = r653874 ? r653881 : r653886;
return r653887;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 11.8 |
|---|---|
| Target | 2.4 |
| Herbie | 2.4 |
if z < -1.2131459224267867e-06 or 1.3630667508234389e-188 < z Initial program 14.7
rmApplied *-un-lft-identity14.7
Applied times-frac0.9
Simplified0.9
if -1.2131459224267867e-06 < z < 1.3630667508234389e-188Initial program 5.7
rmApplied associate-/l*5.5
rmApplied clear-num5.8
rmApplied *-un-lft-identity5.8
Applied div-inv5.8
Applied times-frac5.9
Applied associate-/r*5.7
Simplified5.7
Final simplification2.4
herbie shell --seed 2020042 +o rules:numerics
(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)))