\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{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\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{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\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}{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}} - 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 r815526 = x;
double r815527 = y;
double r815528 = r815526 + r815527;
double r815529 = z;
double r815530 = r815528 * r815529;
double r815531 = t;
double r815532 = r815531 + r815527;
double r815533 = a;
double r815534 = r815532 * r815533;
double r815535 = r815530 + r815534;
double r815536 = b;
double r815537 = r815527 * r815536;
double r815538 = r815535 - r815537;
double r815539 = r815526 + r815531;
double r815540 = r815539 + r815527;
double r815541 = r815538 / r815540;
return r815541;
}
double f(double x, double y, double z, double t, double a, double b) {
double r815542 = x;
double r815543 = -1.343517699116082e+182;
bool r815544 = r815542 <= r815543;
double r815545 = z;
double r815546 = y;
double r815547 = b;
double r815548 = t;
double r815549 = r815542 + r815548;
double r815550 = r815549 + r815546;
double r815551 = r815547 / r815550;
double r815552 = r815546 * r815551;
double r815553 = r815545 - r815552;
double r815554 = -1.3750283862412348e-50;
bool r815555 = r815542 <= r815554;
double r815556 = r815542 + r815546;
double r815557 = r815556 * r815545;
double r815558 = r815548 + r815546;
double r815559 = a;
double r815560 = r815558 * r815559;
double r815561 = r815557 + r815560;
double r815562 = r815561 / r815550;
double r815563 = r815550 / r815547;
double r815564 = r815546 / r815563;
double r815565 = r815562 - r815564;
double r815566 = -1.1186437150469275e-149;
bool r815567 = r815542 <= r815566;
double r815568 = r815559 - r815552;
double r815569 = -1.1697432588930248e-281;
bool r815570 = r815542 <= r815569;
double r815571 = r815546 / r815550;
double r815572 = 1.0;
double r815573 = r815572 / r815547;
double r815574 = r815571 / r815573;
double r815575 = r815562 - r815574;
double r815576 = 1.1109812864093013e-125;
bool r815577 = r815542 <= r815576;
double r815578 = 7.771333049681688e+171;
bool r815579 = r815542 <= r815578;
double r815580 = r815550 / r815561;
double r815581 = r815572 / r815580;
double r815582 = r815581 - r815552;
double r815583 = r815579 ? r815582 : r815553;
double r815584 = r815577 ? r815568 : r815583;
double r815585 = r815570 ? r815575 : r815584;
double r815586 = r815567 ? r815568 : r815585;
double r815587 = r815555 ? r815565 : r815586;
double r815588 = r815544 ? r815553 : r815587;
return r815588;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b
Results
| 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
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
rmApplied associate-/l*23.4
if -1.3750283862412348e-50 < x < -1.1186437150469275e-149 or -1.1697432588930248e-281 < x < 1.1109812864093013e-125Initial program 24.0
rmApplied div-sub24.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
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
rmApplied *-un-lft-identity23.6
Applied times-frac21.1
Simplified21.1
rmApplied clear-num21.2
Final simplification21.3
herbie shell --seed 2019322
(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.5813117084150564e153) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 1.2285964308315609e82) (/ 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)))