Average Error: 0.0 → 0.0
Time: 4.5s
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 r10046262 = x;
        double r10046263 = y;
        double r10046264 = r10046262 - r10046263;
        double r10046265 = 1.0;
        double r10046266 = r10046265 - r10046263;
        double r10046267 = r10046264 / r10046266;
        return r10046267;
}

double f(double x, double y) {
        double r10046268 = x;
        double r10046269 = 1.0;
        double r10046270 = y;
        double r10046271 = r10046269 - r10046270;
        double r10046272 = r10046268 / r10046271;
        double r10046273 = r10046270 / r10046271;
        double r10046274 = r10046272 - r10046273;
        return r10046274;
}

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 2019171 
(FPCore (x y)
  :name "Diagrams.Trail:splitAtParam  from diagrams-lib-1.3.0.3, C"
  (/ (- x y) (- 1.0 y)))