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: [freenet-devl] Re: Yet another GCJ update. (a/k/a PR 1615followup)


On 24 Feb 2001, Per Bothner wrote:

> "Mark J. Roberts" <mjr@statesmean.com> writes:
>
> > This patch breaks BigInteger.divide:
>
> So it does.  It seems like I need to merge in more code ...
> Could you try this patch instead?

This looks OK with my test program, which tests just about every method,
and also with Freenet. Cool.

Today I found a different bug in the BigInteger(byte[]) constructor, where
bogus output is returned:

import java.math.BigInteger;

public class Test {
    public static void main(String[] args) {
        byte b[] = {73, -106, 2, -46}; // aka "1234567890"
        System.out.println(new BigInteger(b));
    }
}

mjr::mjr$ javac Test.java ; java -cp . Test
1234567890
mjr::mjr$ gcj --main=Test -o test Test.java ; ./test
0

The value returned is not always 0, but it seems to be for smallish
values.


-- 
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]