Hello,

yes the number is very big, but why if I don't use the extended
precision I have "infinity" as result, and if I use it I got an error
?

I should get infinity anyways.

this is my J session:

^/ 2 2 2 2

65536

^/ 2 2 2 2 2      NB. do not use extended precision and I have "+inf"

_

^/ 2 2 2 2 2 2   NB. do not use extended precision and I have "+inf"

_

^/ x: 2 2 2 2 2   NB. using extended precision I have the result (part of it)

2003529930406846464979072351560255750447825475569751419265016973710894059556311453089506130880933348101038234342907263181822949382118812668869506364761547029165041871916351587966347219442930927982084309104855990570159318959639524863372367203002916969592156...

^/ x: 2 2 2 2 2 2 NB. using extended precision I have error... not "+inf"

|limit error

| ^/x:2 2 2 2 2 2

https://en.wikipedia.org/wiki/Knuth%27s_up-arrow_notation

thanks,
Fausto

2015-02-17 18:55 GMT+01:00 'Pascal Jasmin' via Programming
<[email protected]>:
>   2 ^. ^/ 5 # 2x
> 65536
>
> so at just 5, it is a 65k bit number
>
> at 6, the 2log of that number would be that 65kbit number.  The number of 
> atoms in the universe is an 80 bit number.
>
>
>
>
>
> ----- Original Message -----
> From: Raul Miller <[email protected]>
> To: Programming forum <[email protected]>
> Cc:
> Sent: Tuesday, February 17, 2015 12:32 PM
> Subject: Re: [Jprogramming] Fwd: Hello all!
>
> I would guess that the number you are generating is too big to be
> represented using J's data structures (which would also suggest that
> it would be too big to fit into memory).
>
> Thanks,
>
> --
> Raul
>
> On Tue, Feb 17, 2015 at 12:12 PM, Fausto Saporito
> <[email protected]> wrote:
>> HI!
>>
>> I'm a new J user with a little experience of APL and LISP.
>>
>> In these days I'm playing with big numbers... very big indeed, and I
>> found a bug (?) in the exteded precision implementation of J.
>>
>> I'm not sure if I can call it a bug, but if I use the standard
>> precision number I got a "infinity" as result... as should be.
>>
>> I'm talking about knuth-up-arrow notation, to build the "tower of
>> power". In J the syntax is amazingly simple : ^/ 2 2 2 2
>>
>> 2^^4 is 2 * (2* (2* 2)) = 65536
>>
>> Now 2^^5 is _ with standard precision... but if I use x:  (i.e. ^/ x:
>> 2 2 2 2 2) can get most of number... it's quite big indeed.
>>
>> The problem arises with 2^^6 or 3^^4 I get "limit error" instead of _ ... 
>> why ?
>>
>> Is it an expected behaviour ?
>>
>> thanks in advance,
>> Fausto
>> ----------------------------------------------------------------------
>> 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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to