\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;z \le -5.78095534954889683 \cdot 10^{-116} \lor \neg \left(z \le 7.1593596549390092 \cdot 10^{-78}\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 r621075 = x;
double r621076 = y;
double r621077 = z;
double r621078 = r621076 - r621077;
double r621079 = r621075 * r621078;
double r621080 = t;
double r621081 = r621080 - r621077;
double r621082 = r621079 / r621081;
return r621082;
}
double f(double x, double y, double z, double t) {
double r621083 = z;
double r621084 = -5.780955349548897e-116;
bool r621085 = r621083 <= r621084;
double r621086 = 7.159359654939009e-78;
bool r621087 = r621083 <= r621086;
double r621088 = !r621087;
bool r621089 = r621085 || r621088;
double r621090 = x;
double r621091 = y;
double r621092 = r621091 - r621083;
double r621093 = t;
double r621094 = r621093 - r621083;
double r621095 = r621092 / r621094;
double r621096 = r621090 * r621095;
double r621097 = r621090 / r621094;
double r621098 = r621092 * r621097;
double r621099 = r621089 ? r621096 : r621098;
return r621099;
}




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.3 |
if z < -5.780955349548897e-116 or 7.159359654939009e-78 < z Initial program 14.6
rmApplied *-un-lft-identity14.6
Applied times-frac0.5
Simplified0.5
if -5.780955349548897e-116 < z < 7.159359654939009e-78Initial program 6.0
rmApplied associate-/l*5.9
rmApplied div-sub5.9
rmApplied div-inv5.9
Applied div-inv5.9
Applied distribute-rgt-out--5.9
Applied *-un-lft-identity5.9
Applied times-frac6.1
Simplified6.1
Final simplification2.3
herbie shell --seed 2020060
(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)))