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


>>>>> "Per" == Per Bothner <per@bothner.com> writes:

Per> Would it make sense to do:
Per>            rem = rem.canonicalize();
Per>            quot = quot.canonicalize();
Per> It probably doesn't matter.

Are rem and quot guaranteed not to be small?
If so, at least a comment is warranted.
If not, the above must be done.

Per> Instead of allocating a BigInteger at each level of
Per> recursion, maybe you could modify euclidInv to:

The code already has a FIXME about its inefficient use of memory.  So
I think making this change isn't a requirement for the patch.  OTOH,
if Mark or Raif want to do it, that would be great.

Tom


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