Average Error: 0.0 → 0.0
Time: 12.1s
Precision: 64
\[a \cdot b + c \cdot d\]
\[a \cdot b + c \cdot d\]
a \cdot b + c \cdot d
a \cdot b + c \cdot d
double f(double a, double b, double c, double d) {
        double r1791727 = a;
        double r1791728 = b;
        double r1791729 = r1791727 * r1791728;
        double r1791730 = c;
        double r1791731 = d;
        double r1791732 = r1791730 * r1791731;
        double r1791733 = r1791729 + r1791732;
        return r1791733;
}

double f(double a, double b, double c, double d) {
        double r1791734 = a;
        double r1791735 = b;
        double r1791736 = r1791734 * r1791735;
        double r1791737 = c;
        double r1791738 = d;
        double r1791739 = r1791737 * r1791738;
        double r1791740 = r1791736 + r1791739;
        return r1791740;
}

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

    \[a \cdot b + c \cdot d\]
  2. Final simplification0.0

    \[\leadsto a \cdot b + c \cdot d\]

Reproduce

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