\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}\;y \le -1.080685072695562236595787579237443788954 \cdot 10^{214}:\\
\;\;\;\;z - \frac{y}{\left(x + t\right) + y} \cdot b\\
\mathbf{elif}\;y \le -1.9770205152967976990982926348554284473 \cdot 10^{65}:\\
\;\;\;\;a - \frac{y}{\left(x + t\right) + y} \cdot b\\
\mathbf{elif}\;y \le 4.258714344896704138558189467068963913256 \cdot 10^{80}:\\
\;\;\;\;\frac{1}{\frac{\left(x + t\right) + y}{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}}\\
\mathbf{elif}\;y \le 2.176770691227919101745141942515187743385 \cdot 10^{233}:\\
\;\;\;\;a - \frac{y}{\left(x + t\right) + y} \cdot b\\
\mathbf{elif}\;y \le 3.982002360183062272030533575745070819145 \cdot 10^{263}:\\
\;\;\;\;z - \frac{y}{\left(x + t\right) + y} \cdot b\\
\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 r561424 = x;
double r561425 = y;
double r561426 = r561424 + r561425;
double r561427 = z;
double r561428 = r561426 * r561427;
double r561429 = t;
double r561430 = r561429 + r561425;
double r561431 = a;
double r561432 = r561430 * r561431;
double r561433 = r561428 + r561432;
double r561434 = b;
double r561435 = r561425 * r561434;
double r561436 = r561433 - r561435;
double r561437 = r561424 + r561429;
double r561438 = r561437 + r561425;
double r561439 = r561436 / r561438;
return r561439;
}
double f(double x, double y, double z, double t, double a, double b) {
double r561440 = y;
double r561441 = -1.0806850726955622e+214;
bool r561442 = r561440 <= r561441;
double r561443 = z;
double r561444 = x;
double r561445 = t;
double r561446 = r561444 + r561445;
double r561447 = r561446 + r561440;
double r561448 = r561440 / r561447;
double r561449 = b;
double r561450 = r561448 * r561449;
double r561451 = r561443 - r561450;
double r561452 = -1.9770205152967977e+65;
bool r561453 = r561440 <= r561452;
double r561454 = a;
double r561455 = r561454 - r561450;
double r561456 = 4.258714344896704e+80;
bool r561457 = r561440 <= r561456;
double r561458 = 1.0;
double r561459 = r561444 + r561440;
double r561460 = r561459 * r561443;
double r561461 = r561445 + r561440;
double r561462 = r561461 * r561454;
double r561463 = r561460 + r561462;
double r561464 = r561440 * r561449;
double r561465 = r561463 - r561464;
double r561466 = r561447 / r561465;
double r561467 = r561458 / r561466;
double r561468 = 2.176770691227919e+233;
bool r561469 = r561440 <= r561468;
double r561470 = 3.982002360183062e+263;
bool r561471 = r561440 <= r561470;
double r561472 = r561471 ? r561451 : r561455;
double r561473 = r561469 ? r561455 : r561472;
double r561474 = r561457 ? r561467 : r561473;
double r561475 = r561453 ? r561455 : r561474;
double r561476 = r561442 ? r561451 : r561475;
return r561476;
}




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.5 |
| Herbie | 19.7 |
if y < -1.0806850726955622e+214 or 2.176770691227919e+233 < y < 3.982002360183062e+263Initial program 52.9
rmApplied div-sub52.9
rmApplied associate-/l*45.0
rmApplied associate-/r/43.6
Taylor expanded around inf 23.2
if -1.0806850726955622e+214 < y < -1.9770205152967977e+65 or 4.258714344896704e+80 < y < 2.176770691227919e+233 or 3.982002360183062e+263 < y Initial program 40.4
rmApplied div-sub40.4
rmApplied associate-/l*33.3
rmApplied associate-/r/32.6
Taylor expanded around 0 25.4
if -1.9770205152967977e+65 < y < 4.258714344896704e+80Initial program 16.5
rmApplied clear-num16.6
Final simplification19.7
herbie shell --seed 1978988140
(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)))