The bug appears to be in residue not correctly handling a complex number
with an imaginary part of zero:
   2|1j0   NB. "|" knows that "1j0" is not complex.
1
   2|{. 1 1j1
_1
   2|1+ j. 0
_1
   1j0 -: 1 + j. 0
1
   2|1j1-0j1
_1


On Thu, Dec 29, 2011 at 4:33 PM, Raul Miller <rauldmil...@gmail.com> wrote:

> This is a bug.
>
> That expression is the dictionary definition for residue.
>
> --
> Raul
>
> On Thu, Dec 29, 2011 at 1:44 PM, Aai <agroeneveld...@gmail.com> wrote:
> >
> >
> > On 29-12-11 13:33, Raul Miller wrote:
> >> Note also that this result is inconsistent with the expression from
> >> the dictionary which appeared in the sentence that I quoted above:
> >>
> >>     Y=: one
> >>     X=: 2
> >>     Y-X*<. Y % X+0=X
> >> 1
> >>
> > Residue | and the expression are not the same.
> >
> > mod=: 13 :'y-x*<. y % x+0=x'
> >
> >    8 | 37j37
> > _3j_3
> >
> > not ok
> > ----------------------------
> >
> >    37j37 - (<. 37j37 % 8) * 8
> > _3j5
> >
> >    8 mod 37j37
> > _3j5
> >
> > ok.
> >
> > Hence: don't use residue | for complex numbers.
> >
> >
> >
> > --
> > Met vriendelijke groet,
> > @@i = Arie Groeneveld
> >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to