Average Error: 0.0 → 0.0
Time: 6.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 r158099 = 0.5;
        double r158100 = x;
        double r158101 = r158100 * r158100;
        double r158102 = y;
        double r158103 = r158101 - r158102;
        double r158104 = r158099 * r158103;
        return r158104;
}

double f(double x, double y) {
        double r158105 = x;
        double r158106 = r158105 * r158105;
        double r158107 = y;
        double r158108 = r158106 - r158107;
        double r158109 = 0.5;
        double r158110 = r158108 * r158109;
        return r158110;
}

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