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

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

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