\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2}\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1.1946644378395818 \cdot 10^{+157}:\\
\;\;\;\;\frac{y}{a} \cdot \frac{x}{2} - t \cdot \left(\frac{z}{a} \cdot \frac{9}{2}\right)\\
\mathbf{elif}\;x \cdot y \leq -3.945575518712505 \cdot 10^{-233}:\\
\;\;\;\;\frac{1}{a} \cdot \frac{x \cdot y - z \cdot \left(t \cdot 9\right)}{2}\\
\mathbf{elif}\;x \cdot y \leq 4.5098826906000265 \cdot 10^{-235}:\\
\;\;\;\;y \cdot \frac{x}{a \cdot 2} - \frac{9}{2} \cdot \left(t \cdot \frac{z}{a}\right)\\
\mathbf{elif}\;x \cdot y \leq 6.101385177587424 \cdot 10^{+99}:\\
\;\;\;\;\frac{1}{a} \cdot \frac{x \cdot y - z \cdot \left(t \cdot 9\right)}{2}\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot \left(\sqrt[3]{x} \cdot \frac{\sqrt[3]{x}}{a}\right)\right) \cdot \frac{\sqrt[3]{x}}{2} - t \cdot \left(\frac{z}{a} \cdot \frac{9}{2}\right)\\
\end{array}(FPCore (x y z t a) :precision binary64 (/ (- (* x y) (* (* z 9.0) t)) (* a 2.0)))
(FPCore (x y z t a)
:precision binary64
(if (<= (* x y) -1.1946644378395818e+157)
(- (* (/ y a) (/ x 2.0)) (* t (* (/ z a) (/ 9.0 2.0))))
(if (<= (* x y) -3.945575518712505e-233)
(* (/ 1.0 a) (/ (- (* x y) (* z (* t 9.0))) 2.0))
(if (<= (* x y) 4.5098826906000265e-235)
(- (* y (/ x (* a 2.0))) (* (/ 9.0 2.0) (* t (/ z a))))
(if (<= (* x y) 6.101385177587424e+99)
(* (/ 1.0 a) (/ (- (* x y) (* z (* t 9.0))) 2.0))
(-
(* (* y (* (cbrt x) (/ (cbrt x) a))) (/ (cbrt x) 2.0))
(* t (* (/ z a) (/ 9.0 2.0)))))))))double code(double x, double y, double z, double t, double a) {
return (((double) (((double) (x * y)) - ((double) (((double) (z * 9.0)) * t)))) / ((double) (a * 2.0)));
}
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((((double) (x * y)) <= -1.1946644378395818e+157)) {
tmp = ((double) (((double) ((y / a) * (x / 2.0))) - ((double) (t * ((double) ((z / a) * (9.0 / 2.0)))))));
} else {
double tmp_1;
if ((((double) (x * y)) <= -3.945575518712505e-233)) {
tmp_1 = ((double) ((1.0 / a) * (((double) (((double) (x * y)) - ((double) (z * ((double) (t * 9.0)))))) / 2.0)));
} else {
double tmp_2;
if ((((double) (x * y)) <= 4.5098826906000265e-235)) {
tmp_2 = ((double) (((double) (y * (x / ((double) (a * 2.0))))) - ((double) ((9.0 / 2.0) * ((double) (t * (z / a)))))));
} else {
double tmp_3;
if ((((double) (x * y)) <= 6.101385177587424e+99)) {
tmp_3 = ((double) ((1.0 / a) * (((double) (((double) (x * y)) - ((double) (z * ((double) (t * 9.0)))))) / 2.0)));
} else {
tmp_3 = ((double) (((double) (((double) (y * ((double) (((double) cbrt(x)) * (((double) cbrt(x)) / a))))) * (((double) cbrt(x)) / 2.0))) - ((double) (t * ((double) ((z / a) * (9.0 / 2.0)))))));
}
tmp_2 = tmp_3;
}
tmp_1 = tmp_2;
}
tmp = tmp_1;
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 7.7 |
|---|---|
| Target | 5.7 |
| Herbie | 4.0 |
if (* x y) < -1.19466443783958176e157Initial program Error: 24.5 bits
rmApplied div-subError: 24.5 bits
SimplifiedError: 7.9 bits
SimplifiedError: 1.9 bits
rmApplied *-un-lft-identityError: 1.9 bits
Applied times-fracError: 1.9 bits
Applied associate-*r*Error: 2.1 bits
SimplifiedError: 2.0 bits
if -1.19466443783958176e157 < (* x y) < -3.94557551871250505e-233 or 4.5098826906000265e-235 < (* x y) < 6.1013851775874236e99Initial program Error: 3.3 bits
rmApplied *-un-lft-identityError: 3.3 bits
Applied times-fracError: 3.4 bits
SimplifiedError: 3.3 bits
if -3.94557551871250505e-233 < (* x y) < 4.5098826906000265e-235Initial program Error: 5.9 bits
rmApplied div-subError: 5.9 bits
SimplifiedError: 5.2 bits
SimplifiedError: 6.5 bits
rmApplied associate-*r*Error: 6.6 bits
if 6.1013851775874236e99 < (* x y) Initial program Error: 18.5 bits
rmApplied div-subError: 18.5 bits
SimplifiedError: 8.8 bits
SimplifiedError: 4.1 bits
rmApplied add-cube-cbrtError: 5.0 bits
Applied times-fracError: 4.7 bits
Applied associate-*r*Error: 3.6 bits
SimplifiedError: 3.6 bits
Final simplificationError: 4.0 bits
herbie shell --seed 2020203
(FPCore (x y z t a)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, I"
:precision binary64
:herbie-target
(if (< a -2.090464557976709e+86) (- (* 0.5 (/ (* y x) a)) (* 4.5 (/ t (/ a z)))) (if (< a 2.144030707833976e+99) (/ (- (* x y) (* z (* 9.0 t))) (* a 2.0)) (- (* (/ y a) (* x 0.5)) (* (/ t a) (* z 4.5)))))
(/ (- (* x y) (* (* z 9.0) t)) (* a 2.0)))