I want to create a 16-bit float datatype, allocating memory to exponential and mantissa part at my own discretion. How can I do that?
pranjalkumar
0
Newbie Poster
Recommended Answers
Jump to PostWhy do you want to do that?
you can use structures
saystruct myFloat{ short int sign:1; short int expo:6; short int mant:11; float toFloat(){ // conversion } // overloaded arithmetic operations // constructors and initializations }
hope this helps:)
All 4 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.