Average Error: 0.0 → 0.0
Time: 3.0s
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 r14437542 = x;
        double r14437543 = y;
        double r14437544 = r14437542 - r14437543;
        double r14437545 = r14437544 / r14437542;
        return r14437545;
}

double f(double x, double y) {
        double r14437546 = x;
        double r14437547 = y;
        double r14437548 = r14437546 - r14437547;
        double r14437549 = r14437548 / r14437546;
        return r14437549;
}

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

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

  (/ (- x y) x))