Average Error: 0.0 → 0.0
Time: 1.4s
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 r8456 = 0.5;
        double r8457 = x;
        double r8458 = r8457 * r8457;
        double r8459 = y;
        double r8460 = r8458 - r8459;
        double r8461 = r8456 * r8460;
        return r8461;
}

double f(double x, double y) {
        double r8462 = x;
        double r8463 = r8462 * r8462;
        double r8464 = y;
        double r8465 = r8463 - r8464;
        double r8466 = 0.5;
        double r8467 = r8465 * r8466;
        return r8467;
}

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