\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 -3.972382339916756952166028272029685653784 \cdot 10^{73}:\\
\;\;\;\;\mathsf{fma}\left(9, \frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\frac{z}{\sqrt[3]{y} \cdot \sqrt[3]{y}}} \cdot \frac{\sqrt[3]{x}}{\frac{c}{\sqrt[3]{y}}}, \frac{b}{z \cdot c}\right) - 4 \cdot \frac{t \cdot a}{c}\\
\mathbf{elif}\;z \le 229091558.659164011478424072265625:\\
\;\;\;\;\mathsf{fma}\left(9, \frac{x}{\frac{z \cdot c}{y}}, \frac{b}{z \cdot c}\right) - 4 \cdot \frac{t}{\frac{c}{a}}\\
\mathbf{elif}\;z \le 2.258247896998519207364538961474114070293 \cdot 10^{272}:\\
\;\;\;\;\mathsf{fma}\left(9, \frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\frac{z}{\sqrt[3]{y} \cdot \sqrt[3]{y}}} \cdot \frac{\sqrt[3]{x}}{\frac{c}{\sqrt[3]{y}}}, \frac{b}{z \cdot c}\right) - 4 \cdot \frac{t \cdot a}{c}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(9, \frac{x}{\frac{z \cdot c}{y}}, \frac{b}{z \cdot c}\right) - 4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\end{array}double f(double x, double y, double z, double t, double a, double b, double c) {
double r87252667 = x;
double r87252668 = 9.0;
double r87252669 = r87252667 * r87252668;
double r87252670 = y;
double r87252671 = r87252669 * r87252670;
double r87252672 = z;
double r87252673 = 4.0;
double r87252674 = r87252672 * r87252673;
double r87252675 = t;
double r87252676 = r87252674 * r87252675;
double r87252677 = a;
double r87252678 = r87252676 * r87252677;
double r87252679 = r87252671 - r87252678;
double r87252680 = b;
double r87252681 = r87252679 + r87252680;
double r87252682 = c;
double r87252683 = r87252672 * r87252682;
double r87252684 = r87252681 / r87252683;
return r87252684;
}
double f(double x, double y, double z, double t, double a, double b, double c) {
double r87252685 = z;
double r87252686 = -3.972382339916757e+73;
bool r87252687 = r87252685 <= r87252686;
double r87252688 = 9.0;
double r87252689 = x;
double r87252690 = cbrt(r87252689);
double r87252691 = r87252690 * r87252690;
double r87252692 = y;
double r87252693 = cbrt(r87252692);
double r87252694 = r87252693 * r87252693;
double r87252695 = r87252685 / r87252694;
double r87252696 = r87252691 / r87252695;
double r87252697 = c;
double r87252698 = r87252697 / r87252693;
double r87252699 = r87252690 / r87252698;
double r87252700 = r87252696 * r87252699;
double r87252701 = b;
double r87252702 = r87252685 * r87252697;
double r87252703 = r87252701 / r87252702;
double r87252704 = fma(r87252688, r87252700, r87252703);
double r87252705 = 4.0;
double r87252706 = t;
double r87252707 = a;
double r87252708 = r87252706 * r87252707;
double r87252709 = r87252708 / r87252697;
double r87252710 = r87252705 * r87252709;
double r87252711 = r87252704 - r87252710;
double r87252712 = 229091558.659164;
bool r87252713 = r87252685 <= r87252712;
double r87252714 = r87252702 / r87252692;
double r87252715 = r87252689 / r87252714;
double r87252716 = fma(r87252688, r87252715, r87252703);
double r87252717 = r87252697 / r87252707;
double r87252718 = r87252706 / r87252717;
double r87252719 = r87252705 * r87252718;
double r87252720 = r87252716 - r87252719;
double r87252721 = 2.2582478969985192e+272;
bool r87252722 = r87252685 <= r87252721;
double r87252723 = r87252707 / r87252697;
double r87252724 = r87252706 * r87252723;
double r87252725 = r87252705 * r87252724;
double r87252726 = r87252716 - r87252725;
double r87252727 = r87252722 ? r87252711 : r87252726;
double r87252728 = r87252713 ? r87252720 : r87252727;
double r87252729 = r87252687 ? r87252711 : r87252728;
return r87252729;
}




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
| Original | 20.7 |
|---|---|
| Target | 14.9 |
| Herbie | 8.1 |
if z < -3.972382339916757e+73 or 229091558.659164 < z < 2.2582478969985192e+272Initial program 31.0
Simplified8.8
Taylor expanded around 0 13.7
Simplified13.7
rmApplied associate-/l*12.0
rmApplied add-cube-cbrt12.1
Applied times-frac9.9
Applied add-cube-cbrt9.9
Applied times-frac8.4
if -3.972382339916757e+73 < z < 229091558.659164Initial program 7.9
Simplified18.4
Taylor expanded around 0 9.6
Simplified9.6
rmApplied associate-/l*10.6
rmApplied associate-/l*7.3
if 2.2582478969985192e+272 < z Initial program 46.0
Simplified13.1
Taylor expanded around 0 16.5
Simplified16.5
rmApplied associate-/l*13.1
rmApplied *-un-lft-identity13.1
Applied times-frac12.8
Simplified12.8
Final simplification8.1
herbie shell --seed 2019173 +o rules:numerics
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:herbie-target
(if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-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)))