Average Error: 0.0 → 0.0
Time: 2.6s
Precision: binary64
Cost: 6592
\[\sqrt{x + y}\]
\[\sqrt{x + y}\]
\sqrt{x + y}
\sqrt{x + y}
(FPCore (x y) :precision binary64 (sqrt (+ x y)))
(FPCore (x y) :precision binary64 (sqrt (+ x y)))
double code(double x, double y) {
	return sqrt(x + y);
}
double code(double x, double y) {
	return sqrt(x + y);
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Alternatives

Alternative 1
Error47.9
Cost13504
\[\frac{\sqrt{x \cdot x - y \cdot y}}{\sqrt{x - y}}\]
Alternative 2
Error30.9
Cost13376
\[\sqrt{x} + 0.5 \cdot \left(y \cdot \sqrt{\frac{1}{x}}\right)\]
Alternative 3
Error30.9
Cost13248
\[\sqrt{x} + 0.5 \cdot \frac{y}{\sqrt{x}}\]
Alternative 4
Error32.0
Cost6464
\[\sqrt{y}\]
Alternative 5
Error31.2
Cost6464
\[\sqrt{x}\]
Alternative 6
Error59.5
Cost64
\[1\]
Alternative 7
Error62.2
Cost64
\[0\]
Alternative 8
Error63.1
Cost64
\[-1\]

Error

Derivation

  1. Initial program 0.0

    \[\sqrt{x + y}\]
  2. Simplified0.0

    \[\leadsto \color{blue}{\sqrt{x + y}}\]
  3. Final simplification0.0

    \[\leadsto \sqrt{x + y}\]

Reproduce

herbie shell --seed 2021042 
(FPCore (x y)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, A"
  :precision binary64
  (sqrt (+ x y)))