Rosa's FloatVsDoubleBenchmark

Percentage Accurate: 70.1% → 99.7%
Time: 35.9s
Alternatives: 23
Speedup: 42.3×

Specification

?
\[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := 2 \cdot x2\\ t_2 := x1 \cdot x1\\ t_3 := t_2 + 1\\ t_4 := \frac{\left(t_0 + t_1\right) - x1}{t_3}\\ x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t_4\right) \cdot \left(t_4 - 3\right) + t_2 \cdot \left(4 \cdot t_4 - 6\right)\right) \cdot t_3 + t_0 \cdot t_4\right) + t_2 \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t_0 - t_1\right) - x1}{t_3}\right) \end{array} \]

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 23 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Alternative 1: 99.7% accurate, 0.1× speedup?

\[\begin{array}{l} t_0 := \mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)\\ \mathbf{if}\;x1 \leq -5 \cdot 10^{+153} \lor \neg \left(x1 \leq 5 \cdot 10^{+153}\right):\\ \;\;\;\;x1 + \mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot 3\right) - x1, x1\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \mathsf{fma}\left(3, -2 \cdot x2 - x1, \mathsf{fma}\left(x1, x1 \cdot 9, \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + \left(x1 \cdot \left(x1 \cdot -6\right) + \frac{t_0}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot \left(-6 + \frac{t_0}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2}}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right)\right)\right)\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if x1 < -5.00000000000000018e153 or 5.00000000000000018e153 < x1

    1. Initial program 0.0%

      \[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. Taylor expanded in x1 around 0 0.0%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 66.0%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + \left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. +-commutative66.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + -1 \cdot x1\right)}\right) \]
      2. neg-mul-166.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg66.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)}\right) \]
      4. +-commutative66.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + -2 \cdot x2\right)} - x1\right)\right) \]
      5. *-commutative66.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(\color{blue}{{x1}^{2} \cdot \left(3 - -2 \cdot x2\right)} + -2 \cdot x2\right) - x1\right)\right) \]
      6. fma-def66.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\mathsf{fma}\left({x1}^{2}, 3 - -2 \cdot x2, -2 \cdot x2\right)} - x1\right)\right) \]
      7. unpow266.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(\color{blue}{x1 \cdot x1}, 3 - -2 \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      8. cancel-sign-sub-inv66.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{3 + \left(--2\right) \cdot x2}, -2 \cdot x2\right) - x1\right)\right) \]
      9. metadata-eval66.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + \color{blue}{2} \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      10. +-commutative66.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{2 \cdot x2 + 3}, -2 \cdot x2\right) - x1\right)\right) \]
      11. *-commutative66.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, \color{blue}{x2 \cdot -2}\right) - x1\right)\right) \]
    5. Simplified66.0%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)}\right) \]
    6. Step-by-step derivation
      1. *-un-lft-identity66.0%

        \[\leadsto x1 + \color{blue}{1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right)} \]
      2. fma-def66.0%

        \[\leadsto x1 + 1 \cdot \left(\color{blue}{\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right), x1\right)} + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      3. fma-neg66.0%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \color{blue}{\mathsf{fma}\left(2, x2, -3\right)}\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      4. metadata-eval66.0%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, \color{blue}{-3}\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      5. fma-def66.0%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{\mathsf{fma}\left(2, x2, 3\right)}, x2 \cdot -2\right) - x1\right)\right) \]
    7. Applied egg-rr66.0%

      \[\leadsto x1 + \color{blue}{1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right)\right)} \]
    8. Step-by-step derivation
      1. *-lft-identity66.0%

        \[\leadsto x1 + \color{blue}{\left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right)\right)} \]
      2. +-commutative66.0%

        \[\leadsto x1 + \color{blue}{\left(3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right) + \mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right)\right)} \]
      3. fma-def66.0%

        \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right)\right)} \]
      4. fma-udef66.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right)\right) + x1}\right) \]
      5. associate-*r*66.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{\left(4 \cdot x2\right) \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right)} + x1\right) \]
      6. fma-def66.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{\mathsf{fma}\left(4 \cdot x2, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)}\right) \]
      7. *-commutative66.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(\color{blue}{x2 \cdot 4}, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)\right) \]
    9. Simplified66.0%

      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(x2 \cdot 4, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)\right)} \]
    10. Taylor expanded in x2 around 0 100.0%

      \[\leadsto x1 + \color{blue}{\left(x1 + 3 \cdot \left(3 \cdot {x1}^{2} - x1\right)\right)} \]
    11. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto x1 + \color{blue}{\left(3 \cdot \left(3 \cdot {x1}^{2} - x1\right) + x1\right)} \]
      2. fma-def100.0%

        \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, 3 \cdot {x1}^{2} - x1, x1\right)} \]
      3. *-commutative100.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{{x1}^{2} \cdot 3} - x1, x1\right) \]
      4. unpow2100.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{\left(x1 \cdot x1\right)} \cdot 3 - x1, x1\right) \]
      5. associate-*l*100.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{x1 \cdot \left(x1 \cdot 3\right)} - x1, x1\right) \]
    12. Simplified100.0%

      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot 3\right) - x1, x1\right)} \]

    if -5.00000000000000018e153 < x1 < 5.00000000000000018e153

    1. Initial program 89.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. Step-by-step derivation
      1. +-commutative89.5%

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

      \[\leadsto \color{blue}{x1 + \mathsf{fma}\left(3, \frac{x1 \cdot \left(x1 \cdot 3\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(x1, x1 \cdot \frac{\mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{3}}, \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + \left(x1 \cdot \left(x1 \cdot -6\right) + \frac{\mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot \left(-6 + \frac{\mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2}}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right)\right)\right)} \]
    4. Taylor expanded in x1 around inf 98.4%

      \[\leadsto x1 + \mathsf{fma}\left(3, \frac{x1 \cdot \left(x1 \cdot 3\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}, \mathsf{fma}\left(x1, x1 \cdot \color{blue}{9}, \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + \left(x1 \cdot \left(x1 \cdot -6\right) + \frac{\mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot \left(-6 + \frac{\mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2}}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right)\right)\right) \]
    5. Taylor expanded in x1 around 0 99.7%

      \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{-1 \cdot x1 + -2 \cdot x2}, \mathsf{fma}\left(x1, x1 \cdot 9, \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + \left(x1 \cdot \left(x1 \cdot -6\right) + \frac{\mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot \left(-6 + \frac{\mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2}}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right)\right)\right) \]
    6. Step-by-step derivation
      1. +-commutative99.7%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{-2 \cdot x2 + -1 \cdot x1}, \mathsf{fma}\left(x1, x1 \cdot 9, \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + \left(x1 \cdot \left(x1 \cdot -6\right) + \frac{\mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot \left(-6 + \frac{\mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2}}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right)\right)\right) \]
      2. neg-mul-199.7%

        \[\leadsto x1 + \mathsf{fma}\left(3, -2 \cdot x2 + \color{blue}{\left(-x1\right)}, \mathsf{fma}\left(x1, x1 \cdot 9, \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + \left(x1 \cdot \left(x1 \cdot -6\right) + \frac{\mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot \left(-6 + \frac{\mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2}}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right)\right)\right) \]
      3. unsub-neg99.7%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{-2 \cdot x2 - x1}, \mathsf{fma}\left(x1, x1 \cdot 9, \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + \left(x1 \cdot \left(x1 \cdot -6\right) + \frac{\mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot \left(-6 + \frac{\mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2}}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right)\right)\right) \]
    7. Simplified99.7%

      \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{-2 \cdot x2 - x1}, \mathsf{fma}\left(x1, x1 \cdot 9, \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + \left(x1 \cdot \left(x1 \cdot -6\right) + \frac{\mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot \left(-6 + \frac{\mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2}}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right)\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification99.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -5 \cdot 10^{+153} \lor \neg \left(x1 \leq 5 \cdot 10^{+153}\right):\\ \;\;\;\;x1 + \mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot 3\right) - x1, x1\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \mathsf{fma}\left(3, -2 \cdot x2 - x1, \mathsf{fma}\left(x1, x1 \cdot 9, \mathsf{fma}\left(x1, x1, 1\right) \cdot \left(x1 + \left(x1 \cdot \left(x1 \cdot -6\right) + \frac{\mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(x1 \cdot \left(-6 + \frac{\mathsf{fma}\left(x1, x1 \cdot 3, \mathsf{fma}\left(2, x2, -x1\right)\right)}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{2}}\right) + \left(x1 \cdot x1\right) \cdot 4\right)\right)\right)\right)\right)\\ \end{array} \]

Alternative 2: 98.0% accurate, 1.0× speedup?

\[\begin{array}{l} t_0 := 1 + x1 \cdot x1\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := \frac{\left(t_1 + x2 \cdot 2\right) - x1}{t_0}\\ t_3 := x1 + \mathsf{fma}\left(3, t_1 - x1, x1\right)\\ \mathbf{if}\;x1 \leq -7.1 \cdot 10^{+183}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(\left(x1 + 8 \cdot \left(x2 \cdot \left(x1 \cdot x2 - x2 \cdot {x1}^{3}\right)\right)\right) + 3 \cdot \left(-2 \cdot x2\right)\right)\\ \mathbf{elif}\;x1 \leq 4 \cdot 10^{+153}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(t_1 - x2 \cdot 2\right) - x1}{t_0} + \left(x1 + \left(\left(t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) + t_1 \cdot t_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if x1 < -7.1000000000000001e183 or 4e153 < x1

    1. Initial program 0.0%

      \[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. Taylor expanded in x1 around 0 0.0%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 65.2%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + \left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. +-commutative65.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + -1 \cdot x1\right)}\right) \]
      2. neg-mul-165.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg65.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)}\right) \]
      4. +-commutative65.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + -2 \cdot x2\right)} - x1\right)\right) \]
      5. *-commutative65.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(\color{blue}{{x1}^{2} \cdot \left(3 - -2 \cdot x2\right)} + -2 \cdot x2\right) - x1\right)\right) \]
      6. fma-def65.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\mathsf{fma}\left({x1}^{2}, 3 - -2 \cdot x2, -2 \cdot x2\right)} - x1\right)\right) \]
      7. unpow265.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(\color{blue}{x1 \cdot x1}, 3 - -2 \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      8. cancel-sign-sub-inv65.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{3 + \left(--2\right) \cdot x2}, -2 \cdot x2\right) - x1\right)\right) \]
      9. metadata-eval65.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + \color{blue}{2} \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      10. +-commutative65.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{2 \cdot x2 + 3}, -2 \cdot x2\right) - x1\right)\right) \]
      11. *-commutative65.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, \color{blue}{x2 \cdot -2}\right) - x1\right)\right) \]
    5. Simplified65.2%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)}\right) \]
    6. Step-by-step derivation
      1. *-un-lft-identity65.2%

        \[\leadsto x1 + \color{blue}{1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right)} \]
      2. fma-def65.2%

        \[\leadsto x1 + 1 \cdot \left(\color{blue}{\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right), x1\right)} + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      3. fma-neg65.2%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \color{blue}{\mathsf{fma}\left(2, x2, -3\right)}\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      4. metadata-eval65.2%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, \color{blue}{-3}\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      5. fma-def65.2%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{\mathsf{fma}\left(2, x2, 3\right)}, x2 \cdot -2\right) - x1\right)\right) \]
    7. Applied egg-rr65.2%

      \[\leadsto x1 + \color{blue}{1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right)\right)} \]
    8. Step-by-step derivation
      1. *-lft-identity65.2%

        \[\leadsto x1 + \color{blue}{\left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right)\right)} \]
      2. +-commutative65.2%

        \[\leadsto x1 + \color{blue}{\left(3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right) + \mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right)\right)} \]
      3. fma-def65.2%

        \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right)\right)} \]
      4. fma-udef65.2%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right)\right) + x1}\right) \]
      5. associate-*r*65.2%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{\left(4 \cdot x2\right) \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right)} + x1\right) \]
      6. fma-def65.2%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{\mathsf{fma}\left(4 \cdot x2, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)}\right) \]
      7. *-commutative65.2%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(\color{blue}{x2 \cdot 4}, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)\right) \]
    9. Simplified65.2%

      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(x2 \cdot 4, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)\right)} \]
    10. Taylor expanded in x2 around 0 100.0%

      \[\leadsto x1 + \color{blue}{\left(x1 + 3 \cdot \left(3 \cdot {x1}^{2} - x1\right)\right)} \]
    11. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto x1 + \color{blue}{\left(3 \cdot \left(3 \cdot {x1}^{2} - x1\right) + x1\right)} \]
      2. fma-def100.0%

        \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, 3 \cdot {x1}^{2} - x1, x1\right)} \]
      3. *-commutative100.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{{x1}^{2} \cdot 3} - x1, x1\right) \]
      4. unpow2100.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{\left(x1 \cdot x1\right)} \cdot 3 - x1, x1\right) \]
      5. associate-*l*100.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{x1 \cdot \left(x1 \cdot 3\right)} - x1, x1\right) \]
    12. Simplified100.0%

      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot 3\right) - x1, x1\right)} \]

    if -7.1000000000000001e183 < x1 < -5.60000000000000037e102

    1. Initial program 0.0%

      \[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. Taylor expanded in x2 around inf 0.3%

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{{x2}^{2} \cdot x1}{1 + {x1}^{2}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Step-by-step derivation
      1. associate-/l*0.3%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\frac{{x2}^{2}}{\frac{1 + {x1}^{2}}{x1}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      2. unpow20.3%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{\color{blue}{x2 \cdot x2}}{\frac{1 + {x1}^{2}}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      3. +-commutative0.3%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{{x1}^{2} + 1}}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      4. unpow20.3%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{x1 \cdot x1} + 1}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      5. fma-udef0.3%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{\mathsf{fma}\left(x1, x1, 1\right)}}{x1}} + 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.3%

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    5. Taylor expanded in x1 around 0 0.3%

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}} + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2\right)}\right) \]
    6. Step-by-step derivation
      1. *-commutative0.3%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    7. Simplified0.3%

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}} + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    8. Taylor expanded in x1 around 0 44.4%

      \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(-1 \cdot \left({x2}^{2} \cdot {x1}^{3}\right) + {x2}^{2} \cdot x1\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    9. Step-by-step derivation
      1. +-commutative44.4%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left({x2}^{2} \cdot x1 + -1 \cdot \left({x2}^{2} \cdot {x1}^{3}\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      2. mul-1-neg44.4%

        \[\leadsto x1 + \left(\left(8 \cdot \left({x2}^{2} \cdot x1 + \color{blue}{\left(-{x2}^{2} \cdot {x1}^{3}\right)}\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      3. unsub-neg44.4%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left({x2}^{2} \cdot x1 - {x2}^{2} \cdot {x1}^{3}\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      4. unpow244.4%

        \[\leadsto x1 + \left(\left(8 \cdot \left(\color{blue}{\left(x2 \cdot x2\right)} \cdot x1 - {x2}^{2} \cdot {x1}^{3}\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      5. associate-*l*44.4%

        \[\leadsto x1 + \left(\left(8 \cdot \left(\color{blue}{x2 \cdot \left(x2 \cdot x1\right)} - {x2}^{2} \cdot {x1}^{3}\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      6. unpow244.4%

        \[\leadsto x1 + \left(\left(8 \cdot \left(x2 \cdot \left(x2 \cdot x1\right) - \color{blue}{\left(x2 \cdot x2\right)} \cdot {x1}^{3}\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      7. associate-*l*88.9%

        \[\leadsto x1 + \left(\left(8 \cdot \left(x2 \cdot \left(x2 \cdot x1\right) - \color{blue}{x2 \cdot \left(x2 \cdot {x1}^{3}\right)}\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    10. Simplified88.9%

      \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(x2 \cdot \left(x2 \cdot x1\right) - x2 \cdot \left(x2 \cdot {x1}^{3}\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    11. Step-by-step derivation
      1. distribute-lft-out--94.4%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(x2 \cdot \left(x2 \cdot x1 - x2 \cdot {x1}^{3}\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      2. *-commutative94.4%

        \[\leadsto x1 + \left(\left(8 \cdot \left(x2 \cdot \left(\color{blue}{x1 \cdot x2} - x2 \cdot {x1}^{3}\right)\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    12. Applied egg-rr94.4%

      \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(x2 \cdot \left(x1 \cdot x2 - x2 \cdot {x1}^{3}\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]

    if -5.60000000000000037e102 < x1 < 4e153

    1. Initial program 99.4%

      \[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) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -7.1 \cdot 10^{+183}:\\ \;\;\;\;x1 + \mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot 3\right) - x1, x1\right)\\ \mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(\left(x1 + 8 \cdot \left(x2 \cdot \left(x1 \cdot x2 - x2 \cdot {x1}^{3}\right)\right)\right) + 3 \cdot \left(-2 \cdot x2\right)\right)\\ \mathbf{elif}\;x1 \leq 4 \cdot 10^{+153}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \left(x1 + \left(\left(\left(1 + x1 \cdot x1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 6\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot 3\right) - x1, x1\right)\\ \end{array} \]

Alternative 3: 99.1% accurate, 1.0× speedup?

\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := x1 + \mathsf{fma}\left(3, t_0 - x1, x1\right)\\ t_2 := 1 + x1 \cdot x1\\ t_3 := 3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_2}\\ t_4 := \frac{\left(t_0 + x2 \cdot 2\right) - x1}{t_2}\\ \mathbf{if}\;x1 \leq -1 \cdot 10^{+154}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x1 \leq -2 \cdot 10^{+104}:\\ \;\;\;\;x1 + \left(\left(x1 + {x1}^{4} \cdot 6\right) + t_3\right)\\ \mathbf{elif}\;x1 \leq 4 \cdot 10^{+153}:\\ \;\;\;\;x1 + \left(t_3 + \left(x1 + \left(\left(t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_4\right) \cdot \left(t_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_4 - 6\right)\right) + t_0 \cdot t_4\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if x1 < -1.00000000000000004e154 or 4e153 < x1

    1. Initial program 0.0%

      \[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. Taylor expanded in x1 around 0 0.0%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 66.0%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + \left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. +-commutative66.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + -1 \cdot x1\right)}\right) \]
      2. neg-mul-166.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg66.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)}\right) \]
      4. +-commutative66.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + -2 \cdot x2\right)} - x1\right)\right) \]
      5. *-commutative66.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(\color{blue}{{x1}^{2} \cdot \left(3 - -2 \cdot x2\right)} + -2 \cdot x2\right) - x1\right)\right) \]
      6. fma-def66.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\mathsf{fma}\left({x1}^{2}, 3 - -2 \cdot x2, -2 \cdot x2\right)} - x1\right)\right) \]
      7. unpow266.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(\color{blue}{x1 \cdot x1}, 3 - -2 \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      8. cancel-sign-sub-inv66.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{3 + \left(--2\right) \cdot x2}, -2 \cdot x2\right) - x1\right)\right) \]
      9. metadata-eval66.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + \color{blue}{2} \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      10. +-commutative66.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{2 \cdot x2 + 3}, -2 \cdot x2\right) - x1\right)\right) \]
      11. *-commutative66.0%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, \color{blue}{x2 \cdot -2}\right) - x1\right)\right) \]
    5. Simplified66.0%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)}\right) \]
    6. Step-by-step derivation
      1. *-un-lft-identity66.0%

        \[\leadsto x1 + \color{blue}{1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right)} \]
      2. fma-def66.0%

        \[\leadsto x1 + 1 \cdot \left(\color{blue}{\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right), x1\right)} + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      3. fma-neg66.0%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \color{blue}{\mathsf{fma}\left(2, x2, -3\right)}\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      4. metadata-eval66.0%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, \color{blue}{-3}\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      5. fma-def66.0%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{\mathsf{fma}\left(2, x2, 3\right)}, x2 \cdot -2\right) - x1\right)\right) \]
    7. Applied egg-rr66.0%

      \[\leadsto x1 + \color{blue}{1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right)\right)} \]
    8. Step-by-step derivation
      1. *-lft-identity66.0%

        \[\leadsto x1 + \color{blue}{\left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right)\right)} \]
      2. +-commutative66.0%

        \[\leadsto x1 + \color{blue}{\left(3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right) + \mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right)\right)} \]
      3. fma-def66.0%

        \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right)\right)} \]
      4. fma-udef66.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right)\right) + x1}\right) \]
      5. associate-*r*66.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{\left(4 \cdot x2\right) \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right)} + x1\right) \]
      6. fma-def66.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{\mathsf{fma}\left(4 \cdot x2, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)}\right) \]
      7. *-commutative66.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(\color{blue}{x2 \cdot 4}, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)\right) \]
    9. Simplified66.0%

      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(x2 \cdot 4, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)\right)} \]
    10. Taylor expanded in x2 around 0 100.0%

      \[\leadsto x1 + \color{blue}{\left(x1 + 3 \cdot \left(3 \cdot {x1}^{2} - x1\right)\right)} \]
    11. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto x1 + \color{blue}{\left(3 \cdot \left(3 \cdot {x1}^{2} - x1\right) + x1\right)} \]
      2. fma-def100.0%

        \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, 3 \cdot {x1}^{2} - x1, x1\right)} \]
      3. *-commutative100.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{{x1}^{2} \cdot 3} - x1, x1\right) \]
      4. unpow2100.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{\left(x1 \cdot x1\right)} \cdot 3 - x1, x1\right) \]
      5. associate-*l*100.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{x1 \cdot \left(x1 \cdot 3\right)} - x1, x1\right) \]
    12. Simplified100.0%

      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot 3\right) - x1, x1\right)} \]

    if -1.00000000000000004e154 < x1 < -2e104

    1. Initial program 0.0%

      \[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. Taylor expanded in x1 around inf 100.0%

      \[\leadsto x1 + \left(\left(\color{blue}{6 \cdot {x1}^{4}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Step-by-step derivation
      1. *-commutative100.0%

        \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot 6} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    4. Simplified100.0%

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

    if -2e104 < x1 < 4e153

    1. Initial program 99.4%

      \[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) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification99.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -1 \cdot 10^{+154}:\\ \;\;\;\;x1 + \mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot 3\right) - x1, x1\right)\\ \mathbf{elif}\;x1 \leq -2 \cdot 10^{+104}:\\ \;\;\;\;x1 + \left(\left(x1 + {x1}^{4} \cdot 6\right) + 3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right)\\ \mathbf{elif}\;x1 \leq 4 \cdot 10^{+153}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \left(x1 + \left(\left(\left(1 + x1 \cdot x1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 6\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot 3\right) - x1, x1\right)\\ \end{array} \]

Alternative 4: 97.1% accurate, 1.0× speedup?

\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := x1 + \mathsf{fma}\left(3, t_0 - x1, x1\right)\\ t_2 := 1 + x1 \cdot x1\\ t_3 := \frac{\left(t_0 + x2 \cdot 2\right) - x1}{t_2}\\ \mathbf{if}\;x1 \leq -7.1 \cdot 10^{+183}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(\left(x1 + 8 \cdot \left(x2 \cdot \left(x1 \cdot x2 - x2 \cdot {x1}^{3}\right)\right)\right) + 3 \cdot \left(-2 \cdot x2\right)\right)\\ \mathbf{elif}\;x1 \leq 4 \cdot 10^{+153}:\\ \;\;\;\;x1 + \left(\left(x1 + \left(\left(t_2 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(t_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_3 - 6\right)\right) + t_0 \cdot t_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(-2 \cdot x2 - x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if x1 < -7.1000000000000001e183 or 4e153 < x1

    1. Initial program 0.0%

      \[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. Taylor expanded in x1 around 0 0.0%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 65.2%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + \left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. +-commutative65.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + -1 \cdot x1\right)}\right) \]
      2. neg-mul-165.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg65.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)}\right) \]
      4. +-commutative65.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + -2 \cdot x2\right)} - x1\right)\right) \]
      5. *-commutative65.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(\color{blue}{{x1}^{2} \cdot \left(3 - -2 \cdot x2\right)} + -2 \cdot x2\right) - x1\right)\right) \]
      6. fma-def65.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\mathsf{fma}\left({x1}^{2}, 3 - -2 \cdot x2, -2 \cdot x2\right)} - x1\right)\right) \]
      7. unpow265.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(\color{blue}{x1 \cdot x1}, 3 - -2 \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      8. cancel-sign-sub-inv65.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{3 + \left(--2\right) \cdot x2}, -2 \cdot x2\right) - x1\right)\right) \]
      9. metadata-eval65.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + \color{blue}{2} \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      10. +-commutative65.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{2 \cdot x2 + 3}, -2 \cdot x2\right) - x1\right)\right) \]
      11. *-commutative65.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, \color{blue}{x2 \cdot -2}\right) - x1\right)\right) \]
    5. Simplified65.2%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)}\right) \]
    6. Step-by-step derivation
      1. *-un-lft-identity65.2%

        \[\leadsto x1 + \color{blue}{1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right)} \]
      2. fma-def65.2%

        \[\leadsto x1 + 1 \cdot \left(\color{blue}{\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right), x1\right)} + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      3. fma-neg65.2%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \color{blue}{\mathsf{fma}\left(2, x2, -3\right)}\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      4. metadata-eval65.2%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, \color{blue}{-3}\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      5. fma-def65.2%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{\mathsf{fma}\left(2, x2, 3\right)}, x2 \cdot -2\right) - x1\right)\right) \]
    7. Applied egg-rr65.2%

      \[\leadsto x1 + \color{blue}{1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right)\right)} \]
    8. Step-by-step derivation
      1. *-lft-identity65.2%

        \[\leadsto x1 + \color{blue}{\left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right)\right)} \]
      2. +-commutative65.2%

        \[\leadsto x1 + \color{blue}{\left(3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right) + \mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right)\right)} \]
      3. fma-def65.2%

        \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right)\right)} \]
      4. fma-udef65.2%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right)\right) + x1}\right) \]
      5. associate-*r*65.2%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{\left(4 \cdot x2\right) \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right)} + x1\right) \]
      6. fma-def65.2%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{\mathsf{fma}\left(4 \cdot x2, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)}\right) \]
      7. *-commutative65.2%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(\color{blue}{x2 \cdot 4}, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)\right) \]
    9. Simplified65.2%

      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(x2 \cdot 4, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)\right)} \]
    10. Taylor expanded in x2 around 0 100.0%

      \[\leadsto x1 + \color{blue}{\left(x1 + 3 \cdot \left(3 \cdot {x1}^{2} - x1\right)\right)} \]
    11. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto x1 + \color{blue}{\left(3 \cdot \left(3 \cdot {x1}^{2} - x1\right) + x1\right)} \]
      2. fma-def100.0%

        \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, 3 \cdot {x1}^{2} - x1, x1\right)} \]
      3. *-commutative100.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{{x1}^{2} \cdot 3} - x1, x1\right) \]
      4. unpow2100.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{\left(x1 \cdot x1\right)} \cdot 3 - x1, x1\right) \]
      5. associate-*l*100.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{x1 \cdot \left(x1 \cdot 3\right)} - x1, x1\right) \]
    12. Simplified100.0%

      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot 3\right) - x1, x1\right)} \]

    if -7.1000000000000001e183 < x1 < -5.60000000000000037e102

    1. Initial program 0.0%

      \[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. Taylor expanded in x2 around inf 0.3%

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{{x2}^{2} \cdot x1}{1 + {x1}^{2}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Step-by-step derivation
      1. associate-/l*0.3%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\frac{{x2}^{2}}{\frac{1 + {x1}^{2}}{x1}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      2. unpow20.3%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{\color{blue}{x2 \cdot x2}}{\frac{1 + {x1}^{2}}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      3. +-commutative0.3%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{{x1}^{2} + 1}}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      4. unpow20.3%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{x1 \cdot x1} + 1}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      5. fma-udef0.3%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{\mathsf{fma}\left(x1, x1, 1\right)}}{x1}} + 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.3%

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    5. Taylor expanded in x1 around 0 0.3%

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}} + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2\right)}\right) \]
    6. Step-by-step derivation
      1. *-commutative0.3%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    7. Simplified0.3%

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}} + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    8. Taylor expanded in x1 around 0 44.4%

      \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(-1 \cdot \left({x2}^{2} \cdot {x1}^{3}\right) + {x2}^{2} \cdot x1\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    9. Step-by-step derivation
      1. +-commutative44.4%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left({x2}^{2} \cdot x1 + -1 \cdot \left({x2}^{2} \cdot {x1}^{3}\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      2. mul-1-neg44.4%

        \[\leadsto x1 + \left(\left(8 \cdot \left({x2}^{2} \cdot x1 + \color{blue}{\left(-{x2}^{2} \cdot {x1}^{3}\right)}\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      3. unsub-neg44.4%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left({x2}^{2} \cdot x1 - {x2}^{2} \cdot {x1}^{3}\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      4. unpow244.4%

        \[\leadsto x1 + \left(\left(8 \cdot \left(\color{blue}{\left(x2 \cdot x2\right)} \cdot x1 - {x2}^{2} \cdot {x1}^{3}\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      5. associate-*l*44.4%

        \[\leadsto x1 + \left(\left(8 \cdot \left(\color{blue}{x2 \cdot \left(x2 \cdot x1\right)} - {x2}^{2} \cdot {x1}^{3}\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      6. unpow244.4%

        \[\leadsto x1 + \left(\left(8 \cdot \left(x2 \cdot \left(x2 \cdot x1\right) - \color{blue}{\left(x2 \cdot x2\right)} \cdot {x1}^{3}\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      7. associate-*l*88.9%

        \[\leadsto x1 + \left(\left(8 \cdot \left(x2 \cdot \left(x2 \cdot x1\right) - \color{blue}{x2 \cdot \left(x2 \cdot {x1}^{3}\right)}\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    10. Simplified88.9%

      \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(x2 \cdot \left(x2 \cdot x1\right) - x2 \cdot \left(x2 \cdot {x1}^{3}\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    11. Step-by-step derivation
      1. distribute-lft-out--94.4%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(x2 \cdot \left(x2 \cdot x1 - x2 \cdot {x1}^{3}\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      2. *-commutative94.4%

        \[\leadsto x1 + \left(\left(8 \cdot \left(x2 \cdot \left(\color{blue}{x1 \cdot x2} - x2 \cdot {x1}^{3}\right)\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    12. Applied egg-rr94.4%

      \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(x2 \cdot \left(x1 \cdot x2 - x2 \cdot {x1}^{3}\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]

    if -5.60000000000000037e102 < x1 < 4e153

    1. Initial program 99.4%

      \[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. Taylor expanded in x1 around 0 98.0%

      \[\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} - 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 \color{blue}{\left(-1 \cdot x1 + -2 \cdot x2\right)}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification98.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -7.1 \cdot 10^{+183}:\\ \;\;\;\;x1 + \mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot 3\right) - x1, x1\right)\\ \mathbf{elif}\;x1 \leq -5.6 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(\left(x1 + 8 \cdot \left(x2 \cdot \left(x1 \cdot x2 - x2 \cdot {x1}^{3}\right)\right)\right) + 3 \cdot \left(-2 \cdot x2\right)\right)\\ \mathbf{elif}\;x1 \leq 4 \cdot 10^{+153}:\\ \;\;\;\;x1 + \left(\left(x1 + \left(\left(\left(1 + x1 \cdot x1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 6\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(-2 \cdot x2 - x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot 3\right) - x1, x1\right)\\ \end{array} \]

Alternative 5: 96.8% accurate, 1.0× speedup?

\[\begin{array}{l} t_0 := 1 + x1 \cdot x1\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := x1 + \mathsf{fma}\left(3, t_1 - x1, x1\right)\\ t_3 := \frac{\left(t_1 + x2 \cdot 2\right) - x1}{t_0}\\ \mathbf{if}\;x1 \leq -3.2 \cdot 10^{+181}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x1 \leq -3.7 \cdot 10^{+104}:\\ \;\;\;\;x1 + \left(3 \cdot \left(-2 \cdot x2\right) + \left(x1 - 8 \cdot \left({x1}^{3} \cdot \left(x2 \cdot x2\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 4 \cdot 10^{+153}:\\ \;\;\;\;x1 + \left(\left(x1 + \left(\left(t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_3\right) \cdot \left(t_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_3 - 6\right)\right) + t_1 \cdot t_3\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(-2 \cdot x2 - x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if x1 < -3.2e181 or 4e153 < x1

    1. Initial program 0.0%

      \[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. Taylor expanded in x1 around 0 0.0%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 65.6%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + \left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. +-commutative65.6%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + -1 \cdot x1\right)}\right) \]
      2. neg-mul-165.6%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg65.6%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)}\right) \]
      4. +-commutative65.6%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + -2 \cdot x2\right)} - x1\right)\right) \]
      5. *-commutative65.6%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(\color{blue}{{x1}^{2} \cdot \left(3 - -2 \cdot x2\right)} + -2 \cdot x2\right) - x1\right)\right) \]
      6. fma-def65.6%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\mathsf{fma}\left({x1}^{2}, 3 - -2 \cdot x2, -2 \cdot x2\right)} - x1\right)\right) \]
      7. unpow265.6%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(\color{blue}{x1 \cdot x1}, 3 - -2 \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      8. cancel-sign-sub-inv65.6%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{3 + \left(--2\right) \cdot x2}, -2 \cdot x2\right) - x1\right)\right) \]
      9. metadata-eval65.6%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + \color{blue}{2} \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      10. +-commutative65.6%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{2 \cdot x2 + 3}, -2 \cdot x2\right) - x1\right)\right) \]
      11. *-commutative65.6%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, \color{blue}{x2 \cdot -2}\right) - x1\right)\right) \]
    5. Simplified65.6%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)}\right) \]
    6. Step-by-step derivation
      1. *-un-lft-identity65.6%

        \[\leadsto x1 + \color{blue}{1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right)} \]
      2. fma-def65.6%

        \[\leadsto x1 + 1 \cdot \left(\color{blue}{\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right), x1\right)} + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      3. fma-neg65.6%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \color{blue}{\mathsf{fma}\left(2, x2, -3\right)}\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      4. metadata-eval65.6%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, \color{blue}{-3}\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      5. fma-def65.6%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{\mathsf{fma}\left(2, x2, 3\right)}, x2 \cdot -2\right) - x1\right)\right) \]
    7. Applied egg-rr65.6%

      \[\leadsto x1 + \color{blue}{1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right)\right)} \]
    8. Step-by-step derivation
      1. *-lft-identity65.6%

        \[\leadsto x1 + \color{blue}{\left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right)\right)} \]
      2. +-commutative65.6%

        \[\leadsto x1 + \color{blue}{\left(3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right) + \mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right)\right)} \]
      3. fma-def65.6%

        \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right)\right)} \]
      4. fma-udef65.6%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right)\right) + x1}\right) \]
      5. associate-*r*65.6%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{\left(4 \cdot x2\right) \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right)} + x1\right) \]
      6. fma-def65.6%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{\mathsf{fma}\left(4 \cdot x2, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)}\right) \]
      7. *-commutative65.6%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(\color{blue}{x2 \cdot 4}, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)\right) \]
    9. Simplified65.6%

      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(x2 \cdot 4, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)\right)} \]
    10. Taylor expanded in x2 around 0 100.0%

      \[\leadsto x1 + \color{blue}{\left(x1 + 3 \cdot \left(3 \cdot {x1}^{2} - x1\right)\right)} \]
    11. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto x1 + \color{blue}{\left(3 \cdot \left(3 \cdot {x1}^{2} - x1\right) + x1\right)} \]
      2. fma-def100.0%

        \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, 3 \cdot {x1}^{2} - x1, x1\right)} \]
      3. *-commutative100.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{{x1}^{2} \cdot 3} - x1, x1\right) \]
      4. unpow2100.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{\left(x1 \cdot x1\right)} \cdot 3 - x1, x1\right) \]
      5. associate-*l*100.0%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{x1 \cdot \left(x1 \cdot 3\right)} - x1, x1\right) \]
    12. Simplified100.0%

      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot 3\right) - x1, x1\right)} \]

    if -3.2e181 < x1 < -3.6999999999999998e104

    1. Initial program 0.0%

      \[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. Taylor expanded in x2 around inf 0.3%

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{{x2}^{2} \cdot x1}{1 + {x1}^{2}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Step-by-step derivation
      1. associate-/l*0.3%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\frac{{x2}^{2}}{\frac{1 + {x1}^{2}}{x1}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      2. unpow20.3%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{\color{blue}{x2 \cdot x2}}{\frac{1 + {x1}^{2}}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      3. +-commutative0.3%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{{x1}^{2} + 1}}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      4. unpow20.3%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{x1 \cdot x1} + 1}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      5. fma-udef0.3%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{\mathsf{fma}\left(x1, x1, 1\right)}}{x1}} + 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.3%

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    5. Taylor expanded in x1 around 0 0.3%

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}} + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2\right)}\right) \]
    6. Step-by-step derivation
      1. *-commutative0.3%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    7. Simplified0.3%

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}} + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    8. Taylor expanded in x1 around 0 50.0%

      \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(-1 \cdot \left({x2}^{2} \cdot {x1}^{3}\right) + {x2}^{2} \cdot x1\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    9. Step-by-step derivation
      1. +-commutative50.0%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left({x2}^{2} \cdot x1 + -1 \cdot \left({x2}^{2} \cdot {x1}^{3}\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      2. mul-1-neg50.0%

        \[\leadsto x1 + \left(\left(8 \cdot \left({x2}^{2} \cdot x1 + \color{blue}{\left(-{x2}^{2} \cdot {x1}^{3}\right)}\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      3. unsub-neg50.0%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left({x2}^{2} \cdot x1 - {x2}^{2} \cdot {x1}^{3}\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      4. unpow250.0%

        \[\leadsto x1 + \left(\left(8 \cdot \left(\color{blue}{\left(x2 \cdot x2\right)} \cdot x1 - {x2}^{2} \cdot {x1}^{3}\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      5. associate-*l*50.0%

        \[\leadsto x1 + \left(\left(8 \cdot \left(\color{blue}{x2 \cdot \left(x2 \cdot x1\right)} - {x2}^{2} \cdot {x1}^{3}\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      6. unpow250.0%

        \[\leadsto x1 + \left(\left(8 \cdot \left(x2 \cdot \left(x2 \cdot x1\right) - \color{blue}{\left(x2 \cdot x2\right)} \cdot {x1}^{3}\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      7. associate-*l*87.5%

        \[\leadsto x1 + \left(\left(8 \cdot \left(x2 \cdot \left(x2 \cdot x1\right) - \color{blue}{x2 \cdot \left(x2 \cdot {x1}^{3}\right)}\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    10. Simplified87.5%

      \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(x2 \cdot \left(x2 \cdot x1\right) - x2 \cdot \left(x2 \cdot {x1}^{3}\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    11. Taylor expanded in x1 around inf 62.5%

      \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(-1 \cdot \left({x2}^{2} \cdot {x1}^{3}\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    12. Step-by-step derivation
      1. mul-1-neg62.5%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(-{x2}^{2} \cdot {x1}^{3}\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      2. unpow262.5%

        \[\leadsto x1 + \left(\left(8 \cdot \left(-\color{blue}{\left(x2 \cdot x2\right)} \cdot {x1}^{3}\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      3. distribute-lft-neg-in62.5%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(\left(-x2 \cdot x2\right) \cdot {x1}^{3}\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      4. *-commutative62.5%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left({x1}^{3} \cdot \left(-x2 \cdot x2\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    13. Simplified62.5%

      \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left({x1}^{3} \cdot \left(-x2 \cdot x2\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]

    if -3.6999999999999998e104 < x1 < 4e153

    1. Initial program 98.7%

      \[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. Taylor expanded in x1 around 0 97.3%

      \[\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} - 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 \color{blue}{\left(-1 \cdot x1 + -2 \cdot x2\right)}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification96.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -3.2 \cdot 10^{+181}:\\ \;\;\;\;x1 + \mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot 3\right) - x1, x1\right)\\ \mathbf{elif}\;x1 \leq -3.7 \cdot 10^{+104}:\\ \;\;\;\;x1 + \left(3 \cdot \left(-2 \cdot x2\right) + \left(x1 - 8 \cdot \left({x1}^{3} \cdot \left(x2 \cdot x2\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 4 \cdot 10^{+153}:\\ \;\;\;\;x1 + \left(\left(x1 + \left(\left(\left(1 + x1 \cdot x1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 6\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(-2 \cdot x2 - x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot 3\right) - x1, x1\right)\\ \end{array} \]

Alternative 6: 94.8% accurate, 1.1× speedup?

\[\begin{array}{l} t_0 := 1 + x1 \cdot x1\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := \frac{\left(t_1 + x2 \cdot 2\right) - x1}{t_0}\\ \mathbf{if}\;x1 \leq -1.05 \cdot 10^{+103} \lor \neg \left(x1 \leq 4 \cdot 10^{+153}\right):\\ \;\;\;\;x1 + \mathsf{fma}\left(3, t_1 - x1, x1\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(x1 + \left(\left(t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) + t_1 \cdot t_2\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(-2 \cdot x2 - x1\right)\right)\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if x1 < -1.0500000000000001e103 or 4e153 < x1

    1. Initial program 0.0%

      \[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. Taylor expanded in x1 around 0 0.0%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 57.2%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + \left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. +-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + -1 \cdot x1\right)}\right) \]
      2. neg-mul-157.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)}\right) \]
      4. +-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + -2 \cdot x2\right)} - x1\right)\right) \]
      5. *-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(\color{blue}{{x1}^{2} \cdot \left(3 - -2 \cdot x2\right)} + -2 \cdot x2\right) - x1\right)\right) \]
      6. fma-def57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\mathsf{fma}\left({x1}^{2}, 3 - -2 \cdot x2, -2 \cdot x2\right)} - x1\right)\right) \]
      7. unpow257.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(\color{blue}{x1 \cdot x1}, 3 - -2 \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      8. cancel-sign-sub-inv57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{3 + \left(--2\right) \cdot x2}, -2 \cdot x2\right) - x1\right)\right) \]
      9. metadata-eval57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + \color{blue}{2} \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      10. +-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{2 \cdot x2 + 3}, -2 \cdot x2\right) - x1\right)\right) \]
      11. *-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, \color{blue}{x2 \cdot -2}\right) - x1\right)\right) \]
    5. Simplified57.2%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)}\right) \]
    6. Step-by-step derivation
      1. *-un-lft-identity57.2%

        \[\leadsto x1 + \color{blue}{1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right)} \]
      2. fma-def57.2%

        \[\leadsto x1 + 1 \cdot \left(\color{blue}{\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right), x1\right)} + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      3. fma-neg57.2%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \color{blue}{\mathsf{fma}\left(2, x2, -3\right)}\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      4. metadata-eval57.2%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, \color{blue}{-3}\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      5. fma-def57.2%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{\mathsf{fma}\left(2, x2, 3\right)}, x2 \cdot -2\right) - x1\right)\right) \]
    7. Applied egg-rr57.2%

      \[\leadsto x1 + \color{blue}{1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right)\right)} \]
    8. Step-by-step derivation
      1. *-lft-identity57.2%

        \[\leadsto x1 + \color{blue}{\left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right)\right)} \]
      2. +-commutative57.2%

        \[\leadsto x1 + \color{blue}{\left(3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right) + \mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right)\right)} \]
      3. fma-def57.2%

        \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right)\right)} \]
      4. fma-udef57.2%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right)\right) + x1}\right) \]
      5. associate-*r*57.2%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{\left(4 \cdot x2\right) \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right)} + x1\right) \]
      6. fma-def57.2%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{\mathsf{fma}\left(4 \cdot x2, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)}\right) \]
      7. *-commutative57.2%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(\color{blue}{x2 \cdot 4}, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)\right) \]
    9. Simplified57.2%

      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(x2 \cdot 4, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)\right)} \]
    10. Taylor expanded in x2 around 0 86.5%

      \[\leadsto x1 + \color{blue}{\left(x1 + 3 \cdot \left(3 \cdot {x1}^{2} - x1\right)\right)} \]
    11. Step-by-step derivation
      1. +-commutative86.5%

        \[\leadsto x1 + \color{blue}{\left(3 \cdot \left(3 \cdot {x1}^{2} - x1\right) + x1\right)} \]
      2. fma-def86.5%

        \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, 3 \cdot {x1}^{2} - x1, x1\right)} \]
      3. *-commutative86.5%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{{x1}^{2} \cdot 3} - x1, x1\right) \]
      4. unpow286.5%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{\left(x1 \cdot x1\right)} \cdot 3 - x1, x1\right) \]
      5. associate-*l*86.5%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{x1 \cdot \left(x1 \cdot 3\right)} - x1, x1\right) \]
    12. Simplified86.5%

      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot 3\right) - x1, x1\right)} \]

    if -1.0500000000000001e103 < x1 < 4e153

    1. Initial program 99.4%

      \[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. Taylor expanded in x1 around 0 98.0%

      \[\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} - 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 \color{blue}{\left(-1 \cdot x1 + -2 \cdot x2\right)}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification93.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -1.05 \cdot 10^{+103} \lor \neg \left(x1 \leq 4 \cdot 10^{+153}\right):\\ \;\;\;\;x1 + \mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot 3\right) - x1, x1\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(x1 + \left(\left(\left(1 + x1 \cdot x1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 6\right)\right) + \left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right) + x1 \cdot \left(x1 \cdot x1\right)\right)\right) + 3 \cdot \left(-2 \cdot x2 - x1\right)\right)\\ \end{array} \]

