Re: (Basenote drift) Determinism
On Aug 4 2011, Lee Winter wrote:
And, lastly, when numeric programmers and their users are given a
choice between deterministic results and much faster execution,
they choose the latter every time.
It appears to me that the above statement is not accurate. Many
numeric programmers and their users choose faster execution over
deterministic results, but not all.
A fair comment, but I did say MUCH faster execution; this is not a
small matter. But I accept your correction.
For example, in simulations it is
very hard to evaluate the fidelity of the results unless they are
deterministic. So performance gives way to verifiable correctness in
the form of determinism.
Er, no, not at all. Firstly, determinism and correctness are entirely
orthogonal. Indeed, the whole subject of statistics would disappear
if that were not so, and even and numerical analysis would become simple!
Secondly, one of the simplest ways to detect incorrectness in simulations
is to use non-determinism; it is not reliable, but it is a good start.
And BTW, the underlying problem is not that of performance over
abstract correctness. The underlying problem is that of uninformed
choice. Few numeric programmers, even the very good ones, see any
benefit in deterministic results. That problem can be solved by
education.
Not at all. It is a cardinal error to confuse correctness and
determinism, and many numerical experts see (and traditionally most
saw) no benefit in determinism. I am aware that it is heresy in this
community, but one of the best ways of viewing floating-point
calculations is as inherently non-deterministic.
The primary benefit of determinacy is that it simplifies initial
debugging (i.e. of simple coding errors), but it does nothing to help
with the more serious logic errors (including numerically unreliable
code).
Therefore, if there is an underlying reason for 1788 to promote or
require deterministic results then that reason must be stated both
completely and clearly within the standard.
I agree with that. I doubt that there is a good one.
Regards,
Nick Maclaren.