\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 -4.3473990959534402764208566333360926031 \cdot 10^{77} \lor \neg \left(a \le -3.937317057993329361148574628999906763686 \cdot 10^{-300}\right) \land \left(a \le 7.190504744030888873233099096412658089532 \cdot 10^{-167} \lor \neg \left(a \le 639976741042962656679682639921152\right)\right):\\
\;\;\;\;\left(z + a\right) - \frac{b}{y + \left(t + x\right)} \cdot y\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x + y\right) \cdot z + a \cdot \left(y + t\right)}{x + \left(y + t\right)} - \frac{1}{\frac{y + \left(t + x\right)}{y}} \cdot b\\
\end{array}double f(double x, double y, double z, double t, double a, double b) {
double r751014 = x;
double r751015 = y;
double r751016 = r751014 + r751015;
double r751017 = z;
double r751018 = r751016 * r751017;
double r751019 = t;
double r751020 = r751019 + r751015;
double r751021 = a;
double r751022 = r751020 * r751021;
double r751023 = r751018 + r751022;
double r751024 = b;
double r751025 = r751015 * r751024;
double r751026 = r751023 - r751025;
double r751027 = r751014 + r751019;
double r751028 = r751027 + r751015;
double r751029 = r751026 / r751028;
return r751029;
}
double f(double x, double y, double z, double t, double a, double b) {
double r751030 = a;
double r751031 = -4.3473990959534403e+77;
bool r751032 = r751030 <= r751031;
double r751033 = -3.9373170579933294e-300;
bool r751034 = r751030 <= r751033;
double r751035 = !r751034;
double r751036 = 7.190504744030889e-167;
bool r751037 = r751030 <= r751036;
double r751038 = 6.3997674104296266e+32;
bool r751039 = r751030 <= r751038;
double r751040 = !r751039;
bool r751041 = r751037 || r751040;
bool r751042 = r751035 && r751041;
bool r751043 = r751032 || r751042;
double r751044 = z;
double r751045 = r751044 + r751030;
double r751046 = b;
double r751047 = y;
double r751048 = t;
double r751049 = x;
double r751050 = r751048 + r751049;
double r751051 = r751047 + r751050;
double r751052 = r751046 / r751051;
double r751053 = r751052 * r751047;
double r751054 = r751045 - r751053;
double r751055 = r751049 + r751047;
double r751056 = r751055 * r751044;
double r751057 = r751047 + r751048;
double r751058 = r751030 * r751057;
double r751059 = r751056 + r751058;
double r751060 = r751049 + r751057;
double r751061 = r751059 / r751060;
double r751062 = 1.0;
double r751063 = r751051 / r751047;
double r751064 = r751062 / r751063;
double r751065 = r751064 * r751046;
double r751066 = r751061 - r751065;
double r751067 = r751043 ? r751054 : r751066;
return r751067;
}




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.5 |
|---|---|
| Target | 11.0 |
| Herbie | 18.0 |
if a < -4.3473990959534403e+77 or -3.9373170579933294e-300 < a < 7.190504744030889e-167 or 6.3997674104296266e+32 < a Initial program 33.2
rmApplied div-sub33.2
Simplified33.2
Simplified31.6
Taylor expanded around inf 19.9
rmApplied *-un-lft-identity19.9
Applied *-un-lft-identity19.9
Applied times-frac19.9
Applied *-un-lft-identity19.9
Applied times-frac19.9
Simplified19.9
Simplified20.7
if -4.3473990959534403e+77 < a < -3.9373170579933294e-300 or 7.190504744030889e-167 < a < 6.3997674104296266e+32Initial program 19.0
rmApplied div-sub19.0
Simplified19.0
Simplified14.8
rmApplied div-inv14.8
Simplified14.8
Final simplification18.0
herbie shell --seed 2019194
(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)))