[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: PATCH: control size of image generated by kimgio_eps_read
From:       Michael Matz <matz () kde ! org>
Date:       2002-02-13 18:00:34
[Download RAW message or body]

Hi,

On Wed, 13 Feb 2002, Bernd Gehrmann wrote:

> >   float f = 1.0;
> >   if (f == 1.0)  printf("surprise\n");
> >
> > prints "surprise".  There is no such guarantee.
>
> Which compiler does not convert a float 1.0 into an IEEE 1.0?

Be aware, that this isn't the issue here. 1.0 is exactly representable in
IEEE, but it means nothing for the issue at hand.  Intermediate spilling
might extend/narrow the actual representaion (slightly violating IEEE),
which could lead to rounding errors (in different ways, because different
representation), which make == fail in every case.  For 1.0 this _might_
indeed not be a problem, but just substitute 'x' for 1.0 and you are
screwed.


Ciao,
Michael.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic