Average Error: 0.0 → 0.0
Time: 10.5s
Precision: 64
\[\log \left(\frac{x}{1 - x}\right)\]
\[\log \left(\left(x + 1\right) \cdot \frac{x \cdot \frac{1}{x + 1}}{1 - x}\right)\]
\log \left(\frac{x}{1 - x}\right)
\log \left(\left(x + 1\right) \cdot \frac{x \cdot \frac{1}{x + 1}}{1 - x}\right)
double f(double x) {
        double r30547499 = x;
        double r30547500 = 1.0;
        double r30547501 = r30547500 - r30547499;
        double r30547502 = r30547499 / r30547501;
        double r30547503 = log(r30547502);
        return r30547503;
}

double f(double x) {
        double r30547504 = x;
        double r30547505 = 1.0;
        double r30547506 = r30547504 + r30547505;
        double r30547507 = 1.0;
        double r30547508 = r30547507 / r30547506;
        double r30547509 = r30547504 * r30547508;
        double r30547510 = r30547505 - r30547504;
        double r30547511 = r30547509 / r30547510;
        double r30547512 = r30547506 * r30547511;
        double r30547513 = log(r30547512);
        return r30547513;
}

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{x}{1 - x}\right)\]
  2. Using strategy rm
  3. Applied flip--0.0

    \[\leadsto \log \left(\frac{x}{\color{blue}{\frac{1 \cdot 1 - x \cdot x}{1 + x}}}\right)\]
  4. Applied associate-/r/0.0

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

    \[\leadsto \log \left(\color{blue}{\frac{\frac{x}{1 + x}}{1 - x}} \cdot \left(1 + x\right)\right)\]
  6. Using strategy rm
  7. Applied div-inv0.0

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

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

Reproduce

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