\[e^{a \cdot x} - 1\]
Test:
NMSE section 3.5
Bits:
128 bits
Bits error versus a
Bits error versus x
Time: 9.8 s
Input Error: 12.8
Output Error: 0.1
Log:
Profile: 🕒
\(\begin{cases} e^{a \cdot x} - 1 & \text{when } a \cdot x \le -0.0055857897f0 \\ {\left(e^{\frac{1}{2}}\right)}^{\left(a \cdot x\right)} \cdot \left(a \cdot x\right) & \text{otherwise} \end{cases}\)

    if (* a x) < -0.0055857897f0

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

    if -0.0055857897f0 < (* a x)

    1. Started with
      \[e^{a \cdot x} - 1\]
      19.9
    2. Using strategy rm
      19.9
    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)}}\]
      21.1
    4. Applied taylor to get
      \[e^{\log \left(e^{a \cdot x} - 1\right)} \leadsto e^{\log x + \left(\log a + \frac{1}{2} \cdot \left(a \cdot x\right)\right)}\]
      23.6
    5. Taylor expanded around 0 to get
      \[e^{\color{red}{\log x + \left(\log a + \frac{1}{2} \cdot \left(a \cdot x\right)\right)}} \leadsto e^{\color{blue}{\log x + \left(\log a + \frac{1}{2} \cdot \left(a \cdot x\right)\right)}}\]
      23.6
    6. Applied simplify to get
      \[e^{\log x + \left(\log a + \frac{1}{2} \cdot \left(a \cdot x\right)\right)} \leadsto {\left(e^{\frac{1}{2}}\right)}^{\left(a \cdot x\right)} \cdot \left(a \cdot x\right)\]
      0.1

    7. Applied final simplification

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