Average Error: 0.5 → 0.6
Time: 47.0s
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(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot \left(\sqrt[3]{\left(3 \cdot x1\right) \cdot x1 + \left(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) \cdot \left(2 \cdot x1\right)\right) \cdot \left(x1 \cdot x1 + 1\right)} \cdot \sqrt[3]{\left(3 \cdot x1\right) \cdot x1 + \left(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) \cdot \left(2 \cdot x1\right)\right) \cdot \left(x1 \cdot x1 + 1\right)}\right)\right) \cdot \sqrt[3]{\left(3 \cdot x1\right) \cdot x1 + \left(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) \cdot \left(2 \cdot x1\right)\right) \cdot \left(x1 \cdot x1 + 1\right)} + \left(x1 \cdot x1 + 1\right) \cdot \left(\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)\right) + \left({x1}^{3} + \left(\left(x1 + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\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(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot \left(\sqrt[3]{\left(3 \cdot x1\right) \cdot x1 + \left(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) \cdot \left(2 \cdot x1\right)\right) \cdot \left(x1 \cdot x1 + 1\right)} \cdot \sqrt[3]{\left(3 \cdot x1\right) \cdot x1 + \left(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) \cdot \left(2 \cdot x1\right)\right) \cdot \left(x1 \cdot x1 + 1\right)}\right)\right) \cdot \sqrt[3]{\left(3 \cdot x1\right) \cdot x1 + \left(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) \cdot \left(2 \cdot x1\right)\right) \cdot \left(x1 \cdot x1 + 1\right)} + \left(x1 \cdot x1 + 1\right) \cdot \left(\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)\right) + \left({x1}^{3} + \left(\left(x1 + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + x1\right)\right)
double f(double x1, double x2) {
        double r84823 = x1;
        double r84824 = 2.0;
        double r84825 = r84824 * r84823;
        double r84826 = 3.0;
        double r84827 = r84826 * r84823;
        double r84828 = r84827 * r84823;
        double r84829 = x2;
        double r84830 = r84824 * r84829;
        double r84831 = r84828 + r84830;
        double r84832 = r84831 - r84823;
        double r84833 = r84823 * r84823;
        double r84834 = 1.0;
        double r84835 = r84833 + r84834;
        double r84836 = r84832 / r84835;
        double r84837 = r84825 * r84836;
        double r84838 = r84836 - r84826;
        double r84839 = r84837 * r84838;
        double r84840 = 4.0;
        double r84841 = r84840 * r84836;
        double r84842 = 6.0;
        double r84843 = r84841 - r84842;
        double r84844 = r84833 * r84843;
        double r84845 = r84839 + r84844;
        double r84846 = r84845 * r84835;
        double r84847 = r84828 * r84836;
        double r84848 = r84846 + r84847;
        double r84849 = r84833 * r84823;
        double r84850 = r84848 + r84849;
        double r84851 = r84850 + r84823;
        double r84852 = r84828 - r84830;
        double r84853 = r84852 - r84823;
        double r84854 = r84853 / r84835;
        double r84855 = r84826 * r84854;
        double r84856 = r84851 + r84855;
        double r84857 = r84823 + r84856;
        return r84857;
}

double f(double x1, double x2) {
        double r84858 = 3.0;
        double r84859 = x1;
        double r84860 = r84858 * r84859;
        double r84861 = r84860 * r84859;
        double r84862 = 2.0;
        double r84863 = x2;
        double r84864 = r84862 * r84863;
        double r84865 = r84861 + r84864;
        double r84866 = r84865 - r84859;
        double r84867 = r84859 * r84859;
        double r84868 = 1.0;
        double r84869 = r84867 + r84868;
        double r84870 = r84866 / r84869;
        double r84871 = r84870 - r84858;
        double r84872 = r84862 * r84859;
        double r84873 = r84871 * r84872;
        double r84874 = r84873 * r84869;
        double r84875 = r84861 + r84874;
        double r84876 = cbrt(r84875);
        double r84877 = r84876 * r84876;
        double r84878 = r84870 * r84877;
        double r84879 = r84878 * r84876;
        double r84880 = 4.0;
        double r84881 = r84880 * r84870;
        double r84882 = 6.0;
        double r84883 = r84881 - r84882;
        double r84884 = r84867 * r84883;
        double r84885 = r84869 * r84884;
        double r84886 = r84879 + r84885;
        double r84887 = 3.0;
        double r84888 = pow(r84859, r84887);
        double r84889 = r84861 - r84864;
        double r84890 = r84889 - r84859;
        double r84891 = r84890 / r84869;
        double r84892 = r84858 * r84891;
        double r84893 = r84859 + r84892;
        double r84894 = r84893 + r84859;
        double r84895 = r84888 + r84894;
        double r84896 = r84886 + r84895;
        return r84896;
}

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(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot \left(\left(3 \cdot x1\right) \cdot x1 + \left(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) \cdot \left(2 \cdot x1\right)\right) \cdot \left(x1 \cdot x1 + 1\right)\right) + \left(x1 \cdot x1 + 1\right) \cdot \left(\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)\right) + \left({x1}^{3} + \left(\left(x1 + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + x1\right)\right)}\]
  3. Using strategy rm
  4. Applied add-cube-cbrt0.6

    \[\leadsto \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot \color{blue}{\left(\left(\sqrt[3]{\left(3 \cdot x1\right) \cdot x1 + \left(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) \cdot \left(2 \cdot x1\right)\right) \cdot \left(x1 \cdot x1 + 1\right)} \cdot \sqrt[3]{\left(3 \cdot x1\right) \cdot x1 + \left(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) \cdot \left(2 \cdot x1\right)\right) \cdot \left(x1 \cdot x1 + 1\right)}\right) \cdot \sqrt[3]{\left(3 \cdot x1\right) \cdot x1 + \left(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) \cdot \left(2 \cdot x1\right)\right) \cdot \left(x1 \cdot x1 + 1\right)}\right)} + \left(x1 \cdot x1 + 1\right) \cdot \left(\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)\right) + \left({x1}^{3} + \left(\left(x1 + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + x1\right)\right)\]
  5. Applied associate-*r*0.6

    \[\leadsto \left(\color{blue}{\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot \left(\sqrt[3]{\left(3 \cdot x1\right) \cdot x1 + \left(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) \cdot \left(2 \cdot x1\right)\right) \cdot \left(x1 \cdot x1 + 1\right)} \cdot \sqrt[3]{\left(3 \cdot x1\right) \cdot x1 + \left(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) \cdot \left(2 \cdot x1\right)\right) \cdot \left(x1 \cdot x1 + 1\right)}\right)\right) \cdot \sqrt[3]{\left(3 \cdot x1\right) \cdot x1 + \left(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) \cdot \left(2 \cdot x1\right)\right) \cdot \left(x1 \cdot x1 + 1\right)}} + \left(x1 \cdot x1 + 1\right) \cdot \left(\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)\right) + \left({x1}^{3} + \left(\left(x1 + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + x1\right)\right)\]
  6. Final simplification0.6

    \[\leadsto \left(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} \cdot \left(\sqrt[3]{\left(3 \cdot x1\right) \cdot x1 + \left(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) \cdot \left(2 \cdot x1\right)\right) \cdot \left(x1 \cdot x1 + 1\right)} \cdot \sqrt[3]{\left(3 \cdot x1\right) \cdot x1 + \left(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) \cdot \left(2 \cdot x1\right)\right) \cdot \left(x1 \cdot x1 + 1\right)}\right)\right) \cdot \sqrt[3]{\left(3 \cdot x1\right) \cdot x1 + \left(\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) \cdot \left(2 \cdot x1\right)\right) \cdot \left(x1 \cdot x1 + 1\right)} + \left(x1 \cdot x1 + 1\right) \cdot \left(\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)\right) + \left({x1}^{3} + \left(\left(x1 + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + x1\right)\right)\]

Reproduce

herbie shell --seed 2019304 
(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))))))