[LLVMdev] Floating point constants (bug?)

Chris Lattner sabre at nondot.org
Sun Jul 15 17:09:55 PDT 2007


On Sun, 15 Jul 2007, Ben Chambers wrote:
> ...
>  store float 0x4016A3D700000000, float* %f
> ...
>
> Which is correct, but is a pain to have to parse.  Ideally, floating
> point would be printed like it says in the language guide, only using
> the hexadecimal representation when decimal representation is
> impossible.  In this case, however, 5.66e+00 seems pretty reasonable

The code is correct, please don't file a bug.  The number in question is 
5.6599998474121094, not 5.66, which is the closest approximation to 5.66 
you can get.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list