\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}\;x \le -1.343517699116082085988013028938453324825 \cdot 10^{182}:\\
\;\;\;\;z - y \cdot \frac{b}{\left(x + t\right) + y}\\
\mathbf{elif}\;x \le -1.375028386241234800074588117756530326546 \cdot 10^{-50}:\\
\;\;\;\;\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}\;x \le -1.118643715046927542610803400339886881246 \cdot 10^{-149}:\\
\;\;\;\;a - y \cdot \frac{b}{\left(x + t\right) + y}\\
\mathbf{elif}\;x \le -1.16974325889302484717093484562260440578 \cdot 10^{-281}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x + y, z, \left(t + y\right) \cdot a\right)}{\left(x + t\right) + y} - \frac{\frac{y}{\left(x + t\right) + y}}{\frac{1}{b}}\\
\mathbf{elif}\;x \le 1.110981286409301297083753758046103104188 \cdot 10^{-125}:\\
\;\;\;\;a - y \cdot \frac{b}{\left(x + t\right) + y}\\
\mathbf{elif}\;x \le 7.771333049681687694819501234115560782491 \cdot 10^{171}:\\
\;\;\;\;\frac{1}{\frac{\left(x + t\right) + y}{\mathsf{fma}\left(x + y, z, \left(t + y\right) \cdot a\right)}} - y \cdot \frac{b}{\left(x + t\right) + y}\\
\mathbf{else}:\\
\;\;\;\;z - 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 r546293 = x;
double r546294 = y;
double r546295 = r546293 + r546294;
double r546296 = z;
double r546297 = r546295 * r546296;
double r546298 = t;
double r546299 = r546298 + r546294;
double r546300 = a;
double r546301 = r546299 * r546300;
double r546302 = r546297 + r546301;
double r546303 = b;
double r546304 = r546294 * r546303;
double r546305 = r546302 - r546304;
double r546306 = r546293 + r546298;
double r546307 = r546306 + r546294;
double r546308 = r546305 / r546307;
return r546308;
}
double f(double x, double y, double z, double t, double a, double b) {
double r546309 = x;
double r546310 = -1.343517699116082e+182;
bool r546311 = r546309 <= r546310;
double r546312 = z;
double r546313 = y;
double r546314 = b;
double r546315 = t;
double r546316 = r546309 + r546315;
double r546317 = r546316 + r546313;
double r546318 = r546314 / r546317;
double r546319 = r546313 * r546318;
double r546320 = r546312 - r546319;
double r546321 = -1.3750283862412348e-50;
bool r546322 = r546309 <= r546321;
double r546323 = r546309 + r546313;
double r546324 = r546315 + r546313;
double r546325 = a;
double r546326 = r546324 * r546325;
double r546327 = fma(r546323, r546312, r546326);
double r546328 = r546327 / r546317;
double r546329 = r546317 / r546314;
double r546330 = r546313 / r546329;
double r546331 = r546328 - r546330;
double r546332 = -1.1186437150469275e-149;
bool r546333 = r546309 <= r546332;
double r546334 = r546325 - r546319;
double r546335 = -1.1697432588930248e-281;
bool r546336 = r546309 <= r546335;
double r546337 = r546313 / r546317;
double r546338 = 1.0;
double r546339 = r546338 / r546314;
double r546340 = r546337 / r546339;
double r546341 = r546328 - r546340;
double r546342 = 1.1109812864093013e-125;
bool r546343 = r546309 <= r546342;
double r546344 = 7.771333049681688e+171;
bool r546345 = r546309 <= r546344;
double r546346 = r546317 / r546327;
double r546347 = r546338 / r546346;
double r546348 = r546347 - r546319;
double r546349 = r546345 ? r546348 : r546320;
double r546350 = r546343 ? r546334 : r546349;
double r546351 = r546336 ? r546341 : r546350;
double r546352 = r546333 ? r546334 : r546351;
double r546353 = r546322 ? r546331 : r546352;
double r546354 = r546311 ? r546320 : r546353;
return r546354;
}




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.2 |
|---|---|
| Target | 11.6 |
| Herbie | 21.3 |
if x < -1.343517699116082e+182 or 7.771333049681688e+171 < x Initial program 37.3
rmApplied div-sub37.3
Simplified37.3
rmApplied *-un-lft-identity37.3
Applied times-frac34.7
Simplified34.7
Taylor expanded around inf 20.8
if -1.343517699116082e+182 < x < -1.3750283862412348e-50Initial program 26.2
rmApplied div-sub26.2
Simplified26.2
rmApplied associate-/l*23.3
if -1.3750283862412348e-50 < x < -1.1186437150469275e-149 or -1.1697432588930248e-281 < x < 1.1109812864093013e-125Initial program 24.0
rmApplied div-sub24.0
Simplified24.0
rmApplied *-un-lft-identity24.0
Applied times-frac21.8
Simplified21.8
Taylor expanded around 0 21.0
if -1.1186437150469275e-149 < x < -1.1697432588930248e-281Initial program 23.3
rmApplied div-sub23.3
Simplified23.3
rmApplied associate-/l*22.4
rmApplied div-inv22.5
Applied associate-/r*19.7
if 1.1109812864093013e-125 < x < 7.771333049681688e+171Initial program 23.6
rmApplied div-sub23.6
Simplified23.6
rmApplied *-un-lft-identity23.6
Applied times-frac21.1
Simplified21.1
rmApplied clear-num21.2
Final simplification21.3
herbie shell --seed 2019322 +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)))