\[\tan^{-1} \left(N + 1\right) - \tan^{-1} N\]
Test:
NMSE example 3.5
Bits:
128 bits
Bits error versus N
Time: 3.2 s
Input Error: 14.6
Output Error: 0.4
Log:
Profile: 🕒
\(\tan^{-1}_* \frac{1 - 0}{(N * \left(1 + N\right) + 1)_*}\)
  1. Started with
    \[\tan^{-1} \left(N + 1\right) - \tan^{-1} N\]
    14.6
  2. Using strategy rm
    14.6
  3. Applied diff-atan to get
    \[\color{red}{\tan^{-1} \left(N + 1\right) - \tan^{-1} N} \leadsto \color{blue}{\tan^{-1}_* \frac{\left(N + 1\right) - N}{1 + \left(N + 1\right) \cdot N}}\]
    13.6
  4. Applied simplify to get
    \[\tan^{-1}_* \frac{\color{red}{\left(N + 1\right) - N}}{1 + \left(N + 1\right) \cdot N} \leadsto \tan^{-1}_* \frac{\color{blue}{1 - 0}}{1 + \left(N + 1\right) \cdot N}\]
    0.4
  5. Applied simplify to get
    \[\tan^{-1}_* \frac{1 - 0}{\color{red}{1 + \left(N + 1\right) \cdot N}} \leadsto \tan^{-1}_* \frac{1 - 0}{\color{blue}{(N * \left(1 + N\right) + 1)_*}}\]
    0.4

  6. Removed slow pow expressions

Original test:


(lambda ((N default))
  #:name "NMSE example 3.5"
  (- (atan (+ N 1)) (atan N))
  #:target
  (atan (/ 1 (+ 1 (* N (+ N 1))))))