Average Error: 0.0 → 0.0
Time: 9.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 r492667 = 0.5;
        double r492668 = x;
        double r492669 = r492668 * r492668;
        double r492670 = y;
        double r492671 = r492669 - r492670;
        double r492672 = r492667 * r492671;
        return r492672;
}

double f(double x, double y) {
        double r492673 = x;
        double r492674 = r492673 * r492673;
        double r492675 = y;
        double r492676 = r492674 - r492675;
        double r492677 = 0.5;
        double r492678 = r492676 * r492677;
        return r492678;
}

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