With help from Roger,

    nd=: 13 :'(y*%1+.y),%1+.y'
   
   nd
(] * [: % 1 +. ]) , [: % 1 +. ]

Linda

-----Original Message-----
From: Programming [mailto:[email protected]] On Behalf 
Of Roger Hui
Sent: Tuesday, March 8, 2016 11:33 PM
To: Programming forum
Subject: Re: [Jprogramming] Numerator and Denominator

   x=: %/?2$10^8x
   x
69904549r40669028

   den=: [: % 1 +. ]
   num=: * den

   den x
40669028
   num x
69904549




On Tue, Mar 8, 2016 at 7:28 PM, Kip Murray <[email protected]> wrote:

> That's great!  It's still a nice puzzle to write your own.  --Kip
>
> On Tuesday, March 8, 2016, Raul Miller <[email protected]> wrote:
>
> >    2 x: 6r4
> > 3 2
> >
> > --
> > Raul
> >
> >
> > On Tue, Mar 8, 2016 at 10:04 PM, Kip Murray <[email protected] 
> > <javascript:;>> wrote:
> > > How do you find the numerator and denominator in lowest terms of a
> > rational
> > > fraction?  For example,
> > >
> > >     nd 6r4
> > >  3 2
> > >
> > > --Kip Murray
> > >
> > >
> > >
> > > --
> > > Sent from Gmail Mobile
> > > ------------------------------------------------------------------
> > > ---- For information about J forums see 
> > > http://www.jsoftware.com/forums.htm
> > --------------------------------------------------------------------
> > -- For information about J forums see 
> > http://www.jsoftware.com/forums.htm
>
>
>
> --
> Sent from Gmail Mobile
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
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