Average Error: 0.0 → 0.0
Time: 4.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 r400997 = x;
        double r400998 = y;
        double r400999 = r400997 + r400998;
        double r401000 = 1.0;
        double r401001 = r400998 + r401000;
        double r401002 = r400999 / r401001;
        return r401002;
}

double f(double x, double y) {
        double r401003 = x;
        double r401004 = y;
        double r401005 = r401003 + r401004;
        double r401006 = 1.0;
        double r401007 = r401006 + r401004;
        double r401008 = r401005 / r401007;
        return r401008;
}

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 2019174 
(FPCore (x y)
  :name "Data.Colour.SRGB:invTransferFunction from colour-2.3.3"
  (/ (+ x y) (+ y 1.0)))