\frac{x \cdot \left(y - z\right)}{t - z}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot \left(y - z\right)}{t - z} = -\infty:\\
\;\;\;\;\frac{x}{t - z} \cdot \left(y - z\right)\\
\mathbf{elif}\;\frac{x \cdot \left(y - z\right)}{t - z} \le 5.316577800148401 \cdot 10^{177}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y}{t - z} - \frac{z}{t - z}\right)\\
\end{array}double f(double x, double y, double z, double t) {
double r616496 = x;
double r616497 = y;
double r616498 = z;
double r616499 = r616497 - r616498;
double r616500 = r616496 * r616499;
double r616501 = t;
double r616502 = r616501 - r616498;
double r616503 = r616500 / r616502;
return r616503;
}
double f(double x, double y, double z, double t) {
double r616504 = x;
double r616505 = y;
double r616506 = z;
double r616507 = r616505 - r616506;
double r616508 = r616504 * r616507;
double r616509 = t;
double r616510 = r616509 - r616506;
double r616511 = r616508 / r616510;
double r616512 = -inf.0;
bool r616513 = r616511 <= r616512;
double r616514 = r616504 / r616510;
double r616515 = r616514 * r616507;
double r616516 = 5.316577800148401e+177;
bool r616517 = r616511 <= r616516;
double r616518 = r616505 / r616510;
double r616519 = r616506 / r616510;
double r616520 = r616518 - r616519;
double r616521 = r616504 * r616520;
double r616522 = r616517 ? r616511 : r616521;
double r616523 = r616513 ? r616515 : r616522;
return r616523;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 11.5 |
|---|---|
| Target | 2.2 |
| Herbie | 1.5 |
if (/ (* x (- y z)) (- t z)) < -inf.0Initial program 64.0
rmApplied *-un-lft-identity64.0
Applied times-frac0.1
Simplified0.1
rmApplied div-sub0.1
rmApplied div-inv0.2
Applied div-inv0.2
Applied distribute-rgt-out--0.2
Applied associate-*r*0.4
Simplified0.2
if -inf.0 < (/ (* x (- y z)) (- t z)) < 5.316577800148401e+177Initial program 1.4
if 5.316577800148401e+177 < (/ (* x (- y z)) (- t z)) Initial program 43.7
rmApplied *-un-lft-identity43.7
Applied times-frac2.7
Simplified2.7
rmApplied div-sub2.7
Final simplification1.5
herbie shell --seed 2020056 +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)))