\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}\left(\frac{b}{z \cdot c} + 9 \cdot \left(\frac{x}{z} \cdot \frac{y}{c}\right)\right) - 4 \cdot \left(\frac{a}{c} \cdot t\right)double f(double x, double y, double z, double t, double a, double b, double c) {
double r462074 = x;
double r462075 = 9.0;
double r462076 = r462074 * r462075;
double r462077 = y;
double r462078 = r462076 * r462077;
double r462079 = z;
double r462080 = 4.0;
double r462081 = r462079 * r462080;
double r462082 = t;
double r462083 = r462081 * r462082;
double r462084 = a;
double r462085 = r462083 * r462084;
double r462086 = r462078 - r462085;
double r462087 = b;
double r462088 = r462086 + r462087;
double r462089 = c;
double r462090 = r462079 * r462089;
double r462091 = r462088 / r462090;
return r462091;
}
double f(double x, double y, double z, double t, double a, double b, double c) {
double r462092 = b;
double r462093 = z;
double r462094 = c;
double r462095 = r462093 * r462094;
double r462096 = r462092 / r462095;
double r462097 = 9.0;
double r462098 = x;
double r462099 = r462098 / r462093;
double r462100 = y;
double r462101 = r462100 / r462094;
double r462102 = r462099 * r462101;
double r462103 = r462097 * r462102;
double r462104 = r462096 + r462103;
double r462105 = 4.0;
double r462106 = a;
double r462107 = r462106 / r462094;
double r462108 = t;
double r462109 = r462107 * r462108;
double r462110 = r462105 * r462109;
double r462111 = r462104 - r462110;
return r462111;
}




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.6 |
|---|---|
| Target | 14.5 |
| Herbie | 12.7 |
if (* (* x 9.0) y) < -inf.0Initial program 64.0
Taylor expanded around 0 63.0
rmApplied associate-/l*62.8
rmApplied associate-/r/62.8
rmApplied associate-/l*16.0
if -inf.0 < (* (* x 9.0) y) < 1.544823925461009e+279Initial program 17.4
Taylor expanded around 0 8.0
rmApplied associate-/l*7.3
rmApplied div-inv7.3
Applied associate-/r*7.8
if 1.544823925461009e+279 < (* (* x 9.0) y) Initial program 57.3
Taylor expanded around 0 53.6
rmApplied associate-/l*52.6
rmApplied associate-/r/52.9
rmApplied times-frac9.2
Final simplification12.7
herbie shell --seed 2019291
(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.1001567408041049e-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.17088779117474882e-53) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 2.8768236795461372e130) (- (+ (* (* 9 (/ y c)) (/ x z)) (/ b (* c z))) (* 4 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 1.3838515042456319e158) (/ (+ (- (* (* 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)))