\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 r682004 = x;
double r682005 = y;
double r682006 = z;
double r682007 = r682005 - r682006;
double r682008 = r682004 * r682007;
double r682009 = r682008 / r682005;
return r682009;
}
double f(double x, double y, double z) {
double r682010 = x;
double r682011 = y;
double r682012 = z;
double r682013 = r682011 - r682012;
double r682014 = r682010 * r682013;
double r682015 = r682014 / r682011;
double r682016 = -inf.0;
bool r682017 = r682015 <= r682016;
double r682018 = -9.340475670529612e+153;
bool r682019 = r682015 <= r682018;
double r682020 = 1.6177482057582624e+129;
bool r682021 = r682015 <= r682020;
double r682022 = 8.436231646986276e+300;
bool r682023 = r682015 <= r682022;
double r682024 = !r682023;
bool r682025 = r682021 || r682024;
double r682026 = !r682025;
bool r682027 = r682019 || r682026;
double r682028 = !r682027;
bool r682029 = r682017 || r682028;
double r682030 = r682013 / r682011;
double r682031 = r682010 * r682030;
double r682032 = r682029 ? r682031 : r682015;
return r682032;
}




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
(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))