Alternative 7: 85.8% accurate, 1.1× speedup?

\[\begin{array}{l} t_0 := 1 + x1 \cdot x1\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := \frac{\left(t_1 + x2 \cdot 2\right) - x1}{t_0}\\ \mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102} \lor \neg \left(x1 \leq 4.5 \cdot 10^{+153}\right):\\ \;\;\;\;x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(2, x2, 3\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \left(-2 \cdot x2 - x1\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t_1 + t_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right) + \left(t_2 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x2 \cdot 2 - x1\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if x1 < -5.60000000000000037e102 or 4.5000000000000001e153 < x1

    1. Initial program 0.0%

      \[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. Taylor expanded in x1 around 0 0.0%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 57.2%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + \left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. +-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + -1 \cdot x1\right)}\right) \]
      2. neg-mul-157.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)}\right) \]
      4. +-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + -2 \cdot x2\right)} - x1\right)\right) \]
      5. *-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(\color{blue}{{x1}^{2} \cdot \left(3 - -2 \cdot x2\right)} + -2 \cdot x2\right) - x1\right)\right) \]
      6. fma-def57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\mathsf{fma}\left({x1}^{2}, 3 - -2 \cdot x2, -2 \cdot x2\right)} - x1\right)\right) \]
      7. unpow257.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(\color{blue}{x1 \cdot x1}, 3 - -2 \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      8. cancel-sign-sub-inv57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{3 + \left(--2\right) \cdot x2}, -2 \cdot x2\right) - x1\right)\right) \]
      9. metadata-eval57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + \color{blue}{2} \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      10. +-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{2 \cdot x2 + 3}, -2 \cdot x2\right) - x1\right)\right) \]
      11. *-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, \color{blue}{x2 \cdot -2}\right) - x1\right)\right) \]
    5. Simplified57.2%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)}\right) \]
    6. Taylor expanded in x1 around inf 74.5%

      \[\leadsto x1 + \color{blue}{3 \cdot \left({x1}^{2} \cdot \left(3 + 2 \cdot x2\right)\right)} \]
    7. Step-by-step derivation
      1. unpow274.5%

        \[\leadsto x1 + 3 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot \left(3 + 2 \cdot x2\right)\right) \]
      2. +-commutative74.5%

        \[\leadsto x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(2 \cdot x2 + 3\right)}\right) \]
      3. fma-udef74.5%

        \[\leadsto x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\mathsf{fma}\left(2, x2, 3\right)}\right) \]
    8. Simplified74.5%

      \[\leadsto x1 + \color{blue}{3 \cdot \left(\left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(2, x2, 3\right)\right)} \]

    if -5.60000000000000037e102 < x1 < 4.5000000000000001e153

    1. Initial program 99.4%

      \[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. Taylor expanded in x1 around 0 95.1%

      \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \color{blue}{\left(-1 \cdot x1 + 2 \cdot x2\right)}\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) \]
    3. Taylor expanded in x1 around inf 94.8%

      \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \left(-1 \cdot x1 + 2 \cdot x2\right)\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 \color{blue}{3}\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. Taylor expanded in x1 around 0 95.1%

      \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \left(-1 \cdot x1 + 2 \cdot x2\right)\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 3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + -2 \cdot x2\right)}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification86.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102} \lor \neg \left(x1 \leq 4.5 \cdot 10^{+153}\right):\\ \;\;\;\;x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(2, x2, 3\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \left(-2 \cdot x2 - x1\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right)\right) + \left(1 + x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 6\right) + \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x2 \cdot 2 - x1\right)\right)\right)\right)\right)\right)\right)\\ \end{array} \]

