Average Error: 0.0 → 0.0
Time: 9.8s
Precision: 64
\[\left(x \cdot y + x\right) + y\]
\[\left(x + y \cdot x\right) + y\]
\left(x \cdot y + x\right) + y
\left(x + y \cdot x\right) + y
double f(double x, double y) {
        double r94045 = x;
        double r94046 = y;
        double r94047 = r94045 * r94046;
        double r94048 = r94047 + r94045;
        double r94049 = r94048 + r94046;
        return r94049;
}

double f(double x, double y) {
        double r94050 = x;
        double r94051 = y;
        double r94052 = r94051 * r94050;
        double r94053 = r94050 + r94052;
        double r94054 = r94053 + r94051;
        return r94054;
}

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

    \[\left(x \cdot y + x\right) + y\]
  2. Simplified0.0

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

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

Reproduce

herbie shell --seed 2019174 
(FPCore (x y)
  :name "Numeric.Log:$cexpm1 from log-domain-0.10.2.1, B"
  (+ (+ (* x y) x) y))