FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


java longer than long?





Dark-Tech
are there any types for java that are longer than long
Gieter
I think double, but I'm not sure. Just google for it Smile
Dark-Tech
thx your right im just not to used to thinking of it like that i mean its afew extra lines but i was expecting a few more anyway
AftershockVibe
Note that while long is an integer type, double is floating point. Float will also give you the range you need.

Floating point representation gives you greater range but less accuracy at the extremes so you have to be careful you're not doing anything that needs a tremendous degree of accuracy! Float is half the size and therefore less accurate than a double.
martindecorte
The easiest solution would perhaps be to create your own SuperLong type. I did it once, my method was really simple, but surely not very fast at run time. But there are surely fast methods to implement a new integer type.
Zork538
You might want to look into BigInteger

http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.html

Although this is not a primative type, it can be very usefull when working with big numbers.

Ther is also a floating point version called BigDecimal.

Greetz
Antoine_935
did you try "long long" ?
In c++, it works and is twice longer than a long.
Related topics
hi ive got a question
How long does it take for your account to be handled?
How long can a digital camera battery sustain?
F. Nietzsche
Turkey Bird flu Spreads
What's your favorite drink?
PHP VS ASP
hi@all
how did you learn about html, php or other languages???
mobile programmers codes
How tough is PHP?
Pluto is no longer a planet
Very Simple On Site Editor
men and long hair...
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.