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

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

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