\frac{x \cdot \left(y - z\right)}{y}\begin{array}{l}
\mathbf{if}\;y \leq -7.915532472055808 \cdot 10^{+99}:\\
\;\;\;\;x - x \cdot \frac{z}{y}\\
\mathbf{elif}\;y \leq 1.7414928146654685 \cdot 10^{-279}:\\
\;\;\;\;x + \left(x \cdot z\right) \cdot \frac{-1}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \left(x \cdot \left({\left(\sqrt[3]{z}\right)}^{2} \cdot \frac{\sqrt[3]{{\left(\sqrt[3]{z}\right)}^{2}}}{\sqrt{y}}\right)\right) \cdot \frac{\sqrt[3]{\sqrt[3]{z}}}{\sqrt{y}}\\
\end{array}(FPCore (x y z) :precision binary64 (/ (* x (- y z)) y))
(FPCore (x y z)
:precision binary64
(if (<= y -7.915532472055808e+99)
(- x (* x (/ z y)))
(if (<= y 1.7414928146654685e-279)
(+ x (* (* x z) (/ -1.0 y)))
(-
x
(*
(* x (* (pow (cbrt z) 2.0) (/ (cbrt (pow (cbrt z) 2.0)) (sqrt y))))
(/ (cbrt (cbrt z)) (sqrt y)))))))double code(double x, double y, double z) {
return (((double) (x * ((double) (y - z)))) / y);
}
double code(double x, double y, double z) {
double tmp;
if ((y <= -7.915532472055808e+99)) {
tmp = ((double) (x - ((double) (x * (z / y)))));
} else {
double tmp_1;
if ((y <= 1.7414928146654685e-279)) {
tmp_1 = ((double) (x + ((double) (((double) (x * z)) * (-1.0 / y)))));
} else {
tmp_1 = ((double) (x - ((double) (((double) (x * ((double) (((double) pow(((double) cbrt(z)), 2.0)) * (((double) cbrt(((double) pow(((double) cbrt(z)), 2.0)))) / ((double) sqrt(y))))))) * (((double) cbrt(((double) cbrt(z)))) / ((double) sqrt(y)))))));
}
tmp = tmp_1;
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.5 |
|---|---|
| Target | 3.2 |
| Herbie | 2.2 |
if y < -7.91553247205580839e99Initial program Error: 22.8 bits
SimplifiedError: 0.0 bits
if -7.91553247205580839e99 < y < 1.74149281466546852e-279Initial program Error: 6.5 bits
SimplifiedError: 6.2 bits
rmApplied div-invError: 6.2 bits
Applied associate-*r*Error: 3.5 bits
if 1.74149281466546852e-279 < y Initial program Error: 12.0 bits
SimplifiedError: 2.8 bits
rmApplied *-un-lft-identityError: 2.8 bits
Applied add-cube-cbrtError: 3.2 bits
Applied times-fracError: 3.2 bits
Applied associate-*r*Error: 3.2 bits
SimplifiedError: 3.2 bits
rmApplied add-sqr-sqrtError: 3.2 bits
Applied add-cube-cbrtError: 3.2 bits
Applied cbrt-prodError: 3.3 bits
Applied times-fracError: 3.3 bits
Applied associate-*r*Error: 2.9 bits
SimplifiedError: 2.2 bits
Final simplificationError: 2.2 bits
herbie shell --seed 2020203
(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))