Average Error: 0.0 → 0.0
Time: 1.6s
Precision: 64
\[2 \cdot \left(x \cdot x - x \cdot y\right)\]
\[2 \cdot \left(x \cdot x - x \cdot y\right)\]
2 \cdot \left(x \cdot x - x \cdot y\right)
2 \cdot \left(x \cdot x - x \cdot y\right)
double f(double x, double y) {
        double r593425 = 2.0;
        double r593426 = x;
        double r593427 = r593426 * r593426;
        double r593428 = y;
        double r593429 = r593426 * r593428;
        double r593430 = r593427 - r593429;
        double r593431 = r593425 * r593430;
        return r593431;
}

double f(double x, double y) {
        double r593432 = 2.0;
        double r593433 = x;
        double r593434 = r593433 * r593433;
        double r593435 = y;
        double r593436 = r593433 * r593435;
        double r593437 = r593434 - r593436;
        double r593438 = r593432 * r593437;
        return r593438;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.0
\[\left(x \cdot 2\right) \cdot \left(x - y\right)\]

Derivation

  1. Initial program 0.0

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

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

Reproduce

herbie shell --seed 2019354 
(FPCore (x y)
  :name "Linear.Matrix:fromQuaternion from linear-1.19.1.3, A"
  :precision binary64

  :herbie-target
  (* (* x 2) (- x y))

  (* 2 (- (* x x) (* x y))))