\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 -2.3946961746475826 \cdot 10^{35}:\\
\;\;\;\;\mathsf{fma}\left(-4, \frac{t}{\frac{c}{a}}, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z \cdot c}\right)\\
\mathbf{elif}\;z \le -5.2555164347572611 \cdot 10^{-282}:\\
\;\;\;\;\mathsf{fma}\left(-4, \frac{t \cdot a}{c}, \frac{1}{z} \cdot \frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c}\right)\\
\mathbf{elif}\;z \le 231759.4908422604:\\
\;\;\;\;\mathsf{fma}\left(-4, \frac{\sqrt[3]{t}}{\sqrt[3]{1}} \cdot \left(\frac{\sqrt[3]{t}}{\sqrt[3]{c}} \cdot \left(\frac{\sqrt[3]{t}}{\sqrt[3]{c}} \cdot \frac{a}{\sqrt[3]{c}}\right)\right), \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z \cdot c}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-4, \frac{t \cdot a}{c}, \frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{z}}{c}\right)\\
\end{array}double f(double x, double y, double z, double t, double a, double b, double c) {
double r1462604 = x;
double r1462605 = 9.0;
double r1462606 = r1462604 * r1462605;
double r1462607 = y;
double r1462608 = r1462606 * r1462607;
double r1462609 = z;
double r1462610 = 4.0;
double r1462611 = r1462609 * r1462610;
double r1462612 = t;
double r1462613 = r1462611 * r1462612;
double r1462614 = a;
double r1462615 = r1462613 * r1462614;
double r1462616 = r1462608 - r1462615;
double r1462617 = b;
double r1462618 = r1462616 + r1462617;
double r1462619 = c;
double r1462620 = r1462609 * r1462619;
double r1462621 = r1462618 / r1462620;
return r1462621;
}
double f(double x, double y, double z, double t, double a, double b, double c) {
double r1462622 = z;
double r1462623 = -2.3946961746475826e+35;
bool r1462624 = r1462622 <= r1462623;
double r1462625 = 4.0;
double r1462626 = -r1462625;
double r1462627 = t;
double r1462628 = c;
double r1462629 = a;
double r1462630 = r1462628 / r1462629;
double r1462631 = r1462627 / r1462630;
double r1462632 = x;
double r1462633 = 9.0;
double r1462634 = y;
double r1462635 = r1462633 * r1462634;
double r1462636 = b;
double r1462637 = fma(r1462632, r1462635, r1462636);
double r1462638 = r1462622 * r1462628;
double r1462639 = r1462637 / r1462638;
double r1462640 = fma(r1462626, r1462631, r1462639);
double r1462641 = -5.255516434757261e-282;
bool r1462642 = r1462622 <= r1462641;
double r1462643 = r1462627 * r1462629;
double r1462644 = r1462643 / r1462628;
double r1462645 = 1.0;
double r1462646 = r1462645 / r1462622;
double r1462647 = r1462633 * r1462632;
double r1462648 = fma(r1462647, r1462634, r1462636);
double r1462649 = r1462648 / r1462628;
double r1462650 = r1462646 * r1462649;
double r1462651 = fma(r1462626, r1462644, r1462650);
double r1462652 = 231759.49084226042;
bool r1462653 = r1462622 <= r1462652;
double r1462654 = cbrt(r1462627);
double r1462655 = cbrt(r1462645);
double r1462656 = r1462654 / r1462655;
double r1462657 = cbrt(r1462628);
double r1462658 = r1462654 / r1462657;
double r1462659 = r1462629 / r1462657;
double r1462660 = r1462658 * r1462659;
double r1462661 = r1462658 * r1462660;
double r1462662 = r1462656 * r1462661;
double r1462663 = fma(r1462626, r1462662, r1462639);
double r1462664 = r1462648 / r1462622;
double r1462665 = r1462664 / r1462628;
double r1462666 = fma(r1462626, r1462644, r1462665);
double r1462667 = r1462653 ? r1462663 : r1462666;
double r1462668 = r1462642 ? r1462651 : r1462667;
double r1462669 = r1462624 ? r1462640 : r1462668;
return r1462669;
}




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.8 |
|---|---|
| Target | 14.6 |
| Herbie | 9.7 |
if z < -2.3946961746475826e+35Initial program 32.2
Simplified14.1
rmApplied associate-/l*14.7
if -2.3946961746475826e+35 < z < -5.255516434757261e-282Initial program 7.0
Simplified9.0
rmApplied *-un-lft-identity9.0
Applied times-frac8.7
Simplified8.7
if -5.255516434757261e-282 < z < 231759.49084226042Initial program 6.3
Simplified8.8
rmApplied add-cube-cbrt9.0
Applied times-frac6.0
rmApplied add-cube-cbrt6.1
Applied times-frac6.1
Applied associate-*l*5.4
rmApplied *-un-lft-identity5.4
Applied cbrt-prod5.4
Applied times-frac5.4
Applied associate-*l*5.4
if 231759.49084226042 < z Initial program 30.1
Simplified13.9
rmApplied associate-/r*8.9
Simplified8.9
Final simplification9.7
herbie shell --seed 2020034 +o rules:numerics
(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)))