\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}\;z \le -11807057696238675968:\\
\;\;\;\;z - \frac{y}{\frac{\left(x + t\right) + y}{b}}\\
\mathbf{elif}\;z \le -2.201752731199656916658222202068793830749 \cdot 10^{-249}:\\
\;\;\;\;\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) \cdot \frac{1}{\left(x + t\right) + y} - \frac{y}{\frac{\left(x + t\right) + y}{b}}\\
\mathbf{elif}\;z \le 1.425433211750613024926014778141499378436 \cdot 10^{-69}:\\
\;\;\;\;a - \frac{y}{\frac{\left(x + t\right) + y}{b}}\\
\mathbf{elif}\;z \le 2.119164531549616961423837193835311333795 \cdot 10^{105}:\\
\;\;\;\;\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \frac{y}{\left(x + t\right) + y} \cdot b\\
\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 r578948 = x;
double r578949 = y;
double r578950 = r578948 + r578949;
double r578951 = z;
double r578952 = r578950 * r578951;
double r578953 = t;
double r578954 = r578953 + r578949;
double r578955 = a;
double r578956 = r578954 * r578955;
double r578957 = r578952 + r578956;
double r578958 = b;
double r578959 = r578949 * r578958;
double r578960 = r578957 - r578959;
double r578961 = r578948 + r578953;
double r578962 = r578961 + r578949;
double r578963 = r578960 / r578962;
return r578963;
}
double f(double x, double y, double z, double t, double a, double b) {
double r578964 = z;
double r578965 = -1.1807057696238676e+19;
bool r578966 = r578964 <= r578965;
double r578967 = y;
double r578968 = x;
double r578969 = t;
double r578970 = r578968 + r578969;
double r578971 = r578970 + r578967;
double r578972 = b;
double r578973 = r578971 / r578972;
double r578974 = r578967 / r578973;
double r578975 = r578964 - r578974;
double r578976 = -2.201752731199657e-249;
bool r578977 = r578964 <= r578976;
double r578978 = r578968 + r578967;
double r578979 = r578978 * r578964;
double r578980 = r578969 + r578967;
double r578981 = a;
double r578982 = r578980 * r578981;
double r578983 = r578979 + r578982;
double r578984 = 1.0;
double r578985 = r578984 / r578971;
double r578986 = r578983 * r578985;
double r578987 = r578986 - r578974;
double r578988 = 1.425433211750613e-69;
bool r578989 = r578964 <= r578988;
double r578990 = r578981 - r578974;
double r578991 = 2.119164531549617e+105;
bool r578992 = r578964 <= r578991;
double r578993 = r578983 / r578971;
double r578994 = r578967 / r578971;
double r578995 = r578994 * r578972;
double r578996 = r578993 - r578995;
double r578997 = r578992 ? r578996 : r578975;
double r578998 = r578989 ? r578990 : r578997;
double r578999 = r578977 ? r578987 : r578998;
double r579000 = r578966 ? r578975 : r578999;
return r579000;
}




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 | 11.2 |
| Herbie | 21.3 |
if z < -1.1807057696238676e+19 or 2.119164531549617e+105 < z Initial program 37.0
rmApplied div-sub37.0
rmApplied associate-/l*36.6
Taylor expanded around inf 26.1
if -1.1807057696238676e+19 < z < -2.201752731199657e-249Initial program 19.4
rmApplied div-sub19.4
rmApplied associate-/l*15.1
rmApplied div-inv15.1
if -2.201752731199657e-249 < z < 1.425433211750613e-69Initial program 18.6
rmApplied div-sub18.6
rmApplied associate-/l*15.5
Taylor expanded around 0 19.6
if 1.425433211750613e-69 < z < 2.119164531549617e+105Initial program 23.8
rmApplied div-sub23.8
rmApplied associate-/l*21.3
rmApplied associate-/r/20.2
Final simplification21.3
herbie shell --seed 2019235
(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)))