Average Error: 0.0 → 0.0
Time: 985.0ms
Precision: 64
\[1 - \frac{x}{y}\]
\[1 - \frac{x}{y}\]
1 - \frac{x}{y}
1 - \frac{x}{y}
double f(double x, double y) {
        double r592758 = 1.0;
        double r592759 = x;
        double r592760 = y;
        double r592761 = r592759 / r592760;
        double r592762 = r592758 - r592761;
        return r592762;
}

double f(double x, double y) {
        double r592763 = 1.0;
        double r592764 = x;
        double r592765 = y;
        double r592766 = r592764 / r592765;
        double r592767 = r592763 - r592766;
        return r592767;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

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

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

Reproduce

herbie shell --seed 1 
(FPCore (x y)
  :name "1 - x/y"
  :precision binary64
  (- 1 (/ x y)))