Average Error: 0.0 → 0.0
Time: 7.0s
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 r8938646 = x;
        double r8938647 = y;
        double r8938648 = r8938646 - r8938647;
        double r8938649 = 1.0;
        double r8938650 = r8938649 - r8938647;
        double r8938651 = r8938648 / r8938650;
        return r8938651;
}

double f(double x, double y) {
        double r8938652 = x;
        double r8938653 = 1.0;
        double r8938654 = y;
        double r8938655 = r8938653 - r8938654;
        double r8938656 = r8938652 / r8938655;
        double r8938657 = r8938654 / r8938655;
        double r8938658 = r8938656 - r8938657;
        return r8938658;
}

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