\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}\;\left(x \cdot 9\right) \cdot y \le -8.1281721492083696 \cdot 10^{163} \lor \neg \left(\left(x \cdot 9\right) \cdot y \le -9.97211649628191843 \lor \neg \left(\left(x \cdot 9\right) \cdot y \le 11037.6481682097055 \lor \neg \left(\left(x \cdot 9\right) \cdot y \le 5.97818287171936241 \cdot 10^{286}\right)\right)\right):\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \frac{1}{\frac{\frac{z \cdot c}{x}}{y}}\right) - 4 \cdot \left(a \cdot \frac{t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{1}{z} \cdot \frac{b}{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 ((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 (((((double) (((double) (x * 9.0)) * y)) <= -8.12817214920837e+163) || !((((double) (((double) (x * 9.0)) * y)) <= -9.972116496281918) || !((((double) (((double) (x * 9.0)) * y)) <= 11037.648168209706) || !(((double) (((double) (x * 9.0)) * y)) <= 5.978182871719362e+286))))) {
VAR = ((double) (((double) (((double) (b / ((double) (z * c)))) + ((double) (9.0 * ((double) (1.0 / ((double) (((double) (((double) (z * c)) / x)) / y)))))))) - ((double) (4.0 * ((double) (a * ((double) (t / c))))))));
} else {
VAR = ((double) (((double) (((double) (((double) (1.0 / z)) * ((double) (b / c)))) + ((double) (9.0 * ((double) (((double) (x * y)) / ((double) (z * c)))))))) - ((double) (4.0 * ((double) (((double) (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 | 17.8 |
|---|---|
| Target | 14.1 |
| Herbie | 9.6 |
if (* (* x 9.0) y) < -8.1281721492083696e163 or -9.97211649628191843 < (* (* x 9.0) y) < 11037.6481682097055 or 5.97818287171936241e286 < (* (* x 9.0) y) Initial program 19.3
Taylor expanded around 0 13.1
rmApplied clear-num13.1
rmApplied associate-/r*10.7
rmApplied *-un-lft-identity10.7
Applied times-frac9.8
Simplified9.8
if -8.1281721492083696e163 < (* (* x 9.0) y) < -9.97211649628191843 or 11037.6481682097055 < (* (* x 9.0) y) < 5.97818287171936241e286Initial program 13.8
Taylor expanded around 0 7.5
rmApplied *-un-lft-identity7.5
Applied times-frac9.3
Final simplification9.6
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)))