Average Error: 0.0 → 0.0
Time: 1.6s
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 r8471 = 0.5;
        double r8472 = x;
        double r8473 = r8472 * r8472;
        double r8474 = y;
        double r8475 = r8473 - r8474;
        double r8476 = r8471 * r8475;
        return r8476;
}

double f(double x, double y) {
        double r8477 = x;
        double r8478 = r8477 * r8477;
        double r8479 = y;
        double r8480 = r8478 - r8479;
        double r8481 = 0.5;
        double r8482 = r8480 * r8481;
        return r8482;
}

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