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 r233809 = x;
        double r233810 = y;
        double r233811 = r233809 + r233810;
        double r233812 = 1.0;
        double r233813 = r233810 + r233812;
        double r233814 = r233811 / r233813;
        return r233814;
}

double f(double x, double y) {
        double r233815 = x;
        double r233816 = y;
        double r233817 = r233815 + r233816;
        double r233818 = 1.0;
        double r233819 = 1.0;
        double r233820 = r233816 + r233819;
        double r233821 = r233818 / r233820;
        double r233822 = r233817 * r233821;
        return r233822;
}

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