\[e^{a \cdot x} - 1\]
Test:
NMSE section 3.5
Bits:
128 bits
Bits error versus a
Bits error versus x
Time: 12.3 s
Input Error: 32.3
Output Error: 3.4
Log:
Profile: 🕒
\(\begin{cases} {\left(\sqrt[3]{e^{a \cdot x} - 1}\right)}^3 & \text{when } a \cdot x \le -4.7684410480941605 \cdot 10^{-12} \\ \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) < -4.7684410480941605e-12

    1. Started with
      \[e^{a \cdot x} - 1\]
      0.6
    2. Using strategy rm
      0.6
    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.6

    if -4.7684410480941605e-12 < (* a x)

    1. Started with
      \[e^{a \cdot x} - 1\]
      46.6
    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)\]
      16.7
    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)}\]
      16.7
    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)}\]
      16.7
    5. Using strategy rm
      16.7
    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)\]
      18.0
    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)\]
      4.6

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