\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 r573836 = x;
double r573837 = y;
double r573838 = r573836 + r573837;
double r573839 = z;
double r573840 = r573838 * r573839;
double r573841 = t;
double r573842 = r573841 + r573837;
double r573843 = a;
double r573844 = r573842 * r573843;
double r573845 = r573840 + r573844;
double r573846 = b;
double r573847 = r573837 * r573846;
double r573848 = r573845 - r573847;
double r573849 = r573836 + r573841;
double r573850 = r573849 + r573837;
double r573851 = r573848 / r573850;
return r573851;
}
double f(double x, double y, double z, double t, double a, double b) {
double r573852 = x;
double r573853 = -1.343517699116082e+182;
bool r573854 = r573852 <= r573853;
double r573855 = z;
double r573856 = y;
double r573857 = b;
double r573858 = t;
double r573859 = r573852 + r573858;
double r573860 = r573859 + r573856;
double r573861 = r573857 / r573860;
double r573862 = r573856 * r573861;
double r573863 = r573855 - r573862;
double r573864 = -1.3750283862412348e-50;
bool r573865 = r573852 <= r573864;
double r573866 = r573852 + r573856;
double r573867 = r573866 * r573855;
double r573868 = r573858 + r573856;
double r573869 = a;
double r573870 = r573868 * r573869;
double r573871 = r573867 + r573870;
double r573872 = r573871 / r573860;
double r573873 = r573860 / r573857;
double r573874 = r573856 / r573873;
double r573875 = r573872 - r573874;
double r573876 = -1.1186437150469275e-149;
bool r573877 = r573852 <= r573876;
double r573878 = r573869 - r573862;
double r573879 = -1.1697432588930248e-281;
bool r573880 = r573852 <= r573879;
double r573881 = r573856 / r573860;
double r573882 = 1.0;
double r573883 = r573882 / r573857;
double r573884 = r573881 / r573883;
double r573885 = r573872 - r573884;
double r573886 = 1.1109812864093013e-125;
bool r573887 = r573852 <= r573886;
double r573888 = 7.771333049681688e+171;
bool r573889 = r573852 <= r573888;
double r573890 = r573860 / r573871;
double r573891 = r573882 / r573890;
double r573892 = r573891 - r573862;
double r573893 = r573889 ? r573892 : r573863;
double r573894 = r573887 ? r573878 : r573893;
double r573895 = r573880 ? r573885 : r573894;
double r573896 = r573877 ? r573878 : r573895;
double r573897 = r573865 ? r573875 : r573896;
double r573898 = r573854 ? r573863 : r573897;
return r573898;
}




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.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)))