\frac{x \cdot \left(y - z\right)}{y}\begin{array}{l}
\mathbf{if}\;z \leq -2.639338943466909 \cdot 10^{+72} \lor \neg \left(z \leq 8.55574750243714 \cdot 10^{+144}\right) \land z \leq 1.2735314140732662 \cdot 10^{+299}:\\
\;\;\;\;x - \left(\frac{x}{{\left(\sqrt[3]{y}\right)}^{2}} \cdot \left(\sqrt[3]{z} \cdot \frac{\sqrt[3]{z}}{\sqrt[3]{{\left(\sqrt[3]{y}\right)}^{2}}}\right)\right) \cdot \frac{\sqrt[3]{z}}{\sqrt[3]{\sqrt[3]{y}}}\\
\mathbf{else}:\\
\;\;\;\;x - x \cdot \frac{z}{y}\\
\end{array}double code(double x, double y, double z) {
return (((double) (x * ((double) (y - z)))) / y);
}
double code(double x, double y, double z) {
double VAR;
if (((z <= -2.639338943466909e+72) || (!(z <= 8.55574750243714e+144) && (z <= 1.2735314140732662e+299)))) {
VAR = ((double) (x - ((double) (((double) ((x / ((double) pow(((double) cbrt(y)), 2.0))) * ((double) (((double) cbrt(z)) * (((double) cbrt(z)) / ((double) cbrt(((double) pow(((double) cbrt(y)), 2.0))))))))) * (((double) cbrt(z)) / ((double) cbrt(((double) cbrt(y)))))))));
} else {
VAR = ((double) (x - ((double) (x * (z / y)))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.5 |
|---|---|
| Target | 3.0 |
| Herbie | 1.8 |
if z < -2.63933894346690909e72 or 8.55574750243713944e144 < z < 1.2735314140732662e299Initial program Error: 12.7 bits
SimplifiedError: 9.5 bits
rmApplied add-cube-cbrtError: 10.1 bits
Applied *-un-lft-identityError: 10.1 bits
Applied times-fracError: 10.1 bits
Applied associate-*r*Error: 6.2 bits
SimplifiedError: 6.2 bits
rmApplied add-cube-cbrtError: 6.3 bits
Applied cbrt-prodError: 6.3 bits
Applied add-cube-cbrtError: 6.5 bits
Applied times-fracError: 6.5 bits
Applied associate-*r*Error: 4.4 bits
SimplifiedError: 4.4 bits
if -2.63933894346690909e72 < z < 8.55574750243713944e144 or 1.2735314140732662e299 < z Initial program Error: 12.4 bits
SimplifiedError: 0.9 bits
Final simplificationError: 1.8 bits
herbie shell --seed 2020200
(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))