Average Error: 0.0 → 0.0
Time: 610.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 r687522 = x;
        double r687523 = y;
        double r687524 = r687522 - r687523;
        double r687525 = r687524 / r687522;
        return r687525;
}

double f(double x, double y) {
        double r687526 = x;
        double r687527 = y;
        double r687528 = r687526 - r687527;
        double r687529 = r687528 / r687526;
        return r687529;
}

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 2020035 
(FPCore (x y)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, E"
  :precision binary64

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

  (/ (- x y) x))