\frac{x \cdot \left(y - z\right)}{y}\begin{array}{l}
\mathbf{if}\;\frac{x \cdot \left(y - z\right)}{y} = -\infty \lor \neg \left(\frac{x \cdot \left(y - z\right)}{y} \le -9.340475670529612 \cdot 10^{153} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{y} \le 1.61774820575826244 \cdot 10^{129} \lor \neg \left(\frac{x \cdot \left(y - z\right)}{y} \le 8.4362316469862765 \cdot 10^{300}\right)\right)\right):\\
\;\;\;\;x \cdot \frac{y - z}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(y - z\right)}{y}\\
\end{array}double f(double x, double y, double z) {
double r720433 = x;
double r720434 = y;
double r720435 = z;
double r720436 = r720434 - r720435;
double r720437 = r720433 * r720436;
double r720438 = r720437 / r720434;
return r720438;
}
double f(double x, double y, double z) {
double r720439 = x;
double r720440 = y;
double r720441 = z;
double r720442 = r720440 - r720441;
double r720443 = r720439 * r720442;
double r720444 = r720443 / r720440;
double r720445 = -inf.0;
bool r720446 = r720444 <= r720445;
double r720447 = -9.340475670529612e+153;
bool r720448 = r720444 <= r720447;
double r720449 = 1.6177482057582624e+129;
bool r720450 = r720444 <= r720449;
double r720451 = 8.436231646986276e+300;
bool r720452 = r720444 <= r720451;
double r720453 = !r720452;
bool r720454 = r720450 || r720453;
double r720455 = !r720454;
bool r720456 = r720448 || r720455;
double r720457 = !r720456;
bool r720458 = r720446 || r720457;
double r720459 = r720442 / r720440;
double r720460 = r720439 * r720459;
double r720461 = r720458 ? r720460 : r720444;
return r720461;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 13.1 |
|---|---|
| Target | 3.1 |
| Herbie | 1.1 |
if (/ (* x (- y z)) y) < -inf.0 or -9.340475670529612e+153 < (/ (* x (- y z)) y) < 1.6177482057582624e+129 or 8.436231646986276e+300 < (/ (* x (- y z)) y) Initial program 16.3
rmApplied *-un-lft-identity16.3
Applied times-frac1.3
Simplified1.3
if -inf.0 < (/ (* x (- y z)) y) < -9.340475670529612e+153 or 1.6177482057582624e+129 < (/ (* x (- y z)) y) < 8.436231646986276e+300Initial program 0.2
Final simplification1.1
herbie shell --seed 2020083 +o rules:numerics
(FPCore (x y z)
:name "Diagrams.Backend.Cairo.Internal:setTexture from diagrams-cairo-1.3.0.3"
:precision binary64
:herbie-target
(if (< z -2.060202331921739e+104) (- x (/ (* z x) y)) (if (< z 1.6939766013828526e+213) (/ x (/ y (- y z))) (* (- y z) (/ x y))))
(/ (* x (- y z)) y))