\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 -3.12495672458883210417207757793916938863 \cdot 10^{156}:\\
\;\;\;\;a - \frac{y}{\frac{\left(x + t\right) + y}{b}}\\
\mathbf{elif}\;t \le -6.589405087646145397545694463395646896475 \cdot 10^{-131}:\\
\;\;\;\;\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{elif}\;t \le -2.095166956824710074308713944918965338146 \cdot 10^{-265}:\\
\;\;\;\;z - y \cdot \frac{b}{\left(x + t\right) + y}\\
\mathbf{elif}\;t \le 2.208162098301683464952756427531284480568 \cdot 10^{-299}:\\
\;\;\;\;\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{elif}\;t \le 1.960478203321101005662703242780071695101 \cdot 10^{-101}:\\
\;\;\;\;z - y \cdot \frac{b}{\left(x + t\right) + y}\\
\mathbf{elif}\;t \le 7.362253523808575540220361610688922740015 \cdot 10^{167}:\\
\;\;\;\;\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}:\\
\;\;\;\;a - \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 r145814736 = x;
double r145814737 = y;
double r145814738 = r145814736 + r145814737;
double r145814739 = z;
double r145814740 = r145814738 * r145814739;
double r145814741 = t;
double r145814742 = r145814741 + r145814737;
double r145814743 = a;
double r145814744 = r145814742 * r145814743;
double r145814745 = r145814740 + r145814744;
double r145814746 = b;
double r145814747 = r145814737 * r145814746;
double r145814748 = r145814745 - r145814747;
double r145814749 = r145814736 + r145814741;
double r145814750 = r145814749 + r145814737;
double r145814751 = r145814748 / r145814750;
return r145814751;
}
double f(double x, double y, double z, double t, double a, double b) {
double r145814752 = t;
double r145814753 = -3.124956724588832e+156;
bool r145814754 = r145814752 <= r145814753;
double r145814755 = a;
double r145814756 = y;
double r145814757 = x;
double r145814758 = r145814757 + r145814752;
double r145814759 = r145814758 + r145814756;
double r145814760 = b;
double r145814761 = r145814759 / r145814760;
double r145814762 = r145814756 / r145814761;
double r145814763 = r145814755 - r145814762;
double r145814764 = -6.589405087646145e-131;
bool r145814765 = r145814752 <= r145814764;
double r145814766 = 1.0;
double r145814767 = r145814757 + r145814756;
double r145814768 = z;
double r145814769 = r145814767 * r145814768;
double r145814770 = r145814752 + r145814756;
double r145814771 = r145814770 * r145814755;
double r145814772 = r145814769 + r145814771;
double r145814773 = r145814759 / r145814772;
double r145814774 = r145814766 / r145814773;
double r145814775 = r145814760 / r145814759;
double r145814776 = r145814756 * r145814775;
double r145814777 = r145814774 - r145814776;
double r145814778 = -2.09516695682471e-265;
bool r145814779 = r145814752 <= r145814778;
double r145814780 = r145814768 - r145814776;
double r145814781 = 2.2081620983016835e-299;
bool r145814782 = r145814752 <= r145814781;
double r145814783 = 1.960478203321101e-101;
bool r145814784 = r145814752 <= r145814783;
double r145814785 = 7.362253523808576e+167;
bool r145814786 = r145814752 <= r145814785;
double r145814787 = r145814786 ? r145814777 : r145814763;
double r145814788 = r145814784 ? r145814780 : r145814787;
double r145814789 = r145814782 ? r145814777 : r145814788;
double r145814790 = r145814779 ? r145814780 : r145814789;
double r145814791 = r145814765 ? r145814777 : r145814790;
double r145814792 = r145814754 ? r145814763 : r145814791;
return r145814792;
}




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.5 |
| Herbie | 20.8 |
if t < -3.124956724588832e+156 or 7.362253523808576e+167 < t Initial program 37.9
rmApplied div-sub37.9
rmApplied associate-/l*35.1
Taylor expanded around 0 19.9
if -3.124956724588832e+156 < t < -6.589405087646145e-131 or -2.09516695682471e-265 < t < 2.2081620983016835e-299 or 1.960478203321101e-101 < t < 7.362253523808576e+167Initial program 23.8
rmApplied div-sub23.8
rmApplied *-un-lft-identity23.8
Applied times-frac21.2
Simplified21.2
rmApplied clear-num21.3
if -6.589405087646145e-131 < t < -2.09516695682471e-265 or 2.2081620983016835e-299 < t < 1.960478203321101e-101Initial program 22.3
rmApplied div-sub22.3
rmApplied *-un-lft-identity22.3
Applied times-frac21.3
Simplified21.3
Taylor expanded around inf 20.6
Final simplification20.8
herbie shell --seed 2019173
(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)))