\[\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}\]
Test:
NMSE problem 3.4.4
Bits:
128 bits
Bits error versus x
Time: 11.8 s
Input Error: 42.8
Output Error: 0.2
Log:
Profile: 🕒
\(\begin{cases} \sqrt{\frac{e^{2 \cdot x} - 1}{\frac{{\left(e^{x}\right)}^2 - {1}^2}{e^{x} + 1}}} & \text{when } x \le -6.025113626725801 \cdot 10^{-15} \\ \left(\frac{x \cdot \frac{1}{2}}{\sqrt{2}} + \sqrt{2}\right) + \left(\frac{1}{4} - \frac{\frac{1}{8}}{2}\right) \cdot \frac{{x}^2}{\sqrt{2}} & \text{otherwise} \end{cases}\)

    if x < -6.025113626725801e-15

    1. Started with
      \[\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}\]
      0.7
    2. Using strategy rm
      0.7
    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}}}}\]
      0.4

    if -6.025113626725801e-15 < x

    1. Started with
      \[\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}\]
      60.8
    2. Applied taylor to get
      \[\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}} \leadsto \left(\frac{1}{2} \cdot \frac{x}{\sqrt{2}} + \left(\sqrt{2} + \frac{1}{4} \cdot \frac{{x}^2}{\sqrt{2}}\right)\right) - \frac{1}{8} \cdot \frac{{x}^2}{{\left(\sqrt{2}\right)}^{3}}\]
      0.1
    3. Taylor expanded around 0 to get
      \[\color{red}{\left(\frac{1}{2} \cdot \frac{x}{\sqrt{2}} + \left(\sqrt{2} + \frac{1}{4} \cdot \frac{{x}^2}{\sqrt{2}}\right)\right) - \frac{1}{8} \cdot \frac{{x}^2}{{\left(\sqrt{2}\right)}^{3}}} \leadsto \color{blue}{\left(\frac{1}{2} \cdot \frac{x}{\sqrt{2}} + \left(\sqrt{2} + \frac{1}{4} \cdot \frac{{x}^2}{\sqrt{2}}\right)\right) - \frac{1}{8} \cdot \frac{{x}^2}{{\left(\sqrt{2}\right)}^{3}}}\]
      0.1
    4. Applied simplify to get
      \[\color{red}{\left(\frac{1}{2} \cdot \frac{x}{\sqrt{2}} + \left(\sqrt{2} + \frac{1}{4} \cdot \frac{{x}^2}{\sqrt{2}}\right)\right) - \frac{1}{8} \cdot \frac{{x}^2}{{\left(\sqrt{2}\right)}^{3}}} \leadsto \color{blue}{\left(\frac{x \cdot \frac{1}{2}}{\sqrt{2}} + \sqrt{2}\right) + \frac{x \cdot x}{\sqrt{2}} \cdot \left(\frac{1}{4} - \frac{\frac{1}{8}}{2}\right)}\]
      0.2
    5. Applied simplify to get
      \[\left(\frac{x \cdot \frac{1}{2}}{\sqrt{2}} + \sqrt{2}\right) + \color{red}{\frac{x \cdot x}{\sqrt{2}} \cdot \left(\frac{1}{4} - \frac{\frac{1}{8}}{2}\right)} \leadsto \left(\frac{x \cdot \frac{1}{2}}{\sqrt{2}} + \sqrt{2}\right) + \color{blue}{\left(\frac{1}{4} - \frac{\frac{1}{8}}{2}\right) \cdot \frac{{x}^2}{\sqrt{2}}}\]
      0.2

  1. Removed slow pow expressions

Original test:


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