Average Error: 0.6 → 0.2
Time: 13.3s
Precision: 64
\[x \gt 0.0\]
\[\frac{1}{{x}^{2}}\]
\[\frac{\frac{1}{{x}^{\left(\frac{2}{2}\right)}}}{{x}^{\left(\frac{2}{2}\right)}}\]
\frac{1}{{x}^{2}}
\frac{\frac{1}{{x}^{\left(\frac{2}{2}\right)}}}{{x}^{\left(\frac{2}{2}\right)}}
double f(double x) {
        double r182457 = 1.0;
        double r182458 = x;
        double r182459 = 2.0;
        double r182460 = pow(r182458, r182459);
        double r182461 = r182457 / r182460;
        return r182461;
}

double f(double x) {
        double r182462 = 1.0;
        double r182463 = x;
        double r182464 = 2.0;
        double r182465 = 2.0;
        double r182466 = r182464 / r182465;
        double r182467 = pow(r182463, r182466);
        double r182468 = r182462 / r182467;
        double r182469 = r182468 / r182467;
        return r182469;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.6

    \[\frac{1}{{x}^{2}}\]
  2. Using strategy rm
  3. Applied sqr-pow0.6

    \[\leadsto \frac{1}{\color{blue}{{x}^{\left(\frac{2}{2}\right)} \cdot {x}^{\left(\frac{2}{2}\right)}}}\]
  4. Applied associate-/r*0.2

    \[\leadsto \color{blue}{\frac{\frac{1}{{x}^{\left(\frac{2}{2}\right)}}}{{x}^{\left(\frac{2}{2}\right)}}}\]
  5. Final simplification0.2

    \[\leadsto \frac{\frac{1}{{x}^{\left(\frac{2}{2}\right)}}}{{x}^{\left(\frac{2}{2}\right)}}\]

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "1 / x^2"
  :pre (> x 0.0)
  (/ 1.0 (pow x 2.0)))