Miklos Cserzo wrote:
Can you just send the correct results? Of course, we could try to compute them ourselves, but I suppose you already have them handy.
Sure, possibly I should do so at the first time.
More info: The program scans the input twice. First it computes the central point of the vector space (average vector) and than it supposed to report the distance of the individual vectors from it during the second scan. The first phase is correct with the beta version but in the second phase all the distances are 0. This is nonsense of course. I am not absolutely sure whether it is an arithmetic bug. It could be anything in the second 'repeat' cycle.
I'll take a look at it in a few days, unless Peter finds out something before. BTW, was your compiler cross-built by any chance? ISTR that cross-building can cause problems with floating point operations.
Unfortunately the -g option is not able to produce binaries on IRIX 6.2 so I can not debug the code. However, the same code on the same input works fine if I use the 2.0 version of the compiler. By the way, is the -g works on different platforms?
More or less. It usually works, but it can cause compiler errors in some situations. In general, it can't handle well those things that don't exist in C, i.e. it might produce wrong debugging info or compiler errors. Any volunteers who know about the internals of debugging info? (I don't.)
Meanwhile you could try "Writeln debugging", i.e. insert some Writeln's here and there to pin down the instruction that's wrong.
BTW, the results are correct under Linux, so it really seems to be something system-specific.
Frank
-- Frank Heckenbach, frank@fjf.gnu.de http://fjf.gnu.de/ PGP and GPG keys: http://fjf.gnu.de/plan