\[e^{a \cdot x} - 1\]
Test:
NMSE section 3.5
Bits:
128 bits
Bits error versus a
Bits error versus x
Time: 9.7 s
Input Error: 32.4
Output Error: 0.1
Log:
Profile: 🕒
\(\begin{cases} \log \left(e^{e^{a \cdot x} - 1}\right) & \text{when } a \cdot x \le -7.260081363831148 \cdot 10^{-07} \\ a \cdot x + \left(\left(a \cdot x\right) \cdot \left(a \cdot x\right)\right) \cdot \left(\left(a \cdot x\right) \cdot \frac{1}{6} + \frac{1}{2}\right) & \text{otherwise} \end{cases}\)

    if (* a x) < -7.260081363831148e-07

    1. Started with
      \[e^{a \cdot x} - 1\]
      0.2
    2. Using strategy rm
      0.2
    3. Applied add-log-exp to get
      \[\color{red}{e^{a \cdot x} - 1} \leadsto \color{blue}{\log \left(e^{e^{a \cdot x} - 1}\right)}\]
      0.2

    if -7.260081363831148e-07 < (* a x)

    1. Started with
      \[e^{a \cdot x} - 1\]
      46.8
    2. Using strategy rm
      46.8
    3. Applied add-exp-log to get
      \[\color{red}{e^{a \cdot x} - 1} \leadsto \color{blue}{e^{\log \left(e^{a \cdot x} - 1\right)}}\]
      47.3
    4. Applied taylor to get
      \[e^{\log \left(e^{a \cdot x} - 1\right)} \leadsto \frac{1}{2} \cdot \left(e^{\log x + \log a} \cdot \left(a \cdot x\right)\right) + \left(\frac{1}{6} \cdot \left(e^{\log x + \log a} \cdot \left({a}^2 \cdot {x}^2\right)\right) + e^{\log x + \log a}\right)\]
      49.9
    5. Taylor expanded around 0 to get
      \[\color{red}{\frac{1}{2} \cdot \left(e^{\log x + \log a} \cdot \left(a \cdot x\right)\right) + \left(\frac{1}{6} \cdot \left(e^{\log x + \log a} \cdot \left({a}^2 \cdot {x}^2\right)\right) + e^{\log x + \log a}\right)} \leadsto \color{blue}{\frac{1}{2} \cdot \left(e^{\log x + \log a} \cdot \left(a \cdot x\right)\right) + \left(\frac{1}{6} \cdot \left(e^{\log x + \log a} \cdot \left({a}^2 \cdot {x}^2\right)\right) + e^{\log x + \log a}\right)}\]
      49.9
    6. Applied simplify to get
      \[\frac{1}{2} \cdot \left(e^{\log x + \log a} \cdot \left(a \cdot x\right)\right) + \left(\frac{1}{6} \cdot \left(e^{\log x + \log a} \cdot \left({a}^2 \cdot {x}^2\right)\right) + e^{\log x + \log a}\right) \leadsto \left(\frac{1}{2} \cdot {\left(a \cdot x\right)}^2 + a \cdot x\right) + {\left(a \cdot x\right)}^2 \cdot \left(\left(a \cdot x\right) \cdot \frac{1}{6}\right)\]
      0.1

    7. Applied final simplification
    8. Applied simplify to get
      \[\color{red}{\left(\frac{1}{2} \cdot {\left(a \cdot x\right)}^2 + a \cdot x\right) + {\left(a \cdot x\right)}^2 \cdot \left(\left(a \cdot x\right) \cdot \frac{1}{6}\right)} \leadsto \color{blue}{a \cdot x + \left(\left(a \cdot x\right) \cdot \left(a \cdot x\right)\right) \cdot \left(\left(a \cdot x\right) \cdot \frac{1}{6} + \frac{1}{2}\right)}\]
      0.1

  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)))