Building on the original definition:

  ".10#'1'
1111111111


   mmowa =: ".'x',~'1'#~[
   mmowa 50
11111111111111111111111111111111111111111111111111
   datatype mmowa 50
extended


On Thu, Nov 23, 2017 at 3:43 AM, Raul Miller <[email protected]> wrote:

>    F=: p.&10x@#&1"0
>    F i.10
> 0 1 11 111 1111 11111 111111 1111111 11111111 111111111
>    F 72
> 111111111111111111111111111111111111111111111111111111111111111111111111
>
> Thanks,
>
> --
> Raul
>
>
> On Thu, Nov 23, 2017 at 3:17 AM, 'Skip Cave' via Programming
> <[email protected]> wrote:
> > I want to greate an integer with all ones:
> >
> >    ".10#'1'
> >
> > 1111111111
> >
> >
> >    datatype ".10#'1'
> >
> > integer
> >
> >
> >    ".15#'1'
> >
> > 111111111111111
> >
> >    datatype ".15#'1'
> >
> > integer
> >
> >
> >    ".20#'1'
> >
> > 1.11111e19
> >
> >
> > NB. Drat! it seitched to floating.
> >
> >
> >     datatype ".20#'1'
> >
> > floating
> >
> > NB. So I need to use extended precision:
> >
> >      x:".20#'1'
> >
> > 11111111111111110656
> >
> >
> > NB. Uh oh! something is wrong. Not all ones!
> >
> >
> >     datatype x:".20#'1'
> >
> > rational
> >
> >
> > NB. Rational? What happened to extended precision?
> >
> > NB. So how do I create an integer with say, 50 onres?
> >
> >
> >     x:".50#'1'
> >
> > 11111111111111110805019569335803527359330256945152
> >
> >
> > NB. Nope!
> >
> >
> >
> > Skip Cave
> > ----------------------------------------------------------------------
> > 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