\[e^{a \cdot x} - 1\]
Test:
NMSE section 3.5
Bits:
128 bits
Bits error versus a
Bits error versus x
Time: 8.7 s
Input Error: 33.6
Output Error: 0.1
Log:
Profile: 🕒
\(\begin{cases} \frac{{\left(e^{a \cdot x}\right)}^2}{e^{a \cdot x} + 1} - \frac{1}{1 + e^{a \cdot x}} & \text{when } a \cdot x \le -7.260081363831148 \cdot 10^{-07} \\ \left(\frac{1}{2} \cdot \left(x \cdot a\right)\right) \cdot \left(x \cdot a\right) + x \cdot a & \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 flip-- to get
      \[\color{red}{e^{a \cdot x} - 1} \leadsto \color{blue}{\frac{{\left(e^{a \cdot x}\right)}^2 - {1}^2}{e^{a \cdot x} + 1}}\]
      0.2
    4. Using strategy rm
      0.2
    5. Applied div-sub to get
      \[\color{red}{\frac{{\left(e^{a \cdot x}\right)}^2 - {1}^2}{e^{a \cdot x} + 1}} \leadsto \color{blue}{\frac{{\left(e^{a \cdot x}\right)}^2}{e^{a \cdot x} + 1} - \frac{{1}^2}{e^{a \cdot x} + 1}}\]
      0.2
    6. Applied simplify to get
      \[\frac{{\left(e^{a \cdot x}\right)}^2}{e^{a \cdot x} + 1} - \color{red}{\frac{{1}^2}{e^{a \cdot x} + 1}} \leadsto \frac{{\left(e^{a \cdot x}\right)}^2}{e^{a \cdot x} + 1} - \color{blue}{\frac{1}{1 + e^{a \cdot x}}}\]
      0.2

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

    1. Started with
      \[e^{a \cdot x} - 1\]
      47.6
    2. Applied taylor to get
      \[e^{a \cdot x} - 1 \leadsto \left(\frac{1}{2} \cdot \left({a}^2 \cdot {x}^2\right) + \left(1 + a \cdot x\right)\right) - 1\]
      43.5
    3. Taylor expanded around 0 to get
      \[\color{red}{\left(\frac{1}{2} \cdot \left({a}^2 \cdot {x}^2\right) + \left(1 + a \cdot x\right)\right)} - 1 \leadsto \color{blue}{\left(\frac{1}{2} \cdot \left({a}^2 \cdot {x}^2\right) + \left(1 + a \cdot x\right)\right)} - 1\]
      43.5
    4. Applied simplify to get
      \[\color{red}{\left(\frac{1}{2} \cdot \left({a}^2 \cdot {x}^2\right) + \left(1 + a \cdot x\right)\right) - 1} \leadsto \color{blue}{\left(\frac{1}{2} \cdot \left(x \cdot a\right)\right) \cdot \left(x \cdot a\right) + x \cdot a}\]
      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)))