\[{a}^2 - {b}^2\]
Test:
Difference of squares
Bits:
128 bits
Bits error versus a
Bits error versus b
Time: 2.7 s
Input Error: 0.0
Output Error: 0.0
Log:
Profile: 🕒
\({\left(\left|a\right|\right)}^2 - {b}^2\)
  1. Started with
    \[{a}^2 - {b}^2\]
    0.0
  2. Using strategy rm
    0.0
  3. Applied add-sqr-sqrt to get
    \[\color{red}{{a}^2} - {b}^2 \leadsto \color{blue}{{\left(\sqrt{{a}^2}\right)}^2} - {b}^2\]
    0.0
  4. Applied simplify to get
    \[{\color{red}{\left(\sqrt{{a}^2}\right)}}^2 - {b}^2 \leadsto {\color{blue}{\left(\left|a\right|\right)}}^2 - {b}^2\]
    0.0

Original test:


(lambda ((a default) (b default))
  #:name "Difference of squares"
  (- (sqr a) (sqr b))
  #:target
  (* (+ a b) (- a b)))