\frac{x \cdot \left(y - z\right)}{y}\begin{array}{l}
\mathbf{if}\;x \le -2.5026958423490979 \cdot 10^{-124} \lor \neg \left(x \le -1.9079591839021169 \cdot 10^{-291}\right):\\
\;\;\;\;\frac{x}{\frac{y}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(-\frac{x \cdot z}{y}\right)\\
\end{array}double f(double x, double y, double z) {
double r882705 = x;
double r882706 = y;
double r882707 = z;
double r882708 = r882706 - r882707;
double r882709 = r882705 * r882708;
double r882710 = r882709 / r882706;
return r882710;
}
double f(double x, double y, double z) {
double r882711 = x;
double r882712 = -2.502695842349098e-124;
bool r882713 = r882711 <= r882712;
double r882714 = -1.907959183902117e-291;
bool r882715 = r882711 <= r882714;
double r882716 = !r882715;
bool r882717 = r882713 || r882716;
double r882718 = y;
double r882719 = z;
double r882720 = r882718 - r882719;
double r882721 = r882718 / r882720;
double r882722 = r882711 / r882721;
double r882723 = r882711 * r882719;
double r882724 = r882723 / r882718;
double r882725 = -r882724;
double r882726 = r882711 + r882725;
double r882727 = r882717 ? r882722 : r882726;
return r882727;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.0 |
|---|---|
| Target | 3.3 |
| Herbie | 2.6 |
if x < -2.502695842349098e-124 or -1.907959183902117e-291 < x Initial program 12.9
rmApplied associate-/l*2.4
if -2.502695842349098e-124 < x < -1.907959183902117e-291Initial program 6.9
rmApplied *-un-lft-identity6.9
Applied times-frac7.9
Simplified7.9
Simplified7.9
rmApplied sub-neg7.9
Applied distribute-lft-in7.9
Simplified7.9
Simplified3.7
Final simplification2.6
herbie shell --seed 2020046
(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))