Alternative 8: 87.5% accurate, 1.1× speedup?

\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := 1 + x1 \cdot x1\\ t_2 := \frac{\left(t_0 + x2 \cdot 2\right) - x1}{t_1}\\ \mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102} \lor \neg \left(x1 \leq 1.35 \cdot 10^{+154}\right):\\ \;\;\;\;x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(2, x2, 3\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot t_2 + t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if x1 < -5.60000000000000037e102 or 1.35000000000000003e154 < x1

    1. Initial program 0.0%

      \[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. Taylor expanded in x1 around 0 0.0%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 57.2%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + \left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. +-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + -1 \cdot x1\right)}\right) \]
      2. neg-mul-157.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)}\right) \]
      4. +-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + -2 \cdot x2\right)} - x1\right)\right) \]
      5. *-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(\color{blue}{{x1}^{2} \cdot \left(3 - -2 \cdot x2\right)} + -2 \cdot x2\right) - x1\right)\right) \]
      6. fma-def57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\mathsf{fma}\left({x1}^{2}, 3 - -2 \cdot x2, -2 \cdot x2\right)} - x1\right)\right) \]
      7. unpow257.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(\color{blue}{x1 \cdot x1}, 3 - -2 \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      8. cancel-sign-sub-inv57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{3 + \left(--2\right) \cdot x2}, -2 \cdot x2\right) - x1\right)\right) \]
      9. metadata-eval57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + \color{blue}{2} \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      10. +-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{2 \cdot x2 + 3}, -2 \cdot x2\right) - x1\right)\right) \]
      11. *-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, \color{blue}{x2 \cdot -2}\right) - x1\right)\right) \]
    5. Simplified57.2%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)}\right) \]
    6. Taylor expanded in x1 around inf 74.5%

      \[\leadsto x1 + \color{blue}{3 \cdot \left({x1}^{2} \cdot \left(3 + 2 \cdot x2\right)\right)} \]
    7. Step-by-step derivation
      1. unpow274.5%

        \[\leadsto x1 + 3 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot \left(3 + 2 \cdot x2\right)\right) \]
      2. +-commutative74.5%

        \[\leadsto x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(2 \cdot x2 + 3\right)}\right) \]
      3. fma-udef74.5%

        \[\leadsto x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\mathsf{fma}\left(2, x2, 3\right)}\right) \]
    8. Simplified74.5%

      \[\leadsto x1 + \color{blue}{3 \cdot \left(\left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(2, x2, 3\right)\right)} \]

    if -5.60000000000000037e102 < x1 < 1.35000000000000003e154

    1. Initial program 99.4%

      \[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. Taylor expanded in x1 around inf 97.2%

      \[\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 \color{blue}{3} - 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) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification87.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102} \lor \neg \left(x1 \leq 1.35 \cdot 10^{+154}\right):\\ \;\;\;\;x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(2, x2, 3\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(x1 \cdot \left(x1 \cdot 3\right)\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \left(1 + x1 \cdot x1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 3\right) + \left(x1 \cdot x1\right) \cdot 6\right)\right)\right)\right)\right)\\ \end{array} \]

