\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}\;t \le -1.25150232717518858 \cdot 10^{200}:\\
\;\;\;\;a - \frac{y}{\frac{\left(x + t\right) + y}{b}}\\
\mathbf{elif}\;t \le -4.1840463071979065 \cdot 10^{-131}:\\
\;\;\;\;\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \frac{y}{\frac{\left(x + t\right) + y}{b}}\\
\mathbf{elif}\;t \le 6.63565468032893206 \cdot 10^{-276}:\\
\;\;\;\;z - y \cdot \frac{b}{\left(x + t\right) + y}\\
\mathbf{elif}\;t \le 5.9747624034034444 \cdot 10^{-75}:\\
\;\;\;\;\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \frac{y}{\frac{\left(x + t\right) + y}{b}}\\
\mathbf{elif}\;t \le 2.51319291468979468 \cdot 10^{-6}:\\
\;\;\;\;z - y \cdot \frac{b}{\left(x + t\right) + y}\\
\mathbf{elif}\;t \le 3.53162670404046633 \cdot 10^{64}:\\
\;\;\;\;\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \frac{y}{\frac{\left(x + t\right) + y}{b}}\\
\mathbf{else}:\\
\;\;\;\;a - \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 r987376 = x;
double r987377 = y;
double r987378 = r987376 + r987377;
double r987379 = z;
double r987380 = r987378 * r987379;
double r987381 = t;
double r987382 = r987381 + r987377;
double r987383 = a;
double r987384 = r987382 * r987383;
double r987385 = r987380 + r987384;
double r987386 = b;
double r987387 = r987377 * r987386;
double r987388 = r987385 - r987387;
double r987389 = r987376 + r987381;
double r987390 = r987389 + r987377;
double r987391 = r987388 / r987390;
return r987391;
}
double f(double x, double y, double z, double t, double a, double b) {
double r987392 = t;
double r987393 = -1.2515023271751886e+200;
bool r987394 = r987392 <= r987393;
double r987395 = a;
double r987396 = y;
double r987397 = x;
double r987398 = r987397 + r987392;
double r987399 = r987398 + r987396;
double r987400 = b;
double r987401 = r987399 / r987400;
double r987402 = r987396 / r987401;
double r987403 = r987395 - r987402;
double r987404 = -4.1840463071979065e-131;
bool r987405 = r987392 <= r987404;
double r987406 = r987397 + r987396;
double r987407 = z;
double r987408 = r987406 * r987407;
double r987409 = r987392 + r987396;
double r987410 = r987409 * r987395;
double r987411 = r987408 + r987410;
double r987412 = r987411 / r987399;
double r987413 = r987412 - r987402;
double r987414 = 6.635654680328932e-276;
bool r987415 = r987392 <= r987414;
double r987416 = r987400 / r987399;
double r987417 = r987396 * r987416;
double r987418 = r987407 - r987417;
double r987419 = 5.974762403403444e-75;
bool r987420 = r987392 <= r987419;
double r987421 = 2.5131929146897947e-06;
bool r987422 = r987392 <= r987421;
double r987423 = 3.5316267040404663e+64;
bool r987424 = r987392 <= r987423;
double r987425 = r987424 ? r987413 : r987403;
double r987426 = r987422 ? r987418 : r987425;
double r987427 = r987420 ? r987413 : r987426;
double r987428 = r987415 ? r987418 : r987427;
double r987429 = r987405 ? r987413 : r987428;
double r987430 = r987394 ? r987403 : r987429;
return r987430;
}




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.3 |
|---|---|
| Target | 11.3 |
| Herbie | 21.5 |
if t < -1.2515023271751886e+200 or 3.5316267040404663e+64 < t Initial program 34.6
rmApplied div-sub34.6
rmApplied associate-/l*32.0
Taylor expanded around 0 21.6
if -1.2515023271751886e+200 < t < -4.1840463071979065e-131 or 6.635654680328932e-276 < t < 5.974762403403444e-75 or 2.5131929146897947e-06 < t < 3.5316267040404663e+64Initial program 23.7
rmApplied div-sub23.7
rmApplied associate-/l*21.9
if -4.1840463071979065e-131 < t < 6.635654680328932e-276 or 5.974762403403444e-75 < t < 2.5131929146897947e-06Initial program 21.7
rmApplied div-sub21.7
rmApplied *-un-lft-identity21.7
Applied times-frac20.2
Simplified20.2
Taylor expanded around inf 20.7
Final simplification21.5
herbie shell --seed 2020062
(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)))