Average Error: 0.0 → 0.0
Time: 1.6s
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 r8145 = 0.5;
        double r8146 = x;
        double r8147 = r8146 * r8146;
        double r8148 = y;
        double r8149 = r8147 - r8148;
        double r8150 = r8145 * r8149;
        return r8150;
}

double f(double x, double y) {
        double r8151 = 0.5;
        double r8152 = x;
        double r8153 = r8152 * r8152;
        double r8154 = y;
        double r8155 = r8153 - r8154;
        double r8156 = r8151 * r8155;
        return r8156;
}

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 0.5 \cdot \left(x \cdot x - y\right)\]

Reproduce

herbie shell --seed 2019315 +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)))