Average Error: 0.0 → 0.0
Time: 1.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 r8063 = 0.5;
        double r8064 = x;
        double r8065 = r8064 * r8064;
        double r8066 = y;
        double r8067 = r8065 - r8066;
        double r8068 = r8063 * r8067;
        return r8068;
}

double f(double x, double y) {
        double r8069 = x;
        double r8070 = r8069 * r8069;
        double r8071 = y;
        double r8072 = r8070 - r8071;
        double r8073 = 0.5;
        double r8074 = r8072 * r8073;
        return r8074;
}

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