Average Error: 0.0 → 0.0
Time: 14.3s
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 r712098 = 0.5;
        double r712099 = x;
        double r712100 = r712099 * r712099;
        double r712101 = y;
        double r712102 = r712100 - r712101;
        double r712103 = r712098 * r712102;
        return r712103;
}

double f(double x, double y) {
        double r712104 = x;
        double r712105 = r712104 * r712104;
        double r712106 = y;
        double r712107 = r712105 - r712106;
        double r712108 = 0.5;
        double r712109 = r712107 * r712108;
        return r712109;
}

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