(FPCore (x) :precision binary64 (sqrt (/ (- (exp (* 2.0 x)) 1.0) (- (exp x) 1.0))))
(FPCore (x) :precision binary64 (pow (pow (/ (expm1 (+ x x)) (expm1 x)) 1.5) 0.3333333333333333))
double code(double x) {
return sqrt(((exp((2.0 * x)) - 1.0) / (exp(x) - 1.0)));
}
double code(double x) {
return pow(pow((expm1((x + x)) / expm1(x)), 1.5), 0.3333333333333333);
}
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.pow(Math.pow((Math.expm1((x + x)) / Math.expm1(x)), 1.5), 0.3333333333333333);
}
def code(x): return math.sqrt(((math.exp((2.0 * x)) - 1.0) / (math.exp(x) - 1.0)))
def code(x): return math.pow(math.pow((math.expm1((x + x)) / math.expm1(x)), 1.5), 0.3333333333333333)
function code(x) return sqrt(Float64(Float64(exp(Float64(2.0 * x)) - 1.0) / Float64(exp(x) - 1.0))) end
function code(x) return (Float64(expm1(Float64(x + x)) / expm1(x)) ^ 1.5) ^ 0.3333333333333333 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[Power[N[Power[N[(N[(Exp[N[(x + x), $MachinePrecision]] - 1), $MachinePrecision] / N[(Exp[x] - 1), $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision], 0.3333333333333333], $MachinePrecision]
\sqrt{\frac{e^{2 \cdot x} - 1}{e^{x} - 1}}
{\left({\left(\frac{\mathsf{expm1}\left(x + x\right)}{\mathsf{expm1}\left(x\right)}\right)}^{1.5}\right)}^{0.3333333333333333}
Results
Initial program 40.8
Simplified0.0
Applied egg-rr0.0
Final simplification0.0
herbie shell --seed 2022203
(FPCore (x)
:name "sqrtexp (problem 3.4.4)"
:precision binary64
(sqrt (/ (- (exp (* 2.0 x)) 1.0) (- (exp x) 1.0))))