java - What is an alternative to int for bigger numbers? -


i wrote pretty big program many methods use variable integer. there way change fast else? note methods use div , mod on integer, trying change arraylist mean changing pretty lot of code.

i discovered late int not enough store numbers need(coefficients of polynomials, is; though going work small ones, ended needing ones of bigger length 9).

you can use long, give twice many bits. if that's not big enough, can move biginteger, give many want, won't able user operators (like div , mod) directly.

edit: maximum value of long 9223372036854775807 (which 2^63-1)


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -