\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 r886061 = x;
double r886062 = y;
double r886063 = r886061 + r886062;
double r886064 = z;
double r886065 = r886063 * r886064;
double r886066 = t;
double r886067 = r886066 + r886062;
double r886068 = a;
double r886069 = r886067 * r886068;
double r886070 = r886065 + r886069;
double r886071 = b;
double r886072 = r886062 * r886071;
double r886073 = r886070 - r886072;
double r886074 = r886061 + r886066;
double r886075 = r886074 + r886062;
double r886076 = r886073 / r886075;
return r886076;
}
double f(double x, double y, double z, double t, double a, double b) {
double r886077 = x;
double r886078 = -1.510420172746674e+171;
bool r886079 = r886077 <= r886078;
double r886080 = z;
double r886081 = y;
double r886082 = t;
double r886083 = r886077 + r886082;
double r886084 = r886083 + r886081;
double r886085 = b;
double r886086 = r886084 / r886085;
double r886087 = r886081 / r886086;
double r886088 = r886080 - r886087;
double r886089 = -1.5070868377098019e+134;
bool r886090 = r886077 <= r886089;
double r886091 = 1.0;
double r886092 = r886077 + r886081;
double r886093 = r886092 * r886080;
double r886094 = r886082 + r886081;
double r886095 = a;
double r886096 = r886094 * r886095;
double r886097 = r886093 + r886096;
double r886098 = r886084 / r886097;
double r886099 = r886091 / r886098;
double r886100 = r886099 - r886087;
double r886101 = -485115.4001107813;
bool r886102 = r886077 <= r886101;
double r886103 = -6.687658727110805e-170;
bool r886104 = r886077 <= r886103;
double r886105 = r886085 / r886084;
double r886106 = r886081 * r886105;
double r886107 = r886095 - r886106;
double r886108 = -2.8607533668137723e-271;
bool r886109 = r886077 <= r886108;
double r886110 = r886091 / r886084;
double r886111 = r886081 * r886085;
double r886112 = r886097 - r886111;
double r886113 = r886110 * r886112;
double r886114 = 6.764295827651096e-203;
bool r886115 = r886077 <= r886114;
double r886116 = 9.710984417321525e+230;
bool r886117 = r886077 <= r886116;
double r886118 = r886097 / r886084;
double r886119 = r886118 - r886106;
double r886120 = r886117 ? r886119 : r886088;
double r886121 = r886115 ? r886107 : r886120;
double r886122 = r886109 ? r886113 : r886121;
double r886123 = r886104 ? r886107 : r886122;
double r886124 = r886102 ? r886088 : r886123;
double r886125 = r886090 ? r886100 : r886124;
double r886126 = r886079 ? r886088 : r886125;
return r886126;
}




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