Average Error: 0.0 → 0.0
Time: 4.3s
Precision: 64
\[2 \cdot \left(x \cdot x - x \cdot y\right)\]
\[\left(x \cdot x - y \cdot x\right) \cdot 2\]
2 \cdot \left(x \cdot x - x \cdot y\right)
\left(x \cdot x - y \cdot x\right) \cdot 2
double f(double x, double y) {
        double r516789 = 2.0;
        double r516790 = x;
        double r516791 = r516790 * r516790;
        double r516792 = y;
        double r516793 = r516790 * r516792;
        double r516794 = r516791 - r516793;
        double r516795 = r516789 * r516794;
        return r516795;
}

double f(double x, double y) {
        double r516796 = x;
        double r516797 = r516796 * r516796;
        double r516798 = y;
        double r516799 = r516798 * r516796;
        double r516800 = r516797 - r516799;
        double r516801 = 2.0;
        double r516802 = r516800 * r516801;
        return r516802;
}

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 \left(x \cdot x - y \cdot x\right) \cdot 2\]

Reproduce

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

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

  (* 2.0 (- (* x x) (* x y))))