\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 -9110484639622092928439025664:\\
\;\;\;\;\left(a + z\right) - \frac{y}{\left(y + t\right) + x} \cdot b\\
\mathbf{elif}\;y \le 6.503370493896171151091587514980061243545 \cdot 10^{95}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y + x, z, a \cdot \left(y + t\right)\right)}{\left(y + t\right) + x} - b \cdot \frac{1}{\frac{\left(y + t\right) + x}{y}}\\
\mathbf{else}:\\
\;\;\;\;\left(a + z\right) - \frac{y}{\left(y + t\right) + x} \cdot b\\
\end{array}double f(double x, double y, double z, double t, double a, double b) {
double r33358460 = x;
double r33358461 = y;
double r33358462 = r33358460 + r33358461;
double r33358463 = z;
double r33358464 = r33358462 * r33358463;
double r33358465 = t;
double r33358466 = r33358465 + r33358461;
double r33358467 = a;
double r33358468 = r33358466 * r33358467;
double r33358469 = r33358464 + r33358468;
double r33358470 = b;
double r33358471 = r33358461 * r33358470;
double r33358472 = r33358469 - r33358471;
double r33358473 = r33358460 + r33358465;
double r33358474 = r33358473 + r33358461;
double r33358475 = r33358472 / r33358474;
return r33358475;
}
double f(double x, double y, double z, double t, double a, double b) {
double r33358476 = y;
double r33358477 = -9.110484639622093e+27;
bool r33358478 = r33358476 <= r33358477;
double r33358479 = a;
double r33358480 = z;
double r33358481 = r33358479 + r33358480;
double r33358482 = t;
double r33358483 = r33358476 + r33358482;
double r33358484 = x;
double r33358485 = r33358483 + r33358484;
double r33358486 = r33358476 / r33358485;
double r33358487 = b;
double r33358488 = r33358486 * r33358487;
double r33358489 = r33358481 - r33358488;
double r33358490 = 6.503370493896171e+95;
bool r33358491 = r33358476 <= r33358490;
double r33358492 = r33358476 + r33358484;
double r33358493 = r33358479 * r33358483;
double r33358494 = fma(r33358492, r33358480, r33358493);
double r33358495 = r33358494 / r33358485;
double r33358496 = 1.0;
double r33358497 = r33358485 / r33358476;
double r33358498 = r33358496 / r33358497;
double r33358499 = r33358487 * r33358498;
double r33358500 = r33358495 - r33358499;
double r33358501 = r33358491 ? r33358500 : r33358489;
double r33358502 = r33358478 ? r33358489 : r33358501;
return r33358502;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b
| Original | 27.0 |
|---|---|
| Target | 11.5 |
| Herbie | 13.7 |
if y < -9.110484639622093e+27 or 6.503370493896171e+95 < y Initial program 42.1
Simplified42.1
rmApplied div-sub42.1
rmApplied *-un-lft-identity42.1
Applied times-frac34.2
Simplified34.2
Taylor expanded around inf 9.7
if -9.110484639622093e+27 < y < 6.503370493896171e+95Initial program 16.1
Simplified16.1
rmApplied div-sub16.1
rmApplied *-un-lft-identity16.1
Applied times-frac16.3
Simplified16.3
rmApplied clear-num16.5
Final simplification13.7
herbie shell --seed 2019172 +o rules:numerics
(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)))