Re: [svn:parrot] r20688 - in trunk: include/parrot src

2007-08-22 Thread Nicholas Clark
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

Re: [svn:parrot] r20688 - in trunk: include/parrot src

2007-08-21 Thread Paul Cochrane
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

Re: [svn:parrot] r20688 - in trunk: include/parrot src

2007-08-20 Thread Patrick R. Michaud
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

Re: [svn:parrot] r20688 - in trunk: include/parrot src

2007-08-20 Thread Andy Dougherty
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

Re: [svn:parrot] r20688 - in trunk: include/parrot src

2007-08-20 Thread Nicholas Clark
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

Re: [svn:parrot] r20688 - in trunk: include/parrot src

2007-08-20 Thread Andy Dougherty
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

Re: [svn:parrot] r20688 - in trunk: include/parrot src

2007-08-19 Thread chromatic
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

Re: [svn:parrot] r20688 - in trunk: include/parrot src

2007-08-19 Thread Andy Dougherty
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