smarter way to get the bits out of the double, forgot about the longlong (what was I thinking)