Quote Originally Posted by hamster_nz View Post
What does it do with denormalized numbers? Does it handles non-numbers like infinity?
This function is just to extract the exponent so that I can construct a string from the float, because I'm doing this for a custom library that is to work with or without libc I have to avoid relying on external libraries which in all likelihood rely on libc anyways, in other words I have to rely ONLY on what the system and the compiler provide me with, unfortunately I can't find any predefines or builtins or otherwise that would provide me the exponent & mantissa width directly so calculating it with the assumption that the exponent is one lower than it's max value is the only way I can think of to obtain the mantissa length and in turn the exponent width which in turn allows me to get the exponent itself