\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.6986254320624221 \cdot 10^{168}:\\
\;\;\;\;a - \frac{y}{\frac{\left(x + t\right) + y}{b}}\\
\mathbf{elif}\;t \le -4.77185841419090264 \cdot 10^{97}:\\
\;\;\;\;z - \frac{y}{\frac{\left(x + t\right) + y}{b}}\\
\mathbf{elif}\;t \le -6.2691502506957849 \cdot 10^{93}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \le -2.3344990110164508 \cdot 10^{-75}:\\
\;\;\;\;\frac{1}{\frac{\left(x + t\right) + y}{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}} - \frac{y}{\left(x + t\right) + y} \cdot b\\
\mathbf{elif}\;t \le -1.87134248020096529 \cdot 10^{-164}:\\
\;\;\;\;z - \frac{y}{\frac{\left(x + t\right) + y}{b}}\\
\mathbf{elif}\;t \le -3.67353273866948948 \cdot 10^{-268}:\\
\;\;\;\;\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \sqrt[3]{{\left(\frac{y}{\left(x + t\right) + y}\right)}^{3}} \cdot b\\
\mathbf{elif}\;t \le 4.38041407240006756 \cdot 10^{-97}:\\
\;\;\;\;z - \frac{y}{\frac{\left(x + t\right) + y}{b}}\\
\mathbf{elif}\;t \le 2.197975804352339 \cdot 10^{135}:\\
\;\;\;\;\frac{\left(x + y\right) \cdot z + \left(t + y\right) \cdot a}{\left(x + t\right) + y} - \left(y \cdot \frac{1}{\left(x + t\right) + y}\right) \cdot 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 r2430 = x;
double r2431 = y;
double r2432 = r2430 + r2431;
double r2433 = z;
double r2434 = r2432 * r2433;
double r2435 = t;
double r2436 = r2435 + r2431;
double r2437 = a;
double r2438 = r2436 * r2437;
double r2439 = r2434 + r2438;
double r2440 = b;
double r2441 = r2431 * r2440;
double r2442 = r2439 - r2441;
double r2443 = r2430 + r2435;
double r2444 = r2443 + r2431;
double r2445 = r2442 / r2444;
return r2445;
}
double f(double x, double y, double z, double t, double a, double b) {
double r2446 = t;
double r2447 = -1.6986254320624221e+168;
bool r2448 = r2446 <= r2447;
double r2449 = a;
double r2450 = y;
double r2451 = x;
double r2452 = r2451 + r2446;
double r2453 = r2452 + r2450;
double r2454 = b;
double r2455 = r2453 / r2454;
double r2456 = r2450 / r2455;
double r2457 = r2449 - r2456;
double r2458 = -4.771858414190903e+97;
bool r2459 = r2446 <= r2458;
double r2460 = z;
double r2461 = r2460 - r2456;
double r2462 = -6.269150250695785e+93;
bool r2463 = r2446 <= r2462;
double r2464 = -2.334499011016451e-75;
bool r2465 = r2446 <= r2464;
double r2466 = 1.0;
double r2467 = r2451 + r2450;
double r2468 = r2467 * r2460;
double r2469 = r2446 + r2450;
double r2470 = r2469 * r2449;
double r2471 = r2468 + r2470;
double r2472 = r2453 / r2471;
double r2473 = r2466 / r2472;
double r2474 = r2450 / r2453;
double r2475 = r2474 * r2454;
double r2476 = r2473 - r2475;
double r2477 = -1.8713424802009653e-164;
bool r2478 = r2446 <= r2477;
double r2479 = -3.6735327386694895e-268;
bool r2480 = r2446 <= r2479;
double r2481 = r2471 / r2453;
double r2482 = 3.0;
double r2483 = pow(r2474, r2482);
double r2484 = cbrt(r2483);
double r2485 = r2484 * r2454;
double r2486 = r2481 - r2485;
double r2487 = 4.3804140724000676e-97;
bool r2488 = r2446 <= r2487;
double r2489 = 2.197975804352339e+135;
bool r2490 = r2446 <= r2489;
double r2491 = r2466 / r2453;
double r2492 = r2450 * r2491;
double r2493 = r2492 * r2454;
double r2494 = r2481 - r2493;
double r2495 = r2490 ? r2494 : r2457;
double r2496 = r2488 ? r2461 : r2495;
double r2497 = r2480 ? r2486 : r2496;
double r2498 = r2478 ? r2461 : r2497;
double r2499 = r2465 ? r2476 : r2498;
double r2500 = r2463 ? r2449 : r2499;
double r2501 = r2459 ? r2461 : r2500;
double r2502 = r2448 ? r2457 : r2501;
return r2502;
}




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.5 |
| Herbie | 22.0 |
if t < -1.6986254320624221e+168 or 2.197975804352339e+135 < t Initial program 35.1
rmApplied div-sub35.1
rmApplied associate-/l*32.9
Taylor expanded around 0 21.6
if -1.6986254320624221e+168 < t < -4.771858414190903e+97 or -2.334499011016451e-75 < t < -1.8713424802009653e-164 or -3.6735327386694895e-268 < t < 4.3804140724000676e-97Initial program 24.8
rmApplied div-sub24.8
rmApplied associate-/l*23.7
Taylor expanded around inf 24.1
if -4.771858414190903e+97 < t < -6.269150250695785e+93Initial program 32.0
Taylor expanded around 0 27.7
if -6.269150250695785e+93 < t < -2.334499011016451e-75Initial program 23.8
rmApplied div-sub23.8
rmApplied associate-/l*19.9
rmApplied associate-/r/19.8
rmApplied clear-num19.9
if -1.8713424802009653e-164 < t < -3.6735327386694895e-268Initial program 24.3
rmApplied div-sub24.3
rmApplied associate-/l*21.5
rmApplied associate-/r/19.9
rmApplied add-cbrt-cube32.5
Applied add-cbrt-cube38.2
Applied cbrt-undiv38.5
Simplified22.6
if 4.3804140724000676e-97 < t < 2.197975804352339e+135Initial program 23.4
rmApplied div-sub23.4
rmApplied associate-/l*20.2
rmApplied associate-/r/20.1
rmApplied div-inv20.2
Final simplification22.0
herbie shell --seed 2020025
(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)))