Average Error: 0.0 → 0.1
Time: 2.2s
Precision: 64
\[\frac{x + y}{y + 1}\]
\[\left(x + y\right) \cdot \frac{1}{y + 1}\]
\frac{x + y}{y + 1}
\left(x + y\right) \cdot \frac{1}{y + 1}
double f(double x, double y) {
        double r257549 = x;
        double r257550 = y;
        double r257551 = r257549 + r257550;
        double r257552 = 1.0;
        double r257553 = r257550 + r257552;
        double r257554 = r257551 / r257553;
        return r257554;
}

double f(double x, double y) {
        double r257555 = x;
        double r257556 = y;
        double r257557 = r257555 + r257556;
        double r257558 = 1.0;
        double r257559 = 1.0;
        double r257560 = r257556 + r257559;
        double r257561 = r257558 / r257560;
        double r257562 = r257557 * r257561;
        return r257562;
}

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. Using strategy rm
  3. Applied div-inv0.1

    \[\leadsto \color{blue}{\left(x + y\right) \cdot \frac{1}{y + 1}}\]
  4. Final simplification0.1

    \[\leadsto \left(x + y\right) \cdot \frac{1}{y + 1}\]

Reproduce

herbie shell --seed 2019354 +o rules:numerics
(FPCore (x y)
  :name "Data.Colour.SRGB:invTransferFunction from colour-2.3.3"
  :precision binary64
  (/ (+ x y) (+ y 1)))