Average Error: 0.3 → 0.0
Time: 12.6s
Precision: 64
\[\log x - \log \left(\log x\right)\]
\[\log \left(\frac{1}{\sqrt{\log x}} \cdot \frac{x}{\sqrt{\log x}}\right)\]
\log x - \log \left(\log x\right)
\log \left(\frac{1}{\sqrt{\log x}} \cdot \frac{x}{\sqrt{\log x}}\right)
double f(double x) {
        double r3558777 = x;
        double r3558778 = log(r3558777);
        double r3558779 = log(r3558778);
        double r3558780 = r3558778 - r3558779;
        return r3558780;
}

double f(double x) {
        double r3558781 = 1.0;
        double r3558782 = x;
        double r3558783 = log(r3558782);
        double r3558784 = sqrt(r3558783);
        double r3558785 = r3558781 / r3558784;
        double r3558786 = r3558782 / r3558784;
        double r3558787 = r3558785 * r3558786;
        double r3558788 = log(r3558787);
        return r3558788;
}

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 *-un-lft-identity0.0

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

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

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

Reproduce

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