Average Error: 0.3 → 0.0
Time: 8.3s
Precision: 64
\[\log x - \log \left(\log x\right)\]
\[\log \left(\frac{x}{\log x}\right)\]
double f(double x) {
        double r8227403 = x;
        double r8227404 = log(r8227403);
        double r8227405 = log(r8227404);
        double r8227406 = r8227404 - r8227405;
        return r8227406;
}

double f(double x) {
        double r8227407 = x;
        double r8227408 = log(r8227407);
        double r8227409 = r8227407 / r8227408;
        double r8227410 = log(r8227409);
        return r8227410;
}

\log x - \log \left(\log x\right)
\log \left(\frac{x}{\log x}\right)

Error

Bits error versus x

Derivation

  1. Initial program 0.3

    \[\log x - \log \left(\log x\right)\]
  2. Using strategy rm
  3. Applied diff-log0.0

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

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

Reproduce

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