Average Error: 0.5 → 0.5
Time: 1.4m
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)\]
\[x1 + \left(3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \left(\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(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 6\right) \cdot \left(x1 \cdot x1\right) + \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 3\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) + 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)
x1 + \left(3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \left(\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(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 6\right) \cdot \left(x1 \cdot x1\right) + \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 3\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) + x1\right)\right)
double f(double x1, double x2) {
        double r2238266 = x1;
        double r2238267 = 2.0;
        double r2238268 = r2238267 * r2238266;
        double r2238269 = 3.0;
        double r2238270 = r2238269 * r2238266;
        double r2238271 = r2238270 * r2238266;
        double r2238272 = x2;
        double r2238273 = r2238267 * r2238272;
        double r2238274 = r2238271 + r2238273;
        double r2238275 = r2238274 - r2238266;
        double r2238276 = r2238266 * r2238266;
        double r2238277 = 1.0;
        double r2238278 = r2238276 + r2238277;
        double r2238279 = r2238275 / r2238278;
        double r2238280 = r2238268 * r2238279;
        double r2238281 = r2238279 - r2238269;
        double r2238282 = r2238280 * r2238281;
        double r2238283 = 4.0;
        double r2238284 = r2238283 * r2238279;
        double r2238285 = 6.0;
        double r2238286 = r2238284 - r2238285;
        double r2238287 = r2238276 * r2238286;
        double r2238288 = r2238282 + r2238287;
        double r2238289 = r2238288 * r2238278;
        double r2238290 = r2238271 * r2238279;
        double r2238291 = r2238289 + r2238290;
        double r2238292 = r2238276 * r2238266;
        double r2238293 = r2238291 + r2238292;
        double r2238294 = r2238293 + r2238266;
        double r2238295 = r2238271 - r2238273;
        double r2238296 = r2238295 - r2238266;
        double r2238297 = r2238296 / r2238278;
        double r2238298 = r2238269 * r2238297;
        double r2238299 = r2238294 + r2238298;
        double r2238300 = r2238266 + r2238299;
        return r2238300;
}

double f(double x1, double x2) {
        double r2238301 = x1;
        double r2238302 = 3.0;
        double r2238303 = r2238302 * r2238301;
        double r2238304 = r2238303 * r2238301;
        double r2238305 = x2;
        double r2238306 = 2.0;
        double r2238307 = r2238305 * r2238306;
        double r2238308 = r2238304 - r2238307;
        double r2238309 = r2238308 - r2238301;
        double r2238310 = 1.0;
        double r2238311 = r2238301 * r2238301;
        double r2238312 = r2238310 + r2238311;
        double r2238313 = r2238309 / r2238312;
        double r2238314 = r2238302 * r2238313;
        double r2238315 = r2238304 + r2238307;
        double r2238316 = r2238315 - r2238301;
        double r2238317 = r2238316 / r2238312;
        double r2238318 = r2238304 * r2238317;
        double r2238319 = 4.0;
        double r2238320 = r2238319 * r2238317;
        double r2238321 = 6.0;
        double r2238322 = r2238320 - r2238321;
        double r2238323 = r2238322 * r2238311;
        double r2238324 = r2238317 - r2238302;
        double r2238325 = r2238301 * r2238306;
        double r2238326 = r2238325 * r2238317;
        double r2238327 = r2238324 * r2238326;
        double r2238328 = r2238323 + r2238327;
        double r2238329 = r2238312 * r2238328;
        double r2238330 = r2238318 + r2238329;
        double r2238331 = r2238301 * r2238311;
        double r2238332 = r2238330 + r2238331;
        double r2238333 = r2238332 + r2238301;
        double r2238334 = r2238314 + r2238333;
        double r2238335 = r2238301 + r2238334;
        return r2238335;
}

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. Final simplification0.5

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

Reproduce

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