Average Error: 0.0 → 0.0
Time: 5.9s
Precision: 64
\[x \cdot \left(y + y\right)\]
\[2 \cdot \left(x \cdot y\right)\]
x \cdot \left(y + y\right)
2 \cdot \left(x \cdot y\right)
double f(double x, double y) {
        double r61714 = x;
        double r61715 = y;
        double r61716 = r61715 + r61715;
        double r61717 = r61714 * r61716;
        return r61717;
}

double f(double x, double y) {
        double r61718 = 2.0;
        double r61719 = x;
        double r61720 = y;
        double r61721 = r61719 * r61720;
        double r61722 = r61718 * r61721;
        return r61722;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[x \cdot \left(y + y\right)\]
  2. Using strategy rm
  3. Applied *-un-lft-identity0.0

    \[\leadsto \color{blue}{\left(1 \cdot x\right)} \cdot \left(y + y\right)\]
  4. Applied associate-*l*0.0

    \[\leadsto \color{blue}{1 \cdot \left(x \cdot \left(y + y\right)\right)}\]
  5. Simplified0.0

    \[\leadsto 1 \cdot \color{blue}{\left(2 \cdot \left(x \cdot y\right)\right)}\]
  6. Final simplification0.0

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

Reproduce

herbie shell --seed 2019322 
(FPCore (x y)
  :name "Numeric.Integration.TanhSinh:simpson  from integration-0.2.1"
  :precision binary64
  (* x (+ y y)))