frexp was incorrect for big values of input