Average Error: 0.1 → 0.1
Time: 10.1s
Precision: 64
\[\frac{x}{x - y} \cdot \frac{x}{x - y}\]
\[\frac{\frac{x}{x - y}}{1 - \frac{y}{x}}\]
\frac{x}{x - y} \cdot \frac{x}{x - y}
\frac{\frac{x}{x - y}}{1 - \frac{y}{x}}
double f(double x, double y) {
        double r1416470 = x;
        double r1416471 = y;
        double r1416472 = r1416470 - r1416471;
        double r1416473 = r1416470 / r1416472;
        double r1416474 = r1416473 * r1416473;
        return r1416474;
}

double f(double x, double y) {
        double r1416475 = x;
        double r1416476 = y;
        double r1416477 = r1416475 - r1416476;
        double r1416478 = r1416475 / r1416477;
        double r1416479 = 1.0;
        double r1416480 = r1416476 / r1416475;
        double r1416481 = r1416479 - r1416480;
        double r1416482 = r1416478 / r1416481;
        return r1416482;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[\frac{x}{x - y} \cdot \frac{x}{x - y}\]
  2. Using strategy rm
  3. Applied clear-num0.1

    \[\leadsto \frac{x}{x - y} \cdot \color{blue}{\frac{1}{\frac{x - y}{x}}}\]
  4. Using strategy rm
  5. Applied pow10.1

    \[\leadsto \frac{x}{x - y} \cdot \color{blue}{{\left(\frac{1}{\frac{x - y}{x}}\right)}^{1}}\]
  6. Applied pow10.1

    \[\leadsto \color{blue}{{\left(\frac{x}{x - y}\right)}^{1}} \cdot {\left(\frac{1}{\frac{x - y}{x}}\right)}^{1}\]
  7. Applied pow-prod-down0.1

    \[\leadsto \color{blue}{{\left(\frac{x}{x - y} \cdot \frac{1}{\frac{x - y}{x}}\right)}^{1}}\]
  8. Simplified0.1

    \[\leadsto {\color{blue}{\left(\frac{\frac{x}{x - y}}{1 - \frac{y}{x}}\right)}}^{1}\]
  9. Final simplification0.1

    \[\leadsto \frac{\frac{x}{x - y}}{1 - \frac{y}{x}}\]

Reproduce

herbie shell --seed 1 
(FPCore (x y)
  :name "(x/(x-y))*(x/(x-y))"
  :precision binary64
  (* (/ x (- x y)) (/ x (- x y))))