Average Error: 0.0 → 0.0
Time: 3.8s
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 r484876 = 2.0;
        double r484877 = x;
        double r484878 = r484877 * r484877;
        double r484879 = y;
        double r484880 = r484877 * r484879;
        double r484881 = r484878 - r484880;
        double r484882 = r484876 * r484881;
        return r484882;
}

double f(double x, double y) {
        double r484883 = 2.0;
        double r484884 = x;
        double r484885 = r484884 * r484884;
        double r484886 = y;
        double r484887 = r484884 * r484886;
        double r484888 = r484885 - r484887;
        double r484889 = r484883 * r484888;
        return r484889;
}

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 +o rules:numerics
(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))))