Average Error: 0.0 → 0.0
Time: 13.7s
Precision: 64
\[-\log \left(\frac{1}{x} - 1\right)\]
\[-\left(\log \left(\sqrt{\frac{1}{x} - 1}\right) + \log \left(\sqrt{\frac{1}{x} - 1}\right)\right)\]
-\log \left(\frac{1}{x} - 1\right)
-\left(\log \left(\sqrt{\frac{1}{x} - 1}\right) + \log \left(\sqrt{\frac{1}{x} - 1}\right)\right)
double f(double x) {
        double r1689458 = 1.0;
        double r1689459 = x;
        double r1689460 = r1689458 / r1689459;
        double r1689461 = r1689460 - r1689458;
        double r1689462 = log(r1689461);
        double r1689463 = -r1689462;
        return r1689463;
}

double f(double x) {
        double r1689464 = 1.0;
        double r1689465 = x;
        double r1689466 = r1689464 / r1689465;
        double r1689467 = r1689466 - r1689464;
        double r1689468 = sqrt(r1689467);
        double r1689469 = log(r1689468);
        double r1689470 = r1689469 + r1689469;
        double r1689471 = -r1689470;
        return r1689471;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[-\log \left(\frac{1}{x} - 1\right)\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt0.0

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

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

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

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "-log(1/x-1)"
  (- (log (- (/ 1.0 x) 1.0))))