biginteger calucation prfoblem

Posted by murali on Stack Overflow See other posts from Stack Overflow or by murali
Published on 2010-05-06T05:48:42Z Indexed on 2010/05/06 5:58 UTC
Read the original article Hit count: 330

Filed under:
|

hi i am using the following code but the parameters are not passed to the methods.

BigInteger p = BigInteger.valueOf(0); BigInteger u1 = obj.bigi_calc(g1, l);

in this g1,l are long values

the method is

private BigInteger bigi_calc(long g1, long l){

    BigInteger cal = BigInteger.valueOf(g1);
    BigInteger cal1= BigInteger.valueOf(l);
    for(BigInteger f = BigInteger.ONE;f.compareTo(cal1)>0;f=f.add(BigInteger.ONE)){
        //BigInteger p= BigInteger.valueOf(0);
        p = cal.multiply(cal1);
        System.out.println("check p"+p);
    }
//  System.out.println("check p"+p);
    return p;
}

the elipse shows that it may be out of sync.. but the paramerters are not passed to the functions.. can you plz help me to slove this problem

© Stack Overflow or respective owner

Related posts about java

Related posts about java-ee