Average Error: 0.0 → 0.0
Time: 16.3s
Precision: 64
\[{x}^{2} - 1\]
\[x \cdot x - 1\]
{x}^{2} - 1
x \cdot x - 1
double f(double x) {
        double r37045925 = x;
        double r37045926 = 2.0;
        double r37045927 = pow(r37045925, r37045926);
        double r37045928 = 1.0;
        double r37045929 = r37045927 - r37045928;
        return r37045929;
}

double f(double x) {
        double r37045930 = x;
        double r37045931 = r37045930 * r37045930;
        double r37045932 = 1.0;
        double r37045933 = r37045931 - r37045932;
        return r37045933;
}

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} - 1\]
  2. Simplified0.0

    \[\leadsto \color{blue}{x \cdot x - 1}\]
  3. Final simplification0.0

    \[\leadsto x \cdot x - 1\]

Reproduce

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