Re: Complex planes

2008-07-16 Thread Brandon S. Allbery KF8NH
On 2008 Jul 16, at 18:48, Jon Lang wrote: Moritz Lenz wrote: Principle of least surprise: Suppose sqrt(1) returns any(1, -1): if sqrt($x) < 0.5 { do something } I can see the big, fat WTF written in the face of programmer who tries to debug that code, and doesn't know about junctions. It j

Re: Complex planes

2008-07-16 Thread Jon Lang
Mark Biggar wrote: > Let's worry about getting principal values, branch cuts and handling signed > zeros correct before dealing with the interaction of junctions and > multi-valued complex functions. Indeed. > BTW, two good references on this that we might want to plagiarizer.I mean > borr

Re: Complex planes

2008-07-16 Thread Larry Wall
It seems like my smiley went completely whoosh... Larry

Re: Complex planes

2008-07-16 Thread Jon Lang
Moritz Lenz wrote: > If the programmer errs on what he thinks is in a variable, it'll always > be a bug. Yes; but some bugs are easier to make, and harder to catch, than others. > Principle of least surprise: > > Suppose sqrt(1) returns any(1, -1): > if sqrt($x) < 0.5 { do something } > > I can s

Re: Complex planes

2008-07-16 Thread mark . a . biggar
Let's worry about getting principal values, branch cuts and handling signed zeros correct before dealing with the interaction of junctions and multi-valued complex functions. -- Mark Biggar [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]

Re: Complex planes

2008-07-16 Thread Moritz Lenz
is in a variable, it'll always be a bug. >>> and won't want to jump through the hurdles involved in picking '1' out >>> of 'any(1, -1)'. >> >> 1 and -1 aren't just separated by a complex plane, they are really >> distinct numbers

Re: Complex planes

2008-07-16 Thread Jon Lang
, -1)'. > > 1 and -1 aren't just separated by a complex plane, they are really > distinct numbers True enough. I fail to see how that invalidates my point, though: if you're going to mess with multiple complex planes, why wouldn't you also address the issue of distinct num

Re: Complex planes

2008-07-16 Thread Moritz Lenz
og(-1i) returned 0- 1.5708i, while 0 + 3/2*1i was expected). >> : >> : Should we standardize on one complex plane (for example -pi <= $c.angle >> : < pi like Complex.angle does)? Or simply fix the test to be agnostic to >> : complex planes? >> >> Standardizing on

Re: Complex planes

2008-07-16 Thread Jon Lang
+ 3/2*1i was expected). > : > : Should we standardize on one complex plane (for example -pi <= $c.angle > : < pi like Complex.angle does)? Or simply fix the test to be agnostic to > : complex planes? > > Standardizing on one complex plane is the normal solution, though > this

Re: Complex planes

2008-07-16 Thread Larry Wall
standardize on one complex plane (for example -pi <= $c.angle : < pi like Complex.angle does)? Or simply fix the test to be agnostic to : complex planes? Standardizing on one complex plane is the normal solution, though this being Perl 6, there's probably a better solution using infinite Junc

Complex planes

2008-07-15 Thread Moritz Lenz
i like Complex.angle does)? Or simply fix the test to be agnostic to complex planes? Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/