\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 r791611 = x;
double r791612 = y;
double r791613 = r791611 + r791612;
double r791614 = z;
double r791615 = r791613 * r791614;
double r791616 = t;
double r791617 = r791616 + r791612;
double r791618 = a;
double r791619 = r791617 * r791618;
double r791620 = r791615 + r791619;
double r791621 = b;
double r791622 = r791612 * r791621;
double r791623 = r791620 - r791622;
double r791624 = r791611 + r791616;
double r791625 = r791624 + r791612;
double r791626 = r791623 / r791625;
return r791626;
}
double f(double x, double y, double z, double t, double a, double b) {
double r791627 = t;
double r791628 = -1.6986254320624221e+168;
bool r791629 = r791627 <= r791628;
double r791630 = a;
double r791631 = y;
double r791632 = x;
double r791633 = r791632 + r791627;
double r791634 = r791633 + r791631;
double r791635 = b;
double r791636 = r791634 / r791635;
double r791637 = r791631 / r791636;
double r791638 = r791630 - r791637;
double r791639 = -4.771858414190903e+97;
bool r791640 = r791627 <= r791639;
double r791641 = z;
double r791642 = r791641 - r791637;
double r791643 = -6.269150250695785e+93;
bool r791644 = r791627 <= r791643;
double r791645 = -2.334499011016451e-75;
bool r791646 = r791627 <= r791645;
double r791647 = 1.0;
double r791648 = r791632 + r791631;
double r791649 = r791648 * r791641;
double r791650 = r791627 + r791631;
double r791651 = r791650 * r791630;
double r791652 = r791649 + r791651;
double r791653 = r791634 / r791652;
double r791654 = r791647 / r791653;
double r791655 = r791631 / r791634;
double r791656 = r791655 * r791635;
double r791657 = r791654 - r791656;
double r791658 = -1.8713424802009653e-164;
bool r791659 = r791627 <= r791658;
double r791660 = -3.6735327386694895e-268;
bool r791661 = r791627 <= r791660;
double r791662 = r791652 / r791634;
double r791663 = 3.0;
double r791664 = pow(r791655, r791663);
double r791665 = cbrt(r791664);
double r791666 = r791665 * r791635;
double r791667 = r791662 - r791666;
double r791668 = 4.3804140724000676e-97;
bool r791669 = r791627 <= r791668;
double r791670 = 2.197975804352339e+135;
bool r791671 = r791627 <= r791670;
double r791672 = r791647 / r791634;
double r791673 = r791631 * r791672;
double r791674 = r791673 * r791635;
double r791675 = r791662 - r791674;
double r791676 = r791671 ? r791675 : r791638;
double r791677 = r791669 ? r791642 : r791676;
double r791678 = r791661 ? r791667 : r791677;
double r791679 = r791659 ? r791642 : r791678;
double r791680 = r791646 ? r791657 : r791679;
double r791681 = r791644 ? r791630 : r791680;
double r791682 = r791640 ? r791642 : r791681;
double r791683 = r791629 ? r791638 : r791682;
return r791683;
}




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)))