\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}\;y \leq -1.8297439497525036 \cdot 10^{+21}:\\
\;\;\;\;\frac{b}{z \cdot c} + \left(9 \cdot \left(y \cdot \frac{\frac{x}{z}}{c}\right) - 4 \cdot \left(t \cdot \frac{a}{c}\right)\right)\\
\mathbf{elif}\;y \leq -4.3366014336811505 \cdot 10^{-101}:\\
\;\;\;\;\frac{\frac{1}{\frac{z}{b + x \cdot \left(y \cdot 9\right)}} - 4 \cdot \left(t \cdot a\right)}{c}\\
\mathbf{elif}\;y \leq 2.4452607704569994 \cdot 10^{-237}:\\
\;\;\;\;\frac{b + x \cdot \left(y \cdot 9\right)}{z \cdot c} - 4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;y \leq 9.042159349952659 \cdot 10^{-35}:\\
\;\;\;\;\frac{\frac{1}{\frac{z}{b + x \cdot \left(y \cdot 9\right)}} - 4 \cdot \left(t \cdot a\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{b}{c} + \left(9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right) - 4 \cdot \left(t \cdot \frac{a}{c}\right)\right)\\
\end{array}double code(double x, double y, double z, double t, double a, double b, double c) {
return (((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 ((y <= -1.8297439497525036e+21)) {
VAR = ((double) ((b / ((double) (z * c))) + ((double) (((double) (9.0 * ((double) (y * ((x / z) / c))))) - ((double) (4.0 * ((double) (t * (a / c)))))))));
} else {
double VAR_1;
if ((y <= -4.3366014336811505e-101)) {
VAR_1 = (((double) ((1.0 / (z / ((double) (b + ((double) (x * ((double) (y * 9.0)))))))) - ((double) (4.0 * ((double) (t * a)))))) / c);
} else {
double VAR_2;
if ((y <= 2.4452607704569994e-237)) {
VAR_2 = ((double) ((((double) (b + ((double) (x * ((double) (y * 9.0)))))) / ((double) (z * c))) - ((double) (4.0 * ((double) (t * (a / c)))))));
} else {
double VAR_3;
if ((y <= 9.042159349952659e-35)) {
VAR_3 = (((double) ((1.0 / (z / ((double) (b + ((double) (x * ((double) (y * 9.0)))))))) - ((double) (4.0 * ((double) (t * a)))))) / c);
} else {
VAR_3 = ((double) (((double) ((1.0 / z) * (b / c))) + ((double) (((double) (9.0 * ((double) (y * (x / ((double) (z * c))))))) - ((double) (4.0 * ((double) (t * (a / 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.4 |
|---|---|
| Target | 15.0 |
| Herbie | 9.1 |
if y < -1829743949752503630000Initial program 24.4
Simplified20.1
Taylor expanded around 0 17.2
Simplified10.2
rmApplied associate-/r*8.6
if -1829743949752503630000 < y < -4.33660143368115052e-101 or 2.4452607704569994e-237 < y < 9.0421593499526589e-35Initial program 17.0
Simplified9.0
rmApplied clear-num9.1
if -4.33660143368115052e-101 < y < 2.4452607704569994e-237Initial program 17.2
Simplified8.8
rmApplied div-sub8.8
Simplified8.4
Simplified7.7
if 9.0421593499526589e-35 < y Initial program 24.6
Simplified18.3
Taylor expanded around 0 16.4
Simplified10.5
rmApplied *-un-lft-identity10.5
Applied times-frac11.3
Final simplification9.1
herbie shell --seed 2020196
(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)))