Alternative 9: 89.1% accurate, 1.1× speedup?

\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := 1 + x1 \cdot x1\\ t_2 := \frac{\left(t_0 + x2 \cdot 2\right) - x1}{t_1}\\ \mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102} \lor \neg \left(x1 \leq 1.35 \cdot 10^{+154}\right):\\ \;\;\;\;x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(2, x2, 3\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_1 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) + 3 \cdot t_0\right)\right)\right)\right)\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if x1 < -5.60000000000000037e102 or 1.35000000000000003e154 < x1

    1. Initial program 0.0%

      \[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. Taylor expanded in x1 around 0 0.0%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 57.2%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + \left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. +-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + -1 \cdot x1\right)}\right) \]
      2. neg-mul-157.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)}\right) \]
      4. +-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + -2 \cdot x2\right)} - x1\right)\right) \]
      5. *-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(\color{blue}{{x1}^{2} \cdot \left(3 - -2 \cdot x2\right)} + -2 \cdot x2\right) - x1\right)\right) \]
      6. fma-def57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\mathsf{fma}\left({x1}^{2}, 3 - -2 \cdot x2, -2 \cdot x2\right)} - x1\right)\right) \]
      7. unpow257.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(\color{blue}{x1 \cdot x1}, 3 - -2 \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      8. cancel-sign-sub-inv57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{3 + \left(--2\right) \cdot x2}, -2 \cdot x2\right) - x1\right)\right) \]
      9. metadata-eval57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + \color{blue}{2} \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      10. +-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{2 \cdot x2 + 3}, -2 \cdot x2\right) - x1\right)\right) \]
      11. *-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, \color{blue}{x2 \cdot -2}\right) - x1\right)\right) \]
    5. Simplified57.2%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)}\right) \]
    6. Taylor expanded in x1 around inf 74.5%

      \[\leadsto x1 + \color{blue}{3 \cdot \left({x1}^{2} \cdot \left(3 + 2 \cdot x2\right)\right)} \]
    7. Step-by-step derivation
      1. unpow274.5%

        \[\leadsto x1 + 3 \cdot \left(\color{blue}{\left(x1 \cdot x1\right)} \cdot \left(3 + 2 \cdot x2\right)\right) \]
      2. +-commutative74.5%

        \[\leadsto x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\left(2 \cdot x2 + 3\right)}\right) \]
      3. fma-udef74.5%

        \[\leadsto x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \color{blue}{\mathsf{fma}\left(2, x2, 3\right)}\right) \]
    8. Simplified74.5%

      \[\leadsto x1 + \color{blue}{3 \cdot \left(\left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(2, x2, 3\right)\right)} \]

    if -5.60000000000000037e102 < x1 < 1.35000000000000003e154

    1. Initial program 99.4%

      \[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. Taylor expanded in x1 around inf 98.0%

      \[\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} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \color{blue}{3}\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) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification87.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102} \lor \neg \left(x1 \leq 1.35 \cdot 10^{+154}\right):\\ \;\;\;\;x1 + 3 \cdot \left(\left(x1 \cdot x1\right) \cdot \mathsf{fma}\left(2, x2, 3\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(1 + x1 \cdot x1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 6\right)\right) + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right)\right)\right)\right)\right)\right)\\ \end{array} \]

