Hi Ken,

I am interested in complex numbers for Smallapack linear algebra package.

I think Complex numbers could as well be removed from Kernel image since not used and become a loadable module.

Concerning (-1 sqrt) and the like, complex extension of these functions can be desired in some applications, while other applications might not deal with complex numbers and should better create an Exception.

There is a way to obtain both behaviors in one image by catching these exception with a handler extending the functions to complex domain. Personnally, I am not satisfied with this pattern i find it heavy... If anyone has a better one...

Also browse mantis and search for complex:

http://bugs.impara.de/view.php?id=2688http://bugs.impara.de/view.php?id=2689See also at squeak source:

Math-Complex-Extensions

Math-Number-Extensions

Math-Quaternion

Bye

Nicolas

Le Mardi 17 Octobre 2006 03:45, Ken Dickey a écrit :

> Greetings,

>

> I'd like to raise the idea of changing the complex number code in 3.10/4.0.

>

> See change set at:

>

http://bugs.impara.de/view.php?id=3311>

>

> Current (3.8/3.9):

> 2i isNumber. "false"

> -4 ln. "NaN"

> -4 sqrt. "exception"

>

> Alternate Code:

> 2i isNumber. "true"

> -4 ln. "(1.38629436111989 +3.141592653589793i)"

> -4 sqrt. "2.0i"

>

>

> I consider this a "community issue".

>

> Questions:

> - Are there users of complex numbers (does anyone care)?

> - Assuming yes, are there objective criteria for choosing between

> alternate implementations?

> + behavior/completeness/test-cases

> + performance (I suspect that "the wrong answer fast" is not the

> Smalltalk way as we can always augment the primOps)

> + complex number user community vote

> + other...?

>

> I am actually agnostic as to which code base gets chosen, but we really

> should get the answers right.

>

> $0.02

> -KenD

________________________________________________________________________

iFRANCE, exprimez-vous !

http://web.ifrance.com