\frac{x \cdot \left(y - z\right)}{y}\begin{array}{l}
\mathbf{if}\;x \le 2.546000932373863 \cdot 10^{-214} \lor \neg \left(x \le 8.42446531567834038 \cdot 10^{-37}\right):\\
\;\;\;\;\frac{x}{\frac{y}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x \cdot z}{y}\\
\end{array}double code(double x, double y, double z) {
return ((double) (((double) (x * ((double) (y - z)))) / y));
}
double code(double x, double y, double z) {
double VAR;
if (((x <= 2.546000932373863e-214) || !(x <= 8.42446531567834e-37))) {
VAR = ((double) (x / ((double) (y / ((double) (y - z))))));
} else {
VAR = ((double) (x - ((double) (((double) (x * z)) / y))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.5 |
|---|---|
| Target | 3.1 |
| Herbie | 2.5 |
if x < 2.546000932373863e-214 or 8.42446531567834e-37 < x Initial program 14.4
rmApplied associate-/l*2.6
if 2.546000932373863e-214 < x < 8.42446531567834e-37Initial program 3.2
rmApplied associate-/l*4.8
Taylor expanded around 0 1.8
Final simplification2.5
herbie shell --seed 2020122
(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))