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

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 35.5

    \[\sqrt{{x}^{2} + {y}^{2}} - x\]
  2. Final simplification35.5

    \[\leadsto \sqrt{{x}^{2} + {y}^{2}} - x\]

Reproduce

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