Average Error: 0.0 → 0.0
Time: 787.0ms
Precision: 64
\[\frac{x - y}{x}\]
\[\frac{x - y}{x}\]
\frac{x - y}{x}
\frac{x - y}{x}
double f(double x, double y) {
        double r816448 = x;
        double r816449 = y;
        double r816450 = r816448 - r816449;
        double r816451 = r816450 / r816448;
        return r816451;
}

double f(double x, double y) {
        double r816452 = x;
        double r816453 = y;
        double r816454 = r816452 - r816453;
        double r816455 = r816454 / r816452;
        return r816455;
}

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
\[1 - \frac{y}{x}\]

Derivation

  1. Initial program 0.0

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

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

Reproduce

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

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

  (/ (- x y) x))