Average Error: 0.0 → 0.0
Time: 8.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 r341771 = 0.5;
        double r341772 = x;
        double r341773 = r341772 * r341772;
        double r341774 = y;
        double r341775 = r341773 - r341774;
        double r341776 = r341771 * r341775;
        return r341776;
}

double f(double x, double y) {
        double r341777 = x;
        double r341778 = r341777 * r341777;
        double r341779 = y;
        double r341780 = r341778 - r341779;
        double r341781 = 0.5;
        double r341782 = r341780 * r341781;
        return r341782;
}

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