\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 -1.54343324341211138 \cdot 10^{134}:\\
\;\;\;\;a - \frac{y}{\left(x + t\right) + y} \cdot b\\
\mathbf{elif}\;a \le -2.2002211606234215 \cdot 10^{-41}:\\
\;\;\;\;\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) \cdot \frac{1}{\left(x + t\right) + y} - \frac{y}{\left(x + t\right) + y} \cdot b\\
\mathbf{elif}\;a \le 5.11049872831381705 \cdot 10^{-217}:\\
\;\;\;\;z - \frac{y}{\left(x + t\right) + y} \cdot b\\
\mathbf{elif}\;a \le 1.43065941407828646 \cdot 10^{-141}:\\
\;\;\;\;\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) \cdot \frac{1}{\left(x + t\right) + y} - \frac{y}{\left(x + t\right) + y} \cdot b\\
\mathbf{elif}\;a \le 2.49584360300908932 \cdot 10^{-100}:\\
\;\;\;\;z - \frac{y}{\left(x + t\right) + y} \cdot b\\
\mathbf{elif}\;a \le 7.0170355788870731 \cdot 10^{30}:\\
\;\;\;\;\frac{\left(\sqrt[3]{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b} \cdot \sqrt[3]{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}\right) \cdot \sqrt[3]{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}}{\left(x + t\right) + y}\\
\mathbf{else}:\\
\;\;\;\;a - \frac{y}{\left(x + t\right) + y} \cdot b\\
\end{array}double f(double x, double y, double z, double t, double a, double b) {
double r1037419 = x;
double r1037420 = y;
double r1037421 = r1037419 + r1037420;
double r1037422 = z;
double r1037423 = r1037421 * r1037422;
double r1037424 = t;
double r1037425 = r1037424 + r1037420;
double r1037426 = a;
double r1037427 = r1037425 * r1037426;
double r1037428 = r1037423 + r1037427;
double r1037429 = b;
double r1037430 = r1037420 * r1037429;
double r1037431 = r1037428 - r1037430;
double r1037432 = r1037419 + r1037424;
double r1037433 = r1037432 + r1037420;
double r1037434 = r1037431 / r1037433;
return r1037434;
}
double f(double x, double y, double z, double t, double a, double b) {
double r1037435 = a;
double r1037436 = -1.5434332434121114e+134;
bool r1037437 = r1037435 <= r1037436;
double r1037438 = y;
double r1037439 = x;
double r1037440 = t;
double r1037441 = r1037439 + r1037440;
double r1037442 = r1037441 + r1037438;
double r1037443 = r1037438 / r1037442;
double r1037444 = b;
double r1037445 = r1037443 * r1037444;
double r1037446 = r1037435 - r1037445;
double r1037447 = -2.2002211606234215e-41;
bool r1037448 = r1037435 <= r1037447;
double r1037449 = r1037439 + r1037438;
double r1037450 = z;
double r1037451 = r1037449 * r1037450;
double r1037452 = r1037440 + r1037438;
double r1037453 = r1037452 * r1037435;
double r1037454 = r1037451 + r1037453;
double r1037455 = 1.0;
double r1037456 = r1037455 / r1037442;
double r1037457 = r1037454 * r1037456;
double r1037458 = r1037457 - r1037445;
double r1037459 = 5.110498728313817e-217;
bool r1037460 = r1037435 <= r1037459;
double r1037461 = r1037450 - r1037445;
double r1037462 = 1.4306594140782865e-141;
bool r1037463 = r1037435 <= r1037462;
double r1037464 = 2.4958436030090893e-100;
bool r1037465 = r1037435 <= r1037464;
double r1037466 = 7.017035578887073e+30;
bool r1037467 = r1037435 <= r1037466;
double r1037468 = r1037438 * r1037444;
double r1037469 = r1037454 - r1037468;
double r1037470 = cbrt(r1037469);
double r1037471 = r1037470 * r1037470;
double r1037472 = r1037471 * r1037470;
double r1037473 = r1037472 / r1037442;
double r1037474 = r1037467 ? r1037473 : r1037446;
double r1037475 = r1037465 ? r1037461 : r1037474;
double r1037476 = r1037463 ? r1037458 : r1037475;
double r1037477 = r1037460 ? r1037461 : r1037476;
double r1037478 = r1037448 ? r1037458 : r1037477;
double r1037479 = r1037437 ? r1037446 : r1037478;
return r1037479;
}




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.0 |
|---|---|
| Target | 11.4 |
| Herbie | 20.9 |
if a < -1.5434332434121114e+134 or 7.017035578887073e+30 < a Initial program 39.2
rmApplied div-sub39.2
rmApplied associate-/l*39.1
rmApplied associate-/r/38.3
Taylor expanded around 0 24.6
if -1.5434332434121114e+134 < a < -2.2002211606234215e-41 or 5.110498728313817e-217 < a < 1.4306594140782865e-141Initial program 22.1
rmApplied div-sub22.1
rmApplied associate-/l*18.8
rmApplied associate-/r/18.1
rmApplied div-inv18.2
if -2.2002211606234215e-41 < a < 5.110498728313817e-217 or 1.4306594140782865e-141 < a < 2.4958436030090893e-100Initial program 19.0
rmApplied div-sub19.0
rmApplied associate-/l*15.9
rmApplied associate-/r/14.8
Taylor expanded around inf 18.7
if 2.4958436030090893e-100 < a < 7.017035578887073e+30Initial program 19.8
rmApplied add-cube-cbrt20.6
Final simplification20.9
herbie shell --seed 2020065
(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)))