Skip Menu |

This queue is for tickets about the Math-TriangularNumbers-r CPAN distribution.

Report information
The Basics
Id: 58965
Status: resolved
Priority: 0/
Queue: Math-TriangularNumbers-r

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: no load Data::Dumper
Date: Wed, 30 Jun 2010 12:00:37 +1000
To: bug-Math-TriangularNumbers-r [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
I hoped Math::TriangularNumbers 0.03 wouldn't load the Data::Dumper module since I think a few numbers funcs might be done without it, or perhaps with it only require()'d if the debugging code is activated. (Personally I've been using Smart::Comments lately for leaving in diagnostics but with no runtime cost when not enabled. It prints things with Data::Dumper when turned on.)
Subject: Re: [rt.cpan.org #58965] no load Data::Dumper
Date: Tue, 29 Jun 2010 21:16:15 -0700
To: bug-Math-TriangularNumbers-r [...] rt.cpan.org
From: David Christensen <dpchrist [...] holgerdanske.com>
Kevin Ryde via RT wrote: Show quoted text
> I hoped Math::TriangularNumbers 0.03 wouldn't load the Data::Dumper > module since I think a few numbers funcs might be done without it, or > perhaps with it only require()'d if the debugging code is activated.
That's a good idea. Show quoted text
> (Personally I've been using Smart::Comments lately for leaving in > diagnostics but with no runtime cost when not enabled. It prints things > with Data::Dumper when turned on.)
Smart::Comments looks intriguing... I've changed the code and uploaded a new version (1.012) so that debugging is controlled by a constant (DEBUG) and Data::Dumper is only loaded (via "require") when the debugging constant is true. It should be both smaller and faster when debugging is off. Let me know if you have any problems or comments. David
Subject: Re: [rt.cpan.org #58965] no load Data::Dumper
Date: Sat, 03 Jul 2010 05:50:32 +1000
To: bug-Math-TriangularNumbers-r [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
"David Paul Christensen via RT" <bug-Math-TriangularNumbers-r@rt.cpan.org> writes: Show quoted text
> > Smart::Comments looks intriguing...
Its output is a bit verbose, and its use of warn() clashes with Test::NoWarnings, but I find it handy as I'm not smart enough to use a proper debugger, just printfs in the code :). Show quoted text
> I've changed the code and uploaded a new version (1.012)
Looks good. Do you need "use 5.10.0"? I think 5.6 may be enough for "our" if you want that.
Subject: Re: [rt.cpan.org #58965] no load Data::Dumper
Date: Fri, 02 Jul 2010 18:48:55 -0700
To: bug-Math-TriangularNumbers-r [...] rt.cpan.org
From: David Christensen <dpchrist [...] holgerdanske.com>
Kevin Ryde via RT wrote: Show quoted text
> Do you need "use 5.10.0"? I think 5.6 may be enough for "our" if you want that.
I'm running Perl 5.10 and that's all I can test/ support. David
Subject: Re: [rt.cpan.org #58965] no load Data::Dumper
Date: Sat, 03 Jul 2010 11:59:36 +1000
To: bug-Math-TriangularNumbers-r [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
"David Paul Christensen via RT" <bug-Math-TriangularNumbers-r@rt.cpan.org> writes: Show quoted text
> > I'm running Perl 5.10 and that's all I can test/ support.
The cpantesters works well for that. Declare a version you think is likely and the reports will say if it was a bit low or a little change can make it work.
RT-Send-CC: dpchrist [...] holgerdanske.com
On Fri Jul 02 22:01:43 2010, user42@zip.com.au wrote: Show quoted text
> "David Paul Christensen via RT" <bug-Math-TriangularNumbers- > r@rt.cpan.org> writes:
> > > > I'm running Perl 5.10 and that's all I can test/ support.
> > The cpantesters works well for that. Declare a version you think is > likely and the reports will say if it was a bit low or a little change > can make it work.
Math-TriangularNumbers-r is obsolete. I've moved the code into Dpchrist::TriangularNumber. I've removed the 'use 5.010' statements from all my CPAN modules, so we'll see what happens... Let me know if you have any other ideas or comments. David
Subject: Re: [rt.cpan.org #58965] no load Data::Dumper
Date: Fri, 26 Nov 2010 07:10:35 +1100
To: bug-Math-TriangularNumbers-r [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
"David Paul Christensen via RT" <bug-Math-TriangularNumbers-r@rt.cpan.org> writes: Show quoted text
> > Let me know if you have any other ideas or comments.
Looks like EPSILON makes is_triangular_number() say 2000001000001 is a triangular number when it's not. (That number being an exact integer within a 53-bit float, or a 64-bit integer on a 64-bit system.) My best idea for my own bit of a cube test was to calculate an inverse and multiply back to check, which works at least up to the point the multiply rounds off (27 bits or 31 bits or whatever).
RT-Send-CC: dpchrist [...] holgerdanske.com
On Thu Nov 25 15:10:51 2010, user42@zip.com.au wrote: Show quoted text
> Looks like EPSILON makes is_triangular_number() say 2000001000001 is a > triangular number when it's not. (That number being an exact integer > within a 53-bit float, or a 64-bit integer on a 64-bit system.) > > My best idea for my own bit of a cube test was to calculate an inverse > and multiply back to check, which works at least up to the point the > multiply rounds off (27 bits or 31 bits or whatever).
I would consider changing the underlying data type. I believe there is a class with arbitrary precision. In any case, Math::TriangularNumber is obsolete. Please use Dpchrist::TriangularNumber and we can hammer on that. David