On Wed, Apr 22, 2009 at 08:21:49AM -0400, Will Coleda wrote:
> On Wed, Apr 22, 2009 at 3:49 AM, Jonathan Leto
> <perl6-bugs-follo...@perl.org> wrote:
> > The attached patch makes calling log10 as a method on Complex numbers
> > work, as well as making all tests in t/spec/S32-num/log.t pass.
>
> This (untested) version will use the 'log10' method regardless of PMC
> type, so it doesn't haven't to be re-extended for another numeric PMC
> later.
> 
> .sub 'log10' :multi(num)
>     .param num z
>     $N0 = log10 z
>     .return($N0)
> .end
> 
> .sub 'log10' :multi(_)
>     .param pmc z
>     $P0 = z.'log10'()
>     .return($P0)
> .end


FWIW, these all look to me like they'd be really good candidates for
moving into the setting (with inline PIR as needed), instead of
keeping them as pure PIR.

Pm

Reply via email to