I have a value in a buffer that represents a fractional 2s compliment number.
For example:
0000 0000 0000 1000 = +.05
0000 0000 1010 0010 = +10.125
I can convert them simple type setting a double to the buffer.
But I would like to avoid using floating point. I would like to break them into two separate integers.
.05
whole = 0
fraction = 5
10.25
whole=10
fraction=125
Or convert them to a string without using floating point
Any idea how to do this?
For example:
0000 0000 0000 1000 = +.05
0000 0000 1010 0010 = +10.125
I can convert them simple type setting a double to the buffer.
But I would like to avoid using floating point. I would like to break them into two separate integers.
.05
whole = 0
fraction = 5
10.25
whole=10
fraction=125
Or convert them to a string without using floating point
Any idea how to do this?