cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
I need create my float. How?
I need create my float. How?
May 14, 2011 at 1:13pm UTC
thiagofmam
(3)
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
May 14, 2011 at 1:15pm UTC
May 14, 2011 at 2:48pm UTC
hamsterman
(4538)
What exactly problems are you having?
May 16, 2011 at 12:33pm UTC
thiagofmam
(3)
I need create an simulation for HDL implementation. In HDL don't exists float then everything use bits.
Thanks
Last edited on
May 16, 2011 at 12:34pm UTC
May 16, 2011 at 2:27pm UTC
hamsterman
(4538)
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.
May 17, 2011 at 10:29pm UTC
thiagofmam
(3)
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.