\[e^{a \cdot x} - 1\]
Test:
NMSE section 3.5
Bits:
128 bits
Bits error versus a
Bits error versus x
Time: 19.9 s
Input Error: 35.9
Output Error: 0.1
Log:
\(\begin{cases} e^{a \cdot x} - 1 & \text{when } a \cdot x \le -2.6715888843965976 \cdot 10^{-09} \\ x \cdot a & \text{otherwise} \end{cases}\)

    if (* a x) < -2.6715888843965976e-09

    1. Started with
      \[e^{a \cdot x} - 1\]
      0.4

    if -2.6715888843965976e-09 < (* a x)

    1. Started with
      \[e^{a \cdot x} - 1\]
      49.1
    2. Applied taylor to get
      \[e^{a \cdot x} - 1 \leadsto \frac{1}{6} \cdot \left({x}^{3} \cdot {a}^{3}\right) + \left(\frac{1}{2} \cdot \left({a}^2 \cdot {x}^2\right) + x \cdot a\right)\]
      26.3
    3. Taylor expanded around 0 to get
      \[\color{red}{\frac{1}{6} \cdot \left({x}^{3} \cdot {a}^{3}\right) + \left(\frac{1}{2} \cdot \left({a}^2 \cdot {x}^2\right) + x \cdot a\right)} \leadsto \color{blue}{\frac{1}{6} \cdot \left({x}^{3} \cdot {a}^{3}\right) + \left(\frac{1}{2} \cdot \left({a}^2 \cdot {x}^2\right) + x \cdot a\right)}\]
      26.3
    4. Applied simplify to get
      \[\color{red}{\frac{1}{6} \cdot \left({x}^{3} \cdot {a}^{3}\right) + \left(\frac{1}{2} \cdot \left({a}^2 \cdot {x}^2\right) + x \cdot a\right)} \leadsto \color{blue}{{x}^2 \cdot \left({a}^3 \cdot \left(x \cdot \frac{1}{6}\right) + \frac{1}{2} \cdot {a}^2\right) + a \cdot x}\]
      24.1
    5. Applied taylor to get
      \[{x}^2 \cdot \left({a}^3 \cdot \left(x \cdot \frac{1}{6}\right) + \frac{1}{2} \cdot {a}^2\right) + a \cdot x \leadsto 0 + a \cdot x\]
      0
    6. Taylor expanded around 0 to get
      \[\color{red}{0} + a \cdot x \leadsto \color{blue}{0} + a \cdot x\]
      0
    7. Applied simplify to get
      \[\color{red}{0 + a \cdot x} \leadsto \color{blue}{x \cdot a}\]
      0

  1. Removed slow pow expressions

Original test:


(lambda ((a default) (x default))
  #:name "NMSE section 3.5"
  (- (exp (* a x)) 1)
  #:target
  (if (< (fabs (* a x)) 1/10) (* (* a x) (+ 1 (+ (/ (* a x) 2) (/ (sqr (* a x)) 6)))) (- (exp (* a x)) 1)))