Average Error: 0.0 → 0.0
Time: 8.1s
Precision: 64
\[a \cdot a + b \cdot b\]
\[a \cdot a + b \cdot b\]
a \cdot a + b \cdot b
a \cdot a + b \cdot b
double f(double a, double b) {
        double r388094 = a;
        double r388095 = r388094 * r388094;
        double r388096 = b;
        double r388097 = r388096 * r388096;
        double r388098 = r388095 + r388097;
        return r388098;
}

double f(double a, double b) {
        double r388099 = a;
        double r388100 = r388099 * r388099;
        double r388101 = b;
        double r388102 = r388101 * r388101;
        double r388103 = r388100 + r388102;
        return r388103;
}

Error

Bits error versus a

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

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

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

Reproduce

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