Average Error: 0.1 → 0.1
Time: 1.1s
Precision: 64
\[0.5 \cdot \left(x \cdot x - y\right)\]
\[0.5 \cdot \left(x \cdot x - y\right)\]
0.5 \cdot \left(x \cdot x - y\right)
0.5 \cdot \left(x \cdot x - y\right)
double f(double x, double y) {
        double r64 = 0.5;
        double r65 = x;
        double r66 = r65 * r65;
        double r67 = y;
        double r68 = r66 - r67;
        double r69 = r64 * r68;
        return r69;
}

double f(double x, double y) {
        double r70 = 0.5;
        double r71 = x;
        double r72 = r71 * r71;
        double r73 = y;
        double r74 = r72 - r73;
        double r75 = r70 * r74;
        return r75;
}

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.1

    \[0.5 \cdot \left(x \cdot x - y\right)\]
  2. Final simplification0.1

    \[\leadsto 0.5 \cdot \left(x \cdot x - y\right)\]

Reproduce

herbie shell --seed 2020025 +o rules:numerics
(FPCore (x y)
  :name "System.Random.MWC.Distributions:standard from mwc-random-0.13.3.2"
  :precision binary64
  (* 0.5 (- (* x x) y)))