Average Error: 0.3 → 0.0
Time: 2.8s
Precision: binary64
Cost: 13120
\[\log x - \log \log x \]
\[\mathsf{log1p}\left(\frac{x}{\log x} + -1\right) \]
(FPCore (x) :precision binary64 (- (log x) (log (log x))))
(FPCore (x) :precision binary64 (log1p (+ (/ x (log x)) -1.0)))
double code(double x) {
	return log(x) - log(log(x));
}
double code(double x) {
	return log1p(((x / log(x)) + -1.0));
}
public static double code(double x) {
	return Math.log(x) - Math.log(Math.log(x));
}
public static double code(double x) {
	return Math.log1p(((x / Math.log(x)) + -1.0));
}
def code(x):
	return math.log(x) - math.log(math.log(x))
def code(x):
	return math.log1p(((x / math.log(x)) + -1.0))
function code(x)
	return Float64(log(x) - log(log(x)))
end
function code(x)
	return log1p(Float64(Float64(x / log(x)) + -1.0))
end
code[x_] := N[(N[Log[x], $MachinePrecision] - N[Log[N[Log[x], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[x_] := N[Log[1 + N[(N[(x / N[Log[x], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]
\log x - \log \log x
\mathsf{log1p}\left(\frac{x}{\log x} + -1\right)

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.3

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

    \[\leadsto \color{blue}{\mathsf{log1p}\left(\frac{x}{\log x} - 1\right)} \]
  3. Final simplification0.0

    \[\leadsto \mathsf{log1p}\left(\frac{x}{\log x} + -1\right) \]

Alternatives

Alternative 1
Error0.0
Cost12992
\[\log \left(\frac{x}{\log x}\right) \]

Error

Reproduce

herbie shell --seed 2022298 
(FPCore (x)
  :name "Jmat.Real.lambertw, estimator"
  :precision binary64
  (- (log x) (log (log x))))