Re: qsort() results: implementation dependent?
- From: Keith Thompson <kst-u@xxxxxxx>
- Date: Wed, 28 Jun 2006 19:04:39 GMT
"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.
.
- Follow-Ups:
- References:
- qsort() results: implementation dependent?
- From: Max
- Re: qsort() results: implementation dependent?
- From: Duncan Muirhead
- Re: qsort() results: implementation dependent?
- From: Max
- Re: qsort() results: implementation dependent?
- From: Eric Sosman
- Re: qsort() results: implementation dependent?
- From: Max
- qsort() results: implementation dependent?
- Prev by Date: Re: Working with negative numbers
- Next by Date: Re: linux redirect problem
- Previous by thread: Re: qsort() results: implementation dependent?
- Next by thread: Re: qsort() results: implementation dependent?
- Index(es):
Relevant Pages
|