Average Error: 0.0 → 0.0
Time: 36.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 r18549 = 0.5;
        double r18550 = x;
        double r18551 = r18550 * r18550;
        double r18552 = y;
        double r18553 = r18551 - r18552;
        double r18554 = r18549 * r18553;
        return r18554;
}

double f(double x, double y) {
        double r18555 = x;
        double r18556 = r18555 * r18555;
        double r18557 = y;
        double r18558 = r18556 - r18557;
        double r18559 = 0.5;
        double r18560 = r18558 * r18559;
        return r18560;
}

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