Average Error: 0.0 → 0.0
Time: 6.8s
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 r325727 = 0.5;
        double r325728 = x;
        double r325729 = r325728 * r325728;
        double r325730 = y;
        double r325731 = r325729 - r325730;
        double r325732 = r325727 * r325731;
        return r325732;
}

double f(double x, double y) {
        double r325733 = x;
        double r325734 = r325733 * r325733;
        double r325735 = y;
        double r325736 = r325734 - r325735;
        double r325737 = 0.5;
        double r325738 = r325736 * r325737;
        return r325738;
}

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