?

Average Error: 0.0 → 0.0
Time: 3.7s
Precision: binary64
Cost: 19520

?

\[0 \leq x \land x \leq 1000\]
\[\sqrt{x} - \log x \]
\[\log \left(\frac{1}{x} \cdot e^{\sqrt{x}}\right) \]
(FPCore (x) :precision binary64 (- (sqrt x) (log x)))
(FPCore (x) :precision binary64 (log (* (/ 1.0 x) (exp (sqrt x)))))
double code(double x) {
	return sqrt(x) - log(x);
}
double code(double x) {
	return log(((1.0 / x) * exp(sqrt(x))));
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = sqrt(x) - log(x)
end function
real(8) function code(x)
    real(8), intent (in) :: x
    code = log(((1.0d0 / x) * exp(sqrt(x))))
end function
public static double code(double x) {
	return Math.sqrt(x) - Math.log(x);
}
public static double code(double x) {
	return Math.log(((1.0 / x) * Math.exp(Math.sqrt(x))));
}
def code(x):
	return math.sqrt(x) - math.log(x)
def code(x):
	return math.log(((1.0 / x) * math.exp(math.sqrt(x))))
function code(x)
	return Float64(sqrt(x) - log(x))
end
function code(x)
	return log(Float64(Float64(1.0 / x) * exp(sqrt(x))))
end
function tmp = code(x)
	tmp = sqrt(x) - log(x);
end
function tmp = code(x)
	tmp = log(((1.0 / x) * exp(sqrt(x))));
end
code[x_] := N[(N[Sqrt[x], $MachinePrecision] - N[Log[x], $MachinePrecision]), $MachinePrecision]
code[x_] := N[Log[N[(N[(1.0 / x), $MachinePrecision] * N[Exp[N[Sqrt[x], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\sqrt{x} - \log x
\log \left(\frac{1}{x} \cdot e^{\sqrt{x}}\right)

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.0

    \[\sqrt{x} - \log x \]
  2. Applied egg-rr0.0

    \[\leadsto \color{blue}{\log \left(\frac{e^{\sqrt{x}}}{x}\right)} \]
  3. Applied egg-rr0.0

    \[\leadsto \log \color{blue}{\left(\frac{1}{x} \cdot e^{\sqrt{x}}\right)} \]
  4. Final simplification0.0

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

Alternatives

Alternative 1
Error0.0
Cost19392
\[\log \left(\frac{e^{\sqrt{x}}}{x}\right) \]
Alternative 2
Error0.0
Cost12992
\[\sqrt{x} - \log x \]
Alternative 3
Error2.8
Cost6528
\[-\log x \]

Error

Reproduce?

herbie shell --seed 1 
(FPCore (x)
  :name "sqrt(x) - log(x)"
  :precision binary64
  :pre (and (<= 0.0 x) (<= x 1000.0))
  (- (sqrt x) (log x)))