On Mon, 18 Apr 2005, Roger Hui <[EMAIL PROTECTED]> replied to Raul D. Miller:
> Subject: Re: dyad | with complex numbers
>
> There is no bug in the implementation.  It is your
> definition of "residue" that is different.
>
> rem=: 4 : 0 " 0
>  if. 0=x. do. y. return. end.
>  q=. y.%x.
>  s=. >. q
>  t=. <. q
>  (s~:t)*y.-x.*t
> )
>
>    (|/~ -: rem/~) j./~i.4
> 1

I just noticed that while this works fine up to J 6.01, it fails in J 6.02.
The same happens when rem is replaced by res (from the dictionary page),
so this suggests a new bug rather than an implementation change.

(|j.)"0/~ i.10 used to produces all non-negative results.
However, in J 6.02, in x|j.y the imaginary part becomes negative whenever y>:-:x
(Perhaps an internal optimization is causing rounding to be used, rather than 
floor?)

   9!:14 ''
j602/2008-03-03/16:45

-- Mark D. Niemiec <[EMAIL PROTECTED]>

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to