Average Error: 33.4 → 33.4
Time: 1.4s
Precision: binary64
\[\sqrt{\left({a}^{2} + {b}^{2}\right) - \left(\left(2 \cdot a\right) \cdot b\right) \cdot c}\]
\[\sqrt{\left({a}^{2} + {b}^{2}\right) - \left(\left(2 \cdot a\right) \cdot b\right) \cdot c}\]
\sqrt{\left({a}^{2} + {b}^{2}\right) - \left(\left(2 \cdot a\right) \cdot b\right) \cdot c}
\sqrt{\left({a}^{2} + {b}^{2}\right) - \left(\left(2 \cdot a\right) \cdot b\right) \cdot c}
double code(double a, double b, double c) {
	return ((double) sqrt(((double) (((double) (((double) pow(a, 2.0)) + ((double) pow(b, 2.0)))) - ((double) (((double) (((double) (2.0 * a)) * b)) * c))))));
}
double code(double a, double b, double c) {
	return ((double) sqrt(((double) (((double) (((double) pow(a, 2.0)) + ((double) pow(b, 2.0)))) - ((double) (((double) (((double) (2.0 * a)) * b)) * c))))));
}

Error

Bits error versus a

Bits error versus b

Bits error versus c

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 33.4

    \[\sqrt{\left({a}^{2} + {b}^{2}\right) - \left(\left(2 \cdot a\right) \cdot b\right) \cdot c}\]
  2. Final simplification33.4

    \[\leadsto \sqrt{\left({a}^{2} + {b}^{2}\right) - \left(\left(2 \cdot a\right) \cdot b\right) \cdot c}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (a b c)
  :name "(sqrt (- (+ (pow a 2) (pow b 2)) (* (* (* 2 a) b) c)))"
  :precision binary64
  (sqrt (- (+ (pow a 2.0) (pow b 2.0)) (* (* (* 2.0 a) b) c))))