Average Error: 0.0 → 0.0
Time: 4.8s
Precision: 64
\[{x}^{2} - {x}^{\left(-2\right)}\]
\[{x}^{2} - {x}^{\left(-2\right)}\]
{x}^{2} - {x}^{\left(-2\right)}
{x}^{2} - {x}^{\left(-2\right)}
double f(double x) {
        double r37978957 = x;
        double r37978958 = 2.0;
        double r37978959 = pow(r37978957, r37978958);
        double r37978960 = -r37978958;
        double r37978961 = pow(r37978957, r37978960);
        double r37978962 = r37978959 - r37978961;
        return r37978962;
}

double f(double x) {
        double r37978963 = x;
        double r37978964 = 2.0;
        double r37978965 = pow(r37978963, r37978964);
        double r37978966 = -r37978964;
        double r37978967 = pow(r37978963, r37978966);
        double r37978968 = r37978965 - r37978967;
        return r37978968;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[{x}^{2} - {x}^{\left(-2\right)}\]
  2. Final simplification0.0

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

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "pow(x,2)-pow(x,-2)"
  (- (pow x 2.0) (pow x (- 2.0))))