Alternative 10: 94.8% accurate, 1.1× speedup?

\[\begin{array}{l} t_0 := 1 + x1 \cdot x1\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := \frac{\left(t_1 + x2 \cdot 2\right) - x1}{t_0}\\ \mathbf{if}\;x1 \leq -6.8 \cdot 10^{+103} \lor \neg \left(x1 \leq 4 \cdot 10^{+153}\right):\\ \;\;\;\;x1 + \mathsf{fma}\left(3, t_1 - x1, x1\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(t_1 - x2 \cdot 2\right) - x1}{t_0} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(t_0 \cdot \left(\left(\left(x1 \cdot 2\right) \cdot t_2\right) \cdot \left(t_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right)\right) + 3 \cdot t_1\right)\right)\right)\right)\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if x1 < -6.7999999999999997e103 or 4e153 < x1

    1. Initial program 0.0%

      \[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. Taylor expanded in x1 around 0 0.0%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 57.2%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + \left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. +-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + -1 \cdot x1\right)}\right) \]
      2. neg-mul-157.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)}\right) \]
      4. +-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + -2 \cdot x2\right)} - x1\right)\right) \]
      5. *-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(\color{blue}{{x1}^{2} \cdot \left(3 - -2 \cdot x2\right)} + -2 \cdot x2\right) - x1\right)\right) \]
      6. fma-def57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\mathsf{fma}\left({x1}^{2}, 3 - -2 \cdot x2, -2 \cdot x2\right)} - x1\right)\right) \]
      7. unpow257.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(\color{blue}{x1 \cdot x1}, 3 - -2 \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      8. cancel-sign-sub-inv57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{3 + \left(--2\right) \cdot x2}, -2 \cdot x2\right) - x1\right)\right) \]
      9. metadata-eval57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + \color{blue}{2} \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      10. +-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{2 \cdot x2 + 3}, -2 \cdot x2\right) - x1\right)\right) \]
      11. *-commutative57.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, \color{blue}{x2 \cdot -2}\right) - x1\right)\right) \]
    5. Simplified57.2%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)}\right) \]
    6. Step-by-step derivation
      1. *-un-lft-identity57.2%

        \[\leadsto x1 + \color{blue}{1 \cdot \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right)} \]
      2. fma-def57.2%

        \[\leadsto x1 + 1 \cdot \left(\color{blue}{\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right), x1\right)} + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      3. fma-neg57.2%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \color{blue}{\mathsf{fma}\left(2, x2, -3\right)}\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      4. metadata-eval57.2%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, \color{blue}{-3}\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)\right) \]
      5. fma-def57.2%

        \[\leadsto x1 + 1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{\mathsf{fma}\left(2, x2, 3\right)}, x2 \cdot -2\right) - x1\right)\right) \]
    7. Applied egg-rr57.2%

      \[\leadsto x1 + \color{blue}{1 \cdot \left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right)\right)} \]
    8. Step-by-step derivation
      1. *-lft-identity57.2%

        \[\leadsto x1 + \color{blue}{\left(\mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right)\right)} \]
      2. +-commutative57.2%

        \[\leadsto x1 + \color{blue}{\left(3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1\right) + \mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right)\right)} \]
      3. fma-def57.2%

        \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(4, x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right), x1\right)\right)} \]
      4. fma-udef57.2%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right)\right) + x1}\right) \]
      5. associate-*r*57.2%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{\left(4 \cdot x2\right) \cdot \left(x1 \cdot \mathsf{fma}\left(2, x2, -3\right)\right)} + x1\right) \]
      6. fma-def57.2%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \color{blue}{\mathsf{fma}\left(4 \cdot x2, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)}\right) \]
      7. *-commutative57.2%

        \[\leadsto x1 + \mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(\color{blue}{x2 \cdot 4}, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)\right) \]
    9. Simplified57.2%

      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, \mathsf{fma}\left(x1 \cdot x1, \mathsf{fma}\left(2, x2, 3\right), x2 \cdot -2\right) - x1, \mathsf{fma}\left(x2 \cdot 4, x1 \cdot \mathsf{fma}\left(2, x2, -3\right), x1\right)\right)} \]
    10. Taylor expanded in x2 around 0 86.5%

      \[\leadsto x1 + \color{blue}{\left(x1 + 3 \cdot \left(3 \cdot {x1}^{2} - x1\right)\right)} \]
    11. Step-by-step derivation
      1. +-commutative86.5%

        \[\leadsto x1 + \color{blue}{\left(3 \cdot \left(3 \cdot {x1}^{2} - x1\right) + x1\right)} \]
      2. fma-def86.5%

        \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, 3 \cdot {x1}^{2} - x1, x1\right)} \]
      3. *-commutative86.5%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{{x1}^{2} \cdot 3} - x1, x1\right) \]
      4. unpow286.5%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{\left(x1 \cdot x1\right)} \cdot 3 - x1, x1\right) \]
      5. associate-*l*86.5%

        \[\leadsto x1 + \mathsf{fma}\left(3, \color{blue}{x1 \cdot \left(x1 \cdot 3\right)} - x1, x1\right) \]
    12. Simplified86.5%

      \[\leadsto x1 + \color{blue}{\mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot 3\right) - x1, x1\right)} \]

    if -6.7999999999999997e103 < x1 < 4e153

    1. Initial program 99.4%

      \[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. Taylor expanded in x1 around inf 98.0%

      \[\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} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \color{blue}{3}\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) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification93.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -6.8 \cdot 10^{+103} \lor \neg \left(x1 \leq 4 \cdot 10^{+153}\right):\\ \;\;\;\;x1 + \mathsf{fma}\left(3, x1 \cdot \left(x1 \cdot 3\right) - x1, x1\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(\left(1 + x1 \cdot x1\right) \cdot \left(\left(\left(x1 \cdot 2\right) \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1}\right) \cdot \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 6\right)\right) + 3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right)\right)\right)\right)\right)\right)\\ \end{array} \]

Alternative 11: 75.3% accurate, 1.4× speedup?

