\[\left(e^{x} - 2\right) + e^{-x}\]
Test:
NMSE problem 3.3.7
Bits:
128 bits
Bits error versus x
Time: 6.5 s
Input Error: 15.4
Output Error: 0.3
Log:
Profile: 🕒
\((\left({x}^{6}\right) * \frac{1}{360} + \left((\left({x}^{4}\right) * \frac{1}{12} + \left({x}^2\right))_*\right))_*\)
  1. Started with
    \[\left(e^{x} - 2\right) + e^{-x}\]
    15.4
  2. Applied taylor to get
    \[\left(e^{x} - 2\right) + e^{-x} \leadsto {x}^2 + \left(\frac{1}{12} \cdot {x}^{4} + \frac{1}{360} \cdot {x}^{6}\right)\]
    0.3
  3. Taylor expanded around 0 to get
    \[\color{red}{{x}^2 + \left(\frac{1}{12} \cdot {x}^{4} + \frac{1}{360} \cdot {x}^{6}\right)} \leadsto \color{blue}{{x}^2 + \left(\frac{1}{12} \cdot {x}^{4} + \frac{1}{360} \cdot {x}^{6}\right)}\]
    0.3
  4. Applied simplify to get
    \[\color{red}{{x}^2 + \left(\frac{1}{12} \cdot {x}^{4} + \frac{1}{360} \cdot {x}^{6}\right)} \leadsto \color{blue}{(\left({x}^{6}\right) * \frac{1}{360} + \left((\left({x}^{4}\right) * \frac{1}{12} + \left({x}^2\right))_*\right))_*}\]
    0.3

  5. Removed slow pow expressions

Original test:


(lambda ((x default))
  #:name "NMSE problem 3.3.7"
  (+ (- (exp x) 2) (exp (- x)))
  #:target
  (* 4 (sqr (sinh (/ x 2)))))