ldexp and frexp fixed