Average Error: 0.5 → 0.6
Time: 41.2s
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 \left(\sqrt[3]{x1 \cdot x1} \cdot \sqrt[3]{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 \left(\sqrt[3]{x1 \cdot x1} \cdot \sqrt[3]{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 r66252 = x1;
        double r66253 = 2.0;
        double r66254 = r66253 * r66252;
        double r66255 = 3.0;
        double r66256 = r66255 * r66252;
        double r66257 = r66256 * r66252;
        double r66258 = x2;
        double r66259 = r66253 * r66258;
        double r66260 = r66257 + r66259;
        double r66261 = r66260 - r66252;
        double r66262 = r66252 * r66252;
        double r66263 = 1.0;
        double r66264 = r66262 + r66263;
        double r66265 = r66261 / r66264;
        double r66266 = r66254 * r66265;
        double r66267 = r66265 - r66255;
        double r66268 = r66266 * r66267;
        double r66269 = 4.0;
        double r66270 = r66269 * r66265;
        double r66271 = 6.0;
        double r66272 = r66270 - r66271;
        double r66273 = r66262 * r66272;
        double r66274 = r66268 + r66273;
        double r66275 = r66274 * r66264;
        double r66276 = r66257 * r66265;
        double r66277 = r66275 + r66276;
        double r66278 = r66262 * r66252;
        double r66279 = r66277 + r66278;
        double r66280 = r66279 + r66252;
        double r66281 = r66257 - r66259;
        double r66282 = r66281 - r66252;
        double r66283 = r66282 / r66264;
        double r66284 = r66255 * r66283;
        double r66285 = r66280 + r66284;
        double r66286 = r66252 + r66285;
        return r66286;
}

double f(double x1, double x2) {
        double r66287 = 3.0;
        double r66288 = x1;
        double r66289 = r66287 * r66288;
        double r66290 = r66289 * r66288;
        double r66291 = 2.0;
        double r66292 = x2;
        double r66293 = r66291 * r66292;
        double r66294 = r66290 + r66293;
        double r66295 = r66294 - r66288;
        double r66296 = r66288 * r66288;
        double r66297 = 1.0;
        double r66298 = r66296 + r66297;
        double r66299 = r66295 / r66298;
        double r66300 = r66299 - r66287;
        double r66301 = r66291 * r66288;
        double r66302 = r66300 * r66301;
        double r66303 = r66302 * r66298;
        double r66304 = r66290 + r66303;
        double r66305 = r66299 * r66304;
        double r66306 = 4.0;
        double r66307 = r66306 * r66299;
        double r66308 = 6.0;
        double r66309 = r66307 - r66308;
        double r66310 = r66296 * r66309;
        double r66311 = cbrt(r66310);
        double r66312 = cbrt(r66296);
        double r66313 = cbrt(r66309);
        double r66314 = r66312 * r66313;
        double r66315 = r66311 * r66314;
        double r66316 = r66315 * r66311;
        double r66317 = r66298 * r66316;
        double r66318 = r66305 + r66317;
        double r66319 = 3.0;
        double r66320 = pow(r66288, r66319);
        double r66321 = r66290 - r66293;
        double r66322 = r66321 - r66288;
        double r66323 = r66322 / r66298;
        double r66324 = r66287 * r66323;
        double r66325 = r66288 + r66324;
        double r66326 = r66325 + r66288;
        double r66327 = r66320 + r66326;
        double r66328 = r66318 + r66327;
        return r66328;
}

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. Using strategy rm
  6. Applied cbrt-prod0.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 \color{blue}{\left(\sqrt[3]{x1 \cdot x1} \cdot \sqrt[3]{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)\]
  7. 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 \left(\sqrt[3]{x1 \cdot x1} \cdot \sqrt[3]{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 2019326 
(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))))))