Average Error: 0 → 0
Time: 317.0ms
Precision: 64
\[100 \cdot \frac{x - x}{x}\]
\[100 \cdot \frac{x - x}{x}\]
100 \cdot \frac{x - x}{x}
100 \cdot \frac{x - x}{x}
double f(double x) {
        double r383907 = 100.0;
        double r383908 = x;
        double r383909 = r383908 - r383908;
        double r383910 = r383909 / r383908;
        double r383911 = r383907 * r383910;
        return r383911;
}

double f(double x) {
        double r383912 = 100.0;
        double r383913 = x;
        double r383914 = r383913 - r383913;
        double r383915 = r383914 / r383913;
        double r383916 = r383912 * r383915;
        return r383916;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0
Target0
Herbie0
\[0.0\]

Derivation

  1. Initial program 0

    \[100 \cdot \frac{x - x}{x}\]
  2. Final simplification0

    \[\leadsto 100 \cdot \frac{x - x}{x}\]

Reproduce

herbie shell --seed 2020020 +o rules:numerics
(FPCore (x)
  :name "ReportTypes:explainFloat from gipeda-0.1.2.1"
  :precision binary64

  :herbie-target
  0.0

  (* 100 (/ (- x x) x)))