\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}\;a \le -1.26671277234656036 \cdot 10^{-134}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \frac{x \cdot y}{z \cdot c}\right) - 4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{elif}\;a \le -3.67925716929398172 \cdot 10^{-262}:\\
\;\;\;\;\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}\;a \le 3.4437255738236215 \cdot 10^{-196}:\\
\;\;\;\;\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}\;a \le 1.6288571663171503 \cdot 10^{141}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \frac{\frac{x}{z}}{\frac{c}{y}}\right) - 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \frac{x \cdot y}{z \cdot c}\right) - 4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\end{array}double code(double x, double y, double z, double t, double a, double b, double c) {
return ((double) (((double) (((double) (((double) (((double) (x * 9.0)) * y)) - ((double) (((double) (((double) (z * 4.0)) * t)) * a)))) + b)) / ((double) (z * c))));
}
double code(double x, double y, double z, double t, double a, double b, double c) {
double VAR;
if ((a <= -1.2667127723465604e-134)) {
VAR = ((double) (((double) (((double) (b / ((double) (z * c)))) + ((double) (9.0 * ((double) (((double) (x * y)) / ((double) (z * c)))))))) - ((double) (4.0 * ((double) (a * ((double) (t / c))))))));
} else {
double VAR_1;
if ((a <= -3.679257169293982e-262)) {
VAR_1 = ((double) (((double) (((double) (b / ((double) (z * c)))) + ((double) (9.0 * ((double) (x / ((double) (((double) (z * c)) / y)))))))) - ((double) (4.0 * ((double) (((double) (a * t)) / c))))));
} else {
double VAR_2;
if ((a <= 3.4437255738236215e-196)) {
VAR_2 = ((double) (((double) (((double) (((double) (b / z)) / c)) + ((double) (9.0 * ((double) (((double) (x * y)) / ((double) (z * c)))))))) - ((double) (4.0 * ((double) (((double) (a * t)) / c))))));
} else {
double VAR_3;
if ((a <= 1.6288571663171503e+141)) {
VAR_3 = ((double) (((double) (((double) (b / ((double) (z * c)))) + ((double) (9.0 * ((double) (((double) (x / z)) / ((double) (c / y)))))))) - ((double) (4.0 * ((double) (((double) (a * t)) / c))))));
} else {
VAR_3 = ((double) (((double) (((double) (b / ((double) (z * c)))) + ((double) (9.0 * ((double) (((double) (x * y)) / ((double) (z * c)))))))) - ((double) (4.0 * ((double) (a * ((double) (t / c))))))));
}
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 | 20.9 |
|---|---|
| Target | 15.2 |
| Herbie | 10.5 |
if a < -1.26671277234656036e-134 or 1.6288571663171503e141 < a Initial program 23.5
Taylor expanded around 0 14.3
rmApplied *-un-lft-identity14.3
Applied times-frac10.7
Simplified10.7
if -1.26671277234656036e-134 < a < -3.67925716929398172e-262Initial program 19.7
Taylor expanded around 0 11.0
rmApplied associate-/l*10.4
if -3.67925716929398172e-262 < a < 3.4437255738236215e-196Initial program 17.0
Taylor expanded around 0 9.5
rmApplied associate-/r*9.1
if 3.4437255738236215e-196 < a < 1.6288571663171503e141Initial program 19.3
Taylor expanded around 0 10.4
rmApplied associate-/l*10.1
rmApplied *-un-lft-identity10.1
Applied times-frac10.7
Applied associate-/r*11.1
Simplified11.1
Final simplification10.5
herbie shell --seed 2020162
(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.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.1001567408041051e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))