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)\]
\[\left(\left(\left(\left(\left(1 + x1 \cdot x1\right) \cdot \left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(x1 \cdot 3\right) \cdot x1 + 2 \cdot x2\right) - x1}{1 + x1 \cdot x1}\right) \cdot \left(\frac{\left(\left(x1 \cdot 3\right) \cdot x1 + 2 \cdot x2\right) - x1}{\sqrt{1 + x1 \cdot x1}} \cdot \frac{1}{\sqrt{1 + x1 \cdot x1}}\right) + \mathsf{fma}\left(x1 \cdot -6, \frac{\mathsf{fma}\left(3, x1 \cdot x1, 2 \cdot x2 - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(4, \frac{\mathsf{fma}\left(3, x1 \cdot x1, 2 \cdot x2 - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, -6\right)\right)\right) + \left(\left(x1 \cdot 3\right) \cdot x1\right) \cdot \frac{\left(\left(x1 \cdot 3\right) \cdot x1 + 2 \cdot x2\right) - x1}{1 + x1 \cdot x1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right) + x1\right) + \frac{\left(\left(x1 \cdot 3\right) \cdot x1 - 2 \cdot x2\right) - x1}{1 + x1 \cdot x1} \cdot 3\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(\left(\left(\left(1 + x1 \cdot x1\right) \cdot \left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(x1 \cdot 3\right) \cdot x1 + 2 \cdot x2\right) - x1}{1 + x1 \cdot x1}\right) \cdot \left(\frac{\left(\left(x1 \cdot 3\right) \cdot x1 + 2 \cdot x2\right) - x1}{\sqrt{1 + x1 \cdot x1}} \cdot \frac{1}{\sqrt{1 + x1 \cdot x1}}\right) + \mathsf{fma}\left(x1 \cdot -6, \frac{\mathsf{fma}\left(3, x1 \cdot x1, 2 \cdot x2 - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(4, \frac{\mathsf{fma}\left(3, x1 \cdot x1, 2 \cdot x2 - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, -6\right)\right)\right) + \left(\left(x1 \cdot 3\right) \cdot x1\right) \cdot \frac{\left(\left(x1 \cdot 3\right) \cdot x1 + 2 \cdot x2\right) - x1}{1 + x1 \cdot x1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right) + x1\right) + \frac{\left(\left(x1 \cdot 3\right) \cdot x1 - 2 \cdot x2\right) - x1}{1 + x1 \cdot x1} \cdot 3\right) + x1
double f(double x1, double x2) {
        double r2756348 = x1;
        double r2756349 = 2.0;
        double r2756350 = r2756349 * r2756348;
        double r2756351 = 3.0;
        double r2756352 = r2756351 * r2756348;
        double r2756353 = r2756352 * r2756348;
        double r2756354 = x2;
        double r2756355 = r2756349 * r2756354;
        double r2756356 = r2756353 + r2756355;
        double r2756357 = r2756356 - r2756348;
        double r2756358 = r2756348 * r2756348;
        double r2756359 = 1.0;
        double r2756360 = r2756358 + r2756359;
        double r2756361 = r2756357 / r2756360;
        double r2756362 = r2756350 * r2756361;
        double r2756363 = r2756361 - r2756351;
        double r2756364 = r2756362 * r2756363;
        double r2756365 = 4.0;
        double r2756366 = r2756365 * r2756361;
        double r2756367 = 6.0;
        double r2756368 = r2756366 - r2756367;
        double r2756369 = r2756358 * r2756368;
        double r2756370 = r2756364 + r2756369;
        double r2756371 = r2756370 * r2756360;
        double r2756372 = r2756353 * r2756361;
        double r2756373 = r2756371 + r2756372;
        double r2756374 = r2756358 * r2756348;
        double r2756375 = r2756373 + r2756374;
        double r2756376 = r2756375 + r2756348;
        double r2756377 = r2756353 - r2756355;
        double r2756378 = r2756377 - r2756348;
        double r2756379 = r2756378 / r2756360;
        double r2756380 = r2756351 * r2756379;
        double r2756381 = r2756376 + r2756380;
        double r2756382 = r2756348 + r2756381;
        return r2756382;
}

double f(double x1, double x2) {
        double r2756383 = 1.0;
        double r2756384 = x1;
        double r2756385 = r2756384 * r2756384;
        double r2756386 = r2756383 + r2756385;
        double r2756387 = 2.0;
        double r2756388 = r2756387 * r2756384;
        double r2756389 = 3.0;
        double r2756390 = r2756384 * r2756389;
        double r2756391 = r2756390 * r2756384;
        double r2756392 = x2;
        double r2756393 = r2756387 * r2756392;
        double r2756394 = r2756391 + r2756393;
        double r2756395 = r2756394 - r2756384;
        double r2756396 = r2756395 / r2756386;
        double r2756397 = r2756388 * r2756396;
        double r2756398 = sqrt(r2756386);
        double r2756399 = r2756395 / r2756398;
        double r2756400 = r2756383 / r2756398;
        double r2756401 = r2756399 * r2756400;
        double r2756402 = r2756397 * r2756401;
        double r2756403 = -6.0;
        double r2756404 = r2756384 * r2756403;
        double r2756405 = r2756393 - r2756384;
        double r2756406 = fma(r2756389, r2756385, r2756405);
        double r2756407 = fma(r2756384, r2756384, r2756383);
        double r2756408 = r2756406 / r2756407;
        double r2756409 = 4.0;
        double r2756410 = fma(r2756409, r2756408, r2756403);
        double r2756411 = r2756385 * r2756410;
        double r2756412 = fma(r2756404, r2756408, r2756411);
        double r2756413 = r2756402 + r2756412;
        double r2756414 = r2756386 * r2756413;
        double r2756415 = r2756391 * r2756396;
        double r2756416 = r2756414 + r2756415;
        double r2756417 = r2756384 * r2756385;
        double r2756418 = r2756416 + r2756417;
        double r2756419 = r2756418 + r2756384;
        double r2756420 = r2756391 - r2756393;
        double r2756421 = r2756420 - r2756384;
        double r2756422 = r2756421 / r2756386;
        double r2756423 = r2756422 * r2756389;
        double r2756424 = r2756419 + r2756423;
        double r2756425 = r2756424 + r2756384;
        return r2756425;
}

Error

Bits error versus x1

Bits error versus x2

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-sqr-sqrt0.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 \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - \color{blue}{\sqrt{6} \cdot \sqrt{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. Applied prod-diff0.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(\mathsf{fma}\left(4, \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}, -\sqrt{6} \cdot \sqrt{6}\right) + \mathsf{fma}\left(-\sqrt{6}, \sqrt{6}, \sqrt{6} \cdot \sqrt{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)\]
  5. 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(\mathsf{fma}\left(4, \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}, -\sqrt{6} \cdot \sqrt{6}\right) \cdot \left(x1 \cdot x1\right) + \mathsf{fma}\left(-\sqrt{6}, \sqrt{6}, \sqrt{6} \cdot \sqrt{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)\]
  6. Simplified0.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(\mathsf{fma}\left(4, \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}, -\sqrt{6} \cdot \sqrt{6}\right) \cdot \left(x1 \cdot x1\right) + \color{blue}{0 \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. Using strategy rm
  8. Applied *-un-lft-identity0.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} - \color{blue}{1 \cdot 3}\right) + \left(\mathsf{fma}\left(4, \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}, -\sqrt{6} \cdot \sqrt{6}\right) \cdot \left(x1 \cdot x1\right) + 0 \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)\]
  9. Applied add-sqr-sqrt0.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}{\color{blue}{\sqrt{x1 \cdot x1 + 1} \cdot \sqrt{x1 \cdot x1 + 1}}} - 1 \cdot 3\right) + \left(\mathsf{fma}\left(4, \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}, -\sqrt{6} \cdot \sqrt{6}\right) \cdot \left(x1 \cdot x1\right) + 0 \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)\]
  10. Applied *-un-lft-identity0.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) - \color{blue}{1 \cdot x1}}{\sqrt{x1 \cdot x1 + 1} \cdot \sqrt{x1 \cdot x1 + 1}} - 1 \cdot 3\right) + \left(\mathsf{fma}\left(4, \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}, -\sqrt{6} \cdot \sqrt{6}\right) \cdot \left(x1 \cdot x1\right) + 0 \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)\]
  11. Applied *-un-lft-identity0.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{\color{blue}{1 \cdot \left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right)} - 1 \cdot x1}{\sqrt{x1 \cdot x1 + 1} \cdot \sqrt{x1 \cdot x1 + 1}} - 1 \cdot 3\right) + \left(\mathsf{fma}\left(4, \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}, -\sqrt{6} \cdot \sqrt{6}\right) \cdot \left(x1 \cdot x1\right) + 0 \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)\]
  12. Applied distribute-lft-out--0.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{\color{blue}{1 \cdot \left(\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1\right)}}{\sqrt{x1 \cdot x1 + 1} \cdot \sqrt{x1 \cdot x1 + 1}} - 1 \cdot 3\right) + \left(\mathsf{fma}\left(4, \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}, -\sqrt{6} \cdot \sqrt{6}\right) \cdot \left(x1 \cdot x1\right) + 0 \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)\]
  13. Applied times-frac0.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(\color{blue}{\frac{1}{\sqrt{x1 \cdot x1 + 1}} \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{\sqrt{x1 \cdot x1 + 1}}} - 1 \cdot 3\right) + \left(\mathsf{fma}\left(4, \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}, -\sqrt{6} \cdot \sqrt{6}\right) \cdot \left(x1 \cdot x1\right) + 0 \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)\]
  14. Applied prod-diff0.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 \color{blue}{\left(\mathsf{fma}\left(\frac{1}{\sqrt{x1 \cdot x1 + 1}}, \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{\sqrt{x1 \cdot x1 + 1}}, -3 \cdot 1\right) + \mathsf{fma}\left(-3, 1, 3 \cdot 1\right)\right)} + \left(\mathsf{fma}\left(4, \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}, -\sqrt{6} \cdot \sqrt{6}\right) \cdot \left(x1 \cdot x1\right) + 0 \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)\]
  15. Applied distribute-lft-in0.5

    \[\leadsto x1 + \left(\left(\left(\left(\left(\color{blue}{\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 \mathsf{fma}\left(\frac{1}{\sqrt{x1 \cdot x1 + 1}}, \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{\sqrt{x1 \cdot x1 + 1}}, -3 \cdot 1\right) + \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 \mathsf{fma}\left(-3, 1, 3 \cdot 1\right)\right)} + \left(\mathsf{fma}\left(4, \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}, -\sqrt{6} \cdot \sqrt{6}\right) \cdot \left(x1 \cdot x1\right) + 0 \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)\]
  16. Applied associate-+l+0.5

    \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\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 \mathsf{fma}\left(\frac{1}{\sqrt{x1 \cdot x1 + 1}}, \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{\sqrt{x1 \cdot x1 + 1}}, -3 \cdot 1\right) + \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 \mathsf{fma}\left(-3, 1, 3 \cdot 1\right) + \left(\mathsf{fma}\left(4, \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}, -\sqrt{6} \cdot \sqrt{6}\right) \cdot \left(x1 \cdot x1\right) + 0 \cdot \left(x1 \cdot x1\right)\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)\]
  17. Simplified0.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 \mathsf{fma}\left(\frac{1}{\sqrt{x1 \cdot x1 + 1}}, \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{\sqrt{x1 \cdot x1 + 1}}, -3 \cdot 1\right) + \color{blue}{\mathsf{fma}\left(\left(0 \cdot 2\right) \cdot x1, \frac{\mathsf{fma}\left(x1 \cdot 3, x1, 2 \cdot x2 - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(4, \frac{\mathsf{fma}\left(x1 \cdot 3, x1, 2 \cdot x2 - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, -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)\]
  18. Using strategy rm
  19. Applied fma-udef0.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 \color{blue}{\left(\frac{1}{\sqrt{x1 \cdot x1 + 1}} \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{\sqrt{x1 \cdot x1 + 1}} + \left(-3 \cdot 1\right)\right)} + \mathsf{fma}\left(\left(0 \cdot 2\right) \cdot x1, \frac{\mathsf{fma}\left(x1 \cdot 3, x1, 2 \cdot x2 - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(4, \frac{\mathsf{fma}\left(x1 \cdot 3, x1, 2 \cdot x2 - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, -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)\]
  20. Applied distribute-rgt-in0.5

    \[\leadsto x1 + \left(\left(\left(\left(\left(\color{blue}{\left(\left(\frac{1}{\sqrt{x1 \cdot x1 + 1}} \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{\sqrt{x1 \cdot x1 + 1}}\right) \cdot \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) + \left(-3 \cdot 1\right) \cdot \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)\right)} + \mathsf{fma}\left(\left(0 \cdot 2\right) \cdot x1, \frac{\mathsf{fma}\left(x1 \cdot 3, x1, 2 \cdot x2 - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(4, \frac{\mathsf{fma}\left(x1 \cdot 3, x1, 2 \cdot x2 - x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, -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)\]
  21. Applied associate-+l+0.5

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

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

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

Reproduce

herbie shell --seed 2019143 +o rules:numerics
(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))))))