Average Error: 29.4 → 0.1
Time: 4.4m
Precision: 64
Internal Precision: 128
\[\frac{x}{x + 1} - \frac{x + 1}{x - 1}\]
\[\begin{array}{l} \mathbf{if}\;x \le -12727.401168194334 \lor \neg \left(x \le 12123.563172164775\right):\\ \;\;\;\;\left(\frac{-3}{x} - \frac{1}{x \cdot x}\right) + \frac{\frac{-3}{x}}{x \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{\left({\left(\frac{x \cdot x}{1 + x}\right)}^{3} \cdot {\left({\left(-1 + x\right)}^{3}\right)}^{3}\right) \cdot {\left(\frac{x}{1 + x} \cdot \frac{x}{1 + x}\right)}^{3} - \left(\left({\left(1 + x\right)}^{3} \cdot {\left(1 + x\right)}^{3}\right) \cdot {\left(\frac{1 + x}{-1 + x}\right)}^{3}\right) \cdot \left({\left(1 + x\right)}^{3} \cdot {\left(1 + x\right)}^{3}\right)}{\left({\left(x - 1\right)}^{3} \cdot {\left(\left(x - 1\right) \cdot \left(x - 1\right)\right)}^{3}\right) \cdot {\left(1 + x\right)}^{3}}}{{\left(\frac{1 + x}{x - 1} \cdot \frac{1 + x}{x - 1}\right)}^{3} + {\left(\frac{x}{1 + x} \cdot \frac{x}{1 + x}\right)}^{3}}}{\left(\frac{1 + x}{x - 1} + \frac{x}{1 + x}\right) \cdot \left(\left(\frac{x}{1 + x} \cdot \frac{x}{1 + x}\right) \cdot \left(\frac{x}{1 + x} \cdot \frac{x}{1 + x}\right) + \left(\left(\frac{1 + x}{x - 1} \cdot \frac{1 + x}{x - 1}\right) \cdot \left(\frac{x}{1 + x} \cdot \frac{x}{1 + x}\right) + \left(\frac{1 + x}{x - 1} \cdot \frac{1 + x}{x - 1}\right) \cdot \left(\frac{1 + x}{x - 1} \cdot \frac{1 + x}{x - 1}\right)\right)\right)}\\ \end{array}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if x < -12727.401168194334 or 12123.563172164775 < x

    1. Initial program 59.3

      \[\frac{x}{x + 1} - \frac{x + 1}{x - 1}\]
    2. Taylor expanded around -inf 0.3

      \[\leadsto \color{blue}{-\left(3 \cdot \frac{1}{{x}^{3}} + \left(\frac{1}{{x}^{2}} + 3 \cdot \frac{1}{x}\right)\right)}\]
    3. Simplified0.0

      \[\leadsto \color{blue}{\left(\frac{-3}{x} - \frac{1}{x \cdot x}\right) + \frac{\frac{-3}{x}}{x \cdot x}}\]

    if -12727.401168194334 < x < 12123.563172164775

    1. Initial program 0.1

      \[\frac{x}{x + 1} - \frac{x + 1}{x - 1}\]
    2. Using strategy rm
    3. Applied flip--0.1

      \[\leadsto \color{blue}{\frac{\frac{x}{x + 1} \cdot \frac{x}{x + 1} - \frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}}{\frac{x}{x + 1} + \frac{x + 1}{x - 1}}}\]
    4. Using strategy rm
    5. Applied flip3--0.1

      \[\leadsto \frac{\color{blue}{\frac{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} - {\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)}^{3}}{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) + \left(\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) + \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)\right)}}}{\frac{x}{x + 1} + \frac{x + 1}{x - 1}}\]
    6. Applied associate-/l/0.1

      \[\leadsto \color{blue}{\frac{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} - {\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)}^{3}}{\left(\frac{x}{x + 1} + \frac{x + 1}{x - 1}\right) \cdot \left(\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) + \left(\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) + \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)\right)\right)}}\]
    7. Using strategy rm
    8. Applied flip--0.1

      \[\leadsto \frac{\color{blue}{\frac{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} \cdot {\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} - {\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)}^{3} \cdot {\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)}^{3}}{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} + {\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)}^{3}}}}{\left(\frac{x}{x + 1} + \frac{x + 1}{x - 1}\right) \cdot \left(\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) + \left(\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) + \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)\right)\right)}\]
    9. Using strategy rm
    10. Applied associate-*r/0.1

      \[\leadsto \frac{\frac{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} \cdot {\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} - {\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)}^{3} \cdot {\color{blue}{\left(\frac{\frac{x + 1}{x - 1} \cdot \left(x + 1\right)}{x - 1}\right)}}^{3}}{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} + {\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)}^{3}}}{\left(\frac{x}{x + 1} + \frac{x + 1}{x - 1}\right) \cdot \left(\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) + \left(\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) + \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)\right)\right)}\]
    11. Applied cube-div0.1

      \[\leadsto \frac{\frac{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} \cdot {\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} - {\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)}^{3} \cdot \color{blue}{\frac{{\left(\frac{x + 1}{x - 1} \cdot \left(x + 1\right)\right)}^{3}}{{\left(x - 1\right)}^{3}}}}{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} + {\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)}^{3}}}{\left(\frac{x}{x + 1} + \frac{x + 1}{x - 1}\right) \cdot \left(\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) + \left(\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) + \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)\right)\right)}\]
    12. Applied frac-times0.1

      \[\leadsto \frac{\frac{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} \cdot {\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} - {\color{blue}{\left(\frac{\left(x + 1\right) \cdot \left(x + 1\right)}{\left(x - 1\right) \cdot \left(x - 1\right)}\right)}}^{3} \cdot \frac{{\left(\frac{x + 1}{x - 1} \cdot \left(x + 1\right)\right)}^{3}}{{\left(x - 1\right)}^{3}}}{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} + {\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)}^{3}}}{\left(\frac{x}{x + 1} + \frac{x + 1}{x - 1}\right) \cdot \left(\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) + \left(\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) + \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)\right)\right)}\]
    13. Applied cube-div0.1

      \[\leadsto \frac{\frac{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} \cdot {\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} - \color{blue}{\frac{{\left(\left(x + 1\right) \cdot \left(x + 1\right)\right)}^{3}}{{\left(\left(x - 1\right) \cdot \left(x - 1\right)\right)}^{3}}} \cdot \frac{{\left(\frac{x + 1}{x - 1} \cdot \left(x + 1\right)\right)}^{3}}{{\left(x - 1\right)}^{3}}}{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} + {\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)}^{3}}}{\left(\frac{x}{x + 1} + \frac{x + 1}{x - 1}\right) \cdot \left(\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) + \left(\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) + \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)\right)\right)}\]
    14. Applied frac-times0.1

      \[\leadsto \frac{\frac{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} \cdot {\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} - \color{blue}{\frac{{\left(\left(x + 1\right) \cdot \left(x + 1\right)\right)}^{3} \cdot {\left(\frac{x + 1}{x - 1} \cdot \left(x + 1\right)\right)}^{3}}{{\left(\left(x - 1\right) \cdot \left(x - 1\right)\right)}^{3} \cdot {\left(x - 1\right)}^{3}}}}{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} + {\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)}^{3}}}{\left(\frac{x}{x + 1} + \frac{x + 1}{x - 1}\right) \cdot \left(\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) + \left(\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) + \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)\right)\right)}\]
    15. Applied associate-*r/0.1

      \[\leadsto \frac{\frac{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} \cdot {\color{blue}{\left(\frac{\frac{x}{x + 1} \cdot x}{x + 1}\right)}}^{3} - \frac{{\left(\left(x + 1\right) \cdot \left(x + 1\right)\right)}^{3} \cdot {\left(\frac{x + 1}{x - 1} \cdot \left(x + 1\right)\right)}^{3}}{{\left(\left(x - 1\right) \cdot \left(x - 1\right)\right)}^{3} \cdot {\left(x - 1\right)}^{3}}}{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} + {\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)}^{3}}}{\left(\frac{x}{x + 1} + \frac{x + 1}{x - 1}\right) \cdot \left(\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) + \left(\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) + \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)\right)\right)}\]
    16. Applied cube-div0.1

      \[\leadsto \frac{\frac{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} \cdot \color{blue}{\frac{{\left(\frac{x}{x + 1} \cdot x\right)}^{3}}{{\left(x + 1\right)}^{3}}} - \frac{{\left(\left(x + 1\right) \cdot \left(x + 1\right)\right)}^{3} \cdot {\left(\frac{x + 1}{x - 1} \cdot \left(x + 1\right)\right)}^{3}}{{\left(\left(x - 1\right) \cdot \left(x - 1\right)\right)}^{3} \cdot {\left(x - 1\right)}^{3}}}{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} + {\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)}^{3}}}{\left(\frac{x}{x + 1} + \frac{x + 1}{x - 1}\right) \cdot \left(\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) + \left(\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) + \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)\right)\right)}\]
    17. Applied associate-*r/0.1

      \[\leadsto \frac{\frac{\color{blue}{\frac{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} \cdot {\left(\frac{x}{x + 1} \cdot x\right)}^{3}}{{\left(x + 1\right)}^{3}}} - \frac{{\left(\left(x + 1\right) \cdot \left(x + 1\right)\right)}^{3} \cdot {\left(\frac{x + 1}{x - 1} \cdot \left(x + 1\right)\right)}^{3}}{{\left(\left(x - 1\right) \cdot \left(x - 1\right)\right)}^{3} \cdot {\left(x - 1\right)}^{3}}}{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} + {\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)}^{3}}}{\left(\frac{x}{x + 1} + \frac{x + 1}{x - 1}\right) \cdot \left(\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) + \left(\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) + \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)\right)\right)}\]
    18. Applied frac-sub0.1

      \[\leadsto \frac{\frac{\color{blue}{\frac{\left({\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} \cdot {\left(\frac{x}{x + 1} \cdot x\right)}^{3}\right) \cdot \left({\left(\left(x - 1\right) \cdot \left(x - 1\right)\right)}^{3} \cdot {\left(x - 1\right)}^{3}\right) - {\left(x + 1\right)}^{3} \cdot \left({\left(\left(x + 1\right) \cdot \left(x + 1\right)\right)}^{3} \cdot {\left(\frac{x + 1}{x - 1} \cdot \left(x + 1\right)\right)}^{3}\right)}{{\left(x + 1\right)}^{3} \cdot \left({\left(\left(x - 1\right) \cdot \left(x - 1\right)\right)}^{3} \cdot {\left(x - 1\right)}^{3}\right)}}}{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} + {\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)}^{3}}}{\left(\frac{x}{x + 1} + \frac{x + 1}{x - 1}\right) \cdot \left(\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) + \left(\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) + \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)\right)\right)}\]
    19. Simplified0.1

      \[\leadsto \frac{\frac{\frac{\color{blue}{\left({\left({\left(x + -1\right)}^{3}\right)}^{3} \cdot {\left(\frac{x \cdot x}{1 + x}\right)}^{3}\right) \cdot {\left(\frac{x}{1 + x} \cdot \frac{x}{1 + x}\right)}^{3} - \left({\left(\frac{1 + x}{x + -1}\right)}^{3} \cdot \left({\left(1 + x\right)}^{3} \cdot {\left(1 + x\right)}^{3}\right)\right) \cdot \left({\left(1 + x\right)}^{3} \cdot {\left(1 + x\right)}^{3}\right)}}{{\left(x + 1\right)}^{3} \cdot \left({\left(\left(x - 1\right) \cdot \left(x - 1\right)\right)}^{3} \cdot {\left(x - 1\right)}^{3}\right)}}{{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right)}^{3} + {\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)}^{3}}}{\left(\frac{x}{x + 1} + \frac{x + 1}{x - 1}\right) \cdot \left(\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) + \left(\left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right) + \left(\frac{x}{x + 1} \cdot \frac{x}{x + 1}\right) \cdot \left(\frac{x + 1}{x - 1} \cdot \frac{x + 1}{x - 1}\right)\right)\right)}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.1

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -12727.401168194334 \lor \neg \left(x \le 12123.563172164775\right):\\ \;\;\;\;\left(\frac{-3}{x} - \frac{1}{x \cdot x}\right) + \frac{\frac{-3}{x}}{x \cdot x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\frac{\left({\left(\frac{x \cdot x}{1 + x}\right)}^{3} \cdot {\left({\left(-1 + x\right)}^{3}\right)}^{3}\right) \cdot {\left(\frac{x}{1 + x} \cdot \frac{x}{1 + x}\right)}^{3} - \left(\left({\left(1 + x\right)}^{3} \cdot {\left(1 + x\right)}^{3}\right) \cdot {\left(\frac{1 + x}{-1 + x}\right)}^{3}\right) \cdot \left({\left(1 + x\right)}^{3} \cdot {\left(1 + x\right)}^{3}\right)}{\left({\left(x - 1\right)}^{3} \cdot {\left(\left(x - 1\right) \cdot \left(x - 1\right)\right)}^{3}\right) \cdot {\left(1 + x\right)}^{3}}}{{\left(\frac{1 + x}{x - 1} \cdot \frac{1 + x}{x - 1}\right)}^{3} + {\left(\frac{x}{1 + x} \cdot \frac{x}{1 + x}\right)}^{3}}}{\left(\frac{1 + x}{x - 1} + \frac{x}{1 + x}\right) \cdot \left(\left(\frac{x}{1 + x} \cdot \frac{x}{1 + x}\right) \cdot \left(\frac{x}{1 + x} \cdot \frac{x}{1 + x}\right) + \left(\left(\frac{1 + x}{x - 1} \cdot \frac{1 + x}{x - 1}\right) \cdot \left(\frac{x}{1 + x} \cdot \frac{x}{1 + x}\right) + \left(\frac{1 + x}{x - 1} \cdot \frac{1 + x}{x - 1}\right) \cdot \left(\frac{1 + x}{x - 1} \cdot \frac{1 + x}{x - 1}\right)\right)\right)}\\ \end{array}\]

