BUG: fix buffer overflow in data array of ldexp and frexp

the number types does not match the size of the blank array anymore, use
a larger array and add asserts to ensure the size matches.
would work too, I guess it would be even better to fix the function to accept NULL data like its documentation says it does. If you pass NULL here it crashes :/