Average Error: 0.0 → 0.0
Time: 9.0s
Precision: 64
\[\left(x \cdot y + x\right) + y\]
\[\left(1 + y\right) \cdot x + y\]
\left(x \cdot y + x\right) + y
\left(1 + y\right) \cdot x + y
double f(double x, double y) {
        double r93200 = x;
        double r93201 = y;
        double r93202 = r93200 * r93201;
        double r93203 = r93202 + r93200;
        double r93204 = r93203 + r93201;
        return r93204;
}

double f(double x, double y) {
        double r93205 = 1.0;
        double r93206 = y;
        double r93207 = r93205 + r93206;
        double r93208 = x;
        double r93209 = r93207 * r93208;
        double r93210 = r93209 + r93206;
        return r93210;
}

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. Taylor expanded around 0 0.0

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

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

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

Reproduce

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