\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}\;a \le -1.686294910857727603853458927660821310409 \cdot 10^{187}:\\
\;\;\;\;a - \frac{y}{t + \left(x + y\right)} \cdot b\\
\mathbf{elif}\;a \le -249617.478927284828387200832366943359375:\\
\;\;\;\;z - \frac{y}{t + \left(x + y\right)} \cdot b\\
\mathbf{elif}\;a \le -2.54215477075563535815847022596895949797 \cdot 10^{-219}:\\
\;\;\;\;\frac{z \cdot \left(x + y\right) + \left(t + y\right) \cdot a}{t + \left(x + y\right)} - b \cdot \left(y \cdot \frac{1}{t + \left(x + y\right)}\right)\\
\mathbf{elif}\;a \le 3.942386611488526229797254315468748666486 \cdot 10^{-178}:\\
\;\;\;\;z - \frac{y}{t + \left(x + y\right)} \cdot b\\
\mathbf{elif}\;a \le 8.407686055131771870633666134478145741125 \cdot 10^{70}:\\
\;\;\;\;\frac{z \cdot \left(x + y\right) + \left(t + y\right) \cdot a}{t + \left(x + y\right)} - b \cdot \left(y \cdot \frac{1}{t + \left(x + y\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;a - \frac{y}{t + \left(x + y\right)} \cdot b\\
\end{array}double f(double x, double y, double z, double t, double a, double b) {
double r39550567 = x;
double r39550568 = y;
double r39550569 = r39550567 + r39550568;
double r39550570 = z;
double r39550571 = r39550569 * r39550570;
double r39550572 = t;
double r39550573 = r39550572 + r39550568;
double r39550574 = a;
double r39550575 = r39550573 * r39550574;
double r39550576 = r39550571 + r39550575;
double r39550577 = b;
double r39550578 = r39550568 * r39550577;
double r39550579 = r39550576 - r39550578;
double r39550580 = r39550567 + r39550572;
double r39550581 = r39550580 + r39550568;
double r39550582 = r39550579 / r39550581;
return r39550582;
}
double f(double x, double y, double z, double t, double a, double b) {
double r39550583 = a;
double r39550584 = -1.6862949108577276e+187;
bool r39550585 = r39550583 <= r39550584;
double r39550586 = y;
double r39550587 = t;
double r39550588 = x;
double r39550589 = r39550588 + r39550586;
double r39550590 = r39550587 + r39550589;
double r39550591 = r39550586 / r39550590;
double r39550592 = b;
double r39550593 = r39550591 * r39550592;
double r39550594 = r39550583 - r39550593;
double r39550595 = -249617.47892728483;
bool r39550596 = r39550583 <= r39550595;
double r39550597 = z;
double r39550598 = r39550597 - r39550593;
double r39550599 = -2.5421547707556354e-219;
bool r39550600 = r39550583 <= r39550599;
double r39550601 = r39550597 * r39550589;
double r39550602 = r39550587 + r39550586;
double r39550603 = r39550602 * r39550583;
double r39550604 = r39550601 + r39550603;
double r39550605 = r39550604 / r39550590;
double r39550606 = 1.0;
double r39550607 = r39550606 / r39550590;
double r39550608 = r39550586 * r39550607;
double r39550609 = r39550592 * r39550608;
double r39550610 = r39550605 - r39550609;
double r39550611 = 3.942386611488526e-178;
bool r39550612 = r39550583 <= r39550611;
double r39550613 = 8.407686055131772e+70;
bool r39550614 = r39550583 <= r39550613;
double r39550615 = r39550614 ? r39550610 : r39550594;
double r39550616 = r39550612 ? r39550598 : r39550615;
double r39550617 = r39550600 ? r39550610 : r39550616;
double r39550618 = r39550596 ? r39550598 : r39550617;
double r39550619 = r39550585 ? r39550594 : r39550618;
return r39550619;
}




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 | 26.7 |
|---|---|
| Target | 11.1 |
| Herbie | 20.9 |
if a < -1.6862949108577276e+187 or 8.407686055131772e+70 < a Initial program 40.4
Simplified40.4
rmApplied div-sub40.4
rmApplied *-un-lft-identity40.4
Applied times-frac39.9
Simplified39.9
Taylor expanded around 0 24.4
if -1.6862949108577276e+187 < a < -249617.47892728483 or -2.5421547707556354e-219 < a < 3.942386611488526e-178Initial program 23.7
Simplified23.7
rmApplied div-sub23.7
rmApplied *-un-lft-identity23.7
Applied times-frac20.3
Simplified20.3
Taylor expanded around inf 25.3
if -249617.47892728483 < a < -2.5421547707556354e-219 or 3.942386611488526e-178 < a < 8.407686055131772e+70Initial program 18.8
Simplified18.8
rmApplied div-sub18.8
rmApplied *-un-lft-identity18.8
Applied times-frac14.5
Simplified14.5
rmApplied div-inv14.6
Final simplification20.9
herbie shell --seed 2019200
(FPCore (x y z t a b)
:name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
: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.0 (/ (+ (+ 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)))