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 r12549 = 0.5;
        double r12550 = x;
        double r12551 = r12550 * r12550;
        double r12552 = y;
        double r12553 = r12551 - r12552;
        double r12554 = r12549 * r12553;
        return r12554;
}

double f(double x, double y) {
        double r12555 = x;
        double r12556 = r12555 * r12555;
        double r12557 = y;
        double r12558 = r12556 - r12557;
        double r12559 = 0.5;
        double r12560 = r12558 * r12559;
        return r12560;
}

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