\[e^{a \cdot x} - 1\]
Test:
NMSE section 3.5
Bits:
128 bits
Bits error versus a
Bits error versus x
Time: 10.4 s
Input Error: 37.8
Output Error: 4.1
Log:
Profile: 🕒
\(\begin{cases} \frac{\sqrt[3]{{\left({\left(e^{a \cdot x}\right)}^2 - {1}^2\right)}^3}}{e^{a \cdot x} + 1} & \text{when } a \cdot x \le -6.102351927067217 \cdot 10^{-10} \\ \frac{2 \cdot \left(a \cdot x\right)}{1 + e^{x \cdot a}} & \text{otherwise} \end{cases}\)

    if (* a x) < -6.102351927067217e-10

    1. Started with
      \[e^{a \cdot x} - 1\]
      0.4
    2. Using strategy rm
      0.4
    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.4
    4. Using strategy rm
      0.4
    5. Applied add-cbrt-cube to get
      \[\frac{\color{red}{{\left(e^{a \cdot x}\right)}^2 - {1}^2}}{e^{a \cdot x} + 1} \leadsto \frac{\color{blue}{\sqrt[3]{{\left({\left(e^{a \cdot x}\right)}^2 - {1}^2\right)}^3}}}{e^{a \cdot x} + 1}\]
      0.4

    if -6.102351927067217e-10 < (* a x)

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

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