Average Error: 0.0 → 0.0
Time: 4.4s
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 r610740 = 2.0;
        double r610741 = x;
        double r610742 = r610741 * r610741;
        double r610743 = y;
        double r610744 = r610741 * r610743;
        double r610745 = r610742 - r610744;
        double r610746 = r610740 * r610745;
        return r610746;
}

double f(double x, double y) {
        double r610747 = 2.0;
        double r610748 = x;
        double r610749 = r610748 * r610748;
        double r610750 = y;
        double r610751 = r610748 * r610750;
        double r610752 = r610749 - r610751;
        double r610753 = r610747 * r610752;
        return r610753;
}

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 2020047 
(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))))