Average Error: 0.0 → 0.0
Time: 1.4s
Precision: 64
\[0.5 \cdot \left(x \cdot x - y\right)\]
\[\frac{1}{2} \cdot \left(x \cdot x - y\right)\]
0.5 \cdot \left(x \cdot x - y\right)
\frac{1}{2} \cdot \left(x \cdot x - y\right)
double f(double x, double y) {
        double r8360 = 0.5;
        double r8361 = x;
        double r8362 = r8361 * r8361;
        double r8363 = y;
        double r8364 = r8362 - r8363;
        double r8365 = r8360 * r8364;
        return r8365;
}

double f(double x, double y) {
        double r8366 = 1.0;
        double r8367 = 2.0;
        double r8368 = r8366 / r8367;
        double r8369 = x;
        double r8370 = r8369 * r8369;
        double r8371 = y;
        double r8372 = r8370 - r8371;
        double r8373 = r8368 * r8372;
        return r8373;
}

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. Simplified0.0

    \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(x \cdot x - y\right)}\]
  3. Final simplification0.0

    \[\leadsto \frac{1}{2} \cdot \left(x \cdot x - y\right)\]

Reproduce

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