Re: Floating point comparisons

2007-07-31 Thread Paul Cochrane
> A couple of comments on dealing with floats. > > - Use FLT_EPSILON/DBL_EPSILON from float.h > > - You method is total overkill, return (fabs(x - y) < DBL_EPSILON ? 1 : 0); > should be sufficent (note: check with a numerical expert). This is what I thought in the beginning. However, whether on

Re: Floating point comparisons

2007-07-31 Thread Paul Cochrane
On 31/07/07, Andy Lester <[EMAIL PROTECTED]> wrote: > > On Jul 31, 2007, at 1:32 PM, peter baylies wrote: > > > That may not be a bad idea, but I think there's a bug in that code -- > > take, for example, the case where x and y both equal approximately a > > million (or more). > > > > Maybe you wan

Re: [perl #43190] [TODO] Write test for Parrot::Configure::runstep()

2007-07-31 Thread James E Keenan
On Jul 31, 2007, at 10:40 PM, Jerry Gay via RT wrote: see the 'Makefile' targets in config/gen/makefiles/root.in and languages/perl6/config/makefiles/root.in these are the only times i use --step=foo. I'm glad you pointed these out to me. I was not previously aware of these instances,

Re: [perl #43190] [TODO] Write test for Parrot::Configure::runstep()

2007-07-31 Thread jerry gay
On 7/30/07, James Keenan via RT <[EMAIL PROTECTED]> wrote: > On Tue Jun 12 22:32:52 2007, jkeen at verizon.net wrote: > > > > > So the task is to write unit tests for Parrot::Configure::runstep() > > and, if appropriate, to refactor it, with that refactoring possibly > > including renaming and/or

Re: [perl #43190] [TODO] Write test for Parrot::Configure::runstep()

2007-07-31 Thread James E Keenan
James E Keenan wrote: When you run Configure.pl with the --step option, do you call it with *any other* options? And, if so, which options? And another follow-up question: Do you ever re-run *>1* configuration step at a time? Example: perl Configure.pl --step=inter::make --step=gen::m

Re: [perl #43190] [TODO] Write test for Parrot::Configure::runstep()

2007-07-31 Thread James E Keenan
On Tue Jun 12 22:32:52 2007, jkeen at verizon.net wrote: > > So the task is to write unit tests for Parrot::Configure::runstep() > and, if appropriate, to refactor it, with that refactoring possibly > including renaming and/or relocating the subroutine. > I've partially accomplished this; see t

[perl #44307] PIR tutorial

2007-07-31 Thread via RT
# New Ticket Created by Colin Kuskie # Please include the string: [perl #44307] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=44307 > Please add/extend the PIR tutorial in examples/tutorial/*.pir. This will save hours of

stack tracing (was: PMC/GC help needed)

2007-07-31 Thread Bram Geron
Leopold Toetsch wrote: > It might be on the stack or just in a CPU register. While we have > code to mark all possible pointers on the stack, this isn't generally > true for CPU registers, as that's rather system-dependent. > > See also src/cpu_dep.c():trace_system_areas() If we can't rely on trac

[perl #44301] Patch for fetching perl6 test suite wholesale

2007-07-31 Thread via RT
# New Ticket Created by Colin Kuskie # Please include the string: [perl #44301] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=44301 > Attached is a patch to fetch the whole pugs test suite via svn export, and then to run

[perl #44299] follow-up, tabs, remove the t/fetchspec script

2007-07-31 Thread via RT
# New Ticket Created by Colin Kuskie # Please include the string: [perl #44299] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=44299 > One line in the patched root.in used spaces instead of a tab. use svn rm to remove the t

Re: [perl #44301] AutoReply: Patch for fetching perl6 test suite wholesale

2007-07-31 Thread Colin Kuskie
sigh. And fix escaping slashes in the URL. Index: languages/perl6/t/fetchspec === --- languages/perl6/t/fetchspec (revision 20380) +++ languages/perl6/t/fetchspec (working copy) @@ -1,52 +0,0 @@ -# Copyright (C) 200

[perl #44297] need "return" statement

2007-07-31 Thread via RT
# New Ticket Created by Jeff Horwitz # Please include the string: [perl #44297] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=44297 > Parrot's Perl6 in languages/perl6 is currently missing the "return" statement. The rel

[svn:parrot-pdd] r20384 - trunk/docs/pdds

2007-07-31 Thread allison
Author: allison Date: Tue Jul 31 12:22:27 2007 New Revision: 20384 Modified: trunk/docs/pdds/pdd15_objects.pod Log: [PDD15] Clarifying can and does on class, role, and instance objects. Modified: trunk/docs/pdds/pdd15_objects.pod ==

Re: Floating point comparisons

2007-07-31 Thread Andy Lester
On Jul 31, 2007, at 1:32 PM, peter baylies wrote: That may not be a bad idea, but I think there's a bug in that code -- take, for example, the case where x and y both equal approximately a million (or more). Maybe you wanted this instead: return (fabs(x - y) <= EPSILON) ? 1 : 0; The RE

Re: [perl #44291] [PATCH] Fix for suncc

2007-07-31 Thread Joshua Isom
On Jul 31, 2007, at 11:11 AM, Paul Cochrane (via RT) wrote: # New Ticket Created by Paul Cochrane # Please include the string: [perl #44291] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=44291 > Hi all, Attached is a pat

Re: Floating point comparisons

2007-07-31 Thread Joshua Hoblitt
Another issue to consider... http://www.cygnus-software.com/papers/comparingfloats/Comparing%20floating%20point%20numbers.htm#_Toc135149458 -J -- On Tue, Jul 31, 2007 at 08:46:41AM -1000, Joshua Hoblitt wrote: > A couple of comments on dealing with floats. > > - Use FLT_EPSILON/DBL_EPSILON from

Re: Floating point comparisons

2007-07-31 Thread Andy Dougherty
On Tue, 31 Jul 2007, Paul Cochrane wrote: > Hi all, > > I'm wanting to remove all the floating point comparison warnings which > appear when compiling parrot and wanted some advice as to how best to > achieve this. > > Floating point comparisons appear in code such as (taken from src/string.c):

[svn:parrot-pdd] r20382 - trunk/docs/pdds/draft

2007-07-31 Thread allison
Author: allison Date: Tue Jul 31 11:56:54 2007 New Revision: 20382 Modified: trunk/docs/pdds/draft/pdd17_pmc.pod Log: [pdd] Add question about COW to PMC PDD. Modified: trunk/docs/pdds/draft/pdd17_pmc.pod == --- trun

Re: Floating point comparisons

2007-07-31 Thread Joshua Hoblitt
A couple of comments on dealing with floats. - Use FLT_EPSILON/DBL_EPSILON from float.h - You method is total overkill, return (fabs(x - y) < DBL_EPSILON ? 1 : 0); should be sufficent (note: check with a numerical expert). - What about NANs and INFs? I typical test for one of the values being

Re: Floating point comparisons

2007-07-31 Thread peter baylies
On 7/31/07, Paul Cochrane <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm wanting to remove all the floating point comparison warnings which > appear when compiling parrot and wanted some advice as to how best to > achieve this. > > Floating point comparisons appear in code such as (taken from src/str

Floating point comparisons

2007-07-31 Thread Paul Cochrane
Hi all, I'm wanting to remove all the floating point comparison warnings which appear when compiling parrot and wanted some advice as to how best to achieve this. Floating point comparisons appear in code such as (taken from src/string.c): if (*p == '-' && f == 0.0) I'd like to replace this

Re: [perl #44291] [PATCH] Fix for suncc

2007-07-31 Thread chromatic
On Tuesday 31 July 2007 09:11:05 Paul Cochrane wrote: > Attached is a patch which allows the Sun C compiler on Solaris compile > Parrot. However, I'm *really* not sure if what I've done is correct. > I've tested the patch on Solaris (not all tests pass), on Linux (all > tests pass), and on Window

Re: [perl #42938] [BUG] allocation failures in res_lea.c

2007-07-31 Thread Mark Glines
On Thu, 31 May 2007 23:09:54 -0700 Mark Glines <[EMAIL PROTECTED]> wrote: > The code in utf8_encode_and_advance is beautiful. It basically says, > add a utf8 character to the buffer. Ok, now did we overrun the > buffer? CRASH! So if I add a call to Parrot_reallocate_string if the buffer isn't bi

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

2007-07-31 Thread Matt Diephouse
On 7/31/07, Nicholas Clark <[EMAIL PROTECTED]> wrote: > On Mon, Jul 30, 2007 at 09:20:27PM -0700, Matt Diephouse wrote: > > On 7/30/07, chromatic <[EMAIL PROTECTED]> wrote: > > > On Monday 30 July 2007 00:21:09 [EMAIL PROTECTED] wrote: > > > > Author: mdiep > > > > >=== --- trunk/src/inter_run.c (

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

2007-07-31 Thread Nicholas Clark
On Mon, Jul 30, 2007 at 09:20:27PM -0700, Matt Diephouse wrote: > On 7/30/07, chromatic <[EMAIL PROTECTED]> wrote: > > On Monday 30 July 2007 00:21:09 [EMAIL PROTECTED] wrote: > > > Author: mdiep > > >=== --- trunk/src/inter_run.c (original) > > > +++ trunk/src/inter_run.c Mon Jul 30 00:21:07