\[{\left(x + 1\right)}^2 - 1\]
Test:
Expanding a square
Bits:
128 bits
Bits error versus x
Time: 2.4 s
Input Error: 39.4
Output Error: 0.0
Log:
Profile: 🕒
\(1 \cdot \left(\left(x + x\right) + {x}^2\right)\)
  1. Started with
    \[{\left(x + 1\right)}^2 - 1\]
    39.4
  2. Using strategy rm
    39.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)}\]
    39.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.0
  5. Using strategy rm
    0.0
  6. Applied *-un-lft-identity to get
    \[\color{red}{\left(\left(x + 1\right) + 1\right)} \cdot x \leadsto \color{blue}{\left(1 \cdot \left(\left(x + 1\right) + 1\right)\right)} \cdot x\]
    0.0
  7. Applied associate-*l* to get
    \[\color{red}{\left(1 \cdot \left(\left(x + 1\right) + 1\right)\right) \cdot x} \leadsto \color{blue}{1 \cdot \left(\left(\left(x + 1\right) + 1\right) \cdot x\right)}\]
    0.0
  8. Applied simplify to get
    \[1 \cdot \color{red}{\left(\left(\left(x + 1\right) + 1\right) \cdot x\right)} \leadsto 1 \cdot \color{blue}{\left(\left(x + x\right) + {x}^2\right)}\]
    0.0

Original test:


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