Reproduce

herbie shell --seed 2019007 
(FPCore (x)
  :name "Asymptote C"
  (- (/ x (+ x 1)) (/ (+ x 1) (- x 1))))

Details

Time bar (total: 4.4m)Debug log

sample61.0ms

Algorithm
intervals

simplify31.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

31.0ms
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1)))

prune20.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 28.9b

localize26.0ms

Local error

Found 3 expressions with local error:

3.5b
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1)))
0.0b
(/ (+ x 1) (- x 1))
0.0b
(/ x (+ x 1))

rewrite20.0ms

Algorithm
rewrite-expression-head
Counts
3 → 62
Calls

3 calls. Slowest were:

12.0ms
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1)))
6.0ms
(/ (+ x 1) (- x 1))
1.0ms
(/ x (+ x 1))

series71.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

48.0ms
(- (/ x (+ x 1)) (/ (+ x 1) (- x 1)))
14.0ms
(/ (+ x 1) (- x 1))
9.0ms
(/ x (+ x 1))

simplify2.2s

Counts
51 → 71
Calls

51 calls. Slowest were:

425.0ms
(- (* x (- x 1)) (* (+ x 1) (+ x 1)))
338.0ms
(/ (* (* (+ x 1) (+ x 1)) (+ x 1)) (* (* (- x 1) (- x 1)) (- x 1)))
266.0ms
(- (+ (* 3 (/ 1 (pow x 3))) (+ (/ 1 (pow x 2)) (* 3 (/ 1 x)))))

