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

    if x < -1.2511251203279263e-05

    1. Started with
      \[\frac{e^{x}}{e^{x} - 1}\]
      0.1

    if -1.2511251203279263e-05 < x

    1. Started with
      \[\frac{e^{x}}{e^{x} - 1}\]
      60.7
    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)))))