\[\begin{array}{l} t_0 := 1 + x1 \cdot x1\\ t_1 := x1 \cdot \left(x1 \cdot 3\right)\\ t_2 := \frac{\left(t_1 + x2 \cdot 2\right) - x1}{t_0}\\ \mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\ \mathbf{elif}\;x1 \leq 8 \cdot 10^{+153}:\\ \;\;\;\;x1 + \left(3 \cdot \left(-2 \cdot x2 - x1\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t_1 + t_0 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot t_2 - 6\right) + \left(t_2 - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x2 \cdot 2 - x1\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \left(-2 \cdot x2\right) + \left(x1 + 8 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if x1 < -5.60000000000000037e102

    1. Initial program 0.0%

      \[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. Taylor expanded in x1 around 0 0.1%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 0.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2\right)}\right) \]
    4. Step-by-step derivation
      1. *-commutative0.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    5. Simplified0.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    6. Taylor expanded in x2 around 0 26.3%

      \[\leadsto x1 + \color{blue}{\left(x2 \cdot \left(-12 \cdot x1 - 6\right) + x1\right)} \]

    if -5.60000000000000037e102 < x1 < 8e153

    1. Initial program 99.4%

      \[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. Taylor expanded in x1 around 0 95.1%

      \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \color{blue}{\left(-1 \cdot x1 + 2 \cdot x2\right)}\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) \]
    3. Taylor expanded in x1 around inf 94.8%

      \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \left(-1 \cdot x1 + 2 \cdot x2\right)\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 \color{blue}{3}\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. Taylor expanded in x1 around 0 95.1%

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

    if 8e153 < x1

    1. Initial program 0.0%

      \[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. Taylor expanded in x2 around inf 0.0%

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{{x2}^{2} \cdot x1}{1 + {x1}^{2}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Step-by-step derivation
      1. associate-/l*0.0%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\frac{{x2}^{2}}{\frac{1 + {x1}^{2}}{x1}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      2. unpow20.0%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{\color{blue}{x2 \cdot x2}}{\frac{1 + {x1}^{2}}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      3. +-commutative0.0%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{{x1}^{2} + 1}}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      4. unpow20.0%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{x1 \cdot x1} + 1}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      5. fma-udef0.0%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{\mathsf{fma}\left(x1, x1, 1\right)}}{x1}} + 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.0%

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    5. Taylor expanded in x1 around 0 5.3%

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}} + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2\right)}\right) \]
    6. Step-by-step derivation
      1. *-commutative44.8%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    7. Simplified5.3%

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}} + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    8. Taylor expanded in x1 around 0 44.8%

      \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left({x2}^{2} \cdot x1\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    9. Step-by-step derivation
      1. unpow244.8%

        \[\leadsto x1 + \left(\left(8 \cdot \left(\color{blue}{\left(x2 \cdot x2\right)} \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      2. associate-*l*44.8%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(x2 \cdot \left(x2 \cdot x1\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    10. Simplified44.8%

      \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(x2 \cdot \left(x2 \cdot x1\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification69.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\ \mathbf{elif}\;x1 \leq 8 \cdot 10^{+153}:\\ \;\;\;\;x1 + \left(3 \cdot \left(-2 \cdot x2 - x1\right) + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right)\right) + \left(1 + x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 6\right) + \left(\frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 3\right) \cdot \left(\left(x1 \cdot 2\right) \cdot \left(x2 \cdot 2 - x1\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \left(-2 \cdot x2\right) + \left(x1 + 8 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\ \end{array} \]

Alternative 12: 74.3% accurate, 1.5× speedup?

\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := 1 + x1 \cdot x1\\ \mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t_0 + t_1 \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(t_0 + x2 \cdot 2\right) - x1}{t_1} - 6\right) + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \left(-2 \cdot x2\right) + \left(x1 + 8 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if x1 < -5.60000000000000037e102

    1. Initial program 0.0%

      \[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. Taylor expanded in x1 around 0 0.1%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 0.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2\right)}\right) \]
    4. Step-by-step derivation
      1. *-commutative0.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    5. Simplified0.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    6. Taylor expanded in x2 around 0 26.3%

      \[\leadsto x1 + \color{blue}{\left(x2 \cdot \left(-12 \cdot x1 - 6\right) + x1\right)} \]

    if -5.60000000000000037e102 < x1 < 1.35000000000000003e154

    1. Initial program 99.4%

      \[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. Taylor expanded in x1 around 0 95.1%

      \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \color{blue}{\left(-1 \cdot x1 + 2 \cdot x2\right)}\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) \]
    3. Taylor expanded in x1 around inf 94.8%

      \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \left(-1 \cdot x1 + 2 \cdot x2\right)\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 \color{blue}{3}\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. Taylor expanded in x1 around 0 94.6%

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

    if 1.35000000000000003e154 < x1

    1. Initial program 0.0%

      \[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. Taylor expanded in x2 around inf 0.0%

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{{x2}^{2} \cdot x1}{1 + {x1}^{2}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Step-by-step derivation
      1. associate-/l*0.0%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\frac{{x2}^{2}}{\frac{1 + {x1}^{2}}{x1}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      2. unpow20.0%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{\color{blue}{x2 \cdot x2}}{\frac{1 + {x1}^{2}}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      3. +-commutative0.0%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{{x1}^{2} + 1}}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      4. unpow20.0%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{x1 \cdot x1} + 1}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      5. fma-udef0.0%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{\mathsf{fma}\left(x1, x1, 1\right)}}{x1}} + 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.0%

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    5. Taylor expanded in x1 around 0 5.3%

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}} + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2\right)}\right) \]
    6. Step-by-step derivation
      1. *-commutative44.8%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    7. Simplified5.3%

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}} + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    8. Taylor expanded in x1 around 0 44.8%

      \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left({x2}^{2} \cdot x1\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    9. Step-by-step derivation
      1. unpow244.8%

        \[\leadsto x1 + \left(\left(8 \cdot \left(\color{blue}{\left(x2 \cdot x2\right)} \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      2. associate-*l*44.8%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(x2 \cdot \left(x2 \cdot x1\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    10. Simplified44.8%

      \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(x2 \cdot \left(x2 \cdot x1\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification68.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right)\right) + \left(1 + x1 \cdot x1\right) \cdot \left(\left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 6\right) + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \left(-2 \cdot x2\right) + \left(x1 + 8 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\ \end{array} \]

Alternative 13: 75.0% accurate, 1.6× speedup?

\[\begin{array}{l} t_0 := x1 \cdot \left(x1 \cdot 3\right)\\ t_1 := 1 + x1 \cdot x1\\ t_2 := 3 \cdot \frac{\left(t_0 - x2 \cdot 2\right) - x1}{t_1}\\ t_3 := x1 + \left(t_2 + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot t_0 + t_1 \cdot \left(x1 \cdot 2 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(t_0 + x2 \cdot 2\right) - x1}{t_1} - 6\right)\right)\right)\right)\right)\right)\\ \mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\ \mathbf{elif}\;x1 \leq -32000:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x1 \leq 1.95 \cdot 10^{+26}:\\ \;\;\;\;x1 + \left(t_2 + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \left(-2 \cdot x2\right) + \left(x1 + 8 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\ \end{array} \]
Derivation
  1. Split input into 4 regimes
  2. if x1 < -5.60000000000000037e102

    1. Initial program 0.0%

      \[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. Taylor expanded in x1 around 0 0.1%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 0.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2\right)}\right) \]
    4. Step-by-step derivation
      1. *-commutative0.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    5. Simplified0.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    6. Taylor expanded in x2 around 0 26.3%

      \[\leadsto x1 + \color{blue}{\left(x2 \cdot \left(-12 \cdot x1 - 6\right) + x1\right)} \]

    if -5.60000000000000037e102 < x1 < -32000 or 1.95e26 < x1 < 1.35000000000000003e154

    1. Initial program 99.3%

      \[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. Taylor expanded in x1 around 0 92.7%

      \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \color{blue}{\left(-1 \cdot x1 + 2 \cdot x2\right)}\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) \]
    3. Taylor expanded in x1 around inf 92.7%

      \[\leadsto x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \left(-1 \cdot x1 + 2 \cdot x2\right)\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 \color{blue}{3}\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. Taylor expanded in x1 around inf 84.0%

      \[\leadsto x1 + \left(\left(\left(\left(\left(\color{blue}{2 \cdot x1} + \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 3\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. Step-by-step derivation
      1. *-commutative84.0%

        \[\leadsto x1 + \left(\left(\left(\left(\left(\color{blue}{x1 \cdot 2} + \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 3\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. Simplified84.0%

      \[\leadsto x1 + \left(\left(\left(\left(\left(\color{blue}{x1 \cdot 2} + \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 3\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) \]

    if -32000 < x1 < 1.95e26

    1. Initial program 99.4%

      \[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. Taylor expanded in x1 around 0 96.1%

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

    if 1.35000000000000003e154 < x1

    1. Initial program 0.0%

      \[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. Taylor expanded in x2 around inf 0.0%

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{{x2}^{2} \cdot x1}{1 + {x1}^{2}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Step-by-step derivation
      1. associate-/l*0.0%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\frac{{x2}^{2}}{\frac{1 + {x1}^{2}}{x1}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      2. unpow20.0%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{\color{blue}{x2 \cdot x2}}{\frac{1 + {x1}^{2}}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      3. +-commutative0.0%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{{x1}^{2} + 1}}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      4. unpow20.0%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{x1 \cdot x1} + 1}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      5. fma-udef0.0%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{\mathsf{fma}\left(x1, x1, 1\right)}}{x1}} + 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.0%

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    5. Taylor expanded in x1 around 0 5.3%

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}} + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2\right)}\right) \]
    6. Step-by-step derivation
      1. *-commutative44.8%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    7. Simplified5.3%

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}} + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    8. Taylor expanded in x1 around 0 44.8%

      \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left({x2}^{2} \cdot x1\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    9. Step-by-step derivation
      1. unpow244.8%

        \[\leadsto x1 + \left(\left(8 \cdot \left(\color{blue}{\left(x2 \cdot x2\right)} \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      2. associate-*l*44.8%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(x2 \cdot \left(x2 \cdot x1\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    10. Simplified44.8%

      \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(x2 \cdot \left(x2 \cdot x1\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification67.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -5.6 \cdot 10^{+102}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\ \mathbf{elif}\;x1 \leq -32000:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right)\right) + \left(1 + x1 \cdot x1\right) \cdot \left(x1 \cdot 2 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 6\right)\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.95 \cdot 10^{+26}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;x1 + \left(3 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) - x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} + \left(x1 + \left(x1 \cdot \left(x1 \cdot x1\right) + \left(3 \cdot \left(x1 \cdot \left(x1 \cdot 3\right)\right) + \left(1 + x1 \cdot x1\right) \cdot \left(x1 \cdot 2 + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(x1 \cdot \left(x1 \cdot 3\right) + x2 \cdot 2\right) - x1}{1 + x1 \cdot x1} - 6\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \left(-2 \cdot x2\right) + \left(x1 + 8 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\ \end{array} \]

Alternative 14: 63.0% accurate, 5.1× speedup?

\[\begin{array}{l} \mathbf{if}\;x1 \leq -3.7 \cdot 10^{+104}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right) + \left(x1 \cdot -3 + x2 \cdot -6\right)\right)\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if x1 < -3.6999999999999998e104

    1. Initial program 0.0%

      \[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. Taylor expanded in x1 around 0 0.1%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 0.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2\right)}\right) \]
    4. Step-by-step derivation
      1. *-commutative0.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    5. Simplified0.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    6. Taylor expanded in x2 around 0 26.7%

      \[\leadsto x1 + \color{blue}{\left(x2 \cdot \left(-12 \cdot x1 - 6\right) + x1\right)} \]

    if -3.6999999999999998e104 < x1

    1. Initial program 74.8%

      \[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. Taylor expanded in x1 around 0 55.1%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 75.5%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + \left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. +-commutative75.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + -1 \cdot x1\right)}\right) \]
      2. neg-mul-175.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg75.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)}\right) \]
      4. +-commutative75.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + -2 \cdot x2\right)} - x1\right)\right) \]
      5. *-commutative75.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(\color{blue}{{x1}^{2} \cdot \left(3 - -2 \cdot x2\right)} + -2 \cdot x2\right) - x1\right)\right) \]
      6. fma-def75.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\mathsf{fma}\left({x1}^{2}, 3 - -2 \cdot x2, -2 \cdot x2\right)} - x1\right)\right) \]
      7. unpow275.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(\color{blue}{x1 \cdot x1}, 3 - -2 \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      8. cancel-sign-sub-inv75.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{3 + \left(--2\right) \cdot x2}, -2 \cdot x2\right) - x1\right)\right) \]
      9. metadata-eval75.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + \color{blue}{2} \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      10. +-commutative75.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{2 \cdot x2 + 3}, -2 \cdot x2\right) - x1\right)\right) \]
      11. *-commutative75.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, \color{blue}{x2 \cdot -2}\right) - x1\right)\right) \]
    5. Simplified75.5%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)}\right) \]
    6. Taylor expanded in x1 around 0 65.0%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + \color{blue}{\left(-3 \cdot x1 + -6 \cdot x2\right)}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification55.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -3.7 \cdot 10^{+104}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right) + \left(x1 \cdot -3 + x2 \cdot -6\right)\right)\\ \end{array} \]

Alternative 15: 63.0% accurate, 5.1× speedup?

