Peter said:
You can tell the same thing with the Halting Problem, thus how
does the analogy fail?
Because the square root function, as defined in C or C++, doesn't
attempt to compute the square root of everything. It is documented
that square root works for positive numbers (in the range speficied
for that implementation) and 0 only.
So square root (that is: the function sqrt()) is made workable by limting
itself to a subset of all mathematically possible square roots.
But this is not what the Halting problem is about. The Halting
problem is about an analyzer which works in *all* cases. Not
a subset, not 10 different algorithms, not 100, not 100000,
not 10000000000000000000000000000000. *ALL*
The difference is like in the famous Fermat theorem: There
is no solution in the whole numbers of
n n n
a + b = c
for n > 2
A few years ago the theorem had been proven only for n = 3, n = 4,
n = 5, up to n = 10000 (if not higher). But that is not the same
as saying for *all* n, no matter what n may be. (And finally
a proof was found for *all* n.)