Average Error: 0.0 → 0.0
Time: 7.9s
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 r548204 = x;
        double r548205 = y;
        double r548206 = r548204 - r548205;
        double r548207 = r548204 + r548205;
        double r548208 = r548206 / r548207;
        return r548208;
}

double f(double x, double y) {
        double r548209 = x;
        double r548210 = y;
        double r548211 = r548209 - r548210;
        double r548212 = r548209 + r548210;
        double r548213 = r548211 / r548212;
        return r548213;
}

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 2019209 
(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)))