Average Error: 0.5 → 0.7
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(3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \left(\left(x1 \cdot \left(x1 \cdot x1\right) + \left(\frac{\left(x2 \cdot 2 + \left(3 \cdot x1\right) \cdot x1\right) - x1}{x1 \cdot x1 + 1} \cdot \left(\left(3 \cdot x1\right) \cdot x1\right) + \left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(x2 \cdot 2 + \left(3 \cdot x1\right) \cdot x1\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x2 \cdot 2 + \left(3 \cdot x1\right) \cdot x1\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(\sqrt[3]{\left(4 \cdot \frac{\left(x2 \cdot 2 + \left(3 \cdot x1\right) \cdot x1\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(x1 \cdot x1\right)} \cdot \left(\sqrt[3]{\left(4 \cdot \frac{\left(x2 \cdot 2 + \left(3 \cdot x1\right) \cdot x1\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(x1 \cdot x1\right)} \cdot \sqrt[3]{\left(4 \cdot \frac{\left(x2 \cdot 2 + \left(3 \cdot x1\right) \cdot x1\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(x1 \cdot x1\right)}\right) + \left(-6 \cdot \left(x1 \cdot x1\right)\right)\right)\right) \cdot \left(x1 \cdot x1 + 1\right)\right)\right) + x1\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(3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - x2 \cdot 2\right) - x1}{x1 \cdot x1 + 1} + \left(\left(x1 \cdot \left(x1 \cdot x1\right) + \left(\frac{\left(x2 \cdot 2 + \left(3 \cdot x1\right) \cdot x1\right) - x1}{x1 \cdot x1 + 1} \cdot \left(\left(3 \cdot x1\right) \cdot x1\right) + \left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(x2 \cdot 2 + \left(3 \cdot x1\right) \cdot x1\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(x2 \cdot 2 + \left(3 \cdot x1\right) \cdot x1\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(\sqrt[3]{\left(4 \cdot \frac{\left(x2 \cdot 2 + \left(3 \cdot x1\right) \cdot x1\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(x1 \cdot x1\right)} \cdot \left(\sqrt[3]{\left(4 \cdot \frac{\left(x2 \cdot 2 + \left(3 \cdot x1\right) \cdot x1\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(x1 \cdot x1\right)} \cdot \sqrt[3]{\left(4 \cdot \frac{\left(x2 \cdot 2 + \left(3 \cdot x1\right) \cdot x1\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(x1 \cdot x1\right)}\right) + \left(-6 \cdot \left(x1 \cdot x1\right)\right)\right)\right) \cdot \left(x1 \cdot x1 + 1\right)\right)\right) + x1\right)\right) + x1
double f(double x1, double x2) {
        double r2978059 = x1;
        double r2978060 = 2.0;
        double r2978061 = r2978060 * r2978059;
        double r2978062 = 3.0;
        double r2978063 = r2978062 * r2978059;
        double r2978064 = r2978063 * r2978059;
        double r2978065 = x2;
        double r2978066 = r2978060 * r2978065;
        double r2978067 = r2978064 + r2978066;
        double r2978068 = r2978067 - r2978059;
        double r2978069 = r2978059 * r2978059;
        double r2978070 = 1.0;
        double r2978071 = r2978069 + r2978070;
        double r2978072 = r2978068 / r2978071;
        double r2978073 = r2978061 * r2978072;
        double r2978074 = r2978072 - r2978062;
        double r2978075 = r2978073 * r2978074;
        double r2978076 = 4.0;
        double r2978077 = r2978076 * r2978072;
        double r2978078 = 6.0;
        double r2978079 = r2978077 - r2978078;
        double r2978080 = r2978069 * r2978079;
        double r2978081 = r2978075 + r2978080;
        double r2978082 = r2978081 * r2978071;
        double r2978083 = r2978064 * r2978072;
        double r2978084 = r2978082 + r2978083;
        double r2978085 = r2978069 * r2978059;
        double r2978086 = r2978084 + r2978085;
        double r2978087 = r2978086 + r2978059;
        double r2978088 = r2978064 - r2978066;
        double r2978089 = r2978088 - r2978059;
        double r2978090 = r2978089 / r2978071;
        double r2978091 = r2978062 * r2978090;
        double r2978092 = r2978087 + r2978091;
        double r2978093 = r2978059 + r2978092;
        return r2978093;
}

double f(double x1, double x2) {
        double r2978094 = 3.0;
        double r2978095 = x1;
        double r2978096 = r2978094 * r2978095;
        double r2978097 = r2978096 * r2978095;
        double r2978098 = x2;
        double r2978099 = 2.0;
        double r2978100 = r2978098 * r2978099;
        double r2978101 = r2978097 - r2978100;
        double r2978102 = r2978101 - r2978095;
        double r2978103 = r2978095 * r2978095;
        double r2978104 = 1.0;
        double r2978105 = r2978103 + r2978104;
        double r2978106 = r2978102 / r2978105;
        double r2978107 = r2978094 * r2978106;
        double r2978108 = r2978095 * r2978103;
        double r2978109 = r2978100 + r2978097;
        double r2978110 = r2978109 - r2978095;
        double r2978111 = r2978110 / r2978105;
        double r2978112 = r2978111 * r2978097;
        double r2978113 = r2978099 * r2978095;
        double r2978114 = r2978113 * r2978111;
        double r2978115 = r2978111 - r2978094;
        double r2978116 = r2978114 * r2978115;
        double r2978117 = 4.0;
        double r2978118 = r2978117 * r2978111;
        double r2978119 = r2978118 * r2978103;
        double r2978120 = cbrt(r2978119);
        double r2978121 = r2978120 * r2978120;
        double r2978122 = r2978120 * r2978121;
        double r2978123 = 6.0;
        double r2978124 = r2978123 * r2978103;
        double r2978125 = -r2978124;
        double r2978126 = r2978122 + r2978125;
        double r2978127 = r2978116 + r2978126;
        double r2978128 = r2978127 * r2978105;
        double r2978129 = r2978112 + r2978128;
        double r2978130 = r2978108 + r2978129;
        double r2978131 = r2978130 + r2978095;
        double r2978132 = r2978107 + r2978131;
        double r2978133 = r2978132 + r2978095;
        return r2978133;
}

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 sub-neg0.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) + \left(x1 \cdot x1\right) \cdot \color{blue}{\left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} + \left(-6\right)\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. Applied distribute-rgt-in0.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) + \color{blue}{\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(x1 \cdot x1\right) + \left(-6\right) \cdot \left(x1 \cdot x1\right)\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. Using strategy rm
  6. Applied add-cube-cbrt0.7

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

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

Reproduce

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