Average Error: 0.0 → 0.0
Time: 1.7s
Precision: 64
\[0.5 \cdot \left(x \cdot x - y\right)\]
\[\left(x \cdot x - y\right) \cdot 0.5\]
0.5 \cdot \left(x \cdot x - y\right)
\left(x \cdot x - y\right) \cdot 0.5
double f(double x, double y) {
        double r8423 = 0.5;
        double r8424 = x;
        double r8425 = r8424 * r8424;
        double r8426 = y;
        double r8427 = r8425 - r8426;
        double r8428 = r8423 * r8427;
        return r8428;
}

double f(double x, double y) {
        double r8429 = x;
        double r8430 = r8429 * r8429;
        double r8431 = y;
        double r8432 = r8430 - r8431;
        double r8433 = 0.5;
        double r8434 = r8432 * r8433;
        return r8434;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[0.5 \cdot \left(x \cdot x - y\right)\]
  2. Final simplification0.0

    \[\leadsto \left(x \cdot x - y\right) \cdot 0.5\]

Reproduce

herbie shell --seed 2019169 
(FPCore (x y)
  :name "System.Random.MWC.Distributions:standard from mwc-random-0.13.3.2"
  (* 0.5 (- (* x x) y)))