\frac{x \cdot \left(y - z\right)}{y}\begin{array}{l}
\mathbf{if}\;z \le -1.7425772490475051 \cdot 10^{41} \lor \neg \left(z \le 2435460001394761700\right) \land z \le 2.58559422776367219 \cdot 10^{201}:\\
\;\;\;\;x - \frac{x}{\sqrt[3]{y} \cdot \sqrt[3]{y}} \cdot \frac{z}{\sqrt[3]{y}}\\
\mathbf{else}:\\
\;\;\;\;x - x \cdot \frac{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 (((z <= -1.742577249047505e+41) || (!(z <= 2.4354600013947617e+18) && (z <= 2.585594227763672e+201)))) {
VAR = ((double) (x - ((double) (((double) (x / ((double) (((double) cbrt(y)) * ((double) cbrt(y)))))) * ((double) (z / ((double) cbrt(y))))))));
} else {
VAR = ((double) (x - ((double) (x * ((double) (z / y))))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.6 |
|---|---|
| Target | 3.2 |
| Herbie | 2.0 |
if z < -1.7425772490475051e41 or 2435460001394761700 < z < 2.58559422776367219e201Initial program 11.1
Simplified7.6
rmApplied add-cube-cbrt8.2
Applied *-un-lft-identity8.2
Applied times-frac8.2
Applied associate-*r*3.6
Simplified3.6
if -1.7425772490475051e41 < z < 2435460001394761700 or 2.58559422776367219e201 < z Initial program 13.3
Simplified1.2
Final simplification2.0
herbie shell --seed 2020184
(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))