Average Error: 0.5 → 0.5
Time: 35.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(\frac{\left(\left(3 \cdot x1\right) \cdot x1 - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} \cdot 3 + \left(x1 + \left(\left(\left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \left(1 + x1 \cdot x1\right) \cdot \left(\frac{\left(\left(\frac{\left(3 \cdot {x1}^{2} + x2 \cdot 2\right) - x1}{{x1}^{2} + 1} \cdot 4 - 6\right) \cdot \left(x1 \cdot \left(6 + \frac{\left(3 \cdot {x1}^{2} + x2 \cdot 2\right) - x1}{{x1}^{2} + 1} \cdot 4\right)\right)\right) \cdot x1}{4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + 6} + \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right)\right)\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right) + x1\]
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(\left(3 \cdot x1\right) \cdot x1 - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} \cdot 3 + \left(x1 + \left(\left(\left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \left(1 + x1 \cdot x1\right) \cdot \left(\frac{\left(\left(\frac{\left(3 \cdot {x1}^{2} + x2 \cdot 2\right) - x1}{{x1}^{2} + 1} \cdot 4 - 6\right) \cdot \left(x1 \cdot \left(6 + \frac{\left(3 \cdot {x1}^{2} + x2 \cdot 2\right) - x1}{{x1}^{2} + 1} \cdot 4\right)\right)\right) \cdot x1}{4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + 6} + \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right)\right)\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right) + x1
double f(double x1, double x2) {
        double r62741 = x1;
        double r62742 = 2.0;
        double r62743 = r62742 * r62741;
        double r62744 = 3.0;
        double r62745 = r62744 * r62741;
        double r62746 = r62745 * r62741;
        double r62747 = x2;
        double r62748 = r62742 * r62747;
        double r62749 = r62746 + r62748;
        double r62750 = r62749 - r62741;
        double r62751 = r62741 * r62741;
        double r62752 = 1.0;
        double r62753 = r62751 + r62752;
        double r62754 = r62750 / r62753;
        double r62755 = r62743 * r62754;
        double r62756 = r62754 - r62744;
        double r62757 = r62755 * r62756;
        double r62758 = 4.0;
        double r62759 = r62758 * r62754;
        double r62760 = 6.0;
        double r62761 = r62759 - r62760;
        double r62762 = r62751 * r62761;
        double r62763 = r62757 + r62762;
        double r62764 = r62763 * r62753;
        double r62765 = r62746 * r62754;
        double r62766 = r62764 + r62765;
        double r62767 = r62751 * r62741;
        double r62768 = r62766 + r62767;
        double r62769 = r62768 + r62741;
        double r62770 = r62746 - r62748;
        double r62771 = r62770 - r62741;
        double r62772 = r62771 / r62753;
        double r62773 = r62744 * r62772;
        double r62774 = r62769 + r62773;
        double r62775 = r62741 + r62774;
        return r62775;
}

double f(double x1, double x2) {
        double r62776 = 3.0;
        double r62777 = x1;
        double r62778 = r62776 * r62777;
        double r62779 = r62778 * r62777;
        double r62780 = x2;
        double r62781 = 2.0;
        double r62782 = r62780 * r62781;
        double r62783 = r62779 - r62782;
        double r62784 = r62783 - r62777;
        double r62785 = 1.0;
        double r62786 = r62777 * r62777;
        double r62787 = r62785 + r62786;
        double r62788 = r62784 / r62787;
        double r62789 = r62788 * r62776;
        double r62790 = r62779 + r62782;
        double r62791 = r62790 - r62777;
        double r62792 = r62791 / r62787;
        double r62793 = r62779 * r62792;
        double r62794 = 2.0;
        double r62795 = pow(r62777, r62794);
        double r62796 = r62776 * r62795;
        double r62797 = r62796 + r62782;
        double r62798 = r62797 - r62777;
        double r62799 = r62795 + r62785;
        double r62800 = r62798 / r62799;
        double r62801 = 4.0;
        double r62802 = r62800 * r62801;
        double r62803 = 6.0;
        double r62804 = r62802 - r62803;
        double r62805 = r62803 + r62802;
        double r62806 = r62777 * r62805;
        double r62807 = r62804 * r62806;
        double r62808 = r62807 * r62777;
        double r62809 = r62801 * r62792;
        double r62810 = r62809 + r62803;
        double r62811 = r62808 / r62810;
        double r62812 = r62792 - r62776;
        double r62813 = r62777 * r62781;
        double r62814 = r62813 * r62792;
        double r62815 = r62812 * r62814;
        double r62816 = r62811 + r62815;
        double r62817 = r62787 * r62816;
        double r62818 = r62793 + r62817;
        double r62819 = r62777 * r62786;
        double r62820 = r62818 + r62819;
        double r62821 = r62777 + r62820;
        double r62822 = r62789 + r62821;
        double r62823 = r62822 + r62777;
        return r62823;
}

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. Using strategy rm
  3. Applied flip--8.1

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

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

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

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

Reproduce

herbie shell --seed 2019179 
(FPCore (x1 x2)
  :name "Rosa's FloatVsDoubleBenchmark"
  (+ x1 (+ (+ (+ (+ (* (+ (* (* (* 2.0 x1) (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))) (- (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)) 3.0)) (* (* x1 x1) (- (* 4.0 (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))) 6.0))) (+ (* x1 x1) 1.0)) (* (* (* 3.0 x1) x1) (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))) (* (* x1 x1) x1)) x1) (* 3.0 (/ (- (- (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))))))