Average Error: 0.0 → 0.0
Time: 7.6s
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 r14036316 = x;
        double r14036317 = y;
        double r14036318 = r14036316 - r14036317;
        double r14036319 = 1.0;
        double r14036320 = r14036319 - r14036317;
        double r14036321 = r14036318 / r14036320;
        return r14036321;
}

double f(double x, double y) {
        double r14036322 = x;
        double r14036323 = 1.0;
        double r14036324 = y;
        double r14036325 = r14036323 - r14036324;
        double r14036326 = r14036322 / r14036325;
        double r14036327 = r14036324 / r14036325;
        double r14036328 = r14036326 - r14036327;
        return r14036328;
}

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