This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Using GMP for BigIntegers.


On Tue, 30 Jan 2001, Mark J. Roberts wrote:

> On 30 Jan 2001, Per Bothner wrote:
>
> > > Anyway, this (the former) approach is the one I'm going to take.
> >
> > Cool.
>
> You use Java's unsigned right shift operator (>>> and >>>=) about 12 times
> in your code. How should I translate this to C++?

I read I have to declare it as unsigned, like:

unsigned(var) >>= 10;

It compiles, but is it right?

> Also,
>
> rshift (jintArray idest, jintArray ix, jint x_start, jint len, jint count)
>
> and
>
> lshift (jintArray idest, jint d_offset, jintArray ix, jint len, jint count)
>
> don't have GMP counterparts AFAIK.

And

udiv_qrnnd (jlong N, jint D)

doesn't seem to be available either: the comment says it was copied from
GMP 2.0--maybe it's obsolete. Is there a substitute?


-- 
Mark Roberts
mjr@statesmean.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]