Average Error: 0.3 → 0.0
Time: 10.7s
Precision: 64
\[\log x - \log \left(\log x\right)\]
\[\log \left(\frac{x}{\log x}\right)\]
double f(double x) {
        double r32719134 = x;
        double r32719135 = log(r32719134);
        double r32719136 = log(r32719135);
        double r32719137 = r32719135 - r32719136;
        return r32719137;
}

double f(double x) {
        double r32719138 = x;
        double r32719139 = log(r32719138);
        double r32719140 = r32719138 / r32719139;
        double r32719141 = log(r32719140);
        return r32719141;
}

\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 +o rules:numerics
(FPCore (x)
  :name "Jmat.Real.lambertw, estimator"
  (- (log x) (log (log x))))