Average Error: 0.0 → 0.0
Time: 8.2s
Precision: 64
\[\frac{x - y}{1.0 - y}\]
\[\frac{x}{1.0 - y} - \frac{y}{1.0 - y}\]
\frac{x - y}{1.0 - y}
\frac{x}{1.0 - y} - \frac{y}{1.0 - y}
double f(double x, double y) {
        double r9676539 = x;
        double r9676540 = y;
        double r9676541 = r9676539 - r9676540;
        double r9676542 = 1.0;
        double r9676543 = r9676542 - r9676540;
        double r9676544 = r9676541 / r9676543;
        return r9676544;
}

double f(double x, double y) {
        double r9676545 = x;
        double r9676546 = 1.0;
        double r9676547 = y;
        double r9676548 = r9676546 - r9676547;
        double r9676549 = r9676545 / r9676548;
        double r9676550 = r9676547 / r9676548;
        double r9676551 = r9676549 - r9676550;
        return r9676551;
}

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.0 - y}\]
  2. Using strategy rm
  3. Applied div-sub0.0

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

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

Reproduce

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