Average Error: 0.5 → 0.5
Time: 54.8s
Precision: 64
\[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)\]
\[\left(\frac{\left(x1 \cdot x1\right) \cdot 3 - \left(x1 - -2 \cdot x2\right)}{1 + x1 \cdot x1} \cdot 3 + x1\right) + \left(\frac{\left(x1 \cdot x1\right) \cdot 3 + \left(2 \cdot x2 - x1\right)}{1 + x1 \cdot x1} \cdot \left(\left(2 \cdot x1\right) \cdot \left(\left(\frac{\left(x1 \cdot x1\right) \cdot 3 + \left(2 \cdot x2 - x1\right)}{1 + x1 \cdot x1} - 3\right) \cdot \left(1 + x1 \cdot x1\right)\right) + \left(x1 \cdot x1\right) \cdot 3\right) + \left(1 + x1 \cdot x1\right) \cdot \left(\left(\left(x1 \cdot x1\right) \cdot -6 + \left(\left(x1 \cdot x1\right) \cdot \left(1 - x1 \cdot x1\right)\right) \cdot \frac{4 \cdot \left(\left(x1 \cdot x1\right) \cdot 3 + \left(2 \cdot x2 - x1\right)\right)}{1 - \left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)}\right) + x1\right)\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(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)
\left(\frac{\left(x1 \cdot x1\right) \cdot 3 - \left(x1 - -2 \cdot x2\right)}{1 + x1 \cdot x1} \cdot 3 + x1\right) + \left(\frac{\left(x1 \cdot x1\right) \cdot 3 + \left(2 \cdot x2 - x1\right)}{1 + x1 \cdot x1} \cdot \left(\left(2 \cdot x1\right) \cdot \left(\left(\frac{\left(x1 \cdot x1\right) \cdot 3 + \left(2 \cdot x2 - x1\right)}{1 + x1 \cdot x1} - 3\right) \cdot \left(1 + x1 \cdot x1\right)\right) + \left(x1 \cdot x1\right) \cdot 3\right) + \left(1 + x1 \cdot x1\right) \cdot \left(\left(\left(x1 \cdot x1\right) \cdot -6 + \left(\left(x1 \cdot x1\right) \cdot \left(1 - x1 \cdot x1\right)\right) \cdot \frac{4 \cdot \left(\left(x1 \cdot x1\right) \cdot 3 + \left(2 \cdot x2 - x1\right)\right)}{1 - \left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)}\right) + x1\right)\right)
double f(double x1, double x2) {
        double r2910853 = x1;
        double r2910854 = 2.0;
        double r2910855 = r2910854 * r2910853;
        double r2910856 = 3.0;
        double r2910857 = r2910856 * r2910853;
        double r2910858 = r2910857 * r2910853;
        double r2910859 = x2;
        double r2910860 = r2910854 * r2910859;
        double r2910861 = r2910858 + r2910860;
        double r2910862 = r2910861 - r2910853;
        double r2910863 = r2910853 * r2910853;
        double r2910864 = 1.0;
        double r2910865 = r2910863 + r2910864;
        double r2910866 = r2910862 / r2910865;
        double r2910867 = r2910855 * r2910866;
        double r2910868 = r2910866 - r2910856;
        double r2910869 = r2910867 * r2910868;
        double r2910870 = 4.0;
        double r2910871 = r2910870 * r2910866;
        double r2910872 = 6.0;
        double r2910873 = r2910871 - r2910872;
        double r2910874 = r2910863 * r2910873;
        double r2910875 = r2910869 + r2910874;
        double r2910876 = r2910875 * r2910865;
        double r2910877 = r2910858 * r2910866;
        double r2910878 = r2910876 + r2910877;
        double r2910879 = r2910863 * r2910853;
        double r2910880 = r2910878 + r2910879;
        double r2910881 = r2910880 + r2910853;
        double r2910882 = r2910858 - r2910860;
        double r2910883 = r2910882 - r2910853;
        double r2910884 = r2910883 / r2910865;
        double r2910885 = r2910856 * r2910884;
        double r2910886 = r2910881 + r2910885;
        double r2910887 = r2910853 + r2910886;
        return r2910887;
}

