\[{\left(x + 1\right)}^2 - 1\]
Test:
Expanding a square
Bits:
128 bits
Bits error versus x
Time: 4.7 s
Input Error: 16.4
Output Error: 0.1
Log:
Profile: 🕒
\(\left(\left(x + 1\right) + 1\right) \cdot x\)
  1. Started with
    \[{\left(x + 1\right)}^2 - 1\]
    16.4
  2. Using strategy rm
    16.4
  3. Applied difference-of-sqr-1 to get
    \[\color{red}{{\left(x + 1\right)}^2 - 1} \leadsto \color{blue}{\left(\left(x + 1\right) + 1\right) \cdot \left(\left(x + 1\right) - 1\right)}\]
    16.4
  4. Applied simplify to get
    \[\left(\left(x + 1\right) + 1\right) \cdot \color{red}{\left(\left(x + 1\right) - 1\right)} \leadsto \left(\left(x + 1\right) + 1\right) \cdot \color{blue}{x}\]
    0.1

Original test:


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