\[{\left(x + 1\right)}^2 - 1\]
Test:
Expanding a square
Bits:
128 bits
Bits error versus x
Time: 3.7 s
Input Error: 39.6
Output Error: 0.0
Log:
Profile: 🕒
\(\left(\left(x + 1\right) + 1\right) \cdot x\)
  1. Started with
    \[{\left(x + 1\right)}^2 - 1\]
    39.6
  2. Using strategy rm
    39.6
  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)}\]
    39.5
  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.0

Original test:


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