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

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

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

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

    1. Started with
      \[e^{a \cdot x} - 1\]
      47.3
    2. Applied taylor to get
      \[e^{a \cdot x} - 1 \leadsto \frac{1}{2} \cdot \left({a}^2 \cdot {x}^2\right) + \left(\frac{1}{6} \cdot \left({a}^{3} \cdot {x}^{3}\right) + a \cdot x\right)\]
      18.2
    3. Taylor expanded around 0 to get
      \[\color{red}{\frac{1}{2} \cdot \left({a}^2 \cdot {x}^2\right) + \left(\frac{1}{6} \cdot \left({a}^{3} \cdot {x}^{3}\right) + a \cdot x\right)} \leadsto \color{blue}{\frac{1}{2} \cdot \left({a}^2 \cdot {x}^2\right) + \left(\frac{1}{6} \cdot \left({a}^{3} \cdot {x}^{3}\right) + a \cdot x\right)}\]
      18.2
    4. Applied simplify to get
      \[\color{red}{\frac{1}{2} \cdot \left({a}^2 \cdot {x}^2\right) + \left(\frac{1}{6} \cdot \left({a}^{3} \cdot {x}^{3}\right) + a \cdot x\right)} \leadsto \color{blue}{\frac{1}{2} \cdot {\left(x \cdot a\right)}^2 + \left(x \cdot a + \left(\frac{1}{6} \cdot {a}^3\right) \cdot {x}^3\right)}\]
      18.2
    5. Using strategy rm
      18.2
    6. Applied add-cbrt-cube to get
      \[\frac{1}{2} \cdot {\left(x \cdot a\right)}^2 + \left(x \cdot a + \color{red}{\left(\frac{1}{6} \cdot {a}^3\right) \cdot {x}^3}\right) \leadsto \frac{1}{2} \cdot {\left(x \cdot a\right)}^2 + \left(x \cdot a + \color{blue}{\sqrt[3]{{\left(\left(\frac{1}{6} \cdot {a}^3\right) \cdot {x}^3\right)}^3}}\right)\]
      19.5
    7. Applied simplify to get
      \[\frac{1}{2} \cdot {\left(x \cdot a\right)}^2 + \left(x \cdot a + \sqrt[3]{\color{red}{{\left(\left(\frac{1}{6} \cdot {a}^3\right) \cdot {x}^3\right)}^3}}\right) \leadsto \frac{1}{2} \cdot {\left(x \cdot a\right)}^2 + \left(x \cdot a + \sqrt[3]{\color{blue}{{\left(\frac{1}{6} \cdot {\left(a \cdot x\right)}^3\right)}^3}}\right)\]
      5.5

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