Average Error: 40.7 → 0.1
Time: 4.9s
Precision: binary64
\[\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}\]
\[\frac{\sqrt{1 + {\left(e^{x}\right)}^{3}}}{\sqrt{1 + \left(e^{x} \cdot e^{x} - e^{x}\right)}}\]
\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}
\frac{\sqrt{1 + {\left(e^{x}\right)}^{3}}}{\sqrt{1 + \left(e^{x} \cdot e^{x} - e^{x}\right)}}
(FPCore (x)
 :precision binary64
 (sqrt (/ (- (exp (* 2.0 x)) 1.0) (- (exp x) 1.0))))
(FPCore (x)
 :precision binary64
 (/
  (sqrt (+ 1.0 (pow (exp x) 3.0)))
  (sqrt (+ 1.0 (- (* (exp x) (exp x)) (exp x))))))
double code(double x) {
	return sqrt((exp(2.0 * x) - 1.0) / (exp(x) - 1.0));
}
double code(double x) {
	return sqrt(1.0 + pow(exp(x), 3.0)) / sqrt(1.0 + ((exp(x) * exp(x)) - exp(x)));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 40.7

    \[\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}\]
  2. Simplified0.0

    \[\leadsto \color{blue}{\sqrt{1 + e^{x}}}\]
  3. Using strategy rm
  4. Applied flip3-+_binary640.1

    \[\leadsto \sqrt{\color{blue}{\frac{{1}^{3} + {\left(e^{x}\right)}^{3}}{1 \cdot 1 + \left(e^{x} \cdot e^{x} - 1 \cdot e^{x}\right)}}}\]
  5. Applied sqrt-div_binary640.1

    \[\leadsto \color{blue}{\frac{\sqrt{{1}^{3} + {\left(e^{x}\right)}^{3}}}{\sqrt{1 \cdot 1 + \left(e^{x} \cdot e^{x} - 1 \cdot e^{x}\right)}}}\]
  6. Final simplification0.1

    \[\leadsto \frac{\sqrt{1 + {\left(e^{x}\right)}^{3}}}{\sqrt{1 + \left(e^{x} \cdot e^{x} - e^{x}\right)}}\]

Reproduce

herbie shell --seed 2021097 
(FPCore (x)
  :name "sqrtexp (problem 3.4.4)"
  :precision binary64
  (sqrt (/ (- (exp (* 2.0 x)) 1.0) (- (exp x) 1.0))))