frexp negative numbers fix

I found a problem with frexp when passing negative numbers. AFAIK per the standard, frexp is supposed to return a value with magnitude in the interval [1/2, 1). Since the sign isn't part of the magnitude, this function should work with negative numbers.

I've written a test case and attempted a fix.