Average Error: 0.0 → 0.0
Time: 1.4s
Precision: 64
\[\left(a + b\right) + \left(c + d\right)\]
\[\left(c + d\right) + \left(a + b\right)\]
\left(a + b\right) + \left(c + d\right)
\left(c + d\right) + \left(a + b\right)
double f(double a, double b, double c, double d) {
        double r41375050 = a;
        double r41375051 = b;
        double r41375052 = r41375050 + r41375051;
        double r41375053 = c;
        double r41375054 = d;
        double r41375055 = r41375053 + r41375054;
        double r41375056 = r41375052 + r41375055;
        return r41375056;
}

double f(double a, double b, double c, double d) {
        double r41375057 = c;
        double r41375058 = d;
        double r41375059 = r41375057 + r41375058;
        double r41375060 = a;
        double r41375061 = b;
        double r41375062 = r41375060 + r41375061;
        double r41375063 = r41375059 + r41375062;
        return r41375063;
}

Error

Bits error versus a

Bits error versus b

Bits error versus c

Bits error versus d

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\left(a + b\right) + \left(c + d\right)\]
  2. Final simplification0.0

    \[\leadsto \left(c + d\right) + \left(a + b\right)\]

Reproduce

herbie shell --seed 1 
(FPCore (a b c d)
  :name "(a+b)+(c+d)"
  (+ (+ a b) (+ c d)))