Average Error: 0.0 → 0.0
Time: 1.5s
Precision: 64
\[x \cdot x - 1\]
\[x \cdot x - 1\]
x \cdot x - 1
x \cdot x - 1
double f(double x) {
        double r8588715 = x;
        double r8588716 = r8588715 * r8588715;
        double r8588717 = 1.0;
        double r8588718 = r8588716 - r8588717;
        return r8588718;
}

double f(double x) {
        double r8588719 = x;
        double r8588720 = r8588719 * r8588719;
        double r8588721 = 1.0;
        double r8588722 = r8588720 - r8588721;
        return r8588722;
}

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 \cdot x - 1\]
  2. Final simplification0.0

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

Reproduce

herbie shell --seed 2019168 +o rules:numerics
(FPCore (x)
  :name "Data.Random.Dice:roll from dice-0.1"
  (- (* x x) 1.0))