This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Fourth Draft "Unsafe fp optimizations" project description.
- To: kaih at khms dot westfalen dot de (Kai Henningsen)
- Subject: Re: Fourth Draft "Unsafe fp optimizations" project description.
- From: akbara <syedali011 at earthlink dot net>
- Date: Wed, 15 Aug 2001 10:42:51 -0400
- Cc: ejr at CS dot Berkeley dot EDU, gcc at gcc dot gnu dot org
- Organization: null soft
- References: <200108130550.WAA23692@lotus.CS.Berkeley.EDU><86v5A$iXw-B@khms.westfalen.de>
if there going to be doing stuff like
if (a_float == someinteger)
imho this should be flagged off as a warning?
cause the data type obviously is better suited to be an integer.
and usually in floating point calculations you never do this (straight equality tests).
laterz,
-akbar A.
On 15 Aug 2001 09:32:00 +0200
kaih@khms.westfalen.de (Kai Henningsen) wrote:
> ejr@CS.Berkeley.EDU (Jason Riedy) wrote on 12.08.01 in <200108130550.WAA23692@lotus.CS.Berkeley.EDU>:
>
> > For a simpler
> > view, does anyone really want to debug programs where
> > you cannot rely on equality?
>
> If there's one thing I've seen or heard in just about *every* discussion
> of computer floating point, it is that you cannot rely on equality. Just
> about every single one makes the point that with floating point, "A == B"
> is *wrong*, you want "abs(A-B) < some_small_value".
>
> MfG Kai
--
"it's called Mario Twins, and I WANT TO PLAY IT"
http://vertexabuse.cjb.net