On Jun 12, 4:20 pm, u...@rogers.com wrote:
Just a quick question -- are floats on 64 bit machines
(Windows/Linux) still going to be 4 bytes, or will they be 8
bytes? Is there any guarentee that a float is four bytes?
No, there never has been. There's probably a minimum size (in
bits), because the standard does make some guarantees concerning
range and precision, but it's difficult to establish, since the
standard allows different bases. And there's definitely no
maximum size.
If you limit yourself to machines with IEEE floating point, then
you can pretty much count on a float being 32 bits---for most
machines, this will mean a size of 4 (but from what I've heard,
on some DSP, it will be a size of 1).
--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orient�e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S�mard, 78210 St.-Cyr-l'�cole, France, +33 (0)1 30 23 00 34