Skip Menu |

This queue is for tickets about the Number-Fraction CPAN distribution.

Report information
The Basics
Id: 72682
Status: resolved
Priority: 0/
Queue: Number-Fraction

People
Owner: DAVECROSS [...] cpan.org
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

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



Subject: suggest overloaded abs()
Date: Thu, 24 Nov 2011 11:36:04 +1100
To: bug-Number-Fraction [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
As an idea for a feature, Number::Fraction could offer an overloaded abs() without much difficulty.
On Wed Nov 23 19:35:56 2011, user42@zip.com.au wrote: Show quoted text
> As an idea for a feature, Number::Fraction could offer an overloaded > abs() without much difficulty.
Interesting idea. I've put a quick implementation on github at https://github.com/davorg/number-fraction Please take a look and let me know what you think. If you find any problems, it would be great if you could send failing tests. Cheers, Dave...
Subject: Re: [rt.cpan.org #72682] suggest overloaded abs()
Date: Sat, 26 Nov 2011 07:54:29 +1100
To: bug-Number-Fraction [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
"Dave Cross via RT" <bug-Number-Fraction@rt.cpan.org> writes: Show quoted text
> > Please take a look and let me know what you think.
Looks good. I noticed a typo in the pod for exp(), Currently this only works if the right hand operand is an integer (or a Number::Fraction object that has a numerator of 1). which would be "denominator of 1" would it? Incidentally it may be better to do the isa() checks as blessed($x) && $x->isa(whatever) to allow for subclasses or objects which play tricks in an isa method. Dunno if such tricks work very well in practice, but usually it's good to call isa as a method.
Version 1.14 is en route to CPAN.