Average Error: 43.9 → 43.9
Time: 1.4s
Precision: binary64
\[\sqrt{{\left(x - xx\right)}^{2} + {\left(y - yy\right)}^{2}}\]
\[\sqrt{{\left(x - xx\right)}^{2} + {\left(y - yy\right)}^{2}}\]
\sqrt{{\left(x - xx\right)}^{2} + {\left(y - yy\right)}^{2}}
\sqrt{{\left(x - xx\right)}^{2} + {\left(y - yy\right)}^{2}}
double code(double x, double xx, double y, double yy) {
	return ((double) sqrt(((double) (((double) pow(((double) (x - xx)), 2.0)) + ((double) pow(((double) (y - yy)), 2.0))))));
}
double code(double x, double xx, double y, double yy) {
	return ((double) sqrt(((double) (((double) pow(((double) (x - xx)), 2.0)) + ((double) pow(((double) (y - yy)), 2.0))))));
}

Error

Bits error versus x

Bits error versus xx

Bits error versus y

Bits error versus yy

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 43.9

    \[\sqrt{{\left(x - xx\right)}^{2} + {\left(y - yy\right)}^{2}}\]
  2. Final simplification43.9

    \[\leadsto \sqrt{{\left(x - xx\right)}^{2} + {\left(y - yy\right)}^{2}}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (x xx y yy)
  :name "(sqrt (+ (pow (- x xx) 2) (pow (- y yy) 2)))"
  :precision binary64
  (sqrt (+ (pow (- x xx) 2.0) (pow (- y yy) 2.0))))