prune552.0ms

Pruning

4 alts after pruning (4 fresh and 0 done)

Merged error: 0.1b

localize26.0ms

Local error

Found 4 expressions with local error:

3.5b
(- (* (/ x (+ x 1)) (/ x (+ x 1))) (* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1))))
0.0b
(* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1)))
0.0b
(+ (/ x (+ x 1)) (/ (+ x 1) (- x 1)))
0.0b
(/ (- (* (/ x (+ x 1)) (/ x (+ x 1))) (* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1)))) (+ (/ x (+ x 1)) (/ (+ x 1) (- x 1))))

rewrite60.0ms

Algorithm
rewrite-expression-head
Counts
4 → 139
Calls

4 calls. Slowest were:

36.0ms
(/ (- (* (/ x (+ x 1)) (/ x (+ x 1))) (* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1)))) (+ (/ x (+ x 1)) (/ (+ x 1) (- x 1))))
7.0ms
(* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1)))
6.0ms
(- (* (/ x (+ x 1)) (/ x (+ x 1))) (* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1))))

series233.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

107.0ms
(/ (- (* (/ x (+ x 1)) (/ x (+ x 1))) (* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1)))) (+ (/ x (+ x 1)) (/ (+ x 1) (- x 1))))
64.0ms
(- (* (/ x (+ x 1)) (/ x (+ x 1))) (* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1))))
40.0ms
(+ (/ x (+ x 1)) (/ (+ x 1) (- x 1)))
22.0ms
(* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1)))

