\frac{x \cdot \left(y - z\right)}{y}
\begin{array}{l}
\mathbf{if}\;y \leq -1.3984342212002436 \cdot 10^{-55} \lor \neg \left(y \leq 1.5271497062397503 \cdot 10^{-199}\right):\\
\;\;\;\;\frac{x}{\frac{y}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\sqrt[3]{y} \cdot \sqrt[3]{y}} \cdot \frac{y - z}{\sqrt[3]{y}}\\
\end{array}
(FPCore (x y z) :precision binary64 (/ (* x (- y z)) y))
(FPCore (x y z) :precision binary64 (if (or (<= y -1.3984342212002436e-55) (not (<= y 1.5271497062397503e-199))) (/ x (/ y (- y z))) (* (/ x (* (cbrt y) (cbrt y))) (/ (- y z) (cbrt y)))))
double code(double x, double y, double z) {
return (x * (y - z)) / y;
}
double code(double x, double y, double z) {
double tmp;
if ((y <= -1.3984342212002436e-55) || !(y <= 1.5271497062397503e-199)) {
tmp = x / (y / (y - z));
} else {
tmp = (x / (cbrt(y) * cbrt(y))) * ((y - z) / cbrt(y));
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.3 |
|---|---|
| Target | 3.2 |
| Herbie | 2.6 |
if y < -1.39843422120024364e-55 or 1.52714970623975034e-199 < y Initial program 13.2
Applied associate-/l*_binary641.0
Applied *-un-lft-identity_binary641.0
if -1.39843422120024364e-55 < y < 1.52714970623975034e-199Initial program 9.2
Applied add-cube-cbrt_binary6410.2
Applied times-frac_binary648.4
Final simplification2.6
herbie shell --seed 2021275
(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))