\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.1248003357302601 \cdot 10^{-17}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \frac{x}{\frac{z \cdot c}{y}}\right) - 4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{elif}\;a \le -4.19304622018763957 \cdot 10^{-144}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}\\
\mathbf{elif}\;a \le -5.15422094316753991 \cdot 10^{-151}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + \left(9 \cdot \frac{x}{z}\right) \cdot \frac{y}{c}\right) - 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;a \le -1.00978527387666522 \cdot 10^{-265}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + \left(\sqrt[3]{9} \cdot \sqrt[3]{9}\right) \cdot \left(\sqrt[3]{9} \cdot \frac{x \cdot y}{z \cdot c}\right)\right) - 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;a \le 2.4746682039209063 \cdot 10^{-210}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\right) - 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;a \le 554395.268607782316:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + \left(\sqrt[3]{9} \cdot \sqrt[3]{9}\right) \cdot \left(\sqrt[3]{9} \cdot \frac{x \cdot y}{z \cdot c}\right)\right) - 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;a \le 1.68517251305351882 \cdot 10^{66}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \frac{x}{z \cdot \frac{c}{y}}\right) - 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \frac{x}{\frac{z \cdot c}{y}}\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.12480033573026e-17)) {
VAR = ((double) (((double) (((double) (b / ((double) (z * c)))) + ((double) (9.0 * ((double) (x / ((double) (((double) (z * c)) / y)))))))) - ((double) (4.0 * ((double) (a * ((double) (t / c))))))));
} else {
double VAR_1;
if ((a <= -4.1930462201876396e-144)) {
VAR_1 = ((double) (((double) (1.0 / z)) * ((double) (((double) (((double) (((double) (((double) (x * 9.0)) * y)) - ((double) (((double) (((double) (z * 4.0)) * t)) * a)))) + b)) / c))));
} else {
double VAR_2;
if ((a <= -5.15422094316754e-151)) {
VAR_2 = ((double) (((double) (((double) (b / ((double) (z * c)))) + ((double) (((double) (9.0 * ((double) (x / z)))) * ((double) (y / c)))))) - ((double) (4.0 * ((double) (((double) (a * t)) / c))))));
} else {
double VAR_3;
if ((a <= -1.0097852738766652e-265)) {
VAR_3 = ((double) (((double) (((double) (b / ((double) (z * c)))) + ((double) (((double) (((double) cbrt(9.0)) * ((double) cbrt(9.0)))) * ((double) (((double) cbrt(9.0)) * ((double) (((double) (x * y)) / ((double) (z * c)))))))))) - ((double) (4.0 * ((double) (((double) (a * t)) / c))))));
} else {
double VAR_4;
if ((a <= 2.4746682039209063e-210)) {
VAR_4 = ((double) (((double) (((double) (b / ((double) (z * c)))) + ((double) (9.0 * ((double) (((double) (x / z)) * ((double) (y / c)))))))) - ((double) (4.0 * ((double) (((double) (a * t)) / c))))));
} else {
double VAR_5;
if ((a <= 554395.2686077823)) {
VAR_5 = ((double) (((double) (((double) (b / ((double) (z * c)))) + ((double) (((double) (((double) cbrt(9.0)) * ((double) cbrt(9.0)))) * ((double) (((double) cbrt(9.0)) * ((double) (((double) (x * y)) / ((double) (z * c)))))))))) - ((double) (4.0 * ((double) (((double) (a * t)) / c))))));
} else {
double VAR_6;
if ((a <= 1.685172513053519e+66)) {
VAR_6 = ((double) (((double) (((double) (b / ((double) (z * c)))) + ((double) (9.0 * ((double) (x / ((double) (z * ((double) (c / y)))))))))) - ((double) (4.0 * ((double) (((double) (a * t)) / c))))));
} else {
VAR_6 = ((double) (((double) (((double) (b / ((double) (z * c)))) + ((double) (9.0 * ((double) (x / ((double) (((double) (z * c)) / y)))))))) - ((double) (4.0 * ((double) (a * ((double) (t / c))))))));
}
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 | 20.8 |
|---|---|
| Target | 14.3 |
| Herbie | 9.9 |
if a < -1.1248003357302601e-17 or 1.68517251305351882e66 < a Initial program 24.5
Taylor expanded around 0 15.8
rmApplied associate-/l*14.5
rmApplied *-un-lft-identity14.5
Applied times-frac7.9
Simplified7.9
if -1.1248003357302601e-17 < a < -4.19304622018763957e-144Initial program 18.2
rmApplied *-un-lft-identity18.2
Applied times-frac18.7
if -4.19304622018763957e-144 < a < -5.15422094316753991e-151Initial program 20.4
Taylor expanded around 0 9.2
rmApplied times-frac6.9
Applied associate-*r*6.9
if -5.15422094316753991e-151 < a < -1.00978527387666522e-265 or 2.4746682039209063e-210 < a < 554395.268607782316Initial program 17.9
Taylor expanded around 0 8.8
rmApplied add-cube-cbrt8.8
Applied associate-*l*8.8
if -1.00978527387666522e-265 < a < 2.4746682039209063e-210Initial program 18.9
Taylor expanded around 0 10.2
rmApplied times-frac11.6
if 554395.268607782316 < a < 1.68517251305351882e66Initial program 19.4
Taylor expanded around 0 9.1
rmApplied associate-/l*8.6
rmApplied *-un-lft-identity8.6
Applied times-frac9.4
Simplified9.4
Final simplification9.9
herbie shell --seed 2020173
(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)))