[LLVMdev] confused about float literals

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Apr 27 08:32:56 PDT 2011


On Apr 27, 2011, at 1:03 AM, Joe Armstrong wrote:

> But what is 0x400928F5C0000000? it is NOT the 64 bit representation
> with the low order
> 32 bits zeroed - it is the 62 bit representation with the low order 28
> bits zeroed.
> 
> Why 28 bits? - 32 bits might be understandable but not 28.

I bet the low 29 bits are zeroed. That is the difference between the 52 bit double significand and the 23 bit float significand.

This is what you get if 3.145 is first converted to a float and then to a double.

/jakob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110427/00d43f46/attachment.html>


More information about the llvm-dev mailing list