Numerical Conversion in C/C++ -


I need to convert from C / C + + duplex to a 64 bit two, where the Radix dot bit number 1 9 is included).

This means that I want to convert the format to

  • 0x0000 0000 0010 0000 number1
  • 0xFFFF is FFFF FFF00000 - 1
  • 0x0000 0000 0000 0001 0.95 x 10 ^ -6
  • 0xFFFFFFFFFFFFFFF -0.95x10 ^ -6

So far I Although using the modf function from the C standard library, but it does not really cover my needs, I have also seen some types of conversion classes in Boost, but I Not found the right solution. Does anybody know the library or the easy way to do this conversion? Perhaps someone else familiar with Boost can point me in the right direction.

If everyone gets help, here are some documents about how the doubles are deposited.

Edit:

I have a follow-up question, it really is for my own interest, what is 'Redx'? Here it's like a decimal point but, for the second time I've only heard the word radix when I was learning about the discrete fast for fourier conversion. If I miss it correctly, then the Radix-II method is fast because there is less rebound required to calculate DFT.

"post-text" itemprop = "text">

This should give you the desired results:

  double d = someValue (); Int64_t FixedPoint = static_cast & lt; Int64_t & gt; (D * (1024 * 1024));  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -