\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}\;t \le -1.25150232717518858 \cdot 10^{200}:\\
\;\;\;\;a - y \cdot \frac{b}{\left(x + t\right) + y}\\
\mathbf{elif}\;t \le -4.1840463071979065 \cdot 10^{-131}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x + y, z, \left(t + y\right) \cdot a\right)}{\left(x + t\right) + y} - \frac{y}{\frac{\left(x + t\right) + y}{b}}\\
\mathbf{elif}\;t \le 6.63565468032893206 \cdot 10^{-276}:\\
\;\;\;\;z - y \cdot \frac{b}{\left(x + t\right) + y}\\
\mathbf{elif}\;t \le 5.9747624034034444 \cdot 10^{-75}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x + y, z, \left(t + y\right) \cdot a\right)}{\left(x + t\right) + y} - \frac{y}{\frac{\left(x + t\right) + y}{b}}\\
\mathbf{elif}\;t \le 2.51319291468979468 \cdot 10^{-6}:\\
\;\;\;\;z - y \cdot \frac{b}{\left(x + t\right) + y}\\
\mathbf{elif}\;t \le 3.53162670404046633 \cdot 10^{64}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x + y, z, \left(t + y\right) \cdot a\right)}{\left(x + t\right) + y} - \frac{y}{\frac{\left(x + t\right) + y}{b}}\\
\mathbf{else}:\\
\;\;\;\;a - y \cdot \frac{b}{\left(x + t\right) + y}\\
\end{array}double f(double x, double y, double z, double t, double a, double b) {
double r817116 = x;
double r817117 = y;
double r817118 = r817116 + r817117;
double r817119 = z;
double r817120 = r817118 * r817119;
double r817121 = t;
double r817122 = r817121 + r817117;
double r817123 = a;
double r817124 = r817122 * r817123;
double r817125 = r817120 + r817124;
double r817126 = b;
double r817127 = r817117 * r817126;
double r817128 = r817125 - r817127;
double r817129 = r817116 + r817121;
double r817130 = r817129 + r817117;
double r817131 = r817128 / r817130;
return r817131;
}
double f(double x, double y, double z, double t, double a, double b) {
double r817132 = t;
double r817133 = -1.2515023271751886e+200;
bool r817134 = r817132 <= r817133;
double r817135 = a;
double r817136 = y;
double r817137 = b;
double r817138 = x;
double r817139 = r817138 + r817132;
double r817140 = r817139 + r817136;
double r817141 = r817137 / r817140;
double r817142 = r817136 * r817141;
double r817143 = r817135 - r817142;
double r817144 = -4.1840463071979065e-131;
bool r817145 = r817132 <= r817144;
double r817146 = r817138 + r817136;
double r817147 = z;
double r817148 = r817132 + r817136;
double r817149 = r817148 * r817135;
double r817150 = fma(r817146, r817147, r817149);
double r817151 = r817150 / r817140;
double r817152 = r817140 / r817137;
double r817153 = r817136 / r817152;
double r817154 = r817151 - r817153;
double r817155 = 6.635654680328932e-276;
bool r817156 = r817132 <= r817155;
double r817157 = r817147 - r817142;
double r817158 = 5.974762403403444e-75;
bool r817159 = r817132 <= r817158;
double r817160 = 2.5131929146897947e-06;
bool r817161 = r817132 <= r817160;
double r817162 = 3.5316267040404663e+64;
bool r817163 = r817132 <= r817162;
double r817164 = r817163 ? r817154 : r817143;
double r817165 = r817161 ? r817157 : r817164;
double r817166 = r817159 ? r817154 : r817165;
double r817167 = r817156 ? r817157 : r817166;
double r817168 = r817145 ? r817154 : r817167;
double r817169 = r817134 ? r817143 : r817168;
return r817169;
}




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 | 26.3 |
|---|---|
| Target | 11.3 |
| Herbie | 21.5 |
if t < -1.2515023271751886e+200 or 3.5316267040404663e+64 < t Initial program 34.6
rmApplied fma-def34.6
rmApplied div-sub34.6
rmApplied *-un-lft-identity34.6
Applied times-frac32.0
Simplified32.0
Taylor expanded around 0 21.5
if -1.2515023271751886e+200 < t < -4.1840463071979065e-131 or 6.635654680328932e-276 < t < 5.974762403403444e-75 or 2.5131929146897947e-06 < t < 3.5316267040404663e+64Initial program 23.7
rmApplied fma-def23.7
rmApplied div-sub23.7
rmApplied associate-/l*21.9
if -4.1840463071979065e-131 < t < 6.635654680328932e-276 or 5.974762403403444e-75 < t < 2.5131929146897947e-06Initial program 21.7
rmApplied fma-def21.7
rmApplied div-sub21.7
rmApplied *-un-lft-identity21.7
Applied times-frac20.2
Simplified20.2
Taylor expanded around inf 20.7
Final simplification21.5
herbie shell --seed 2020062 +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)))