\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\begin{array}{l}
\mathbf{if}\;y \le -1.6180785068215594 \cdot 10^{233}:\\
\;\;\;\;a - \frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{\left(x + t\right) + y}} \cdot \left(\frac{\sqrt[3]{y}}{\sqrt[3]{\left(x + t\right) + y}} \cdot \frac{b}{\sqrt[3]{\left(x + t\right) + y}}\right)\\
\mathbf{elif}\;y \le -2.54381506746759348 \cdot 10^{164}:\\
\;\;\;\;z - \frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{\left(x + t\right) + y}} \cdot \left(\frac{\sqrt[3]{y}}{\sqrt[3]{\left(x + t\right) + y}} \cdot \frac{b}{\sqrt[3]{\left(x + t\right) + y}}\right)\\
\mathbf{elif}\;y \le -1.80738930203575709 \cdot 10^{81}:\\
\;\;\;\;a - \frac{y}{\sqrt[3]{\left(x + t\right) + y} \cdot \sqrt[3]{\left(x + t\right) + y}} \cdot \frac{b}{\sqrt[3]{\left(x + t\right) + y}}\\
\mathbf{elif}\;y \le 9.18430122690207579 \cdot 10^{57}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x + y, z, \left(t + y\right) \cdot a\right)}{1} \cdot \frac{1}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y}\\
\mathbf{else}:\\
\;\;\;\;z - \frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{\left(x + t\right) + y}} \cdot \left(\frac{\sqrt[3]{y}}{\sqrt[3]{\left(x + t\right) + y}} \cdot \frac{b}{\sqrt[3]{\left(x + t\right) + y}}\right)\\
\end{array}double f(double x, double y, double z, double t, double a, double b) {
double r804064 = x;
double r804065 = y;
double r804066 = r804064 + r804065;
double r804067 = z;
double r804068 = r804066 * r804067;
double r804069 = t;
double r804070 = r804069 + r804065;
double r804071 = a;
double r804072 = r804070 * r804071;
double r804073 = r804068 + r804072;
double r804074 = b;
double r804075 = r804065 * r804074;
double r804076 = r804073 - r804075;
double r804077 = r804064 + r804069;
double r804078 = r804077 + r804065;
double r804079 = r804076 / r804078;
return r804079;
}
double f(double x, double y, double z, double t, double a, double b) {
double r804080 = y;
double r804081 = -1.6180785068215594e+233;
bool r804082 = r804080 <= r804081;
double r804083 = a;
double r804084 = cbrt(r804080);
double r804085 = r804084 * r804084;
double r804086 = x;
double r804087 = t;
double r804088 = r804086 + r804087;
double r804089 = r804088 + r804080;
double r804090 = cbrt(r804089);
double r804091 = r804085 / r804090;
double r804092 = r804084 / r804090;
double r804093 = b;
double r804094 = r804093 / r804090;
double r804095 = r804092 * r804094;
double r804096 = r804091 * r804095;
double r804097 = r804083 - r804096;
double r804098 = -2.5438150674675935e+164;
bool r804099 = r804080 <= r804098;
double r804100 = z;
double r804101 = r804100 - r804096;
double r804102 = -1.807389302035757e+81;
bool r804103 = r804080 <= r804102;
double r804104 = r804090 * r804090;
double r804105 = r804080 / r804104;
double r804106 = r804105 * r804094;
double r804107 = r804083 - r804106;
double r804108 = 9.184301226902076e+57;
bool r804109 = r804080 <= r804108;
double r804110 = r804086 + r804080;
double r804111 = r804087 + r804080;
double r804112 = r804111 * r804083;
double r804113 = fma(r804110, r804100, r804112);
double r804114 = 1.0;
double r804115 = r804113 / r804114;
double r804116 = r804114 / r804089;
double r804117 = r804115 * r804116;
double r804118 = r804080 * r804093;
double r804119 = r804118 / r804089;
double r804120 = r804117 - r804119;
double r804121 = r804109 ? r804120 : r804101;
double r804122 = r804103 ? r804107 : r804121;
double r804123 = r804099 ? r804101 : r804122;
double r804124 = r804082 ? r804097 : r804123;
return r804124;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b
| Original | 27.0 |
|---|---|
| Target | 11.7 |
| Herbie | 20.0 |
if y < -1.6180785068215594e+233Initial program 52.7
rmApplied div-sub52.7
Simplified52.7
rmApplied add-cube-cbrt52.7
Applied times-frac42.4
rmApplied add-cube-cbrt42.3
Applied times-frac42.3
Applied associate-*l*42.3
Taylor expanded around 0 22.9
if -1.6180785068215594e+233 < y < -2.5438150674675935e+164 or 9.184301226902076e+57 < y Initial program 42.9
rmApplied div-sub42.9
Simplified42.9
rmApplied add-cube-cbrt43.0
Applied times-frac34.5
rmApplied add-cube-cbrt34.4
Applied times-frac34.4
Applied associate-*l*34.4
Taylor expanded around inf 25.8
if -2.5438150674675935e+164 < y < -1.807389302035757e+81Initial program 34.5
rmApplied div-sub34.5
Simplified34.5
rmApplied add-cube-cbrt34.7
Applied times-frac26.5
Taylor expanded around 0 25.0
if -1.807389302035757e+81 < y < 9.184301226902076e+57Initial program 16.7
rmApplied div-sub16.7
Simplified16.7
rmApplied div-inv16.8
Final simplification20.0
herbie shell --seed 2020033 +o rules:numerics
(FPCore (x y z t a b)
:name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
:precision binary64
:herbie-target
(if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3.5813117084150564e+153) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 1.2285964308315609e+82) (/ 1 (/ (+ (+ x t) y) (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))) (- (+ z a) b)))
(/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))