\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}\;z \le -107.9477164565985418676064000464975833893 \lor \neg \left(z \le 4.089116712204728111103095377557020347435 \cdot 10^{58}\right):\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \frac{\frac{\frac{x}{z}}{c}}{\frac{1}{y}}\right) - 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{b}{z \cdot c} + 9 \cdot \frac{\frac{x}{z \cdot c}}{\frac{1}{y}}\right) - 4 \cdot \frac{a}{\frac{c}{t}}\\
\end{array}double f(double x, double y, double z, double t, double a, double b, double c) {
double r1004677 = x;
double r1004678 = 9.0;
double r1004679 = r1004677 * r1004678;
double r1004680 = y;
double r1004681 = r1004679 * r1004680;
double r1004682 = z;
double r1004683 = 4.0;
double r1004684 = r1004682 * r1004683;
double r1004685 = t;
double r1004686 = r1004684 * r1004685;
double r1004687 = a;
double r1004688 = r1004686 * r1004687;
double r1004689 = r1004681 - r1004688;
double r1004690 = b;
double r1004691 = r1004689 + r1004690;
double r1004692 = c;
double r1004693 = r1004682 * r1004692;
double r1004694 = r1004691 / r1004693;
return r1004694;
}
double f(double x, double y, double z, double t, double a, double b, double c) {
double r1004695 = z;
double r1004696 = -107.94771645659854;
bool r1004697 = r1004695 <= r1004696;
double r1004698 = 4.089116712204728e+58;
bool r1004699 = r1004695 <= r1004698;
double r1004700 = !r1004699;
bool r1004701 = r1004697 || r1004700;
double r1004702 = b;
double r1004703 = c;
double r1004704 = r1004695 * r1004703;
double r1004705 = r1004702 / r1004704;
double r1004706 = 9.0;
double r1004707 = x;
double r1004708 = r1004707 / r1004695;
double r1004709 = r1004708 / r1004703;
double r1004710 = 1.0;
double r1004711 = y;
double r1004712 = r1004710 / r1004711;
double r1004713 = r1004709 / r1004712;
double r1004714 = r1004706 * r1004713;
double r1004715 = r1004705 + r1004714;
double r1004716 = 4.0;
double r1004717 = a;
double r1004718 = t;
double r1004719 = r1004717 * r1004718;
double r1004720 = r1004719 / r1004703;
double r1004721 = r1004716 * r1004720;
double r1004722 = r1004715 - r1004721;
double r1004723 = r1004707 / r1004704;
double r1004724 = r1004723 / r1004712;
double r1004725 = r1004706 * r1004724;
double r1004726 = r1004705 + r1004725;
double r1004727 = r1004703 / r1004718;
double r1004728 = r1004717 / r1004727;
double r1004729 = r1004716 * r1004728;
double r1004730 = r1004726 - r1004729;
double r1004731 = r1004701 ? r1004722 : r1004730;
return r1004731;
}




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 | 8.6 |
if z < -107.94771645659854 or 4.089116712204728e+58 < z Initial program 31.6
Taylor expanded around 0 14.2
rmApplied associate-/l*11.7
rmApplied div-inv11.7
Applied associate-/r*11.8
rmApplied associate-/r*9.0
if -107.94771645659854 < z < 4.089116712204728e+58Initial program 7.2
Taylor expanded around 0 9.6
rmApplied associate-/l*10.6
rmApplied div-inv10.6
Applied associate-/r*11.4
rmApplied associate-/l*8.0
Final simplification8.6
herbie shell --seed 2019353
(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)))