Average Error: 0.3 → 0.0
Time: 9.8s
Precision: 64
\[\log x - \log \left(\log x\right)\]
\[\log \left(\frac{\sqrt{x}}{\sqrt{\log x}}\right) + \log \left(\frac{\sqrt{x}}{\sqrt{\log x}}\right)\]
\log x - \log \left(\log x\right)
\log \left(\frac{\sqrt{x}}{\sqrt{\log x}}\right) + \log \left(\frac{\sqrt{x}}{\sqrt{\log x}}\right)
double f(double x) {
        double r139741 = x;
        double r139742 = log(r139741);
        double r139743 = log(r139742);
        double r139744 = r139742 - r139743;
        return r139744;
}

double f(double x) {
        double r139745 = x;
        double r139746 = sqrt(r139745);
        double r139747 = log(r139745);
        double r139748 = sqrt(r139747);
        double r139749 = r139746 / r139748;
        double r139750 = log(r139749);
        double r139751 = r139750 + r139750;
        return r139751;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

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. Using strategy rm
  5. Applied add-sqr-sqrt0.0

    \[\leadsto \log \left(\frac{x}{\color{blue}{\sqrt{\log x} \cdot \sqrt{\log x}}}\right)\]
  6. Applied add-sqr-sqrt0.0

    \[\leadsto \log \left(\frac{\color{blue}{\sqrt{x} \cdot \sqrt{x}}}{\sqrt{\log x} \cdot \sqrt{\log x}}\right)\]
  7. Applied times-frac0.0

    \[\leadsto \log \color{blue}{\left(\frac{\sqrt{x}}{\sqrt{\log x}} \cdot \frac{\sqrt{x}}{\sqrt{\log x}}\right)}\]
  8. Applied log-prod0.0

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

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

Reproduce

herbie shell --seed 2019209 +o rules:numerics
(FPCore (x)
  :name "Jmat.Real.lambertw, estimator"
  :precision binary64
  (- (log x) (log (log x))))