ok... thanks a lot! now it's perfectly clear to me.
2015-02-17 20:43 GMT+01:00 Skip Cave <[email protected]>: > When you use extended precision arithmetic, you are asking for J to give > you ALL the digits of the answer to a specific calculation. If it can't > give you ALL the digits, it will explain that it has hit the limit of the > machine to hold and display all the digits required. > > Skip > > Skip Cave > > > On Tue, Feb 17, 2015 at 1:37 PM, Cliff Reiter <[email protected]> wrote: > >> Infinity is a float. >> 3!:0]_ >> >> 8 >> >> Extended precision arithmetic does not promote to float, so rather than >> reaching infinity, it reaches a limit error. At least that is how think >> about it. >> Best, Cliff >> >> >> >> On 2/17/2015 2:23 PM, Fausto Saporito wrote: >> >>> 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) >>> >>> 200352993040684646497907235156025575044782547556975141926501 >>> 697371089405955631145308950613088093334810103823434290726318 >>> 182294938211881266886950636476154702916504187191635158796634 >>> 721944293092798208430910485599057015931895963952486337236720 >>> 3002916969592156... >>> >>> ^/ 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 >>> >>> >>> >> ---------------------------------------------------------------------- >> 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
