Average Error: 0.6 → 0.2
Time: 3.8s
Precision: 64
\[\frac{1}{x \cdot x}\]
\[\frac{\frac{1}{x}}{x}\]
\frac{1}{x \cdot x}
\frac{\frac{1}{x}}{x}
double f(double x) {
        double r420328 = 1.0;
        double r420329 = x;
        double r420330 = r420329 * r420329;
        double r420331 = r420328 / r420330;
        return r420331;
}

double f(double x) {
        double r420332 = 1.0;
        double r420333 = x;
        double r420334 = r420332 / r420333;
        double r420335 = r420334 / r420333;
        return r420335;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.6
Target0.2
Herbie0.2
\[\frac{\frac{1}{x}}{x}\]

Derivation

  1. Initial program 0.6

    \[\frac{1}{x \cdot x}\]
  2. Using strategy rm
  3. Applied associate-/r*0.2

    \[\leadsto \color{blue}{\frac{\frac{1}{x}}{x}}\]
  4. Final simplification0.2

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

Reproduce

herbie shell --seed 2019356 
(FPCore (x)
  :name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, A"
  :precision binary64

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

  (/ 1 (* x x)))