[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: small integers



On Wed, 14 Oct 92, moon@cambridge.apple.com (David A. Moon) wrote:
>> Date: Tue, 13 Oct 1992 22:33:27 -4
>> From: jim@fpr.com (James E. O'Dell)
>> 
>> ...garbled line-wrapped message elided...
>
>When I said "often" I meant that the compiler can often optimize the code,
not 
>that the code would often return the correct answer.  The infrequent case

>would be slightly slower code that has to do an overflow check, not code
that 
>returns the wrong answer!

Yeah, thats what I thought you meant. I still think you need a mode that
compiles
arithmetic with complete disregard for correctness. Real numerical types
never trust
a single calculation anyway. There are too many other ways to get
numerical
instabilities in a complicated numerical program. To check a single op for
corrrectness 
in a large code may be seen by many as penny wise and pound foolish.

Many complicated codes are checked for correctness by varying input values

slightly to see if the results are stable. Another method of doing a
sensitivity 
analysis is performing the same calculation in both single and double
precision and 
checking the results for stability.

I don't believe Seymour Cray built his machines the way he did because he
liked
getting incorrect answers.

Jim