\[\begin{array}{l} \mathbf{if}\;x1 \leq -1.15 \cdot 10^{+105}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \left(-2 \cdot x2 - x1\right) + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if x1 < -1.1499999999999999e105

    1. Initial program 0.0%

      \[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. Taylor expanded in x1 around 0 0.1%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 0.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2\right)}\right) \]
    4. Step-by-step derivation
      1. *-commutative0.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    5. Simplified0.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    6. Taylor expanded in x2 around 0 26.7%

      \[\leadsto x1 + \color{blue}{\left(x2 \cdot \left(-12 \cdot x1 - 6\right) + x1\right)} \]

    if -1.1499999999999999e105 < x1

    1. Initial program 74.8%

      \[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. Taylor expanded in x1 around 0 55.1%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 65.0%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + -2 \cdot x2\right)}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification55.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -1.15 \cdot 10^{+105}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \left(-2 \cdot x2 - x1\right) + \left(x1 + 4 \cdot \left(x2 \cdot \left(x1 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\right)\\ \end{array} \]

Alternative 16: 42.6% accurate, 6.0× speedup?

\[\begin{array}{l} \mathbf{if}\;x1 \leq -2.6 \cdot 10^{+57}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\ \mathbf{elif}\;x1 \leq -7 \cdot 10^{-110}:\\ \;\;\;\;x1 + \left(9 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.6 \cdot 10^{-140}:\\ \;\;\;\;x1 + x2 \cdot -6\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\ \end{array} \]
Derivation
  1. Split input into 4 regimes
  2. if x1 < -2.6e57

    1. Initial program 8.6%

      \[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. Taylor expanded in x1 around 0 0.1%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 0.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2\right)}\right) \]
    4. Step-by-step derivation
      1. *-commutative0.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    5. Simplified0.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    6. Taylor expanded in x2 around 0 24.0%

      \[\leadsto x1 + \color{blue}{\left(x2 \cdot \left(-12 \cdot x1 - 6\right) + x1\right)} \]

    if -2.6e57 < x1 < -6.99999999999999947e-110

    1. Initial program 99.0%

      \[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. Taylor expanded in x1 around 0 54.3%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Step-by-step derivation
      1. associate--l-54.3%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \frac{\color{blue}{\left(3 \cdot x1\right) \cdot x1 - \left(2 \cdot x2 + x1\right)}}{x1 \cdot x1 + 1}\right) \]
      2. associate-*r*54.3%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \frac{\color{blue}{3 \cdot \left(x1 \cdot x1\right)} - \left(2 \cdot x2 + x1\right)}{x1 \cdot x1 + 1}\right) \]
      3. fma-udef54.3%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \frac{3 \cdot \left(x1 \cdot x1\right) - \color{blue}{\mathsf{fma}\left(2, x2, x1\right)}}{x1 \cdot x1 + 1}\right) \]
      4. fma-def54.3%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \frac{3 \cdot \left(x1 \cdot x1\right) - \mathsf{fma}\left(2, x2, x1\right)}{\color{blue}{\mathsf{fma}\left(x1, x1, 1\right)}}\right) \]
      5. add-cbrt-cube32.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\sqrt[3]{\left(\frac{3 \cdot \left(x1 \cdot x1\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \frac{3 \cdot \left(x1 \cdot x1\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right) \cdot \frac{3 \cdot \left(x1 \cdot x1\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}}}\right) \]
    4. Applied egg-rr32.2%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\sqrt[3]{\left(\frac{3 \cdot \left(x1 \cdot x1\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \frac{3 \cdot \left(x1 \cdot x1\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right) \cdot \frac{3 \cdot \left(x1 \cdot x1\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}}}\right) \]
    5. Step-by-step derivation
      1. associate-*l*32.2%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \sqrt[3]{\color{blue}{\frac{3 \cdot \left(x1 \cdot x1\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \left(\frac{3 \cdot \left(x1 \cdot x1\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)} \cdot \frac{3 \cdot \left(x1 \cdot x1\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right)}}\right) \]
      2. cube-unmult32.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \sqrt[3]{\color{blue}{{\left(\frac{3 \cdot \left(x1 \cdot x1\right) - \mathsf{fma}\left(2, x2, x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right)}^{3}}}\right) \]
      3. fma-neg32.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \sqrt[3]{{\left(\frac{\color{blue}{\mathsf{fma}\left(3, x1 \cdot x1, -\mathsf{fma}\left(2, x2, x1\right)\right)}}{\mathsf{fma}\left(x1, x1, 1\right)}\right)}^{3}}\right) \]
      4. fma-udef32.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \sqrt[3]{{\left(\frac{\mathsf{fma}\left(3, x1 \cdot x1, -\color{blue}{\left(2 \cdot x2 + x1\right)}\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right)}^{3}}\right) \]
      5. distribute-neg-in32.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \sqrt[3]{{\left(\frac{\mathsf{fma}\left(3, x1 \cdot x1, \color{blue}{\left(-2 \cdot x2\right) + \left(-x1\right)}\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right)}^{3}}\right) \]
      6. distribute-lft-neg-in32.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \sqrt[3]{{\left(\frac{\mathsf{fma}\left(3, x1 \cdot x1, \color{blue}{\left(-2\right) \cdot x2} + \left(-x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right)}^{3}}\right) \]
      7. metadata-eval32.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \sqrt[3]{{\left(\frac{\mathsf{fma}\left(3, x1 \cdot x1, \color{blue}{-2} \cdot x2 + \left(-x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right)}^{3}}\right) \]
      8. neg-mul-132.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \sqrt[3]{{\left(\frac{\mathsf{fma}\left(3, x1 \cdot x1, -2 \cdot x2 + \color{blue}{-1 \cdot x1}\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right)}^{3}}\right) \]
      9. *-commutative32.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \sqrt[3]{{\left(\frac{\mathsf{fma}\left(3, x1 \cdot x1, \color{blue}{x2 \cdot -2} + -1 \cdot x1\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right)}^{3}}\right) \]
      10. fma-def32.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \sqrt[3]{{\left(\frac{\mathsf{fma}\left(3, x1 \cdot x1, \color{blue}{\mathsf{fma}\left(x2, -2, -1 \cdot x1\right)}\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right)}^{3}}\right) \]
      11. neg-mul-132.1%

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

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\sqrt[3]{{\left(\frac{\mathsf{fma}\left(3, x1 \cdot x1, \mathsf{fma}\left(x2, -2, -x1\right)\right)}{\mathsf{fma}\left(x1, x1, 1\right)}\right)}^{3}}}\right) \]
    7. Taylor expanded in x1 around inf 28.4%

      \[\leadsto x1 + \color{blue}{\left(9 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right)\right)} \]

    if -6.99999999999999947e-110 < x1 < 1.6000000000000001e-140

    1. Initial program 99.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. Taylor expanded in x1 around 0 99.5%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 99.5%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + \left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. +-commutative99.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + -1 \cdot x1\right)}\right) \]
      2. neg-mul-199.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg99.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)}\right) \]
      4. +-commutative99.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + -2 \cdot x2\right)} - x1\right)\right) \]
      5. *-commutative99.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(\color{blue}{{x1}^{2} \cdot \left(3 - -2 \cdot x2\right)} + -2 \cdot x2\right) - x1\right)\right) \]
      6. fma-def99.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\mathsf{fma}\left({x1}^{2}, 3 - -2 \cdot x2, -2 \cdot x2\right)} - x1\right)\right) \]
      7. unpow299.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(\color{blue}{x1 \cdot x1}, 3 - -2 \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      8. cancel-sign-sub-inv99.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{3 + \left(--2\right) \cdot x2}, -2 \cdot x2\right) - x1\right)\right) \]
      9. metadata-eval99.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + \color{blue}{2} \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      10. +-commutative99.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{2 \cdot x2 + 3}, -2 \cdot x2\right) - x1\right)\right) \]
      11. *-commutative99.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, \color{blue}{x2 \cdot -2}\right) - x1\right)\right) \]
    5. Simplified99.5%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)}\right) \]
    6. Taylor expanded in x1 around 0 63.0%

      \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
    7. Step-by-step derivation
      1. *-commutative63.0%

        \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
    8. Simplified63.0%

      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]

    if 1.6000000000000001e-140 < x1

    1. Initial program 43.8%

      \[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. Taylor expanded in x1 around 0 24.7%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 71.5%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + \left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. +-commutative71.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + -1 \cdot x1\right)}\right) \]
      2. neg-mul-171.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg71.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)}\right) \]
      4. +-commutative71.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + -2 \cdot x2\right)} - x1\right)\right) \]
      5. *-commutative71.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(\color{blue}{{x1}^{2} \cdot \left(3 - -2 \cdot x2\right)} + -2 \cdot x2\right) - x1\right)\right) \]
      6. fma-def71.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\mathsf{fma}\left({x1}^{2}, 3 - -2 \cdot x2, -2 \cdot x2\right)} - x1\right)\right) \]
      7. unpow271.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(\color{blue}{x1 \cdot x1}, 3 - -2 \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      8. cancel-sign-sub-inv71.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{3 + \left(--2\right) \cdot x2}, -2 \cdot x2\right) - x1\right)\right) \]
      9. metadata-eval71.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + \color{blue}{2} \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      10. +-commutative71.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{2 \cdot x2 + 3}, -2 \cdot x2\right) - x1\right)\right) \]
      11. *-commutative71.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, \color{blue}{x2 \cdot -2}\right) - x1\right)\right) \]
    5. Simplified71.5%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)}\right) \]
    6. Taylor expanded in x2 around inf 35.2%

      \[\leadsto x1 + \color{blue}{8 \cdot \left({x2}^{2} \cdot x1\right)} \]
    7. Step-by-step derivation
      1. *-commutative35.2%

        \[\leadsto x1 + \color{blue}{\left({x2}^{2} \cdot x1\right) \cdot 8} \]
      2. associate-*l*35.2%

        \[\leadsto x1 + \color{blue}{{x2}^{2} \cdot \left(x1 \cdot 8\right)} \]
      3. unpow235.2%

        \[\leadsto x1 + \color{blue}{\left(x2 \cdot x2\right)} \cdot \left(x1 \cdot 8\right) \]
    8. Simplified35.2%

      \[\leadsto x1 + \color{blue}{\left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification38.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -2.6 \cdot 10^{+57}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\ \mathbf{elif}\;x1 \leq -7 \cdot 10^{-110}:\\ \;\;\;\;x1 + \left(9 + x1 \cdot \left(1 + 4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right)\right)\right)\\ \mathbf{elif}\;x1 \leq 1.6 \cdot 10^{-140}:\\ \;\;\;\;x1 + x2 \cdot -6\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\ \end{array} \]

Alternative 17: 57.5% accurate, 6.0× speedup?

\[\begin{array}{l} \mathbf{if}\;x1 \leq -1.05 \cdot 10^{+105}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if x1 < -1.05000000000000005e105

    1. Initial program 0.0%

      \[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. Taylor expanded in x1 around 0 0.1%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 0.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2\right)}\right) \]
    4. Step-by-step derivation
      1. *-commutative0.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    5. Simplified0.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    6. Taylor expanded in x2 around 0 26.7%

      \[\leadsto x1 + \color{blue}{\left(x2 \cdot \left(-12 \cdot x1 - 6\right) + x1\right)} \]

    if -1.05000000000000005e105 < x1

    1. Initial program 74.8%

      \[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. Taylor expanded in x1 around 0 55.1%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 75.5%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + \left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. +-commutative75.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + -1 \cdot x1\right)}\right) \]
      2. neg-mul-175.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg75.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)}\right) \]
      4. +-commutative75.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + -2 \cdot x2\right)} - x1\right)\right) \]
      5. *-commutative75.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(\color{blue}{{x1}^{2} \cdot \left(3 - -2 \cdot x2\right)} + -2 \cdot x2\right) - x1\right)\right) \]
      6. fma-def75.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\mathsf{fma}\left({x1}^{2}, 3 - -2 \cdot x2, -2 \cdot x2\right)} - x1\right)\right) \]
      7. unpow275.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(\color{blue}{x1 \cdot x1}, 3 - -2 \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      8. cancel-sign-sub-inv75.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{3 + \left(--2\right) \cdot x2}, -2 \cdot x2\right) - x1\right)\right) \]
      9. metadata-eval75.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + \color{blue}{2} \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      10. +-commutative75.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{2 \cdot x2 + 3}, -2 \cdot x2\right) - x1\right)\right) \]
      11. *-commutative75.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, \color{blue}{x2 \cdot -2}\right) - x1\right)\right) \]
    5. Simplified75.5%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)}\right) \]
    6. Taylor expanded in x1 around 0 58.5%

      \[\leadsto x1 + \color{blue}{\left(x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 2\right) + -6 \cdot x2\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification50.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -1.05 \cdot 10^{+105}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(x2 \cdot -6 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(x2 \cdot 2 - 3\right)\right) - 2\right)\right)\\ \end{array} \]

Alternative 18: 46.3% accurate, 6.7× speedup?

