\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 -4.2277268531656142 \cdot 10^{-188} \lor \neg \left(a \le 6.4208887277066549 \cdot 10^{24}\right):\\
\;\;\;\;\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{else}:\\
\;\;\;\;\left(\frac{b}{z} \cdot \frac{1}{c} + 9 \cdot \frac{x \cdot y}{z \cdot c}\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 (((a <= -4.227726853165614e-188) || !(a <= 6.420888727706655e+24))) {
VAR = (((b / (z * c)) + (9.0 * (x / ((z * c) / y)))) - (4.0 * (a * (t / c))));
} else {
VAR = ((((b / z) * (1.0 / c)) + (9.0 * ((x * y) / (z * c)))) - (4.0 * ((a * t) / c)));
}
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.0 |
|---|---|
| Target | 14.2 |
| Herbie | 8.7 |
if a < -4.227726853165614e-188 or 6.420888727706655e+24 < a Initial program 21.9
Taylor expanded around 0 13.2
rmApplied associate-/l*11.8
rmApplied *-un-lft-identity11.8
Applied times-frac8.1
Simplified8.1
if -4.227726853165614e-188 < a < 6.420888727706655e+24Initial program 17.2
Taylor expanded around 0 9.0
rmApplied *-un-lft-identity9.0
Applied times-frac10.0
rmApplied div-inv10.0
Applied associate-*r*9.7
Simplified9.6
Final simplification8.7
herbie shell --seed 2020105
(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)))