On Mon, 10 Jul 2023 at 12:42, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote: > > On Mon, 10 Jul 2023 at 11:28, Amit Hiremath via Gcc-help > <gcc-help@xxxxxxxxxxx> wrote: > > > > Hi, > > > > Can you please point me to codes in GCC where numbers in human readable > > format to floating point and floating point to human readable format > > conversion are taking place? For example: 3.2444422 -->404FA4F1-->3.2444422 > > > > int main () > > { > > float a; > > > > a= 3.2444422; > > > > return 0; > > > > } > > when you generate asm code, the assembler code is converted to 404FA4F1. So > > I am looking for a code in the gcc compiler. > > I think you want the lex_number function in libcpp/lex.cc Although that's just the lexer, there will be other code to convert that to a SFmode value, which represents a single precision floating-point number. That will cause the lexed number to be converted to the closest representable value for the type, and then that is just written out as a four byte binary value. I don't know where all the code for that is.