Edward Cherlin wrote:
There was a discussion of the principal value of square root on this list some time back, making the point that for positive
[...]
It turns out that the domain and range and the location of the cut lines have to be worked out separately for different functions. Mathematical practice is not entirely consistent in making these decisions, but in programming, there seems to be widespread agreement that the shared definitions used in the APL, Common LISP, and Ada standards are the best available.
Do we want to get into all of this in Perl6?

pugs currently has "Complex" as a built-in type, though it isn't explicitly listed in S06. I can't see any tests for them yet, though.

So, testing the Complex number functionality as well as detailed
exploration of the corner cases, and alignment with best practice will
surely be appreciated by people looking at doing Complex math in Perl 6.
I think this applies regardless of whether it ends up a "core" type
(whatever that means) or not.  Personally I don't think that Complex numbers
are so bizarre an entity that you wouldn't want sqrt(-1) to return one
out of the box.

It's likely that very little implementation changes will need to be done,
as no doubt the mathematically minded folk that write GHC will have been
through that before.  But it will be invaluable in testing compliance of
the different run-time engines.

I suggest you come to the IRC channel at #perl6 on irc.freenode.net, and
ask for a committer account.

Sam.

Reply via email to