simplify21.9s

Counts
138 → 151
Calls

138 calls. Slowest were:

754.0ms
(- (* (* x x) (- x 1)) (* (* (+ x 1) (+ x 1)) (* (+ x 1) (/ (+ x 1) (- x 1)))))
743.0ms
(- (* (* x x) (- x 1)) (* (* (+ x 1) (+ x 1)) (* (+ x 1) (/ (+ x 1) (- x 1)))))
639.0ms
(* (* (* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1))) (/ (+ x 1) (- x 1))) (* (* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1))) (/ (+ x 1) (- x 1))))

prune1.2s

Pruning

5 alts after pruning (5 fresh and 0 done)

Merged error: 0.0b

localize31.0ms

Local error

Found 4 expressions with local error:

3.4b
(- (pow (* (/ x (+ x 1)) (/ x (+ x 1))) 3) (pow (* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1))) 3))
0.1b
(pow (* (/ x (+ x 1)) (/ x (+ x 1))) 3)
0.1b
(* (* (/ x (+ x 1)) (/ x (+ x 1))) (* (/ x (+ x 1)) (/ x (+ x 1))))
0.0b
(pow (* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1))) 3)

rewrite46.0ms

Algorithm
rewrite-expression-head
Counts
4 → 144
Calls

4 calls. Slowest were:

