public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* question about equivalent x87/x64-64 fpu code...
@ 2011-05-13 18:12 Paweł Sikora
  2011-05-16 11:03 ` Andrew Haley
  0 siblings, 1 reply; 4+ messages in thread
From: Paweł Sikora @ 2011-05-13 18:12 UTC (permalink / raw)
  To: gcc-help

Hi,

i'm using a 3rd-party engine http://glaros.dtc.umn.edu/gkhome/metis/metis/overview
for partitioning some complex data. it worked fine for years until today (may 13)...

observations:
- the 32-bit metis build produces nice and balanced partitons.
- the 64-bit metis build produces bad and unbalanced partitons.

the metis' engine uses arrays of integers on the public interface and internally
some float-based and unsafe in terms of precison (x<y and x==y) operations.

so, i've built/tested following metis variants:

1). -m32 -march=pentium4 -O1                         - works fine.
2). -m32 -march=pentium4 -O1 -mfpmath=sse            - works fine.
3). -m64 -march=x86-64 -O1                           - bad/unbalanced partitions.
4). -m64 -march=x86-64 -O1 -mfpmath=387              - bad/unbalanced partitions.

at this point i've expected wrong results (< 80-bit precision) from variants 2/3
and good results from variants 1/4 but the real world differs.

next, i've isolated a one place in sources with float x<y stmt and changed it
to (x-y)<0.00001. with such change both native 1/3 variants give nice/equivalent results.

so, where is the problem? is the variants 1/4 really equivalent?

BR,
Paweł.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-16 11:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-13 18:12 question about equivalent x87/x64-64 fpu code Paweł Sikora
2011-05-16 11:03 ` Andrew Haley
2011-05-16 22:58   ` Pawel Sikora
2011-05-16 23:57     ` Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).