Average Error: 0.5 → 0.6
Time: 1.6m
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(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(\left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 6\right) + \left(\sqrt[3]{\frac{x2 \cdot 2 + \left(3 \cdot {x1}^{2} - x1\right)}{{x1}^{2} + 1} - 3} \cdot \left(\sqrt[3]{\frac{x2 \cdot 2 + \left(3 \cdot {x1}^{2} - x1\right)}{{x1}^{2} + 1} - 3} \cdot \sqrt[3]{\frac{x2 \cdot 2 + \left(3 \cdot {x1}^{2} - x1\right)}{{x1}^{2} + 1} - 3}\right)\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) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\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(\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(\left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 6\right) + \left(\sqrt[3]{\frac{x2 \cdot 2 + \left(3 \cdot {x1}^{2} - x1\right)}{{x1}^{2} + 1} - 3} \cdot \left(\sqrt[3]{\frac{x2 \cdot 2 + \left(3 \cdot {x1}^{2} - x1\right)}{{x1}^{2} + 1} - 3} \cdot \sqrt[3]{\frac{x2 \cdot 2 + \left(3 \cdot {x1}^{2} - x1\right)}{{x1}^{2} + 1} - 3}\right)\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) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right) + x1
double f(double x1, double x2) {
        double r424028 = x1;
        double r424029 = 2.0;
        double r424030 = r424029 * r424028;
        double r424031 = 3.0;
        double r424032 = r424031 * r424028;
        double r424033 = r424032 * r424028;
        double r424034 = x2;
        double r424035 = r424029 * r424034;
        double r424036 = r424033 + r424035;
        double r424037 = r424036 - r424028;
        double r424038 = r424028 * r424028;
        double r424039 = 1.0;
        double r424040 = r424038 + r424039;
        double r424041 = r424037 / r424040;
        double r424042 = r424030 * r424041;
        double r424043 = r424041 - r424031;
        double r424044 = r424042 * r424043;
        double r424045 = 4.0;
        double r424046 = r424045 * r424041;
        double r424047 = 6.0;
        double r424048 = r424046 - r424047;
        double r424049 = r424038 * r424048;
        double r424050 = r424044 + r424049;
        double r424051 = r424050 * r424040;
        double r424052 = r424033 * r424041;
        double r424053 = r424051 + r424052;
        double r424054 = r424038 * r424028;
        double r424055 = r424053 + r424054;
        double r424056 = r424055 + r424028;
        double r424057 = r424033 - r424035;
        double r424058 = r424057 - r424028;
        double r424059 = r424058 / r424040;
        double r424060 = r424031 * r424059;
        double r424061 = r424056 + r424060;
        double r424062 = r424028 + r424061;
        return r424062;
}

double f(double x1, double x2) {
        double r424063 = x1;
        double r424064 = 3.0;
        double r424065 = r424064 * r424063;
        double r424066 = r424065 * r424063;
        double r424067 = x2;
        double r424068 = 2.0;
        double r424069 = r424067 * r424068;
        double r424070 = r424066 + r424069;
        double r424071 = r424070 - r424063;
        double r424072 = 1.0;
        double r424073 = r424063 * r424063;
        double r424074 = r424072 + r424073;
        double r424075 = r424071 / r424074;
        double r424076 = r424066 * r424075;
        double r424077 = 4.0;
        double r424078 = r424077 * r424075;
        double r424079 = 6.0;
        double r424080 = r424078 - r424079;
        double r424081 = r424073 * r424080;
        double r424082 = 2.0;
        double r424083 = pow(r424063, r424082);
        double r424084 = r424064 * r424083;
        double r424085 = r424084 - r424063;
        double r424086 = r424069 + r424085;
        double r424087 = r424083 + r424072;
        double r424088 = r424086 / r424087;
        double r424089 = r424088 - r424064;
        double r424090 = cbrt(r424089);
        double r424091 = r424090 * r424090;
        double r424092 = r424090 * r424091;
        double r424093 = r424063 * r424068;
        double r424094 = r424093 * r424075;
        double r424095 = r424092 * r424094;
        double r424096 = r424081 + r424095;
        double r424097 = r424074 * r424096;
        double r424098 = r424076 + r424097;
        double r424099 = r424063 * r424073;
        double r424100 = r424098 + r424099;
        double r424101 = r424063 + r424100;
        double r424102 = r424066 - r424069;
        double r424103 = r424102 - r424063;
        double r424104 = r424103 / r424074;
        double r424105 = r424064 * r424104;
        double r424106 = r424101 + r424105;
        double r424107 = r424106 + r424063;
        return r424107;
}

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 add-cube-cbrt0.6

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

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

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

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

Reproduce

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