\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 -3.167970801017747333585571881926417802986 \cdot 10^{80}:\\
\;\;\;\;z - \frac{y}{\frac{\left(x + t\right) + y}{b}}\\
\mathbf{elif}\;x \le -2.234989953541200263385581111442281856948 \cdot 10^{-94}:\\
\;\;\;\;\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \frac{y}{\left(x + t\right) + y} \cdot b\\
\mathbf{elif}\;x \le -4.899515873749284249389445834868375982167 \cdot 10^{-236}:\\
\;\;\;\;a - y \cdot \frac{b}{\left(x + t\right) + y}\\
\mathbf{elif}\;x \le 3.46626155810342549714430232432862157048 \cdot 10^{-290}:\\
\;\;\;\;\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \frac{y}{\left(x + t\right) + y} \cdot b\\
\mathbf{elif}\;x \le 8.319255981684834624526027052421217572153 \cdot 10^{-47}:\\
\;\;\;\;a - y \cdot \frac{b}{\left(x + t\right) + y}\\
\mathbf{elif}\;x \le 90417508901533.34375:\\
\;\;\;\;\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \frac{y}{\left(x + t\right) + y} \cdot b\\
\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 r956412 = x;
double r956413 = y;
double r956414 = r956412 + r956413;
double r956415 = z;
double r956416 = r956414 * r956415;
double r956417 = t;
double r956418 = r956417 + r956413;
double r956419 = a;
double r956420 = r956418 * r956419;
double r956421 = r956416 + r956420;
double r956422 = b;
double r956423 = r956413 * r956422;
double r956424 = r956421 - r956423;
double r956425 = r956412 + r956417;
double r956426 = r956425 + r956413;
double r956427 = r956424 / r956426;
return r956427;
}
double f(double x, double y, double z, double t, double a, double b) {
double r956428 = x;
double r956429 = -3.1679708010177473e+80;
bool r956430 = r956428 <= r956429;
double r956431 = z;
double r956432 = y;
double r956433 = t;
double r956434 = r956428 + r956433;
double r956435 = r956434 + r956432;
double r956436 = b;
double r956437 = r956435 / r956436;
double r956438 = r956432 / r956437;
double r956439 = r956431 - r956438;
double r956440 = -2.2349899535412003e-94;
bool r956441 = r956428 <= r956440;
double r956442 = r956428 + r956432;
double r956443 = r956442 * r956431;
double r956444 = r956433 + r956432;
double r956445 = a;
double r956446 = r956444 * r956445;
double r956447 = r956443 + r956446;
double r956448 = r956447 / r956435;
double r956449 = r956432 / r956435;
double r956450 = r956449 * r956436;
double r956451 = r956448 - r956450;
double r956452 = -4.899515873749284e-236;
bool r956453 = r956428 <= r956452;
double r956454 = r956436 / r956435;
double r956455 = r956432 * r956454;
double r956456 = r956445 - r956455;
double r956457 = 3.4662615581034255e-290;
bool r956458 = r956428 <= r956457;
double r956459 = 8.319255981684835e-47;
bool r956460 = r956428 <= r956459;
double r956461 = 90417508901533.34;
bool r956462 = r956428 <= r956461;
double r956463 = r956462 ? r956451 : r956439;
double r956464 = r956460 ? r956456 : r956463;
double r956465 = r956458 ? r956451 : r956464;
double r956466 = r956453 ? r956456 : r956465;
double r956467 = r956441 ? r956451 : r956466;
double r956468 = r956430 ? r956439 : r956467;
return r956468;
}




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.4 |
|---|---|
| Target | 11.6 |
| Herbie | 22.5 |
if x < -3.1679708010177473e+80 or 90417508901533.34 < x Initial program 31.6
rmApplied div-sub31.6
rmApplied associate-/l*29.0
Taylor expanded around inf 24.9
if -3.1679708010177473e+80 < x < -2.2349899535412003e-94 or -4.899515873749284e-236 < x < 3.4662615581034255e-290 or 8.319255981684835e-47 < x < 90417508901533.34Initial program 23.1
rmApplied div-sub23.1
rmApplied associate-/l*21.4
rmApplied associate-/r/20.1
if -2.2349899535412003e-94 < x < -4.899515873749284e-236 or 3.4662615581034255e-290 < x < 8.319255981684835e-47Initial program 22.1
rmApplied div-sub22.1
rmApplied *-un-lft-identity22.1
Applied times-frac21.5
Simplified21.5
Taylor expanded around 0 21.3
Final simplification22.5
herbie shell --seed 2019350
(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)))