Average Error: 0.0 → 0.1
Time: 16.2s
Precision: 64
\[\frac{x - y}{1 - y}\]
\[\frac{1}{\frac{1 - y}{x - y}}\]
\frac{x - y}{1 - y}
\frac{1}{\frac{1 - y}{x - y}}
double f(double x, double y) {
        double r184178 = x;
        double r184179 = y;
        double r184180 = r184178 - r184179;
        double r184181 = 1.0;
        double r184182 = r184181 - r184179;
        double r184183 = r184180 / r184182;
        return r184183;
}

double f(double x, double y) {
        double r184184 = 1.0;
        double r184185 = 1.0;
        double r184186 = y;
        double r184187 = r184185 - r184186;
        double r184188 = x;
        double r184189 = r184188 - r184186;
        double r184190 = r184187 / r184189;
        double r184191 = r184184 / r184190;
        return r184191;
}

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 clear-num0.1

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

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

Reproduce

herbie shell --seed 2019304 +o rules:numerics
(FPCore (x y)
  :name "Diagrams.Trail:splitAtParam  from diagrams-lib-1.3.0.3, C"
  :precision binary64
  (/ (- x y) (- 1 y)))