double f(double x1, double x2) {
        double r2910888 = x1;
        double r2910889 = r2910888 * r2910888;
        double r2910890 = 3.0;
        double r2910891 = r2910889 * r2910890;
        double r2910892 = -2.0;
        double r2910893 = x2;
        double r2910894 = r2910892 * r2910893;
        double r2910895 = r2910888 - r2910894;
        double r2910896 = r2910891 - r2910895;
        double r2910897 = 1.0;
        double r2910898 = r2910897 + r2910889;
        double r2910899 = r2910896 / r2910898;
        double r2910900 = r2910899 * r2910890;
        double r2910901 = r2910900 + r2910888;
        double r2910902 = 2.0;
        double r2910903 = r2910902 * r2910893;
        double r2910904 = r2910903 - r2910888;
        double r2910905 = r2910891 + r2910904;
        double r2910906 = r2910905 / r2910898;
        double r2910907 = r2910902 * r2910888;
        double r2910908 = r2910906 - r2910890;
        double r2910909 = r2910908 * r2910898;
        double r2910910 = r2910907 * r2910909;
        double r2910911 = r2910910 + r2910891;
        double r2910912 = r2910906 * r2910911;
        double r2910913 = -6.0;
        double r2910914 = r2910889 * r2910913;
        double r2910915 = r2910897 - r2910889;
        double r2910916 = r2910889 * r2910915;
        double r2910917 = 4.0;
        double r2910918 = r2910917 * r2910905;
        double r2910919 = r2910889 * r2910889;
        double r2910920 = r2910897 - r2910919;
        double r2910921 = r2910918 / r2910920;
        double r2910922 = r2910916 * r2910921;
        double r2910923 = r2910914 + r2910922;
        double r2910924 = r2910923 + r2910888;
        double r2910925 = r2910898 * r2910924;
        double r2910926 = r2910912 + r2910925;
        double r2910927 = r2910901 + r2910926;
        return r2910927;
}

Error

Bits error versus x1

