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.
Wouldn't it be simpler to just call `malloc` here?