Average Error: 0.0 → 0.0
Time: 3.1s
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 r169444 = 0.5;
        double r169445 = x;
        double r169446 = r169445 * r169445;
        double r169447 = y;
        double r169448 = r169446 - r169447;
        double r169449 = r169444 * r169448;
        return r169449;
}

double f(double x, double y) {
        double r169450 = x;
        double r169451 = r169450 * r169450;
        double r169452 = y;
        double r169453 = r169451 - r169452;
        double r169454 = 0.5;
        double r169455 = r169453 * r169454;
        return r169455;
}

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