Average Error: 0.0 → 0.0
Time: 1.1s
Precision: 64
\[x \cdot x - 1\]
\[x \cdot x - 1\]
x \cdot x - 1
x \cdot x - 1
double f(double x) {
        double r146590 = x;
        double r146591 = r146590 * r146590;
        double r146592 = 1.0;
        double r146593 = r146591 - r146592;
        return r146593;
}

double f(double x) {
        double r146594 = x;
        double r146595 = r146594 * r146594;
        double r146596 = 1.0;
        double r146597 = r146595 - r146596;
        return r146597;
}

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