I need create my float. How?

Hi, I have an work that I need create my particular float. Because I need represent values how (-254 ...255).999, but without use float type. I think in use 19 bits. 1 sign, 8 radix and 10 for mantissa with the function bitset in C++

Somebody can help me?

Sorry my english,

Thiago
Last edited on
What exactly problems are you having?
I need create an simulation for HDL implementation. In HDL don't exists float then everything use bits.

Thanks
Last edited on
HDL as in http://en.wikipedia.org/wiki/Hardware_description_language ?

Anyway, if creating a float isn't exactly your goal, you might find it a lot easier to use fixed point arithmetics.
Yes, is this! I saw that in C++ have type fixed in GCC. I'll study more. Thank you!
Topic archived. No new replies allowed.