On Mon, Aug 20, 2007 at 05:26:22PM -0400, Andy Dougherty wrote:
> Nor can I. Thus you either use lots of platform-specific code (determined
> by Configure.pl) or turn off gcc's -Wfloat-equal warning flag and just
> write f == 0.0.
Or, maybe
f >= 0.0 && f <= 0.0
which I believe is identical
On 21/08/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> On Mon, Aug 20, 2007 at 05:26:22PM -0400, Andy Dougherty wrote:
> > > I can't think of a clean, portable, efficient way to test that a floating
> > > point variable is zero other than == 0.0;
> >
> > Nor can I. Thus you either use lots o
On Mon, Aug 20, 2007 at 05:26:22PM -0400, Andy Dougherty wrote:
> > I can't think of a clean, portable, efficient way to test that a floating
> > point variable is zero other than == 0.0;
>
> Nor can I. Thus you either use lots of platform-specific code (determined
> by Configure.pl) or turn off
On Mon, 20 Aug 2007, Nicholas Clark wrote:
> On Mon, Aug 20, 2007 at 10:18:33AM -0400, Andy Dougherty wrote:
> > Your trick (extended, if needed, by clever Configure.pl probes) will
> > cleverly suppress the warning for the f == 0 case, while still retaining
> > the exact comparison. (Hmm. Not
On Mon, Aug 20, 2007 at 10:18:33AM -0400, Andy Dougherty wrote:
> On Sun, 19 Aug 2007, chromatic wrote:
>
> > On Sunday 19 August 2007 17:32:01 Andy Dougherty wrote:
> >
> > > On Sat, 18 Aug 2007, [EMAIL PROTECTED] wrote:
> >
> > > > Log:
> > > > Added FLOAT_IS_ZERO() macro to parrot/misc.h for
On Sun, 19 Aug 2007, chromatic wrote:
> On Sunday 19 August 2007 17:32:01 Andy Dougherty wrote:
>
> > On Sat, 18 Aug 2007, [EMAIL PROTECTED] wrote:
>
> > > Log:
> > > Added FLOAT_IS_ZERO() macro to parrot/misc.h for comparing floats to
> > > zero. This may need some attention on platforms where
On Sunday 19 August 2007 17:32:01 Andy Dougherty wrote:
> On Sat, 18 Aug 2007, [EMAIL PROTECTED] wrote:
> > Log:
> > Added FLOAT_IS_ZERO() macro to parrot/misc.h for comparing floats to
> > zero. This may need some attention on platforms where INTVAL isn't four
> > bytes, but I did the best I cou
On Sat, 18 Aug 2007, [EMAIL PROTECTED] wrote:
> Author: chromatic
> Date: Sat Aug 18 14:06:33 2007
> New Revision: 20688
>
> Modified:
>trunk/include/parrot/misc.h
>trunk/src/string.c
>
> Log:
> Added FLOAT_IS_ZERO() macro to parrot/misc.h for comparing floats to zero.
> This may need so