[perl #60674] sign($x) always returns 1 when $x ~~ Complex

2008-11-20 Thread Moritz Lenz via RT
On Wed Nov 19 07:35:48 2008, masak wrote: masak what should the behaviour of sign($x) be when $x is complex? I'd argue that it's a Failure. If you care about complex numbers, you usually want an angle instead, which you can get with Complex.polar. (And it's easier to give it a another meaning

Re: [perl #60674] sign($x) always returns 1 when $x ~~ Complex

2008-11-20 Thread TSa
HaloO, Moritz Lenz via RT wrote: On Wed Nov 19 07:35:48 2008, masak wrote: masak what should the behaviour of sign($x) be when $x is complex? I'd argue that it's a Failure. This is a bit drastic. If one computes in the complex domain a complex valued sign function is appropriate. multi