[LLVMdev] Generating Floating point constants
Stéphane Letz
letz at grame.fr
Thu Jun 3 07:05:02 PDT 2010
Le 3 juin 2010 à 16:00, Martin Guy a écrit :
> [off list]
>
>> 0.8f get converted in 0x3FE99999A0000000 by LLVM
>
> single precision
>
>> http://babbage.cs.qc.edu/IEEE-754/Decimal.html gives:
>>
>> 0x3FE999999999999A instead and this value cannot be read back by "llc"...
>
> double precision
>
> M
Well
For float 0.8 :
http://babbage.cs.qc.edu/IEEE-754/Decimal.html
3F4CCCCD for Single precision (32 bits):
3FE999999999999A for Double precision (64 bits):
Still different compared to LLVM...
Any idea?
Stéphane
More information about the llvm-dev
mailing list