Average Error: 0.0 → 0.0
Time: 4.8s
Precision: 64
\[\frac{-1}{100000} \lt x0 \lt \frac{100001}{100000} \land 0 \lt x1 \lt 1 \land 0 \lt x2 \lt 1 \land 0 \lt x3 \lt 1\]
\[\left(\left(x0 + x1\right) + x2\right) + x3\]
\[x3 + \left(x2 + \left(x0 + x1\right)\right)\]
\left(\left(x0 + x1\right) + x2\right) + x3
x3 + \left(x2 + \left(x0 + x1\right)\right)
double f(double x0, double x1, double x2, double x3) {
        double r51295884 = x0;
        double r51295885 = x1;
        double r51295886 = r51295884 + r51295885;
        double r51295887 = x2;
        double r51295888 = r51295886 + r51295887;
        double r51295889 = x3;
        double r51295890 = r51295888 + r51295889;
        return r51295890;
}

double f(double x0, double x1, double x2, double x3) {
        double r51295891 = x3;
        double r51295892 = x2;
        double r51295893 = x0;
        double r51295894 = x1;
        double r51295895 = r51295893 + r51295894;
        double r51295896 = r51295892 + r51295895;
        double r51295897 = r51295891 + r51295896;
        return r51295897;
}

Error

Bits error versus x0

Bits error versus x1

Bits error versus x2

Bits error versus x3

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\left(\left(x0 + x1\right) + x2\right) + x3\]
  2. Final simplification0.0

    \[\leadsto x3 + \left(x2 + \left(x0 + x1\right)\right)\]

Reproduce

herbie shell --seed 1 
(FPCore (x0 x1 x2 x3)
  :name "test06_sums4, sum1"
  :pre (and (< -1/100000 x0 100001/100000) (< 0 x1 1) (< 0 x2 1) (< 0 x3 1))
  (+ (+ (+ x0 x1) x2) x3))