\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;z \le -9.5127373023801481 \cdot 10^{-222} \lor \neg \left(z \le 5.43817376472661147 \cdot 10^{-107}\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 r677547 = x;
double r677548 = y;
double r677549 = z;
double r677550 = r677548 - r677549;
double r677551 = r677547 * r677550;
double r677552 = t;
double r677553 = r677552 - r677549;
double r677554 = r677551 / r677553;
return r677554;
}
double f(double x, double y, double z, double t) {
double r677555 = z;
double r677556 = -9.512737302380148e-222;
bool r677557 = r677555 <= r677556;
double r677558 = 5.4381737647266115e-107;
bool r677559 = r677555 <= r677558;
double r677560 = !r677559;
bool r677561 = r677557 || r677560;
double r677562 = x;
double r677563 = y;
double r677564 = r677563 - r677555;
double r677565 = t;
double r677566 = r677565 - r677555;
double r677567 = r677564 / r677566;
double r677568 = r677562 * r677567;
double r677569 = r677562 / r677566;
double r677570 = r677564 * r677569;
double r677571 = r677561 ? r677568 : r677570;
return r677571;
}




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 < -9.512737302380148e-222 or 5.4381737647266115e-107 < z Initial program 13.3
rmApplied *-un-lft-identity13.3
Applied times-frac1.2
Simplified1.2
if -9.512737302380148e-222 < z < 5.4381737647266115e-107Initial program 6.7
rmApplied *-un-lft-identity6.7
Applied times-frac5.5
Simplified5.5
rmApplied *-un-lft-identity5.5
Applied associate-*l*5.5
Simplified6.9
Final simplification2.4
herbie shell --seed 2020047 +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)))