Re: qsort() results: implementation dependent?



"Max" <iprmaster@xxxxxxxxx> writes:
[...]
The simpler version has a bug, as has already been
explained. Now: Is that bug an artifact of the simplification
process, or is it also present in the original?

If you refer to the undefined behaviour, yes, I have tried to test the
code dropping out eps. I have got a different point list but it is
still wrong. As I have already explained above, I have the possibility
to visually check if the point list is correct or not.

How is it "wrong"? Are you sure your get_distance function is
correct? Do the points that are mis-ordered have nearly identical
distances? Are you sure you're invoking qsort() correctly?

We can only point out flaws in code that you post. If you show us an
actual program that exhibits the problem, we can help. If not, we
can't guess.

--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
.



Relevant Pages

  • Re: qsort() results: implementation dependent?
    ... The simpler version has a bug, ... Is that bug an artifact of the simplification ... was just a typing error here. ...
    (comp.lang.c)
  • [announce] Ne.W.T - 1.2.0 released
    ... * sound support ... closed bug #13 ... reserve artifact #15 for lizard only ... changelog is redundant ...
    (rec.games.roguelike.nethack)
  • [announce] Ne.W.T - 1.2.0 released
    ... * sound support ... closed bug #13 ... reserve artifact #15 for lizard only ... changelog is redundant ...
    (rec.games.roguelike.announce)
  • Re: Python bug tracker now secret?
    ... Artifact: This Artifact Has Been Made Private. ... View Private ArtifactTypes. ... I'm being denied access to bug reports I submitted, ... So it's not a general SourceForge bug. ...
    (comp.lang.python)
  • Re: [crawl] xp issues?
    ... NIm wrote: ... > artifact that keeps you from getting xp? ... no bug. ... I found it in the lair, so if anyone has found anything ...
    (rec.games.roguelike.misc)