x: converts a result to BigInteger and as you note, the precision of 10^300 is limited. But try

   10^300x

or perhaps

   <.@o. 10^1000x

   +/ (>: i.1000x)^(>: i.1000x) NB. seems to do what you want.

On 2014/01/22, 12:47 , Ray Zhao wrote:
Subject: Is there a BigInteger equivalent in J?


Hi, after seeing some questions that involve finding huge numbers (using
BigInteger in C#, which can store "infinitely large" integers), I tried
doing one in J but got unlimited:
+/ (1+i.1000)^(1+i.1000)
Obviously, it exceeds the range of double, but when I tried searching for a
way to extend the range of integers in J, I found x: which seems to extend
the precision, but not the range. Anyway, it carries with it its own
problems (such as not extending 10^300 properly, probably from precision
errors).

As a result, I'm wondering whether J has its own "BigInteger" equivalent.
Thanks in advance.


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to