Average Error: 0.0 → 0.0
Time: 739.0ms
Precision: 64
\[x \cdot \left(y + y\right)\]
\[\left(x \cdot 2\right) \cdot y\]
x \cdot \left(y + y\right)
\left(x \cdot 2\right) \cdot y
double f(double x, double y) {
        double r101794 = x;
        double r101795 = y;
        double r101796 = r101795 + r101795;
        double r101797 = r101794 * r101796;
        return r101797;
}

double f(double x, double y) {
        double r101798 = x;
        double r101799 = 2.0;
        double r101800 = r101798 * r101799;
        double r101801 = y;
        double r101802 = r101800 * r101801;
        return r101802;
}

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 x \cdot \left(\color{blue}{1 \cdot y} + y\right)\]
  4. Applied distribute-lft1-in0.0

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

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

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

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

Reproduce

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