Correcting ldexp