How can one find a maximum float number that can be stored on a particular machine without using built-in preprocessor directives of header files i.e. without using FLT_MAX,etc. from float.h?
How can one find a maximum float number that can be stored on a particular machine without using built-in preprocessor directives of header files i.e. without using FLT_MAX,etc. from float.h?
There is no standard way of doing it. You would have to know what the bit pattern representation of it was, and then load up the correct bits.
http://research.microsoft.com/~holla...ieeefloat.html
Why is the world would you do that ? The macros in <float.h> are designed for this purpose. What does prevent you to use them ?Originally Posted by Karam
Emmanuel Delahaye
"C is a sharp tool"
Do I smell homework?Originally Posted by Emmanuel Delaha
I got that assignment a million times in college. TIP: you don't need to use your computer or programming at all to calculate it as long as your computer conforms to IEEE standards or you have access to the documentation of the format you're using (although of course you could write a program to perform the calculation for you).
Study the link Thantos was so kind as to provide. You should be able to figure out what you need to do from there and the above tip
Quantum materiae materietur marmota monax si marmota monax materiam possit materiari?
(How much wood would a wood chuck cut if a wood chuck could chuck wood?)