Average Error: 0.5 → 0.6
Time: 53.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(\left(\left(\left(x1 \cdot x1\right) \cdot \frac{4 \cdot \left(\left(x1 \cdot x1\right) \cdot 3 + \left(2 \cdot x2 - x1\right)\right)}{1 + x1 \cdot x1} + \left(x1 \cdot x1\right) \cdot -6\right) + x1\right) \cdot \left(1 + x1 \cdot x1\right) + \left(\sqrt[3]{\left(x1 \cdot x1\right) \cdot 3 + \left(2 \cdot x2 - x1\right)} \cdot \sqrt[3]{\left(x1 \cdot x1\right) \cdot 3 + \left(2 \cdot x2 - x1\right)}\right) \cdot \left(\left(\left(2 \cdot x1\right) \cdot \left(\left(1 + x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot x1\right) \cdot 3 + \left(2 \cdot x2 - x1\right)}{1 + x1 \cdot x1} - 3\right)\right) + \left(x1 \cdot x1\right) \cdot 3\right) \cdot \frac{\sqrt[3]{\left(x1 \cdot x1\right) \cdot 3 + \left(2 \cdot x2 - x1\right)}}{1 + x1 \cdot 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(\left(\left(\left(x1 \cdot x1\right) \cdot \frac{4 \cdot \left(\left(x1 \cdot x1\right) \cdot 3 + \left(2 \cdot x2 - x1\right)\right)}{1 + x1 \cdot x1} + \left(x1 \cdot x1\right) \cdot -6\right) + x1\right) \cdot \left(1 + x1 \cdot x1\right) + \left(\sqrt[3]{\left(x1 \cdot x1\right) \cdot 3 + \left(2 \cdot x2 - x1\right)} \cdot \sqrt[3]{\left(x1 \cdot x1\right) \cdot 3 + \left(2 \cdot x2 - x1\right)}\right) \cdot \left(\left(\left(2 \cdot x1\right) \cdot \left(\left(1 + x1 \cdot x1\right) \cdot \left(\frac{\left(x1 \cdot x1\right) \cdot 3 + \left(2 \cdot x2 - x1\right)}{1 + x1 \cdot x1} - 3\right)\right) + \left(x1 \cdot x1\right) \cdot 3\right) \cdot \frac{\sqrt[3]{\left(x1 \cdot x1\right) \cdot 3 + \left(2 \cdot x2 - x1\right)}}{1 + x1 \cdot x1}\right)\right)
double f(double x1, double x2) {
        double r2939693 = x1;
        double r2939694 = 2.0;
        double r2939695 = r2939694 * r2939693;
        double r2939696 = 3.0;
        double r2939697 = r2939696 * r2939693;
        double r2939698 = r2939697 * r2939693;
        double r2939699 = x2;
        double r2939700 = r2939694 * r2939699;
        double r2939701 = r2939698 + r2939700;
        double r2939702 = r2939701 - r2939693;
        double r2939703 = r2939693 * r2939693;
        double r2939704 = 1.0;
        double r2939705 = r2939703 + r2939704;
        double r2939706 = r2939702 / r2939705;
        double r2939707 = r2939695 * r2939706;
        double r2939708 = r2939706 - r2939696;
        double r2939709 = r2939707 * r2939708;
        double r2939710 = 4.0;
        double r2939711 = r2939710 * r2939706;
        double r2939712 = 6.0;
        double r2939713 = r2939711 - r2939712;
        double r2939714 = r2939703 * r2939713;
        double r2939715 = r2939709 + r2939714;
        double r2939716 = r2939715 * r2939705;
        double r2939717 = r2939698 * r2939706;
        double r2939718 = r2939716 + r2939717;
        double r2939719 = r2939703 * r2939693;
        double r2939720 = r2939718 + r2939719;
        double r2939721 = r2939720 + r2939693;
        double r2939722 = r2939698 - r2939700;
        double r2939723 = r2939722 - r2939693;
        double r2939724 = r2939723 / r2939705;
        double r2939725 = r2939696 * r2939724;
        double r2939726 = r2939721 + r2939725;
        double r2939727 = r2939693 + r2939726;
        return r2939727;
}

double f(double x1, double x2) {
        double r2939728 = x1;
        double r2939729 = r2939728 * r2939728;
        double r2939730 = 3.0;
        double r2939731 = r2939729 * r2939730;
        double r2939732 = -2.0;
        double r2939733 = x2;
        double r2939734 = r2939732 * r2939733;
        double r2939735 = r2939728 - r2939734;
        double r2939736 = r2939731 - r2939735;
        double r2939737 = 1.0;
        double r2939738 = r2939737 + r2939729;
        double r2939739 = r2939736 / r2939738;
        double r2939740 = r2939739 * r2939730;
        double r2939741 = r2939740 + r2939728;
        double r2939742 = 4.0;
        double r2939743 = 2.0;
        double r2939744 = r2939743 * r2939733;
        double r2939745 = r2939744 - r2939728;
        double r2939746 = r2939731 + r2939745;
        double r2939747 = r2939742 * r2939746;
        double r2939748 = r2939747 / r2939738;
        double r2939749 = r2939729 * r2939748;
        double r2939750 = -6.0;
        double r2939751 = r2939729 * r2939750;
        double r2939752 = r2939749 + r2939751;
        double r2939753 = r2939752 + r2939728;
        double r2939754 = r2939753 * r2939738;
        double r2939755 = cbrt(r2939746);
        double r2939756 = r2939755 * r2939755;
        double r2939757 = r2939743 * r2939728;
        double r2939758 = r2939746 / r2939738;
        double r2939759 = r2939758 - r2939730;
        double r2939760 = r2939738 * r2939759;
        double r2939761 = r2939757 * r2939760;
        double r2939762 = r2939761 + r2939731;
        double r2939763 = r2939755 / r2939738;
        double r2939764 = r2939762 * r2939763;
        double r2939765 = r2939756 * r2939764;
        double r2939766 = r2939754 + r2939765;
        double r2939767 = r2939741 + r2939766;
        return r2939767;
}

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

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

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

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

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

Reproduce

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