Can you hold a larger value int or float?

Started by
21 comments, last by elis-cool 22 years, 2 months ago
Thanks neophyte but whats the point of saying a float (f) then instead of just leting it be cast into a float from a double it cant be that much slower...

is anyone going to answer this?
quote:
Also is there higher than __int64? I thought there was a way to explicity state the number of bytes you want the variable to be.

Edited by - elis-cool on February 6, 2002 12:21:02 AM
[email=esheppard@gmail.com]esheppard@gmail.com[/email]
Advertisement
Theres not much point in having the ''f'' at all. The compiler will give a warning if the number is too long to fit in a float.
e.g. I think this will cause a warning (if you have the max. warning level set):
float fMonkey = 1.5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555; 

Its mostly for completeness - for the same reason that people write:
long lLongNumber = 0x80000000L 

(note the ''L'') - its just to emphisise that this is a float or a long.
There''s a "hyper" type in MFC(though you probably don''t use MFC)
Also you could write a class with a struct in it to hold larger numbers.(although it''ll be hard to operate on those numbers and if you''re developing a 3D Engine then you should probably forget about it.

This topic is closed to new replies.

Advertisement