Average Error: 0.0 → 0.0
Time: 1.0s
Precision: 64
\[x \cdot x - 1.0\]
\[x \cdot x - 1.0\]
x \cdot x - 1.0
x \cdot x - 1.0
double f(double x) {
        double r8675913 = x;
        double r8675914 = r8675913 * r8675913;
        double r8675915 = 1.0;
        double r8675916 = r8675914 - r8675915;
        return r8675916;
}

double f(double x) {
        double r8675917 = x;
        double r8675918 = r8675917 * r8675917;
        double r8675919 = 1.0;
        double r8675920 = r8675918 - r8675919;
        return r8675920;
}

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

    \[\leadsto x \cdot x - 1.0\]

Reproduce

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