\[\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}\]
Test:
NMSE problem 3.4.4
Bits:
128 bits
Bits error versus x
Time: 8.9 s
Input Error: 39.9
Output Error: 0.0
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 -1.7643470284436324 \cdot 10^{-06} \\ \sqrt{1} \cdot \sqrt{e^{x} + 1} & \text{otherwise} \end{cases}\)

    if x < -1.7643470284436324e-06

    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.1
    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 -1.7643470284436324e-06 < x

    1. Started with
      \[\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}\]
      60.1
    2. Using strategy rm
      60.1
    3. Applied flip-- to get
      \[\sqrt{\frac{e^{2 \cdot x} - 1}{\color{red}{e^{x} - 1}}} \leadsto \sqrt{\frac{e^{2 \cdot x} - 1}{\color{blue}{\frac{{\left(e^{x}\right)}^2 - {1}^2}{e^{x} + 1}}}}\]
      59.9
    4. Applied associate-/r/ to get
      \[\sqrt{\color{red}{\frac{e^{2 \cdot x} - 1}{\frac{{\left(e^{x}\right)}^2 - {1}^2}{e^{x} + 1}}}} \leadsto \sqrt{\color{blue}{\frac{e^{2 \cdot x} - 1}{{\left(e^{x}\right)}^2 - {1}^2} \cdot \left(e^{x} + 1\right)}}\]
      59.9
    5. Applied sqrt-prod to get
      \[\color{red}{\sqrt{\frac{e^{2 \cdot x} - 1}{{\left(e^{x}\right)}^2 - {1}^2} \cdot \left(e^{x} + 1\right)}} \leadsto \color{blue}{\sqrt{\frac{e^{2 \cdot x} - 1}{{\left(e^{x}\right)}^2 - {1}^2}} \cdot \sqrt{e^{x} + 1}}\]
      59.9
    6. Applied simplify to get
      \[\color{red}{\sqrt{\frac{e^{2 \cdot x} - 1}{{\left(e^{x}\right)}^2 - {1}^2}}} \cdot \sqrt{e^{x} + 1} \leadsto \color{blue}{\sqrt{\frac{e^{x \cdot 2} - 1}{{\left(e^{x}\right)}^2 - 1}}} \cdot \sqrt{e^{x} + 1}\]
      59.9
    7. Applied simplify to get
      \[\sqrt{\color{red}{\frac{e^{x \cdot 2} - 1}{{\left(e^{x}\right)}^2 - 1}}} \cdot \sqrt{e^{x} + 1} \leadsto \sqrt{\color{blue}{1}} \cdot \sqrt{e^{x} + 1}\]
      0.0

  1. Removed slow pow expressions

Original test:


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