\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}\;a \le -2.26327786327634281 \cdot 10^{115}:\\
\;\;\;\;a - y \cdot \frac{b}{\left(x + t\right) + y}\\
\mathbf{elif}\;a \le -4.41531368986651466 \cdot 10^{-105}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x + y, z, \left(t + y\right) \cdot a\right)}{1}}{\left(x + t\right) + y} - \left(\sqrt[3]{y \cdot \frac{b}{\left(x + t\right) + y}} \cdot \sqrt[3]{y \cdot \frac{b}{\left(x + t\right) + y}}\right) \cdot \sqrt[3]{y \cdot \frac{b}{\left(x + t\right) + y}}\\
\mathbf{elif}\;a \le 2.017571219391953 \cdot 10^{-297}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x + y, z, \left(t + y\right) \cdot a\right)}{1}}{\left(x + t\right) + y} - \frac{y \cdot b}{\left(x + t\right) + y}\\
\mathbf{elif}\;a \le 1.7662230389581438 \cdot 10^{70}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x + y, z, \left(t + y\right) \cdot a\right)}{1}}{\left(x + t\right) + y} - \left(\sqrt[3]{y \cdot \frac{b}{\left(x + t\right) + y}} \cdot \sqrt[3]{y \cdot \frac{b}{\left(x + t\right) + y}}\right) \cdot \sqrt[3]{y \cdot \frac{b}{\left(x + t\right) + y}}\\
\mathbf{else}:\\
\;\;\;\;a - y \cdot \frac{b}{\left(x + t\right) + y}\\
\end{array}double f(double x, double y, double z, double t, double a, double b) {
double r884756 = x;
double r884757 = y;
double r884758 = r884756 + r884757;
double r884759 = z;
double r884760 = r884758 * r884759;
double r884761 = t;
double r884762 = r884761 + r884757;
double r884763 = a;
double r884764 = r884762 * r884763;
double r884765 = r884760 + r884764;
double r884766 = b;
double r884767 = r884757 * r884766;
double r884768 = r884765 - r884767;
double r884769 = r884756 + r884761;
double r884770 = r884769 + r884757;
double r884771 = r884768 / r884770;
return r884771;
}
double f(double x, double y, double z, double t, double a, double b) {
double r884772 = a;
double r884773 = -2.263277863276343e+115;
bool r884774 = r884772 <= r884773;
double r884775 = y;
double r884776 = b;
double r884777 = x;
double r884778 = t;
double r884779 = r884777 + r884778;
double r884780 = r884779 + r884775;
double r884781 = r884776 / r884780;
double r884782 = r884775 * r884781;
double r884783 = r884772 - r884782;
double r884784 = -4.415313689866515e-105;
bool r884785 = r884772 <= r884784;
double r884786 = r884777 + r884775;
double r884787 = z;
double r884788 = r884778 + r884775;
double r884789 = r884788 * r884772;
double r884790 = fma(r884786, r884787, r884789);
double r884791 = 1.0;
double r884792 = r884790 / r884791;
double r884793 = r884792 / r884780;
double r884794 = cbrt(r884782);
double r884795 = r884794 * r884794;
double r884796 = r884795 * r884794;
double r884797 = r884793 - r884796;
double r884798 = 2.017571219391953e-297;
bool r884799 = r884772 <= r884798;
double r884800 = r884775 * r884776;
double r884801 = r884800 / r884780;
double r884802 = r884793 - r884801;
double r884803 = 1.7662230389581438e+70;
bool r884804 = r884772 <= r884803;
double r884805 = r884804 ? r884797 : r884783;
double r884806 = r884799 ? r884802 : r884805;
double r884807 = r884785 ? r884797 : r884806;
double r884808 = r884774 ? r884783 : r884807;
return r884808;
}




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.6 |
| Herbie | 20.9 |
if a < -2.263277863276343e+115 or 1.7662230389581438e+70 < a Initial program 39.8
rmApplied div-sub39.8
Simplified39.8
rmApplied *-un-lft-identity39.8
Applied times-frac40.2
Simplified40.2
Taylor expanded around 0 26.2
if -2.263277863276343e+115 < a < -4.415313689866515e-105 or 2.017571219391953e-297 < a < 1.7662230389581438e+70Initial program 20.3
rmApplied div-sub20.3
Simplified20.3
rmApplied *-un-lft-identity20.3
Applied times-frac17.0
Simplified17.0
rmApplied add-cube-cbrt17.3
if -4.415313689866515e-105 < a < 2.017571219391953e-297Initial program 20.4
rmApplied div-sub20.4
Simplified20.4
Final simplification20.9
herbie shell --seed 2020081 +o rules:numerics
(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)))