Average Error: 0.0 → 0.0
Time: 7.4s
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 r370363 = 0.5;
        double r370364 = x;
        double r370365 = r370364 * r370364;
        double r370366 = y;
        double r370367 = r370365 - r370366;
        double r370368 = r370363 * r370367;
        return r370368;
}

double f(double x, double y) {
        double r370369 = x;
        double r370370 = r370369 * r370369;
        double r370371 = y;
        double r370372 = r370370 - r370371;
        double r370373 = 0.5;
        double r370374 = r370372 * r370373;
        return r370374;
}

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 2019163 
(FPCore (x y)
  :name "System.Random.MWC.Distributions:standard from mwc-random-0.13.3.2"
  (* 0.5 (- (* x x) y)))