Average Error: 0.0 → 0.0
Time: 34.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 r18383 = 0.5;
        double r18384 = x;
        double r18385 = r18384 * r18384;
        double r18386 = y;
        double r18387 = r18385 - r18386;
        double r18388 = r18383 * r18387;
        return r18388;
}

double f(double x, double y) {
        double r18389 = x;
        double r18390 = r18389 * r18389;
        double r18391 = y;
        double r18392 = r18390 - r18391;
        double r18393 = 0.5;
        double r18394 = r18392 * r18393;
        return r18394;
}

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