\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}\;c \le -4.0551950249303739 \cdot 10^{-99}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \left(\frac{1}{z} \cdot \frac{x}{\frac{c}{y}}\right)\right) - 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{elif}\;c \le 4.17423928613453521 \cdot 10^{-232}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \frac{\frac{x \cdot y}{z}}{c}\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 \frac{a}{\frac{c}{t}}\\
\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 temp;
if ((c <= -4.055195024930374e-99)) {
temp = (((b / (z * c)) + (9.0 * ((1.0 / z) * (x / (c / y))))) - (4.0 * ((a * t) / c)));
} else {
double temp_1;
if ((c <= 4.174239286134535e-232)) {
temp_1 = (((b / (z * c)) + (9.0 * (((x * y) / z) / c))) - (4.0 * ((a * t) / c)));
} else {
temp_1 = (((b / (z * c)) + (9.0 * (x / ((z * c) / y)))) - (4.0 * (a / (c / t))));
}
temp = temp_1;
}
return temp;
}




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 | 14.5 |
| Herbie | 9.6 |
if c < -4.055195024930374e-99Initial program 21.9
Taylor expanded around 0 12.8
rmApplied associate-/l*11.6
rmApplied *-un-lft-identity11.6
Applied times-frac10.6
Applied *-un-lft-identity10.6
Applied times-frac10.4
Simplified10.4
if -4.055195024930374e-99 < c < 4.174239286134535e-232Initial program 15.4
Taylor expanded around 0 7.7
rmApplied associate-/r*7.7
if 4.174239286134535e-232 < c Initial program 21.1
Taylor expanded around 0 11.5
rmApplied associate-/l*10.6
rmApplied associate-/l*9.2
Final simplification9.6
herbie shell --seed 2020053
(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)))