\[{\left(x + 1\right)}^2 - 1\]
Test:
Expanding a square
Bits:
128 bits
Bits error versus x
Time: 2.0 s
Input Error: 16.5
Output Error: 0.0
Log:
Profile: 🕒
\(x \cdot \left(x + 2\right)\)
  1. Started with
    \[{\left(x + 1\right)}^2 - 1\]
    16.5
  2. Applied taylor to get
    \[{\left(x + 1\right)}^2 - 1 \leadsto {x}^2 + 2 \cdot x\]
    0.0
  3. Taylor expanded around 0 to get
    \[\color{red}{{x}^2 + 2 \cdot x} \leadsto \color{blue}{{x}^2 + 2 \cdot x}\]
    0.0
  4. Applied simplify to get
    \[\color{red}{{x}^2 + 2 \cdot x} \leadsto \color{blue}{x \cdot \left(x + 2\right)}\]
    0.0

Original test:


(lambda ((x default))
  #:name "Expanding a square"
  (- (sqr (+ x 1)) 1))