(4=+/+/g=/n)#n=.i.10

3 5




    Den tirsdag den 23. oktober 2018 20.08.27 CEST skrev Linda Alvord 
<[email protected]>:  
 
 This gives just the single digits that match and not the combination (3 37).
    
Nice.


Nice.  This gives only the single digits that match and not the pair (3 37).
    
    ]i=: q: 1998 2997 3996 4995 5994 6993 7992 8991
2 3 3 3 37  0  0
3 3 3 3 37  0  0
2 2 3 3  3 37  0
3 3 3 5 37  0  0
2 3 3 3  3 37  0
3 3 3 7 37  0  0
2 2 2 3  3  3 37
3 3 3 3  3 37  0
  
  
  ([:~.e.#[)/2#"1 i
3 37
  

Linda

-----Original Message-----
From: Programming <[email protected]> On Behalf Of Don 
Guinn
Sent: Tuesday, October 23, 2018 1:09 PM
To: Programming forum <[email protected]>
Subject: Re: [Jprogramming] Common factors

  ([:~.e.#[)/2#"1 g
3 5

On Tue, Oct 23, 2018 at 10:57 AM Raul Miller <[email protected]> wrote:

> I wouldn't use ([#~e.)/ to satisfy the nub requirement, since it won't 
> always give you the nub.
>
> Try it on 2#"1 g to see this.
>
> Thanks,
>
> --
> Raul
>
> On Tue, Oct 23, 2018 at 12:50 PM Don Guinn <[email protected]> wrote:
> >
> >    ([#~e.)/g
> > 3 5
> >
> > On Tue, Oct 23, 2018 at 10:32 AM Raul Miller <[email protected]>
> wrote:
> >
> > > Rereading your original post, I see the requirement for nub.
> > >
> > > Here's a couple variants for that:
> > >
> > > ~.@f  (if ~. isn't in f)
> > >
> > > or
> > >
> > > f=: ~.@ix/
> > >
> > > Then again, we could have gone:
> > >
> > > ix=: ~.@[ -. -.
> > >
> > > FYI,
> > >
> > > --
> > > Raul
> > >
> > > On Tue, Oct 23, 2018 at 12:18 PM Skip Cave 
> > > <[email protected]>
> > > wrote:
> > > >
> > > > NB. Raul proposes:
> > > >
> > > > f =. ix /
> > > >
> > > > f h
> > > >
> > > > 5 3 5
> > > >
> > > > NB. Still need a nub.
> > > >
> > > >
> > > > NB. Add the nub
> > > >
> > > > f =. ~. ix /
> > > >
> > > > f h
> > > >
> > > > |domain error: f
> > > >
> > > >
> > > > NB. Robert's suggestion:
> > > >
> > > > f =. [:~. ix /
> > > >
> > > > f h
> > > >
> > > > 5 3
> > > >
> > > > NB. Correct!
> > > >
> > > > Skip
> > > >
> > > > On Tue, Oct 23, 2018 at 11:04 AM 'robert therriault' via 
> > > > Programming
> <
> > > > [email protected]> wrote:
> > > >
> > > > > Hi Skip,
> > > > >
> > > > > Your version of f is a hook, as Raul points out, and I think 
> > > > > that
> you
> > > want
> > > > > it to be a fork with a left tine of [: so that ~. is executed
> after ix/
> > > > >
> > > > >    h=.4 5$ 1 5 3 4 5 3 5 4 5 6 5 3 7 5 8 3 8 5 1 5
> > > > >    ix =: ([ -. -.)
> > > > >    f =. [: ~. ix /
> > > > >    f h
> > > > > 5 3
> > > > >
> > > > > Cheers, bob
> > > > >
> > > > > > On Oct 23, 2018, at 8:44 AM, Skip Cave 
> > > > > > <[email protected]>
> > > wrote:
> > > > > >
> > > > > > f =. ~. ix /
> > > > >
> > > > >
> ----------------------------------------------------------------------
> > > > > For information about J forums see
> https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.j
> software.com%2Fforums.htm&amp;data=02%7C01%7C%7C6e2369ca43d64d0886c608
> d6390a51af%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C63675911380769
> 4833&amp;sdata=DKC38%2Fj5WJZPpQIlffHm9WUsMtytuCnE2dbE5JuyC4g%3D&amp;re
> served=0
> > > >
> ----------------------------------------------------------------------
> > > > For information about J forums see
> https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.j
> software.com%2Fforums.htm&amp;data=02%7C01%7C%7C6e2369ca43d64d0886c608
> d6390a51af%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C63675911380769
> 4833&amp;sdata=DKC38%2Fj5WJZPpQIlffHm9WUsMtytuCnE2dbE5JuyC4g%3D&amp;re
> served=0
> > > ------------------------------------------------------------------
> > > ---- For information about J forums see 
> > > https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fw
> > > ww.jsoftware.com%2Fforums.htm&amp;data=02%7C01%7C%7C6e2369ca43d64d
> > > 0886c608d6390a51af%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C63
> > > 6759113807694833&amp;sdata=DKC38%2Fj5WJZPpQIlffHm9WUsMtytuCnE2dbE5
> > > JuyC4g%3D&amp;reserved=0
> > --------------------------------------------------------------------
> > -- For information about J forums see 
> > https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww
> > .jsoftware.com%2Fforums.htm&amp;data=02%7C01%7C%7C6e2369ca43d64d0886
> > c608d6390a51af%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C63675911
> > 3807694833&amp;sdata=DKC38%2Fj5WJZPpQIlffHm9WUsMtytuCnE2dbE5JuyC4g%3
> > D&amp;reserved=0
> ----------------------------------------------------------------------
> For information about J forums see 
> https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.j
> software.com%2Fforums.htm&amp;data=02%7C01%7C%7C6e2369ca43d64d0886c608
> d6390a51af%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C63675911380769
> 4833&amp;sdata=DKC38%2Fj5WJZPpQIlffHm9WUsMtytuCnE2dbE5JuyC4g%3D&amp;re
> served=0
----------------------------------------------------------------------
For information about J forums see 
https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C6e2369ca43d64d0886c608d6390a51af%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636759113807694833&sdata=DKC38%2Fj5WJZPpQIlffHm9WUsMtytuCnE2dbE5JuyC4g%3D&reserved=0
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm  
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to