Average Error: 40.6 → 0.1
Time: 4.1s
Precision: binary64
\[\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}} \]
\[\sqrt{\sqrt[3]{{\left(\frac{\mathsf{expm1}\left(x + x\right)}{\mathsf{expm1}\left(x\right)}\right)}^{3}}} \]
(FPCore (x)
 :precision binary64
 (sqrt (/ (- (exp (* 2.0 x)) 1.0) (- (exp x) 1.0))))
(FPCore (x)
 :precision binary64
 (sqrt (cbrt (pow (/ (expm1 (+ x x)) (expm1 x)) 3.0))))
double code(double x) {
	return sqrt(((exp((2.0 * x)) - 1.0) / (exp(x) - 1.0)));
}
double code(double x) {
	return sqrt(cbrt(pow((expm1((x + x)) / expm1(x)), 3.0)));
}
public static double code(double x) {
	return Math.sqrt(((Math.exp((2.0 * x)) - 1.0) / (Math.exp(x) - 1.0)));
}
public static double code(double x) {
	return Math.sqrt(Math.cbrt(Math.pow((Math.expm1((x + x)) / Math.expm1(x)), 3.0)));
}
function code(x)
	return sqrt(Float64(Float64(exp(Float64(2.0 * x)) - 1.0) / Float64(exp(x) - 1.0)))
end
function code(x)
	return sqrt(cbrt((Float64(expm1(Float64(x + x)) / expm1(x)) ^ 3.0)))
end
code[x_] := N[Sqrt[N[(N[(N[Exp[N[(2.0 * x), $MachinePrecision]], $MachinePrecision] - 1.0), $MachinePrecision] / N[(N[Exp[x], $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
code[x_] := N[Sqrt[N[Power[N[Power[N[(N[(Exp[N[(x + x), $MachinePrecision]] - 1), $MachinePrecision] / N[(Exp[x] - 1), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision]
\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}
\sqrt{\sqrt[3]{{\left(\frac{\mathsf{expm1}\left(x + x\right)}{\mathsf{expm1}\left(x\right)}\right)}^{3}}}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 40.6

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

    \[\leadsto \color{blue}{\sqrt{\frac{\mathsf{expm1}\left(x + x\right)}{\mathsf{expm1}\left(x\right)}}} \]
  3. Applied egg-rr0.1

    \[\leadsto \sqrt{\color{blue}{\sqrt[3]{{\left(\frac{\mathsf{expm1}\left(x + x\right)}{\mathsf{expm1}\left(x\right)}\right)}^{3}}}} \]
  4. Final simplification0.1

    \[\leadsto \sqrt{\sqrt[3]{{\left(\frac{\mathsf{expm1}\left(x + x\right)}{\mathsf{expm1}\left(x\right)}\right)}^{3}}} \]

Reproduce

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