This is the mail archive of the java-patches@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]
Other format: [Raw text]

Re: BigInteger.modInverse() fix


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

On Monday 16 December 2002 20:04, Per Bothner wrote:
> Raif S. Naffah wrote:
> >>>>Not necessarirly.  I don't think canonicaliztion of small
> >>>>integers is required for correctness, just (space) effiency...
> >>>
> >>>...and speed, for some numerical algorithms where modulo 2**32 is
> >>>enough.
> >>
> >>canonicalize "in place" (i.e. ignoring the looking in smallFixNums
> >>still converts the 1-word integers to use just the 'ival' field
> >>without the 'words' array.  The issue is whether the input
> >>BigInteger, after "normalization-in-place" is replace by the
> >>equivalent BigInteger in the smallFixNums array.
> >
> > if the above is a question, then the answer is yes.  see lines
> > #435, 436 (after patch is applied).
>
> You're missing my point.

i was indeed :-)


> ...
> I don't know how euclidInv works enough to tell whether
> it would be correct to do:
>    rem = rem.canonicalize();
> instead of:
>    rem.canonicalize();
> It depends on whether rem is used purely as an input argument or
> it is used as an output argument.

rem and quot are always used as input arguments.


cheers;
rsn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Que du magnifique

iD8DBQE9/aW6+e1AKnsTRiERAxmrAKCNq7xMNTrZmHgbY5M424tJ0Hsg6ACg5dcV
R88Dym4nzsLUe4KeFneV0ho=
=ZPH3
-----END PGP SIGNATURE-----


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