\[\frac{\log \left(1 - x\right)}{\log \left(1 + x\right)}\]
Test:
NMSE example 3.10
Bits:
128 bits
Bits error versus x
Time: 9.2 s
Input Error: 61.1
Output Error: 0.0
Log:
Profile: 🕒
\(\log \left(e^{-1} - \left(e^{-1} \cdot x + \frac{1}{12} \cdot \left(e^{-1} \cdot {x}^{3}\right)\right)\right)\)
  1. Started with
    \[\frac{\log \left(1 - x\right)}{\log \left(1 + x\right)}\]
    61.1
  2. Using strategy rm
    61.1
  3. Applied add-log-exp to get
    \[\color{red}{\frac{\log \left(1 - x\right)}{\log \left(1 + x\right)}} \leadsto \color{blue}{\log \left(e^{\frac{\log \left(1 - x\right)}{\log \left(1 + x\right)}}\right)}\]
    61.1
  4. Applied taylor to get
    \[\log \left(e^{\frac{\log \left(1 - x\right)}{\log \left(1 + x\right)}}\right) \leadsto \log \left(e^{-1} - \left(e^{-1} \cdot x + \frac{1}{12} \cdot \left(e^{-1} \cdot {x}^{3}\right)\right)\right)\]
    0.0
  5. Taylor expanded around 0 to get
    \[\log \color{red}{\left(e^{-1} - \left(e^{-1} \cdot x + \frac{1}{12} \cdot \left(e^{-1} \cdot {x}^{3}\right)\right)\right)} \leadsto \log \color{blue}{\left(e^{-1} - \left(e^{-1} \cdot x + \frac{1}{12} \cdot \left(e^{-1} \cdot {x}^{3}\right)\right)\right)}\]
    0.0

  6. Removed slow pow expressions

Original test:


(lambda ((x default))
  #:name "NMSE example 3.10"
  (/ (log (- 1 x)) (log (+ 1 x)))
  #:target
  (- (+ (+ (+ 1 x) (/ (sqr x) 2)) (* 5/12 (pow x 3)))))