develooper Front page | perl.perl6.language | Postings from June 2008

Re: [perl #56230] [PATCH] Multimethods for Complex.

From:
Moritz Lenz
Date:
June 26, 2008 03:48
Subject:
Re: [perl #56230] [PATCH] Multimethods for Complex.
Another question:

Vasily Chekalkin (via RT) wrote:
> +.sub 'sqrt' :multi(Complex)
> +    .param pmc a
> +    a = sqrt a
> +    .return (a)
> +.end

Do we actually want a sqrt(Complex)? Somebody who is sufficiently
mathematically educated to work with complex numbers should now that
sqrt() is ambigous, because there are two possible results, and will
revert to roots() for that.

Any thoughts?

Moritz

-- 
Moritz Lenz
http://moritz.faui2k3.org/ |  http://perl-6.de/



Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About