![]() Home Overview FAQ Documentation Download Mailing List Geomview For Windows? Support Users Development Bug Reporting Contributing Contact Us Sponsors
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [ REQ 5397]: hardy mystery
Hi,
I'm releasing a new version of Qhull and ran into some very
strange behavior from hardy. This happened whether I was
compiling with gcc or with cc and fat binaries.
This code==>
void qh_printpoint(FILE *fp, char *string, double *point) {
int k,id;
double *p;
if (!point)
return;
fprintf (stdout, "point %x %2.2g %2.2g %2.2g\n", (int) point, point[0], point[1], point[2]);
p= point;
fprintf (stdout, "point %2.2g %x %2.2g %x %2.2g %x %2.2g %x\n", *p, (int)p,
*p++, (int)p, *p++, (int)p, *p++, (int) p);
for(k= 3; k--; ) {
fprintf(stdout, " %2.2g", *point++);
}
fprintf(fp, "\n");
} /* printpoint */
==== produces this result ==>
point 75470 0 0 -0.5
point 0 75470 0 75478 0 75480 -0.5 75488
0 -0.5 0
==============
the first two lines are right, the third is offset by one. This
happens for every triple of doubles. If I change the loop to
read:
for(k= 3; k--; ) {
p= point;
fprintf(stdout, " %x %2.2g", (int) p, *point++);
}
it works fine. The code works fine on godel and gauss. I'm stuck.
Any ideas?
--Brad
P.S.: This is from ~bradb/qhull/Install/qhull_hardy/io.c
I was compiling with gcc .
|
||
|
Home | Overview | FAQ | Documentation | Support | Download | Mailing List Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors |
|||
|
site hosted by |
|||