Average Error: 0.0 → 0.0
Time: 19.2s
Precision: 64
$-\log \left(\left(-1\right) \cdot \left(1 - \frac{1}{x}\right)\right)$
$-\left(\log \left(\sqrt{\frac{1 \cdot 1}{x} - 1 \cdot 1}\right) + \log \left(\sqrt{\frac{1 \cdot 1}{x} - 1 \cdot 1}\right)\right)$
-\log \left(\left(-1\right) \cdot \left(1 - \frac{1}{x}\right)\right)
-\left(\log \left(\sqrt{\frac{1 \cdot 1}{x} - 1 \cdot 1}\right) + \log \left(\sqrt{\frac{1 \cdot 1}{x} - 1 \cdot 1}\right)\right)
double f(double x) {
double r2129459 = 1.0;
double r2129460 = -r2129459;
double r2129461 = x;
double r2129462 = r2129459 / r2129461;
double r2129463 = r2129459 - r2129462;
double r2129464 = r2129460 * r2129463;
double r2129465 = log(r2129464);
double r2129466 = -r2129465;
return r2129466;
}

double f(double x) {
double r2129467 = 1.0;
double r2129468 = r2129467 * r2129467;
double r2129469 = x;
double r2129470 = r2129468 / r2129469;
double r2129471 = r2129470 - r2129468;
double r2129472 = sqrt(r2129471);
double r2129473 = log(r2129472);
double r2129474 = r2129473 + r2129473;
double r2129475 = -r2129474;
return r2129475;
}

# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.0

$-\log \left(\left(-1\right) \cdot \left(1 - \frac{1}{x}\right)\right)$
2. Simplified0.0

$\leadsto \color{blue}{-\log \left(\frac{1 \cdot 1}{x} - 1 \cdot 1\right)}$
3. Using strategy rm

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

$\leadsto -\color{blue}{\left(\log \left(\sqrt{\frac{1 \cdot 1}{x} - 1 \cdot 1}\right) + \log \left(\sqrt{\frac{1 \cdot 1}{x} - 1 \cdot 1}\right)\right)}$
6. Final simplification0.0

$\leadsto -\left(\log \left(\sqrt{\frac{1 \cdot 1}{x} - 1 \cdot 1}\right) + \log \left(\sqrt{\frac{1 \cdot 1}{x} - 1 \cdot 1}\right)\right)$

# Reproduce

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