[LLVMdev] Floating-Point Constants

Jon Sargeant delta17 at cox.net
Sat Apr 19 21:34:23 PDT 2008

I'm confused about the hexadecimal format for entering floating-point 
constants.  The bit pattern for 1.0 as a single-precision float is 
0x3f800000.  I tried entering the constant as 'float 0x3f800000', but 
the assembler said the constant was invalid for the type.  The bit 
pattern for 1.0 as a double-precision float is 0x3ff0000000000000, so I 
entered the constant as 'float 0x3ff0000000000000', and it worked.
Is this the correct behavior?

Best Regards,

More information about the llvm-dev mailing list