\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;z \le -1.3901733726023231 \cdot 10^{33} \lor \neg \left(z \le -1.7069294686818465 \cdot 10^{-261}\right):\\
\;\;\;\;\frac{x}{\frac{t}{y - z} - \frac{z}{y - 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 r612828 = x;
double r612829 = y;
double r612830 = z;
double r612831 = r612829 - r612830;
double r612832 = r612828 * r612831;
double r612833 = t;
double r612834 = r612833 - r612830;
double r612835 = r612832 / r612834;
return r612835;
}
double f(double x, double y, double z, double t) {
double r612836 = z;
double r612837 = -1.390173372602323e+33;
bool r612838 = r612836 <= r612837;
double r612839 = -1.7069294686818465e-261;
bool r612840 = r612836 <= r612839;
double r612841 = !r612840;
bool r612842 = r612838 || r612841;
double r612843 = x;
double r612844 = t;
double r612845 = y;
double r612846 = r612845 - r612836;
double r612847 = r612844 / r612846;
double r612848 = r612836 / r612846;
double r612849 = r612847 - r612848;
double r612850 = r612843 / r612849;
double r612851 = r612844 - r612836;
double r612852 = r612843 / r612851;
double r612853 = r612846 * r612852;
double r612854 = r612842 ? r612850 : r612853;
return r612854;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 11.3 |
|---|---|
| Target | 2.0 |
| Herbie | 2.4 |
if z < -1.390173372602323e+33 or -1.7069294686818465e-261 < z Initial program 13.1
rmApplied associate-/l*1.7
rmApplied div-sub1.7
if -1.390173372602323e+33 < z < -1.7069294686818465e-261Initial program 5.1
rmApplied *-un-lft-identity5.1
Applied times-frac3.3
Simplified3.3
rmApplied *-un-lft-identity3.3
Applied associate-*l*3.3
Simplified4.6
Final simplification2.4
herbie shell --seed 2020045 +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)))