[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: more. was: ...and in classpath. was: bug in libjava
From: |
Casey Marshall |
Subject: |
Re: more. was: ...and in classpath. was: bug in libjava |
Date: |
Fri, 13 Dec 2002 00:29:56 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021130 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
(CC to the Classpath list)
Busy night :)
The BigInteger.euclidInv bug has to do with the transition between the
BigInteger-based version of the function to the int-based one. See:
LINE 1104:
~ if (a.words == null)
~ {
~ int[] xyInt = euclidInv(b.ival, a.ival % b.ival, a.ival / b.ival);
~ xy = new BigInteger[3];
~ xy[0] = new BigInteger(xyInt[0]);
~ xy[1] = new BigInteger(xyInt[1]);
~ }
This conditional does not consider if (b.words == null), which means it
may recurse with a value of `b==1' (not good!). It may be the case that
always `a > b' for this algorithm (is this so?), but it is not the case
right now that `b' is stored as int-only if `a' is.
So a fix involves changing line 1104 to read:
~ if (a.words == null && b.words == null)
Cheers,
- --
Casey Marshall < address@hidden > http://metastatic.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE9+ZqEgAuWMgRGsWsRAtRAAJ0dUY1T8iZuJK/9LwFddGHU8P5tsQCfYXD0
IAEKvw5BJ31XOLYw7Z6qM0w=
=4N44
-----END PGP SIGNATURE-----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: more. was: ...and in classpath. was: bug in libjava,
Casey Marshall <=