From:

Date:

April 26, 2005 20:49Subject:

Adding ComplexityMessage ID:

20050427034850.9487.qmail@web40806.mail.yahoo.comAs an exercise, I've been looking into what could be done in terms of creating a complex numbers package that takes advantage of perl 6 technology. A couple of thoughts that I ran across: When you take the square root of a number, you actually get one of two possible answers (for instance, sqrt(1) actually gives either a 1 or a -1). This sounds like an appropriate place to return an ajunction. Extending this philosophy a bit, note that any time that a complex number is raised to a rational power, you get a finite number of possible answers, which could likewise be handled as an ajunction of a list of the possible answers. Admittedly, the list could conceivably get to be quite long: raising a number to the 0.01 power, for instance, would result in a list of a hundred possible solutions. And matters get even messier when the power is irrational (such as pi), in which case the list becomes infinite in length. IIRC, this is exactly what lazy lists are for. So what happens when you apply a junction to a lazy list? Do you get a "lazy junction"? Jonathan "Dataweaver" Lang __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.comThread Next

**Adding Complexity**by Jonathan Lang- Re: Adding Complexity by =?ISO-8859-1?Q?Thomas_Sandla=DF?=
- Re: Adding Complexity by Mark Reed
- Re: Adding Complexity by Ingo Blechschmidt
- Re: Adding Complexity by Luke Palmer
- Re: Adding Complexity by Ingo Blechschmidt
- Re: Adding Complexity by Luke Palmer
- Re: Adding Complexity by Ingo Blechschmidt

nntp.perl.org: Perl Programming lists via nntp and http.

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