Bits error versus x2

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.5

    \[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)\]
  2. Simplified0.5

    \[\leadsto \color{blue}{\left(x1 + 3 \cdot \frac{\left(x1 \cdot x1\right) \cdot 3 - \left(x1 - -2 \cdot x2\right)}{1 + x1 \cdot x1}\right) + \left(\left(1 + x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(\frac{4 \cdot \left(\left(x1 \cdot x1\right) \cdot 3 + \left(x2 \cdot 2 - x1\right)\right)}{1 + x1 \cdot x1} + -6\right) + x1\right) + \frac{\left(x1 \cdot x1\right) \cdot 3 + \left(x2 \cdot 2 - x1\right)}{1 + x1 \cdot x1} \cdot \left(\left(\left(\frac{\left(x1 \cdot x1\right) \cdot 3 + \left(x2 \cdot 2 - x1\right)}{1 + x1 \cdot x1} - 3\right) \cdot \left(1 + x1 \cdot x1\right)\right) \cdot \left(x1 \cdot 2\right) + \left(x1 \cdot x1\right) \cdot 3\right)\right)}\]
  3. Using strategy rm
  4. Applied distribute-rgt-in0.5

    \[\leadsto \left(x1 + 3 \cdot \frac{\left(x1 \cdot x1\right) \cdot 3 - \left(x1 - -2 \cdot x2\right)}{1 + x1 \cdot x1}\right) + \left(\left(1 + x1 \cdot x1\right) \cdot \left(\color{blue}{\left(\frac{4 \cdot \left(\left(x1 \cdot x1\right) \cdot 3 + \left(x2 \cdot 2 - x1\right)\right)}{1 + x1 \cdot x1} \cdot \left(x1 \cdot x1\right) + -6 \cdot \left(x1 \cdot x1\right)\right)} + x1\right) + \frac{\left(x1 \cdot x1\right) \cdot 3 + \left(x2 \cdot 2 - x1\right)}{1 + x1 \cdot x1} \cdot \left(\left(\left(\frac{\left(x1 \cdot x1\right) \cdot 3 + \left(x2 \cdot 2 - x1\right)}{1 + x1 \cdot x1} - 3\right) \cdot \left(1 + x1 \cdot x1\right)\right) \cdot \left(x1 \cdot 2\right) + \left(x1 \cdot x1\right) \cdot 3\right)\right)\]
  5. Using strategy rm
  6. Applied flip-+0.5

    \[\leadsto \left(x1 + 3 \cdot \frac{\left(x1 \cdot x1\right) \cdot 3 - \left(x1 - -2 \cdot x2\right)}{1 + x1 \cdot x1}\right) + \left(\left(1 + x1 \cdot x1\right) \cdot \left(\left(\frac{4 \cdot \left(\left(x1 \cdot x1\right) \cdot 3 + \left(x2 \cdot 2 - x1\right)\right)}{\color{blue}{\frac{1 \cdot 1 - \left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)}{1 - x1 \cdot x1}}} \cdot \left(x1 \cdot x1\right) + -6 \cdot \left(x1 \cdot x1\right)\right) + x1\right) + \frac{\left(x1 \cdot x1\right) \cdot 3 + \left(x2 \cdot 2 - x1\right)}{1 + x1 \cdot x1} \cdot \left(\left(\left(\frac{\left(x1 \cdot x1\right) \cdot 3 + \left(x2 \cdot 2 - x1\right)}{1 + x1 \cdot x1} - 3\right) \cdot \left(1 + x1 \cdot x1\right)\right) \cdot \left(x1 \cdot 2\right) + \left(x1 \cdot x1\right) \cdot 3\right)\right)\]
  7. Applied associate-/r/0.5

    \[\leadsto \left(x1 + 3 \cdot \frac{\left(x1 \cdot x1\right) \cdot 3 - \left(x1 - -2 \cdot x2\right)}{1 + x1 \cdot x1}\right) + \left(\left(1 + x1 \cdot x1\right) \cdot \left(\left(\color{blue}{\left(\frac{4 \cdot \left(\left(x1 \cdot x1\right) \cdot 3 + \left(x2 \cdot 2 - x1\right)\right)}{1 \cdot 1 - \left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)} \cdot \left(1 - x1 \cdot x1\right)\right)} \cdot \left(x1 \cdot x1\right) + -6 \cdot \left(x1 \cdot x1\right)\right) + x1\right) + \frac{\left(x1 \cdot x1\right) \cdot 3 + \left(x2 \cdot 2 - x1\right)}{1 + x1 \cdot x1} \cdot \left(\left(\left(\frac{\left(x1 \cdot x1\right) \cdot 3 + \left(x2 \cdot 2 - x1\right)}{1 + x1 \cdot x1} - 3\right) \cdot \left(1 + x1 \cdot x1\right)\right) \cdot \left(x1 \cdot 2\right) + \left(x1 \cdot x1\right) \cdot 3\right)\right)\]
  8. Applied associate-*l*0.5

    \[\leadsto \left(x1 + 3 \cdot \frac{\left(x1 \cdot x1\right) \cdot 3 - \left(x1 - -2 \cdot x2\right)}{1 + x1 \cdot x1}\right) + \left(\left(1 + x1 \cdot x1\right) \cdot \left(\left(\color{blue}{\frac{4 \cdot \left(\left(x1 \cdot x1\right) \cdot 3 + \left(x2 \cdot 2 - x1\right)\right)}{1 \cdot 1 - \left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)} \cdot \left(\left(1 - x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)\right)} + -6 \cdot \left(x1 \cdot x1\right)\right) + x1\right) + \frac{\left(x1 \cdot x1\right) \cdot 3 + \left(x2 \cdot 2 - x1\right)}{1 + x1 \cdot x1} \cdot \left(\left(\left(\frac{\left(x1 \cdot x1\right) \cdot 3 + \left(x2 \cdot 2 - x1\right)}{1 + x1 \cdot x1} - 3\right) \cdot \left(1 + x1 \cdot x1\right)\right) \cdot \left(x1 \cdot 2\right) + \left(x1 \cdot x1\right) \cdot 3\right)\right)\]
  9. Final simplification0.5

    \[\leadsto \left(\frac{\left(x1 \cdot x1\right) \cdot 3 - \left(x1 - -2 \cdot x2\right)}{1 + x1 \cdot x1} \cdot 3 + x1\right) + \left(\frac{\left(x1 \cdot x1\right) \cdot 3 + \left(2 \cdot x2 - x1\right)}{1 + x1 \cdot x1} \cdot \left(\left(2 \cdot x1\right) \cdot \left(\left(\frac{\left(x1 \cdot x1\right) \cdot 3 + \left(2 \cdot x2 - x1\right)}{1 + x1 \cdot x1} - 3\right) \cdot \left(1 + x1 \cdot x1\right)\right) + \left(x1 \cdot x1\right) \cdot 3\right) + \left(1 + x1 \cdot x1\right) \cdot \left(\left(\left(x1 \cdot x1\right) \cdot -6 + \left(\left(x1 \cdot x1\right) \cdot \left(1 - x1 \cdot x1\right)\right) \cdot \frac{4 \cdot \left(\left(x1 \cdot x1\right) \cdot 3 + \left(2 \cdot x2 - x1\right)\right)}{1 - \left(x1 \cdot x1\right) \cdot \left(x1 \cdot x1\right)}\right) + x1\right)\right)\]

Reproduce

herbie shell --seed 2019133 
(FPCore (x1 x2)
  :name "Rosa's FloatVsDoubleBenchmark"
  (+ 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))))))