\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.51042017274667401 \cdot 10^{171}:\\
\;\;\;\;z - \frac{y}{\frac{\left(x + t\right) + y}{b}}\\
\mathbf{elif}\;x \le -1.50708683770980189 \cdot 10^{134}:\\
\;\;\;\;\frac{1}{\frac{\left(x + t\right) + y}{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}} - \frac{y}{\frac{\left(x + t\right) + y}{b}}\\
\mathbf{elif}\;x \le -485115.40011078131:\\
\;\;\;\;z - \frac{y}{\frac{\left(x + t\right) + y}{b}}\\
\mathbf{elif}\;x \le -6.6876587271108054 \cdot 10^{-170}:\\
\;\;\;\;a - y \cdot \frac{b}{\left(x + t\right) + y}\\
\mathbf{elif}\;x \le -2.860753366813772 \cdot 10^{-271}:\\
\;\;\;\;\frac{1}{\left(x + t\right) + y} \cdot \left(\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\right)\\
\mathbf{elif}\;x \le 6.7642958276510964 \cdot 10^{-203}:\\
\;\;\;\;a - y \cdot \frac{b}{\left(x + t\right) + y}\\
\mathbf{elif}\;x \le 9.7109844173215245 \cdot 10^{230}:\\
\;\;\;\;\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - y \cdot \frac{b}{\left(x + t\right) + y}\\
\mathbf{else}:\\
\;\;\;\;z - \frac{y}{\frac{\left(x + t\right) + y}{b}}\\
\end{array}double f(double x, double y, double z, double t, double a, double b) {
double r979622 = x;
double r979623 = y;
double r979624 = r979622 + r979623;
double r979625 = z;
double r979626 = r979624 * r979625;
double r979627 = t;
double r979628 = r979627 + r979623;
double r979629 = a;
double r979630 = r979628 * r979629;
double r979631 = r979626 + r979630;
double r979632 = b;
double r979633 = r979623 * r979632;
double r979634 = r979631 - r979633;
double r979635 = r979622 + r979627;
double r979636 = r979635 + r979623;
double r979637 = r979634 / r979636;
return r979637;
}
double f(double x, double y, double z, double t, double a, double b) {
double r979638 = x;
double r979639 = -1.510420172746674e+171;
bool r979640 = r979638 <= r979639;
double r979641 = z;
double r979642 = y;
double r979643 = t;
double r979644 = r979638 + r979643;
double r979645 = r979644 + r979642;
double r979646 = b;
double r979647 = r979645 / r979646;
double r979648 = r979642 / r979647;
double r979649 = r979641 - r979648;
double r979650 = -1.5070868377098019e+134;
bool r979651 = r979638 <= r979650;
double r979652 = 1.0;
double r979653 = r979638 + r979642;
double r979654 = r979653 * r979641;
double r979655 = r979643 + r979642;
double r979656 = a;
double r979657 = r979655 * r979656;
double r979658 = r979654 + r979657;
double r979659 = r979645 / r979658;
double r979660 = r979652 / r979659;
double r979661 = r979660 - r979648;
double r979662 = -485115.4001107813;
bool r979663 = r979638 <= r979662;
double r979664 = -6.687658727110805e-170;
bool r979665 = r979638 <= r979664;
double r979666 = r979646 / r979645;
double r979667 = r979642 * r979666;
double r979668 = r979656 - r979667;
double r979669 = -2.8607533668137723e-271;
bool r979670 = r979638 <= r979669;
double r979671 = r979652 / r979645;
double r979672 = r979642 * r979646;
double r979673 = r979658 - r979672;
double r979674 = r979671 * r979673;
double r979675 = 6.764295827651096e-203;
bool r979676 = r979638 <= r979675;
double r979677 = 9.710984417321525e+230;
bool r979678 = r979638 <= r979677;
double r979679 = r979658 / r979645;
double r979680 = r979679 - r979667;
double r979681 = r979678 ? r979680 : r979649;
double r979682 = r979676 ? r979668 : r979681;
double r979683 = r979670 ? r979674 : r979682;
double r979684 = r979665 ? r979668 : r979683;
double r979685 = r979663 ? r979649 : r979684;
double r979686 = r979651 ? r979661 : r979685;
double r979687 = r979640 ? r979649 : r979686;
return r979687;
}




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.8 |
|---|---|
| Target | 10.8 |
| Herbie | 23.1 |
if x < -1.510420172746674e+171 or -1.5070868377098019e+134 < x < -485115.4001107813 or 9.710984417321525e+230 < x Initial program 33.1
rmApplied div-sub33.1
rmApplied associate-/l*30.2
Taylor expanded around inf 23.8
if -1.510420172746674e+171 < x < -1.5070868377098019e+134Initial program 31.7
rmApplied div-sub31.7
rmApplied associate-/l*29.2
rmApplied clear-num29.2
if -485115.4001107813 < x < -6.687658727110805e-170 or -2.8607533668137723e-271 < x < 6.764295827651096e-203Initial program 23.6
rmApplied div-sub23.6
rmApplied *-un-lft-identity23.6
Applied times-frac22.2
Simplified22.2
Taylor expanded around 0 22.6
if -6.687658727110805e-170 < x < -2.8607533668137723e-271Initial program 21.0
rmApplied div-sub21.0
rmApplied div-inv21.0
Applied div-inv21.1
Applied distribute-rgt-out--21.1
if 6.764295827651096e-203 < x < 9.710984417321525e+230Initial program 25.0
rmApplied div-sub25.0
rmApplied *-un-lft-identity25.0
Applied times-frac22.9
Simplified22.9
Final simplification23.1
herbie shell --seed 2020060
(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)))