Archived

This topic is now archived and is closed to further replies.

What Data Type that is larger than Double ?

This topic is 5127 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

A Triple?

LOL...just kidding. I''m not sure I understand your question. What do you mean by larger? Are you saying a double can''t represent a big enough number for your needs? Or something else?

-John

Share this post


Link to post
Share on other sites
What do you mean by larger? A decimal takes up more memory, but if you mean has the biggest maximum value then I beleive that would be long, which is 2^64.

Share this post


Link to post
Share on other sites
quote:
Original post by PlayGGY
... if you mean has the biggest maximum value then I beleive that would be long, which is 2^64.

Nope. The range of the double type is:
±5.0 × 10−324 to ±1.7 × 10308

The double type can represent the largest range of numbers. In fact I don''t think you would ever want to represent a number outside that range. However, the decimal type represents a smaller range but to a larger number of significant figures.

Share this post


Link to post
Share on other sites
double: +_1.8x10^308
long double: +_1.2x10^4932


I thought everyone new this. It''s bloody well documented with the rest of the ranges for C and C++, in both the old documents and the new documentation for both Microsoft SDK Help and the Borland Help (earliest I have was in the version 2.0 documents from the eighties).

Share this post


Link to post
Share on other sites
Thanks everybody.
- decimal is more precise than double but smaller range
- I have to do my homework that requires the number that double
can''t hold.
- ..

Share this post


Link to post
Share on other sites