\[\frac{e^{x}}{e^{x} - 1}\]
Test:
NMSE section 3.11
Bits:
128 bits
Bits error versus x
Time: 12.5 s
Input Error: 45.6
Output Error: 0.1
Log:
Profile: 🕒
\(\begin{cases} \sqrt[3]{{\left(\frac{e^{x}}{x + {x}^2 \cdot \left(x \cdot \frac{1}{6} + \frac{1}{2}\right)}\right)}^3} & \text{when } x \le -0.0017322825953503614 \\ \frac{1}{2} + \left(\frac{1}{x} + \frac{1}{12} \cdot x\right) & \text{otherwise} \end{cases}\)

    if x < -0.0017322825953503614

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

    if -0.0017322825953503614 < x

    1. Started with
      \[\frac{e^{x}}{e^{x} - 1}\]
      60.4
    2. Applied taylor to get
      \[\frac{e^{x}}{e^{x} - 1} \leadsto \frac{1}{2} + \left(\frac{1}{x} + \frac{1}{12} \cdot x\right)\]
      0.1
    3. Taylor expanded around 0 to get
      \[\color{red}{\frac{1}{2} + \left(\frac{1}{x} + \frac{1}{12} \cdot x\right)} \leadsto \color{blue}{\frac{1}{2} + \left(\frac{1}{x} + \frac{1}{12} \cdot x\right)}\]
      0.1

  1. Removed slow pow expressions

Original test:


(lambda ((x default))
  #:name "NMSE section 3.11"
  (/ (exp x) (- (exp x) 1))
  #:target
  (/ 1 (- 1 (exp (- x)))))