Average Error: 13.1 → 13.1
Time: 1.0s
Precision: binary64
\[\sqrt{\frac{\mathsf{hypot}\left(a, b\right) + a}{2}}\]
\[\sqrt{\frac{\mathsf{hypot}\left(a, b\right) + a}{2}}\]
\sqrt{\frac{\mathsf{hypot}\left(a, b\right) + a}{2}}
\sqrt{\frac{\mathsf{hypot}\left(a, b\right) + a}{2}}
double code(double a, double b) {
	return ((double) sqrt(((double) (((double) (((double) hypot(a, b)) + a)) / 2.0))));
}
double code(double a, double b) {
	return ((double) sqrt(((double) (((double) (((double) hypot(a, b)) + a)) / 2.0))));
}

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 13.1

    \[\sqrt{\frac{\mathsf{hypot}\left(a, b\right) + a}{2}}\]
  2. Final simplification13.1

    \[\leadsto \sqrt{\frac{\mathsf{hypot}\left(a, b\right) + a}{2}}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (a b)
  :name "(sqrt (/ (+ (hypot a b) a) 2))"
  :precision binary64
  (sqrt (/ (+ (hypot a b) a) 2.0)))