I'm looking to take an IEEE double and remove any integer part of it in the most efficient manner possible.
(set the last bit of the exponent to 1)
(& mask the last 52 bits of d)
(shift d left until the last bit of the exponent is zero, decrementing exp each time)
How about something simple?
double fraction = whole - ((long)whole);
This just subtracts the integer portion of the double from the value itself, the remainder should be the fractional component. It's possible, of course, this could have some representation issues.