Average Error: 0.5 → 0.6
Time: 1.1m
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 + 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(\sqrt[3]{\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)} \cdot \sqrt[3]{\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 \sqrt[3]{\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(\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(\sqrt[3]{\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)} \cdot \sqrt[3]{\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 \sqrt[3]{\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 r219731 = x1;
        double r219732 = 2.0;
        double r219733 = r219732 * r219731;
        double r219734 = 3.0;
        double r219735 = r219734 * r219731;
        double r219736 = r219735 * r219731;
        double r219737 = x2;
        double r219738 = r219732 * r219737;
        double r219739 = r219736 + r219738;
        double r219740 = r219739 - r219731;
        double r219741 = r219731 * r219731;
        double r219742 = 1.0;
        double r219743 = r219741 + r219742;
        double r219744 = r219740 / r219743;
        double r219745 = r219733 * r219744;
        double r219746 = r219744 - r219734;
        double r219747 = r219745 * r219746;
        double r219748 = 4.0;
        double r219749 = r219748 * r219744;
        double r219750 = 6.0;
        double r219751 = r219749 - r219750;
        double r219752 = r219741 * r219751;
        double r219753 = r219747 + r219752;
        double r219754 = r219753 * r219743;
        double r219755 = r219736 * r219744;
        double r219756 = r219754 + r219755;
        double r219757 = r219741 * r219731;
        double r219758 = r219756 + r219757;
        double r219759 = r219758 + r219731;
        double r219760 = r219736 - r219738;
        double r219761 = r219760 - r219731;
        double r219762 = r219761 / r219743;
        double r219763 = r219734 * r219762;
        double r219764 = r219759 + r219763;
        double r219765 = r219731 + r219764;
        return r219765;
}

double f(double x1, double x2) {
        double r219766 = 3.0;
        double r219767 = x1;
        double r219768 = r219766 * r219767;
        double r219769 = r219768 * r219767;
        double r219770 = 2.0;
        double r219771 = x2;
        double r219772 = r219770 * r219771;
        double r219773 = r219769 + r219772;
        double r219774 = r219773 - r219767;
        double r219775 = r219767 * r219767;
        double r219776 = 1.0;
        double r219777 = r219775 + r219776;
        double r219778 = r219774 / r219777;
        double r219779 = r219778 - r219766;
        double r219780 = r219770 * r219767;
        double r219781 = r219779 * r219780;
        double r219782 = r219781 * r219777;
        double r219783 = r219769 + r219782;
        double r219784 = r219778 * r219783;
        double r219785 = 4.0;
        double r219786 = r219785 * r219778;
        double r219787 = 6.0;
        double r219788 = r219786 - r219787;
        double r219789 = r219775 * r219788;
        double r219790 = cbrt(r219789);
        double r219791 = r219790 * r219790;
        double r219792 = r219791 * r219790;
        double r219793 = r219777 * r219792;
        double r219794 = r219784 + r219793;
        double r219795 = 3.0;
        double r219796 = pow(r219767, r219795);
        double r219797 = r219769 - r219772;
        double r219798 = r219797 - r219767;
        double r219799 = r219798 / r219777;
        double r219800 = r219766 * r219799;
        double r219801 = r219767 + r219800;
        double r219802 = r219801 + r219767;
        double r219803 = r219796 + r219802;
        double r219804 = r219794 + r219803;
        return r219804;
}

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 \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 \color{blue}{\left(\left(\sqrt[3]{\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)} \cdot \sqrt[3]{\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 \sqrt[3]{\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. Final simplification0.6

    \[\leadsto \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(\sqrt[3]{\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)} \cdot \sqrt[3]{\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 \sqrt[3]{\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 2019350 
(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))))))