26.0ms
(* (* (/ x (+ x 1)) (/ x (+ x 1))) (* (/ x (+ x 1)) (/ x (+ x 1))))
7.0ms
(- (pow (* (/ x (+ x 1)) (/ x (+ x 1))) 3) (pow (* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1))) 3))
6.0ms
(pow (* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1))) 3)

series203.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

146.0ms
(- (pow (* (/ x (+ x 1)) (/ x (+ x 1))) 3) (pow (* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1))) 3))
25.0ms
(pow (* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1))) 3)
19.0ms
(* (* (/ x (+ x 1)) (/ x (+ x 1))) (* (/ x (+ x 1)) (/ x (+ x 1))))
14.0ms
(pow (* (/ x (+ x 1)) (/ x (+ x 1))) 3)

simplify30.0s

Counts
161 → 156
Calls

161 calls. Slowest were:

1.5s
(pow (* (+ x 1) (/ (+ x 1) (- x 1))) 3)
1.4s
(* (* (+ x 1) (+ x 1)) (* (+ x 1) (+ x 1)))
1.0s
(* (pow (* (+ x 1) (+ x 1)) 3) (pow (* (- x 1) (- x 1)) 3))

prune2.1s

Pruning

5 alts after pruning (5 fresh and 0 done)

Merged error: 0.0b

localize35.0ms

Local error

Found 4 expressions with local error:

3.4b
(- (* (pow (* (/ x (+ x 1)) (/ x (+ x 1))) 3) (pow (* (/ x (+ x 1)) (/ x (+ x 1))) 3)) (* (pow (* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1))) 3) (pow (* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1))) 3)))
0.1b
(pow (* (/ x (+ x 1)) (/ x (+ x 1))) 3)
0.1b
(pow (* (/ x (+ x 1)) (/ x (+ x 1))) 3)
0.1b
(pow (* (/ x (+ x 1)) (/ x (+ x 1))) 3)

rewrite69.0ms

Algorithm
rewrite-expression-head
Counts
4 → 311
Calls

4 calls. Slowest were:

32.0ms
(- (* (pow (* (/ x (+ x 1)) (/ x (+ x 1))) 3) (pow (* (/ x (+ x 1)) (/ x (+ x 1))) 3)) (* (pow (* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1))) 3) (pow (* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1))) 3)))
5.0ms
(pow (* (/ x (+ x 1)) (/ x (+ x 1))) 3)
5.0ms
(pow (* (/ x (+ x 1)) (/ x (+ x 1))) 3)

series990.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

922.0ms
(- (* (pow (* (/ x (+ x 1)) (/ x (+ x 1))) 3) (pow (* (/ x (+ x 1)) (/ x (+ x 1))) 3)) (* (pow (* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1))) 3) (pow (* (/ (+ x 1) (- x 1)) (/ (+ x 1) (- x 1))) 3)))
23.0ms
(pow (* (/ x (+ x 1)) (/ x (+ x 1))) 3)
23.0ms
(pow (* (/ x (+ x 1)) (/ x (+ x 1))) 3)
22.0ms
(pow (* (/ x (+ x 1)) (/ x (+ x 1))) 3)

simplify3.2m

Counts
509 → 323
Calls

509 calls. Slowest were:

1.2s
(* (pow (+ x 1) 3) (* (pow (* (- x 1) (- x 1)) 3) (pow (* (- x 1) (- x 1)) 3)))
1.2s
(* (pow (* (+ x 1) (+ x 1)) 3) (pow (* (- x 1) (- x 1)) 3))
1.1s
(* (pow (* (+ x 1) (+ x 1)) 3) (pow (* (- x 1) (- x 1)) 3))

prune8.4s

Pruning

6 alts after pruning (6 fresh and 0 done)

Merged error: 0.0b

regimes115.0ms

Accuracy

99.8% (0.0b remaining)

Error of 0.1b against oracle of 0.0b and baseline of 30.0b

bsearch658.0ms

end0.0ms

sample1.9s

Algorithm
intervals