Average Error: 0.0 → 0.0
Time: 3.9s
Precision: 64
\[\frac{x + y}{y + 1}\]
\[\frac{x + y}{1 + y}\]
\frac{x + y}{y + 1}
\frac{x + y}{1 + y}
double f(double x, double y) {
        double r183163 = x;
        double r183164 = y;
        double r183165 = r183163 + r183164;
        double r183166 = 1.0;
        double r183167 = r183164 + r183166;
        double r183168 = r183165 / r183167;
        return r183168;
}

double f(double x, double y) {
        double r183169 = x;
        double r183170 = y;
        double r183171 = r183169 + r183170;
        double r183172 = 1.0;
        double r183173 = r183172 + r183170;
        double r183174 = r183171 / r183173;
        return r183174;
}

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}{y + 1}\]
  2. Simplified0.0

    \[\leadsto \color{blue}{\frac{y + x}{y + 1}}\]
  3. Final simplification0.0

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

Reproduce

herbie shell --seed 2019194 
(FPCore (x y)
  :name "Data.Colour.SRGB:invTransferFunction from colour-2.3.3"
  (/ (+ x y) (+ y 1.0)))