\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 r256947 = x;
double r256948 = y;
double r256949 = z;
double r256950 = r256948 - r256949;
double r256951 = r256947 * r256950;
double r256952 = t;
double r256953 = r256952 - r256949;
double r256954 = r256951 / r256953;
return r256954;
}
double f(double x, double y, double z, double t) {
double r256955 = z;
double r256956 = -1.2131459224267867e-06;
bool r256957 = r256955 <= r256956;
double r256958 = 1.3630667508234389e-188;
bool r256959 = r256955 <= r256958;
double r256960 = !r256959;
bool r256961 = r256957 || r256960;
double r256962 = x;
double r256963 = y;
double r256964 = r256963 - r256955;
double r256965 = t;
double r256966 = r256965 - r256955;
double r256967 = r256964 / r256966;
double r256968 = r256962 * r256967;
double r256969 = 1.0;
double r256970 = r256969 / r256966;
double r256971 = r256969 / r256964;
double r256972 = r256971 / r256962;
double r256973 = r256970 / r256972;
double r256974 = r256961 ? r256968 : r256973;
return r256974;
}




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