\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\begin{array}{l}
\mathbf{if}\;x \cdot 9 \le -1.52782158387123 \cdot 10^{160}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \frac{x}{\frac{z \cdot c}{y}}\right) - 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;x \cdot 9 \le -2022617.1351552196:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\right) - 4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{elif}\;x \cdot 9 \le -6.2504082370770287 \cdot 10^{-233}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \frac{x}{\frac{z \cdot c}{y}}\right) - 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;x \cdot 9 \le 4.930514039190418 \cdot 10^{-185}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + \sqrt{9} \cdot \left(\sqrt{9} \cdot \frac{x \cdot y}{z \cdot c}\right)\right) - 4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{elif}\;x \cdot 9 \le 1.40459026321305478 \cdot 10^{-147}:\\
\;\;\;\;\left(\frac{\frac{b}{z}}{c} + 9 \cdot \frac{x \cdot y}{z \cdot c}\right) - 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;x \cdot 9 \le 2.97305508984167272 \cdot 10^{73}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + \sqrt{9} \cdot \left(\sqrt{9} \cdot \frac{x \cdot y}{z \cdot c}\right)\right) - 4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{elif}\;x \cdot 9 \le 6.7714476459570229 \cdot 10^{163}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\right) - 4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{elif}\;x \cdot 9 \le 5.86420256488460306 \cdot 10^{281}:\\
\;\;\;\;\left(\frac{\frac{1}{z}}{\frac{c}{b}} + 9 \cdot \frac{x \cdot y}{z \cdot c}\right) - 4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \frac{x}{\frac{z \cdot c}{y}}\right) - 4 \cdot \frac{a \cdot t}{c}\\
\end{array}double code(double x, double y, double z, double t, double a, double b, double c) {
return (((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c));
}
double code(double x, double y, double z, double t, double a, double b, double c) {
double VAR;
if (((x * 9.0) <= -1.52782158387123e+160)) {
VAR = (((b / (z * c)) + (9.0 * (x / ((z * c) / y)))) - (4.0 * ((a * t) / c)));
} else {
double VAR_1;
if (((x * 9.0) <= -2022617.1351552196)) {
VAR_1 = (((b / (z * c)) + (9.0 * ((x / z) * (y / c)))) - (4.0 * (a * (t / c))));
} else {
double VAR_2;
if (((x * 9.0) <= -6.250408237077029e-233)) {
VAR_2 = (((b / (z * c)) + (9.0 * (x / ((z * c) / y)))) - (4.0 * ((a * t) / c)));
} else {
double VAR_3;
if (((x * 9.0) <= 4.930514039190418e-185)) {
VAR_3 = (((b / (z * c)) + (sqrt(9.0) * (sqrt(9.0) * ((x * y) / (z * c))))) - (4.0 * (a * (t / c))));
} else {
double VAR_4;
if (((x * 9.0) <= 1.4045902632130548e-147)) {
VAR_4 = ((((b / z) / c) + (9.0 * ((x * y) / (z * c)))) - (4.0 * ((a * t) / c)));
} else {
double VAR_5;
if (((x * 9.0) <= 2.973055089841673e+73)) {
VAR_5 = (((b / (z * c)) + (sqrt(9.0) * (sqrt(9.0) * ((x * y) / (z * c))))) - (4.0 * (a * (t / c))));
} else {
double VAR_6;
if (((x * 9.0) <= 6.771447645957023e+163)) {
VAR_6 = (((b / (z * c)) + (9.0 * ((x / z) * (y / c)))) - (4.0 * (a * (t / c))));
} else {
double VAR_7;
if (((x * 9.0) <= 5.864202564884603e+281)) {
VAR_7 = ((((1.0 / z) / (c / b)) + (9.0 * ((x * y) / (z * c)))) - (4.0 * (a * (t / c))));
} else {
VAR_7 = (((b / (z * c)) + (9.0 * (x / ((z * c) / y)))) - (4.0 * ((a * t) / c)));
}
VAR_6 = VAR_7;
}
VAR_5 = VAR_6;
}
VAR_4 = VAR_5;
}
VAR_3 = VAR_4;
}
VAR_2 = VAR_3;
}
VAR_1 = VAR_2;
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b




Bits error versus c
Results
| Original | 21.3 |
|---|---|
| Target | 15.5 |
| Herbie | 10.7 |
if (* x 9.0) < -1.52782158387123e+160 or -2022617.1351552196 < (* x 9.0) < -6.250408237077029e-233 or 5.864202564884603e+281 < (* x 9.0) Initial program 22.3
Taylor expanded around 0 13.5
rmApplied associate-/l*12.4
if -1.52782158387123e+160 < (* x 9.0) < -2022617.1351552196 or 2.973055089841673e+73 < (* x 9.0) < 6.771447645957023e+163Initial program 23.5
Taylor expanded around 0 13.9
rmApplied *-un-lft-identity13.9
Applied times-frac13.3
Simplified13.3
rmApplied times-frac10.8
if -6.250408237077029e-233 < (* x 9.0) < 4.930514039190418e-185 or 1.4045902632130548e-147 < (* x 9.0) < 2.973055089841673e+73Initial program 18.2
Taylor expanded around 0 9.1
rmApplied *-un-lft-identity9.1
Applied times-frac7.6
Simplified7.6
rmApplied add-sqr-sqrt7.6
Applied associate-*l*7.6
if 4.930514039190418e-185 < (* x 9.0) < 1.4045902632130548e-147Initial program 19.1
Taylor expanded around 0 7.5
rmApplied associate-/r*7.8
if 6.771447645957023e+163 < (* x 9.0) < 5.864202564884603e+281Initial program 28.0
Taylor expanded around 0 22.1
rmApplied *-un-lft-identity22.1
Applied times-frac19.7
Simplified19.7
rmApplied clear-num19.7
rmApplied *-un-lft-identity19.7
Applied times-frac20.1
Applied associate-/r*20.1
Simplified20.1
Final simplification10.7
herbie shell --seed 2020075
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:herbie-target
(if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) -1.1001567408041051e-171) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) -0.0) (/ (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9 (/ y c)) (/ x z)) (/ b (* c z))) (* 4 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (- (+ (* 9 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)))