\[\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}\]
Test:
NMSE problem 3.4.4
Bits:
128 bits
Bits error versus x
Time: 7.8 s
Input Error: 19.8
Output Error: 3.5
Log:
Profile: 🕒
\(\begin{cases} \sqrt{\frac{\left(\sqrt{e^{2 \cdot x}} + 1\right) \cdot \left(\sqrt{e^{2 \cdot x}} - 1\right)}{e^{x} - 1}} & \text{when } x \le -0.00261488f0 \\ \sqrt{\frac{1}{2} \cdot {x}^2 + \left(2 + x\right)} & \text{otherwise} \end{cases}\)

    if x < -0.00261488f0

    1. Started with
      \[\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}\]
      0.1
    2. Using strategy rm
      0.1
    3. Applied add-sqr-sqrt to get
      \[\sqrt{\frac{\color{red}{e^{2 \cdot x}} - 1}{e^{x} - 1}} \leadsto \sqrt{\frac{\color{blue}{{\left(\sqrt{e^{2 \cdot x}}\right)}^2} - 1}{e^{x} - 1}}\]
      0.0
    4. Applied difference-of-sqr-1 to get
      \[\sqrt{\frac{\color{red}{{\left(\sqrt{e^{2 \cdot x}}\right)}^2 - 1}}{e^{x} - 1}} \leadsto \sqrt{\frac{\color{blue}{\left(\sqrt{e^{2 \cdot x}} + 1\right) \cdot \left(\sqrt{e^{2 \cdot x}} - 1\right)}}{e^{x} - 1}}\]
      0.0

    if -0.00261488f0 < x

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

  1. Removed slow pow expressions

Original test:


(lambda ((x default))
  #:name "NMSE problem 3.4.4"
  (sqrt (/ (- (exp (* 2 x)) 1) (- (exp x) 1))))