\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 r648577 = x;
double r648578 = y;
double r648579 = z;
double r648580 = r648578 - r648579;
double r648581 = r648577 * r648580;
double r648582 = t;
double r648583 = r648582 - r648579;
double r648584 = r648581 / r648583;
return r648584;
}
double f(double x, double y, double z, double t) {
double r648585 = z;
double r648586 = -1.390173372602323e+33;
bool r648587 = r648585 <= r648586;
double r648588 = -1.7069294686818465e-261;
bool r648589 = r648585 <= r648588;
double r648590 = !r648589;
bool r648591 = r648587 || r648590;
double r648592 = x;
double r648593 = t;
double r648594 = y;
double r648595 = r648594 - r648585;
double r648596 = r648593 / r648595;
double r648597 = r648585 / r648595;
double r648598 = r648596 - r648597;
double r648599 = r648592 / r648598;
double r648600 = r648593 - r648585;
double r648601 = r648592 / r648600;
double r648602 = r648595 * r648601;
double r648603 = r648591 ? r648599 : r648602;
return r648603;
}




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 associate-/l*3.2
rmApplied div-sub3.2
rmApplied div-inv3.3
Applied div-inv3.3
Applied distribute-rgt-out--3.3
Applied *-un-lft-identity3.3
Applied times-frac4.7
Simplified4.6
Final simplification2.4
herbie shell --seed 2020045
(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)))