public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/15852] New: issues related to floating point precision
@ 2004-06-06 18:07 sliwa at theta1 dot cft dot edu dot pl
  2004-06-06 18:13 ` [Bug target/15852] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: sliwa at theta1 dot cft dot edu dot pl @ 2004-06-06 18:07 UTC (permalink / raw)
  To: gcc-bugs

-ffloat-store requires rewriting existing code. Some libraries, like LAPACK and 
SLATEC, require fp arithmetic at IEEE single/double precision, and are heavily 
affected by the way floating point code is handled by gcc.

In my opinion, these violates pragmatics of the single/double types:

1. floating point conversions do not round the values, e.g. a double converted 
to single remains long double in the register (the conversion is performed only 
on assignment to a variable when -ffloat-store is in effect)

2. comparisons are performed on the long double values from the registers, not 
on the values rounded to the appropriate precision, hence comparison does not 
result in equality, even if it takes place at the appropriate precision level 
(single/double), e.g. 0.1 + 0.4 > 0.5 in floats, altough it's not

-- 
           Summary: issues related to floating point precision
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sliwa at theta1 dot cft dot edu dot pl
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-slackware-linux
  GCC host triplet: i386-slackware-linux
GCC target triplet: i386-slackware-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15852


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

end of thread, other threads:[~2004-06-08 18:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-06 18:07 [Bug target/15852] New: issues related to floating point precision sliwa at theta1 dot cft dot edu dot pl
2004-06-06 18:13 ` [Bug target/15852] " pinskia at gcc dot gnu dot org
2004-06-06 19:35 ` jsm at polyomino dot org dot uk
2004-06-08 18:51 ` sliwa at cft dot edu dot pl

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).