Average Error: 0.3 → 0.0
Time: 2.0s
Precision: binary64
Cost: 12992
\[\log x - \log \log x \]
\[\log \left(\frac{x}{\log x}\right) \]
(FPCore (x) :precision binary64 (- (log x) (log (log x))))
(FPCore (x) :precision binary64 (log (/ x (log x))))
double code(double x) {
	return log(x) - log(log(x));
}
double code(double x) {
	return log((x / log(x)));
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = log(x) - log(log(x))
end function
real(8) function code(x)
    real(8), intent (in) :: x
    code = log((x / log(x)))
end function
public static double code(double x) {
	return Math.log(x) - Math.log(Math.log(x));
}
public static double code(double x) {
	return Math.log((x / Math.log(x)));
}
def code(x):
	return math.log(x) - math.log(math.log(x))
def code(x):
	return math.log((x / math.log(x)))
function code(x)
	return Float64(log(x) - log(log(x)))
end
function code(x)
	return log(Float64(x / log(x)))
end
function tmp = code(x)
	tmp = log(x) - log(log(x));
end
function tmp = code(x)
	tmp = log((x / log(x)));
end
code[x_] := N[(N[Log[x], $MachinePrecision] - N[Log[N[Log[x], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[x_] := N[Log[N[(x / N[Log[x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\log x - \log \log x
\log \left(\frac{x}{\log x}\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.3

    \[\leadsto \color{blue}{\log x + \left(-\log \log x\right)} \]
  3. Simplified0.0

    \[\leadsto \color{blue}{\log \left(\frac{x}{\log x}\right)} \]
    Proof
    (log.f64 (/.f64 x (log.f64 x))): 0 points increase in error, 0 points decrease in error
    (Rewrite=> log-div_binary64 (-.f64 (log.f64 x) (log.f64 (log.f64 x)))): 72 points increase in error, 1 points decrease in error
    (Rewrite<= unsub-neg_binary64 (+.f64 (log.f64 x) (neg.f64 (log.f64 (log.f64 x))))): 0 points increase in error, 0 points decrease in error
  4. Final simplification0.0

    \[\leadsto \log \left(\frac{x}{\log x}\right) \]

Reproduce

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