Average Error: 0.0 → 0.0
Time: 2.0s
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 r8592 = 0.5;
        double r8593 = x;
        double r8594 = r8593 * r8593;
        double r8595 = y;
        double r8596 = r8594 - r8595;
        double r8597 = r8592 * r8596;
        return r8597;
}

double f(double x, double y) {
        double r8598 = x;
        double r8599 = r8598 * r8598;
        double r8600 = y;
        double r8601 = r8599 - r8600;
        double r8602 = 0.5;
        double r8603 = r8601 * r8602;
        return r8603;
}

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