Approximate log2 by a cast ?

Whats the fastest approximation of log2() ? simply reading a floating point value as if it was the corresponding integer. Strictly in C one of course has to use union not a cast to avoid undefined behavior. But the operation is better described by casting a pointer from type *float to *int32_t. The same works [ ]