Fix frexp does not accept negative numbers
Add frexp unit tests