Average Error: 0.0 → 0.0
Time: 8.3s
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 r453959 = 2.0;
        double r453960 = x;
        double r453961 = r453960 * r453960;
        double r453962 = y;
        double r453963 = r453960 * r453962;
        double r453964 = r453961 - r453963;
        double r453965 = r453959 * r453964;
        return r453965;
}

double f(double x, double y) {
        double r453966 = 2.0;
        double r453967 = x;
        double r453968 = r453967 * r453967;
        double r453969 = y;
        double r453970 = r453967 * r453969;
        double r453971 = r453968 - r453970;
        double r453972 = r453966 * r453971;
        return r453972;
}

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