\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}:\\
\;\;\;\;\frac{x}{t - z} \cdot \left(y - z\right)\\
\end{array}double f(double x, double y, double z, double t) {
double r751939 = x;
double r751940 = y;
double r751941 = z;
double r751942 = r751940 - r751941;
double r751943 = r751939 * r751942;
double r751944 = t;
double r751945 = r751944 - r751941;
double r751946 = r751943 / r751945;
return r751946;
}
double f(double x, double y, double z, double t) {
double r751947 = z;
double r751948 = -9.512737302380148e-222;
bool r751949 = r751947 <= r751948;
double r751950 = 5.4381737647266115e-107;
bool r751951 = r751947 <= r751950;
double r751952 = !r751951;
bool r751953 = r751949 || r751952;
double r751954 = x;
double r751955 = y;
double r751956 = r751955 - r751947;
double r751957 = t;
double r751958 = r751957 - r751947;
double r751959 = r751956 / r751958;
double r751960 = r751954 * r751959;
double r751961 = r751954 / r751958;
double r751962 = r751961 * r751956;
double r751963 = r751953 ? r751960 : r751962;
return r751963;
}




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 pow15.5
Applied pow15.5
Applied pow-prod-down5.5
Simplified6.9
Final simplification2.4
herbie shell --seed 2020047
(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)))