John, isn't this whole thread revolving around what is a correct value?
To me it looks like a good part of this discussion revolve around many J
primitives converting to double precision floating point resulting in a
loss of precision. Are you defining a calculation as "correct" if the
result is the closest number representable in a double precision
floating point number to the result if calculated in infinite precision?
This may not be sufficient in some calculations. But that's as good as
it gets in most programming languages and is usually more than adequate.
The problem is that it is not always adequate. And that's as you say,
it's a numerical analysis question.
Perhaps the possible coming of arbitrary precision numbers (or whatever
they're called) in J might address many of the concerns in this thread.
John Randall wrote:
As I mentioned in an early post, you can assume that J library functions
return correct values. As soon as you manipulate them in any way, it is
your algorithm. My prior example showed how even + can be ill-behaved.
An I/O logical analyzer is not going to help: it's a numerical analysis
question.
Best wishes,
John
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm