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

    if x < 0.03150794f0

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

    if 0.03150794f0 < x

    1. Started with
      \[\frac{e^{x}}{e^{x} - 1}\]
      27.6
    2. Using strategy rm
      27.6
    3. Applied clear-num to get
      \[\color{red}{\frac{e^{x}}{e^{x} - 1}} \leadsto \color{blue}{\frac{1}{\frac{e^{x} - 1}{e^{x}}}}\]
      27.6
    4. Applied simplify to get
      \[\frac{1}{\color{red}{\frac{e^{x} - 1}{e^{x}}}} \leadsto \frac{1}{\color{blue}{1 - e^{-x}}}\]
      0.0

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