This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How convert double type to float?

The time transmitted from ALLSTAR DATA SOURCE is doubletype,and wanted to display time to LCD,so I want to convert double type to float ,and want to uS.How can i do that?
Thanks a lot!

Parents
  • Sorry ,I couldn't described the question clearly at noon.My mean is pointing to 64bits IEEE binary floating point value ,which binary structure as following:

    Double Float (64 bits )
    MSB (bit 63) = Sign
    Bit 62..52 = Exp
    Bit 51..00 = Mantissa
    2exp(-1*bit51) + 2 exp(-2*bit50).......
    Value = Sign * 1.mantissa * 2 exp(EXP-1023)

    Thanks for your help!

Reply
  • Sorry ,I couldn't described the question clearly at noon.My mean is pointing to 64bits IEEE binary floating point value ,which binary structure as following:

    Double Float (64 bits )
    MSB (bit 63) = Sign
    Bit 62..52 = Exp
    Bit 51..00 = Mantissa
    2exp(-1*bit51) + 2 exp(-2*bit50).......
    Value = Sign * 1.mantissa * 2 exp(EXP-1023)

    Thanks for your help!

Children