Average Error: 0.0 → 0.0
Time: 10.9s
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 r25307 = 0.5;
        double r25308 = x;
        double r25309 = r25308 * r25308;
        double r25310 = y;
        double r25311 = r25309 - r25310;
        double r25312 = r25307 * r25311;
        return r25312;
}

double f(double x, double y) {
        double r25313 = x;
        double r25314 = r25313 * r25313;
        double r25315 = y;
        double r25316 = r25314 - r25315;
        double r25317 = 0.5;
        double r25318 = r25316 * r25317;
        return r25318;
}

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. Simplified0.0

    \[\leadsto \color{blue}{\left(x \cdot x - y\right) \cdot 0.5}\]
  3. Final simplification0.0

    \[\leadsto \left(x \cdot x - y\right) \cdot 0.5\]

Reproduce

herbie shell --seed 2019179 
(FPCore (x y)
  :name "System.Random.MWC.Distributions:standard from mwc-random-0.13.3.2"
  (* 0.5 (- (* x x) y)))