\frac{x \cdot \left(y - z\right)}{y}\begin{array}{l}
\mathbf{if}\;y \le 1.3574032127967498 \cdot 10^{63}:\\
\;\;\;\;x - \frac{x \cdot z}{y}\\
\mathbf{else}:\\
\;\;\;\;x - x \cdot \frac{z}{y}\\
\end{array}double f(double x, double y, double z) {
double r689056 = x;
double r689057 = y;
double r689058 = z;
double r689059 = r689057 - r689058;
double r689060 = r689056 * r689059;
double r689061 = r689060 / r689057;
return r689061;
}
double f(double x, double y, double z) {
double r689062 = y;
double r689063 = 1.3574032127967498e+63;
bool r689064 = r689062 <= r689063;
double r689065 = x;
double r689066 = z;
double r689067 = r689065 * r689066;
double r689068 = r689067 / r689062;
double r689069 = r689065 - r689068;
double r689070 = r689066 / r689062;
double r689071 = r689065 * r689070;
double r689072 = r689065 - r689071;
double r689073 = r689064 ? r689069 : r689072;
return r689073;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.9 |
|---|---|
| Target | 3.0 |
| Herbie | 3.3 |
if y < 1.3574032127967498e+63Initial program 10.6
rmApplied associate-/l*4.0
Taylor expanded around 0 4.3
if 1.3574032127967498e+63 < y Initial program 20.5
rmApplied associate-/l*0.1
Taylor expanded around 0 6.9
rmApplied *-un-lft-identity6.9
Applied times-frac0.0
Simplified0.0
Final simplification3.3
herbie shell --seed 2020020
(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))