Average Error: 0 → 0
Time: 2.6s
Precision: 64
\[x - \frac{x \cdot x}{100}\]
\[x - \frac{x \cdot x}{100}\]
x - \frac{x \cdot x}{100}
x - \frac{x \cdot x}{100}
double f(double x) {
        double r2283118 = x;
        double r2283119 = r2283118 * r2283118;
        double r2283120 = 100.0;
        double r2283121 = r2283119 / r2283120;
        double r2283122 = r2283118 - r2283121;
        return r2283122;
}

double f(double x) {
        double r2283123 = x;
        double r2283124 = r2283123 * r2283123;
        double r2283125 = 100.0;
        double r2283126 = r2283124 / r2283125;
        double r2283127 = r2283123 - r2283126;
        return r2283127;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0

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

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

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "x - (x* x) / 100"
  :precision binary32
  (- x (/ (* x x) 100)))