Average Error: 0.0 → 0.0
Time: 13.4s
Precision: 64
\[\frac{x - y}{1 - y}\]
\[\frac{x}{1 - y} - \frac{y}{1 - y}\]
\frac{x - y}{1 - y}
\frac{x}{1 - y} - \frac{y}{1 - y}
double f(double x, double y) {
        double r10531440 = x;
        double r10531441 = y;
        double r10531442 = r10531440 - r10531441;
        double r10531443 = 1.0;
        double r10531444 = r10531443 - r10531441;
        double r10531445 = r10531442 / r10531444;
        return r10531445;
}

double f(double x, double y) {
        double r10531446 = x;
        double r10531447 = 1.0;
        double r10531448 = y;
        double r10531449 = r10531447 - r10531448;
        double r10531450 = r10531446 / r10531449;
        double r10531451 = r10531448 / r10531449;
        double r10531452 = r10531450 - r10531451;
        return r10531452;
}

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.0

    \[\frac{x - y}{1 - y}\]
  2. Using strategy rm
  3. Applied div-sub0.0

    \[\leadsto \color{blue}{\frac{x}{1 - y} - \frac{y}{1 - y}}\]
  4. Final simplification0.0

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

Reproduce

herbie shell --seed 2019172 
(FPCore (x y)
  :name "Diagrams.Trail:splitAtParam  from diagrams-lib-1.3.0.3, C"
  (/ (- x y) (- 1.0 y)))