Average Error: 44.3 → 44.3
Time: 1.3s
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 44.3

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

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

Reproduce

herbie shell --seed 2020153 
(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))))