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 just won't DTRT.

This is closely related to my original point.  In particular, if
you're unwilling to have sqrt return junctions of distinct values, you
don't really want to mess with junctions of a single complex value on
different planes, either.

I suggest that the base library not bother with any of this; if someone wants it they can load a FullComplex module or something like that.

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university    KF8NH

Reply via email to