\[{\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)\)
Started with
\[{\left(x + 1\right)}^2 - 1\]
39.4
Using strategy
rm
39.4
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
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
Using strategy
rm
0.0
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
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
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))