Average Error: 0.0 → 0.0
Time: 5.4s
Precision: 64
\[\frac{x - y}{x + y}\]
\[\frac{x - y}{x + y}\]
\frac{x - y}{x + y}
\frac{x - y}{x + y}
double f(double x, double y) {
        double r564609 = x;
        double r564610 = y;
        double r564611 = r564609 - r564610;
        double r564612 = r564609 + r564610;
        double r564613 = r564611 / r564612;
        return r564613;
}

double f(double x, double y) {
        double r564614 = x;
        double r564615 = y;
        double r564616 = r564614 - r564615;
        double r564617 = r564614 + r564615;
        double r564618 = r564616 / r564617;
        return r564618;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.0
\[\frac{x}{x + y} - \frac{y}{x + y}\]

Derivation

  1. Initial program 0.0

    \[\frac{x - y}{x + y}\]
  2. Final simplification0.0

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

Reproduce

herbie shell --seed 1978988140 
(FPCore (x y)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, D"
  :precision binary64

  :herbie-target
  (- (/ x (+ x y)) (/ y (+ x y)))

  (/ (- x y) (+ x y)))