MathGroup Archive 1995

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Arbitrary Length Ints

  • To: mathgroup at
  • Subject: [mg1738] Re: [mg1714] Arbitrary Length Ints
  • From: John Fultz <jfultz>
  • Date: Mon, 24 Jul 1995 00:42:52 -0400

> Hi folks,
> I would like to use 64 bit integers in a Mathematica program -- does
> anyone know how to get longer int lengths??
> Thanks!
> Tom O'Brien
> UC Berkeley
> tomo at

I'm not quite sure of the limitation you're referring to.  If you're
actually referring to a Mathematica program, it easily surpasses 64
bit integers:

In[8]:= 2^512

Out[8]= 13407807929942597099574024998205846127479365820592393\

I could have, in fact, chosen a much larger integer, but you get the

If, on the other hand, you are referring to a *MathLink* program
(the only place I can think of off the top of my head where such a
limitation exists), then I believe you'd have to split the number
up into 32-bit chunks and send them that way, since MathLink, can't
handle anything larger than a long int.  Or, I suppose, you could also
send it as a string; either way, some conversion will be necessary.

Of course, then you have to create a representation in C and begin
overloading operators so C actually knows how to use these critters,
but that's an entirely separate discussion...

John Fultz
Wolfram Research, Inc.

  • Prev by Date: [Help] Plot complex function.
  • Next by Date: Re: Re: How to apply EdgeForm to ParametricPlot3D?
  • Previous by thread: Arbitrary Length Ints
  • Next by thread: Base 10 to Base 2 conversion error ?