Average Error: 0.0 → 0.0
Time: 1.3s
Precision: 64
\[x \cdot x - 1\]
\[x \cdot x - 1\]
x \cdot x - 1
x \cdot x - 1
double f(double x) {
        double r15019311 = x;
        double r15019312 = r15019311 * r15019311;
        double r15019313 = 1.0;
        double r15019314 = r15019312 - r15019313;
        return r15019314;
}

double f(double x) {
        double r15019315 = x;
        double r15019316 = r15019315 * r15019315;
        double r15019317 = 1.0;
        double r15019318 = r15019316 - r15019317;
        return r15019318;
}

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 2019174 +o rules:numerics
(FPCore (x)
  :name "Data.Random.Dice:roll from dice-0.1"
  (- (* x x) 1.0))