or with a scalar power:

    (,~#@:":)    (9%~<:&(10&^)@: x:)   50   NB. showing result and its size

50 11111111111111111111111111111111111111111111111111


OK?


Mike


On 23/11/2017 08:26, 'Bo Jacoby' via Programming wrote:
    +/10^i.50x
11111111111111111111111111111111111111111111111111

     Den 9:17 torsdag den 23. november 2017 skrev 'Skip Cave' via Programming 
<[email protected]>:
  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



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to