x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right)x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(\left(x1 \cdot x1\right) \cdot \left(\sqrt[3]{4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6} \cdot \sqrt[3]{4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6}\right)\right) \cdot \sqrt[3]{4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6}\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right)double f(double x1, double x2) {
double r48851 = x1;
double r48852 = 2.0;
double r48853 = r48852 * r48851;
double r48854 = 3.0;
double r48855 = r48854 * r48851;
double r48856 = r48855 * r48851;
double r48857 = x2;
double r48858 = r48852 * r48857;
double r48859 = r48856 + r48858;
double r48860 = r48859 - r48851;
double r48861 = r48851 * r48851;
double r48862 = 1.0;
double r48863 = r48861 + r48862;
double r48864 = r48860 / r48863;
double r48865 = r48853 * r48864;
double r48866 = r48864 - r48854;
double r48867 = r48865 * r48866;
double r48868 = 4.0;
double r48869 = r48868 * r48864;
double r48870 = 6.0;
double r48871 = r48869 - r48870;
double r48872 = r48861 * r48871;
double r48873 = r48867 + r48872;
double r48874 = r48873 * r48863;
double r48875 = r48856 * r48864;
double r48876 = r48874 + r48875;
double r48877 = r48861 * r48851;
double r48878 = r48876 + r48877;
double r48879 = r48878 + r48851;
double r48880 = r48856 - r48858;
double r48881 = r48880 - r48851;
double r48882 = r48881 / r48863;
double r48883 = r48854 * r48882;
double r48884 = r48879 + r48883;
double r48885 = r48851 + r48884;
return r48885;
}
double f(double x1, double x2) {
double r48886 = x1;
double r48887 = 2.0;
double r48888 = r48887 * r48886;
double r48889 = 3.0;
double r48890 = r48889 * r48886;
double r48891 = r48890 * r48886;
double r48892 = x2;
double r48893 = r48887 * r48892;
double r48894 = r48891 + r48893;
double r48895 = r48894 - r48886;
double r48896 = r48886 * r48886;
double r48897 = 1.0;
double r48898 = r48896 + r48897;
double r48899 = r48895 / r48898;
double r48900 = r48888 * r48899;
double r48901 = r48899 - r48889;
double r48902 = r48900 * r48901;
double r48903 = 4.0;
double r48904 = r48903 * r48899;
double r48905 = 6.0;
double r48906 = r48904 - r48905;
double r48907 = cbrt(r48906);
double r48908 = r48907 * r48907;
double r48909 = r48896 * r48908;
double r48910 = r48909 * r48907;
double r48911 = r48902 + r48910;
double r48912 = r48911 * r48898;
double r48913 = r48891 * r48899;
double r48914 = r48912 + r48913;
double r48915 = r48896 * r48886;
double r48916 = r48914 + r48915;
double r48917 = r48916 + r48886;
double r48918 = r48891 - r48893;
double r48919 = r48918 - r48886;
double r48920 = r48919 / r48898;
double r48921 = r48889 * r48920;
double r48922 = r48917 + r48921;
double r48923 = r48886 + r48922;
return r48923;
}



Bits error versus x1



Bits error versus x2
Results
Initial program 0.5
rmApplied add-cube-cbrt0.6
Applied associate-*r*0.7
Final simplification0.7
herbie shell --seed 2020046
(FPCore (x1 x2)
:name "Rosa's FloatVsDoubleBenchmark"
:precision binary64
(+ x1 (+ (+ (+ (+ (* (+ (* (* (* 2 x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) (- (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) 3)) (* (* x1 x1) (- (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) 6))) (+ (* x1 x1) 1)) (* (* (* 3 x1) x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)))) (* (* x1 x1) x1)) x1) (* 3 (/ (- (- (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))))))