\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 -8569260933999674729203836689113474400256:\\
\;\;\;\;\left(\frac{\frac{\sqrt[3]{\mathsf{fma}\left(x \cdot 9, y, b\right)}}{\sqrt[3]{z}}}{\sqrt[3]{c}} \cdot \frac{\frac{\sqrt[3]{\mathsf{fma}\left(x \cdot 9, y, b\right)}}{\sqrt[3]{z}}}{\sqrt[3]{c}}\right) \cdot \frac{\frac{\sqrt[3]{\mathsf{fma}\left(x \cdot 9, y, b\right)}}{\sqrt[3]{z}}}{\sqrt[3]{c}} - \frac{t}{\sqrt[3]{c}} \cdot \frac{4 \cdot a}{\sqrt[3]{c} \cdot \sqrt[3]{c}}\\
\mathbf{elif}\;c \le 4.431880420665139971603088320955600738026 \cdot 10^{-16}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{x}{\frac{z}{y}}, 9, \frac{b}{z} - \left(4 \cdot a\right) \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\frac{\sqrt[3]{\mathsf{fma}\left(x \cdot 9, y, b\right)}}{\sqrt[3]{z}}}{\sqrt[3]{c}} \cdot \frac{\frac{\sqrt[3]{\mathsf{fma}\left(x \cdot 9, y, b\right)}}{\sqrt[3]{z}}}{\sqrt[3]{c}}\right) \cdot \frac{\frac{\sqrt[3]{\mathsf{fma}\left(x \cdot 9, y, b\right)}}{\sqrt[3]{z}}}{\sqrt[3]{c}} - \frac{t}{\sqrt[3]{c}} \cdot \frac{4 \cdot a}{\sqrt[3]{c} \cdot \sqrt[3]{c}}\\
\end{array}double f(double x, double y, double z, double t, double a, double b, double c) {
double r33620091 = x;
double r33620092 = 9.0;
double r33620093 = r33620091 * r33620092;
double r33620094 = y;
double r33620095 = r33620093 * r33620094;
double r33620096 = z;
double r33620097 = 4.0;
double r33620098 = r33620096 * r33620097;
double r33620099 = t;
double r33620100 = r33620098 * r33620099;
double r33620101 = a;
double r33620102 = r33620100 * r33620101;
double r33620103 = r33620095 - r33620102;
double r33620104 = b;
double r33620105 = r33620103 + r33620104;
double r33620106 = c;
double r33620107 = r33620096 * r33620106;
double r33620108 = r33620105 / r33620107;
return r33620108;
}
double f(double x, double y, double z, double t, double a, double b, double c) {
double r33620109 = c;
double r33620110 = -8.569260933999675e+39;
bool r33620111 = r33620109 <= r33620110;
double r33620112 = x;
double r33620113 = 9.0;
double r33620114 = r33620112 * r33620113;
double r33620115 = y;
double r33620116 = b;
double r33620117 = fma(r33620114, r33620115, r33620116);
double r33620118 = cbrt(r33620117);
double r33620119 = z;
double r33620120 = cbrt(r33620119);
double r33620121 = r33620118 / r33620120;
double r33620122 = cbrt(r33620109);
double r33620123 = r33620121 / r33620122;
double r33620124 = r33620123 * r33620123;
double r33620125 = r33620124 * r33620123;
double r33620126 = t;
double r33620127 = r33620126 / r33620122;
double r33620128 = 4.0;
double r33620129 = a;
double r33620130 = r33620128 * r33620129;
double r33620131 = r33620122 * r33620122;
double r33620132 = r33620130 / r33620131;
double r33620133 = r33620127 * r33620132;
double r33620134 = r33620125 - r33620133;
double r33620135 = 4.43188042066514e-16;
bool r33620136 = r33620109 <= r33620135;
double r33620137 = r33620119 / r33620115;
double r33620138 = r33620112 / r33620137;
double r33620139 = r33620116 / r33620119;
double r33620140 = r33620130 * r33620126;
double r33620141 = r33620139 - r33620140;
double r33620142 = fma(r33620138, r33620113, r33620141);
double r33620143 = r33620142 / r33620109;
double r33620144 = r33620136 ? r33620143 : r33620134;
double r33620145 = r33620111 ? r33620134 : r33620144;
return r33620145;
}




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.2 |
|---|---|
| Target | 14.7 |
| Herbie | 6.0 |
if c < -8.569260933999675e+39 or 4.43188042066514e-16 < c Initial program 23.0
Simplified17.6
rmApplied clear-num17.7
rmApplied div-sub17.7
Simplified17.6
rmApplied add-cube-cbrt17.9
Applied times-frac15.0
rmApplied add-cube-cbrt15.4
Applied add-cube-cbrt15.5
Applied add-cube-cbrt15.6
Applied times-frac15.6
Applied times-frac8.7
Simplified7.8
if -8.569260933999675e+39 < c < 4.43188042066514e-16Initial program 14.5
Simplified3.1
rmApplied clear-num3.2
Taylor expanded around inf 3.0
Simplified2.6
Final simplification6.0
herbie shell --seed 2019192 +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)))