\[\begin{array}{l} \mathbf{if}\;x1 \leq -3.8 \cdot 10^{+73}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \left(-2 \cdot x2\right) + \left(x1 + 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\right)\right)\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if x1 < -3.80000000000000022e73

    1. Initial program 7.3%

      \[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. Taylor expanded in x1 around 0 0.1%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 0.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2\right)}\right) \]
    4. Step-by-step derivation
      1. *-commutative0.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    5. Simplified0.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    6. Taylor expanded in x2 around 0 24.4%

      \[\leadsto x1 + \color{blue}{\left(x2 \cdot \left(-12 \cdot x1 - 6\right) + x1\right)} \]

    if -3.80000000000000022e73 < x1

    1. Initial program 74.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. Taylor expanded in x2 around inf 49.9%

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{{x2}^{2} \cdot x1}{1 + {x1}^{2}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Step-by-step derivation
      1. associate-/l*50.9%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\frac{{x2}^{2}}{\frac{1 + {x1}^{2}}{x1}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      2. unpow250.9%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{\color{blue}{x2 \cdot x2}}{\frac{1 + {x1}^{2}}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      3. +-commutative50.9%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{{x1}^{2} + 1}}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      4. unpow250.9%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{x1 \cdot x1} + 1}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      5. fma-udef50.9%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{\mathsf{fma}\left(x1, x1, 1\right)}}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    4. Simplified50.9%

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    5. Taylor expanded in x1 around 0 39.1%

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}} + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2\right)}\right) \]
    6. Step-by-step derivation
      1. *-commutative54.9%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    7. Simplified39.1%

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}} + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    8. Taylor expanded in x1 around 0 48.0%

      \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left({x2}^{2} \cdot x1\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    9. Step-by-step derivation
      1. *-commutative48.0%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(x1 \cdot {x2}^{2}\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      2. unpow248.0%

        \[\leadsto x1 + \left(\left(8 \cdot \left(x1 \cdot \color{blue}{\left(x2 \cdot x2\right)}\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    10. Simplified48.0%

      \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(x1 \cdot \left(x2 \cdot x2\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification41.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -3.8 \cdot 10^{+73}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \left(-2 \cdot x2\right) + \left(x1 + 8 \cdot \left(x1 \cdot \left(x2 \cdot x2\right)\right)\right)\right)\\ \end{array} \]

Alternative 19: 52.0% accurate, 6.7× speedup?

\[\begin{array}{l} \mathbf{if}\;x1 \leq -9.8 \cdot 10^{+73}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \left(-2 \cdot x2\right) + \left(x1 + 8 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if x1 < -9.7999999999999998e73

    1. Initial program 7.3%

      \[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. Taylor expanded in x1 around 0 0.1%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 0.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2\right)}\right) \]
    4. Step-by-step derivation
      1. *-commutative0.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    5. Simplified0.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    6. Taylor expanded in x2 around 0 24.4%

      \[\leadsto x1 + \color{blue}{\left(x2 \cdot \left(-12 \cdot x1 - 6\right) + x1\right)} \]

    if -9.7999999999999998e73 < x1

    1. Initial program 74.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. Taylor expanded in x2 around inf 49.9%

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{{x2}^{2} \cdot x1}{1 + {x1}^{2}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Step-by-step derivation
      1. associate-/l*50.9%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\frac{{x2}^{2}}{\frac{1 + {x1}^{2}}{x1}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      2. unpow250.9%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{\color{blue}{x2 \cdot x2}}{\frac{1 + {x1}^{2}}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      3. +-commutative50.9%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{{x1}^{2} + 1}}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      4. unpow250.9%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{x1 \cdot x1} + 1}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      5. fma-udef50.9%

        \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\color{blue}{\mathsf{fma}\left(x1, x1, 1\right)}}{x1}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    4. Simplified50.9%

      \[\leadsto x1 + \left(\left(\color{blue}{8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}}} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    5. Taylor expanded in x1 around 0 39.1%

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}} + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2\right)}\right) \]
    6. Step-by-step derivation
      1. *-commutative54.9%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    7. Simplified39.1%

      \[\leadsto x1 + \left(\left(8 \cdot \frac{x2 \cdot x2}{\frac{\mathsf{fma}\left(x1, x1, 1\right)}{x1}} + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    8. Taylor expanded in x1 around 0 48.0%

      \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left({x2}^{2} \cdot x1\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    9. Step-by-step derivation
      1. unpow248.0%

        \[\leadsto x1 + \left(\left(8 \cdot \left(\color{blue}{\left(x2 \cdot x2\right)} \cdot x1\right) + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
      2. associate-*l*54.9%

        \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(x2 \cdot \left(x2 \cdot x1\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
    10. Simplified54.9%

      \[\leadsto x1 + \left(\left(8 \cdot \color{blue}{\left(x2 \cdot \left(x2 \cdot x1\right)\right)} + x1\right) + 3 \cdot \left(x2 \cdot -2\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification46.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -9.8 \cdot 10^{+73}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(3 \cdot \left(-2 \cdot x2\right) + \left(x1 + 8 \cdot \left(x2 \cdot \left(x1 \cdot x2\right)\right)\right)\right)\\ \end{array} \]

Alternative 20: 42.5% accurate, 8.4× speedup?

\[\begin{array}{l} \mathbf{if}\;x1 \leq -3.8 \cdot 10^{+72}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\ \mathbf{elif}\;x1 \leq -4.4 \cdot 10^{-111} \lor \neg \left(x1 \leq 1.6 \cdot 10^{-140}\right):\\ \;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + x2 \cdot -6\\ \end{array} \]
Derivation
  1. Split input into 3 regimes
  2. if x1 < -3.80000000000000006e72

    1. Initial program 7.3%

      \[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. Taylor expanded in x1 around 0 0.1%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 0.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2\right)}\right) \]
    4. Step-by-step derivation
      1. *-commutative0.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    5. Simplified0.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
    6. Taylor expanded in x2 around 0 24.4%

      \[\leadsto x1 + \color{blue}{\left(x2 \cdot \left(-12 \cdot x1 - 6\right) + x1\right)} \]

    if -3.80000000000000006e72 < x1 < -4.4e-111 or 1.6000000000000001e-140 < x1

    1. Initial program 60.7%

      \[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. Taylor expanded in x1 around 0 33.3%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 65.8%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + \left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. +-commutative65.8%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + -1 \cdot x1\right)}\right) \]
      2. neg-mul-165.8%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg65.8%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)}\right) \]
      4. +-commutative65.8%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + -2 \cdot x2\right)} - x1\right)\right) \]
      5. *-commutative65.8%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(\color{blue}{{x1}^{2} \cdot \left(3 - -2 \cdot x2\right)} + -2 \cdot x2\right) - x1\right)\right) \]
      6. fma-def65.8%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\mathsf{fma}\left({x1}^{2}, 3 - -2 \cdot x2, -2 \cdot x2\right)} - x1\right)\right) \]
      7. unpow265.8%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(\color{blue}{x1 \cdot x1}, 3 - -2 \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      8. cancel-sign-sub-inv65.8%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{3 + \left(--2\right) \cdot x2}, -2 \cdot x2\right) - x1\right)\right) \]
      9. metadata-eval65.8%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + \color{blue}{2} \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      10. +-commutative65.8%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{2 \cdot x2 + 3}, -2 \cdot x2\right) - x1\right)\right) \]
      11. *-commutative65.8%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, \color{blue}{x2 \cdot -2}\right) - x1\right)\right) \]
    5. Simplified65.8%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)}\right) \]
    6. Taylor expanded in x2 around inf 32.3%

      \[\leadsto x1 + \color{blue}{8 \cdot \left({x2}^{2} \cdot x1\right)} \]
    7. Step-by-step derivation
      1. *-commutative32.3%

        \[\leadsto x1 + \color{blue}{\left({x2}^{2} \cdot x1\right) \cdot 8} \]
      2. associate-*l*32.3%

        \[\leadsto x1 + \color{blue}{{x2}^{2} \cdot \left(x1 \cdot 8\right)} \]
      3. unpow232.3%

        \[\leadsto x1 + \color{blue}{\left(x2 \cdot x2\right)} \cdot \left(x1 \cdot 8\right) \]
    8. Simplified32.3%

      \[\leadsto x1 + \color{blue}{\left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)} \]

    if -4.4e-111 < x1 < 1.6000000000000001e-140

    1. Initial program 99.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. Taylor expanded in x1 around 0 99.5%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 99.5%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + \left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. +-commutative99.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + -1 \cdot x1\right)}\right) \]
      2. neg-mul-199.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg99.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)}\right) \]
      4. +-commutative99.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + -2 \cdot x2\right)} - x1\right)\right) \]
      5. *-commutative99.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(\color{blue}{{x1}^{2} \cdot \left(3 - -2 \cdot x2\right)} + -2 \cdot x2\right) - x1\right)\right) \]
      6. fma-def99.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\mathsf{fma}\left({x1}^{2}, 3 - -2 \cdot x2, -2 \cdot x2\right)} - x1\right)\right) \]
      7. unpow299.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(\color{blue}{x1 \cdot x1}, 3 - -2 \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      8. cancel-sign-sub-inv99.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{3 + \left(--2\right) \cdot x2}, -2 \cdot x2\right) - x1\right)\right) \]
      9. metadata-eval99.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + \color{blue}{2} \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      10. +-commutative99.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{2 \cdot x2 + 3}, -2 \cdot x2\right) - x1\right)\right) \]
      11. *-commutative99.5%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, \color{blue}{x2 \cdot -2}\right) - x1\right)\right) \]
    5. Simplified99.5%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)}\right) \]
    6. Taylor expanded in x1 around 0 63.0%

      \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
    7. Step-by-step derivation
      1. *-commutative63.0%

        \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
    8. Simplified63.0%

      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification38.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x1 \leq -3.8 \cdot 10^{+72}:\\ \;\;\;\;x1 + \left(x1 + x2 \cdot \left(x1 \cdot -12 - 6\right)\right)\\ \mathbf{elif}\;x1 \leq -4.4 \cdot 10^{-111} \lor \neg \left(x1 \leq 1.6 \cdot 10^{-140}\right):\\ \;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + x2 \cdot -6\\ \end{array} \]

Alternative 21: 37.7% accurate, 9.7× speedup?

\[\begin{array}{l} \mathbf{if}\;x2 \leq -2.3 \cdot 10^{+96} \lor \neg \left(x2 \leq 1.75 \cdot 10^{+134}\right):\\ \;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + x2 \cdot -6\\ \end{array} \]
Derivation
  1. Split input into 2 regimes
  2. if x2 < -2.30000000000000015e96 or 1.75000000000000001e134 < x2

    1. Initial program 56.8%

      \[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. Taylor expanded in x1 around 0 51.6%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 59.9%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + \left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. +-commutative59.9%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + -1 \cdot x1\right)}\right) \]
      2. neg-mul-159.9%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg59.9%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)}\right) \]
      4. +-commutative59.9%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + -2 \cdot x2\right)} - x1\right)\right) \]
      5. *-commutative59.9%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(\color{blue}{{x1}^{2} \cdot \left(3 - -2 \cdot x2\right)} + -2 \cdot x2\right) - x1\right)\right) \]
      6. fma-def59.9%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\mathsf{fma}\left({x1}^{2}, 3 - -2 \cdot x2, -2 \cdot x2\right)} - x1\right)\right) \]
      7. unpow259.9%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(\color{blue}{x1 \cdot x1}, 3 - -2 \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      8. cancel-sign-sub-inv59.9%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{3 + \left(--2\right) \cdot x2}, -2 \cdot x2\right) - x1\right)\right) \]
      9. metadata-eval59.9%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + \color{blue}{2} \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      10. +-commutative59.9%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{2 \cdot x2 + 3}, -2 \cdot x2\right) - x1\right)\right) \]
      11. *-commutative59.9%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, \color{blue}{x2 \cdot -2}\right) - x1\right)\right) \]
    5. Simplified59.9%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)}\right) \]
    6. Taylor expanded in x2 around inf 50.7%

      \[\leadsto x1 + \color{blue}{8 \cdot \left({x2}^{2} \cdot x1\right)} \]
    7. Step-by-step derivation
      1. *-commutative50.7%

        \[\leadsto x1 + \color{blue}{\left({x2}^{2} \cdot x1\right) \cdot 8} \]
      2. associate-*l*50.7%

        \[\leadsto x1 + \color{blue}{{x2}^{2} \cdot \left(x1 \cdot 8\right)} \]
      3. unpow250.7%

        \[\leadsto x1 + \color{blue}{\left(x2 \cdot x2\right)} \cdot \left(x1 \cdot 8\right) \]
    8. Simplified50.7%

      \[\leadsto x1 + \color{blue}{\left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)} \]

    if -2.30000000000000015e96 < x2 < 1.75000000000000001e134

    1. Initial program 56.6%

      \[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. Taylor expanded in x1 around 0 38.0%

      \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    3. Taylor expanded in x1 around 0 69.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + \left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. +-commutative69.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + -1 \cdot x1\right)}\right) \]
      2. neg-mul-169.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
      3. unsub-neg69.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)}\right) \]
      4. +-commutative69.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + -2 \cdot x2\right)} - x1\right)\right) \]
      5. *-commutative69.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(\color{blue}{{x1}^{2} \cdot \left(3 - -2 \cdot x2\right)} + -2 \cdot x2\right) - x1\right)\right) \]
      6. fma-def69.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\mathsf{fma}\left({x1}^{2}, 3 - -2 \cdot x2, -2 \cdot x2\right)} - x1\right)\right) \]
      7. unpow269.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(\color{blue}{x1 \cdot x1}, 3 - -2 \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      8. cancel-sign-sub-inv69.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{3 + \left(--2\right) \cdot x2}, -2 \cdot x2\right) - x1\right)\right) \]
      9. metadata-eval69.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + \color{blue}{2} \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
      10. +-commutative69.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{2 \cdot x2 + 3}, -2 \cdot x2\right) - x1\right)\right) \]
      11. *-commutative69.1%

        \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, \color{blue}{x2 \cdot -2}\right) - x1\right)\right) \]
    5. Simplified69.1%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)}\right) \]
    6. Taylor expanded in x1 around 0 24.5%

      \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
    7. Step-by-step derivation
      1. *-commutative24.5%

        \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
    8. Simplified24.5%

      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification31.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x2 \leq -2.3 \cdot 10^{+96} \lor \neg \left(x2 \leq 1.75 \cdot 10^{+134}\right):\\ \;\;\;\;x1 + \left(x2 \cdot x2\right) \cdot \left(x1 \cdot 8\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + x2 \cdot -6\\ \end{array} \]

Alternative 22: 26.5% accurate, 25.4× speedup?

\[x1 + x2 \cdot -6 \]
Derivation
  1. Initial program 56.7%

    \[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. Taylor expanded in x1 around 0 41.8%

    \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
  3. Taylor expanded in x1 around 0 66.6%

    \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-1 \cdot x1 + \left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right)\right)}\right) \]
  4. Step-by-step derivation
    1. +-commutative66.6%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + -1 \cdot x1\right)}\right) \]
    2. neg-mul-166.6%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) + \color{blue}{\left(-x1\right)}\right)\right) \]
    3. unsub-neg66.6%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\left(-2 \cdot x2 + \left(3 - -2 \cdot x2\right) \cdot {x1}^{2}\right) - x1\right)}\right) \]
    4. +-commutative66.6%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\left(\left(3 - -2 \cdot x2\right) \cdot {x1}^{2} + -2 \cdot x2\right)} - x1\right)\right) \]
    5. *-commutative66.6%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\left(\color{blue}{{x1}^{2} \cdot \left(3 - -2 \cdot x2\right)} + -2 \cdot x2\right) - x1\right)\right) \]
    6. fma-def66.6%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\color{blue}{\mathsf{fma}\left({x1}^{2}, 3 - -2 \cdot x2, -2 \cdot x2\right)} - x1\right)\right) \]
    7. unpow266.6%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(\color{blue}{x1 \cdot x1}, 3 - -2 \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
    8. cancel-sign-sub-inv66.6%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{3 + \left(--2\right) \cdot x2}, -2 \cdot x2\right) - x1\right)\right) \]
    9. metadata-eval66.6%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 3 + \color{blue}{2} \cdot x2, -2 \cdot x2\right) - x1\right)\right) \]
    10. +-commutative66.6%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, \color{blue}{2 \cdot x2 + 3}, -2 \cdot x2\right) - x1\right)\right) \]
    11. *-commutative66.6%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, \color{blue}{x2 \cdot -2}\right) - x1\right)\right) \]
  5. Simplified66.6%

    \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(\mathsf{fma}\left(x1 \cdot x1, 2 \cdot x2 + 3, x2 \cdot -2\right) - x1\right)}\right) \]
  6. Taylor expanded in x1 around 0 20.2%

    \[\leadsto x1 + \color{blue}{-6 \cdot x2} \]
  7. Step-by-step derivation
    1. *-commutative20.2%

      \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
  8. Simplified20.2%

    \[\leadsto x1 + \color{blue}{x2 \cdot -6} \]
  9. Final simplification20.2%

    \[\leadsto x1 + x2 \cdot -6 \]

Alternative 23: 3.3% accurate, 42.3× speedup?

\[x1 + x1 \]
Derivation
  1. Initial program 56.7%

    \[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. Taylor expanded in x1 around 0 41.8%

    \[\leadsto x1 + \left(\left(\color{blue}{4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right)} + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
  3. Taylor expanded in x1 around 0 40.4%

    \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(-2 \cdot x2\right)}\right) \]
  4. Step-by-step derivation
    1. *-commutative40.4%

      \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
  5. Simplified40.4%

    \[\leadsto x1 + \left(\left(4 \cdot \left(x2 \cdot \left(x1 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + x1\right) + 3 \cdot \color{blue}{\left(x2 \cdot -2\right)}\right) \]
  6. Taylor expanded in x2 around 0 3.1%

    \[\leadsto x1 + \color{blue}{x1} \]
  7. Final simplification3.1%

    \[\leadsto x1 + x1 \]

Reproduce

?
herbie shell --seed 2023167 
(FPCore (x1 x2)
  :name "Rosa's FloatVsDoubleBenchmark"
  :precision binary64
  (+ 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))))))